From e61d1491719cd3b491bfcc94030a3bdce28474ce Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 3 Sep 2021 13:27:36 +0300 Subject: [PATCH] Fix eel hiding in dry land When an eel was hiding in a pool and a rolling boulder trap launched a boulder on top of the pool, and the boulder then filled the pool, the eel ended up hiding on the dry land. As a stopgap measure, kill off any monster that is in the pool location when the boulder hits the pool. This should probably be expanded to handle flying monsters differently. --- src/do.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/do.c b/src/do.c index 00b9b72b2..aeba44118 100644 --- a/src/do.c +++ b/src/do.c @@ -52,6 +52,8 @@ boulder_hits_pool(struct obj *otmp, int rx, int ry, boolean pushing) const char *what = waterbody_name(rx, ry); schar ltyp = levl[rx][ry].typ; int chance = rn2(10); /* water: 90%; lava: 10% */ + struct monst *mtmp; + fills_up = lava ? chance == 0 : chance != 0; if (fills_up) { @@ -63,6 +65,9 @@ boulder_hits_pool(struct obj *otmp, int rx, int ry, boolean pushing) } else levl[rx][ry].typ = ROOM, levl[rx][ry].flags = 0; + if ((mtmp = m_at(rx, ry)) != 0) + mondied(mtmp); + if (ttmp) (void) delfloortrap(ttmp); bury_objs(rx, ry);