Skip to content
Merged
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
42 changes: 37 additions & 5 deletions src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3775,7 +3775,10 @@ skills["ExplosiveArrow"] = {
area = false,
},
},
explosiveArrowFunc = function(activeSkill, output, globalOutput, env)
explosiveArrowFunc = function(activeSkill, output, globalOutput, globalBreakdown, env)
local t_insert = table.insert
local s_format = string.format

if activeSkill.skillPart ~= 1 and activeSkill.skillPart ~= 2 then
-- This doesn't apply to the "Arrow" skill part. That works like a normal skill.
return
Expand All @@ -3793,11 +3796,12 @@ skills["ExplosiveArrow"] = {

local barrageProjectiles = nil
if skillModList:Flag(nil, "SequentialProjectiles") and not skillModList:Flag(nil, "OneShotProj") and not skillModList:Flag(nil,"NoAdditionalProjectiles") and not skillModList:Flag(nil, "TriggeredBySnipe") then
barrageProjectiles = skillModList:Sum("BASE", skillCfg, "ProjectileCount")
barrageProjectiles = skillModList:Sum("BASE", activeSkill.skillCfg, "ProjectileCount")
activeSkill.skillData.dpsMultiplier = activeSkill.skillData.dpsMultiplier / barrageProjectiles -- cancel out the normal dps multiplier from barrage that applies to most other skills
end

local fuseApplicationRate = (output.HitChance / 100) * globalOutput.Speed * globalOutput.ActionSpeedMod * activeSkill.skillData.dpsMultiplier * (barrageProjectiles or 1)
local initialApplicationRate = fuseApplicationRate
if activeSkill.skillFlags.totem then
fuseApplicationRate = fuseApplicationRate * activeTotems
end
Expand All @@ -3823,13 +3827,42 @@ skills["ExplosiveArrow"] = {
end

globalOutput.HitSpeed = 1 / globalOutput.HitTime

if globalBreakdown and globalOutput.MaxExplosiveArrowFuseCalculated then
globalBreakdown.MaxExplosiveArrowFuseCalculated = {}
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("%.2f ^8(attack speed)", globalOutput.Speed))
if output.HitChance < 100 then
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("x %.2f ^8(hit chance)", output.HitChance / 100))
end
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("x %.2f ^8(action speed)", globalOutput.ActionSpeedMod))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("x %.2f ^8(projectiles)", barrageProjectiles or 1))
if activeSkill.skillFlags.totem then
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("= %.2f ^8(fuse rate)", initialApplicationRate))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("x %d ^8(active totems)", activeTotems))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("= %.2f ^8(fuse rate)", fuseApplicationRate))
else
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("= %.2f ^8(fuse rate)", fuseApplicationRate))
end
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("x %.2f ^8(duration)", duration))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("+ 1 ^8(initial hit)"))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("= %.2f", (fuseApplicationRate * duration) + 1))
t_insert(globalBreakdown.MaxExplosiveArrowFuseCalculated, s_format("= %d ^8(rounded down, capped at max)", globalOutput.MaxExplosiveArrowFuseCalculated))

globalBreakdown.ExplosionsPerSecond = {}
t_insert(globalBreakdown.ExplosionsPerSecond, s_format("1 ^8(second)"))
t_insert(globalBreakdown.ExplosionsPerSecond, s_format(" / %d ^8(max fuses)", globalOutput.MaxExplosiveArrowFuseCalculated))
t_insert(globalBreakdown.ExplosionsPerSecond, s_format(" / %.2f ^8(fuse rate)", fuseApplicationRate))
t_insert(globalBreakdown.ExplosionsPerSecond, s_format("= %.2f ^8(explosions/s)", globalOutput.HitSpeed))

end

end,
statMap = {
["explosive_arrow_explosion_minimum_added_fire_damage"] = {
mod("FireMin", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }),
mod("FireMin", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStage" }),
},
["explosive_arrow_explosion_maximum_added_fire_damage"] = {
mod("FireMax", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }),
mod("FireMax", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStage" }),
},
["fuse_arrow_explosion_radius_+_per_fuse_arrow_orb"] = {
skill("radiusExtra", nil, { type = "Multiplier", var = "ExplosiveArrowStage", limitVar = "ExplosiveArrowMaxBonusRadius", limitTotal = true }),
Expand Down Expand Up @@ -3861,7 +3894,6 @@ skills["ExplosiveArrow"] = {
baseMods = {
skill("radius", 15),
skill("showAverage", true, { type = "SkillPart", skillPartList = { 1, 2 } }),
mod("Damage", "MORE", 100, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStageAfterFirst" }),
},
qualityStats = {
Default = {
Expand Down
5 changes: 2 additions & 3 deletions src/Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ local skills, mod, flag, skill = ...
end,
statMap = {
["explosive_arrow_explosion_minimum_added_fire_damage"] = {
mod("FireMin", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }),
mod("FireMin", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStage" }),
},
["explosive_arrow_explosion_maximum_added_fire_damage"] = {
mod("FireMax", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }),
mod("FireMax", "BASE", nil, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStage" }),
},
["fuse_arrow_explosion_radius_+_per_fuse_arrow_orb"] = {
skill("radiusExtra", nil, { type = "Multiplier", var = "ExplosiveArrowStage", limitVar = "ExplosiveArrowMaxBonusRadius", limitTotal = true }),
Expand All @@ -794,7 +794,6 @@ local skills, mod, flag, skill = ...
},
#baseMod skill("radius", 15)
#baseMod skill("showAverage", true, { type = "SkillPart", skillPartList = { 1, 2 } })
#baseMod mod("Damage", "MORE", 100, 0, 0, { type = "SkillPart", skillPartList = { 1, 2 } }, { type = "Multiplier", var = "ExplosiveArrowStageAfterFirst" })
#mods

#skill ExplosiveConcoction
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ function calcs.offence(env, actor, activeSkill)
-- Calculate maximum sustainable fuses and explosion rate for Explosive Arrow
-- Does not take into account mines or traps
if activeSkill.activeEffect.grantedEffect.name == "Explosive Arrow" then
activeSkill.activeEffect.grantedEffect.explosiveArrowFunc(activeSkill, output, globalOutput, env)
activeSkill.activeEffect.grantedEffect.explosiveArrowFunc(activeSkill, output, globalOutput, globalBreakdown, env)
end

-- Calculate crit chance, crit multiplier, and their combined effect
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ return {
{ breakdown = "BrandAttachmentRange" },
{ modName = "BrandAttachmentRange", cfg = "skill"},
}, },
{ label = "Max Sust. Fuses", haveOutput = "MaxExplosiveArrowFuseCalculated", { format = "{0:output:MaxExplosiveArrowFuseCalculated} Fuses", }, },
{ label = "Max Sust. Fuses", haveOutput = "MaxExplosiveArrowFuseCalculated", { format = "{0:output:MaxExplosiveArrowFuseCalculated} Fuses", { breakdown = "MaxExplosiveArrowFuseCalculated" }, }, },
{ label = "Explosions /s", haveOutput = "MaxExplosiveArrowFuseCalculated", { format = "{2:output:HitSpeed}", { breakdown = "ExplosionsPerSecond" }, }, },
{ label = "Overlap Chance", haveOutput = "OverlapChance", { format = "{2:output:OverlapChance}%", { breakdown = "OverlapChance" }, }, },
{ label = "Trap Cooldown", haveOutput = "TrapCooldown", { format = "{3:output:TrapCooldown}s",
{ breakdown = "TrapCooldown" },
Expand Down