]> granicus.if.org Git - nethack/commitdiff
Pickaxing or whipping a liquid wall
authorPasi Kallinen <paxed@alt.org>
Tue, 7 Feb 2023 05:36:51 +0000 (07:36 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 7 Feb 2023 05:36:51 +0000 (07:36 +0200)
src/apply.c
src/dig.c

index b6816eac33501a3affc29d42c53a1490d9a13df0..6c992c7f402d12e406f378c62a28bd5662af2b3f 100644 (file)
@@ -2910,6 +2910,12 @@ use_whip(struct obj *obj)
     } else if (u.dz < 0) {
         You("flick a bug off of the %s.", ceiling(u.ux, u.uy));
 
+    } else if (!u.dz && (IS_WATERWALL(levl[rx][ry].typ)
+                         || levl[rx][ry].typ == LAVAWALL)) {
+        You("cause a small splash.");
+        if (levl[rx][ry].typ == LAVAWALL)
+            (void) fire_damage(uwep, FALSE, rx, ry);
+        return ECMD_TIME;
     } else if ((!u.dx && !u.dy) || (u.dz > 0)) {
         int dam;
 
@@ -2919,7 +2925,9 @@ use_whip(struct obj *obj)
             kick_steed();
             return ECMD_TIME;
         }
-        if (is_pool_or_lava(u.ux, u.uy)) {
+        if (is_pool_or_lava(u.ux, u.uy)
+            || IS_WATERWALL(levl[rx][ry].typ)
+            || levl[rx][ry].typ == LAVAWALL) {
             You("cause a small splash.");
             if (is_lava(u.ux, u.uy))
                 (void) fire_damage(uwep, FALSE, u.ux, u.uy);
index b5f7320b56562b318791a38eff1ce55f779141a5..da86bce26ca3fffe01c0abebf3ab36e62a5b4867 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -1101,6 +1101,11 @@ use_pick_axe2(struct obj *obj)
             } else if (lev->typ == IRONBARS) {
                 pline("Clang!");
                 wake_nearby();
+            } else if (IS_WATERWALL(lev->typ)) {
+                pline("Splash!");
+            } else if (lev->typ == LAVAWALL) {
+                pline("Splash!");
+                (void) fire_damage(uwep, FALSE, rx, ry);
             } else if (IS_TREE(lev->typ)) {
                 You("need an axe to cut down a tree.");
             } else if (IS_ROCK(lev->typ)) {