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
36 changes: 36 additions & 0 deletions spec/System/TestAilments_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,42 @@ describe("TestAilments", function()
end)
end

it("deals 15% of one Ignite's DPS as Draugurflames", function()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\n")
build.configTab.input.customMods = "100% chance to Ignite"
rebuild()
local output = build.calcsTab.mainOutput
assert.is_true(output.IgniteDPS > 0)
assert.is_nil(output.DraugurflamesDPS)
local baseTotalDot = output.TotalDotDPS

build.configTab.input.customMods = "100% chance to Ignite\nDraugurflames burn enemies around you for 8 seconds after you Ignite a target"
rebuild()
output = build.calcsTab.mainOutput
assert.near(output.IgniteDPS * 0.15, output.DraugurflamesDPS, 0.0001)
assert.near(baseTotalDot + output.DraugurflamesDPS, output.TotalDotDPS, 0.0001)
end)

it("uses the stronger weapon's Ignite for Draugurflames whichever hand it is in", function()
local function draugurflames(mainHand, offHand)
newBuild()
for index, fireDamage in ipairs({ mainHand, offHand }) do
local item = new("Item"):Item("Rarity: RARE\nTest Axe\nSiege Axe\nAdds " .. fireDamage .. " Fire Damage")
build.itemsTab:AddItem(item, true)
build.itemsTab.slots["Weapon " .. index]:SetSelItemId(item.id)
end
build.skillsTab:PasteSocketGroup("Dual Strike 20/0 1\n")
build.configTab.input.customMods = "100% chance to Ignite\nDraugurflames burn enemies around you for 8 seconds after you Ignite a target"
build.buildFlag = true
rebuild()
return build.calcsTab.mainOutput.DraugurflamesDPS
end
local strongMain = draugurflames("400 to 600", "10 to 20")
local weakMain = draugurflames("10 to 20", "400 to 600")
assert.near(strongMain, weakMain, 0.0001)
assert.is_true(strongMain > draugurflames("10 to 20", "10 to 20") * 10)
end)

