Der bug in sp_undeadheroes ist gefunden. Woot!

This commit is contained in:
Enno Rehling 2004-05-21 10:56:07 +00:00
parent d5f12b938e
commit d7f78b1943
1 changed files with 2 additions and 8 deletions

View File

@ -1718,13 +1718,6 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
int n, undead = 0; int n, undead = 0;
int force = (int)get_force(power,0); int force = (int)get_force(power,0);
double c = 0.50 + 0.02 * power; double c = 0.50 + 0.02 * power;
side * s;
cv_foreach(s, b->sides) {
while (s->casualties) {
}
} cv_next(s);
/* Liste aus allen Kämpfern */ /* Liste aus allen Kämpfern */
fgs = fighters(b, fi, minrow, maxrow, FS_ENEMY | FS_HELP ); fgs = fighters(b, fi, minrow, maxrow, FS_ENEMY | FS_HELP );
@ -1743,7 +1736,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
int j = 0; int j = 0;
/* Wieviele Untote können wir aus dieser Einheit wecken? */ /* Wieviele Untote können wir aus dieser Einheit wecken? */
for (n = df->alive + df->run.number; n <= du->number; n++) { for (n = df->alive + df->run.number; n != du->number; n++) {
if (chance(c)) { if (chance(c)) {
++j; ++j;
if (--force<=0) break; if (--force<=0) break;
@ -1767,6 +1760,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
/* transfer dead people to new unit, set hitpoints to those of old unit */ /* transfer dead people to new unit, set hitpoints to those of old unit */
transfermen(du, u, j); transfermen(du, u, j);
u->hp = u->number * unit_max_hp(du); u->hp = u->number * unit_max_hp(du);
assert(j<=df->side->casualties);
df->side->casualties -= j; df->side->casualties -= j;
df->side->dead -= j; df->side->dead -= j;