]> granicus.if.org Git - nethack/commitdiff
U442 - scroll of charging
authorcohrs <cohrs>
Sat, 17 May 2003 21:12:16 +0000 (21:12 +0000)
committercohrs <cohrs>
Sat, 17 May 2003 21:12:16 +0000 (21:12 +0000)
<Someone> suggested a scroll to counteract an unknown scroll of charging
that had negative effects.  Scroll of punishment already costs the same,
so that unknown behavior is already covered.  Plus, a cursed scroll of
charging already has negative effects, except in the case where the player
was confused where no negative effect from reading a cursed scroll of
charging occured.  Added such an effect (since the curse should still cause
something bad, even though the reader is confused), to drain the player's
energy.

doc/fixes35.0
src/read.c

index 3994c90625d7c148f9aede6b2cfd0a17eae20c4c..7e90b81da4b0e27c06b55a7b026451ecda4b0f8a 100644 (file)
@@ -26,6 +26,7 @@ dust vortex-induced blindness should kick in immediately when blindfold
        is removed or glop is wiped off
 prayer/unicorn-horn won't fix blindness while still engulfed in a dust
        vortex since it will just return immediately
+being confused and reading cursed scroll of charging drains your energy
 
 
 Platform- and/or Interface-Specific Fixes
index b14ccad82a15201cebedd3edf798fdc98a03ebdb..4d84e6c472746d705b669dcc71f78388909346be 100644 (file)
@@ -1060,11 +1060,16 @@ register struct obj     *sobj;
                return(1);
        case SCR_CHARGING:
                if (confused) {
-                   You_feel("charged up!");
-                   if (u.uen < u.uenmax)
-                       u.uen = u.uenmax;
-                   else
-                       u.uen = (u.uenmax += d(5,4));
+                   if (sobj->cursed) {
+                       You_feel("discharged.");
+                       u.uen = 0;
+                   } else {
+                       You_feel("charged up!");
+                       if (u.uen < u.uenmax)
+                           u.uen = u.uenmax;
+                       else
+                           u.uen = (u.uenmax += d(5,4));
+                   }
                    flags.botl = 1;
                    break;
                }