seffect_confuse_monster(struct obj **sobjp)
{
struct obj *sobj = *sobjp;
- boolean sblessed = sobj->blessed;
- boolean scursed = sobj->cursed;
- boolean confused = (Confusion != 0);
+ boolean sblessed = sobj->blessed,
+ scursed = sobj->cursed,
+ confused = (Confusion != 0),
+ altfeedback = (Blind || Invisible);
if (g.youmonst.data->mlet != S_HUMAN || scursed) {
if (!HConfusion)
} else if (confused) {
if (!sblessed) {
Your("%s begin to %s%s.", makeplural(body_part(HAND)),
- Blind ? "tingle" : "glow ",
- Blind ? "" : hcolor(NH_PURPLE));
+ altfeedback ? "tingle" : "glow ",
+ altfeedback ? "" : hcolor(NH_PURPLE));
make_confused(HConfusion + rnd(100), FALSE);
} else {
pline("A %s%s surrounds your %s.",
- Blind ? "" : hcolor(NH_RED),
- Blind ? "faint buzz" : " glow", body_part(HEAD));
+ altfeedback ? "" : hcolor(NH_RED),
+ altfeedback ? "faint buzz" : " glow", body_part(HEAD));
make_confused(0L, TRUE);
}
} else {
+ int incr = 0;
+
if (!sblessed) {
Your("%s%s %s%s.", makeplural(body_part(HAND)),
- Blind ? "" : " begin to glow",
- Blind ? (const char *) "tingle" : hcolor(NH_RED),
+ altfeedback ? "" : " begin to glow",
+ altfeedback ? (const char *) "tingle" : hcolor(NH_RED),
u.umconf ? " even more" : "");
- u.umconf++;
+ incr = rnd(2);
} else {
- if (Blind)
+ if (altfeedback)
Your("%s tingle %s sharply.", makeplural(body_part(HAND)),
u.umconf ? "even more" : "very");
else
- Your("%s glow a%s brilliant %s.",
+ Your("%s glow %s brilliant %s.",
makeplural(body_part(HAND)),
- u.umconf ? "n even more" : "", hcolor(NH_RED));
- /* after a while, repeated uses become less effective */
- if (u.umconf >= 40)
- u.umconf++;
- else
- u.umconf += rn1(8, 2);
+ u.umconf ? "an even more" : "a", hcolor(NH_RED));
+ incr = rn1(8, 2);
}
+ /* after a while, repeated uses become less effective */
+ if (u.umconf >= 40)
+ incr = 1;
+ u.umconf += (unsigned) incr;
}
}
static void
nohandglow(struct monst *mon)
{
- char *hands = makeplural(body_part(HAND));
+ char *hands;
+ boolean altfeedback;
if (!u.umconf || mon->mconf)
return;
+
+ hands = makeplural(body_part(HAND));
+ altfeedback = (Blind || Invisible); /* Invisible == Invis && !See_invis */
if (u.umconf == 1) {
- if (Blind)
+ if (altfeedback)
Your("%s stop tingling.", hands);
else
Your("%s stop glowing %s.", hands, hcolor(NH_RED));
} else {
- if (Blind)
+ if (altfeedback)
pline_The("tingling in your %s lessens.", hands);
else
Your("%s no longer glow so brightly %s.", hands, hcolor(NH_RED));