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:
PatR
2024-09-26 23:00:42 -07:00
parent 01a6e4e1d1
commit e9a25a0a1c
10 changed files with 31 additions and 29 deletions

View File

@@ -702,7 +702,7 @@ savelife(int how)
u.ulevel = 1;
uhpmin = minuhpmax(10);
if (u.uhpmax < uhpmin)
setuhpmax(uhpmin);
setuhpmax(uhpmin, TRUE);
u.uhp = min(u.uhpmax, givehp);
if (Upolyd) /* Unchanging, or death which bypasses losing hit points */
u.mh = min(u.mhmax, givehp);