Skip to content

Commit 455ccba

Browse files
committed
Make "Low Tolerance" work with additional poisons
- Rename `Condition:SinglePoison` to `Condition:NonPoisonedOnly` (because it's not always just one) - Make `Condition:NonPoisonedOnly` no longer hard-limit poison stacks to `1` but check for mods for additional poisons instead - Adjust naming and explanation text within `ConfigOptions` - Clarify in `PoisonStacks` breakdown whether `NonPoisonedOnly` is due to config or result of calculation
1 parent 7cf93d9 commit 455ccba

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10425,7 +10425,7 @@ c["Poisons you inflict deal Damage 20% faster"]={{[1]={flags=0,keywordFlags=0,na
1042510425
c["Poisons you inflict deal Damage 40% faster"]={{[1]={flags=0,keywordFlags=0,name="PoisonFaster",type="INC",value=40}},nil}
1042610426
c["Poisons you inflict deal Damage 50% faster"]={{[1]={flags=0,keywordFlags=0,name="PoisonFaster",type="INC",value=50}},nil}
1042710427
c["Poisons you inflict during any Flask Effect have 20% chance to deal 100% more Damage"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=2097152,name="Damage",type="MORE",value=20}},nil}
10428-
c["Poisons you inflict on non-Poisoned Enemies deal 300% increased Damage"]={{[1]={[1]={type="Condition",var="SinglePoison"},flags=0,keywordFlags=2097152,name="Damage",type="INC",value=300}},nil}
10428+
c["Poisons you inflict on non-Poisoned Enemies deal 300% increased Damage"]={{[1]={[1]={type="Condition",var="NonPoisonedOnly"},flags=0,keywordFlags=2097152,name="Damage",type="INC",value=300}},nil}
1042910429
c["Precise Technique"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",value="Precise Technique"}},nil}
1043010430
c["Precision has 100% increased Mana Reservation Efficiency"]={{[1]={[1]={includeTransfigured=true,skillName="Precision",type="SkillName"},flags=0,keywordFlags=0,name="ManaReservationEfficiency",type="INC",value=100}},nil}
1043110431
c["Precision has 50% less Reservation"]={{[1]={[1]={includeTransfigured=true,skillName="Precision",type="SkillName"},flags=0,keywordFlags=0,name="Reserved",type="MORE",value=-50}},nil}

src/Data/SkillStatMap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ return {
149149
skill("poisonDurationIsSkillDuration", true),
150150
},
151151
["cannot_poison_poisoned_enemies"] = {
152-
flag("Condition:SinglePoison"),
152+
flag("Condition:NonPoisonedOnly"),
153153
mod("PoisonStackLimit", "MIN", 1),
154154
},
155155
["cannot_inflict_additional_poisons"] = {

src/Modules/CalcOffence.lua

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4442,8 +4442,8 @@ function calcs.offence(env, actor, activeSkill)
44424442
PoisonStacks = m_min(PoisonStacks, maxPoisonStacks)
44434443
end
44444444
end
4445-
if PoisonStacks < 1 and (env.configInput.multiplierPoisonOnEnemy or 0) <= 1 then
4446-
skillModList:NewMod("Condition:SinglePoison", "FLAG", true, "poison")
4445+
if PoisonStacks < additionalPoisonStacks and (env.configInput.multiplierPoisonOnEnemy or 0) == 0 then
4446+
skillModList:NewMod("Condition:NonPoisonedOnly", "FLAG", true, "Calculation")
44474447
end
44484448
if globalBreakdown then
44494449
globalBreakdown.PoisonStacks = { }
@@ -4458,15 +4458,18 @@ function calcs.offence(env, actor, activeSkill)
44584458
{ "%g ^8(quantity multiplier for this skill)", quantityMultiplier },
44594459
total = s_format("= %.2f", PoisonStacks),
44604460
})
4461-
if skillModList:Flag(nil, "Condition:SinglePoison") then
4461+
if skillModList:Flag(nil, "Condition:NonPoisonedOnly") then
44624462
t_insert(globalBreakdown.PoisonStacks, "Assuming 'non-Poisoned' Enemy")
4463-
end
4464-
if poisonStackLimit and PoisonStacks >= poisonStackLimit then
4463+
if PoisonStacks < additionalPoisonStacks then
4464+
t_insert(globalBreakdown.PoisonStacks, "^8(time between hits is longer than poison duration)")
4465+
else
4466+
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit of: " .. additionalPoisonStacks .. ")")
4467+
end
4468+
elseif poisonStackLimit and PoisonStacks >= poisonStackLimit then
44654469
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit of: " .. poisonStackLimit .. ")")
44664470
if uncappedPoisonStacks then
44674471
t_insert(globalBreakdown.PoisonStacks, "^8(uncapped poison stacks: " .. s_format("%.2f", uncappedPoisonStacks) .. ")")
44684472
end
4469-
44704473
end
44714474
end
44724475
for sub_pass = 1, 2 do
@@ -4556,8 +4559,8 @@ function calcs.offence(env, actor, activeSkill)
45564559
globalBreakdown.PoisonEffMult = breakdown.effMult("Chaos", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
45574560
end
45584561
end
4559-
if skillModList:Flag(nil, "Condition:SinglePoison") then
4560-
PoisonStacks = m_min(1, PoisonStacks)
4562+
if skillModList:Flag(nil, "Condition:NonPoisonedOnly") then
4563+
PoisonStacks = m_min(additionalPoisonStacks, PoisonStacks)
45614564
end
45624565
globalOutput.PoisonStacks = PoisonStacks
45634566
local effectMod = calcLib.mod(skillModList, dotCfg, "AilmentEffect")

src/Modules/CalcSections.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@ 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" }, cfg = "skill" },
927+
{ label = "Poison Stack Limits", modName = { "PoisonStackLimit", "CannotMultiplePoison", "Condition:NonPoisonedOnly" }, cfg = "skill" },
928+
{ label = "Poison Stack Limits", modName = { "Condition:NonPoisonedOnly" } },
928929
}, },
929930
{ label = "Total Increased", { format = "{0:mod:1}%", { modName = { "Damage", "ChaosDamage" }, modType = "INC", cfg = "poison" }, }, },
930931
{ label = "Total More", { format = "{0:mod:1}%", { modName = { "Damage", "ChaosDamage" }, modType = "MORE", cfg = "poison" }, }, },

