Skip to content

Exclude ES from EHP and Maximum Hit Taken when a self degen keeps ES at 0 - #10457

Open
PersiaDark wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
PersiaDark:fix/self-degen-depletes-energy-shield-ehp
Open

PersiaDark wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
PersiaDark:fix/self-degen-depletes-energy-shield-ehp

Conversation

@PersiaDark

Copy link
Copy Markdown

Fixes #10456 .

Description of the problem being solved:

Self degens such as Righteous Fire are taken from energy shield (ES) before life. When ES regeneration is lower than the part of the degen that reaches ES, ES drains to 0 and stays there while the degen is active. PoB still added full ES to every hit pool, so EHP and Maximum Hit Taken were too high for RF builds with any ES. With no ES regeneration, Net Life Regen already left ES out and took the whole degen from life, so it disagreed with EHP.

Changes (CalcDefence buildDefenceEstimations, plus ConfigOptions and CalcSections):

  • Moved the block that computes <type>BuildDegen / TotalBuildDegen from the degen section to before the pools, unchanged.
  • After sharedMindOverMatter is set, a new check adds up the part of each self degen that reaches ES: the degen times (1 - <type>EnergyShieldBypass / 100). With Eldritch Battery, only the part that Mind over Matter takes from mana counts.
  • If that sum is higher than EnergyShieldRegenRecovery, the check sets EnergyShieldDepletedByDegen and CappingES, and sets EnergyShieldRecoveryCap to 0. Every hit pool reads that cap, and EHP and Maximum Hit Taken come from the pools. Maximum ES does not change, so RF's damage to enemies and the degen itself stay the same. Calcs shows the breakdown on the Total Recoverable row of the Energy Shield section.
  • A new Configuration checkbox, "Disable EHP ES depletion by self degen", turns the check off. It only appears when the build has a Physical, Lightning, Cold, Fire or Chaos degen mod. Use it for builds that keep ES up through recovery outside EnergyShieldRegenRecovery, such as leech or recoup. The check is on by default; whether it should be is your call.

Builds whose ES regeneration covers the degen, including Zealot's Oath with enough life regeneration, keep their ES. Chaos Inoculation builds are unaffected because PoB gives RF no degen under Chaos Inoculation (#9110). The check counts every self degen that reaches ES, so Blood Rage also drops ES out of EHP on an ES build with no ES regeneration.

