You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: correct Runic Ward import, double-count, and EHP operator precedence
Three bugs in the Runic Ward implementation:
1. ImportTab.ImportItem missing return statement
ImportItem built and wired the item correctly but never returned it,
so all callers received nil. Fixed by adding `return item` at the end.
2. Ward double-counting when property line is authoritative
When armourData.Ward is pre-set from a pasted or API-imported property
line ("Runic Ward: 104"), that value is the game's final post-quality
result. The old code still ran calcLocal for INC rune mods on top of
the authoritative value, inflating Ward and leaking unconsumed BASE
mods to CalcDefence. Introduced wardIsAuthoritative flag: in that path
both BASE and INC local mods are consumed (removed from modList) but
their values are discarded; the authoritative value is used verbatim.
3. Operator precedence zeroing EHP pool
`output[...TotalHitPool] + output.Ward or 0` evaluated as
`(... + output.Ward) or 0`, which zeroed the entire pool when Ward was
nil. Fixed with explicit parentheses: `(output.Ward or 0)`.
All 392 tests pass.
0 commit comments