poly'd hero mimic hiding vs polymorph

From a bug report, if you were a mimic
who was hiding (via #monster, becoming a strange object) and polymorphed
into some other monster type, you retained the hidden/object form.  That
didn't happen when reverting to normal form, or when polymorphing into a
monster while involuntarily mimicking gold, but handling for the latter
inadvertently blocked dealing with the hiding-voluntarily case.
This commit is contained in:
nethack.rankin
2009-06-13 02:10:21 +00:00
parent 71f3fb7024
commit ad1dec0745
2 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 polyself.c $Date$ $Revision$ */
/* SCCS Id: @(#)polyself.c 3.5 2007/04/07 */
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
@@ -460,10 +459,12 @@ int mntmp;
flags.female = u.mfemale;
}
if (youmonst.m_ap_type) {
/* stop mimicking immediately */
if (multi < 0) unmul("");
} else if (mons[mntmp].mlet != S_MIMIC) {
/* if stuck mimicking gold, stop immediately */
if (multi < 0 && youmonst.m_ap_type == M_AP_OBJECT &&
youmonst.data->mlet != S_MIMIC)
unmul("");
/* if becoming a non-mimic, stop mimicking anything */
if (mons[mntmp].mlet != S_MIMIC) {
/* as in polyman() */
youmonst.m_ap_type = M_AP_NOTHING;
}