int
destroy_arm(register struct obj *atmp)
{
- register struct obj *otmp;
+ struct obj *otmp;
+ /*
+ * Note: if there were any artifact cloaks, the 90% chance of
+ * resistance here means that the cloak could survive and then
+ * the suit or shirt underneath could be destroyed. Likewise for
+ * artifact suit over a shirt. That would be a bug. Since there
+ * aren't any, we'll just look the other way.
+ */
#define DESTROY_ARM(o) \
((otmp = (o)) != 0 && (!atmp || atmp == otmp) \
&& (!obj_resists(otmp, 0, 90)) \
if (DESTROY_ARM(uarmc)) {
if (donning(otmp))
cancel_don();
- Your("%s crumbles and turns to dust!", cloak_simple_name(uarmc));
+ urgent_pline("Your %s crumbles and turns to dust!",
+ /* cloak/robe/apron/smock (ID'd apron)/wrapping */
+ cloak_simple_name(uarmc));
(void) Cloak_off();
useup(otmp);
} else if (DESTROY_ARM(uarm)) {
+ const char *suit = suit_simple_name(uarm);
+
if (donning(otmp))
cancel_don();
/* for gold DSM, we don't want Armor_gone() to report that it
stops shining _after_ we've been told that it is destroyed */
if (otmp->lamplit)
end_burn(otmp, FALSE);
- Your("armor turns to dust and falls to the %s!", surface(u.ux, u.uy));
+ urgent_pline("Your %s %s to dust and %s to the %s!",
+ /* suit might be "dragon scales" so vtense() is needed */
+ suit, vtense(suit, "turn"), vtense(suit, "fall"),
+ surface(u.ux, u.uy));
(void) Armor_gone();
useup(otmp);
} else if (DESTROY_ARM(uarmu)) {
if (donning(otmp))
cancel_don();
- Your("shirt crumbles into tiny threads and falls apart!");
+ urgent_pline("Your %s crumbles into tiny threads and falls apart!",
+ shirt_simple_name(uarmu)); /* always "shirt" */
(void) Shirt_off();
useup(otmp);
} else if (DESTROY_ARM(uarmh)) {
if (donning(otmp))
cancel_don();
- Your("%s turns to dust and is blown away!", helm_simple_name(uarmh));
+ urgent_pline("Your %s turns to dust and is blown away!",
+ helm_simple_name(uarmh)); /* "helm" or "hat" */
(void) Helmet_off();
useup(otmp);
} else if (DESTROY_ARM(uarmg)) {
if (donning(otmp))
cancel_don();
- Your("gloves vanish!");
+ urgent_pline("Your %s vanish!", gloves_simple_name(uarmg));
(void) Gloves_off();
useup(otmp);
selftouch("You");
} else if (DESTROY_ARM(uarmf)) {
if (donning(otmp))
cancel_don();
- Your("boots disintegrate!");
+ urgent_pline("Your %s disintegrate!", boots_simple_name(uarmf));
(void) Boots_off();
useup(otmp);
} else if (DESTROY_ARM(uarms)) {
if (donning(otmp))
cancel_don();
- Your("shield crumbles away!");
+ urgent_pline("Your %s crumbles away!", shield_simple_name(uarms));
(void) Shield_off();
useup(otmp);
} else {
* like horses for now :-)
*/
Strcpy(buf, mon_nam(u.usteed));
- pline("%s lunges forward and plucks you off %s!", Monnam(mtmp),
- buf);
+ urgent_pline("%s lunges forward and plucks you off %s!",
+ Monnam(mtmp), buf);
dismount_steed(DISMOUNT_ENGULFED);
} else {
- pline("%s engulfs you!", Monnam(mtmp));
+ urgent_pline("%s engulfs you!", Monnam(mtmp));
}
stop_occupation();
reset_occupations(); /* behave as if you had moved */
stop_occupation();
if (poly_when_stoned(g.youmonst.data) && polymon(PM_STONE_GOLEM))
break;
- You("turn to stone...");
+ urgent_pline("You turn to stone...");
g.killer.format = KILLED_BY;
Strcpy(g.killer.name, pmname(mtmp->data, Mgender(mtmp)));
done(STONING);
pline("%s fails to wrap around %s.", The_whip, the_weapon);
return 1;
}
- pline("%s wraps around %s you're wielding!", The_whip,
- the_weapon);
+ urgent_pline("%s wraps around %s you're wielding!", The_whip,
+ the_weapon);
if (welded(obj)) {
pline("%s welded to your %s%c",
!is_plural(obj) ? "It is" : "They are", hand,
register long i = (Strangled & TIMEOUT);
if (i > 0 && i <= SIZE(choke_texts)) {
- if (Breathless || !rn2(50))
+ if (Breathless || !rn2(50)) {
pline(choke_texts2[SIZE(choke_texts2) - i], body_part(NECK));
- else {
+ } else {
const char *str = choke_texts[SIZE(choke_texts) - i];
if (index(str, '%'))
if (i == 4L) { /* "you are turning green" */
if (!Blind) /* [what if you're already green?] */
pline(buf, hcolor(NH_GREEN));
- } else
+ } else {
pline(buf,
an(Hallucination ? rndmonnam(NULL) : "green slime"));
- } else
+ }
+ } else {
pline1(buf);
+ }
}
switch (i) {
Strcpy(slimebuf, "green slime has been genocided...");
if (iflags.last_msg == PLNMSG_OK_DONT_DIE)
/* follows "OK, so you don't die." and arg is second sentence */
- pline("Yes, you do. %s", upstart(slimebuf));
+ urgent_pline("Yes, you do. %s", upstart(slimebuf));
else
/* follows "The medallion crumbles to dust." */
- pline("Unfortunately, %s", slimebuf);
+ urgent_pline("Unfortunately, %s", slimebuf);
/* die again; no possibility of amulet this time */
done(GENOCIDED); /* [should it be done_timeout(GENOCIDED, SLIMED)?] */
/* could be life-saved again (only in explore or wizard mode)
make_vomiting(0L, TRUE);
break;
case SICK:
- /* You might be able to bounce back from food poisoning, but not
- * other forms of illness. */
+ /* hero might be able to bounce back from food poisoning,
+ but not other forms of illness */
if ((u.usick_type & SICK_NONVOMITABLE) == 0
&& rn2(100) < ACURR(A_CON)) {
You("have recovered from your illness.");
adjattrib(A_CON, -1, 1);
break;
}
- You("die from your illness.");
+ urgent_pline("You die from your illness.");
if (kptr && kptr->name[0]) {
g.killer.format = kptr->format;
Strcpy(g.killer.name, kptr->name);
}
void
-mhitm_ad_drin(struct monst *magr, struct attack *mattk, struct monst *mdef,
- struct mhitm_data *mhm)
+mhitm_ad_drin(
+ struct monst *magr, struct attack *mattk,
+ struct monst *mdef, struct mhitm_data *mhm)
{
struct permonst *pd = mdef->data;
}
void
-mhitm_ad_stck(struct monst *magr, struct attack *mattk, struct monst *mdef,
- struct mhitm_data *mhm)
+mhitm_ad_stck(
+ struct monst *magr, struct attack *mattk,
+ struct monst *mdef, struct mhitm_data *mhm)
{
struct permonst *pd = mdef->data;
mhm->damage = 0;
} else {
set_ustuck(magr); /* before message, for botl update */
- pline("%s swings itself around you!", Monnam(magr));
+ urgent_pline("%s swings itself around you!",
+ Monnam(magr));
}
} else if (u.ustuck == magr) {
if (is_pool(magr->mx, magr->my) && !Swimming && !Amphibious) {
&& !Is_medusa_level(&u.uz)
&& !Is_waterlevel(&u.uz);
- pline("%s drowns you...", Monnam(magr));
+ urgent_pline("%s drowns you...", Monnam(magr));
g.killer.format = KILLED_BY_AN;
Sprintf(g.killer.name, "%s by %s",
moat ? "moat" : "pool of water",