Skip to content
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

Fix some mod ranges being inverted #6549

Merged

Conversation

Lilylicious
Copy link
Contributor

Fixes #6548

Description of the problem being solved:

#6056 introduced an error in cases where mods that scaled in a positive direction were inverted incorrectly, such as the shaper body armour mod for crit chance to spells. It used the value 1 to check for discontinuity between tiers, which works for almost all mods, but for mods with a step of less than 1 it caused issues.

Specifically, it inverted the ranges even for positive mods when the difference between minimum and maximum of different tiers was exactly 1, which for the mods in question applied since the first mod starts at 0.5 and the second ends at 1.5.

Optimally we'd somehow fetch the step value, but I don't have the time or energy to delve into the stat descriptions right now. Looks like divide_by_one_hundred is how we'd find the step value though.

This adds a check to only invert the ranges if the values are integers.

One thing that the original PR never fixed was the tooltip for the slider itself. That's not fixed in this either, that's still incorrect on the flasks. The body armour mods work great though!

Steps taken to verify a working solution:

  • Checked body armour with a shaper crit mod
  • Checked flask with a less duration mod

Link to a build that showcases this PR:

https://pobb.in/OliPnl0lAKej

@LocalIdentity LocalIdentity added the bug: behaviour Behavioral differences label Sep 5, 2023
@LocalIdentity LocalIdentity merged commit bcbe692 into PathOfBuildingCommunity:dev Sep 5, 2023
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.

Slider to item value behaviour for tier 2 of "Attacks/Spells have +X% to Critical Strike Chance"
2 participants