From 5b22feb795f95396e8f605bee5dccdcd2e8b09ae Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 31 Dec 2025 12:35:12 +0200 Subject: [PATCH] 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 , and allows the +1 or -1 luck adjustments of early game, such as full moon, to have an effect. --- doc/fixes3-7-0.txt | 1 + src/uhitm.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index df639a884..08dfb2f21 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/uhitm.c b/src/uhitm.c index 316858896..954a0f1ea 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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 */