Skip to content

Commit bbbd03f

Browse files
unrealdreamzLocalIdentity
andauthored
Gate Barrage incorrectly granting damage to some skills (#1897)
* Gate Barrage repeats to Barrageable skills * Formatting --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 6eff90c commit bbbd03f

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

spec/System/TestSkills_spec.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,40 @@ describe("TestSkills", function()
346346
assert.are.equals(2, arcSkill.skillModList:GetMultiplier("SupportCount", arcSkill.skillCfg))
347347
assert.are.equals(3, arcSkill.skillModList:Sum("BASE", arcSkill.skillCfg, "GemSupportLevel"))
348348
end)
349+
350+
it("Test Barrage only repeats Barrageable skills", function()
351+
build.itemsTab:CreateDisplayItemFromRaw([[
352+
New Item
353+
Warmonger Bow
354+
Quality: 0
355+
]])
356+
build.itemsTab:AddDisplayItem()
357+
runCallback("OnFrame")
358+
359+
build.skillsTab:PasteSocketGroup("Spiral Volley 20/0 1")
360+
runCallback("OnFrame")
361+
local spiralVolleyDPS = build.calcsTab.mainOutput.TotalDPS
362+
363+
build.skillsTab:PasteSocketGroup("Barrage 20/0 1")
364+
runCallback("OnFrame")
365+
assert.are.equals(spiralVolleyDPS, build.calcsTab.mainOutput.TotalDPS)
366+
367+
newBuild()
368+
369+
build.itemsTab:CreateDisplayItemFromRaw([[
370+
New Item
371+
Warmonger Bow
372+
Quality: 0
373+
]])
374+
build.itemsTab:AddDisplayItem()
375+
runCallback("OnFrame")
376+
377+
build.skillsTab:PasteSocketGroup("Ice Shot 20/0 1")
378+
runCallback("OnFrame")
379+
local iceShotDPS = build.calcsTab.mainOutput.TotalDPS
380+
381+
build.skillsTab:PasteSocketGroup("Barrage 20/0 1")
382+
runCallback("OnFrame")
383+
assert.True(build.calcsTab.mainOutput.TotalDPS > iceShotDPS)
384+
end)
349385
end)

src/Modules/CalcOffence.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ function calcs.offence(env, actor, activeSkill)
942942
skillModList:NewMod("AreaOfEffect", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
943943
end
944944
end
945-
if skillModList:Flag(nil, "SequentialProjectiles") and not skillModList:Flag(nil, "OneShotProj") and not skillModList:Flag(nil,"NoAdditionalProjectiles") and not skillModList:Flag(nil, "TriggeredBySnipe") then
945+
if activeSkill.skillTypes[SkillType.Barrageable] and skillModList:Flag(nil, "SequentialProjectiles") and not skillModList:Flag(nil, "OneShotProj") and not skillModList:Flag(nil, "NoAdditionalProjectiles") and not skillModList:Flag(nil, "TriggeredBySnipe") then
946946
-- Applies DPS multiplier based on projectile count
947947
if skillModList:Sum("BASE", skillCfg, "BarrageRepeats") > 0 then
948948
local dpsMulti = (1 + skillModList:Sum("BASE", skillCfg, "BarrageRepeats")) * (calcLib.mod(skillModList, skillCfg, "BarrageRepeatDamage"))

0 commit comments

Comments
 (0)