Skip to content

Commit 1e4bb6c

Browse files
committed
Further improve PoisonStacks breakdown
- Now shows active poison stack limit - Now shows what uncapped poison stacks would be (to gauge if you're close to being under cap) - Changed wording of "Capped to 1" for `Condition:SinglePoison` hint to "Assume non-Poisoned Enemy" because that is what it is actually used for
1 parent bdacae5 commit 1e4bb6c

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/Modules/CalcOffence.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4373,12 +4373,13 @@ function calcs.offence(env, actor, activeSkill)
43734373
-- Calculate average number of poisons that will be active on the enemy at once
43744374
local poisonStackLimit = skillModList:Min(cfg, "PoisonStackLimit")
43754375
local PoisonStacks = output.HitChance / 100 * poisonChance * additionalPoisonStacks * skillData.dpsMultiplier * (skillData.stackMultiplier or 1) * quantityMultiplier
4376+
local uncappedPoisonStacks
43764377
if (globalOutput.HitSpeed or globalOutput.Speed) > 0 then
43774378
--assume skills with no cast, attack, or cooldown time are single cast
43784379
PoisonStacks = PoisonStacks * globalOutput.PoisonDuration * (globalOutput.HitSpeed or globalOutput.Speed)
43794380

43804381
-- If stack limit exists, avg. poison stack is more complicated
4381-
if poisonStackLimit and poisonStackLimit > 0 and additionalPoisonStacks > 1 and PoisonStacks > poisonStackLimit then
4382+
if poisonStackLimit and poisonStackLimit > 0 and PoisonStacks > poisonStackLimit then
43824383
-- Calc number of avg. poisons applied per hit (without hitrate multipliers)
43834384
local singleHitPoisonChance = output.HitChance / 100 * poisonChance
43844385
local singleHitPoisonStacks = singleHitPoisonChance * additionalPoisonStacks
@@ -4388,6 +4389,7 @@ function calcs.offence(env, actor, activeSkill)
43884389
local maxPoisonStacks = numPoisoningHits * singleHitPoisonStacks
43894390

43904391
-- Only use `maxPoisonStacks` if original value exceeds it
4392+
uncappedPoisonStacks = m_max(PoisonStacks, maxPoisonStacks)
43914393
PoisonStacks = m_min(PoisonStacks, maxPoisonStacks)
43924394
end
43934395
end
@@ -4408,10 +4410,14 @@ function calcs.offence(env, actor, activeSkill)
44084410
total = s_format("= %.2f", PoisonStacks),
44094411
})
44104412
if skillModList:Flag(nil, "Condition:SinglePoison") then
4411-
t_insert(globalBreakdown.PoisonStacks, "Capped to 1")
4413+
t_insert(globalBreakdown.PoisonStacks, "Assuming 'non-Poisoned' Enemy")
44124414
end
44134415
if poisonStackLimit and PoisonStacks >= poisonStackLimit then
4414-
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit)")
4416+
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit of: " .. poisonStackLimit .. ")")
4417+
if uncappedPoisonStacks then
4418+
t_insert(globalBreakdown.PoisonStacks, "^8(uncapped poison stacks: " .. s_format("%.2f", uncappedPoisonStacks) .. ")")
4419+
end
4420+
44154421
end
44164422
end
44174423
for sub_pass = 1, 2 do

src/Modules/CalcSections.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ return {
924924
{ label = "inflict # additional poisons", notFlag = "attack", modName = { "AdditionalPoisonStacks" }, modType = "BASE", cfg = "skill" },
925925
{ label = "inflict # additional poisons (Main Hand)", flag = "weapon1Attack", modName = { "AdditionalPoisonStacks" }, modType = "BASE", cfg = "weapon1" },
926926
{ label = "inflict # additional poisons (Off Hand)", flag = "weapon2Attack", modName = { "AdditionalPoisonStacks" }, modType = "BASE", cfg = "weapon2" },
927-
{ label = "Poison Stack Limits", modName = { "PoisonStackLimit", "CannotMultiplePoison" } },
927+
{ label = "Poison Stack Limits", modName = { "PoisonStackLimit", "CannotMultiplePoison" }, cfg = "skill" },
928928
}, },
929929
{ label = "Total Increased", { format = "{0:mod:1}%", { modName = { "Damage", "ChaosDamage" }, modType = "INC", cfg = "poison" }, }, },
930930
{ label = "Total More", { format = "{0:mod:1}%", { modName = { "Damage", "ChaosDamage" }, modType = "MORE", cfg = "poison" }, }, },

0 commit comments

Comments
 (0)