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

@@ -1207,8 +1207,8 @@ register struct monst *mtmp;
register struct obj *otmp;
{
int tmp;
boolean reveal_invis = FALSE;
if (mtmp != &youmonst) {
mtmp->msleeping = 0;
if (mtmp->m_ap_type)
@@ -1819,12 +1819,15 @@ struct monst *mtmp;
Strcpy(nambuf, mon_nam(mtmp));
mon_set_minvis(mtmp);
if (vismon && mtmp->minvis) { /* was seen, now invisible */
if (canspotmon(mtmp))
if (canspotmon(mtmp)) {
pline("%s body takes on a %s transparency.",
upstart(s_suffix(nambuf)),
Hallucination ? "normal" : "strange");
else
} else {
pline("Suddenly you cannot see %s.", nambuf);
if (vis)
map_invisible(mtmp->mx, mtmp->my);
}
if (oseen)
makeknown(otmp->otyp);
}