Skip to content

Commit 63801a2

Browse files
committed
update to allow traps and mines, fix dps and cost for traps and mines
1 parent 812ac61 commit 63801a2

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/Modules/CalcOffence.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -760,16 +760,16 @@ function calcs.offence(env, actor, activeSkill)
760760
skillData.dpsMultiplier = skillModList:Sum("BASE", skillCfg, "ProjectileCount")
761761
end
762762

763+
-- attack traps and mines can repeat with Fatal Flourish
764+
local fatalFlourishAttackTrapOrMine = activeSkill.skillTypes[SkillType.Attack] and (activeSkill.skillTypes[SkillType.Trapped] or activeSkill.skillTypes[SkillType.RemoteMined])
763765
local function repeatSkillTypesCheck(activeSkillTypes)
764-
local excludeSkillTypes = { SkillType.SummonsTotem, SkillType.Trapped, SkillType.RemoteMined, SkillType.Triggered,
765-
SkillType.HasReservation, SkillType.Instant, SkillType.NonRepeatable, SkillType.CreatesMinion,
766-
}
766+
local excludeSkillTypes = { SkillType.SummonsTotem, SkillType.HasReservation, SkillType.Instant, SkillType.NonRepeatable, SkillType.CreatesMinion }
767767
for _, type in ipairs(excludeSkillTypes) do
768768
if activeSkillTypes[type] then
769769
return false
770770
end
771771
end
772-
return (activeSkillTypes[SkillType.Multicastable] or activeSkillTypes[SkillType.Multistrikeable])
772+
return (fatalFlourishAttackTrapOrMine or activeSkillTypes[SkillType.Multicastable] or activeSkillTypes[SkillType.Multistrikeable])
773773
end
774774
output.Repeats = 1 + (repeatSkillTypesCheck(activeSkill.skillTypes) and (skillModList:Sum("BASE", skillCfg, "RepeatCount") or 0) or 0)
775775
if output.Repeats > 1 then
@@ -807,7 +807,7 @@ function calcs.offence(env, actor, activeSkill)
807807
local modValue = mod.value
808808
DamageFinalMoreValueTotal = DamageFinalMoreValueTotal * (1 + modValue / 100)
809809
DamageMoreValueTotal = DamageMoreValueTotal + modValue
810-
if env.configInput.repeatMode == "AVERAGE" and not skillModList:Flag(nil, "OnlyFinalRepeat") then
810+
if env.configInput.repeatMode == "AVERAGE" and not skillModList:Flag(nil, "OnlyFinalRepeat") and not fatalFlourishAttackTrapOrMine then
811811
modValue = modValue / output.Repeats
812812
end
813813
skillModList:NewMod("Damage", "MORE", modValue, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
@@ -5636,6 +5636,10 @@ function calcs.offence(env, actor, activeSkill)
56365636
local useSpeed = 1
56375637
local timeType
56385638
if skillFlags.trap or skillFlags.mine then
5639+
-- the repeat from Fatal Flourish does not increase the cost of traps or mines
5640+
if fatalFlourishAttackTrapOrMine and repeats > 1 then
5641+
repeats = repeats - 1
5642+
end
56395643
local preSpeed = output.TrapThrowingSpeed or output.MineLayingSpeed
56405644
local cooldown = output.TrapCooldown or output.Cooldown
56415645
useSpeed = (cooldown and cooldown > 0 and 1 / cooldown or preSpeed) / repeats

0 commit comments

Comments
 (0)