Don't treat low monster-form HP while polymorphed as a major trouble

Running low on HP in monster form isn't the same sort of critical
problem that running low on HP while not polymorphed is, because the
character changes back when the monster form HP runs out rather than
dying. (Indeed, running out of HP in monster form is often
intentional.)

The exception is when wearing unchanging (which implies both that the
monster form is intentional and that running out of monster HP would
be fatal), so low monster-form HP is treated as a major trouble in
that case.

Inspired by <https://nethack-yanis.github.io/yanis/4724.html>.
This commit is contained in:
Alex Smith
2025-12-21 10:44:50 +00:00
parent 91cc3e3f12
commit 9828a05bbb
2 changed files with 3 additions and 1 deletions

View File

@@ -1552,6 +1552,8 @@ you cannot sacrifice objects/corpses while stunned or confused
that they work; /y and /n for them now only work when lootabc is off
writing on an unidentified scroll of blank paper identifies blank paper
dumplogs include spells and skills
praying will not restore monster-form HP while polymorphed, unless you
have unchanging
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -217,7 +217,7 @@ in_trouble(void)
return TROUBLE_STARVING;
if (region_danger())
return TROUBLE_REGION;
if (critically_low_hp(FALSE))
if ((!Upolyd || Unchanging) && critically_low_hp(FALSE))
return TROUBLE_HIT;
if (ismnum(u.ulycn))
return TROUBLE_LYCANTHROPE;