From: cohrs Date: Sat, 2 Feb 2002 06:43:53 +0000 (+0000) Subject: teleporting monster while swallowed X-Git-Tag: MOVE2GIT~3291 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=957e96a48a7cce1c42cc37e52a21af550698b5a4;p=nethack teleporting monster while swallowed if player teleports a monster while swallowed on a noteleport level, the player should not teleport along with the monster --- diff --git a/doc/fixes33.2 b/doc/fixes33.2 index 05629d5c2..033c0d98c 100644 --- a/doc/fixes33.2 +++ b/doc/fixes33.2 @@ -414,6 +414,8 @@ eggs, potions & other breakables may break when they fall down stairs hurtling via grappling hook does not apply effects of destination location consider vortexes to be nonliving dragons have scales, not fur +if player teleports a monster while swallowed on a noteleport level, the + player should not teleport along with the monster Platform- and/or Interface-Specific Fixes diff --git a/src/teleport.c b/src/teleport.c index 8d63c3e8e..85d38c788 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1147,14 +1147,17 @@ boolean give_feedback; if (give_feedback) pline("%s resists your magic!", Monnam(mtmp)); return FALSE; - } else { - if (is_rider(mtmp->data) && rn2(13) && - enexto(&cc, u.ux, u.uy, mtmp->data)) - rloc_to(mtmp, cc.x, cc.y); - else - rloc(mtmp); - return TRUE; - } + } else if (level.flags.noteleport && u.uswallow && mtmp == u.ustuck) { + if (give_feedback) + You("are no longer inside %s!", mon_nam(mtmp)); + unstuck(mtmp); + rloc(mtmp); + } else if (is_rider(mtmp->data) && rn2(13) && + enexto(&cc, u.ux, u.uy, mtmp->data)) + rloc_to(mtmp, cc.x, cc.y); + else + rloc(mtmp); + return TRUE; } /*teleport.c*/