MCPcopy Index your code
hub / github.com/NetHack/NetHack / peffect_water

Function peffect_water

src/potion.c:716–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716staticfn void
717peffect_water(struct obj *otmp)
718{
719 if (!otmp->blessed && !otmp->cursed) {
720 pline("This tastes like %s.", hliquid("water"));
721 u.uhunger += rnd(10);
722 newuhs(FALSE);
723 return;
724 }
725 gp.potion_unkn++;
726 if (mon_hates_blessings(&gy.youmonst) /* undead or demon */
727 || u.ualign.type == A_CHAOTIC) {
728 if (otmp->blessed) {
729 pline("This burns like %s!", hliquid("acid"));
730 exercise(A_CON, FALSE);
731 if (ismnum(u.ulycn)) {
732 Your("affinity to %s disappears!",
733 makeplural(mons[u.ulycn].pmnames[NEUTRAL]));
734 if (gy.youmonst.data == &mons[u.ulycn])
735 you_unwere(FALSE);
736 set_ulycn(NON_PM); /* cure lycanthropy */
737 }
738 losehp(Maybe_Half_Phys(d(2, 6)), "potion of holy water",
739 KILLED_BY_AN);
740 } else if (otmp->cursed) {
741 You_feel("quite proud of yourself.");
742 healup(d(2, 6), 0, 0, 0);
743 if (ismnum(u.ulycn) && !Upolyd)
744 you_were();
745 exercise(A_CON, TRUE);
746 }
747 } else {
748 if (otmp->blessed) {
749 You_feel("full of awe.");
750 make_sick(0L, (char *) 0, TRUE, SICK_ALL);
751 exercise(A_WIS, TRUE);
752 exercise(A_CON, TRUE);
753 if (ismnum(u.ulycn))
754 you_unwere(TRUE); /* "Purified" */
755 /* make_confused(0L, TRUE); */
756 } else {
757 if (u.ualign.type == A_LAWFUL) {
758 pline("This burns like %s!", hliquid("acid"));
759 losehp(Maybe_Half_Phys(d(2, 6)), "potion of unholy water",
760 KILLED_BY_AN);
761 } else
762 You_feel("full of dread.");
763 if (ismnum(u.ulycn) && !Upolyd)
764 you_were();
765 exercise(A_CON, FALSE);
766 }
767 }
768}
769
770staticfn void
771peffect_booze(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 15

hliquidFunction · 0.85
rndFunction · 0.85
newuhsFunction · 0.85
mon_hates_blessingsFunction · 0.85
exerciseFunction · 0.85
YourFunction · 0.85
makepluralFunction · 0.85
you_unwereFunction · 0.85
set_ulycnFunction · 0.85
losehpFunction · 0.85
dFunction · 0.85
You_feelFunction · 0.85

Tested by

no test coverage detected