From: Pasi Kallinen Date: Tue, 21 Feb 2023 14:52:22 +0000 (+0200) Subject: Lava walls cover objects X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08ced2a58bb6f3f9f4c5f2c7ec33a5e20fd19fa2;p=nethack Lava walls cover objects 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. --- diff --git a/include/display.h b/include/display.h index ece52cd13..1502f27de 100644 --- a/include/display.h +++ b/include/display.h @@ -216,7 +216,8 @@ * "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) diff --git a/src/dokick.c b/src/dokick.c index 3e060b40c..2e14cc07d 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -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; }