improve x_monnam results when swallowed
This addresses one of the scenarios that had previously been discussed in the comments under pull request #979.
This commit is contained in:
@@ -1967,6 +1967,16 @@ x_monnam(
|
||||
if (article == ARTICLE_YOUR && !mtmp->mtame)
|
||||
article = ARTICLE_THE;
|
||||
|
||||
if (mtmp == u.ustuck) {
|
||||
/*
|
||||
* This monster has become important, for the moment anyway.
|
||||
* As the hero's consumer, it is worthy of ARTICLE_THE.
|
||||
* Also, suppress invisible as that particular characteristic
|
||||
* is unimportant now and you can see it's interior anyway.
|
||||
*/
|
||||
article = ARTICLE_THE;
|
||||
suppress |= SUPPRESS_INVISIBLE;
|
||||
}
|
||||
do_hallu = Hallucination && !(suppress & SUPPRESS_HALLUCINATION);
|
||||
do_invis = mtmp->minvis && !(suppress & SUPPRESS_INVISIBLE);
|
||||
do_it = !canspotmon(mtmp) && article != ARTICLE_YOUR
|
||||
|
||||
@@ -622,7 +622,7 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
|
||||
} else if (u.uswallow) {
|
||||
/* when swallowed, we're only called for spots adjacent to hero,
|
||||
and blindness doesn't prevent hero from feeling what holds him */
|
||||
Sprintf(buf, "interior of %s", a_monnam(u.ustuck));
|
||||
Sprintf(buf, "interior of %s", mon_nam(u.ustuck));
|
||||
pm = u.ustuck->data;
|
||||
} else if (glyph_is_monster(glyph)) {
|
||||
gb.bhitpos.x = x;
|
||||
|
||||
Reference in New Issue
Block a user