From 59a88cfa7a7353c7d800efe99f27c84f7df2a97c Mon Sep 17 00:00:00 2001 From: Judd Date: Sun, 4 Oct 2026 09:59:39 -0700 Subject: [PATCH 1/2] Fix Node Power giving nodes another node's score PowerBuilder caches one calculation per modKey and reuses it for every node with that modKey. A radius jewel only applies to the nodes in its radius, so nodes with the same modKey inside and outside a jewel's radius calculate differently, and every one of them showed the score of whichever was scored first. Key the cache on the modKey plus the node's type and the radius jewels that cover it. --- src/Classes/CalcsTab.lua | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/Classes/CalcsTab.lua b/src/Classes/CalcsTab.lua index 7d79e865d98..c253ceb13b3 100644 --- a/src/Classes/CalcsTab.lua +++ b/src/Classes/CalcsTab.lua @@ -492,6 +492,17 @@ function CalcsTabClass:BuildPower() end end +-- Nodes with the same modKey can still calculate differently, as radius jewels only apply to the nodes in their radius +local function powerCacheKey(env, node) + local key = node.modKey .. "|" .. node.type + for index, rad in ipairs(env.radiusJewelList) do + if rad.nodes[node.id] then + key = key .. "|" .. index + end + end + return key +end + -- Estimate the offensive and defensive power of all unallocated nodes function CalcsTabClass:PowerBuilder() -- local timer_start = GetTime() @@ -610,10 +621,11 @@ function CalcsTabClass:PowerBuilder() end for nodeId, node in pairs(nodes) do if not node.alloc and node.modKey ~= "" and not self.mainEnv.grantedPassives[nodeId] then - if not cache[node.modKey] then - cache[node.modKey] = calcFunc({ addNodes = { [node] = true } }, useFullDPS) + local key = powerCacheKey(self.mainEnv, node) + if not cache[key] then + cache[key] = calcFunc({ addNodes = { [node] = true } }, useFullDPS) end - local output = cache[node.modKey] + local output = cache[key] calculateAddNodePower(node.power, distance, node, output, function() local pathNodes = { } for _, pathNode in pairs(node.path) do @@ -622,10 +634,11 @@ function CalcsTabClass:PowerBuilder() return pathNodes end) elseif node.alloc and node.modKey ~= "" and not self.mainEnv.grantedPassives[nodeId] then - if not cache[node.modKey.."_remove"] then - cache[node.modKey.."_remove"] = calcFunc({ removeNodes = { [node] = true } }, useFullDPS) + local key = powerCacheKey(self.mainEnv, node).."_remove" + if not cache[key] then + cache[key] = calcFunc({ removeNodes = { [node] = true } }, useFullDPS) end - local output = cache[node.modKey.."_remove"] + local output = cache[key] if self.powerStat and self.powerStat.stat and not self.powerStat.ignoreForNodes then node.power.singleStat = self:CalculatePowerStat(self.powerStat, output, calcBase) if node.depends and not node.ascendancyName then From ec82794a558d8aca836ad4695753855a8833d79c Mon Sep 17 00:00:00 2001 From: Judd Date: Sun, 4 Oct 2026 15:11:50 -0700 Subject: [PATCH 2/2] Include tattoos in the Node Power cache key A tattooed passive and an ordinary passive with the same stats shared a cache entry, but Warrior's Tale only boosts tattoos in its radius and tattoo counts depend on the tattoo type. With Tattoo of the Ngamahu Makanga on a node in a Warrior's Tale radius, an ordinary node with the same stats showed the tattooed node's gain. The key now also includes the tattoo type. --- src/Classes/CalcsTab.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Classes/CalcsTab.lua b/src/Classes/CalcsTab.lua index c253ceb13b3..69613eadc0d 100644 --- a/src/Classes/CalcsTab.lua +++ b/src/Classes/CalcsTab.lua @@ -492,9 +492,10 @@ function CalcsTabClass:BuildPower() end end --- Nodes with the same modKey can still calculate differently, as radius jewels only apply to the nodes in their radius +-- Nodes with the same modKey can still calculate differently: radius jewels only apply to the nodes in their radius, +-- and tattoos are counted by type and boosted by jewels such as Warrior's Tale local function powerCacheKey(env, node) - local key = node.modKey .. "|" .. node.type + local key = node.modKey .. "|" .. node.type .. (node.isTattoo and "|" .. tostring(node.overrideType) or "") for index, rad in ipairs(env.radiusJewelList) do if rad.nodes[node.id] then key = key .. "|" .. index