#include <stdlib.h>\r
#include <string.h>\r
\r
-void attakreport(void) {\r
+void attakreport(int l) {\r
+ if (!l) {\r
if (game.future[FCDBAS] < 1e30) {\r
- prout("Starbase in %s is currently under attack.",\r
+ prout("Starbase in %s is currently under Commander attack.",\r
cramlc(quadrant, batx, baty));\r
prout("It can hold out until Stardate %d.", \r
(int)game.future[FCDBAS]);\r
prout("It can hold out until Stardate %d.", \r
(int)game.future[FSCDBAS]);\r
}\r
+ } else {\r
+ if (game.future[FCDBAS] < 1e30)\r
+ proutn("Base in %i - %i attacked by C. Alive until %.1f", batx, baty, game.future[FCDBAS]);\r
+ if (isatb == 1)\r
+ proutn("Base in %i - %i attacked by S. Alive until %.1f", game.state.isx, game.state.isy, game.future[FSCDBAS]);\r
+ }\r
}\r
\r
\r
if (game.damage[DRADIO] == 0.0 || condit == IHDOCKED || iseenit) {\r
/* Don't report this if not seen and\r
either the radio is dead or not at base! */\r
- attakreport();\r
+ attakreport(0);\r
iseenit = 1;\r
}\r
if (casual) prout("%d casualt%s suffered so far.",\r
}\r
if (icrystl) {\r
if (cryprob <= .05)\r
- prout("Dilithium crystals aboard ship...not yet used.");\r
+ prout("Dilithium crystals aboard ship... not yet used.");\r
else {\r
int i=0;\r
double ai = 0.05;\r
}\r
else {\r
skip(1);\r
- proutn("Long-range scan for");\r
+ proutn("Long-range scan for ");\r
}\r
prout(cramlc(quadrant, quadx, quady));\r
for (x = quadx-1; x <= quadx+1; x++) {\r
game.starch[x][y] = game.damage[DRADIO] > 0 ? game.state.galaxy[x][y]+1000 :1;\r
}\r
}\r
- putchar('\n');\r
+ skip(1);\r
}\r
\r
}\r
void srscan(int l) {\r
static char requests[][3] =\r
{"","da","co","po","ls","wa","en","to","sh","kl","ti"};\r
- char *cp;\r
- int leftside=TRUE, rightside=TRUE, i, j, jj, k=0, nn=FALSE;\r
+ char *cp = NULL;\r
+ int leftside=TRUE, rightside=TRUE, i, j, k=0, nn=FALSE;\r
int goodScan=TRUE;\r
switch (l) {\r
case 1: // SRSCAN\r
proutn(" Klingons Left %d", game.state.remkl);\r
break;\r
case 10:\r
- proutn(" Time Left %.2f", game.state.remtime);\r
+ attakreport(1);\r
break;\r
}\r
\r
\r
\r
void eta(void) {\r
- int key, ix1, ix2, iy1, iy2, prompt=FALSE;\r
+ int ix1, ix2, iy1, iy2, prompt=FALSE;\r
int wfl;\r
double ttime, twarp, tpower;\r
if (game.damage[DCOMPTR] != 0.0) {\r
}\r
ix2 = aaitem + 0.5;\r
}\r
- else { // same quadrant\r
- ix2 = ix1;\r
- iy2 = iy1;\r
- ix1 = quady; // ya got me why x and y are reversed!\r
- iy1 = quadx;\r
+ else {\r
+ if (quady>ix1) ix2 = 1;\r
+ else ix2=10;\r
+ if (quadx>iy1) iy2 = 1;\r
+ else iy2=10;\r
}\r
\r
if (ix1 > 8 || ix1 < 1 || iy1 > 8 || iy1 < 1 ||\r