observing monster become invisible

Requested by one of the beta testers 13 months ago... when a visible
monster becomes invisible and vanishes, mark its map location with
the remembered, unseen monster glyph.  (When the player zaps a
monster with a wand of make invisible, that only happens if the wand
type is known.  I'm not sure that's right but didn't alter it....)

The request suggested also doing it for a monster who disappears by
teleporting away, but I haven't attempted to implement that.
This commit is contained in:
PatR
2016-07-09 15:03:03 -07:00
parent eb22f7f583
commit 617ab5968f
6 changed files with 23 additions and 12 deletions

View File

@@ -443,6 +443,8 @@ int spellnum;
pline("%s suddenly %s!", Monnam(mtmp),
!See_invisible ? "disappears" : "becomes transparent");
mon_set_minvis(mtmp);
if (cansee(mtmp->mx, mtmp->my) && !canspotmon(mtmp))
map_invisible(mtmp->mx, mtmp->my);
dmg = 0;
} else
impossible("no reason for monster to cast disappear spell?");