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:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 invent.c $NHDT-Date: 1647472704 2022/03/16 23:18:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.355 $ */
|
||||
/* NetHack 3.7 invent.c $NHDT-Date: 1648428942 2022/03/28 00:55:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.359 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1204,10 +1204,9 @@ delobj(struct obj *obj)
|
||||
{
|
||||
boolean update_map;
|
||||
|
||||
if (obj->otyp == AMULET_OF_YENDOR
|
||||
|| obj->otyp == CANDELABRUM_OF_INVOCATION
|
||||
|| obj->otyp == BELL_OF_OPENING
|
||||
|| obj->otyp == SPE_BOOK_OF_THE_DEAD) {
|
||||
/* obj_resists(obj,0,0) protects the Amulet, the invocation tools,
|
||||
and Rider corspes */
|
||||
if (obj_resists(obj, 0, 0)) {
|
||||
/* player might be doing something stupid, but we
|
||||
* can't guarantee that. assume special artifacts
|
||||
* are indestructible via drawbridges, and exploding
|
||||
|
||||
Reference in New Issue
Block a user