From 30ace4d67bc7297361c2a40b0c2ae5851f5434a3 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Tue, 9 Jun 2015 01:06:26 -0400 Subject: [PATCH] Returned the obscene power of the original charger to origial difficulty. Also made some tweaks to the code that displays the charge shots to make it look a little better. --- src/bullet.cpp | 6 +++++- src/game.cpp | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/bullet.cpp b/src/bullet.cpp index c04087c..e660fb2 100644 --- a/src/bullet.cpp +++ b/src/bullet.cpp @@ -81,7 +81,11 @@ void bullet_add(object *theWeapon, object *attacker, int y, int dy) if (bullet->id == WT_CHARGER) { - bullet->damage = attacker->ammo[1] / 2; + if (game.difficulty == DIFFICULTY_ORIGINAL) + bullet->damage = attacker->ammo[1]; + else + bullet->damage = attacker->ammo[1] / 2; + if (bullet->damage < 15) { bullet->damage = 1; diff --git a/src/game.cpp b/src/game.cpp index 839ec84..0e26b44 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -439,6 +439,7 @@ static void game_doBullets() bool okayToHit = false; int old_shield; float homingMissileSpeed = 0; + int charger_num; bullet = engine.bulletHead; prevBullet = engine.bulletHead; @@ -478,9 +479,15 @@ static void game_doBullets() if (bullet->id == WT_CHARGER) { - for (int i = 0 ; i < bullet->damage * 2 ; i++) + if (game.difficulty == DIFFICULTY_ORIGINAL) + charger_num = bullet->damage; + else + charger_num = bullet->damage * 2; + + for (int i = 0 ; i < charger_num ; i++) blit(bullet->image[0], - (int)(bullet->x - RANDRANGE(-(bullet->damage * 2 / 3), 0)), + (int)(bullet->x - RANDRANGE( + -(charger_num / 6), charger_num / 6)), (int)(bullet->y + RANDRANGE(-3, 3))); }