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.
This commit is contained in:
5
src/do.c
5
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);
|
||||
|
||||
Reference in New Issue
Block a user