From: Alex Smith Date: Sun, 19 Nov 2017 16:16:00 +0000 (+0000) Subject: Balance fix to level drain and potions of restore ability X-Git-Tag: NetHack-3.6.1_RC01~207 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59c357de9a783e2ef385cb3adee8107db8bb262d;p=nethack Balance fix to level drain and potions of restore ability Right now, the punishment for being hit more than twice by a level drainer pre-Quest is disproportionate; grinding back up to level 14 from level 13 takes a long time, and yet isn't particularly difficult, just slow, and a potion of full healing will only regain one of the lost levels (as only half the lost levels can be regained this way). Meanwhile, potions of restore ability are currently automatically blanked by almost all spoiled players; they don't do anything that doesn't have more convenient sources (unicorn horn or the spell), so they're only useful in the very early game for getting poison resistance. This commit aims to fix both problems, by allowing potions of restore ability to restore lost experience levels, in addition to lost attribute points; an uncursed potion restores one lost level (with multiple potions making it possible to hit the cap), a blessed potion restores all of them. That gives players an incentive to keep them around rather than blanking them. (Notably, the spell and tool were not changed the same way; for restoring levels, you need to use the potion.) --- diff --git a/src/exper.c b/src/exper.c index 06456e0c0..675375ebe 100644 --- a/src/exper.c +++ b/src/exper.c @@ -293,9 +293,11 @@ boolean incr; /* true iff via incremental experience growth */ u.uexp = newuexp(u.ulevel); } ++u.ulevel; + pline("Welcome %sto experience level %d.", + u.ulevelmax < u.ulevel ? "" : "back ", + u.ulevel); if (u.ulevelmax < u.ulevel) u.ulevelmax = u.ulevel; - pline("Welcome to experience level %d.", u.ulevel); adjabil(u.ulevel - 1, u.ulevel); /* give new intrinsics */ reset_rndmonst(NON_PM); /* new monster selection */ } diff --git a/src/potion.c b/src/potion.c index 4925b27b0..5daa9fbcc 100644 --- a/src/potion.c +++ b/src/potion.c @@ -577,6 +577,18 @@ register struct obj *otmp; if (++i >= A_MAX) i = 0; } + + /* when using the potion (not the spell) also restore lost levels, + to make the potion more worth keeping around for players with + the spell or with a unihorn; this is better than full healing + in that it can restore all of them, not just half, and a + blessed potion restores them all at once */ + if (otmp->otyp == POT_RESTORE_ABILITY && + u.ulevel < u.ulevelmax) { + do { + pluslvl(FALSE); + } while (u.ulevel < u.ulevelmax && otmp->blessed); + } } break; case POT_HALLUCINATION: