Accessibility: more message locations

Add a new pline_mon() which sets the message location
to the monster location.

Add locations to several trap messages.
This commit is contained in:
Pasi Kallinen
2024-06-13 19:04:30 +03:00
parent a86b9e6899
commit a72b95e4bc
10 changed files with 113 additions and 70 deletions

View File

@@ -63,8 +63,7 @@ cursetxt(struct monst *mtmp, boolean undirected)
else
point_msg = "at you, then curses";
pline_xy(mtmp->mx, mtmp->my,
"%s points %s.", Monnam(mtmp), point_msg);
pline_mon(mtmp, "%s points %s.", Monnam(mtmp), point_msg);
} else if ((!(gm.moves % 4) || !rn2(4))) {
if (!Deaf)
Norep("You hear a mumbled curse."); /* Deaf-aware */
@@ -245,7 +244,7 @@ castmu(
*/
if (!foundyou && thinks_it_foundyou
&& !is_undirected_spell(mattk->adtyp, spellnum)) {
pline_xy(mtmp->mx, mtmp->my, "%s casts a spell at %s!",
pline_mon(mtmp, "%s casts a spell at %s!",
canseemon(mtmp) ? Monnam(mtmp) : "Something",
is_waterwall(mtmp->mux, mtmp->muy) ? "empty water"
: "thin air");
@@ -262,7 +261,7 @@ castmu(
return M_ATTK_MISS;
}
if (canspotmon(mtmp) || !is_undirected_spell(mattk->adtyp, spellnum)) {
pline_xy(mtmp->mx, mtmp->my, "%s casts a spell%s!",
pline_mon(mtmp, "%s casts a spell%s!",
canspotmon(mtmp) ? Monnam(mtmp) : "Something",
is_undirected_spell(mattk->adtyp, spellnum) ? ""
: (Invis && !perceives(mtmp->data)