more urgent_pline()'s

countdown messages for turning to stone or slime or being strangled
drowning
burning in lava
feeling feverish
changing form
This commit is contained in:
PatR
2021-12-22 18:29:01 -08:00
parent 69906f0edb
commit 75fe21d00f
5 changed files with 34 additions and 29 deletions
+6 -5
View File
@@ -198,7 +198,7 @@ polyman(const char *fmt, const char *arg)
newsym(u.ux, u.uy); newsym(u.ux, u.uy);
You(fmt, arg); urgent_pline(fmt, arg);
/* check whether player foolishly genocided self while poly'd */ /* check whether player foolishly genocided self while poly'd */
if (ugenocided()) { if (ugenocided()) {
/* intervening activity might have clobbered genocide info */ /* intervening activity might have clobbered genocide info */
@@ -363,7 +363,8 @@ newman(void)
u.uhp = 1; u.uhp = 1;
} else { } else {
dead: /* we come directly here if experience level went to 0 or less */ dead: /* we come directly here if experience level went to 0 or less */
Your("new form doesn't seem healthy enough to survive."); urgent_pline(
"Your new form doesn't seem healthy enough to survive.");
g.killer.format = KILLED_BY_AN; g.killer.format = KILLED_BY_AN;
Strcpy(g.killer.name, "unsuccessful polymorph"); Strcpy(g.killer.name, "unsuccessful polymorph");
done(DIED); done(DIED);
@@ -374,7 +375,7 @@ newman(void)
} }
} }
newuhs(FALSE); newuhs(FALSE);
polyman("feel like a new %s!", polyman("You feel like a new %s!",
/* use saved gender we're about to revert to, not current */ /* use saved gender we're about to revert to, not current */
((Upolyd ? u.mfemale : flags.female) && g.urace.individual.f) ((Upolyd ? u.mfemale : flags.female) && g.urace.individual.f)
? g.urace.individual.f ? g.urace.individual.f
@@ -1155,7 +1156,7 @@ rehumanize(void)
if (emits_light(g.youmonst.data)) if (emits_light(g.youmonst.data))
del_light_source(LS_MONSTER, monst_to_any(&g.youmonst)); del_light_source(LS_MONSTER, monst_to_any(&g.youmonst));
polyman("return to %s form!", g.urace.adj); polyman("You return to %s form!", g.urace.adj);
if (u.uhp < 1) { if (u.uhp < 1) {
/* can only happen if some bit of code reduces u.uhp /* can only happen if some bit of code reduces u.uhp
@@ -1516,7 +1517,7 @@ dogaze(void)
pline("Gazing at the awake %s is not a very good idea.", pline("Gazing at the awake %s is not a very good idea.",
l_monnam(mtmp)); l_monnam(mtmp));
/* as if gazing at a sleeping anything is fruitful... */ /* as if gazing at a sleeping anything is fruitful... */
You("turn to stone..."); urgent_pline("You turn to stone...");
g.killer.format = KILLED_BY; g.killer.format = KILLED_BY;
Strcpy(g.killer.name, Strcpy(g.killer.name,
"deliberately meeting Medusa's gaze"); "deliberately meeting Medusa's gaze");
+13 -12
View File
@@ -114,7 +114,7 @@ static NEARDATA const char *const stoned_texts[] = {
static void static void
stoned_dialogue(void) stoned_dialogue(void)
{ {
register long i = (Stoned & TIMEOUT); long i = (Stoned & TIMEOUT);
if (i > 0L && i <= SIZE(stoned_texts)) { if (i > 0L && i <= SIZE(stoned_texts)) {
char buf[BUFSZ]; char buf[BUFSZ];
@@ -122,7 +122,7 @@ stoned_dialogue(void)
Strcpy(buf, stoned_texts[SIZE(stoned_texts) - i]); Strcpy(buf, stoned_texts[SIZE(stoned_texts) - i]);
if (nolimbs(g.youmonst.data) && strstri(buf, "limbs")) if (nolimbs(g.youmonst.data) && strstri(buf, "limbs"))
(void) strsubst(buf, "limbs", "extremities"); (void) strsubst(buf, "limbs", "extremities");
pline1(buf); urgent_pline("%s", buf);
} }
switch ((int) i) { switch ((int) i) {
case 5: /* slowing down */ case 5: /* slowing down */
@@ -260,18 +260,19 @@ static NEARDATA const char *const choke_texts2[] = {
static void static void
choke_dialogue(void) choke_dialogue(void)
{ {
register long i = (Strangled & TIMEOUT); long i = (Strangled & TIMEOUT);
if (i > 0 && i <= SIZE(choke_texts)) { 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)); urgent_pline(choke_texts2[SIZE(choke_texts2) - i],
body_part(NECK));
} else { } else {
const char *str = choke_texts[SIZE(choke_texts) - i]; const char *str = choke_texts[SIZE(choke_texts) - i];
if (index(str, '%')) if (index(str, '%'))
pline(str, hcolor(NH_BLUE)); urgent_pline(str, hcolor(NH_BLUE));
else else
pline1(str); urgent_pline("%s", str);
} }
} }
exercise(A_STR, FALSE); exercise(A_STR, FALSE);
@@ -302,8 +303,8 @@ levitation_dialogue(void)
boolean danger = (is_pool_or_lava(u.ux, u.uy) boolean danger = (is_pool_or_lava(u.ux, u.uy)
&& !Is_waterlevel(&u.uz)); && !Is_waterlevel(&u.uz));
pline(s, danger ? "over" : "in", urgent_pline(s, danger ? "over" : "in",
danger ? surface(u.ux, u.uy) : "air"); danger ? surface(u.ux, u.uy) : "air");
} else } else
pline1(s); pline1(s);
} }
@@ -343,13 +344,13 @@ slime_dialogue(void)
if (index(buf, '%')) { if (index(buf, '%')) {
if (i == 4L) { /* "you are turning green" */ if (i == 4L) { /* "you are turning green" */
if (!Blind) /* [what if you're already green?] */ if (!Blind) /* [what if you're already green?] */
pline(buf, hcolor(NH_GREEN)); urgent_pline(buf, hcolor(NH_GREEN));
} else { } else {
pline(buf, urgent_pline(buf, an(Hallucination ? rndmonnam(NULL)
an(Hallucination ? rndmonnam(NULL) : "green slime")); : "green slime"));
} }
} else { } else {
pline1(buf); urgent_pline("%s", buf);
} }
} }
+5 -4
View File
@@ -3134,7 +3134,7 @@ instapetrify(const char *str)
return; return;
if (poly_when_stoned(g.youmonst.data) && polymon(PM_STONE_GOLEM)) if (poly_when_stoned(g.youmonst.data) && polymon(PM_STONE_GOLEM))
return; return;
You("turn to stone..."); urgent_pline("You turn to stone...");
g.killer.format = KILLED_BY; g.killer.format = KILLED_BY;
if (str != g.killer.name) if (str != g.killer.name)
Strcpy(g.killer.name, str ? str : ""); Strcpy(g.killer.name, str ? str : "");
@@ -4299,7 +4299,7 @@ drown(void)
pline("But in vain."); pline("But in vain.");
} }
set_uinwater(1); /* u.uinwater = 1 */ set_uinwater(1); /* u.uinwater = 1 */
You("drown."); urgent_pline("You drown.");
for (i = 0; i < 5; i++) { /* arbitrary number of loops */ for (i = 0; i < 5; i++) { /* arbitrary number of loops */
/* killer format and name are reconstructed every iteration /* killer format and name are reconstructed every iteration
because lifesaving resets them */ because lifesaving resets them */
@@ -5803,7 +5803,8 @@ lava_effects(void)
because lifesaving resets them */ because lifesaving resets them */
g.killer.format = KILLED_BY; g.killer.format = KILLED_BY;
Strcpy(g.killer.name, lava_killer); Strcpy(g.killer.name, lava_killer);
You("%s...", boil_away ? "boil away" : "burn to a crisp"); urgent_pline("You %s...", boil_away ? "boil away"
: "burn to a crisp");
done(BURNING); done(BURNING);
if (safe_teleds(TELEDS_ALLOW_DRAG | TELEDS_TELEPORT)) if (safe_teleds(TELEDS_ALLOW_DRAG | TELEDS_TELEPORT))
break; /* successful life-save */ break; /* successful life-save */
@@ -5862,7 +5863,7 @@ sink_into_lava(void)
if (u.utrap < (1 << 8)) { if (u.utrap < (1 << 8)) {
g.killer.format = KILLED_BY; g.killer.format = KILLED_BY;
Strcpy(g.killer.name, "molten lava"); Strcpy(g.killer.name, "molten lava");
You("sink below the surface and die."); urgent_pline("You sink below the surface and die.");
burn_away_slime(); /* add insult to injury? */ burn_away_slime(); /* add insult to injury? */
done(DISSOLVED); done(DISSOLVED);
/* can only get here via life-saving; try to get away from lava */ /* can only get here via life-saving; try to get away from lava */
+4 -3
View File
@@ -3613,8 +3613,9 @@ mhitm_ad_ston(struct monst *magr, struct attack *mattk, struct monst *mdef,
} }
void void
mhitm_ad_were(struct monst *magr, struct attack *mattk, struct monst *mdef, mhitm_ad_were(
struct mhitm_data *mhm) struct monst *magr, struct attack *mattk,
struct monst *mdef, struct mhitm_data *mhm)
{ {
struct permonst *pa = magr->data; struct permonst *pa = magr->data;
@@ -3631,7 +3632,7 @@ mhitm_ad_were(struct monst *magr, struct attack *mattk, struct monst *mdef,
hitmsg(magr, mattk); hitmsg(magr, mattk);
if (uncancelled && !rn2(4) && u.ulycn == NON_PM if (uncancelled && !rn2(4) && u.ulycn == NON_PM
&& !Protection_from_shape_changers && !defends(AD_WERE, uwep)) { && !Protection_from_shape_changers && !defends(AD_WERE, uwep)) {
You_feel("feverish."); urgent_pline("You feel feverish.");
exercise(A_CON, FALSE); exercise(A_CON, FALSE);
set_ulycn(monsndx(pa)); set_ulycn(monsndx(pa));
retouch_equipment(2); retouch_equipment(2);
+6 -5
View File
@@ -91,7 +91,7 @@ were_beastie(int pm)
void void
new_were(struct monst *mon) new_were(struct monst *mon)
{ {
register int pm; int pm;
pm = counter_were(monsndx(mon->data)); pm = counter_were(monsndx(mon->data));
if (pm < LOW_PM) { if (pm < LOW_PM) {
@@ -121,10 +121,11 @@ new_were(struct monst *mon)
/* were-creature (even you) summons a horde */ /* were-creature (even you) summons a horde */
int int
were_summon(struct permonst *ptr, were_summon(
boolean yours, struct permonst *ptr,
int *visible, /* number of visible helpers created */ boolean yours,
char *genbuf) int *visible, /* number of visible helpers created */
char *genbuf)
{ {
int i, typ, pm = monsndx(ptr); int i, typ, pm = monsndx(ptr);
struct monst *mtmp; struct monst *mtmp;