From: Pasi Kallinen Date: Fri, 11 Feb 2022 18:38:29 +0000 (+0200) Subject: Make the "wall of water" stop thrown or kicked items X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ca8ac9a8078f2b317a55686a9795ce2cf92656a;p=nethack Make the "wall of water" stop thrown or kicked items --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 5403d3ea1..cf5b1dcc8 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/zap.c b/src/zap.c index ab928d90f..f99737202 100644 --- 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)