From eecdb15445a7aa3d3a360d78e7b8c5900bed537f Mon Sep 17 00:00:00 2001 From: onpon4 Date: Sat, 26 Nov 2016 13:12:15 -0500 Subject: [PATCH] Don't auto-sell rocket capacity when buying laser/charger in Classic. Classic difficulty penalizes you for selling items, so it's best not to automatically sell anything that doesn't need to be. It could be, for example, that you want to switch to a laser and then back to rockets, in which case the auto-selling could make this much more costly or cripple your missiles when you come back to them. --- src/shop.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/shop.cpp b/src/shop.cpp index f9427d5..fc70671 100644 --- a/src/shop.cpp +++ b/src/shop.cpp @@ -721,8 +721,11 @@ static void buy(int i) shop_sellSecondaryWeapon(); player.weaponType[1] = W_LASER; - while (game.maxRocketAmmo > 5) - sell(SHOP_ROCKET_MAX_AMMO); + if (game.difficulty != DIFFICULTY_ORIGINAL) + { + while (game.maxRocketAmmo > 5) + sell(SHOP_ROCKET_MAX_AMMO); + } while (player.ammo[1] > 0) sell(SHOP_ROCKET_AMMO); @@ -754,8 +757,11 @@ static void buy(int i) shop_sellSecondaryWeapon(); player.weaponType[1] = W_CHARGER; - while (game.maxRocketAmmo > 5) - sell(SHOP_ROCKET_MAX_AMMO); + if (game.difficulty != DIFFICULTY_ORIGINAL) + { + while (game.maxRocketAmmo > 5) + sell(SHOP_ROCKET_MAX_AMMO); + } while (player.ammo[1] > 0) sell(SHOP_ROCKET_AMMO);