From 09cf464816e4c44618cb3880edc0f7146e5b9b1e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 2 Aug 2022 01:11:11 +0300 Subject: [PATCH] Potions of healing, extra healing, and lifesaved heal amount Make potions of healing and extra healing more useful in the early game, by upping the average amount of health restored. Make amulet of life saving restore between 60 and 170 health, depending on constitution. Previously life saving was the best way to heal back up to full, even if you had thousands of hp. --- doc/fixes3-7-0.txt | 2 ++ src/end.c | 5 +++-- src/potion.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index bb8b3960a..c9e8c7ca4 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -988,6 +988,8 @@ if an item-using monster zaps a wand of digging downward on a level that doesn't allow holes but does allow pits, create a pit and trigger it no longer override the effect of a new moon by simply carring a lizard corpse make explosions burn monster's armor just like they do hero's armor +make healing and extra healing better by upping the average amount healed +lifesaving healing amount depends on the consitution Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/end.c b/src/end.c index 14322f931..2c5d802c5 100644 --- a/src/end.c +++ b/src/end.c @@ -903,6 +903,7 @@ static void savelife(int how) { int uhpmin; + int givehp = 50 + 10 * (ACURR(A_CON) / 2); /* life-drain/level-loss to experience level 0 kills without actually reducing ulevel below 1, but include this for bulletproofing */ @@ -911,9 +912,9 @@ savelife(int how) uhpmin = minuhpmax(10); if (u.uhpmax < uhpmin) setuhpmax(uhpmin); - u.uhp = u.uhpmax; + u.uhp = min(u.uhpmax, givehp); if (Upolyd) /* Unchanging, or death which bypasses losing hit points */ - u.mh = u.mhmax; + u.mh = min(u.mhmax, givehp); if (u.uhunger < 500 || how == CHOKING) { init_uhunger(); } diff --git a/src/potion.c b/src/potion.c index aad297451..f8951fa6b 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1099,7 +1099,7 @@ static void peffect_healing(struct obj *otmp) { You_feel("better."); - healup(d(6 + 2 * bcsign(otmp), 4), !otmp->cursed ? 1 : 0, + healup(8 + d(4 + 2 * bcsign(otmp), 4), !otmp->cursed ? 1 : 0, !!otmp->blessed, !otmp->cursed); exercise(A_CON, TRUE); } @@ -1108,7 +1108,7 @@ static void peffect_extra_healing(struct obj *otmp) { You_feel("much better."); - healup(d(6 + 2 * bcsign(otmp), 8), + healup(16 + d(4 + 2 * bcsign(otmp), 8), otmp->blessed ? 5 : !otmp->cursed ? 2 : 0, !otmp->cursed, TRUE); (void) make_hallucinated(0L, TRUE, 0L);