if (same(w, game.ks[ll]))
break;
kp = fabs(game.kpower[ll]);
if (same(w, game.ks[ll]))
break;
kp = fabs(game.kpower[ll]);
if (same(game.state.baseq[ll], game.quadrant)) {
game.state.baseq[ll]=game.state.baseq[game.state.rembase];
break;
if (same(game.state.baseq[ll], game.quadrant)) {
game.state.baseq[ll]=game.state.baseq[game.state.rembase];
break;
game.quad[w.x][w.y]=IHDOT;
game.quad[jw.x][jw.y]=iquad;
prout(_(" displaced by blast to %s "), cramlc(sector, jw));
game.quad[w.x][w.y]=IHDOT;
game.quad[jw.x][jw.y]=iquad;
prout(_(" displaced by blast to %s "), cramlc(sector, jw));
/* if you have just entered the RNZ, you'll get a warning */
if (game.neutz) { /* The one chance not to be attacked */
/* if you have just entered the RNZ, you'll get a warning */
if (game.neutz) { /* The one chance not to be attacked */
- for_local_enemies(loop) {
- if (game.kpower[loop] < 0) continue; /* too weak to attack */
+ for (loop = 1; loop <= game.nenhere; loop++) {
+ 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 */
/* compute hit strength and diminish shield power */
r = Rand();
/* Increase chance of photon torpedos if docked or enemy energy low */
(iquad==IHS && r > 0.07) ||
(iquad==IHQUEST && r > 0.05);
if (usephasers) { /* Enemy uses phasers */
(iquad==IHS && r > 0.07) ||
(iquad==IHQUEST && r > 0.05);
if (usephasers) { /* Enemy uses phasers */
attempt = true; /* Attempt to attack */
dustfac = 0.8+0.05*Rand();
hit = game.kpower[loop]*pow(dustfac,game.kavgd[loop]);
attempt = true; /* Attempt to attack */
dustfac = 0.8+0.05*Rand();
hit = game.kpower[loop]*pow(dustfac,game.kavgd[loop]);
if (same(game.state.kcmdr[i], game.quadrant))
break;
game.state.kcmdr[i] = game.state.kcmdr[game.state.remcom];
if (same(game.state.kcmdr[i], game.quadrant))
break;
game.state.kcmdr[i] = game.state.kcmdr[game.state.remcom];
/* Remove enemy ship from arrays describing local conditions */
if (is_scheduled(FCDBAS) && same(game.battle, game.quadrant) && type==IHC)
unschedule(FCDBAS);
/* Remove enemy ship from arrays describing local conditions */
if (is_scheduled(FCDBAS) && same(game.battle, game.quadrant) && type==IHC)
unschedule(FCDBAS);
- if (!kz) for_local_enemies(i)
- irec+=fabs(game.kpower[i])/(PHASEFAC*pow(0.90,game.kdist[i]))*
- (1.01+0.05*Rand()) + 1.0;
+ if (!kz)
+ for (i = 1; i <= game.nenhere; i++)
+ irec += fabs(game.kpower[i])/(PHASEFAC*pow(0.90,game.kdist[i]))*
+ (1.01+0.05*Rand()) + 1.0;