From: Pasi Kallinen Date: Sun, 6 Feb 2022 18:38:18 +0000 (+0200) Subject: Make solid water behave more consistently X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ee1c66f8f308eee2b58d3cf1cc9167447727a04;p=nethack Make solid water behave more consistently The "water" terrain (as used on the Plane of Water) behaved strangely outside the plane. Make it behave a bit more consistently, although it's still not really usable elsewhere. The rationale here being it's a solid wall of water. Firstly, disable levitation and flying (which was already done when moving into the water on the Plane of Water), and moving into it refers to it as a "wall of water" to make it clear it's a solid block of water. --- diff --git a/src/hack.c b/src/hack.c index 7c1bce07f..420ccd676 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2263,7 +2263,7 @@ switch_terrain(void) { struct rm *lev = &levl[u.ux][u.uy]; boolean blocklev = (IS_ROCK(lev->typ) || closed_door(u.ux, u.uy) - || (Is_waterlevel(&u.uz) && lev->typ == WATER)), + || lev->typ == WATER), was_levitating = !!Levitation, was_flying = !!Flying; if (blocklev) { diff --git a/src/trap.c b/src/trap.c index 4b513c07e..3c109d4b4 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4178,6 +4178,7 @@ drown(void) const char *pool_of_water; boolean inpool_ok = FALSE, crawl_ok; int i, x, y; + boolean is_solid = (levl[u.ux][u.uy].typ == WATER); feel_newsym(u.ux, u.uy); /* in case Blind, map the water here */ /* happily wading in the same contiguous pool */ @@ -4191,10 +4192,11 @@ drown(void) } if (!u.uinwater) { - You("%s into the %s%c", Is_waterlevel(&u.uz) ? "plunge" : "fall", + You("%s into the %s%s%c", is_solid ? "plunge" : "fall", + is_solid ? "wall of " : "", hliquid("water"), Amphibious || Swimming ? '.' : '!'); - if (!Swimming && !Is_waterlevel(&u.uz)) + if (!Swimming && !is_solid) You("sink like %s.", Hallucination ? "the Titanic" : "a rock"); }