From aabc54549e45d6de500c7fc87d42c9eb53dba614 Mon Sep 17 00:00:00 2001 From: cohrs Date: Thu, 19 Dec 2002 01:57:10 +0000 Subject: [PATCH] U189 - killing an engulfing monster over water allows waterwalking - The code in xkilled failed to call spoteffects after killing the monster that was engulfing you. Being expelled already worked correctly. - While testing this, I discovered that removing a ring of levitation or similar while engulfed would call spoteffects when it shouldn't. Fixed that too. --- doc/fixes34.1 | 3 +++ src/mon.c | 5 +++-- src/trap.c | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 1df14f008..9645111ff 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -334,6 +334,9 @@ zapping undiggable trees with wand or spell of dig gave feedback about rock being able to see invisible shouldn't cause you to not notice when potion or spell of invisibility wears off can't successfully bribe a demon who happens to be carrying the Amulet +while over water, killing a monster that had engulfed you does not result + in the usual water effects +removing a ring of levitation while engulfed should not invoke spoteffects Platform- and/or Interface-Specific Fixes diff --git a/src/mon.c b/src/mon.c index 831225dc5..da600eb43 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1759,8 +1759,9 @@ xkilled(mtmp, dest) redisp = TRUE; } #endif - if(!accessible(x, y) && !is_pool(x, y)) { - /* might be mimic in wall or corpse in lava */ + if((!accessible(x, y) && !is_pool(x, y)) || + (x == u.ux && y == u.uy)) { + /* might be mimic in wall or corpse in lava or on player's spot */ redisp = TRUE; if(wasinside) spoteffects(TRUE); } else if(x != u.ux || y != u.uy) { diff --git a/src/trap.c b/src/trap.c index e7f7992f9..a85735a89 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2154,6 +2154,11 @@ long hmask, emask; /* might cancel timeout */ HLevitation &= ~hmask; ELevitation &= ~emask; if(Levitation) return(0); /* maybe another ring/potion/boots */ + if(u.uswallow) { + You("float down, but you are still %s.", + is_animal(u.ustuck->data) ? "swallowed" : "engulfed"); + return(1); + } if (Punished && !carried(uball) && (is_pool(uball->ox, uball->oy) ||