fix github issue #432 - bad sanity check

The block of sanity check code that is causing impossible warnings
about the Wizard mimicking a monster was initially only used for
furniture and objects specifically because of the Wizard.  When it
got extended to check for mimicking monsters, an exception for the
Wizard was needed but not added.

Fixes #432
This commit is contained in:
PatR
2020-12-29 14:34:37 -08:00
parent f30bb8aaa4
commit 9c6a65f49b
2 changed files with 9 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.402 $ $NHDT-Date: 1608933417 2020/12/25 21:56:57 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.410 $ $NHDT-Date: 1609281273 2020/12/29 22:34:33 $
General Fixes and Modified Features
-----------------------------------
@@ -465,6 +465,7 @@ tilemap.c wasn't building if STATUES_LOOK_LIKE_MONSTERS wasn't defined; also,
ensure that monster female name variation ends up as a female during ^G
arbitrate when there is a conflict between gender term (male or female) and
a gender-tied monster name (cavewoman) during ^G; gender term wins
wizard mode sanity check complained about Wizard's clone mimicking a monster
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 mon.c $NHDT-Date: 1609075599 2020/12/27 13:26:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.363 $ */
/* NetHack 3.7 mon.c $NHDT-Date: 1609281168 2020/12/29 22:32:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.364 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -150,9 +150,12 @@ const char *msg;
impossible(
"mimic%s concealed as %s despite Prot-from-shape-changers %s",
is_mimic ? "" : "ker", what, msg);
/* pet's quickmimic can take on furniture and object shapes,
but only until the pet finishes eating a mimic corpse */
if (!(is_mimic || mtmp->meating))
/* the Wizard's clone after "double trouble" starts out mimicking
some other monster; pet's quickmimic effect can temporarily take
on furniture, object, or monster shape, but only until the pet
finishes eating a mimic corpse */
if (!(is_mimic || mtmp->meating
|| (mtmp->iswiz && M_AP_TYPE(mtmp) == M_AP_MONSTER)))
impossible("non-mimic (%s) posing as %s (%s)",
mptr->pmnames[NEUTRAL], what, msg);
#if 0 /* mimics who end up in strange locations do still hide while there */