Skip to content

Commit

Permalink
Implement flamethrower trap DPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilylicious committed Aug 10, 2023
1 parent 1981887 commit 772fa18
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
18 changes: 17 additions & 1 deletion src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4275,15 +4275,29 @@ skills["FlamethrowerTrap"] = {
skillTypes = { [SkillType.Spell] = true, [SkillType.Duration] = true, [SkillType.Damage] = true, [SkillType.Mineable] = true, [SkillType.Area] = true, [SkillType.Trapped] = true, [SkillType.Fire] = true, [SkillType.AreaSpell] = true, [SkillType.Cooldown] = true, },
statDescriptionScope = "skill_stat_descriptions",
castTime = 1,
parts = {
{
name = "One trap",
},
{
name = "Average # traps",
},
},
preDamageFunc = function(activeSkill, output, breakdown)
-- many unknown stats. can't calculate DPS
-- Unknown stats provided by asking GGG
local t_insert = table.insert
local s_format = string.format

local duration = output.Duration
local cooldown = output.TrapCooldown
local averageActiveTraps = duration / cooldown
output.AverageActiveTraps = averageActiveTraps
activeSkill.skillData.hitTimeOverride = 0.1 -- Source: Private message from GGG employee

if activeSkill.skillPart == 2 then
activeSkill.skillData.dpsMultiplier = averageActiveTraps
end

if breakdown then
breakdown.AverageActiveTraps = { }
t_insert(breakdown.AverageActiveTraps, "Average active traps, not considering stored cooldown uses:")
Expand All @@ -4296,6 +4310,8 @@ skills["FlamethrowerTrap"] = {
["flamethrower_trap_damage_+%_final_vs_burning_enemies"] = {
mod("Damage", "MORE", nil, bit.band(ModFlag.Hit, ModFlag.Ailment), 0, { type = "ActorCondition", actor = "enemy", var = "Burning" }),
},
["base_skill_show_average_damage_instead_of_dps"] = {
},
},
baseFlags = {
spell = true,
Expand Down
18 changes: 17 additions & 1 deletion src/Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -880,15 +880,29 @@ local skills, mod, flag, skill = ...

#skill FlamethrowerTrap
#flags spell trap area duration
parts = {
{
name = "One trap",
},
{
name = "Average # traps",
},
},
preDamageFunc = function(activeSkill, output, breakdown)
-- many unknown stats. can't calculate DPS
-- Unknown stats provided by asking GGG
local t_insert = table.insert
local s_format = string.format

local duration = output.Duration
local cooldown = output.TrapCooldown
local averageActiveTraps = duration / cooldown
output.AverageActiveTraps = averageActiveTraps
activeSkill.skillData.hitTimeOverride = 0.1 -- Source: Private message from GGG employee

if activeSkill.skillPart == 2 then
activeSkill.skillData.dpsMultiplier = averageActiveTraps
end

if breakdown then
breakdown.AverageActiveTraps = { }
t_insert(breakdown.AverageActiveTraps, "Average active traps, not considering stored cooldown uses:")
Expand All @@ -901,6 +915,8 @@ local skills, mod, flag, skill = ...
["flamethrower_trap_damage_+%_final_vs_burning_enemies"] = {
mod("Damage", "MORE", nil, bit.band(ModFlag.Hit, ModFlag.Ailment), 0, { type = "ActorCondition", actor = "enemy", var = "Burning" }),
},
["base_skill_show_average_damage_instead_of_dps"] = {
},
},
#baseMod skill("radius", 32)
#mods
Expand Down

0 comments on commit 772fa18

Please sign in to comment.