Reduce the effect of luck on to-hit

Luck has a massive effect on the to-hit chance; maximum luck alone
(which almost everyone has past the midpoint of the game) gives
10 points to to-hit, so accounts for 50% chance alone, excluding all
other effects.

Multiple variants do something similar to this, so it is well tested.
This version comes from xNetHack by copperwater <aosdict@gmail.com>,
and allows the +1 or -1 luck adjustments of early game, such as full moon,
to have an effect.
This commit is contained in:
Pasi Kallinen
2025-12-31 12:35:12 +02:00
parent 0dac2b5fa0
commit 5b22feb795
2 changed files with 3 additions and 1 deletions

View File

@@ -1558,6 +1558,7 @@ winter wolf cub was missing for monster to lycanthrope conversion
monster elves shooting arrows weren't getting intended small to-hit and damage
bonuses
safe armor enchantment limit is lowered by one for magical armor
luck has a reduced effect on to-hit chance
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -372,7 +372,8 @@ find_roll_to_hit(
*role_roll_penalty = 0; /* default is `none' */
tmp = 1 + Luck + abon() + find_mac(mtmp) + u.uhitinc
tmp = 1 + abon() + find_mac(mtmp) + u.uhitinc
+ (sgn(Luck) * ((abs(Luck) + 2) / 3))
+ maybe_polyd(gy.youmonst.data->mlevel, u.ulevel);
/* some actions should occur only once during multiple attacks */