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) <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-07-02 20:57:21 -07:00
parent b0ef0d55e1
commit 925440cc1f

View file

@ -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);
}
}