Skip to content

Preserve sources of resistances granted to minions - #10350

Open
AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/bonemeld-resistance-sources
Open

Preserve sources of resistances granted to minions#10350
AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/bonemeld-resistance-sources

Conversation

@AdamZ-8113

Copy link
Copy Markdown
Contributor

Fixes #10241

Description of the problem being solved:

Bonemeld's added minion resistances show as coming from Player in Calcs, with a blank Source Name.

This is because the calculation discards the original modifier source when creating the minion resistance bonuses. This preserves each contributing source so Calcs can show its name and the existing item tooltip.

Each contribution is now rounded down separately. A single source like Bonemeld will be accurate, but multiple sharing modifiers can produce slightly different totals: two 50% contributions from 75% player resistance give 37 + 37 = 74 instead of 75. The alternative solution would be to combine sources back to a generic Player to prevent small rounding errors.

Steps taken to verify a working solution:

  • Added save/reload regressions for Bonemeld attribution and multiple resistance-sharing sources, including positive and negative rounding.
  • Verified expected behavior using Bonemeld and a separate custom modifier.
  • Passed all tests

Link to a build that showcases this PR:

https://pob.codes/b/mpx-NPDYaIq

Before screenshot:

image

After screenshot:

image

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.

Bonemeld Not Properly Listed As Source for Resistances on Minions in Calcs

1 participant