"eye of newt"

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).
This commit is contained in:
nethack.rankin
2002-09-26 07:13:10 +00:00
parent 846de96a4a
commit bd6f5b87bf
2 changed files with 15 additions and 1 deletions

View File

@@ -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;