| 838 | } |
| 839 | |
| 840 | staticfn void |
| 841 | peffect_see_invisible(struct obj *otmp) |
| 842 | { |
| 843 | int msg = Invisible && !Blind; |
| 844 | int permchance = 10 - (HInvis ? 3 : 0) - (HSee_invisible ? 6 : 0); |
| 845 | |
| 846 | gp.potion_unkn++; |
| 847 | if (otmp->cursed) |
| 848 | pline("Yecch! This tastes %s.", |
| 849 | Hallucination ? "overripe" : "rotten"); |
| 850 | else |
| 851 | pline( |
| 852 | Hallucination |
| 853 | ? "This tastes like 10%% real %s%s all-natural beverage." |
| 854 | : "This tastes like %s%s.", |
| 855 | otmp->odiluted ? "reconstituted " : "", fruitname(TRUE)); |
| 856 | if (otmp->otyp == POT_FRUIT_JUICE) { |
| 857 | u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp)); |
| 858 | newuhs(FALSE); |
| 859 | return; |
| 860 | } |
| 861 | if (!otmp->cursed) { |
| 862 | /* Tell them they can see again immediately, which |
| 863 | * will help them identify the potion... |
| 864 | */ |
| 865 | make_blinded(0L, TRUE); |
| 866 | } |
| 867 | if (otmp->blessed && !rn2(permchance)) |
| 868 | HSee_invisible |= FROMOUTSIDE; |
| 869 | else |
| 870 | incr_itimeout(&HSee_invisible, rn1(100, 750)); |
| 871 | set_mimic_blocking(); /* do special mimic handling */ |
| 872 | see_monsters(); /* see invisible monsters */ |
| 873 | newsym(u.ux, u.uy); /* see yourself! */ |
| 874 | if (msg && !Blind) { /* Blind possible if polymorphed */ |
| 875 | You("can see through yourself, but you are visible!"); |
| 876 | gp.potion_unkn--; |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | staticfn void |
| 881 | peffect_paralysis(struct obj *otmp) |
no test coverage detected