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
23 changes: 23 additions & 0 deletions spec/System/TestTriggers_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10361,6 +10361,9 @@ skills["LancingSteelAltX"] = {
attack = true,
projectile = true,
},
baseMods = {
skill("triggerWithAllProjectilesHit", true),
},
qualityStats = {
{ "base_number_of_projectiles", 0.1 },
},
Expand Down
1 change: 1 addition & 0 deletions src/Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down