Skip to content

Commit a2d2dc0

Browse files
author
David Medgyesy
committed
Keep Companionship separate from the supported skill buff
Refs #10560
1 parent bfee69d commit a2d2dc0

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎spec/System/TestDefence_spec.lua‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,25 @@ describe("TestDefence", function()
805805
end)
806806
end
807807

808+
it("preserves the Chaos Golem's quality-scaled buff with Companionship", function()
809+
local function chaosResistance(quality, withSupport)
810+
newBuild()
811+
local group = string.format("Summon Chaos Golem 20/%d 1", quality)
812+
if withSupport then
813+
group = group .. "\nCompanionship 3/0 1"
814+
end
815+
build.skillsTab:PasteSocketGroup(group)
816+
runCallback("OnFrame")
817+
return build.calcsTab.mainOutput.ChaosResist
818+
end
819+
820+
local noQuality = chaosResistance(0, false)
821+
local withQuality = chaosResistance(20, false)
822+
assert.is_true(withQuality > noQuality)
823+
assert.are.equal(noQuality, chaosResistance(0, true))
824+
assert.are.equal(withQuality, chaosResistance(20, true))
825+
end)
826+
808827
it("calculates the Companionship minion's life automatically", function()
809828
build.skillsTab:PasteSocketGroup("Fireball 20/0 1")
810829
build.skillsTab:PasteSocketGroup("Raise Zombie 20/0 1\nCompanionship 3/0 1")

‎src/Data/Skills/sup_dex.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ skills["SupportCompanionship"] = {
14241424
mod("MinionModifier", "LIST", { mod = mod("DamageTaken", "MORE", nil) }, 0, 0, { type = "Condition", var = "OnlyMinion" }),
14251425
},
14261426
["damage_removed_from_minions_before_life_or_es_%_if_only_one_minion"] = {
1427-
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
1427+
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Companionship", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
14281428
},
14291429
},
14301430
qualityStats = {

‎src/Export/Skills/sup_dex.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ return function(skills, mod, flag, skill)
183183
mod("MinionModifier", "LIST", { mod = mod("DamageTaken", "MORE", nil) }, 0, 0, { type = "Condition", var = "OnlyMinion" }),
184184
},
185185
["damage_removed_from_minions_before_life_or_es_%_if_only_one_minion"] = {
186-
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
186+
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Companionship", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
187187
},
188188
},
189189
#mods

0 commit comments

Comments
 (0)