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.
This commit is contained in:
cohrs
2002-12-19 01:57:10 +00:00
parent 3c98250c96
commit aabc54549e
3 changed files with 11 additions and 2 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -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) ||