diff --git a/src/bullets.cpp b/src/bullets.cpp index bfb2dfd..2572d2c 100644 --- a/src/bullets.cpp +++ b/src/bullets.cpp @@ -80,8 +80,8 @@ void addBullet(object *theWeapon, object *attacker, int y, int dy) if (bullet->id == WT_CHARGER) { - bullet->damage = attacker->ammo[1]; - if (bullet->damage < 50) + bullet->damage = attacker->ammo[1] / 2; + if (bullet->damage < 15) { bullet->damage = 1; bullet->id = WT_PLASMA; @@ -525,8 +525,8 @@ void doBullets() if (bullet->id == WT_CHARGER) { - for (int i = 0 ; i < bullet->damage ; i++) - blit(bullet->image[0], (int)(bullet->x - rrand(-(bullet->damage / 3), 0)), (int)(bullet->y + rrand(-3, 3))); + for (int i = 0 ; i < bullet->damage * 2 ; i++) + blit(bullet->image[0], (int)(bullet->x - rrand(-(bullet->damage * 2 / 3), 0)), (int)(bullet->y + rrand(-3, 3))); } blit(bullet->image[0], (int)bullet->x, (int)bullet->y); diff --git a/src/intermission.cpp b/src/intermission.cpp index e7c1a63..eddcf37 100644 --- a/src/intermission.cpp +++ b/src/intermission.cpp @@ -478,17 +478,6 @@ 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[W_PLAYER_WEAPON].reload[0] = max(weapon[W_PLAYER_WEAPON].reload[0], - rate2reload[currentGame.maxPlasmaRate]); - weapon[W_PLAYER_WEAPON].ammo[0] = min(weapon[W_PLAYER_WEAPON].ammo[0], - currentGame.maxPlasmaOutput); - weapon[W_PLAYER_WEAPON].damage = min(weapon[W_PLAYER_WEAPON].damage, - currentGame.maxPlasmaDamage); - } - clearScreen(black); updateScreen(); clearScreen(black); diff --git a/src/player.cpp b/src/player.cpp index dd3b9d4..14d2a99 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -64,11 +64,24 @@ void initPlayer() void exitPlayer() { + charger_fired = false; + if (player.weaponType[1] == W_CHARGER) player.ammo[1] = 0; if (player.weaponType[1] == W_LASER) player.ammo[1] = 0; + + // Remove the Supercharge, if it is there + if (currentGame.difficulty > DIFFICULTY_EASY) + { + weapon[W_PLAYER_WEAPON].reload[0] = max(weapon[W_PLAYER_WEAPON].reload[0], + rate2reload[currentGame.maxPlasmaRate]); + weapon[W_PLAYER_WEAPON].ammo[0] = min(weapon[W_PLAYER_WEAPON].ammo[0], + currentGame.maxPlasmaOutput); + weapon[W_PLAYER_WEAPON].damage = min(weapon[W_PLAYER_WEAPON].damage, + currentGame.maxPlasmaDamage); + } } void doPlayer() @@ -121,8 +134,8 @@ void doPlayer() { if (!charger_fired) { - player.ammo[1] += 1; - if (player.ammo[1] >= 125) + limitCharAdd(&player.ammo[1], 1, 0, 200); + if (player.ammo[1] >= 200) { fireBullet(&player, 1); player.ammo[1] = 0; diff --git a/src/structs.h b/src/structs.h index 86c54ce..228d22f 100644 --- a/src/structs.h +++ b/src/structs.h @@ -34,7 +34,7 @@ struct object { signed char speed; unsigned char damage; // Contact damage for bullets int score; // How much a kill of this is worth - unsigned char ammo[2]; // Ammo for 2nd weapon. Max of 100 (except laser) + unsigned char ammo[2]; // Ammo for 2nd weapon. signed char face; // Either 0 or 1