it("maximum shock value", function()
-- Shock Nova
build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nShock Nova 4/0 1\n")
Expand Down
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15541,7 +15541,7 @@ c["Does not delay Inherent Loss of Rage Regenerate 1 Rage per second for every 3
c["Does not delay Inherent Loss of Rage Skills Cost +3 Rage"]={{[1]={flags=0,keywordFlags=0,name="RageCostNoMult",type="BASE",value=3}},"Does not delay Inherent Loss of Rage "}
c["Does not inflict Mana Burn over time"]={nil,"Does not inflict Mana Burn over time "}
c["Does not inflict Mana Burn over time Inflicts Mana Burn on you when you Hit an Enemy with a Melee Weapon"]={nil,"Does not inflict Mana Burn over time Inflicts Mana Burn on you when you Hit an Enemy with a Melee Weapon "}
c["Draugurflames burn enemies around you for 8 seconds after you Ignite a target"]={nil,"Draugurflames burn enemies around you for 8 seconds after you Ignite a target "}
c["Draugurflames burn enemies around you for 8 seconds after you Ignite a target"]={{[1]={flags=0,keywordFlags=0,name="Draugurflames",type="FLAG",value=true}},nil}
c["Drop Brine Ground while moving, lasting 4 seconds"]={{[1]={flags=0,keywordFlags=0,name="CanCreateBrineGround",type="FLAG",value=true}},nil}
c["Drops Brittle Ground while moving, lasting 10 seconds"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnBrittleGround"},flags=0,keywordFlags=0,name="BrittleBase",type="BASE",value=2}},nil}
c["Drops Brittle Ground while moving, lasting 11 seconds"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnBrittleGround"},flags=0,keywordFlags=0,name="BrittleBase",type="BASE",value=2}},nil}
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/BuildDisplayStats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ local displayStats = {
{ stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, compactValue = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end },
{ stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compactValue = true, compPercent = true, flag = "showAverage" },
{ stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compactValue = true, compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end },
{ stat = "DraugurflamesDPS", label = "Draugurflames DPS", fmt = ".1f", compactValue = true, compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Draugurflames DPS exceeds in game limit" end },
{ stat = "MirageBurningGroundDPS", label = "Mirage Burning Ground DPS", compactValue = true, fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.BurningGroundDPS end, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Mirage Burning Ground DPS exceeds in game limit" end },
{ stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compactValue = true, 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 },
{ stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", compactValue = true, fmt = ".1f", compPercent = true },
Expand All @@ -95,7 +96,7 @@ local displayStats = {
{ stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compactValue = true, compPercent = true },
{ stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compactValue = true, 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 },
{ stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compactValue = true, compPercent = true },
{ stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compactValue = true, 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 and v~= o.CorruptingBloodDPS and v ~= o.MirageCausticGroundDPS and v ~= o.MirageBurningGroundDPS) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end },
{ stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compactValue = true, 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.DraugurflamesDPS and v ~= o.BleedDPS and v~= o.CorruptingBloodDPS and v ~= o.MirageCausticGroundDPS and v ~= o.MirageBurningGroundDPS) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end },
{ stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compactValue = true, compPercent = true, flag = "impale", flag = "showAverage" },
{ stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compactValue = true, 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 },
{ stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compactValue = true, compPercent = true, flag = "impale", flag = "notAverage" },
Expand Down
23 changes: 22 additions & 1 deletion src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5289,6 +5289,27 @@ function calcs.offence(env, actor, activeSkill)
}
end
end
-- Draugurflames deal a share of the strongest single Ignite as Fire damage over time, and can't be modified directly
if skillModList:Flag(nil, "Draugurflames") then
local resist = calcResistForType("Fire", dotCfg)
local takenInc = enemyDB:Sum("INC", dotCfg, "DamageTaken", "DamageTakenOverTime", "FireDamageTaken", "FireDamageTakenOverTime", "ElementalDamageTaken")
local takenMore = enemyDB:More(dotCfg, "DamageTaken", "DamageTakenOverTime", "FireDamageTaken", "FireDamageTakenOverTime", "ElementalDamageTaken")
local fireEffMult = env.mode_effective and (1 - resist / 100) * (1 + takenInc / 100) * takenMore or 1
local percent = data.misc.DraugurflamesIgnitePercent
local draugurflamesDPS = m_min(baseVal * effectMod * rateMod * fireEffMult * percent / 100, data.misc.DotDpsCap)
-- With two weapons each hand has its own Ignite, only the strongest one counts
if draugurflamesDPS > (globalOutput.DraugurflamesDPS or 0) then
globalOutput.DraugurflamesDPS = draugurflamesDPS
if globalBreakdown then
globalBreakdown.DraugurflamesDPS = {
s_format("%.1f ^8(damage per second of one ignite)", baseVal * effectMod * rateMod),
s_format("* %d%% ^8(dealt by Draugurflames)", percent),
s_format("* %.3f ^8(effective DPS modifier)", fireEffMult),
s_format("= %.1f ^8per second", globalOutput.DraugurflamesDPS)
}
end
end
end
globalOutput.IgniteDamage = output.IgniteDPS * globalOutput.IgniteDuration
if skillFlags.igniteCanStack then
output.IgniteDamage = output.IgniteDPS * globalOutput.IgniteDuration
Expand Down Expand Up @@ -6306,7 +6327,7 @@ function calcs.offence(env, actor, activeSkill)
end
end

local TotalDotDPS = (output.TotalDot or 0) + (output.TotalPoisonDPS or 0) + (m_max(output.CausticGroundDPS or 0, output.MirageCausticGroundDPS or 0 )) + (output.TotalIgniteDPS or output.IgniteDPS or 0) + (m_max(output.BurningGroundDPS or 0, output.MirageBurningGroundDPS or 0)) + (output.BleedDPS or 0) + (output.CorruptingBloodDPS or 0) + (output.DecayDPS or 0)
local TotalDotDPS = (output.TotalDot or 0) + (output.TotalPoisonDPS or 0) + (m_max(output.CausticGroundDPS or 0, output.MirageCausticGroundDPS or 0 )) + (output.TotalIgniteDPS or output.IgniteDPS or 0) + (m_max(output.BurningGroundDPS or 0, output.MirageBurningGroundDPS or 0)) + (output.DraugurflamesDPS or 0) + (output.BleedDPS or 0) + (output.CorruptingBloodDPS or 0) + (output.DecayDPS or 0)
output.TotalDotDPS = m_min(TotalDotDPS, data.misc.DotDpsCap)
if output.TotalDotDPS ~= TotalDotDPS then
output.showTotalDotDPS = true
Expand Down
1 change: 1 addition & 0 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ return {
{ modName = { "IgniteBurnRate" }, cfg = "skill" },
}, },
{ label = "Burning Ground", haveOutput = "BurningGroundFromIgnite", { format = "{0:output:BurningGroundDPS}", { breakdown = "BurningGroundDPS" } } },
{ label = "Draugurflames", haveOutput = "DraugurflamesDPS", { format = "{0:output:DraugurflamesDPS}", { breakdown = "DraugurflamesDPS" } } },
{ label = "Ignite Duration", { format = "{2:output:IgniteDuration}s",
{ breakdown = "IgniteDuration" },
{ label = "Player modifiers", modName = { "EnemyIgniteDuration", "EnemyAilmentDuration", "EnemyElementalAilmentDuration", "DamagingAilmentDuration", "IgniteBurnFaster", "IgniteBurnSlower" }, cfg = "skill" },
Expand Down
10 changes: 10 additions & 0 deletions src/Modules/Calcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
impaleDPS = 0,
igniteDPS = 0,
burningGroundDPS = 0,
draugurflamesDPS = 0,
bleedDPS = 0,
corruptingBloodDPS = 0,
decayDPS = 0,
Expand All @@ -171,6 +172,7 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
local corruptingBloodSource = ""
local igniteSource = ""
local burningGroundSource = ""
local draugurflamesSource = ""
local causticGroundSource = ""

for _, activeSkill in ipairs(fullEnv.player.activeSkillList) do
Expand Down Expand Up @@ -278,6 +280,10 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
fullDPS.burningGroundDPS = usedEnv.player.output.BurningGroundDPS
burningGroundSource = activeSkill.activeEffect.grantedEffect.name
end
if usedEnv.player.output.DraugurflamesDPS and usedEnv.player.output.DraugurflamesDPS > fullDPS.draugurflamesDPS then
fullDPS.draugurflamesDPS = usedEnv.player.output.DraugurflamesDPS
draugurflamesSource = activeSkill.activeEffect.grantedEffect.name
end
if usedEnv.player.output.PoisonDPS and usedEnv.player.output.PoisonDPS > 0 then
fullDPS.TotalPoisonDPS = fullDPS.TotalPoisonDPS + usedEnv.player.output.TotalPoisonDPS * activeSkillCount
end
Expand Down Expand Up @@ -329,6 +335,10 @@ function calcs.calcFullDPS(build, mode, override, specEnv)
t_insert(fullDPS.skills, { name = "Best Burning Ground DPS", dps = fullDPS.burningGroundDPS, count = 1, source = burningGroundSource })
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.burningGroundDPS
end
if fullDPS.draugurflamesDPS > 0 then
t_insert(fullDPS.skills, { name = "Best Draugurflames DPS", dps = fullDPS.draugurflamesDPS, count = 1, source = draugurflamesSource })
fullDPS.TotalDotDPS = fullDPS.TotalDotDPS + fullDPS.draugurflamesDPS
end
if fullDPS.TotalPoisonDPS > 0 then
fullDPS.TotalPoisonDPS = m_min(fullDPS.TotalPoisonDPS, data.misc.DotDpsCap)
t_insert(fullDPS.skills, { name = "Full Poison DPS", dps = fullDPS.TotalPoisonDPS, count = 1 })
Expand Down
1 change: 1 addition & 0 deletions src/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ data.misc = { -- magic numbers
PoisonDurationBase = 2,
IgnitePercentBase = 0.9,
IgniteDurationBase = 4,
DraugurflamesIgnitePercent = 15, -- from the game's Draugurflame keyword text, the buff stat has no fixed value
ImpaleStoredDamageBase = 0.1,
TrapTriggerRadiusBase = 10,
MineDetonationRadiusBase = 60,
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3913,6 +3913,7 @@ local specialModList = {
["(%d+)%% chance to sap enemies in chilling areas"] = function(num) return { mod("EnemySapChance", "BASE", num, { type = "ActorCondition", actor = "enemy", var = "InChillingArea" }) } end,
["(%d+)%% chance for cold snap and creeping frost to sap enemies in chilling areas"] = function(num) return { mod("EnemySapChance", "BASE", num, { type = "SkillName", skillNameList = { "Cold Snap", "Creeping Frost" }, includeTransfigured = true }, { type = "ActorCondition", actor = "enemy", var = "InChillingArea" })} end,
["drops burning ground while moving, dealing (%d+) fire damage per second for %d+ seconds"] = function(num) return { mod("DropsBurningGround", "BASE", num) } end,
["draugurflames burn enemies around you for %d+ seconds after you ignite a target"] = { flag("Draugurflames") },
["take (%d+) fire damage per second while flame%-touched"] = function(num) return { mod("FireDegen", "BASE", num, { type = "Condition", var = "AffectedByApproachingFlames" }) } end,
["gain adrenaline when you become flame%-touched"] = { flag("Condition:Adrenaline", { type = "Condition", var = "AffectedByApproachingFlames" }) },
["lose adrenaline when you cease to be flame%-touched"] = { },
Expand Down