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

Function peffect_booze

src/potion.c:770–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770staticfn void
771peffect_booze(struct obj *otmp)
772{
773 gp.potion_unkn++;
774 pline("Ooph! This tastes like %s%s!",
775 otmp->odiluted ? "watered down " : "",
776 Hallucination ? "dandelion wine" : "liquid fire");
777 if (!otmp->blessed) {
778 /* booze hits harder if drinking on an empty stomach */
779 make_confused(itimeout_incr(HConfusion, d(2 + u.uhs, 8)), FALSE);
780 }
781 /* the whiskey makes us feel better */
782 if (!otmp->odiluted)
783 healup(1, 0, FALSE, FALSE);
784 u.uhunger += 10 * (2 + bcsign(otmp));
785 newuhs(FALSE);
786 exercise(A_WIS, FALSE);
787 if (otmp->cursed) {
788 You("pass out.");
789 gm.multi = -rnd(15);
790 gn.nomovemsg = "You awake with a headache.";
791 }
792}
793
794staticfn void
795peffect_enlightenment(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 10

make_confusedFunction · 0.85
itimeout_incrFunction · 0.85
dFunction · 0.85
healupFunction · 0.85
bcsignFunction · 0.85
newuhsFunction · 0.85
exerciseFunction · 0.85
YouFunction · 0.85
rndFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected