Falsche Zählung der Toten.

This commit is contained in:
Enno Rehling 2004-05-19 22:59:08 +00:00
parent f042c6fef9
commit f896b56031
2 changed files with 109 additions and 105 deletions

View File

@ -2295,7 +2295,7 @@ aftermath(battle * b)
for (fi = fighters->begin; fi != fighters->end; ++fi) { for (fi = fighters->begin; fi != fighters->end; ++fi) {
fighter *df = *fi; fighter *df = *fi;
unit *du = df->unit; unit *du = df->unit;
int dead; int dead = du->number - df->alive - df->run.number;
const attrib *a; const attrib *a;
int pr_mercy = 0; int pr_mercy = 0;
@ -2305,27 +2305,30 @@ aftermath(battle * b)
} }
} }
dead = du->number - df->alive;
dead -= df->run.number;
#ifdef TROLLSAVE #ifdef TROLLSAVE
/* Trolle können regenerieren */ /* Trolle können regenerieren */
if (df->alive > 0 && dead && old_race(du->race) == RC_TROLL) if (df->alive > 0 && dead && old_race(du->race) == RC_TROLL) {
for (i = 0; i != dead; ++i) { for (i = 0; i != dead; ++i) {
if (chance(TROLL_REGENERATION)) { if (chance(TROLL_REGENERATION)) {
++df->alive; ++df->alive;
++df->side->alive; ++df->side->alive;
++df->side->battle->alive; ++df->side->battle->alive;
++trollsave[df->side->index];
--dead;
}
} }
} }
trollsave[df->side->index] += dead - du->number + df->alive;
#endif #endif
/* Regeneration durch PR_MERCY */ /* Regeneration durch PR_MERCY */
if (dead && pr_mercy) if (dead>0 && pr_mercy) {
for (i = 0; i != dead; ++i) for (i = 0; i != dead; ++i) {
if (rand()%100 < pr_mercy) { if (rand()%100 < pr_mercy) {
++df->alive; ++df->alive;
++df->side->alive; ++df->side->alive;
++df->side->battle->alive; ++df->side->battle->alive;
--dead;
}
}
} }
/* Tote, die wiederbelebt werde können */ /* Tote, die wiederbelebt werde können */

View File

@ -1742,6 +1742,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
undead++; undead++;
j++; j++;
--df->side->casualties; --df->side->casualties;
++df->side->alive;
--k; --k;
} }
} }