X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fbattle.c;h=836f1e7702dd0cd12c2de9140df591960f3a7dda;hb=a76d5b483a4f07459b71f9cce46c93c3f7ed8f96;hp=387bfa9f88449353b2b5f7bc321669981a0adf45;hpb=9ae916e9144e84ef1de4a86ea73a45a2bc4cc1be;p=super-star-trek.git diff --git a/src/battle.c b/src/battle.c index 387bfa9..836f1e7 100644 --- a/src/battle.c +++ b/src/battle.c @@ -399,7 +399,7 @@ void torpedo(double course, double r, coord in, double *hit, int i, int n) prout(_(" destroyed.")); game.state.nplankl++; q->planet = NOPLANET; - DESTROY(&game.state.plnets[game.iplnet]); + DESTROY(&game.state.planets[game.iplnet]); game.iplnet = 0; invalidate(game.plnet); game.quad[w.x][w.y] = IHDOT; @@ -413,7 +413,7 @@ void torpedo(double course, double r, coord in, double *hit, int i, int n) prout(_(" destroyed.")); game.state.nworldkl++; q->planet = NOPLANET; - DESTROY(&game.state.plnets[game.iplnet]); + DESTROY(&game.state.planets[game.iplnet]); game.iplnet = 0; invalidate(game.plnet); game.quad[w.x][w.y] = IHDOT; @@ -538,7 +538,8 @@ static void fry(double hit) if (loop2 < loop1) continue; ktr += 1; - if (ktr==3) skip(1); + if (ktr==3) + skip(1); proutn(_(" and ")); } proutn(device[j]); @@ -579,7 +580,7 @@ void attack(bool torps_ok) /* commanders get a chance to tac-move towards you */ if ((((game.comhere || game.ishere) && !game.justin) || game.skill == SKILL_EMERITUS) && torps_ok) - movcom(); + moveklings(); /* if no enemies remain after movement, we're done */ if (game.nenhere==0 || (game.nenhere==1 && iqhere && !iqengry)) @@ -597,7 +598,8 @@ void attack(bool torps_ok) where = sector; for_local_enemies(loop) { - if (game.kpower[loop] < 0) continue; /* too weak to attack */ + if (game.kpower[loop] < 0) + continue; /* too weak to attack */ /* compute hit strength and diminish shield power */ r = Rand(); /* Increase chance of photon torpedos if docked or enemy energy low */ @@ -617,7 +619,8 @@ void attack(bool torps_ok) (iquad==IHS && r > 0.07) || (iquad==IHQUEST && r > 0.05); if (usephasers) { /* Enemy uses phasers */ - if (game.condition == docked) continue; /* Don't waste the effort! */ + if (game.condition == docked) + continue; /* Don't waste the effort! */ attempt = true; /* Attempt to attack */ dustfac = 0.8+0.05*Rand(); hit = game.kpower[loop]*pow(dustfac,game.kavgd[loop]);