fix github issue #769 - revive panic

Issue #769, reported by k2 and diagnosed by entrez:  eating a troll
corpse that revives on the last turn of the meal was using up the
corpse while the revival was in progress (unless the hero couldn't
observe the resulting monster), leading to a panic when trying to
use it up at the end of revival.  Brought on by a recent change to
interrupt an occupied hero who can observe a hostile monster being
created nearby.

The fix isn't perfect.  If revival fails because there's no place
to put the revived troll, the meal will be interrupted with one bite
left instead of finishing.  If that happens, the interruption will
include a "you stop eating" message, just with no explanation why.
The partly eaten--almost completely eaten--corpse will remain.

Closes #769
This commit is contained in:
PatR
2022-06-10 11:35:07 -07:00
parent 95dece1a2b
commit e2d694ed32
3 changed files with 36 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.941 $ $NHDT-Date: 1654717838 2022/06/08 19:50:38 $
HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.945 $ $NHDT-Date: 1654886097 2022/06/10 18:34:57 $
General Fixes and Modified Features
-----------------------------------
@@ -1244,6 +1244,9 @@ items flagged as just-picked-up were unflagged if you stepped on other items
activating a magic portal still gave "you feel dizzy for a moment, but the
sensation passes" after portal traversal was changed to make the hero
be stunned for a few turns
after the fix for zombie reviving near hero (which now interrupts hero's
occupation), could get "revive panic" when eating a troll corpse if
it revived on the same turn that eating the corpse would finish
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support