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) {
|
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 */
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue