From c9fb4e793cb0a2ad72d411039665d15ab3b47980 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Fri, 27 Feb 2015 22:03:06 -0500 Subject: [PATCH] Remove the Super Charge effect after leaving battle, unless on easy mode. --- src/collectable.cpp | 9 +++++++++ src/intermission.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/collectable.cpp b/src/collectable.cpp index e6512ae..d8409f1 100644 --- a/src/collectable.cpp +++ b/src/collectable.cpp @@ -83,6 +83,15 @@ void addCollectable(float x, float y, int type, int value, int life) } } + // Deny the Super Charge in Nightmare difficulty. + if (type == P_SUPER) + { + if (currentGame.difficulty >= DIFFICULTY_NIGHTMARE) + { + type = P_PLASMA_DAMAGE; + } + } + collectables *collectable = new collectables; collectable->next = NULL; diff --git a/src/intermission.cpp b/src/intermission.cpp index eddcf37..b347fe6 100644 --- a/src/intermission.cpp +++ b/src/intermission.cpp @@ -478,6 +478,15 @@ int galaxyMap() // do not perform certain keyboard actions engine.gameSection = SECTION_INTERMISSION; + // Remove the Supercharge, if it is there + if (currentGame.difficulty > DIFFICULTY_EASY) + { + weapon[0].reload[0] = max(weapon[0].reload[0], + rate2reload[currentGame.maxPlasmaRate]); + weapon[0].ammo[0] = min(weapon[0].ammo[0], currentGame.maxPlasmaOutput); + weapon[0].damage = min(weapon[0].damage, currentGame.maxPlasmaDamage); + } + clearScreen(black); updateScreen(); clearScreen(black);