src/Modules/ConfigOptions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,8 +1745,8 @@ Huge sets the radius to 11.
17451745
{ var = "multiplierPoisonOnEnemy", type = "count", label = "# of Poison on enemy:", ifEnemyMult = "PoisonStack", implyCond = "Poisoned", apply = function(val, modList, enemyModList)
17461746
enemyModList:NewMod("Multiplier:PoisonStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
17471747
end },
1748-
{ 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)
1749-
modList:NewMod("Condition:SinglePoison", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1748+
{ var = "conditionNonPoisonedOnly", type = "check", label = "Is the enemy non-Poisoned?", ifCond = "NonPoisonedOnly", tooltip = "This is for low tolerance, but will limit you to only applying poison a single time\n^8(Note that you can still apply multiple stacks via 'inflict additional poison' mods)^7", apply = function(val, modList, enemyModList)
1749+
modList:NewMod("Condition:NonPoisonedOnly", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17501750
end },
17511751
{ var = "multiplierCurseExpiredOnEnemy", type = "count", label = "#% of Curse Expired on enemy:", ifEnemyMult = "CurseExpired", apply = function(val, modList, enemyModList)
17521752
enemyModList:NewMod("Multiplier:CurseExpired", "BASE", val, "Config", { type = "Condition", var = "Effective" })

src/Modules/ModParser.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,10 +3740,10 @@ local specialModList = {
37403740
} end,
37413741

37423742
["poisons you inflict on non%-poisoned enemies deal (%d+)%% increased damage"] = function(num) return {
3743-
mod("Damage", "INC", num, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "SinglePoison" })
3743+
mod("Damage", "INC", num, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "NonPoisonedOnly" })
37443744
} end,
37453745
["poisons inflicted by sunder or ground slam on non%-poisoned enemies deal (%d+)%% increased damage"] = function(num) return {
3746-
mod("Damage", "INC", num, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "SinglePoison" }, { type = "SkillName", skillNameList = { "Sunder", "Ground Slam" }, includeTransfigured = true })
3746+
mod("Damage", "INC", num, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "NonPoisonedOnly" }, { type = "SkillName", skillNameList = { "Sunder", "Ground Slam" }, includeTransfigured = true })
37473747
} end,
37483748
["poisons on you expire (%d+)%% slower"] = function(num) return { mod("SelfPoisonDebuffExpirationRate", "BASE", -num) } end,
37493749
["(%d+)%% chance to inflict an additional poison on the same target when you inflict poison"] = function(num) return { mod("AdditionalPoisonChance", "BASE", num) } end,

0 commit comments

Comments
 (0)