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

View File

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