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:
parent
b0ef0d55e1
commit
925440cc1f
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue