From: Pasi Kallinen Date: Sun, 13 Feb 2022 16:06:45 +0000 (+0200) Subject: Monster or hero placement should avoid wall of water X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2ea20793643c658ae7a9a379bacc8193f3f90cc;p=nethack Monster or hero placement should avoid wall of water --- diff --git a/src/teleport.c b/src/teleport.c index 5df5d1dfd..a9bd26f35 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -83,12 +83,14 @@ goodpos(int x, int y, struct monst* mtmp, long gpflags) if (mtmp == &g.youmonst) return (Swimming || Amphibious || (!Is_waterlevel(&u.uz) + && !(levl[x][y].typ == WATER) /* water on the Plane of Water has no surface so there's no way to be on or above that */ && (Levitation || Flying || Wwalking))); else return (is_swimmer(mdat) || (!Is_waterlevel(&u.uz) + && !(levl[x][y].typ == WATER) && (is_floater(mdat) || is_flyer(mdat) || is_clinger(mdat)))); } else if (mdat->mlet == S_EEL && rn2(13) && !ignorewater) {