diff --git a/src/bullets.cpp b/src/bullets.cpp index 5dc06b9..6400082 100644 --- a/src/bullets.cpp +++ b/src/bullets.cpp @@ -364,8 +364,7 @@ static void alien_destroy(object *alien, object *attacker) { setRadioMessage(FACE_KLINE, "It was an honor... to have fought you...", 1); alien->dx = alien->dy = 0; - alien->maxShield = 2000; - alien->shield = -200; + alien->shield = -150; } } @@ -531,7 +530,9 @@ void doBullets() if (bullet->id == WT_CHARGER) { 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 - rrand(-(bullet->damage * 2 / 3), 0)), + (int)(bullet->y + rrand(-3, 3))); } blit(bullet->image[0], (int)bullet->x, (int)bullet->y); @@ -699,25 +700,25 @@ void doBullets() } // Check for bullets hitting player - if ((bullet->flags & WF_WEAPCO) || (bullet->id == WT_ROCKET) || (bullet->id == WT_LASER) || (bullet->id == WT_CHARGER)) + if ((bullet->flags & WF_WEAPCO) || (bullet->id == WT_ROCKET) || + (bullet->id == WT_LASER) || (bullet->id == WT_CHARGER)) { - if ((bullet->active) && (player.shield > 0) && (collision(bullet, &player)) && (bullet->owner != &player)) + if ((bullet->active) && (player.shield > 0) && + (collision(bullet, &player)) && (bullet->owner != &player)) { if ((!engine.cheatShield) || (engine.missionCompleteTimer != 0)) { - if (player.shield > engine.lowShield) - { - if (player.shield - bullet->damage <= engine.lowShield) - { - setInfoLine("!!! WARNING: SHIELD LOW !!!", FONT_RED); - } - } + if ((player.shield > engine.lowShield) && + (player.shield - bullet->damage <= engine.lowShield)) + setInfoLine("!!! WARNING: SHIELD LOW !!!", FONT_RED); + player.shield -= bullet->damage; limitInt(&player.shield, 0, player.maxShield); player.hit = 5; } - if ((bullet->owner->classDef == CD_PHOEBE) || (bullet->owner->classDef == CD_URSULA)) + if ((bullet->owner->classDef == CD_PHOEBE) || + (bullet->owner->classDef == CD_URSULA)) getPlayerHitMessage(bullet->owner); if (bullet->id != WT_CHARGER) @@ -779,7 +780,8 @@ void doBullets() { audio_playSound(SFX_EXPLOSION, bullet->x); for (int i = 0 ; i < 10 ; i++) - addExplosion(bullet->x + rrand(-35, 35), bullet->y + rrand(-35, 35), E_BIG_EXPLOSION); + addExplosion(bullet->x + rrand(-35, 35), + bullet->y + rrand(-35, 35), E_BIG_EXPLOSION); if (bullet->flags & WF_TIMEDEXPLOSION) if (checkPlayerShockDamage(bullet->x, bullet->y)) diff --git a/src/defs.h b/src/defs.h index 3d939ae..81922ce 100644 --- a/src/defs.h +++ b/src/defs.h @@ -178,7 +178,7 @@ enum { W_DIRSHOCKMISSILE }; -// Missions +// Mission types enum { M_DESTROY_ALL_TARGETS = 1, diff --git a/src/player.cpp b/src/player.cpp index 09dbf3b..a7d7c7e 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -133,8 +133,8 @@ void doPlayer() { if (!charger_fired) { - limitCharAdd(&player.ammo[1], 1, 0, 200); - if (player.ammo[1] >= 200) + limitCharAdd(&player.ammo[1], 1, 0, 150); + if (player.ammo[1] >= 150) { fireBullet(&player, 1); player.ammo[1] = 0;