Skip to content

Commit 7c92b8b

Browse files
authored
Prevent different types of burning/caustic ground from stacking (#4820)
1 parent 1b2d710 commit 7c92b8b

File tree

10 files changed

+56
-26
lines changed

10 files changed

+56
-26
lines changed

src/Data/Skills/act_dex.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,7 @@ skills["PoisonArrow"] = {
16841684
skill("radius", 20),
16851685
skill("radiusSecondary", 12),
16861686
skill("dotIsArea", true),
1687+
flag("dotIsCausticGround"),
16871688
},
16881689
qualityStats = {
16891690
Default = {
@@ -3657,6 +3658,7 @@ skills["FireTrap"] = {
36573658
},
36583659
baseMods = {
36593660
skill("dotIsArea", true),
3661+
flag("dotIsBurningGround"),
36603662
skill("radius", 15),
36613663
},
36623664
qualityStats = {

src/Data/Skills/act_int.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,7 @@ skills["FlameDash"] = {
36753675
},
36763676
baseMods = {
36773677
skill("dotIsArea", true),
3678+
flag("dotIsBurningGround"),
36783679
},
36793680
qualityStats = {
36803681
Default = {

src/Data/Skills/minion.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,7 @@ skills["SiegebreakerCausticGround"] = {
12401240
baseMods = {
12411241
skill("ChaosDot", 1, { type = "PerStat", stat = "Life", div = 5 }),
12421242
skill("dotIsArea", true),
1243+
flag("dotIsCausticGround"),
12431244
},
12441245
qualityStats = {
12451246
},
@@ -1262,6 +1263,7 @@ skills["ReplicaSiegebreakerBurningGround"] = {
12621263
baseMods = {
12631264
skill("FireDot", 1, { type = "PerStat", stat = "Life", div = 5 }),
12641265
skill("dotIsArea", true),
1266+
flag("dotIsBurningGround"),
12651267
},
12661268
qualityStats = {
12671269
},

src/Export/Skills/act_dex.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ local skills, mod, flag, skill = ...
315315
#baseMod skill("radius", 20)
316316
#baseMod skill("radiusSecondary", 12)
317317
#baseMod skill("dotIsArea", true)
318+
#baseMod flag("dotIsCausticGround")
318319
#mods
319320

320321
#skill ImpactingSteelReload
@@ -716,6 +717,7 @@ local skills, mod, flag, skill = ...
716717
#skill FireTrap
717718
#flags spell trap area duration
718719
#baseMod skill("dotIsArea", true)
720+
#baseMod flag("dotIsBurningGround")
719721
#baseMod skill("radius", 15)
720722
#mods
721723

src/Export/Skills/act_int.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ local skills, mod, flag, skill = ...
804804
}
805805
},
806806
#baseMod skill("dotIsArea", true)
807+
#baseMod flag("dotIsBurningGround")
807808
#mods
808809

809810
#skill Firewall

src/Export/Skills/minion.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ skills["SiegebreakerCausticGround"] = {
230230
baseMods = {
231231
skill("ChaosDot", 1, { type = "PerStat", stat = "Life", div = 5 }),
232232
skill("dotIsArea", true),
233+
flag("dotIsCausticGround"),
233234
},
234235
qualityStats = {
235236
},
@@ -252,6 +253,7 @@ skills["ReplicaSiegebreakerBurningGround"] = {
252253
baseMods = {
253254
skill("FireDot", 1, { type = "PerStat", stat = "Life", div = 5 }),
254255
skill("dotIsArea", true),
256+
flag("dotIsBurningGround"),
255257
},
256258
qualityStats = {
257259
},

src/Modules/Build.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild)
294294
{ stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end },
295295
{ stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end },
296296
{ stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage" },
297-
{ stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v + o.IgniteDPS >= data.misc.DotDpsCap and "Ignite + Burning Ground DPS exceeds in game limit" end },
297+
{ stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end },
298298
{ stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end },
299299
{ stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", fmt = ".1f", compPercent = true },
300300
{ stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end },
301-
{ stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v + o.PoisonDPS >= data.misc.DotDpsCap and "Poison + Caustic Ground DPS exceeds in game limit" end },
301+
{ stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Caustic Ground DPS exceeds in game limit" end },
302302
{ stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true },
303303
{ stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end },
304304
{ stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true },
305-
{ stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end },
305+
{ stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end },
306306
{ stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage" },
307307
{ stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end },
308308
{ stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage" },

src/Modules/CalcOffence.lua

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,6 +3289,7 @@ function calcs.offence(env, actor, activeSkill)
32893289
CausticGroundDPSCapped = data.misc.DotDpsCap - CausticGroundDPSCapped
32903290
end
32913291
globalOutput.CausticGroundDPS = CausticGroundDPSCapped
3292+
globalOutput.CausticGroundFromPoison = true
32923293
end
32933294
local durationBase
32943295
if skillData.poisonDurationIsSkillDuration then
@@ -3558,6 +3559,7 @@ function calcs.offence(env, actor, activeSkill)
35583559
BurningGroundDPSCapped = data.misc.DotDpsCap - IgniteDPSCapped
35593560
end
35603561
globalOutput.BurningGroundDPS = BurningGroundDPSCapped
3562+
globalOutput.BurningGroundFromIgnite = true
35613563
end
35623564
globalOutput.IgniteDamage = output.IgniteDPS * globalOutput.IgniteDuration
35633565
if skillFlags.igniteCanStack then
@@ -4050,9 +4052,9 @@ function calcs.offence(env, actor, activeSkill)
40504052
local total = baseVal * (1 + inc/100) * more * (1 + mult/100) * (aura or 1) * effMult
40514053
if output[damageType.."Dot"] == 0 or output[damageType.."Dot"] == nil then
40524054
output[damageType.."Dot"] = total
4053-
output.TotalDotInstance = output.TotalDotInstance + total
4055+
output.TotalDotInstance = m_min(output.TotalDotInstance + total, data.misc.DotDpsCap)
40544056
else
4055-
output.TotalDotInstance = output.TotalDotInstance + total + (output[damageType.."Dot"] or 0)
4057+
output.TotalDotInstance = m_min(output.TotalDotInstance + total + (output[damageType.."Dot"] or 0), data.misc.DotDpsCap)
40564058
end
40574059
if breakdown then
40584060
breakdown[damageType.."Dot"] = { }
@@ -4070,7 +4072,8 @@ function calcs.offence(env, actor, activeSkill)
40704072
elseif band(dotCfg.keywordFlags, KeywordFlag.Trap) ~= 0 then
40714073
speed = output.TrapThrowingSpeed
40724074
end
4073-
output.TotalDot = output.TotalDotInstance * speed * output.Duration * (skillData.dpsMultiplier or 1) * quantityMultiplier
4075+
output.TotalDot = m_min(output.TotalDotInstance * speed * output.Duration * (skillData.dpsMultiplier or 1) * quantityMultiplier, data.misc.DotDpsCap)
4076+
output.TotalDotCalcSection = output.TotalDot
40744077
if breakdown then
40754078
breakdown.TotalDot = {
40764079
s_format("%.1f ^8(Damage per Instance)", output.TotalDotInstance),
@@ -4085,8 +4088,23 @@ function calcs.offence(env, actor, activeSkill)
40854088
end
40864089
t_insert(breakdown.TotalDot, s_format("= %.1f", output.TotalDot))
40874090
end
4091+
elseif skillModList:Flag(nil, "dotIsBurningGround") then
4092+
output.TotalDot = 0
4093+
output.TotalDotCalcSection = output.TotalDotInstance
4094+
if not output.BurningGroundDPS or output.BurningGroundDPS < output.TotalDotInstance then
4095+
output.BurningGroundDPS = m_max(output.BurningGroundDPS or 0, output.TotalDotInstance)
4096+
output.BurningGroundFromIgnite = false
4097+
end
4098+
elseif skillModList:Flag(nil, "dotIsCausticGround") then
4099+
output.TotalDot = 0
4100+
output.TotalDotCalcSection = output.TotalDotInstance
4101+
if not output.CausticGroundDPS or output.CausticGroundDPS < output.TotalDotInstance then
4102+
output.CausticGroundDPS = m_max(output.CausticGroundDPS or 0, output.TotalDotInstance)
4103+
output.CausticGroundFromPoison = false
4104+
end
40884105
else
40894106
output.TotalDot = output.TotalDotInstance
4107+
output.TotalDotCalcSection = output.TotalDotInstance
40904108
end
40914109

40924110
-- The Saviour

src/Modules/CalcSections.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ return {
397397
} }
398398
} },
399399
{ 3, "Dot", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Skill Damage over Time", data = {
400-
extra = "{1:output:TotalDot} total DoT",
400+
extra = "{1:output:TotalDotCalcSection} total DoT",
401401
flag = "dot",
402402
colWidth = 95,
403403
{ { format = "All Types:", }, { format = "Physical:" }, { format = colorCodes.LIGHTNING.."Lightning:" }, { format = colorCodes.COLD.."Cold:" }, { format = colorCodes.FIRE.."Fire:" }, { format = colorCodes.CHAOS.."Chaos:" }, },
@@ -456,7 +456,7 @@ return {
456456
{ format = "{1:output:FireDot}", { breakdown = "FireDot" }, },
457457
{ format = "{1:output:ChaosDot}", { breakdown = "ChaosDot" }, },
458458
},
459-
{ label = "Skill DoT DPS", { format = "{1:output:TotalDot}", { breakdown = "TotalDot" }, }, },
459+
{ label = "Skill DoT DPS", { format = "{1:output:TotalDotCalcSection}", { breakdown = "TotalDot" }, }, },
460460
} }
461461
} },
462462
{ 1, "Speed", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Attack/Cast Rate", data = {
@@ -813,7 +813,7 @@ return {
813813
{ breakdown = "MainHand.PoisonDPS" },
814814
{ breakdown = "OffHand.PoisonDPS" },
815815
}, },
816-
{ label = "Caustic Ground DPS", haveOutput = "CausticGroundDPS", { format = "{0:output:CausticGroundDPS}", { breakdown = "CausticGroundDPS" } } },
816+
{ label = "Caustic Ground DPS", haveOutput = "CausticGroundFromPoison", { format = "{0:output:CausticGroundDPS}", { breakdown = "CausticGroundDPS" } } },
817817
{ label = "Poison Duration", { format = "{2:output:PoisonDuration}s",
818818
{ breakdown = "PoisonDuration" },
819819
{ label = "Player modifiers", modName = { "EnemyPoisonDuration", "SkillAndDamagingAilmentDuration", "PoisonFaster" }, cfg = "poison" },
@@ -877,7 +877,7 @@ return {
877877
{ breakdown = "OffHand.IgniteDPS" },
878878
{ modName = { "IgniteBurnRate" }, cfg = "skill" },
879879
}, },
880-
{ label = "Burning Ground DPS", haveOutput = "BurningGroundDPS", { format = "{0:output:BurningGroundDPS}", { breakdown = "BurningGroundDPS" } } },
880+
{ label = "Burning Ground DPS", haveOutput = "BurningGroundFromIgnite", { format = "{0:output:BurningGroundDPS}", { breakdown = "BurningGroundDPS" } } },
881881
{ label = "Ignite Duration", { format = "{2:output:IgniteDuration}s",
882882
{ breakdown = "IgniteDuration" },
883883
{ label = "Player modifiers", modName = { "EnemyIgniteDuration", "SkillAndDamagingAilmentDuration", "IgniteBurnFaster", "IgniteBurnSlower" }, cfg = "skill" },

src/Modules/Calcs.lua

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
198198

199199
local bleedSource = ""
200200
local igniteSource = ""
201-
local poisonSource = ""
201+
local burningGroundSource = ""
202+
local causticGroundSource = ""
202203
GlobalCache.numActiveSkillInFullDPS = 0
203204
for _, activeSkill in ipairs(fullEnv.player.activeSkillList) do
204205
if activeSkill.socketGroup and activeSkill.socketGroup.includeInFullDPS and not isExcludedFromFullDps(activeSkill) then
@@ -293,18 +294,19 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
293294
end
294295
if usedEnv.player.output.IgniteDPS and usedEnv.player.output.IgniteDPS > fullDPS.igniteDPS then
295296
fullDPS.igniteDPS = usedEnv.player.output.IgniteDPS
296-
if usedEnv.player.output.BurningGroundDPS then
297-
fullDPS.burningGroundDPS = usedEnv.player.output.BurningGroundDPS
298-
end
299297
igniteSource = activeSkill.activeEffect.grantedEffect.name
300298
end
299+
if usedEnv.player.output.BurningGroundDPS and usedEnv.player.output.BurningGroundDPS > fullDPS.burningGroundDPS then
300+
fullDPS.burningGroundDPS = usedEnv.player.output.BurningGroundDPS
301+
burningGroundSource = activeSkill.activeEffect.grantedEffect.name
302+
end
301303
if usedEnv.player.output.PoisonDPS and usedEnv.player.output.PoisonDPS > 0 then
302-
if usedEnv.player.output.CausticGroundDPS and usedEnv.player.output.PoisonDPS > fullDPS.poisonDPS then
303-
fullDPS.causticGroundDPS = usedEnv.player.output.CausticGroundDPS
304-
poisonSource = activeSkill.activeEffect.grantedEffect.name
305-
end
306304
fullDPS.poisonDPS = fullDPS.poisonDPS + usedEnv.player.output.PoisonDPS * (usedEnv.player.output.TotalPoisonStacks or 1) * activeSkillCount
307305
end
306+
if usedEnv.player.output.CausticGroundDPS and usedEnv.player.output.CausticGroundDPS > fullDPS.causticGroundDPS then
307+
fullDPS.causticGroundDPS = usedEnv.player.output.CausticGroundDPS
308+
causticGroundSource = activeSkill.activeEffect.grantedEffect.name
309+
end
308310
if usedEnv.player.output.ImpaleDPS and usedEnv.player.output.ImpaleDPS > 0 then
309311
fullDPS.impaleDPS = fullDPS.impaleDPS + usedEnv.player.output.ImpaleDPS * activeSkillCount
310312
end
@@ -340,19 +342,19 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
340342
if fullDPS.igniteDPS > 0 then
341343
t_insert(fullDPS.skills, { name = "Best Ignite DPS", dps = fullDPS.igniteDPS, count = 1, source = igniteSource })
342344
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.igniteDPS
343-
if fullDPS.burningGroundDPS > 0 then
344-
t_insert(fullDPS.skills, { name = "Best Burning Ground DPS", dps = fullDPS.burningGroundDPS, count = 1, source = igniteSource })
345-
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.burningGroundDPS
346-
end
345+
end
346+
if fullDPS.burningGroundDPS > 0 then
347+
t_insert(fullDPS.skills, { name = "Best Burning Ground DPS", dps = fullDPS.burningGroundDPS, count = 1, source = burningGroundSource })
348+
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.burningGroundDPS
347349
end
348350
if fullDPS.poisonDPS > 0 then
349351
fullDPS.poisonDPS = m_min(fullDPS.poisonDPS, data.misc.DotDpsCap)
350352
t_insert(fullDPS.skills, { name = "Full Poison DPS", dps = fullDPS.poisonDPS, count = 1 })
351353
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.poisonDPS
352-
if fullDPS.causticGroundDPS > 0 then
353-
t_insert(fullDPS.skills, { name = "Best Caustic Ground DPS", dps = fullDPS.causticGroundDPS, count = 1, source = poisonSource })
354-
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.causticGroundDPS
355-
end
354+
end
355+
if fullDPS.causticGroundDPS > 0 then
356+
t_insert(fullDPS.skills, { name = "Best Caustic Ground DPS", dps = fullDPS.causticGroundDPS, count = 1, source = causticGroundSource })
357+
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.causticGroundDPS
356358
end
357359
if fullDPS.impaleDPS > 0 then
358360
t_insert(fullDPS.skills, { name = "Full Impale DPS", dps = fullDPS.impaleDPS, count = 1 })

0 commit comments

Comments
 (0)