]> granicus.if.org Git - nethack/commitdiff
fix issue #319 - whip can fetch underwater items
authorPatR <rankin@nethack.org>
Thu, 23 Apr 2020 23:54:51 +0000 (16:54 -0700)
committerPatR <rankin@nethack.org>
Thu, 23 Apr 2020 23:54:51 +0000 (16:54 -0700)
Applying a bullwhip down while levitating or riding gives a chance
to pick up items from the unreachable floor.  Doing so over water
yields "you wrap your bullwhip around <item> on the water" when
that item is actually on the bottom.  Same for lava.  Don't fetch
items from beneath the surface.  Also, for the lava case subject
the whip to fire damage.

This has actually broken the seal on a can of worms.  Every item
at a water location sinks to the bottom even if it should float.
I'm not opening that can....

Fixes #319

doc/fixes37.0
src/apply.c

index a92f238bc75e345b79970a79f8ab7659fc6a8d22..570f79a17c8a614431d6bd28584b1e95f622446f 100644 (file)
@@ -158,6 +158,8 @@ monster or object detection found semi-dead vault guard at <0,0> while
 squadprob[] in mkroom.c was defined with 5 elements but initialized only 4
        resulting in giant ants sometimes
 allow nurses heal attack when wielding a non-weapon/weaptool
+if riding or levitating, hero could apply bullwhip downward to pull up things
+       from underwater or lava; feedback implied the item was on the surface
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 57671fa7b8155390e0a0fc96fa22e12f4bf9e115..45c2c7b54e0163e919f54488f7e815af52f3356b 100644 (file)
@@ -2668,6 +2668,12 @@ struct obj *obj;
             kick_steed();
             return 1;
         }
+        if (is_pool_or_lava(u.ux, u.uy)) {
+            You("cause a small splash.");
+            if (is_lava(u.ux, u.uy))
+                (void) fire_damage(uwep, FALSE, u.ux, u.uy);
+            return 1;
+        }
         if (Levitation || u.usteed) {
             /* Have a shot at snaring something on the floor */
             otmp = g.level.objects[u.ux][u.uy];