]> granicus.if.org Git - nethack/commit
Fix: nonadjacent grabber after move
authorMichael Meyer <me@entrez.cc>
Tue, 4 Oct 2022 23:13:11 +0000 (19:13 -0400)
committerPatR <rankin@nethack.org>
Sat, 8 Oct 2022 23:43:45 +0000 (16:43 -0700)
commit3653649ed38951a7466dadc7e046e87255d1c247
treef20045203b5f845fdde336d07fddc5a7cf1a992f
parent7baba64fb31ca22aabbc7cc4ba829a590e212f58
Fix: nonadjacent grabber after move

A monster which has grabbed you could move away without becoming unstuck
if it hit the "move and shoot" or "helpless" conditions in the dochug
MMOVE_MOVED case (since those lead to early return or break), leaving
the hero stuck to a monster which is no longer adjacent.  Put the
'grabber moved away -> become unstuck' stuff at the top of the block so
that it will always be evaluated if a grabber has moved.

I would have liked to move the whole "grabber checks" block up, but I
think it'd change behavior to have the u.uswallow attack come before the
early return for a helpless monster, so I split it up instead.
src/monmove.c