From 6dad38bd20cef90ff6fd493786e3e9f2156ddfdf Mon Sep 17 00:00:00 2001 From: onpon4 Date: Thu, 7 Jan 2016 06:44:03 -0500 Subject: [PATCH] Made powerups in Classic difficulty behave the same as the original. There are two aspects to this: 1. They now simply make sure your plasma ammo is at a minimum of 50, rather than adding to your plasma ammo as in the other difficulties. 2. Added a simulation of a bug in Starfighter 1.1 which caused each aspect of the Supercharge to be lost when you picked up a different associated powerup. Even though this was a bug, without it, the Supercharge becomes extraordinarily more game-breaking, since it's the only thing that sort of limits its longevity. --- src/game.cpp | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 28d3480..156cd58 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -291,12 +291,17 @@ static void game_doCollectables() case P_PLASMA_RATE: game.powerups++; - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL) || - (player.ammo[0] > 0)) + if (game.difficulty == DIFFICULTY_ORIGINAL) { - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL)) + player.ammo[0] = MAX(player.ammo[0], 50); + weapon[W_PLAYER_WEAPON].reload[0] = MAX( + rate2reload[game.maxPlasmaRate], + weapon[W_PLAYER_WEAPON].reload[0] - 2); + } + else if ((game.area != MISN_INTERCEPTION) || + (player.ammo[0] > 0)) + { + if (game.area != MISN_INTERCEPTION) LIMIT_ADD(player.ammo[0], collectable->value, 0, game.maxPlasmaAmmo); @@ -316,12 +321,16 @@ static void game_doCollectables() case P_PLASMA_SHOT: game.powerups++; - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL) || - (player.ammo[0] > 0)) + if (game.difficulty == DIFFICULTY_ORIGINAL) { - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL)) + player.ammo[0] = MAX(player.ammo[0], 50); + weapon[W_PLAYER_WEAPON].ammo[0] = MIN( + game.maxPlasmaOutput, weapon[W_PLAYER_WEAPON].ammo[0] + 1); + } + else if ((game.area != MISN_INTERCEPTION) || + (player.ammo[0] > 0)) + { + if (game.area != MISN_INTERCEPTION) LIMIT_ADD(player.ammo[0], collectable->value, 0, game.maxPlasmaAmmo); @@ -341,18 +350,23 @@ static void game_doCollectables() case P_PLASMA_DAMAGE: game.powerups++; - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL) || - (player.ammo[0] > 0)) + if (game.difficulty == DIFFICULTY_ORIGINAL) { - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL)) + player.ammo[0] = MAX(player.ammo[0], 50); + weapon[W_PLAYER_WEAPON].damage = MIN( + game.maxPlasmaDamage, weapon[W_PLAYER_WEAPON].damage + 1); + } + else if ((game.area != MISN_INTERCEPTION) || + (player.ammo[0] > 0)) + { + if (game.area != MISN_INTERCEPTION) LIMIT_ADD(player.ammo[0], collectable->value, 0, game.maxPlasmaAmmo); if (weapon[W_PLAYER_WEAPON].damage >= game.maxPlasmaDamage) sprintf(temp, "Plasma damage already at maximum"); - else { + else + { weapon[W_PLAYER_WEAPON].damage++; sprintf(temp, "Plasma damage increased"); } @@ -369,8 +383,9 @@ static void game_doCollectables() (game.difficulty == DIFFICULTY_ORIGINAL) || (player.ammo[0] > 0)) { - if ((game.area != MISN_INTERCEPTION) || - (game.difficulty == DIFFICULTY_ORIGINAL)) + if (game.difficulty == DIFFICULTY_ORIGINAL) + player.ammo[0] = MAX(player.ammo[0], 50); + else if (game.area != MISN_INTERCEPTION) LIMIT_ADD(player.ammo[0], collectable->value, 0, game.maxPlasmaAmmo);