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:
@@ -2464,7 +2464,7 @@ fpostfx(struct obj *otmp)
|
||||
u.mh += otmp->cursed ? -rnd(20) : rnd(20), disp.botl = TRUE;
|
||||
if (u.mh > u.mhmax) {
|
||||
if (!rn2(17))
|
||||
u.mhmax++;
|
||||
setuhpmax(u.mhmax + 1, FALSE);
|
||||
u.mh = u.mhmax;
|
||||
} else if (u.mh <= 0) {
|
||||
rehumanize();
|
||||
@@ -2473,7 +2473,7 @@ fpostfx(struct obj *otmp)
|
||||
u.uhp += otmp->cursed ? -rnd(20) : rnd(20), disp.botl = TRUE;
|
||||
if (u.uhp > u.uhpmax) {
|
||||
if (!rn2(17))
|
||||
setuhpmax(u.uhpmax + 1);
|
||||
setuhpmax(u.uhpmax + 1, FALSE);
|
||||
u.uhp = u.uhpmax;
|
||||
} else if (u.uhp <= 0) {
|
||||
svk.killer.format = KILLED_BY_AN;
|
||||
|
||||
Reference in New Issue
Block a user