X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fbattle.c;h=7068553602ed88833a498e3fd0a89af1aa886aa2;hp=d9e815436c0fa415b1e7bd9df81287c5575c5919;hb=e4ddd3649bf73ddd7a1e2bb32e7ce2e631293068;hpb=b40eba51deeb13f362e95416c005156be4104067 diff --git a/src/battle.c b/src/battle.c index d9e8154..7068553 100644 --- a/src/battle.c +++ b/src/battle.c @@ -239,7 +239,7 @@ void ram(bool ibumpd, feature ienm, coord w) } game.shldup = false; prout(_("***Shields are down.")); - if (KLINGREM) { + if (game.state.remkl + game.state.remcom + game.state.nscrem) { pause_game(true); damagereport(); } @@ -639,7 +639,7 @@ void attack(bool torps_ok) r = (Rand()+Rand())*0.5 -0.5; r += 0.002*game.kpower[loop]*r; torpedo(course, r, jay, &hit, 1, 1); - if (KLINGREM==0) + if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0) finish(FWON); /* Klingons did themselves in! */ if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova || game.alldone) return; /* Supernova or finished */ @@ -789,7 +789,7 @@ void deadkl(coord w, feature type, coord mv) /* For each kind of enemy, finish message to player */ prout(_(" destroyed.")); game.quad[w.x][w.y] = IHDOT; - if (KLINGREM==0) + if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0) return; game.state.remtime = game.state.remres/(game.state.remkl + 4*game.state.remcom); @@ -966,7 +966,7 @@ void photon(void) if (game.alldone || game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) return; } - if (KLINGREM==0) + if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0) finish(FWON); } @@ -1368,7 +1368,7 @@ void hittem(double *hits) skip(1); if (kpow == 0) { deadkl(w, ienm, w); - if (KLINGREM==0) + if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0) finish(FWON); if (game.alldone) return;