]> granicus.if.org Git - nethack/commitdiff
Potions of hallucination can give enlightenment
authorcopperwater <aosdict@gmail.com>
Thu, 31 Jan 2019 04:47:05 +0000 (23:47 -0500)
committerPasi Kallinen <paxed@alt.org>
Sun, 5 Apr 2020 12:06:43 +0000 (15:06 +0300)
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
src/potion.c

index 66e389cc0d195faf7bde1b2e4490490077ce750a..0eea5c110ccf285027195f04f55d03ae2b6621f3 100644 (file)
@@ -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
index ca15a2287a061ac78f53f710c07b02ebd625d267..c07d96cab7294e0f7fd5530d7408fa5d8654e818 100644 (file)
@@ -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) {