create monster creating concealed mimic

From an old bug report (sent directly to devteam, June of 2017):
wand or scroll of create monster becomes discovered if it makes
a mimic that is concealed as an object or as furniture within
the hero's view.  Fixing this in the general case [when does
seeing a mimic as something other than a monster mean that the
mimic is being seen?] is a massive can of worms, but fixing this
specific case is trivial.
This commit is contained in:
PatR
2020-11-20 18:56:35 -08:00
parent f7a3e7884c
commit 03d7d64d15
3 changed files with 17 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 makemon.c $NHDT-Date: 1596498176 2020/08/03 23:42:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.177 $ */
/* NetHack 3.7 makemon.c $NHDT-Date: 1605927392 2020/11/21 02:56:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.179 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1503,7 +1503,8 @@ boolean neverask;
x = c.x, y = c.y;
mon = makemon(mptr, x, y, NO_MM_FLAGS);
if (mon && canspotmon(mon))
if (mon && canspotmon(mon) && (M_AP_TYPE(mon) == M_AP_NOTHING
|| M_AP_TYPE(mon) == M_AP_MONSTER))
known = TRUE;
}
return known;