]> granicus.if.org Git - nethack/commitdiff
fix U1079 - loss of water walking over lava
authornethack.rankin <nethack.rankin>
Thu, 1 Jul 2004 01:28:18 +0000 (01:28 +0000)
committernethack.rankin <nethack.rankin>
Thu, 1 Jul 2004 01:28:18 +0000 (01:28 +0000)
     Fix the reported problem of being able to safely stand on lava after
taking off fireproofed water walking boots.  The situation was more wide-
spread than that; the same thing happened when non-fireproofed boots were
burned off while walking over the lava in the first place.  Now you'll
fall in and end up getting stuck (you have to have fire resistance for any
of this to happen and that resistance makes falling in be survivable).

doc/fixes34.4
src/do_wear.c

index 4163736adabefda0018a8b18f3707fc483124a45..df5704ff61c020769678d2e2c106fae21eae517b 100644 (file)
@@ -42,6 +42,7 @@ if you were Poison_resistant, only a *blessed* potion of sickness caused
 shopkeeper removal of trap from shop doorway yields an open door instead of
        a closed one if an intact open door is present
 guarantee that hostile djinn released from bottles really are hostile
+handle lava when removing or losing water walking boots
 
 
 Platform- and/or Interface-Specific Fixes
index ce6e1d6ebaa1e84fc1e349a1923013f47efc3a7d..d6b2bf82c9324746302414af945615de0f8644c3 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)do_wear.c  3.4     2003/11/14      */
+/*     SCCS Id: @(#)do_wear.c  3.4     2004/06/30      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -94,6 +94,8 @@ Boots_on()
                break;
        case WATER_WALKING_BOOTS:
                if (u.uinwater) spoteffects(TRUE);
+               /* (we don't need a lava check here since boots can't be
+                  put on while feet are stuck) */
                break;
        case SPEED_BOOTS:
                /* Speed boots are still better than intrinsic speed, */
@@ -146,10 +148,12 @@ Boots_off()
                }
                break;
        case WATER_WALKING_BOOTS:
-               if (is_pool(u.ux,u.uy) && !Levitation && !Flying &&
-                   !is_clinger(youmonst.data) && !context.takeoff.cancelled_don) {
-                       makeknown(otyp);
+               /* check for lava since fireproofed boots make it viable */
+               if ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) &&
+                   !Levitation && !Flying && !is_clinger(youmonst.data) &&
+                   !context.takeoff.cancelled_don) {
                        /* make boots known in case you survive the drowning */
+                       makeknown(otyp);
                        spoteffects(TRUE);
                }
                break;
@@ -1320,10 +1324,11 @@ boolean noisy;
            err++;
        } else if (u.utrap && (u.utraptype == TT_BEARTRAP ||
                                u.utraptype == TT_INFLOOR ||
+                               u.utraptype == TT_LAVA ||
                                u.utraptype == TT_BURIEDBALL)) {
            if (u.utraptype == TT_BEARTRAP) {
                if (noisy) Your("%s is trapped!", body_part(FOOT));
-           } else if (u.utraptype == TT_INFLOOR) {
+           } else if (u.utraptype == TT_INFLOOR || u.utraptype == TT_LAVA) {
                if (noisy) Your("%s are stuck in the %s!",
                                makeplural(body_part(FOOT)),
                                surface(u.ux, u.uy));