From 0a0e3a391e52c4c6eac2f3740f96d181a5d93516 Mon Sep 17 00:00:00 2001 From: Mickael Cagnion Date: Tue, 24 Nov 2026 20:13:31 +0100 Subject: [PATCH 1/2] Fix abyss jewel passives showing one roll on two lines Reclaimed Malevolence and the other abyss timeless jewels can turn a passive into two lines with the same roll range, such as "Minions have (2-3)% increased Attack Speed" and "Minions have (2-3)% increased Cast Speed". Every stat was substituted into every line in pairs() order, so whichever stat came first filled both lines, and the result changed between PoB sessions. When a passive has one stat per line, each line now takes only its own stat's roll. Lines holding several stats, such as "12 to (17-19) Added Spell Cold Damage while Dual Wielding", still take all of them, now in a fixed order. Reported in issue 10432. --- spec/System/TestAbyssTimelessJewel_spec.lua | 44 +++++++++++++++++++++ src/Classes/PassiveSpec.lua | 7 +++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/spec/System/TestAbyssTimelessJewel_spec.lua b/spec/System/TestAbyssTimelessJewel_spec.lua index 1f64037c529..5caf4a0f0ee 100644 --- a/spec/System/TestAbyssTimelessJewel_spec.lua +++ b/spec/System/TestAbyssTimelessJewel_spec.lua @@ -475,6 +475,50 @@ describe("Abyss timeless jewels", function() assert.is_true(hasComparison) end) + it("gives each line of a Zorath node its own roll when both stats share a range", function() + local spec = build.spec + spec:SelectClass(spec.tree.classNameMap.Templar) + assert.is_true(allocatePathToNode(spec, spec.nodes[26196])) + spec:BuildAllDependsAndPaths() + local targetNodeId + for nodeId in pairs(spec:GetShortestPathToClassStart(26196)) do + if spec.nodes[nodeId].type == "Normal" then + targetNodeId = nodeId + break + end + end + -- Minions have (2-3)% increased Attack Speed / Minions have (2-3)% increased Cast Speed + local minionSpeedGlobalId + for index, node in ipairs(spec.tree.legion.nodes) do + if node.id == "abyss_special_small_attribute35" then + minionSpeedGlobalId = index - 1 + data.timelessJewelAdditions + break + end + end + local minionSpeedLocalId + for localId, globalId in pairs(data.nodeIDList.localIdToGlobalId[11]) do + if globalId == minionSpeedGlobalId then + minionSpeedLocalId = localId + break + end + end + data.timelessJewelLUTs[11] = parseAbyssJewel(11, table.concat({ + abyssHeader("ABYN", 11, 1984), + uint16(1), + uint16(targetNodeId), + abyssModification({ { type = 1, id = minionSpeedLocalId, rolls = { 3, 2 } } }), + "ASCS", uint16(0), + })) + equipJewel(spec, 26196, newAbyssTimelessJewel("Reclaimed Malevolence", "Assembled Eye Jewel", + "Binding 1984 souls to phylacteries to sustain Zorath")) + spec:BuildAllDependsAndPaths() + + assert.are.same({ + "Minions have 3% increased Attack Speed", + "Minions have 2% increased Cast Speed", + }, spec.nodes[targetNodeId].sd) + end) + it("applies Zorath seed 4050 to the selected Chieftain notable", function() local spec = build.spec spec:SelectClass(spec.tree.classNameMap.Marauder) diff --git a/src/Classes/PassiveSpec.lua b/src/Classes/PassiveSpec.lua index 89dd9e754a1..eb8633d0955 100644 --- a/src/Classes/PassiveSpec.lua +++ b/src/Classes/PassiveSpec.lua @@ -1282,8 +1282,13 @@ function PassiveSpecClass:BuildAllDependsAndPaths() if replacesNode then self:ReplaceNode(node, changedNode) end + -- Each line takes only its own stat's roll: two stats can share a range, such as the + -- "(2-3)" of minion Attack Speed and Cast Speed. A line holding several stats, such as + -- "(12-14) to (17-19) Added Spell Cold Damage while Dual Wielding", takes all of them. + local oneStatPerLine = #changedNode.sd == #changedNode.sortedStats for statIndex, statLine in ipairs(changedNode.sd) do - for statKey, statMod in pairs(changedNode.stats) do + for _, statKey in ipairs(oneStatPerLine and { changedNode.sortedStats[statIndex] } or changedNode.sortedStats) do + local statMod = changedNode.stats[statKey] statLine = replaceHelperFunc(statLine, statKey, statMod, component.rolls[statMod.index]) end self:NodeAdditionOrReplacementFromString(node, (replacesNode and "" or " \n") .. statLine, replacesNode and statIndex == 1) From 534bcd046c915a8fb48a2a22d3d687e2f4622e82 Mon Sep 17 00:00:00 2001 From: Mickael Cagnion Date: Tue, 24 Nov 2026 20:51:29 +0100 Subject: [PATCH 2/2] Simplify the abyss same-range roll test and comment Hard-code the conquered node and the legion local id in the test, as the other tests of the file do, and describe the multi-stat case without quoting modifier texts. --- spec/System/TestAbyssTimelessJewel_spec.lua | 35 +++------------------ src/Classes/PassiveSpec.lua | 5 ++- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/spec/System/TestAbyssTimelessJewel_spec.lua b/spec/System/TestAbyssTimelessJewel_spec.lua index 5caf4a0f0ee..653936a8b8d 100644 --- a/spec/System/TestAbyssTimelessJewel_spec.lua +++ b/spec/System/TestAbyssTimelessJewel_spec.lua @@ -479,36 +479,9 @@ describe("Abyss timeless jewels", function() local spec = build.spec spec:SelectClass(spec.tree.classNameMap.Templar) assert.is_true(allocatePathToNode(spec, spec.nodes[26196])) - spec:BuildAllDependsAndPaths() - local targetNodeId - for nodeId in pairs(spec:GetShortestPathToClassStart(26196)) do - if spec.nodes[nodeId].type == "Normal" then - targetNodeId = nodeId - break - end - end - -- Minions have (2-3)% increased Attack Speed / Minions have (2-3)% increased Cast Speed - local minionSpeedGlobalId - for index, node in ipairs(spec.tree.legion.nodes) do - if node.id == "abyss_special_small_attribute35" then - minionSpeedGlobalId = index - 1 + data.timelessJewelAdditions - break - end - end - local minionSpeedLocalId - for localId, globalId in pairs(data.nodeIDList.localIdToGlobalId[11]) do - if globalId == minionSpeedGlobalId then - minionSpeedLocalId = localId - break - end - end - data.timelessJewelLUTs[11] = parseAbyssJewel(11, table.concat({ - abyssHeader("ABYN", 11, 1984), - uint16(1), - uint16(targetNodeId), - abyssModification({ { type = 1, id = minionSpeedLocalId, rolls = { 3, 2 } } }), - "ASCS", uint16(0), - })) + -- Local id 113 is abyss_special_small_attribute35, whose two stats both roll (2-3) + data.timelessJewelLUTs[11] = parseAbyssJewel(11, abyssHeader("ABYN", 11, 1984) .. uint16(1) .. uint16(10575) + .. abyssModification({ { type = 1, id = 113, rolls = { 3, 2 } } }) .. "ASCS" .. uint16(0)) equipJewel(spec, 26196, newAbyssTimelessJewel("Reclaimed Malevolence", "Assembled Eye Jewel", "Binding 1984 souls to phylacteries to sustain Zorath")) spec:BuildAllDependsAndPaths() @@ -516,7 +489,7 @@ describe("Abyss timeless jewels", function() assert.are.same({ "Minions have 3% increased Attack Speed", "Minions have 2% increased Cast Speed", - }, spec.nodes[targetNodeId].sd) + }, spec.nodes[10575].sd) end) it("applies Zorath seed 4050 to the selected Chieftain notable", function() diff --git a/src/Classes/PassiveSpec.lua b/src/Classes/PassiveSpec.lua index eb8633d0955..30f47592d91 100644 --- a/src/Classes/PassiveSpec.lua +++ b/src/Classes/PassiveSpec.lua @@ -1282,9 +1282,8 @@ function PassiveSpecClass:BuildAllDependsAndPaths() if replacesNode then self:ReplaceNode(node, changedNode) end - -- Each line takes only its own stat's roll: two stats can share a range, such as the - -- "(2-3)" of minion Attack Speed and Cast Speed. A line holding several stats, such as - -- "(12-14) to (17-19) Added Spell Cold Damage while Dual Wielding", takes all of them. + -- Two stats can share a range, so with one line per stat each line takes only its own + -- stat's roll. A line holding several stats, like an added damage range, takes all of them. local oneStatPerLine = #changedNode.sd == #changedNode.sortedStats for statIndex, statLine in ipairs(changedNode.sd) do for _, statKey in ipairs(oneStatPerLine and { changedNode.sortedStats[statIndex] } or changedNode.sortedStats) do