| 714 | } |
| 715 | |
| 716 | staticfn void |
| 717 | peffect_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 | |
| 770 | staticfn void |
| 771 | peffect_booze(struct obj *otmp) |
no test coverage detected