projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfix in fry() and translation
[super-star-trek.git]
/
src
/
battle.c
diff --git
a/src/battle.c
b/src/battle.c
index 63eb38da3d52c9364fa95360daaf198904da5337..76bbe0c4e7d8520d15cc2abee494788a2b9f12c7 100644
(file)
--- a/
src/battle.c
+++ b/
src/battle.c
@@
-520,8
+520,8
@@
static void fry(double hit)
extradm = (hit*game.damfac)/(ncrit*(75.0+25.0*Rand()));
game.damage[j] += extradm;
if (loop1 > 0) {
extradm = (hit*game.damfac)/(ncrit*(75.0+25.0*Rand()));
game.damage[j] += extradm;
if (loop1 > 0) {
- for (loop2
=2; loop2<=loop1 && j != cdam[loop2-1
]; loop2++) ;
- if (loop2
<=
loop1) continue;
+ for (loop2
= 0; loop2 < loop1 && j != cdam[loop2
]; loop2++) ;
+ if (loop2
<
loop1) continue;
ktr += 1;
if (ktr==3) skip(1);
proutn(_(" and "));
ktr += 1;
if (ktr==3) skip(1);
proutn(_(" and "));
@@
-812,7
+812,6
@@
void photon(void)
double targ[4][3], course[4];
double r, dummy;
int key, n, i;
double targ[4][3], course[4];
double r, dummy;
int key, n, i;
- bool osuabor;
game.ididit = false;
game.ididit = false;
@@
-905,8
+904,7
@@
void photon(void)
}
game.ididit = true;
/* Loop for moving <n> torpedoes */
}
game.ididit = true;
/* Loop for moving <n> torpedoes */
- osuabor = false;
- for (i = 1; i <= n && !osuabor; i++) {
+ for (i = 1; i <= n; i++) {
if (game.condition != docked) game.torps--;
r = (Rand()+Rand())*0.5 -0.5;
if (fabs(r) >= 0.47) {
if (game.condition != docked) game.torps--;
r = (Rand()+Rand())*0.5 -0.5;
if (fabs(r) >= 0.47) {
@@
-919,12
+917,11
@@
void photon(void)
skip(1);
if (i < n)
prout(_(" Remainder of burst aborted."));
skip(1);
if (i < n)
prout(_(" Remainder of burst aborted."));
- osuabor = true;
if (Rand() <= 0.2) {
prout(_("***Photon tubes damaged by misfire."));
game.damage[DPHOTON] = game.damfac*(1.0+2.0*Rand());
if (Rand() <= 0.2) {
prout(_("***Photon tubes damaged by misfire."));
game.damage[DPHOTON] = game.damfac*(1.0+2.0*Rand());
- break;
}
}
+ break;
}
if (game.shldup || game.condition == docked)
r *= 1.0 + 0.0001*game.shield;
}
if (game.shldup || game.condition == docked)
r *= 1.0 + 0.0001*game.shield;