This PR leaves the degen split alone (see #2854). When ES regeneration is above 0 but below the degen, the degen section still puts the whole degen on ES and none on life.

Steps taken to verify a working solution:

  • Added seven specs to TestDefence_spec.lua: no degen, RF draining ES (including the Configuration checkbox), regeneration that does and does not cover the degen, full and 50% non-chaos ES bypass, Zealot's Oath, Chaos Inoculation, and Eldritch Battery with and without Mind over Matter. The RF, regeneration and bypass specs fail on current dev, and all seven pass with this change.
  • Ran the full suite in the pathofbuilding-tests image: 673 of 674 pass. The one failure, "Veiled unique affix pools only offers attainable modifiers on That Which Was Taken", also fails on current dev in the same image.
  • With the build below, Physical Maximum Hit Taken goes from 2080 to 1060 and Total EHP from 2044 to 1038.
  • On my level 45 RF Chieftain (145 ES, no ES regeneration), EHP against the Pinnacle preset goes from 3163 to 2901.

Link to a build that showcases this PR:

eNqtW1Fz2roSfm5_hYfXOw2JCTTtkHOGAGkzkzRcnLb3PnWELUCnsuQjyUk4v_6sJNvYJBAZuw-Nkff7JK20q9VKHv75HFPvEQtJOLvsnJ2cdjzMQh4RtrrsfH-4_nDR-fOP98MZUuv75VVKqH7zx_t3Q_PsIRliFo0pkvIbivFl5xtnuOMtEIuIyn-FayRQqLC4xY-YjlLF73gEskqk-u0WHITQio5HtRg0puPFiLCAh7-x-iJ4mpiyBDG1xpzdob-4-MKjvJainLBKuUJihdWPvIu9X9DFR4KfbBse5tNpB_rzbjijaINFoJDyJPx32RmBWtAKfyUKAIimIH3a6R6UvUqFVBMUw-PbmCDBOHpbbCyIukupIgklWBTyZyf9fQho8XiNWLhtw9npXvoHrhCdzIK3G2Il-VYbZ-f9wT7hn0StQbZM_Jb4FQV9OLVES9-sGFHYWXzGieSsVj9d2z5OKQWjcOKeY4nFI1LEsS1jHi8Iq6rlYFs4pxF_Ylvmk15v76QVGN0vp8slDtUcRSSVd1gJLAuwf7IXe4cYGnPpYBpacoYF-AlVCxDgkINrqVtHTeQtWWJ3yVr9yAB1W3NcP6aBq1xt4uMaNAcf6CYZ8JQ6Sqqt__MP2NjfZcHBxT7BCX52oLthyq3SsuCnA5U-cmWWOSc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bRmu35bh-m0Zrt-W4fptGa7fluH6rQxYG2PVxjC1MUJtDE6DcfmKYauvagOaDOPrDH5jhl5jhvPGDP3GDHUG74pHG6-cGK-LajKMB2j8dmh67dCct0PTb4emzvh-obAhkrUBTUb1dQa_MUOvMcN5Y4Z-Y4Z6xsmVrCvfzCBfIfCbEvSaEpw3Jeg3JagzaqM4pbXWwzlhq1rDZAB-XUCtYcBU1RRvNO9ewfsN8b2G-POG-H5DfC0vL9CyppM2iDo6NieTteqwiPp19Gojzmsj8o8hu1n-ySTBTG5LP33jCpsbb7o0_zE0yTAvWPOnUfSok3wPnFNZnJ2gJMFse5QSYakIQ9nVA2qPh4bm2lGeP8vutKnssp5J3n3B8a39npVxERdf5ZTf_zdF-mDbJsZM4u0Wr1C4gVfb1ph8XJroJB6U60tQ8G50ewtvbJG82kxmQZ6jqxRe66OP6seE9pwna2_l2MUU7iYkCQtpGuEblt0HzdpK0UL3zH6oO9rqoPh4t1RmDoOKat4NoXVeqNOyRtjWB0vsAtGzvNZyoV8tLFq2snPjDisUIYXsmHd117umWnia65u5mKdS3zQuPi_2T-0M0ocT2qNmMp4V-jsfE5Ay1xx1JTtEj_Ya5ss32eS1DbDTMle1mZd20ujHB4FxPnlMO7ITMf2j_HF1Nv3DynMqlU6by_W1nlnbT5x9rXv9bpNdcjLGwiM9Y_oXF72eviaqc7JIbEbVOsyoKmhU6Xtp_1M2M8Ds7NitlUrk52736enpJEFqzZf4mVB8EvK4mwAT9OaDUdoHTdUdwb-r1cj8s4rJmYbWN8pMYfpYUxBoZ2bLWgtGYVpNubr0_dDsmmughLnzuj9V_Q_nufn17K__GeXpp_9n93WH3d2v2_8FnLA3eg==

Before screenshot:

None.

After screenshot:

None.

Righteous Fire and other self-inflicted degens are taken from energy shield
before life. When energy shield regeneration is lower than the part of the
degen that hits energy shield, energy shield sits at 0 while the degen is
active, so it can't absorb hits. Treat it as depleted for the hit pools
(EHP, max hit taken) the same way Recoverable ES is capped, respecting
ES bypass and Eldritch Battery, with a config option to turn it off.
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.

EHP and Maximum Hit Taken count energy shield that Righteous Fire keeps at 0

1 participant