- else for_starbases(i) {
- ibq = game.state.baseq[i];
- if (same(ibq, game.state.kscmdr) && same(game.state.kscmdr, game.battle)) {
- /* attack the base */
- if (avoid)
- return; /* no, don't attack base! */
- game.iseenit = false;
- game.isatb = 1;
- schedule(FSCDBAS, 1.0 +2.0*Rand());
- if (is_scheduled(FCDBAS))
- postpone(FSCDBAS, scheduled(FCDBAS)-game.state.date);
- if (damaged(DRADIO) && game.condition != docked)
- return; /* no warning */
- game.iseenit = true;
- pause_game(true);
- proutn(_("Lt. Uhura- \"Captain, the starbase in "));
- proutn(cramlc(quadrant, game.state.kscmdr));
- skip(1);
- prout(_(" reports that it is under attack from the Klingon Super-commander."));
- proutn(_(" It can survive until stardate %d.\""),
- (int)scheduled(FSCDBAS));
- if (!game.resting)
- return;
- prout(_("Mr. Spock- \"Captain, shall we cancel the rest period?\""));
- if (ja() == false)
+ else {
+ for (i = 1; i <= game.state.rembase; i++) {
+ ibq = game.state.baseq[i];
+ if (same(ibq, game.state.kscmdr) && same(game.state.kscmdr, game.battle)) {
+ /* attack the base */
+ if (avoid)
+ return; /* no, don't attack base! */
+ game.iseenit = false;
+ game.isatb = 1;
+ schedule(FSCDBAS, 1.0 +2.0*Rand());
+ if (is_scheduled(FCDBAS))
+ postpone(FSCDBAS, scheduled(FCDBAS)-game.state.date);
+ if (damaged(DRADIO) && game.condition != docked)
+ return; /* no warning */
+ game.iseenit = true;
+ announce();
+ proutn(_("Lt. Uhura- \"Captain, the starbase in "));
+ proutn(cramlc(quadrant, game.state.kscmdr));
+ skip(1);
+ prout(_(" reports that it is under attack from the Klingon Super-commander."));
+ proutn(_(" It can survive until stardate %d.\""),
+ (int)scheduled(FSCDBAS));
+ if (!game.resting)
+ return;
+ prout(_("Mr. Spock- \"Captain, shall we cancel the rest period?\""));
+ if (ja() == false)
+ return;
+ game.resting = false;
+ game.optime = 0.0; /* actually finished */