unleashing untame monsters

Fix several cases that earlier patches didn't address.
If a leashed monster becomes untame, detach the leash.
This commit is contained in:
nethack.rankin
2002-03-11 08:46:54 +00:00
parent afae7f931c
commit 085498ba28
4 changed files with 32 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)hack.c 3.4 2002/02/05 */
/* SCCS Id: @(#)hack.c 3.4 2002/03/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1166,6 +1166,7 @@ domove()
if (mtmp->mtrapped) {
if (!rn2(mtmp->mtame)) {
mtmp->mtame = mtmp->mpeaceful = mtmp->msleeping = 0;
if (mtmp->mleashed) m_unleash(mtmp, TRUE);
growl(mtmp);
} else {
yelp(mtmp);