]> granicus.if.org Git - nethack/commit
fix github issue #148 - life-save while swallowed
authorPatR <rankin@nethack.org>
Sun, 28 Oct 2018 23:03:42 +0000 (16:03 -0700)
committerPatR <rankin@nethack.org>
Sun, 28 Oct 2018 23:03:42 +0000 (16:03 -0700)
commit858e9ce00d3fda6fbee3263972591d742ea7e861
tree0f2200932df1d3440c74f220c313f88de6a7673c
parent747ebf0ead0badeaea12acf27ce48d85f596c8a3
fix github issue #148 - life-save while swallowed

Life-saving was setting u.uswldtim to 0, presumably intending that
to stop the hero from being digested, but it actually resulted in
being totally digested on the swallower's next turn if the death
being short-circuited wasn't digestion.  Change life-saving to make
swallower or grabber release the hero instead of tinkering with
u.uswldtim.  In addition to rescuing the hero from digestion, it
prevents an eel which has just drowned the hero (who has survived
drowning via life-saving) from pulling him/her back into the water
on its next turn.  It will need to make another successful grab to
do that now.

While testing, I noticed that if I was polymorphed and wearing an
amulet of unchanging, life-saving didn't restore my HP-as-a-monster
and due to the recent change to force that to 0 when the hero dies,
I died again immediately after my life was saved.  So this bug was
latent in the past and became noticeable in the last couple of days.
doc/fixes36.2
src/end.c
src/mhitu.c