Skip to content

Update ailment hit calc to account for lucky dmg #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

pauloday
Copy link
Contributor

Fixes # .

Description of the problem being solved:

Steps taken to verify a working solution:

Link to a build that showcases this PR:

Before screenshot:

After screenshot:

@deathbeam
Copy link
Collaborator

Just quick note, I originally implemented like this but the issue is that the average needs to account for ailment roll average (which is calculated based on stack potential/overstacking), which means the average needs to be calculated in place and not from stored value so it was changed to what it does now (at the cost of not reimplementing the lucky logic), see: https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/pull/143/files#diff-9ea806a499fadd026d5c9d6bcdb3e40ebd379ae78bdf8b997a74dec5ca28aeb0R4116

@pauloday
Copy link
Contributor Author

pauloday commented Jan 25, 2025

In retrospect it seemed a little too easy when I was working on it, I was hoping someone just didn't get around to hooking stuff up lol.

The average roll calculation is already similar to a lucky hit calculation. So you would just need some modification for the lucky case, but I'm not sure what it would be. I did some modeling and I'm pretty confident it'd just be some changes to the consts or maybe new coefficients in the current ailmentRollAverage calculation. I think the main problem is that by time the average roll calc is done all damage types have been combined in calcAilmentSourceDamage. But that fn doesn't have info about whether the hit is lucky either. So I think a solution would be something like:

  1. Adding output[damageType .. "LuckyChance"] around line 3312
  2. Passing the max and average stacks into calcAilmentSourceDamage
  3. Calculating and returning the average roll from there

@Paliak Paliak added the bug: behaviour Behavioral differences label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: behaviour Behavioral differences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants