projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge more SERGEEV stuff.
[super-star-trek.git]
/
reports.c
diff --git
a/reports.c
b/reports.c
index f98c35c25ce617bfae95c7e14fc96b51951f7d37..07a5196946a84c34e24e77d9419631bb9a036d29 100644
(file)
--- a/
reports.c
+++ b/
reports.c
@@
-3,9
+3,10
@@
#include <stdlib.h>
\r
#include <string.h>
\r
\r
#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
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
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
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
}
\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
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
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
}
\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
else {
\r
int i=0;
\r
double ai = 0.05;
\r
@@
-130,7
+137,7
@@
void lrscan(void) {
game.starch[x][y] = game.damage[DRADIO] > 0 ? game.state.galaxy[x][y]+1000 :1;
\r
}
\r
}
\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
}
\r
\r
}
\r
@@
-210,8
+217,8
@@
void chart(int nn) {
void srscan(int l) {
\r
static char requests[][3] =
\r
{"","da","co","po","ls","wa","en","to","sh","kl","ti"};
\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
int goodScan=TRUE;
\r
switch (l) {
\r
case 1: // SRSCAN
\r
@@
-319,7
+326,7
@@
void srscan(int l) {
proutn(" Klingons Left %d", game.state.remkl);
\r
break;
\r
case 10:
\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
break;
\r
}
\r
\r
@@
-332,7
+339,7
@@
void srscan(int l) {
\r
\r
void eta(void) {
\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
int wfl;
\r
double ttime, twarp, tpower;
\r
if (game.damage[DCOMPTR] != 0.0) {
\r
@@
-363,11
+370,11
@@
void eta(void) {
}
\r
ix2 = aaitem + 0.5;
\r
}
\r
}
\r
ix2 = aaitem + 0.5;
\r
}
\r
- else { // same quadrant
\r
-
ix2 = ix
1;
\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
}
\r
\r
if (ix1 > 8 || ix1 < 1 || iy1 > 8 || iy1 < 1 ||
\r