Artifact and #offer rebalance, part 2: luck from sacrificing

Luck from sacrificing is now limited by the value of the sacrifice.

This fixes two exploits, both of which rely on getting luck up to
maximum as soon as you have an altar, a luckstone, and a few
rations, via altar-camping until you accumulate enough luck. One of
them is to use the resulting luck to throw off the balance of combat
via using it to make hit chance calculations irrelevant. The other
is to use it to get crowned early in the game; in particular,
getting crowned pre-Sokoban is often viable and, especially for
chaotic characters, solves most of the game's difficulty at that
point (because the intrinisics and weapon are enough to carry a
character to the Castle given even mediocre luck with finding armor).

After this commit, becoming crowned very early in the game is more
difficult (likely requiring unicorns and identified gems), and the
hit chance gain from luck becomes a more gradual gain over the
course of the game rather than all happening immediately upon
finding the altar and luckstone.

In addition to making the game more balanced, this also discourages
grinding by reducing the incentive for altar-camping, so it will
hopefully make it more fun as well.
This commit is contained in:
Alex Smith
2024-12-12 03:37:02 +00:00
parent d87cadaf73
commit c2c797fa35
2 changed files with 18 additions and 3 deletions

View File

@@ -1490,6 +1490,7 @@ artifact gifts are rebalanced (easier to obtain; higher-value sacrifices are
needed for higher-value artifacts; lower-value artifacts are usually
gifted enchanted; unaligned artifacts are possible but rare even on
the first gift; artifacts you can't use well are less likely)
luck gains from sacrificing are limited by the value of the sacrifice
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -2084,13 +2084,27 @@ offer_corpse(struct obj *otmp, boolean highaltar, aligntyp altaralign)
}
}
} else {
int saved_luck = u.uluck;
int orig_luck, luck_increase;
if (bestow_artifact(value))
return;
change_luck((value * LUCKMAX) / (MAXVALUE * 2));
orig_luck = u.uluck;
luck_increase = (value * LUCKMAX) / (MAXVALUE * 2);
/* sacrificing can't increase non-bonus Luck to above the value of the
sacrifice; this prevents players immediately maxing their Luck as
soon as they find an altar and a few rations via sacrificing lots
of low-valued corpses, which can unbalance the early game */
if (orig_luck > value)
luck_increase = 0;
else if (orig_luck + luck_increase > value)
luck_increase = value - orig_luck;
change_luck(luck_increase);
if ((int) u.uluck < 0)
u.uluck = 0;
if (u.uluck != saved_luck) {
if (u.uluck != orig_luck) {
if (Blind)
You("think %s brushed your %s.", something,
body_part(FOOT));