github issue #828 - confuse monster effect when \
hero is invisible without being able to see invisible Issue reported by EndHack: you could see your hands glow red when reading a scroll of confuse monster or casting the spell of confuse monster even if you were unable to see yourself. Switch to the blind feedback (tingling instead of glowing red) if invisible without see invisible. Also, have uncursed scroll or low skilled spell confer 1..2 turns of glowing hands instead of always just 1. (Blessed/highly skilled stays at 2..9 turns.) Fixes #828
This commit is contained in:
@@ -981,6 +981,8 @@ allow cutting a known spider web with wielded weapon by force-fighting the web
|
|||||||
holes and trapdoors have a fixed exit level
|
holes and trapdoors have a fixed exit level
|
||||||
recent changes to losedogs() could result in an infinite loop when migrating
|
recent changes to losedogs() could result in an infinite loop when migrating
|
||||||
monsters try to arrive as hero moves to a different level
|
monsters try to arrive as hero moves to a different level
|
||||||
|
when invisible without see invisible you could see your hands glowing red
|
||||||
|
after reading a scroll of confuse monster and delivering melee hits
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
39
src/read.c
39
src/read.c
@@ -1273,9 +1273,10 @@ static void
|
|||||||
seffect_confuse_monster(struct obj **sobjp)
|
seffect_confuse_monster(struct obj **sobjp)
|
||||||
{
|
{
|
||||||
struct obj *sobj = *sobjp;
|
struct obj *sobj = *sobjp;
|
||||||
boolean sblessed = sobj->blessed;
|
boolean sblessed = sobj->blessed,
|
||||||
boolean scursed = sobj->cursed;
|
scursed = sobj->cursed,
|
||||||
boolean confused = (Confusion != 0);
|
confused = (Confusion != 0),
|
||||||
|
altfeedback = (Blind || Invisible);
|
||||||
|
|
||||||
if (g.youmonst.data->mlet != S_HUMAN || scursed) {
|
if (g.youmonst.data->mlet != S_HUMAN || scursed) {
|
||||||
if (!HConfusion)
|
if (!HConfusion)
|
||||||
@@ -1284,36 +1285,38 @@ seffect_confuse_monster(struct obj **sobjp)
|
|||||||
} else if (confused) {
|
} else if (confused) {
|
||||||
if (!sblessed) {
|
if (!sblessed) {
|
||||||
Your("%s begin to %s%s.", makeplural(body_part(HAND)),
|
Your("%s begin to %s%s.", makeplural(body_part(HAND)),
|
||||||
Blind ? "tingle" : "glow ",
|
altfeedback ? "tingle" : "glow ",
|
||||||
Blind ? "" : hcolor(NH_PURPLE));
|
altfeedback ? "" : hcolor(NH_PURPLE));
|
||||||
make_confused(HConfusion + rnd(100), FALSE);
|
make_confused(HConfusion + rnd(100), FALSE);
|
||||||
} else {
|
} else {
|
||||||
pline("A %s%s surrounds your %s.",
|
pline("A %s%s surrounds your %s.",
|
||||||
Blind ? "" : hcolor(NH_RED),
|
altfeedback ? "" : hcolor(NH_RED),
|
||||||
Blind ? "faint buzz" : " glow", body_part(HEAD));
|
altfeedback ? "faint buzz" : " glow", body_part(HEAD));
|
||||||
make_confused(0L, TRUE);
|
make_confused(0L, TRUE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
int incr = 0;
|
||||||
|
|
||||||
if (!sblessed) {
|
if (!sblessed) {
|
||||||
Your("%s%s %s%s.", makeplural(body_part(HAND)),
|
Your("%s%s %s%s.", makeplural(body_part(HAND)),
|
||||||
Blind ? "" : " begin to glow",
|
altfeedback ? "" : " begin to glow",
|
||||||
Blind ? (const char *) "tingle" : hcolor(NH_RED),
|
altfeedback ? (const char *) "tingle" : hcolor(NH_RED),
|
||||||
u.umconf ? " even more" : "");
|
u.umconf ? " even more" : "");
|
||||||
u.umconf++;
|
incr = rnd(2);
|
||||||
} else {
|
} else {
|
||||||
if (Blind)
|
if (altfeedback)
|
||||||
Your("%s tingle %s sharply.", makeplural(body_part(HAND)),
|
Your("%s tingle %s sharply.", makeplural(body_part(HAND)),
|
||||||
u.umconf ? "even more" : "very");
|
u.umconf ? "even more" : "very");
|
||||||
else
|
else
|
||||||
Your("%s glow a%s brilliant %s.",
|
Your("%s glow %s brilliant %s.",
|
||||||
makeplural(body_part(HAND)),
|
makeplural(body_part(HAND)),
|
||||||
u.umconf ? "n even more" : "", hcolor(NH_RED));
|
u.umconf ? "an even more" : "a", hcolor(NH_RED));
|
||||||
/* after a while, repeated uses become less effective */
|
incr = rn1(8, 2);
|
||||||
if (u.umconf >= 40)
|
|
||||||
u.umconf++;
|
|
||||||
else
|
|
||||||
u.umconf += rn1(8, 2);
|
|
||||||
}
|
}
|
||||||
|
/* after a while, repeated uses become less effective */
|
||||||
|
if (u.umconf >= 40)
|
||||||
|
incr = 1;
|
||||||
|
u.umconf += (unsigned) incr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
src/uhitm.c
10
src/uhitm.c
@@ -5435,17 +5435,21 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
|||||||
static void
|
static void
|
||||||
nohandglow(struct monst *mon)
|
nohandglow(struct monst *mon)
|
||||||
{
|
{
|
||||||
char *hands = makeplural(body_part(HAND));
|
char *hands;
|
||||||
|
boolean altfeedback;
|
||||||
|
|
||||||
if (!u.umconf || mon->mconf)
|
if (!u.umconf || mon->mconf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
hands = makeplural(body_part(HAND));
|
||||||
|
altfeedback = (Blind || Invisible); /* Invisible == Invis && !See_invis */
|
||||||
if (u.umconf == 1) {
|
if (u.umconf == 1) {
|
||||||
if (Blind)
|
if (altfeedback)
|
||||||
Your("%s stop tingling.", hands);
|
Your("%s stop tingling.", hands);
|
||||||
else
|
else
|
||||||
Your("%s stop glowing %s.", hands, hcolor(NH_RED));
|
Your("%s stop glowing %s.", hands, hcolor(NH_RED));
|
||||||
} else {
|
} else {
|
||||||
if (Blind)
|
if (altfeedback)
|
||||||
pline_The("tingling in your %s lessens.", hands);
|
pline_The("tingling in your %s lessens.", hands);
|
||||||
else
|
else
|
||||||
Your("%s no longer glow so brightly %s.", hands, hcolor(NH_RED));
|
Your("%s no longer glow so brightly %s.", hands, hcolor(NH_RED));
|
||||||
|
|||||||
Reference in New Issue
Block a user