fix grab/engulf by tame/peaceful monster (trunk only)
<Someone> reported being swallowed by his pet purple worm during Conflict, then being stuck inside once Conflict ended. I'm not entirely sure what dog_move() intended by the "swallowed case handled above" comment. It returns without letting the pet move when the distance between pet and hero is 0; that wasn't much in the way of "handling" being swallowed. Grabbing pets did let go, but peaceful monsters didn't until you actually attempted to move away from them. Now all four combinations (grabbed or swallowed by tame or peaceful monster) are handled the same: the monster will let the hero go next time it gets a chance to try to move, using up its move in the process.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)dogmove.c 3.5 2005/10/14 */
|
||||
/* SCCS Id: @(#)dogmove.c 3.5 2006/08/16 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -635,11 +635,13 @@ register int after; /* this is extra fast monster movement */
|
||||
return 2; /* current monster is gone */
|
||||
}
|
||||
}
|
||||
#if 0 /* [this is now handled in dochug()] */
|
||||
if (!Conflict && !mtmp->mconf &&
|
||||
mtmp == u.ustuck && !sticks(youmonst.data)) {
|
||||
unstuck(mtmp); /* swallowed case handled above */
|
||||
You("get released!");
|
||||
}
|
||||
#endif
|
||||
if (!nohands(mtmp->data) && !verysmall(mtmp->data)) {
|
||||
allowflags |= OPENDOOR;
|
||||
if (monhaskey(mtmp, TRUE)) allowflags |= UNLOCKDOOR;
|
||||
|
||||
Reference in New Issue
Block a user