From: Pasi Kallinen Date: Sun, 13 Feb 2022 15:21:57 +0000 (+0200) Subject: Wall of water should block monster lined-up checks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2448ead0c420d32f68a32fcdaa501df8efa450a8;p=nethack Wall of water should block monster lined-up checks Prevents monsters from eg. throwing items through the water. --- diff --git a/src/mthrowu.c b/src/mthrowu.c index cf775ec7d..7f546d815 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1037,7 +1037,8 @@ linedup_callback( bx += dx, by += dy; if (!isok(bx, by)) return FALSE; - if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by)) + if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by) + || levl[bx][by].typ == WATER) return FALSE; if ((*fnc)(bx, by)) return TRUE; @@ -1080,7 +1081,8 @@ linedup( do { /* is guaranteed to eventually converge with */ bx += dx, by += dy; - if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by)) + if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by) + || levl[bx][by].typ == WATER) return FALSE; if (sobj_at(BOULDER, bx, by)) ++boulderspots;