]> granicus.if.org Git - nethack/commitdiff
U189 - killing an engulfing monster over water allows waterwalking
authorcohrs <cohrs>
Thu, 19 Dec 2002 01:57:10 +0000 (01:57 +0000)
committercohrs <cohrs>
Thu, 19 Dec 2002 01:57:10 +0000 (01:57 +0000)
- 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
src/mon.c
src/trap.c

index 1df14f0085610e57d0ac4c07b205643022bc118c..9645111ffc6f91cc7709d66db748eca987d3628b 100644 (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
index 831225dc55d38b3fba5927ab4bcfead9159bc728..da600eb430ef1f9e8df010db633e72895384db9a 100644 (file)
--- 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) {
index e7f7992f9dec9ac50f0bb842f17e8d286a13a885..a85735a8962a3a3b9941a1d76767b6bb210cf281 100644 (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) ||