]> granicus.if.org Git - nethack/commitdiff
Lava walls cover objects
authorPasi Kallinen <paxed@alt.org>
Tue, 21 Feb 2023 14:52:22 +0000 (16:52 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 21 Feb 2023 15:06:32 +0000 (17:06 +0200)
Items landing into a wall of lava are covered up by it.
Kicking behaves the same as wall of water: splashes,
but doesn't move the item.

include/display.h
src/dokick.c

index ece52cd135d487122a6a5d9b13807656fbbe9078..1502f27ded0aa738d6db86e3876e660a640faa5e 100644 (file)
  * "cover" any objects or traps that might be there.
  */
 #define covers_objects(xx, yy) \
-    ((is_pool(xx, yy) && !Underwater) || (levl[xx][yy].typ == LAVAPOOL))
+    ((is_pool(xx, yy) && !Underwater) || (levl[xx][yy].typ == LAVAPOOL) \
+      || (levl[xx][yy].typ == LAVAWALL))
 
 #define covers_traps(xx, yy) covers_objects(xx, yy)
 
index 3e060b40c4fac6d85c960aba337a29d49f474916..2e14cc07d1e3230a122389fd2b0754b0d3bef459 100644 (file)
@@ -1137,9 +1137,11 @@ dokick(void)
         return ECMD_TIME;
     }
     (void) unmap_invisible(x, y);
-    if (is_pool(x, y) ^ !!u.uinwater) {
+    if ((is_pool(x, y) || gm.maploc->typ == LAVAWALL) ^ !!u.uinwater) {
         /* objects normally can't be removed from water by kicking */
-        You("splash some %s around.", hliquid("water"));
+        You("splash some %s around.",
+            hliquid(is_pool(x, y) ? "water" : "lava"));
+        /* pretend the kick is fast enough for lava not to burn */
         return ECMD_TIME;
     }