From: PatR Date: Tue, 29 Dec 2020 22:34:37 +0000 (-0800) Subject: fix github issue #432 - bad sanity check X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c6a65f49b45dbdc81768b9b510f4d768bcfce4b;p=nethack 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 --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a50894cb1..cacc868b0 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/mon.c b/src/mon.c index 1b13ddbd6..346b21c0f 100644 --- a/src/mon.c +++ b/src/mon.c @@ -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 */