From 4129706a4cd326806e4d761046b824c64b39bec8 Mon Sep 17 00:00:00 2001 From: copperwater Date: Wed, 30 Jan 2019 23:47:05 -0500 Subject: [PATCH] Potions of hallucination can give enlightenment This is also from SliceHack, but with the odds of enlightenment toned down a bit, to 4/9 for a blessed potion and 1/6 for an uncursed potion (SliceHack had it at 50% blessed, 20% cursed, and strangely, 0% uncursed). It gives a much-needed use to one of the potions that's commonly blanked or discarded. --- doc/fixes37.0 | 1 + src/potion.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 66e389cc0..0eea5c110 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -108,6 +108,7 @@ make non-tame (baby) purple worms eat corpses off the ground make baby purple worms attack shriekers make hero polymorphed into baby purple worm warned against shriekers confused scroll of light summons tame cancelled lights +potions of hallucination can give enlightenment Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/potion.c b/src/potion.c index ca15a2287..c07d96cab 100644 --- a/src/potion.c +++ b/src/potion.c @@ -632,11 +632,22 @@ register struct obj *otmp; } break; case POT_HALLUCINATION: - if (Hallucination || Halluc_resistance) + if (Halluc_resistance) { g.potion_nothing++; + break; + } else if (Hallucination) { + g.potion_nothing++; + } (void) make_hallucinated(itimeout_incr(HHallucination, rn1(200, 600 - 300 * bcsign(otmp))), TRUE, 0L); + if ((otmp->blessed && !rn2(3)) || (!otmp->cursed && !rn2(6))) { + You("perceive yourself..."); + display_nhwindow(WIN_MESSAGE, FALSE); + enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS); + Your("awareness re-normalizes."); + exercise(A_WIS, TRUE); + } break; case POT_WATER: if (!otmp->blessed && !otmp->cursed) {