sanity_check: current hero health better than max
Changes to setuhpmax() a couple of days ago to deal with sanity_check for "current hero health as monster better than maximum" ended up triggering sanity_check about "current hero health better than maximum" when gaining experience level(s) while polymorphed.
This commit is contained in:
+2
-1
@@ -392,9 +392,10 @@ touch_of_death(struct monst *mtmp)
|
||||
} else {
|
||||
/* HP manipulation similar to poisoned(attrib.c) */
|
||||
int olduhp = u.uhp,
|
||||
uhpmin = minuhpmax(3),
|
||||
newuhpmax = u.uhpmax - drain;
|
||||
|
||||
setuhpmax(max(newuhpmax, minuhpmax(3)));
|
||||
setuhpmax(max(newuhpmax, uhpmin), FALSE);
|
||||
dmg = adjuhploss(dmg, olduhp); /* reduce pending damage if uhp has
|
||||
* already been reduced due to drop
|
||||
* in uhpmax */
|
||||
|
||||
Reference in New Issue
Block a user