]> granicus.if.org Git - nethack/commitdiff
exploding potion of acid left in bones
authornethack.rankin <nethack.rankin>
Sat, 24 Feb 2007 05:45:34 +0000 (05:45 +0000)
committernethack.rankin <nethack.rankin>
Sat, 24 Feb 2007 05:45:34 +0000 (05:45 +0000)
     Noticed while looking at the dipping code:  #dip at a pool location
gives the chance to dip into the pool, and dipping a potion of acid into
such causes the acid to explode, causing damage and posibly killing the
hero.  Use-up handling was being done after the dip had finished, so the
potion would remain in final inventory during disclosure and end up in
the resulting bones file if there was one.

doc/fixes34.4
src/potion.c

index 6e42a24d3385ee9c4c3c06814fb624e314b034b1..07e14ca59346c6f99cbb7f0ee87b478f7d9e6f1f 100644 (file)
@@ -122,6 +122,7 @@ probing the resulting double-gold monster caused "static object freed" panic
 cursed wand might explode if used to engrave
 fatal wish from magic lamp left functional magic lamp in bones data
 fatal wish granted by monster left that monster in bones data
+death due to dipping potion of acid into a pool left the potion in bones data
 clear prompt from screen after ESC is used to abort "In what direction?"
 minor interface changes for interactively manipulating autopickup exceptions
 chatting with quest leader who was brought back from the dead gave warnings
index f00b36270e3dcf3e6cb2c5756d11812334e386a5..c2be4cc9ff09822b5b75eaf0a1ae8c3b0f65a050 100644 (file)
@@ -1717,8 +1717,9 @@ dodip()
                        rider_cant_reach(); /* not skilled enough to reach */
 #endif
                    } else {
+                       if (obj->otyp == POT_ACID) obj->in_use = 1;
                        (void) get_wet(obj);
-                       if (obj->otyp == POT_ACID) useup(obj);
+                       if (obj->in_use) useup(obj);
                    }
                    return 1;
                }