simplify issuing urgent messages

Change
 custompline(URGENT_MESSAGE, mesg, ...);
calls to new
 urgent_pline(mesg, ...);
This commit is contained in:
PatR
2021-12-20 08:30:48 -08:00
parent aaed434d46
commit 2278434228
8 changed files with 51 additions and 36 deletions
+17 -20
View File
@@ -428,23 +428,21 @@ steal(struct monst* mtmp, char* objnambuf)
unmul((char *) 0);
slowly = (armordelay >= 1 || g.multi < 0);
if (flags.female)
custompline(URGENT_MESSAGE,
"%s charms you. You gladly %s your %s.",
!seen ? "She" : Monnam(mtmp),
curssv ? "let her take"
: !slowly ? "hand over"
: was_doffing ? "continue removing"
: "start removing",
equipname(otmp));
urgent_pline("%s charms you. You gladly %s your %s.",
!seen ? "She" : Monnam(mtmp),
curssv ? "let her take"
: !slowly ? "hand over"
: was_doffing ? "continue removing"
: "start removing",
equipname(otmp));
else
custompline(URGENT_MESSAGE,
"%s seduces you and %s off your %s.",
!seen ? "She" : Adjmonnam(mtmp, "beautiful"),
curssv ? "helps you to take"
: !slowly ? "you take"
: was_doffing ? "you continue taking"
: "you start taking",
equipname(otmp));
urgent_pline("%s seduces you and %s off your %s.",
!seen ? "She" : Adjmonnam(mtmp, "beautiful"),
curssv ? "helps you to take"
: !slowly ? "you take"
: was_doffing ? "you continue taking"
: "you start taking",
equipname(otmp));
named++;
/* the following is to set multi for later on */
nomul(-armordelay);
@@ -479,10 +477,9 @@ steal(struct monst* mtmp, char* objnambuf)
subfrombill(otmp, shop_keeper(*u.ushops));
freeinv(otmp);
/* if attached ball was taken, uball and uchain are now Null */
custompline(URGENT_MESSAGE,
"%s%s stole %s.", named ? "She" : Monnam(mtmp),
(was_punished && !Punished) ? " removed your chain and" : "",
doname(otmp));
urgent_pline("%s%s stole %s.", named ? "She" : Monnam(mtmp),
(was_punished && !Punished) ? " removed your chain and" : "",
doname(otmp));
could_petrify = (otmp->otyp == CORPSE
&& touch_petrifies(&mons[otmp->corpsenm]));
(void) mpickobj(mtmp, otmp); /* may free otmp */