From 925440cc1fcb5007cde80160fc54edce9732f631 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Thu, 2 Jul 2026 20:57:21 -0700 Subject: [PATCH] refactor(throwing): scale DefMaxRange from MinThrowRange for clarity Compute the STR-scaled range up from MinThrowRange (the clamp floor) rather than MaxThrowRange - 3. Behavior-identical for the shipped weapons (where MaxThrowRange == MinThrowRange + 3) but robust if a subclass overrides MaxThrowRange, and clearer to read. Per final whole-branch review (L1). Co-Authored-By: Claude Opus 4.8 (1M context) --- Projects/UOContent/Items/Weapons/Throwing/BaseThrown.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projects/UOContent/Items/Weapons/Throwing/BaseThrown.cs b/Projects/UOContent/Items/Weapons/Throwing/BaseThrown.cs index ede039ef2..3905aea14 100644 --- a/Projects/UOContent/Items/Weapons/Throwing/BaseThrown.cs +++ b/Projects/UOContent/Items/Weapons/Throwing/BaseThrown.cs @@ -31,7 +31,9 @@ public abstract partial class BaseThrown : BaseRanged return MaxThrowRange; } - var scaled = MaxThrowRange - 3 + (attacker.Str - AosStrengthReq) / divisor; + // Scale up from MinThrowRange so the base matches the clamp floor even if a + // subclass overrides MaxThrowRange to something other than MinThrowRange + 3. + var scaled = MinThrowRange + (attacker.Str - AosStrengthReq) / divisor; return Math.Clamp(scaled, MinThrowRange, MaxThrowRange); } }