]> granicus.if.org Git - nethack/commitdiff
Make solid water behave more consistently
authorPasi Kallinen <paxed@alt.org>
Sun, 6 Feb 2022 18:38:18 +0000 (20:38 +0200)
committerPasi Kallinen <paxed@alt.org>
Sun, 6 Feb 2022 18:38:22 +0000 (20:38 +0200)
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.

src/hack.c
src/trap.c

index 7c1bce07f31f186caaf66b1bd63ea95230b2242e..420ccd676b6d4b4f258ef0aba6797c91be64fc25 100644 (file)
@@ -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) {
index 4b513c07eba57b253895c899761226183709b20d..3c109d4b44964db276cf2451f17bb26f19c93d91 100644 (file)
@@ -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");
     }