First round of changes from Stas Sergeev.
[super-star-trek.git] / reports.c
index e398e776d5c8530b91e00999830ffc5274d390fd..794b18117afe27d06951e3f3899aac37cd0fb2f7 100644 (file)
--- a/reports.c
+++ b/reports.c
@@ -3,9 +3,10 @@
 #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
@@ -16,6 +17,12 @@ void attakreport(void) {
                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
@@ -63,7 +70,7 @@ void report(int f) {
        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
@@ -89,7 +96,7 @@ void report(int f) {
        }\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
@@ -319,7 +326,7 @@ void srscan(int l) {
                                        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
@@ -363,11 +370,11 @@ void eta(void) {
                }\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