X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=reports.c;h=794b18117afe27d06951e3f3899aac37cd0fb2f7;hb=cf91699c89b88f76dcf63c60624635184e8cb7eb;hp=e847f8340a430815524ef8777d7e73083764352e;hpb=7d27c8befdb5de9a50ff4af88e764c8336bc1797;p=super-star-trek.git diff --git a/reports.c b/reports.c index e847f83..794b181 100644 --- a/reports.c +++ b/reports.c @@ -3,9 +3,10 @@ #include #include -void attakreport(void) { +void attakreport(int l) { + if (!l) { if (game.future[FCDBAS] < 1e30) { - prout("Starbase in %s is currently under attack.", + prout("Starbase in %s is currently under Commander attack.", cramlc(quadrant, batx, baty)); prout("It can hold out until Stardate %d.", (int)game.future[FCDBAS]); @@ -16,6 +17,12 @@ void attakreport(void) { prout("It can hold out until Stardate %d.", (int)game.future[FSCDBAS]); } + } else { + if (game.future[FCDBAS] < 1e30) + proutn("Base in %i - %i attacked by C. Alive until %.1f", batx, baty, game.future[FCDBAS]); + if (isatb == 1) + proutn("Base in %i - %i attacked by S. Alive until %.1f", game.state.isx, game.state.isy, game.future[FSCDBAS]); + } } @@ -63,7 +70,7 @@ void report(int f) { if (game.damage[DRADIO] == 0.0 || condit == IHDOCKED || iseenit) { /* Don't report this if not seen and either the radio is dead or not at base! */ - attakreport(); + attakreport(0); iseenit = 1; } if (casual) prout("%d casualt%s suffered so far.", @@ -89,7 +96,7 @@ void report(int f) { } if (icrystl) { if (cryprob <= .05) - prout("Dilithium crystals aboard ship...not yet used."); + prout("Dilithium crystals aboard ship... not yet used."); else { int i=0; double ai = 0.05; @@ -118,7 +125,7 @@ void lrscan(void) { } else { skip(1); - proutn("Long-range scan for"); + proutn("Long-range scan for "); } prout(cramlc(quadrant, quadx, quady)); for (x = quadx-1; x <= quadx+1; x++) { @@ -130,7 +137,7 @@ void lrscan(void) { game.starch[x][y] = game.damage[DRADIO] > 0 ? game.state.galaxy[x][y]+1000 :1; } } - putchar('\n'); + skip(1); } } @@ -290,7 +297,7 @@ void srscan(int l) { if (condit == IHDOCKED) proutn("DAMAGED, supported by starbase"); else - proutn("DAMAGED, reserves=%4.2f", lsupres); + proutn("DAMAGED, reserves=%.2f", lsupres); } else proutn("ACTIVE"); @@ -319,7 +326,7 @@ void srscan(int l) { proutn(" Klingons Left %d", game.state.remkl); break; case 10: - proutn(" Time Left %.2f", game.state.remtime); + attakreport(1); break; } @@ -363,11 +370,11 @@ void eta(void) { } ix2 = aaitem + 0.5; } - else { // same quadrant - ix2 = ix1; - iy2 = iy1; - ix1 = quady; // ya got me why x and y are reversed! - iy1 = quadx; + else { + if (quady>ix1) ix2 = 1; + else ix2=10; + if (quadx>iy1) iy2 = 1; + else iy2=10; } if (ix1 > 8 || ix1 < 1 || iy1 > 8 || iy1 < 1 || @@ -438,16 +445,16 @@ void eta(void) { } else proutn("Remaining"); - prout(" energy will be %5.2f.", energy-tpower); + prout(" energy will be %.2f.", energy-tpower); if (wfl) { - prout("And we will arrive at stardate %5.2f.", + prout("And we will arrive at stardate %.2f.", game.state.date+ttime); } else if (twarp==1.0) prout("Any warp speed is adequate."); else { - prout("Minimum warp needed is %5.2f,", twarp); - prout("and we will arrive at stardate %5.2f.", + prout("Minimum warp needed is %.2f,", twarp); + prout("and we will arrive at stardate %.2f.", game.state.date+ttime); } if (game.state.remtime < ttime)