fix #K3474 - "you detect it where <foo> was"

A vampire in bat form was seen via infravision or possibly telepathy,
then when it changed into fog cloud form the feedback was
|You now detect it where the vampire bat was.
The message substitutes "detect" for "see" when the new form can't
be seen and the monster name formatting yields "it" for that case.

Give a vanish message instead since that is effectively what happens.
This commit is contained in:
PatR
2021-10-26 03:11:55 -07:00
parent b4908f6928
commit cffeecee26
2 changed files with 11 additions and 3 deletions

View File

@@ -1907,6 +1907,7 @@ vamp_shift(
{
int reslt = 0;
char oldmtype[BUFSZ];
boolean sawmon = canseemon(mon); /* before shape change */
/* remember current monster type before shapechange */
Strcpy(oldmtype, domsg ? noname_monnam(mon, ARTICLE_THE) : "");
@@ -1920,9 +1921,14 @@ vamp_shift(
}
if (reslt && domsg) {
pline("You %s %s where %s was.",
!canseemon(mon) ? "now detect" : "observe",
noname_monnam(mon, ARTICLE_A), oldmtype);
/* might have seen vampire/bat/wolf with infravision then be
unable to see the same creature when it turns into a fog cloud */
if (canspotmon(mon))
You("%s %s where %s was.",
!canseemon(mon) ? "now detect" : "observe",
noname_monnam(mon, ARTICLE_A), oldmtype);
else
You("can no longer %s %s.", sawmon ? "see" : "sense", oldmtype);
/* this message is given when it turns into a fog cloud
in order to move under a closed door */
display_nhwindow(WIN_MESSAGE, FALSE);