]> granicus.if.org Git - nethack/commitdiff
fix #H4179 - lava vs boots
authorPatR <rankin@nethack.org>
Wed, 6 Jan 2016 00:17:38 +0000 (16:17 -0800)
committerPatR <rankin@nethack.org>
Wed, 6 Jan 2016 00:17:38 +0000 (16:17 -0800)
Stepping onto lava destroyed water walking boots if they weren't
fireproof but didn't do that for other types of boots unless hero
was not fire resistant and got killed by the lava.  Burn up all
non-fireproof leather boots when stepping onto lava.

doc/fixes36.1
src/trap.c

index b44ce9f4bac37f0499f15837d5df2c55cb675f3e..436a270b9cb37b975edc475511ded2b7d89f930d 100644 (file)
@@ -85,6 +85,8 @@ compile-time option for an alternate paniclog format for public server use
 make monsters forget where they stepped when fleeing or teleporting
 requiver pickup_thrown objects if quiver is empty
 make mimics mimicing walls or trees also block light
+stepping onto lava destroyed non-fireproof water walking boots but left other
+       vulnerable boot types intact
 
 
 Platform- and/or Interface-Specific Fixes
index b5cda7a5bf23b4c8cb74e745a9c53e0293b23964..7f9a1ea7d16be945e73cc529ea860988b91dd8d2 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 trap.c  $NHDT-Date: 1451176031 2015/12/27 00:27:11 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.252 $ */
+/* NetHack 3.6 trap.c  $NHDT-Date: 1452039453 2016/01/06 00:17:33 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.253 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -4999,13 +4999,13 @@ lava_effects()
                 && objects[obj->otyp].oc_oprop != FIRE_RES
                 && obj->otyp != SCR_FIRE && obj->otyp != SPE_FIREBALL
                 && !obj_resists(obj, 0, 0)) /* for invocation items */
-                obj->in_use = TRUE;
+                obj->in_use = 1;
 
     /* Check whether we should burn away boots *first* so we know whether to
      * make the player sink into the lava. Assumption: water walking only
      * comes from boots.
      */
-    if (Wwalking && uarmf && is_organic(uarmf) && !uarmf->oerodeproof) {
+    if (uarmf && is_organic(uarmf) && !uarmf->oerodeproof) {
         obj = uarmf;
         pline("%s into flame!", Yobjnam2(obj, "burst"));
         iflags.in_lava_effects++; /* (see above) */
@@ -5119,6 +5119,9 @@ sink_into_lava()
             You("sink below the surface and die.");
             burn_away_slime(); /* add insult to injury? */
             done(DISSOLVED);
+            /* can only get here via life-saving; try to get away from lava */
+            u.utrap = 0;
+            (void) safe_teleds(TRUE);
         } else if (!u.umoved) {
             /* can't fully turn into slime while in lava, but might not
                have it be burned away until you've come awfully close */