fix github issue #972 - moving while trapped

Reported by elunna:  a monster trapped in a pit or web that was
adjacent to a polymorph trap could enter that trap to change shape.
It would remain flagged as trapped but there's no way to escape
from a polymorph trap so it would be stuck.

Fix supplied by entrez:  when a monster is picking MUSE strategy,
don't allow it choose "enter polymorph trap" if it is currently
trapped.

I entered the changes from the diff manually and added a bunch of
minor formatting bits.

Fixes #972
This commit is contained in:
PatR
2023-02-06 15:50:39 -08:00
parent 1d06fa62a9
commit 5d5445d85b
2 changed files with 31 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1051 $ $NHDT-Date: 1665130022 2022/10/07 08:07:02 $
DT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1051 $ $NHDT-Date: 1665130022 2022/10/07 08:07:02 $
General Fixes and Modified Features
-----------------------------------
@@ -1107,6 +1107,9 @@ fix a case where punished iron ball yanked hero on top of a monster
slightly randomize amount of items and monsters in the mines
dying in a wall spot (temporary gap or via Passes_walls) shared by two shops
could result in "place_object: \"<item>\" [0] off map <0,0>" warnings
a monster capable of using a polymorph trap to deliberately change form could
do so when trapped in an adjacent web or pit; if that happened, the
monster remained flagged as 'trapped' and wouldn't be able to move
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository