U719: grayswandir and exploding black lights

<email deleted> wrote:
> When wielding greyswander and a black light explodes, the
> message is still "You are freaked by a blast of kaleidoscopic
> light!" giving no indication that you are immune to
> hallucination. Maybe something like "You see a blast of color,
> but seem unaffected" would be more appropriate?

return the changed status back to the caller from
make_hallucinated().
This commit is contained in:
nethack.allison
2003-10-29 13:03:23 +00:00
parent fec5392055
commit cdbe3b1d39
10 changed files with 19 additions and 15 deletions
+1
View File
@@ -82,6 +82,7 @@ allow Conflict-resistant monsters to respond to conflict attacks rather than
sitting there and taking the attacks until they die sitting there and taking the attacks until they die
prefer herbivorous stone-to-flesh message when hero is a vegitarian prefer herbivorous stone-to-flesh message when hero is a vegitarian
try even harder to avoid incorrect map display while changing levels try even harder to avoid incorrect map display while changing levels
no "freaked" message by exploding black light, unless you really are
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+1 -1
View File
@@ -1560,7 +1560,7 @@ E void FDECL(make_blinded, (long,BOOLEAN_P));
E void FDECL(make_sick, (long, const char *, BOOLEAN_P,int)); E void FDECL(make_sick, (long, const char *, BOOLEAN_P,int));
E void FDECL(make_slimed, (long,const char*)); E void FDECL(make_slimed, (long,const char*));
E void FDECL(make_vomiting, (long,BOOLEAN_P)); E void FDECL(make_vomiting, (long,BOOLEAN_P));
E void FDECL(make_hallucinated, (long,BOOLEAN_P,long)); E boolean FDECL(make_hallucinated, (long,BOOLEAN_P,long));
E int NDECL(dodrink); E int NDECL(dodrink);
E int FDECL(dopotion, (struct obj *)); E int FDECL(dopotion, (struct obj *));
E int FDECL(peffects, (struct obj *)); E int FDECL(peffects, (struct obj *));
+2 -2
View File
@@ -1470,7 +1470,7 @@ struct obj *obj;
break; break;
case 4: (void) adjattrib(rn2(A_MAX), -1, FALSE); case 4: (void) adjattrib(rn2(A_MAX), -1, FALSE);
break; break;
case 5: make_hallucinated(HHallucination + lcount, TRUE, 0L); case 5: (void) make_hallucinated(HHallucination + lcount, TRUE, 0L);
break; break;
} }
return; return;
@@ -1550,7 +1550,7 @@ struct obj *obj;
did_prop++; did_prop++;
break; break;
case prop2trbl(HALLUC): case prop2trbl(HALLUC):
make_hallucinated(0L, TRUE, 0L); (void) make_hallucinated(0L, TRUE, 0L);
did_prop++; did_prop++;
break; break;
case prop2trbl(VOMITING): case prop2trbl(VOMITING):
+1 -1
View File
@@ -408,7 +408,7 @@ long wp_mask;
* that can print a message--need to guard against being printed * that can print a message--need to guard against being printed
* when restoring a game * when restoring a game
*/ */
make_hallucinated((long)!on, restoring ? FALSE : TRUE, wp_mask); (void) make_hallucinated((long)!on, restoring ? FALSE : TRUE, wp_mask);
} }
if (spfx & SPFX_ESP) { if (spfx & SPFX_ESP) {
if(on) ETelepat |= wp_mask; if(on) ETelepat |= wp_mask;
+1 -1
View File
@@ -815,7 +815,7 @@ struct obj *obj;
} }
break; break;
case 4 : pline("%s your mind!", Tobjnam(obj, "zap")); case 4 : pline("%s your mind!", Tobjnam(obj, "zap"));
make_hallucinated(HHallucination + rnd(100),FALSE,0L); (void) make_hallucinated(HHallucination + rnd(100),FALSE,0L);
break; break;
case 5 : pline("%s!", Tobjnam(obj, "explode")); case 5 : pline("%s!", Tobjnam(obj, "explode"));
useup(obj); useup(obj);
+4 -2
View File
@@ -1869,9 +1869,11 @@ common:
u.umonnum == PM_VIOLET_FUNGUS || u.umonnum == PM_VIOLET_FUNGUS ||
dmgtype(youmonst.data, AD_STUN)); dmgtype(youmonst.data, AD_STUN));
if (!not_affected) { if (!not_affected) {
boolean chg;
if (!Hallucination) if (!Hallucination)
You("are freaked by a blast of kaleidoscopic light!"); You("are caught in a blast of kaleidoscopic light!");
make_hallucinated(HHallucination + (long)tmp,FALSE,0L); chg = make_hallucinated(HHallucination + (long)tmp,FALSE,0L);
You("%s.", chg ? "are freaked out" : "seem unaffected");
} }
break; break;
+6 -5
View File
@@ -247,7 +247,7 @@ boolean talk;
} }
} }
void boolean
make_hallucinated(xtime, talk, mask) make_hallucinated(xtime, talk, mask)
long xtime; /* nonzero if this is an attempt to turn on hallucination */ long xtime; /* nonzero if this is an attempt to turn on hallucination */
boolean talk; boolean talk;
@@ -305,6 +305,7 @@ long mask; /* nonzero if resistance status should change by mask */
context.botl = 1; context.botl = 1;
if (talk) pline(message, verb); if (talk) pline(message, verb);
} }
return changed;
} }
STATIC_OVL void STATIC_OVL void
@@ -450,7 +451,7 @@ peffects(otmp)
break; break;
case POT_HALLUCINATION: case POT_HALLUCINATION:
if (Hallucination || Halluc_resistance) nothing++; if (Hallucination || Halluc_resistance) nothing++;
make_hallucinated(itimeout_incr(HHallucination, (void) make_hallucinated(itimeout_incr(HHallucination,
rn1(200, 600 - 300 * bcsign(otmp))), rn1(200, 600 - 300 * bcsign(otmp))),
TRUE, 0L); TRUE, 0L);
break; break;
@@ -700,7 +701,7 @@ peffects(otmp)
} }
if(Hallucination) { if(Hallucination) {
You("are shocked back to your senses!"); You("are shocked back to your senses!");
make_hallucinated(0L,FALSE,0L); (void) make_hallucinated(0L,FALSE,0L);
} }
break; break;
case POT_CONFUSION: case POT_CONFUSION:
@@ -805,7 +806,7 @@ peffects(otmp)
healup(d(6 + 2 * bcsign(otmp), 8), healup(d(6 + 2 * bcsign(otmp), 8),
otmp->blessed ? 5 : !otmp->cursed ? 2 : 0, otmp->blessed ? 5 : !otmp->cursed ? 2 : 0,
!otmp->cursed, TRUE); !otmp->cursed, TRUE);
make_hallucinated(0L,TRUE,0L); (void) make_hallucinated(0L,TRUE,0L);
exercise(A_CON, TRUE); exercise(A_CON, TRUE);
exercise(A_STR, TRUE); exercise(A_STR, TRUE);
break; break;
@@ -819,7 +820,7 @@ peffects(otmp)
u.ulevelmax -= 1; u.ulevelmax -= 1;
pluslvl(FALSE); pluslvl(FALSE);
} }
make_hallucinated(0L,TRUE,0L); (void) make_hallucinated(0L,TRUE,0L);
exercise(A_STR, TRUE); exercise(A_STR, TRUE);
exercise(A_CON, TRUE); exercise(A_CON, TRUE);
break; break;
+1 -1
View File
@@ -440,7 +440,7 @@ decurse:
break; break;
case TROUBLE_HALLUCINATION: case TROUBLE_HALLUCINATION:
pline ("Looks like you are back in Kansas."); pline ("Looks like you are back in Kansas.");
make_hallucinated(0L,FALSE,0L); (void) make_hallucinated(0L,FALSE,0L);
break; break;
#ifdef STEED #ifdef STEED
case TROUBLE_SADDLE: case TROUBLE_SADDLE:
+1 -1
View File
@@ -304,7 +304,7 @@ nh_timeout()
break; break;
case HALLUC: case HALLUC:
HHallucination = 1; HHallucination = 1;
make_hallucinated(0L, TRUE, 0L); (void) make_hallucinated(0L, TRUE, 0L);
stop_occupation(); stop_occupation();
break; break;
case SLEEPING: case SLEEPING:
+1 -1
View File
@@ -3734,7 +3734,7 @@ boolean disarm;
stagger(youmonst.data, "stagger")); stagger(youmonst.data, "stagger"));
} }
make_stunned(HStun + rn1(7, 16),FALSE); make_stunned(HStun + rn1(7, 16),FALSE);
make_hallucinated(HHallucination + rn1(5, 16),FALSE,0L); (void) make_hallucinated(HHallucination + rn1(5, 16),FALSE,0L);
break; break;
default: impossible("bad chest trap"); default: impossible("bad chest trap");
break; break;