]> granicus.if.org Git - nethack/commit
fix #H79 - steed disintegration
authornethack.rankin <nethack.rankin>
Tue, 18 Apr 2006 05:26:00 +0000 (05:26 +0000)
committernethack.rankin <nethack.rankin>
Tue, 18 Apr 2006 05:26:00 +0000 (05:26 +0000)
commita506c32e8c34e3380fc7907ce8a9c967b73bf995
treefceaa2db08e8b5f36e4bc402be0786d29daeb3c6
parentfc9c337e2705601499e31a86eb3d752213a21986
fix #H79 - steed disintegration

     From a bug report, a steed hit by disintegration
breath survived via life-saving, but the program was confused about whether
the hero could still ride and issued some impossible warnings.  The code
to disintegrate a monster's inventory didn't bother to unwear worn items as
it destroyed them, presumeably assuming that the monster was sure to die,
so steed was left with a flag bit set claiming it was saddled even though
the saddle was gone.  This fixes that, and the rider will end up being
dismounted as the saddle gets destroyed, regardless of whether the steed
ultimately survives.  [Since the steed is still present at the time of
dismounting, the hero will get bumped to some other location, possibly to
the next spot about to be hit by the same black dragon breath attack which
just vaporized the steed.  That's suboptimal, to put it mildly....]

     I couldn't test the circumstances of the original report.  Post-3.4.3,
ki-rin has been marked no-hands and is no longer capable of wearing armor
or amulets.  I looked to see whether any other potential steed could wear
an amulet of life-saving and couldn't find one.  But the original bug also
applied to conferred properties of special armor worn by non-steed monsters
too, so the fix was needed anyway.

     The branch and trunk patches are different.  For the trunk, I moved a
big chunk of code out of buzz() into a seperate routine.  That actual fix
is the same in both variants.
doc/fixes34.4
src/zap.c