From: Pasi Kallinen Date: Tue, 7 Feb 2023 05:36:51 +0000 (+0200) Subject: Pickaxing or whipping a liquid wall X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7aeba466901fe2ac4698dbe04120ac5d098e3746;p=nethack Pickaxing or whipping a liquid wall --- diff --git a/src/apply.c b/src/apply.c index b6816eac3..6c992c7f4 100644 --- a/src/apply.c +++ b/src/apply.c @@ -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); diff --git a/src/dig.c b/src/dig.c index b5f7320b5..da86bce26 100644 --- 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)) {