From bd6f5b87bfa90694aed494c5b168c39968186b4c Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 26 Sep 2002 07:13:10 +0000 Subject: [PATCH] "eye of newt" Add '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 | 2 ++ src/eat.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index a9f1d55b0..523ac2329 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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) + diff --git a/src/eat.c b/src/eat.c index 00bb2e0cf..fcf857c85 100644 --- 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; -- 2.40.0