]> granicus.if.org Git - nethack/commitdiff
Fix eels hiding when a pool boiled off
authorPasi Kallinen <paxed@alt.org>
Sat, 14 Aug 2021 10:33:04 +0000 (13:33 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 14 Aug 2021 10:43:04 +0000 (13:43 +0300)
Sanity check caught an eel hiding on floor; this was caused by
an exploding flaming sphere boiling off the pool the eel was
hiding in. The freezing water case was already handled, so
add the same, rather lackluster handling, to the fire case.

src/zap.c

index 06aec2901395947b0c4f069edbf0372b96ce2938..0bf4d06db12e8cc0850d2836bcf4f04ce44f49ac 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -4592,8 +4592,17 @@ zap_over_floor(xchar x, xchar y, int type, boolean *shopdamage,
             }
             if (msgtxt)
                 Norep("%s", msgtxt);
-            if (lev->typ == ROOM)
+            if (lev->typ == ROOM) {
+                if ((mon = m_at(x, y)) != 0) {
+                    /* probably ought to do some hefty damage to any
+                       creature caught in boiling water;
+                       at a minimum, eels are forced out of hiding */
+                    if (is_swimmer(mon->data) && mon->mundetected) {
+                        mon->mundetected = 0;
+                    }
+                }
                 newsym(x, y);
+            }
         } else if (IS_FOUNTAIN(lev->typ)) {
             create_gas_cloud(x, y, rnd(2), 0); /* radius 1..2, no damage */
             if (see_it)