Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions spec/System/TestClusterJewelGraphs_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,42 @@ Added Small Passive Skills grant: 12% increased Chaos Damage]])
spec:DeallocNode(nestedSocket)
assert.are.equal(1, countSubgraphs(spec))
end)

it("shows increased effect on added small passive skill stats", function()
local spec = build.spec
local outerSocket = getOuterSocket(spec)
spec:AllocNode(outerSocket)

local largeCluster = addItem([[Rarity: RARE
New Item
Large Cluster Jewel
Implicits: 3
Adds 8 Passive Skills
2 Added Passive Skills are Jewel Sockets
Added Small Passive Skills grant: 12% increased Fire Damage
Added Small Passive Skills also grant: +5% to Chaos Resistance
Added Small Passive Skills also grant: +7% to Fire Resistance
Added Small Passive Skills also grant: +10 to Maximum Life
Added Small Passive Skills have 35% increased Effect]])
spec.jewels[outerSocket.id] = largeCluster.id
spec:BuildClusterJewelGraphs()

local smallNode
for _, subgraph in pairs(spec.subGraphs) do
for _, node in ipairs(subgraph.nodes) do
if node.type == "Normal" and node.expansionSkill then
smallNode = node
break
end
end
end

assert.is_truthy(smallNode)
assert.are.same({
"16% increased Fire Damage",
"+6% to Chaos Resistance",
"+9% to Fire Resistance",
"+13 to Maximum Life",
}, smallNode.sd)
end)
end)
6 changes: 6 additions & 0 deletions src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,12 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize, importe
self.tree:ProcessNode(node)
if node.modList and jewelData.clusterJewelIncEffect and node.type == "Normal" then
node.modList:NewMod("PassiveSkillEffect", "INC", jewelData.clusterJewelIncEffect)
-- ProcessNode must parse the base values before the tooltip text is scaled,
-- otherwise PassiveSkillEffect would apply to the scaled values a second time.
local effectScalar = 1 + jewelData.clusterJewelIncEffect / 100
for index, line in ipairs(node.sd) do
node.sd[index] = itemLib.applyRange(line, 1, effectScalar)
end
end
end

Expand Down
Loading