]> granicus.if.org Git - nethack/commitdiff
"eye of newt"
authornethack.rankin <nethack.rankin>
Thu, 26 Sep 2002 07:13:10 +0000 (07:13 +0000)
committernethack.rankin <nethack.rankin>
Thu, 26 Sep 2002 07:13:10 +0000 (07:13 +0000)
     Add <Someone>'s "eye of newt" patch, which confers energy
when eating a newt corpse.  Consumed energy is restored by up to 3
points, and if that takes the character past max energy there's a
chance to boost the latter by 1 point.  I introduced randomization
so that level 1 characters can't just kill and eat all the newts on
the first couple of levels to unconditionally boost their initial
mana (22% chance per newt to increase max energy now instead of his
original 100% chance).

doc/fixes34.1
src/eat.c

index a9f1d55b0f5f935dc111e94bc924fc65c1fcf614..523ac2329722d1b6ece0dd19616ae96907d10032 100644 (file)
@@ -319,3 +319,5 @@ a new PANICLOG optional file to log the reason for panic and impossible messages
 added validate_prefix_locations() for early directory prefix validation
 fire traps are particularly bad for paper and straw golems
 cream pies can be 'a'pplied to cause direct temporary blindness
+eating newt corpse or tin of same can boost magical energy (Malcolm Ryan)
+
index 00bb2e0cf4320792e23679da2998a3e0ca2fd145..fcf857c852ed2453380d81ee7d7422d1596d6ffd 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)eat.c      3.4     2002/05/10      */
+/*     SCCS Id: @(#)eat.c      3.4     2002/09/25      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -776,6 +776,18 @@ register int pm;
        if (eatmbuf) (void)eatmdone();
 
        switch(pm) {
+           case PM_NEWT:
+               /* MRKR: "eye of newt" may give small magical energy boost */
+               if (rn2(3) || 3 * u.uen <= 2 * u.uenmax) {
+                   You_feel("a mild buzz.");
+                   u.uen += rnd(3);
+                   if (u.uen > u.uenmax) {
+                       if (!rn2(3)) u.uenmax++;
+                       u.uen = u.uenmax;
+                   }
+                   flags.botl = 1;
+               }
+               break;
            case PM_WRAITH:
                pluslvl(FALSE);
                break;