From 7fa38eb7b3cd9874b4c5fe3c853775011ef88f3f Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 14 Dec 2024 15:20:14 +0200 Subject: [PATCH] Use pline_mon instead of pline_xy Forgot about this function. Whoops. --- src/dog.c | 18 ++++++++---------- src/dogmove.c | 14 ++++++-------- src/mon.c | 2 +- src/mthrowu.c | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/dog.c b/src/dog.c index 6c7849f0b..53d3aea66 100644 --- a/src/dog.c +++ b/src/dog.c @@ -791,8 +791,7 @@ keepdogs( mdrop_special_objs(mtmp); /* drop Amulet */ } else if (mtmp->meating || mtmp->mtrapped) { if (canseemon(mtmp)) - pline_xy(mtmp->mx, mtmp->my, - "%s is still %s.", Monnam(mtmp), + pline_mon(mtmp, "%s is still %s.", Monnam(mtmp), mtmp->meating ? "eating" : "trapped"); stay_behind = TRUE; } else if (mon_has_amulet(mtmp)) { @@ -1128,7 +1127,7 @@ tamedog( /* worst case, at least it'll be peaceful. */ if (givemsg && !mtmp->mpeaceful && canspotmon(mtmp)) { - pline_xy(mtmp->mx, mtmp->my, "%s seems %s.", Monnam(mtmp), + pline_mon(mtmp, "%s seems %s.", Monnam(mtmp), Hallucination ? "really chill" : "more amiable"); givemsg = FALSE; /* don't give another message below */ } @@ -1163,8 +1162,8 @@ tamedog( boolean big_corpse = (obj->otyp == CORPSE && ismnum(obj->corpsenm) && mons[obj->corpsenm].msize > mtmp->data->msize); - pline_xy(mtmp->mx, mtmp->my, - "%s catches %s%s", Monnam(mtmp), the(xname(obj)), + pline_mon(mtmp, "%s catches %s%s", + Monnam(mtmp), the(xname(obj)), !big_corpse ? "." : ", or vice versa!"); } else if (cansee(mtmp->mx, mtmp->my)) pline("%s.", Tobjnam(obj, "stop")); @@ -1225,7 +1224,7 @@ tamedog( } if (givemsg && canspotmon(mtmp)) - pline_xy(mtmp->mx, mtmp->my, "%s seems quite %s.", Monnam(mtmp), + pline_mon(mtmp, "%s seems quite %s.", Monnam(mtmp), Hallucination ? "approachable" : "friendly"); newsym(mtmp->mx, mtmp->my); @@ -1272,13 +1271,12 @@ wary_dog(struct monst *mtmp, boolean was_dead) if (!quietly && cansee(mtmp->mx, mtmp->my)) { if (haseyes(gy.youmonst.data)) { if (haseyes(mtmp->data)) - pline_xy(mtmp->mx, mtmp->my, + pline_mon(mtmp, "%s %s to look you in the %s.", Monnam(mtmp), mtmp->mpeaceful ? "seems unable" : "refuses", body_part(EYE)); else - pline_xy(mtmp->mx, mtmp->my, - "%s avoids your gaze.", Monnam(mtmp)); + pline_mon(mtmp, "%s avoids your gaze.", Monnam(mtmp)); } } } else { @@ -1290,7 +1288,7 @@ wary_dog(struct monst *mtmp, boolean was_dead) if (!mtmp->mtame) { if (!quietly && canspotmon(mtmp)) - pline_xy(mtmp->mx, mtmp->my, "%s %s.", Monnam(mtmp), + pline_mon(mtmp, "%s %s.", Monnam(mtmp), mtmp->mpeaceful ? "is no longer tame" : "has become feral"); newsym(mtmp->mx, mtmp->my); /* a life-saved monster might be leashed; diff --git a/src/dogmove.c b/src/dogmove.c index a6ff8bce0..b0fe44864 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -283,9 +283,9 @@ dog_eat(struct monst *mtmp, result won't be printed */ obj_name = distant_name(obj, doname); if (tunnels(mtmp->data)) - pline_xy(mtmp->mx, mtmp->my, "%s digs in.", noit_Monnam(mtmp)); + pline_mon(mtmp, "%s digs in.", noit_Monnam(mtmp)); else - pline_xy(mtmp->mx, mtmp->my, "%s %s %s.", noit_Monnam(mtmp), + pline_mon(mtmp, "%s %s %s.", noit_Monnam(mtmp), devour ? "devours" : "eats", obj_name); } else if (seeobj) { obj_name = distant_name(obj, doname); @@ -335,7 +335,7 @@ dog_starve(struct monst *mtmp) if (mtmp->mleashed && mtmp != u.usteed) Your("leash goes slack."); else if (cansee(mtmp->mx, mtmp->my)) - pline_xy(mtmp->mx, mtmp->my, "%s starves.", Monnam(mtmp)); + pline_mon(mtmp, "%s starves.", Monnam(mtmp)); else You_feel("%s for a moment.", Hallucination ? "bummed" : "sad"); @@ -363,8 +363,7 @@ dog_hunger(struct monst *mtmp, struct edog *edog) return TRUE; } if (cansee(mtmp->mx, mtmp->my)) - pline_xy(mtmp->mx, mtmp->my, - "%s is confused from hunger.", Monnam(mtmp)); + pline_mon(mtmp, "%s is confused from hunger.", Monnam(mtmp)); else if (couldsee(mtmp->mx, mtmp->my)) beg(mtmp); else @@ -1264,7 +1263,7 @@ dog_move( if (info[chi] & ALLOW_U) { if (mtmp->mleashed) { /* play it safe */ - pline_xy(mtmp->mx, mtmp->my, "%s breaks loose of %s leash!", + pline_mon(mtmp, "%s breaks loose of %s leash!", Monnam(mtmp), mhis(mtmp)); m_unleash(mtmp, FALSE); } @@ -1289,8 +1288,7 @@ dog_move( ? vobj_at(nix, niy) : 0; const char *what = o ? distant_name(o, doname) : something; - pline_xy(mtmp->mx, mtmp->my, "%s %s reluctantly %s %s.", - noit_Monnam(mtmp), + pline_mon(mtmp, "%s %s reluctantly %s %s.", noit_Monnam(mtmp), vtense((char *) 0, locomotion(mtmp->data, "step")), (is_flyer(mtmp->data) || is_floater(mtmp->data)) ? "over" : "onto", diff --git a/src/mon.c b/src/mon.c index cf77dd8c6..7a381420b 100644 --- a/src/mon.c +++ b/src/mon.c @@ -5846,7 +5846,7 @@ shieldeff_mon(struct monst *mtmp) shieldeff(mtmp->mx, mtmp->my); /* does not depend on seeing the monster; the shield effect is visible */ if (cansee(mtmp->mx, mtmp->my)) - pline_xy(mtmp->mx, mtmp->my, "%s resists!", Monnam(mtmp)); + pline_mon(mtmp, "%s resists!", Monnam(mtmp)); } /*mon.c*/ diff --git a/src/mthrowu.c b/src/mthrowu.c index 5c41ea428..1d3e749ef 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1026,7 +1026,7 @@ thrwmu(struct monst *mtmp) if (canseemon(mtmp)) { onm = xname(otmp); - pline_xy(mtmp->mx, mtmp->my, "%s %s %s.", Monnam(mtmp), + pline_mon(mtmp, "%s %s %s.", Monnam(mtmp), /* "thrusts" or "swings", or "bashes with" if adjacent */ mswings_verb(otmp, (rang <= 2) ? TRUE : FALSE), obj_is_pname(otmp) ? the(onm) : an(onm));