forked from github/server
- assert u->hp >= u->number in battle-aftermath
This commit is contained in:
parent
530707f5da
commit
f7482028ea
|
@ -2460,6 +2460,7 @@ aftermath(battle * b)
|
||||||
* for each of them, a peasant will die as well */
|
* for each of them, a peasant will die as well */
|
||||||
is += dead;
|
is += dead;
|
||||||
}
|
}
|
||||||
|
assert(du->hp >= du->number || !"unit has less hitpoints than people");
|
||||||
} next(df);
|
} next(df);
|
||||||
} next(s);
|
} next(s);
|
||||||
dead_peasants = min(rpeasants(r), (is*BATTLE_KILLS_PEASANTS)/100);
|
dead_peasants = min(rpeasants(r), (is*BATTLE_KILLS_PEASANTS)/100);
|
||||||
|
|
|
@ -798,7 +798,7 @@ destroy_curse_crystal(attrib **alist, int cast_level, int force)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Kann auch von Nichtmagier benutzt werden, erzeugt eine
|
/* Kann auch von Nichtmagiern benutzt werden, erzeugt eine
|
||||||
* Antimagiezone, die zwei Runden bestehen bleibt */
|
* Antimagiezone, die zwei Runden bestehen bleibt */
|
||||||
static void
|
static void
|
||||||
use_antimagiccrystal(region * r, unit * mage, int amount, strlist * cmdstrings)
|
use_antimagiccrystal(region * r, unit * mage, int amount, strlist * cmdstrings)
|
||||||
|
@ -841,7 +841,7 @@ use_antimagiccrystal(region * r, unit * mage, int amount, strlist * cmdstrings)
|
||||||
if(*ap) ap = &(*ap)->next;
|
if(*ap) ap = &(*ap)->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force>0) {
|
if(force > 0) {
|
||||||
create_curse(mage, &r->attribs, ct_find("antimagiczone"), force, duration, effect, 0);
|
create_curse(mage, &r->attribs, ct_find("antimagiczone"), force, duration, effect, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue