Accessibility: more message locations pt 3

This commit is contained in:
Pasi Kallinen
2024-12-14 15:36:05 +02:00
parent 055c0d5954
commit 369f1ff959
+40 -33
View File
@@ -269,7 +269,7 @@ expels(
if (digests(mdat)) { if (digests(mdat)) {
You("get regurgitated!"); You("get regurgitated!");
} else if (enfolds(mdat)) { } else if (enfolds(mdat)) {
pline("%s unfolds and you are released!", Monnam(mtmp)); pline_mon(mtmp, "%s unfolds and you are released!", Monnam(mtmp));
} else { } else {
char blast[40]; char blast[40];
struct attack *attk = attacktype_fordmg(mdat, AT_ENGL, AD_ANY); struct attack *attk = attacktype_fordmg(mdat, AT_ENGL, AD_ANY);
@@ -549,7 +549,7 @@ mattacku(struct monst *mtmp)
so mtmp's next move will be a regular attack */ so mtmp's next move will be a regular attack */
place_monster(mtmp, mtmp->mx, mtmp->my); /* put back */ place_monster(mtmp, mtmp->mx, mtmp->my); /* put back */
newsym(u.ux, u.uy); /* u.uundetected was toggled */ newsym(u.ux, u.uy); /* u.uundetected was toggled */
pline("%s draws back as you drop!", Monnam(mtmp)); pline_mon(mtmp, "%s draws back as you drop!", Monnam(mtmp));
return 0; return 0;
} }
@@ -717,7 +717,7 @@ mattacku(struct monst *mtmp)
if (u.uinvulnerable) { /* in the midst of successful prayer */ if (u.uinvulnerable) { /* in the midst of successful prayer */
/* monsters won't attack you */ /* monsters won't attack you */
if (mtmp == u.ustuck) { if (mtmp == u.ustuck) {
pline("%s loosens its grip slightly.", Monnam(mtmp)); pline_mon(mtmp, "%s loosens its grip slightly.", Monnam(mtmp));
} else if (!range2) { } else if (!range2) {
if (youseeit || sensemon(mtmp)) if (youseeit || sensemon(mtmp))
pline("%s starts to attack you, but pulls back.", pline("%s starts to attack you, but pulls back.",
@@ -821,10 +821,11 @@ mattacku(struct monst *mtmp)
missmu(mtmp, (tmp == j), mattk); missmu(mtmp, (tmp == j), mattk);
} }
} else if (digests(mtmp->data)) { } else if (digests(mtmp->data)) {
pline("%s gulps some air!", Monnam(mtmp)); pline_mon(mtmp, "%s gulps some air!", Monnam(mtmp));
} else { } else {
if (youseeit) { if (youseeit) {
pline("%s lunges forward and recoils!", Monnam(mtmp)); pline_mon(mtmp, "%s lunges forward and recoils!",
Monnam(mtmp));
} else { } else {
if (is_whirly(mtmp->data)) { if (is_whirly(mtmp->data)) {
Soundeffect(se_rushing_wind_noise, 60); Soundeffect(se_rushing_wind_noise, 60);
@@ -956,7 +957,7 @@ summonmu(struct monst *mtmp, boolean youseeit)
Strcpy(genericwere, "creature"); Strcpy(genericwere, "creature");
if (youseeit) if (youseeit)
pline("%s summons help!", Monnam(mtmp)); pline_mon(mtmp, "%s summons help!", Monnam(mtmp));
numhelp = were_summon(mdat, FALSE, &numseen, genericwere); numhelp = were_summon(mdat, FALSE, &numseen, genericwere);
if (youseeit) { if (youseeit) {
if (numhelp > 0) { if (numhelp > 0) {
@@ -1026,7 +1027,7 @@ u_slip_free(struct monst *mtmp, struct attack *mattk)
protection might fail (33% chance) when the armor is cursed */ protection might fail (33% chance) when the armor is cursed */
if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK) if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)
&& (!obj->cursed || rn2(3))) { && (!obj->cursed || rn2(3))) {
pline("%s %s your %s %s!", Monnam(mtmp), pline_mon(mtmp, "%s %s your %s %s!", Monnam(mtmp),
(mattk->adtyp == AD_WRAP) ? "slips off of" (mattk->adtyp == AD_WRAP) ? "slips off of"
: "grabs you, but cannot hold onto", : "grabs you, but cannot hold onto",
obj->greased ? "greased" : "slippery", obj->greased ? "greased" : "slippery",
@@ -1662,7 +1663,7 @@ gazemu(struct monst *mtmp, struct attack *mattk)
if (is_medusa && Hallucination && !rn2(3)) if (is_medusa && Hallucination && !rn2(3))
pline("Someone seems overdue for a serpent cut."); pline("Someone seems overdue for a serpent cut.");
else else
pline("%s %s.", Monnam(mtmp), pline_mon(mtmp, "%s %s.", Monnam(mtmp),
(is_medusa && mtmp->mcan && !react) (is_medusa && mtmp->mcan && !react)
? "doesn't look all that ugly" ? "doesn't look all that ugly"
: "gazes ineffectually"); : "gazes ineffectually");
@@ -1686,7 +1687,7 @@ gazemu(struct monst *mtmp, struct attack *mattk)
break; break;
} }
if (useeit) if (useeit)
pline("%s is turned to stone!", Monnam(mtmp)); pline_mon(mtmp, "%s is turned to stone!", Monnam(mtmp));
gs.stoned = TRUE; gs.stoned = TRUE;
killed(mtmp); killed(mtmp);
@@ -1716,7 +1717,8 @@ gazemu(struct monst *mtmp, struct attack *mattk)
mtmp->mspec_used = mtmp->mspec_used + (conf + rn2(6)); mtmp->mspec_used = mtmp->mspec_used + (conf + rn2(6));
if (!Confusion) if (!Confusion)
pline("%s gaze confuses you!", s_suffix(Monnam(mtmp))); pline_mon(mtmp, "%s gaze confuses you!",
s_suffix(Monnam(mtmp)));
else else
You("are getting more and more confused."); You("are getting more and more confused.");
make_confused(HConfusion + conf, FALSE); make_confused(HConfusion + conf, FALSE);
@@ -1733,7 +1735,7 @@ gazemu(struct monst *mtmp, struct attack *mattk)
int stun = d(2, 6); int stun = d(2, 6);
mtmp->mspec_used = mtmp->mspec_used + (stun + rn2(6)); mtmp->mspec_used = mtmp->mspec_used + (stun + rn2(6));
pline("%s stares piercingly at you!", Monnam(mtmp)); pline_mon(mtmp, "%s stares piercingly at you!", Monnam(mtmp));
make_stunned((HStun & TIMEOUT) + (long) stun, TRUE); make_stunned((HStun & TIMEOUT) + (long) stun, TRUE);
stop_occupation(); stop_occupation();
} }
@@ -1777,7 +1779,8 @@ gazemu(struct monst *mtmp, struct attack *mattk)
} else { } else {
int dmg = d(2, 6), orig_dmg = dmg, lev = (int) mtmp->m_lev; int dmg = d(2, 6), orig_dmg = dmg, lev = (int) mtmp->m_lev;
pline("%s attacks you with a fiery gaze!", Monnam(mtmp)); pline_mon(mtmp, "%s attacks you with a fiery gaze!",
Monnam(mtmp));
stop_occupation(); stop_occupation();
if (Fire_resistance) { if (Fire_resistance) {
shieldeff(u.ux, u.uy); shieldeff(u.ux, u.uy);
@@ -1837,7 +1840,7 @@ gazemu(struct monst *mtmp, struct attack *mattk)
react = rn2(SIZE(reactions)); react = rn2(SIZE(reactions));
/* cancelled/hallucinatory feedback; monster might look "confused", /* cancelled/hallucinatory feedback; monster might look "confused",
"stunned",&c but we don't actually set corresponding attribute */ "stunned",&c but we don't actually set corresponding attribute */
pline("%s looks %s%s.", Monnam(mtmp), pline_mon(mtmp, "%s looks %s%s.", Monnam(mtmp),
!rn2(3) ? "" : already ? "quite " !rn2(3) ? "" : already ? "quite "
: (!rn2(2) ? "a bit " : "somewhat "), : (!rn2(2) ? "a bit " : "somewhat "),
reactions[react]); reactions[react]);
@@ -1941,12 +1944,13 @@ doseduce(struct monst *mon)
char qbuf[QBUFSZ], Who[QBUFSZ]; char qbuf[QBUFSZ], Who[QBUFSZ];
if (mon->mcan || mon->mspec_used) { if (mon->mcan || mon->mspec_used) {
pline("%s acts as though %s has got a %sheadache.", Monnam(mon), pline_mon(mon, "%s acts as though %s has got a %sheadache.",
mhe(mon), mon->mcan ? "severe " : ""); Monnam(mon), mhe(mon), mon->mcan ? "severe " : "");
return 0; return 0;
} }
if (unresponsive()) { if (unresponsive()) {
pline("%s seems dismayed at your lack of response.", Monnam(mon)); pline_mon(mon, "%s seems dismayed at your lack of response.",
Monnam(mon));
return 0; return 0;
} }
seewho = canseemon(mon); seewho = canseemon(mon);
@@ -2104,7 +2108,7 @@ doseduce(struct monst *mon)
: ""); : "");
} }
} else if (seewho) } else if (seewho)
pline("%s appears to sigh.", Monnam(mon)); pline_mon(mon, "%s appears to sigh.", Monnam(mon));
/* else no regret message if can't see or hear seducer */ /* else no regret message if can't see or hear seducer */
if (!tele_restrict(mon)) if (!tele_restrict(mon))
@@ -2214,7 +2218,8 @@ doseduce(struct monst *mon)
pline("%s demands that you pay %s, but you refuse...", pline("%s demands that you pay %s, but you refuse...",
noit_Monnam(mon), noit_mhim(mon)); noit_Monnam(mon), noit_mhim(mon));
} else if (u.umonnum == PM_LEPRECHAUN) { } else if (u.umonnum == PM_LEPRECHAUN) {
pline("%s tries to take your gold, but fails...", noit_Monnam(mon)); pline_mon(mon, "%s tries to take your gold, but fails...",
noit_Monnam(mon));
} else { } else {
long cost; long cost;
long umoney = money_cnt(gi.invent); long umoney = money_cnt(gi.invent);
@@ -2234,8 +2239,8 @@ doseduce(struct monst *mon)
SetVoice(mon, 0, 80, 0); SetVoice(mon, 0, 80, 0);
verbalize("It's on the house!"); verbalize("It's on the house!");
} else { } else {
pline("%s takes %ld %s for services rendered!", noit_Monnam(mon), pline_mon(mon, "%s takes %ld %s for services rendered!",
cost, currency(cost)); noit_Monnam(mon), cost, currency(cost));
money2mon(mon, cost); money2mon(mon, cost);
disp.botl = TRUE; disp.botl = TRUE;
} }
@@ -2298,7 +2303,7 @@ staticfn int
assess_dmg(struct monst *mtmp, int tmp) assess_dmg(struct monst *mtmp, int tmp)
{ {
if ((mtmp->mhp -= tmp) <= 0) { if ((mtmp->mhp -= tmp) <= 0) {
pline("%s dies!", Monnam(mtmp)); pline_mon(mtmp, "%s dies!", Monnam(mtmp));
xkilled(mtmp, XKILL_NOMSG); xkilled(mtmp, XKILL_NOMSG);
if (!DEADMONSTER(mtmp)) if (!DEADMONSTER(mtmp))
return M_ATTK_HIT; return M_ATTK_HIT;
@@ -2402,13 +2407,13 @@ passiveum(
switch (oldu_mattk->adtyp) { switch (oldu_mattk->adtyp) {
case AD_ACID: case AD_ACID:
if (!rn2(2)) { if (!rn2(2)) {
pline("%s is splashed by %s%s!", Monnam(mtmp), pline_mon(mtmp, "%s is splashed by %s%s!", Monnam(mtmp),
/* temporary? hack for sequencing issue: "your acid" /* temporary? hack for sequencing issue: "your acid"
looks strange coming immediately after player has looks strange coming immediately after player has
been told that hero has reverted to normal form */ been told that hero has reverted to normal form */
!Upolyd ? "" : "your ", hliquid("acid")); !Upolyd ? "" : "your ", hliquid("acid"));
if (resists_acid(mtmp)) { if (resists_acid(mtmp)) {
pline("%s is not affected.", Monnam(mtmp)); pline_mon(mtmp, "%s is not affected.", Monnam(mtmp));
tmp = 0; tmp = 0;
} }
} else } else
@@ -2435,7 +2440,7 @@ passiveum(
mon_to_stone(mtmp); mon_to_stone(mtmp);
return 1; return 1;
} }
pline("%s turns to stone!", Monnam(mtmp)); pline_mon(mtmp, "%s turns to stone!", Monnam(mtmp));
gs.stoned = 1; gs.stoned = 1;
xkilled(mtmp, XKILL_NOMSG); xkilled(mtmp, XKILL_NOMSG);
if (!DEADMONSTER(mtmp)) if (!DEADMONSTER(mtmp))
@@ -2485,13 +2490,14 @@ passiveum(
if (mon_reflects(mtmp, if (mon_reflects(mtmp,
"Your gaze is reflected by %s %s.")) "Your gaze is reflected by %s %s."))
return 1; return 1;
pline("%s is frozen by your gaze!", Monnam(mtmp)); pline_mon(mtmp, "%s is frozen by your gaze!",
Monnam(mtmp));
paralyze_monst(mtmp, tmp); paralyze_monst(mtmp, tmp);
return M_ATTK_AGR_DONE; return M_ATTK_AGR_DONE;
} }
} }
} else { /* gelatinous cube */ } else { /* gelatinous cube */
pline("%s is frozen by you.", Monnam(mtmp)); pline_mon(mtmp, "%s is frozen by you.", Monnam(mtmp));
paralyze_monst(mtmp, tmp); paralyze_monst(mtmp, tmp);
return M_ATTK_AGR_DONE; return M_ATTK_AGR_DONE;
} }
@@ -2499,12 +2505,12 @@ passiveum(
case AD_COLD: /* Brown mold or blue jelly */ case AD_COLD: /* Brown mold or blue jelly */
if (resists_cold(mtmp)) { if (resists_cold(mtmp)) {
shieldeff(mtmp->mx, mtmp->my); shieldeff(mtmp->mx, mtmp->my);
pline("%s is mildly chilly.", Monnam(mtmp)); pline_mon(mtmp, "%s is mildly chilly.", Monnam(mtmp));
golemeffects(mtmp, AD_COLD, tmp); golemeffects(mtmp, AD_COLD, tmp);
tmp = 0; tmp = 0;
break; break;
} }
pline("%s is suddenly very cold!", Monnam(mtmp)); pline_mon(mtmp, "%s is suddenly very cold!", Monnam(mtmp));
u.mh += (tmp + rn2(2)) / 2; u.mh += (tmp + rn2(2)) / 2;
if (u.mhmax < u.mh) if (u.mhmax < u.mh)
u.mhmax = u.mh; u.mhmax = u.mh;
@@ -2514,7 +2520,7 @@ passiveum(
case AD_STUN: /* Yellow mold */ case AD_STUN: /* Yellow mold */
if (!mtmp->mstun) { if (!mtmp->mstun) {
mtmp->mstun = 1; mtmp->mstun = 1;
pline("%s %s.", Monnam(mtmp), pline_mon(mtmp, "%s %s.", Monnam(mtmp),
makeplural(stagger(mtmp->data, "stagger"))); makeplural(stagger(mtmp->data, "stagger")));
} }
tmp = 0; tmp = 0;
@@ -2522,22 +2528,23 @@ passiveum(
case AD_FIRE: /* Red mold */ case AD_FIRE: /* Red mold */
if (resists_fire(mtmp)) { if (resists_fire(mtmp)) {
shieldeff(mtmp->mx, mtmp->my); shieldeff(mtmp->mx, mtmp->my);
pline("%s is mildly warm.", Monnam(mtmp)); pline_mon(mtmp, "%s is mildly warm.", Monnam(mtmp));
golemeffects(mtmp, AD_FIRE, tmp); golemeffects(mtmp, AD_FIRE, tmp);
tmp = 0; tmp = 0;
break; break;
} }
pline("%s is suddenly very hot!", Monnam(mtmp)); pline_mon(mtmp, "%s is suddenly very hot!", Monnam(mtmp));
break; break;
case AD_ELEC: case AD_ELEC:
if (resists_elec(mtmp)) { if (resists_elec(mtmp)) {
shieldeff(mtmp->mx, mtmp->my); shieldeff(mtmp->mx, mtmp->my);
pline("%s is slightly tingled.", Monnam(mtmp)); pline_mon(mtmp, "%s is slightly tingled.", Monnam(mtmp));
golemeffects(mtmp, AD_ELEC, tmp); golemeffects(mtmp, AD_ELEC, tmp);
tmp = 0; tmp = 0;
break; break;
} }
pline("%s is jolted with your electricity!", Monnam(mtmp)); pline_mon(mtmp, "%s is jolted with your electricity!",
Monnam(mtmp));
break; break;
default: default:
tmp = 0; tmp = 0;