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
17 changes: 17 additions & 0 deletions spec/System/TestAbyssTimelessJewel_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,23 @@ 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]))
-- 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()

assert.are.same({
"Minions have 3% increased Attack Speed",
"Minions have 2% increased Cast Speed",
}, spec.nodes[10575].sd)
end)

it("applies Zorath seed 4050 to the selected Chieftain notable", function()
local spec = build.spec
spec:SelectClass(spec.tree.classNameMap.Marauder)
Expand Down
6 changes: 5 additions & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,12 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
if replacesNode then
self:ReplaceNode(node, changedNode)
end
-- 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, 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)
Expand Down
Loading