Skip to content

Support life recoup from deflected hits - #2597

Open
dzikidziki wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
dzikidziki:codex/mending-deflection-recoup
Open

dzikidziki wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
dzikidziki:codex/mending-deflection-recoup

Conversation

@dzikidziki

Copy link
Copy Markdown

Description of the problem being solved

Path of Building currently marks Mending Deflection’s Life Recoup modifier as unsupported. This PR adds support for “Damage taken from Deflected Hits Recouped as Life” and shows it in Calcs.

The defence estimate weights the damage from deflected hits by both the chance to Deflect and the damage remaining after Deflection, then applies Recoup to that share. The estimate follows the existing averaged-hit model. The PR also updates the generated modifier cache.

Steps taken to verify a working solution

  • Added a regression test that allocates Mending Deflection through an amulet anoint and checks Life Recoup at zero and partial Deflection chance.
  • Ran all 28 cases in TestDefence_spec.lua locally using the bundled LuaJIT runtime and headless wrapper.
  • Checked the Deflection chance cap, a forced 100% chance, full prevention, damage over time, and the modifier that also Recoups the damage as Energy Shield.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant