]> granicus.if.org Git - nethack/commitdiff
Make the "wall of water" stop thrown or kicked items
authorPasi Kallinen <paxed@alt.org>
Fri, 11 Feb 2022 18:38:29 +0000 (20:38 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 11 Feb 2022 18:38:29 +0000 (20:38 +0200)
doc/fixes3-7-0.txt
src/zap.c

index 5403d3ea1a30369af265f7c5e91f91246f808d78..cf5b1dcc89d796f93372468624d20c750ca0dc14 100644 (file)
@@ -777,6 +777,7 @@ don't dereference NULL u.ustuck in dobuzz() when hero has been swallowed
 monsters should growl even if you can't hear it
 give a sound effect message when thrown item lands in water or lava
 don't show rusting of items that land in water
+the water used on the Plane of Water stops thrown or kicked items
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index ab928d90ff77b8c66eab0a5792f86fd1ddcf1c17..f9973720258db0afd3f90e761af8df0eb02bac36 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -3459,6 +3459,12 @@ bhit(int ddx, int ddy, int range,  /* direction and range */
 
         typ = levl[g.bhitpos.x][g.bhitpos.y].typ;
 
+        /* WATER aka "wall of water" stops items */
+        if (typ == WATER) {
+            if (weapon == THROWN_WEAPON || weapon == KICKED_WEAPON)
+                break;
+        }
+
         /* iron bars will block anything big enough and break some things */
         if (weapon == THROWN_WEAPON || weapon == KICKED_WEAPON) {
             if (obj->lamplit && !Blind)