Skip to content

Commit 0f64b29

Browse files
committed
cap poison and add tooltip
1 parent af9f355 commit 0f64b29

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/Modules/CalcOffence.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,9 @@ function calcs.offence(env, actor, activeSkill)
32303230
if PoisonStacks < 1 and (env.configInput.multiplierPoisonOnEnemy or 0) <= 1 then
32313231
skillModList:NewMod("Condition:SinglePoison", "FLAG", true, "poison")
32323232
end
3233+
if skillModList:Flag(nil, "Condition:SinglePoison") then
3234+
PoisonStacks = m_min(PoisonStacks, 1)
3235+
end
32333236
for sub_pass = 1, 2 do
32343237
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
32353238
dotCfg.skillCond["CriticalStrike"] = false
@@ -3336,6 +3339,9 @@ function calcs.offence(env, actor, activeSkill)
33363339
output.TotalPoisonDPS = output.PoisonDPS
33373340
else
33383341
output.TotalPoisonStacks = output.HitChance / 100 * output.PoisonChance / 100 * PoisonStacks
3342+
if skillModList:Flag(nil, "Condition:SinglePoison") and (PoisonStacks >= 1) then
3343+
output.TotalPoisonStacks = 1
3344+
end
33393345
output.TotalPoisonDPS = m_min(PoisonDPSCapped * output.TotalPoisonStacks, data.misc.DotDpsCap)
33403346
end
33413347
if breakdown then
@@ -3409,6 +3415,9 @@ function calcs.offence(env, actor, activeSkill)
34093415
{ "%g ^8(quantity multiplier for this skill)", quantityMultiplier },
34103416
total = s_format("= %.1f", output.TotalPoisonStacks),
34113417
})
3418+
if skillModList:Flag(nil, "Condition:SinglePoison") then
3419+
t_insert(breakdown.TotalPoisonStacks, "Capped to 1")
3420+
end
34123421
end
34133422
end
34143423
end

src/Modules/CalcSections.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ return {
828828
{ breakdown = "MainHand.TotalPoisonStacks" },
829829
{ breakdown = "OffHand.TotalPoisonStacks" },
830830
{ breakdown = "TotalPoisonStacks" },
831+
{ label = "Capped to 1 poison", modName = "Condition:SinglePoison" },
831832
}, },
832833
} }
833834
} },

src/Modules/ConfigOptions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ return {
12271227
{ var = "multiplierPoisonOnEnemy", type = "count", label = "# of Poison on enemy:", implyCond = "Poisoned", apply = function(val, modList, enemyModList)
12281228
enemyModList:NewMod("Multiplier:PoisonStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
12291229
end },
1230-
{ var = "conditionSinglePoison", type = "check", label = "Single Poison on enemy?", ifCond = "SinglePoison", apply = function(val, modList, enemyModList)
1230+
{ var = "conditionSinglePoison", type = "check", label = "Cap to Single Poison on enemy?", ifCond = "SinglePoison", tooltip = "This is for low tolerance, but will limit you to only applying a single poison on the enemy", apply = function(val, modList, enemyModList)
12311231
modList:NewMod("Condition:SinglePoison", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
12321232
end },
12331233
{ var = "multiplierWitheredStackCount", type = "count", label = "# of Withered Stacks:", ifFlag = "Condition:CanWither", tooltip = "Withered applies 6% increased ^xD02090Chaos ^7Damage Taken to the enemy, up to 15 stacks.", apply = function(val, modList, enemyModList)

0 commit comments

Comments
 (0)