diff --git a/spec/System/TestTriggers_spec.lua b/spec/System/TestTriggers_spec.lua index 4628749ed50..de079c3bc9a 100644 --- a/spec/System/TestTriggers_spec.lua +++ b/spec/System/TestTriggers_spec.lua @@ -1117,6 +1117,29 @@ describe("TestTriggers", function() assert.True(build.calcsTab.mainOutput.Minion.SkillTriggerRate ~= nil) end) + it("Holy Relic of Conviction counts all Spraying projectiles in either DPS part", function() + equipReviewSword() + build.skillsTab:PasteSocketGroup("Summon Holy Relic of Conviction 20/0 1\n") + build.skillsTab:PasteSocketGroup("Lancing Steel of Spraying 20/20 1\n") + runCallback("OnFrame") + + local srcInstance = build.skillsTab.socketGroupList[2].displaySkillList[1].activeEffect.srcInstance + for _, part in ipairs({ 1, 2 }) do + srcInstance.skillPart = part + build.buildFlag = true + runCallback("OnFrame") + + local env = build.calcsTab.mainEnv + local source = env.player.activeSkillList[2] + local cached = GlobalCache.cachedData[env.mode][cacheSkillUUID(source, env)] + local output = cached.Env.player.output + local rate = cached.HitSpeed or cached.Speed + assert.is_true(output.ProjectileCount > 1) + assert.are.near(rate * output.ProjectileCount, build.calcsTab.mainOutput.Minion.EffectiveSourceRate, 0.0001) + assert.are.near(output.AverageDamage * rate * (part == 1 and 1 or output.ProjectileCount), output.TotalDPS, 0.0001) + end + end) + it("Trigger Cast when Damage Taken", function() build.skillsTab:PasteSocketGroup("Cast when Damage Taken 20/0 1\nArc 20/0 1\n") runCallback("OnFrame") diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index f3ff59e0cbb..c7f6c583e04 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -10361,6 +10361,9 @@ skills["LancingSteelAltX"] = { attack = true, projectile = true, }, + baseMods = { + skill("triggerWithAllProjectilesHit", true), + }, qualityStats = { { "base_number_of_projectiles", 0.1 }, }, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index d518bed4ef8..4390ced1bdd 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -2085,6 +2085,7 @@ return function(skills, mod, flag, skill) #skill LancingSteelAltX #flags attack projectile +#baseMod skill("triggerWithAllProjectilesHit", true) preDamageFunc = function(activeSkill, output) if activeSkill.skillPart == 2 then local percentReducedProjectiles = (output.ProjectileCount - 1) / output.ProjectileCount diff --git a/src/Modules/CalcTriggers.lua b/src/Modules/CalcTriggers.lua index 25a701c352a..76f0cc34d7e 100644 --- a/src/Modules/CalcTriggers.lua +++ b/src/Modules/CalcTriggers.lua @@ -481,8 +481,8 @@ local function defaultTriggerHandler(env, config) end end - --Account for skills that can hit multiple times per use - if source and GlobalCache.cachedData[env.mode][uuid] and source.skillPartName and source.skillPartName:match("(.*)All(.*)Projectiles(.*)") and source.skillFlags.projectile then + -- Opted-in skills count all projectiles regardless of their selected DPS part. + if source and GlobalCache.cachedData[env.mode][uuid] and source.skillFlags.projectile and (source.skillData.triggerWithAllProjectilesHit or source.skillPartName and source.skillPartName:match("(.*)All(.*)Projectiles(.*)")) then local multiHitDpsMult = GlobalCache.cachedData[env.mode][uuid].Env.player.output.ProjectileCount or 1 trigRate = trigRate * multiHitDpsMult if breakdown then