game.damage[l] -= (game.damage[l]-repair > 0.0 ? repair : game.damage[l]);
/* If radio repaired, update star chart and attack reports */
if (radio_was_broken && game.damage[DRADIO] == 0.0) {
game.damage[l] -= (game.damage[l]-repair > 0.0 ? repair : game.damage[l]);
/* If radio repaired, update star chart and attack reports */
if (radio_was_broken && game.damage[DRADIO] == 0.0) {
prout("Lt. Uhura- \"Captain, the sub-space radio is working and");
prout(" surveillance reports are coming in.");
skip(1);
prout("Lt. Uhura- \"Captain, the sub-space radio is working and");
prout(" surveillance reports are coming in.");
skip(1);
else game.future[FTBEAM] = game.state.date+Time+expran(1.5*intime/game.state.remcom);
break;
case FSNAP: /* Snapshot of the universe (for time warp) */
else game.future[FTBEAM] = game.state.date+Time+expran(1.5*intime/game.state.remcom);
break;
case FSNAP: /* Snapshot of the universe (for time warp) */
if (game.state.baseqx[j]==game.state.cx[k] && game.state.baseqy[j]==game.state.cy[k] &&
(game.state.baseqx[j]!=quadx || game.state.baseqy[j]!=quady) &&
(game.state.baseqx[j]!=game.state.isx || game.state.baseqy[j]!=game.state.isy)) {
if (game.state.baseqx[j]==game.state.cx[k] && game.state.baseqy[j]==game.state.cy[k] &&
(game.state.baseqx[j]!=quadx || game.state.baseqy[j]!=quady) &&
(game.state.baseqx[j]!=game.state.isx || game.state.baseqy[j]!=game.state.isy)) {
if (j>game.state.rembase) {
/* no match found -- try later */
game.future[FBATTAK] = game.state.date + expran(0.3*intime);
if (j>game.state.rembase) {
/* no match found -- try later */
game.future[FBATTAK] = game.state.date + expran(0.3*intime);
if (game.state.cx[i]==batx && game.state.cy[i]==baty)
break;
if (i > game.state.remcom || game.state.rembase == 0 ||
if (game.state.cx[i]==batx && game.state.cy[i]==baty)
break;
if (i > game.state.remcom || game.state.rembase == 0 ||
if (game.state.baseqx[i]==batx && game.state.baseqy[i]==baty) {
game.state.baseqx[i]=game.state.baseqx[game.state.rembase];
game.state.baseqy[i]=game.state.baseqy[game.state.rembase];
if (game.state.baseqx[i]==batx && game.state.baseqy[i]==baty) {
game.state.baseqx[i]=game.state.baseqx[game.state.rembase];
game.state.baseqy[i]=game.state.baseqy[game.state.rembase];
if (game.state.baseqx[i]==quadx && game.state.baseqy[i]==quady)
break;
game.state.baseqx[i] = game.state.baseqx[game.state.rembase];
if (game.state.baseqx[i]==quadx && game.state.baseqy[i]==quady)
break;
game.state.baseqx[i] = game.state.baseqx[game.state.rembase];
if (game.kx[ll]==ii && game.ky[ll]==jj) break;
game.kpower[ll] -= 800.0; /* If firepower is lost, die */
if (game.kpower[ll] <= 0.0) {
if (game.kx[ll]==ii && game.ky[ll]==jj) break;
game.kpower[ll] -= 800.0; /* If firepower is lost, die */
if (game.kpower[ll] <= 0.0) {
/* did in the Supercommander! */
game.state.nscrem = game.state.isx = game.state.isy = isatb = iscate = 0;
iscdead = 1;
/* did in the Supercommander! */
game.state.nscrem = game.state.isx = game.state.isy = isatb = iscate = 0;
iscdead = 1;