items destroyed by exploding chest

From a report by a beta tester 8 years ago:  kicking a chest gave
"THUD!  The chest explodes!" but the chest remained intact.  The
explosion was destroying all floor items at the hero's spot rather
than at the chest's spot.  Fixing that results in the chest being
destroyed because it's one of the items at its own spot.

While fixing that I noticed that delobj() was only protecting the
Amulet and the invocation items from destruction, not Rider corpses.
You could destroy one or more of those by getting a trapped chest's
explosion while using a key at its spot rather than by kicking it
from adjacent.  (Getting the exploding chest result is not easy,
particuarly with positive luck.  I eventually resorted to forcing
it with a debugger.)
This commit is contained in:
PatR
2022-03-27 17:55:52 -07:00
parent c763e26aa7
commit 6a2ff5743a
3 changed files with 22 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.849 $ $NHDT-Date: 1648318980 2022/03/26 18:23:00 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.851 $ $NHDT-Date: 1648428942 2022/03/28 00:55:42 $
General Fixes and Modified Features
-----------------------------------
@@ -850,6 +850,10 @@ don't stop travel when going past a closed door (eg. when traveling along
a room wall)
some monster corpses can now convey temporary acid or stoning resistance
fix travel getting stuck oscillating between two locations
kicking a trapped chest and getting the exploding chest result destroyed items
at the hero's location rather than the chest's location; because of
that it left the exploded chest intact
it was possible to destroy a Rider corpse with an exploding chest
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository