^G of unseen monster

I used ^G to create a monster and specified "invisible owlbear".  I
then got "An owlbear appears next to you."  Except it didn't; it was
invisible and I lacked see-invisible.  I imagine that newsym() was
called for the new-yet-invisible monster, but that remained buffered
and was gone overridden by the time pending map update got flushed
at some point after the monster was made invisible.

Add a new makemon() flag to turn a newly created monster invisible
during its creation, before "monster appears" message is delivered.
Since that message will now be suppressed in this situation, use the
cursor-flash hack that indicates where the new, unseen monster got
placed.  Creating "1000 invisible <mon>" is something you probably
won't do twice.
This commit is contained in:
PatR
2023-11-10 15:43:02 -08:00
parent 088c15b3cd
commit b03e5c1ad7
3 changed files with 9 additions and 10 deletions

View File

@@ -1270,6 +1270,8 @@ makemon(
mtmp->mcansee = mtmp->mcanmove = TRUE;
mtmp->seen_resistance = M_SEEN_NOTHING;
mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr);
if ((mmflags & MM_MINVIS) != 0) /* for ^G */
mon_set_minvis(mtmp); /* call after place_monster() */
switch (ptr->mlet) {
case S_MIMIC: