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 calculation of hybrid mana+life costs #6179

Merged
merged 1 commit into from
May 4, 2023

Conversation

mortentc
Copy link
Contributor

@mortentc mortentc commented Apr 30, 2023

Fixes #6008 and fixes #6029.

Description of the problem being solved:

The life mastery with "Skills Cost Life instead of 30% of Mana Mastery" seems to function more akin to:
"Skills gain additional base life cost equal to 30% of base mana cost. Skills cost 30% less total mana."

In-game, this means that the mastery only lessens mana costs after +/- to total mana cost, but adds life cost before any modfiers have taken effect.
Ongoing discussion on whether or not this is intended: https://www.pathofexile.com/forum/view-thread/3369075

Even if it is not inteded, I think PoB should reflect the game's behaviour, and it is possible to revert the change if it turns out to be unintended.

I have also added a mention of the mastery in the breakdown of mana cost.

Steps taken to verify a working solution:

Link to a build that showcases this PR:

https://pobb.in/vhKItV7OK3KP
eNrtPWtzm0i2n1e_gnLV3C-xHfoNucne8ttO7NgjO8nMfEk10FgkCBRAtpWp-e_3NA8JZCEjWTs7O5tJlUeIc073efR50Y1e_9_DMDTuVJIGcfRmC-2aW4aK3NgLots3Wx9ujnesrf_7Z-_1lcwGl_7-OAj1nX_2_vE6_2yE6k6Fb7ZssmVkMrlV2ceKFPkMpEYyygYqji7klzg5ib03W-_jSG0Zjoy8IKuu3FCm6Xs5VG-2-jK6VcmWIVNXRd7B7IaegB9Enr7pDmQi3Uwl53r0vXEWX8QewPgyTIHcUAbRdex-VdlJEo9HwBXaMu4CdV9AnV1cXfZvanMLovrcgLd_vL4K5UQl15nMjBT-vNnaAxHJW3UaZEBKhmOgY269XAq7P07S7FAO4ePTONcjpbwpGN612gCvEnXk-8rNgjt1kATZwUBGbocBVoW9GIdZMAoDLe8SHu2yNozTR8SR2Ur-Js5keHh1_fRECsi4g8w_BdlgPwQZdqKroc9uoyBTncGv4iCNo5Vm3Qn4YByGs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cSfz1AWeuJf0NZD3t2nHt-pOSrepQZPF3LAz0esGhgVW_fyI9D57-HGEd-cFv9jqSrBnHoqaQkrfTmr-I39qa_cCjqPxu-CF7_rF71EpUKiTyBUxlZBV__JdO2Maofl61w2HKU8hd54zDM-3x1hpYjTn-Oq0LgYjlC8zeAawNVPxxTivz1yyuZDS79_NcyYc38s_f_qbN8Sw==

Before screenshot:

image

image

After screenshot:

image

image

Copy link
Contributor

@LocalIdentity LocalIdentity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now, I'm confirming with someone at GGG to find the exact order of how skill costs are calculated and we can update the calculations once we have that information
Also, if you're not in the Discord already, send me a message LocalIdentity#9871 and I'll send you an inv
Also feel free to make a PR for the Dagger Spell Suppress fix too

@LocalIdentity LocalIdentity added the bug: calculation Numerical differences label May 4, 2023
@LocalIdentity LocalIdentity merged commit 6deee67 into PathOfBuildingCommunity:dev May 4, 2023
@mortentc mortentc deleted the hybrid_cost branch May 4, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: calculation Numerical differences
Projects
None yet
2 participants