fix #K4498 - stethoscope vs double trouble Wizard

When the Wizard is diguised as some other monster, applying a stethscope
described him as "that <foo> is really a <foo>".
This commit is contained in:
PatR
2026-07-25 13:33:39 -07:00
parent 812a9f1435
commit a3a587dcf3
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -74,6 +74,9 @@ Some optimizations of the glyph lookup - don't produce names for swallow
glyph index in populate_glyphname_hash_indices; build a sorted
index for loadsyms so that it can be searched with bsearch
(pr #1612 by chasonr)
stethoscope applied to one monster disguised as another (double-trouble Wizard)
mis-described undisguised form (unintended side-effect of 5.0 commit
064523e162f8e30bdb76186a854b9d8958f3b340)
Platform- and/or Interface-Specific Fixes
+4 -1
View File
@@ -390,7 +390,10 @@ use_stethoscope(struct obj *obj)
}
if ((mtmp = m_at(rx, ry)) != 0) {
const char *mnm = x_monnam(mtmp, ARTICLE_A, (const char *) 0,
SUPPRESS_IT | SUPPRESS_INVISIBLE, FALSE);
(SUPPRESS_IT | SUPPRESS_INVISIBLE
/* stethoscope reveals true form; seemimic
below will clear mtmp->mappearance */
| SUPPRESS_MAPPEARANCE), FALSE);
/* gb.bhitpos needed by mstatusline() iff mtmp is a long worm */
gb.bhitpos.x = rx, gb.bhitpos.y = ry;