| 961 | } |
| 962 | |
| 963 | staticfn void |
| 964 | peffect_sickness(struct obj *otmp) |
| 965 | { |
| 966 | pline("Yecch! This stuff tastes like poison."); |
| 967 | if (otmp->blessed) { |
| 968 | pline("(But in fact it was mildly stale %s.)", fruitname(TRUE)); |
| 969 | if (!Role_if(PM_HEALER)) { |
| 970 | /* NB: blessed otmp->fromsink is not possible */ |
| 971 | losehp(1, "mildly contaminated potion", KILLED_BY_AN); |
| 972 | } |
| 973 | } else { |
| 974 | if (Poison_resistance) |
| 975 | pline("(But in fact it was biologically contaminated %s.)", |
| 976 | fruitname(TRUE)); |
| 977 | if (Role_if(PM_HEALER)) { |
| 978 | pline("Fortunately, you have been immunized."); |
| 979 | } else { |
| 980 | char contaminant[BUFSZ]; |
| 981 | int typ = rn2(A_MAX); |
| 982 | |
| 983 | Sprintf(contaminant, "%s%s", |
| 984 | (Poison_resistance) ? "mildly " : "", |
| 985 | (otmp->fromsink) ? "contaminated tap water" |
| 986 | : "contaminated potion"); |
| 987 | if (!Fixed_abil) { |
| 988 | poisontell(typ, FALSE); |
| 989 | (void) adjattrib(typ, Poison_resistance ? -1 : -rn1(4, 3), |
| 990 | 1); |
| 991 | } |
| 992 | if (!Poison_resistance) { |
| 993 | if (otmp->fromsink) |
| 994 | losehp(rnd(10) + 5 * !!(otmp->cursed), contaminant, |
| 995 | KILLED_BY); |
| 996 | else |
| 997 | losehp(rnd(10) + 5 * !!(otmp->cursed), contaminant, |
| 998 | KILLED_BY_AN); |
| 999 | } else { |
| 1000 | /* rnd loss is so that unblessed poorer than blessed */ |
| 1001 | losehp(1 + rn2(2), contaminant, |
| 1002 | (otmp->fromsink) ? KILLED_BY : KILLED_BY_AN); |
| 1003 | } |
| 1004 | exercise(A_CON, FALSE); |
| 1005 | } |
| 1006 | } |
| 1007 | if (Hallucination) { |
| 1008 | You("are shocked back to your senses!"); |
| 1009 | (void) make_hallucinated(0L, FALSE, 0L); |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | staticfn void |
| 1014 | peffect_confusion(struct obj *otmp) |