Skip to content

Max hit improvement#5196

Merged
LocalIdentity merged 5 commits intoPathOfBuildingCommunity:devfrom
Edvinas-Smita:max-hit-improvement
Dec 8, 2022
Merged

Max hit improvement#5196
LocalIdentity merged 5 commits intoPathOfBuildingCommunity:devfrom
Edvinas-Smita:max-hit-improvement

Conversation

@Edvinas-Smita
Copy link
Contributor

@Edvinas-Smita Edvinas-Smita commented Dec 4, 2022

Fixes #1645 #4847.

Description of the problem being solved:

Max hit taken should not depend on enemy damage. This aims to fix that by changing how max hit is calculated.

Steps taken to verify a working solution:

  • Flat damage reduction (i.e. endurance charges) checked at low, mid and extreme values
  • Overwhelm checked at low, mid and extreme values
  • Damage taken as checked at low, mid and extreme values
  • Transcendence and/or unbreakable checked
  • Damage taken-as was kept in mind
  • Math?
  • Spreadsheets

Link to a build that showcases this PR:

https://pobb.in/KAH_0AClx7EI (stolen from poe ninja)

Before screenshot:

Damage reduction for reported phys max hit (88% taken as phys = 108690) results in 2608539 / (2608539 + 5 * 108690) = 0.82758 reduction. Plugging that back in for damage received from physical portion of the "max hit" results in 108690 * 0.17242 * 1.1 (Aspect of Carnage) = 20614 damage. This character has total pool of 11956 (molten shell). Seems pretty dead to me.
image

After screenshot:

Damage reduction for reported phys max hit (88% taken as phys = 79898) results in 2608539 / (2608539 + 5 * 79898) = 0.86719 reduction. Lightning portion (10895 damage) after resists and penetration (1852 dmg) gets a 208683 / (208683 + 5 * 1852) = 0.9 reduction. Plugging that back in for damage received results in (79898 * 0.13281 + 1852 * 0.17 * 0.1) * 1.1 = 11707 damage. Not quite exact, but better?
image

The discrepancy happens due to complexity of calculations when taken-as modifiers are involved. With no conversions this is as accurate as floating point operations and rounding can get. With conversion to a single element, highest observed ratio between the pool and damage taken from the reported hit is ~40%. Converting to two elements go up to ~72%. Element to element conversion is still quite broken.
Some examples of produced deviations:

Flashbang warning

image
image
image
image
image
image

Max hit taken should not depend on enemy damage. This mostly affects how armour is involved in max hit calculations.
Apply some better approximation to taken-as max hit calculations
@QuickStick123 QuickStick123 added the enhancement New feature, calculation, or mod label Dec 4, 2022
@QuickStick123
Copy link
Contributor

This looks pretty good maybe capture the magic armour formula number in a variable
Yes overwhelm probably applies after damage reduction is capped then made sure to not go bellow zero.

@QuickStick123
Copy link
Contributor

This does not fix #4847 as that was a different issue with enemy armour not correctly setting when changing between modes.

Moved damage conversion into math part, which allows it to handle elemental taken as elemental better. Improved approximation a bit. If approximation was used, report some more details about it in the breakdown.
@Edvinas-Smita
Copy link
Contributor Author

My bad with the #4847. I changed changed both of the occurrences of damage reduction capping. Not sure which magic number You referred to, but if it was the smoothing ratio then I made that available in breakdowns.

good maybe capture the magic armour formula number in a variable

Talking about smoothing I added one more magic step which produces pretty magical results:

Flashbang warning

(orange line is current, red was previous)
image
image
image
image
image

With the latest commit elemental taken-as elemental is also captured and it seems to work much, much better.

@QuickStick123
Copy link
Contributor

How well does this fare on the divine flesh / tempered by war if it is with 10% of actual value I think it is good enough to close.
#3632
#4444
#1930

@Edvinas-Smita
Copy link
Contributor Author

Without any armour applying to elemental damage, the max hit is calculated basically within floating point accuracy. With armour applied, max hit stays within 8% error (a bit eyeballed, but easily within 10%).

From #3632 the DoT taken is still broken, as there was no work done here that would have affected it.
#4444 should be fully resolved.
For #1930 I'm not quite sure about the math performed in the initial described issue, but it does look resolved to me.

So refurbished half of the breakdown to have a bit more relevant information.
@QuickStick123
Copy link
Contributor

Mostly solves #5118

@QuickStick123
Copy link
Contributor

Mostly solves #4917

@QuickStick123
Copy link
Contributor

Mostly solves remaining issues of #2264

@QuickStick123 QuickStick123 mentioned this pull request Dec 7, 2022
2 tasks
@QuickStick123
Copy link
Contributor

Fixes #5223

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

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maximum Physical Hit Taken is calculated using incorrect logic

3 participants