forked from github/server
Falsche Zählung der Toten.
This commit is contained in:
parent
f042c6fef9
commit
f896b56031
|
@ -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 */
|
||||
|
|
|
@ -1742,6 +1742,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
|
|||
undead++;
|
||||
j++;
|
||||
--df->side->casualties;
|
||||
++df->side->alive;
|
||||
--k;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue