Repository navigation
Fix Node Power giving nodes another node's score - #2559
Open
juddisjudd wants to merge 1 commit into
Open
juddisjudd wants to merge 1 commit into
juddisjudd wants to merge 1 commit into
Conversation
PowerBuilder caches one calculation per modKey and reuses it for every node with that modKey. Nodes with the same modKey can still calculate differently: a radius jewel only applies to the nodes in its radius, small and notable passives are scaled separately, and weapon set nodes get a weapon set condition. A Time-Lost jewel that gives small passives in its radius extra damage made every same-stat small passive on the tree show that damage, or none of them, depending on which one was scored first. Key the cache on the modKey plus the node's type, attribute flag, weapon set and the radius jewels that cover it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem being solved:
PowerBuildercaches one calculation permodKeyand gives that result to every node with the samemodKey. Nodes with the samemodKeycan still calculate differently:incSmallPassiveSkill,JewelSmallPassiveSkillEffect,JewelNotablePassiveSkillEffect)WeaponSetcondition on its mods, which matters for the_removeentriesSo a Time-Lost Emerald with "Small Passive Skills in Radius also grant 1% increased Lightning Damage" makes every small passive with the same stat text show the damage of the one inside the radius, or none of them show it. Which one depends on which node
pairsreaches first.This change keys the cache on the
modKeyplus the node's type, attribute flag, weapon set and the radius jewels that cover it. Nodes that calculate the same still share one calculation.Steps taken to verify a working solution:
GetMiscCalculatorgives the same numbers as after.singleStat,pathPower,offenceanddefence. Before the change the two runs differed on 101 of 3,743 nodes for the Invoker. After it they match on 9 builds, 3 of them with Time-Lost jewels.Link to a build that showcases this PR:
Any build with a Time-Lost jewel that grants small passives in its radius a stat the build scales. Compare Node Power on two small passives with the same text, one inside the radius and one outside.
Before screenshot:
Both "Life Recoup" small passives: +385.5 Combined DPS.
After screenshot:
Inside the radius: +385.5. Outside: 0.