MCPcopy Create free account
hub / github.com/NetHack/NetHack / peffect_hallucination

Function peffect_hallucination

src/potion.c:695–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695staticfn void
696peffect_hallucination(struct obj *otmp)
697{
698 if (Halluc_resistance) {
699 gp.potion_nothing++;
700 return;
701 } else if (Hallucination) {
702 gp.potion_nothing++;
703 }
704 (void) make_hallucinated(itimeout_incr(HHallucination,
705 rn1(200, 600 - 300 * bcsign(otmp))),
706 TRUE, 0L);
707 if ((otmp->blessed && !rn2(3)) || (!otmp->cursed && !rn2(6))) {
708 You("perceive yourself...");
709 display_nhwindow(WIN_MESSAGE, FALSE);
710 enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
711 Your("awareness re-normalizes.");
712 exercise(A_WIS, TRUE);
713 }
714}
715
716staticfn void
717peffect_water(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 8

make_hallucinatedFunction · 0.85
itimeout_incrFunction · 0.85
bcsignFunction · 0.85
rn2Function · 0.85
YouFunction · 0.85
enlightenmentFunction · 0.85
YourFunction · 0.85
exerciseFunction · 0.85

Tested by

no test coverage detected