diff --git a/src/monmove.c b/src/monmove.c index 41abba80c..c461fb46e 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -55,7 +55,7 @@ mb_trapped(struct monst *mtmp, boolean canseeit) { if (flags.verbose) { if (canseeit && !Unaware) - pline("KABOOM!! You see a door explode."); + pline_mon(mtmp, "KABOOM!! You see a door explode."); else if (!Deaf) You_hear("a %s explosion.", (mdistu(mtmp) > 7 * 7) ? "distant" : "nearby"); @@ -110,7 +110,7 @@ mon_yells(struct monst *mon, const char *shout) /* Sidenote on "A watchman angrily waves her arms!" * Female being called watchman is correct (career name). */ - pline("%s angrily %s %s %s!", + pline_mon(mon, "%s angrily %s %s %s!", Amonnam(mon), nolimbs(mon->data) ? "shakes" : "waves", mhis(mon), @@ -118,7 +118,7 @@ mon_yells(struct monst *mon, const char *shout) : makeplural(mbodypart(mon, ARM))); } else { if (canspotmon(mon)) { - pline("%s yells:", Amonnam(mon)); + pline_mon(mon, "%s yells:", Amonnam(mon)); } else { /* Soundeffect(se_someone_yells, 75); */ You_hear("someone yell:"); @@ -146,14 +146,19 @@ m_break_boulder(struct monst *mtmp, coordxy x, coordxy y) if (m_can_break_boulder(mtmp) && ((otmp = sobj_at(BOULDER, x, y)) != 0)) { if (!is_rider(mtmp->data)) { - if (!Deaf && (mdistu(mtmp) < 4*4)) + if (!Deaf && (mdistu(mtmp) < 4*4)) { + if (canspotmon(mtmp)) + set_msg_xy(mtmp->mx, mtmp->my); pline("%s mutters %s.", Monnam(mtmp), mtmp->ispriest ? "a prayer" : "an incantation"); + } mtmp->mspec_used += rn1(20, 10); } - if (cansee(x, y)) + if (cansee(x, y)) { + set_msg_xy(x, y); pline_The("boulder falls apart."); + } fracture_rock(otmp); } } @@ -378,7 +383,7 @@ bee_eat_jelly(struct monst *mon, struct obj *obj) if (obj->quan > 1L) obj = splitobj(obj, 1L); if (canseemon(mon)) - pline("%s eats %s.", Monnam(mon), an(xname(obj))); + pline_mon(mon, "%s eats %s.", Monnam(mon), an(xname(obj))); delobj(obj); if ((int) mon->m_lev < mons[PM_QUEEN_BEE].mlevel - 1) @@ -440,11 +445,11 @@ monflee( sleep and temporary paralysis, so both conditions receive the same alternate message */ if (!mtmp->mcanmove || !mtmp->data->mmove) { - pline("%s seems to flinch.", Adjmonnam(mtmp, "immobile")); + pline_mon(mtmp, "%s seems to flinch.", Adjmonnam(mtmp, "immobile")); } else if (flees_light(mtmp)) { if (Unaware) { /* tell the player even if the hero is unconscious */ - pline("%s is frightened.", Monnam(mtmp)); + pline_mon(mtmp, "%s is frightened.", Monnam(mtmp)); } else if (rn2(10) || Deaf) { /* via flees_light(), will always be either via uwep (Sunsword) or uarm (gold dragon scales/mail) or both; @@ -456,14 +461,14 @@ monflee( ? yname(uarm) : "[its imagination?]"; - pline("%s flees from the painful light of %s.", + pline_mon(mtmp, "%s flees from the painful light of %s.", Monnam(mtmp), lsrc); } else { SetVoice(mtmp, 0, 80, 0); verbalize("Bright light!"); } } else { - pline("%s turns to flee.", Monnam(mtmp)); + pline_mon(mtmp, "%s turns to flee.", Monnam(mtmp)); } } @@ -534,7 +539,7 @@ mind_blast(struct monst *mtmp) struct monst *m2, *nmon = (struct monst *) 0; if (canseemon(mtmp)) - pline("%s concentrates.", Monnam(mtmp)); + pline_mon(mtmp, "%s concentrates.", Monnam(mtmp)); if (mdistu(mtmp) > BOLT_LIM * BOLT_LIM) { You("sense a faint wave of psychic energy."); return; @@ -770,6 +775,8 @@ dochug(struct monst *mtmp) } else { mtmp->minvis = mtmp->perminvis = 0; /* Why? For the same reason in real demon talk */ + if (canseemon(mtmp)) + set_msg_xy(mtmp->mx, mtmp->my); pline("%s gets angry!", Amonnam(mtmp)); mtmp->mpeaceful = 0; set_malign(mtmp); @@ -1002,7 +1009,7 @@ boolean itsstuck(struct monst *mtmp) { if (sticks(gy.youmonst.data) && mtmp == u.ustuck && !u.uswallow) { - pline("%s cannot escape from you!", Monnam(mtmp)); + pline_mon(mtmp, "%s cannot escape from you!", Monnam(mtmp)); return TRUE; } return FALSE; @@ -1209,7 +1216,7 @@ maybe_spin_web(struct monst *mtmp) char mbuf[BUFSZ]; Strcpy(mbuf, canspotmon(mtmp) ? y_monnam(mtmp) : something); - pline("%s spins a web.", upstart(mbuf)); + pline_mon(mtmp, "%s spins a web.", upstart(mbuf)); trap->tseen = 1; } if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE)) @@ -1453,7 +1460,7 @@ postmov( if ((here->doormask & (D_LOCKED | D_CLOSED)) != 0 && amorphous(ptr)) { if (flags.verbose && canseemon(mtmp)) - pline("%s %s under the door.", Monnam(mtmp), + pline_mon(mtmp, "%s %s under the door.", Monnam(mtmp), (ptr == &mons[PM_FOG_CLOUD] || ptr->mlet == S_LIGHT) ? "flows" : "oozes"); } else if (here->doormask & D_LOCKED && can_unlock) { @@ -1469,7 +1476,7 @@ postmov( Soundeffect(se_door_unlock_and_open, 50); if (flags.verbose) { if (canseeit && canspotmon(mtmp)) { - pline("%s unlocks and opens a door.", + pline_mon(mtmp, "%s unlocks and opens a door.", Monnam(mtmp)); } else if (canseeit) { You_see("a door unlock and open."); @@ -1487,7 +1494,7 @@ postmov( Soundeffect(se_door_open, 100); if (flags.verbose) { if (canseeit && canspotmon(mtmp)) { - pline("%s opens a door.", Monnam(mtmp)); + pline_mon(mtmp, "%s opens a door.", Monnam(mtmp)); } else if (canseeit) { You_see("a door open."); } else if (!Deaf) { @@ -1511,7 +1518,7 @@ postmov( Soundeffect(se_door_crash_open, 50); if (flags.verbose) { if (canseeit && canspotmon(mtmp)) { - pline("%s smashes down a door.", Monnam(mtmp)); + pline_mon(mtmp, "%s smashes down a door.", Monnam(mtmp)); } else if (canseeit) { You_see("a door crash open."); } else if (!Deaf) { @@ -1533,7 +1540,7 @@ postmov( && (dmgtype(ptr, AD_RUST) || dmgtype(ptr, AD_CORR) || metallivorous(ptr))) { if (canseemon(mtmp)) - pline("%s eats through the iron bars.", Monnam(mtmp)); + pline_mon(mtmp, "%s eats through the iron bars.", Monnam(mtmp)); dissolve_bars(mtmp->mx, mtmp->my); return MMOVE_DONE; } else if (flags.verbose && canseemon(mtmp))