Skip to content

Commit fd58246

Browse files
authored
Add support for "Lethal Dose" support and make "non-Poisoned Enemies" work with additional poisons (#9576)
* 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 * Fix doubled breakdown section
1 parent 6a5c80f commit fd58246

6 files changed

Lines changed: 18 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
@@ -4443,8 +4443,8 @@ function calcs.offence(env, actor, activeSkill)
44434443
PoisonStacks = m_min(PoisonStacks, maxPoisonStacks)
44444444
end
44454445
end
4446-
if PoisonStacks < 1 and (env.configInput.multiplierPoisonOnEnemy or 0) <= 1 then
4447-
skillModList:NewMod("Condition:SinglePoison", "FLAG", true, "poison")
4446+
if PoisonStacks < additionalPoisonStacks and (env.configInput.multiplierPoisonOnEnemy or 0) == 0 then
4447+
skillModList:NewMod("Condition:NonPoisonedOnly", "FLAG", true, "Calculation")
44484448
end
44494449
if globalBreakdown then
44504450
globalBreakdown.PoisonStacks = { }
@@ -4459,15 +4459,18 @@ function calcs.offence(env, actor, activeSkill)
44594459
{ "%g ^8(quantity multiplier for this skill)", quantityMultiplier },
44604460
total = s_format("= %.2f", PoisonStacks),
44614461
})
4462-
if skillModList:Flag(nil, "Condition:SinglePoison") then
4462+
if skillModList:Flag(nil, "Condition:NonPoisonedOnly") then
44634463
t_insert(globalBreakdown.PoisonStacks, "Assuming 'non-Poisoned' Enemy")
4464-
end
4465-
if poisonStackLimit and PoisonStacks >= poisonStackLimit then
4464+
if PoisonStacks < additionalPoisonStacks then
4465+
t_insert(globalBreakdown.PoisonStacks, "^8(time between hits is longer than poison duration)")
4466+
else
4467+
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit of: " .. additionalPoisonStacks .. ")")
4468+
end
4469+
elseif poisonStackLimit and PoisonStacks >= poisonStackLimit then
44664470
t_insert(globalBreakdown.PoisonStacks, "^8(affected by poison stack limit of: " .. poisonStackLimit .. ")")
44674471
if uncappedPoisonStacks then
44684472
t_insert(globalBreakdown.PoisonStacks, "^8(uncapped poison stacks: " .. s_format("%.2f", uncappedPoisonStacks) .. ")")
44694473
end
4470-
44714474
end
44724475
end
44734476
for sub_pass = 1, 2 do
@@ -4557,8 +4560,8 @@ function calcs.offence(env, actor, activeSkill)
45574560
globalBreakdown.PoisonEffMult = breakdown.effMult("Chaos", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
45584561
end
45594562
end
4560-
if skillModList:Flag(nil, "Condition:SinglePoison") then
4561-
PoisonStacks = m_min(1, PoisonStacks)
4563+
if skillModList:Flag(nil, "Condition:NonPoisonedOnly") then
4564+
PoisonStacks = m_min(additionalPoisonStacks, PoisonStacks)
45624565
end
45634566
globalOutput.PoisonStacks = PoisonStacks
45644567
local effectMod = calcLib.mod(skillModList, dotCfg, "AilmentEffect")

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" }, cfg = "skill" },
927+
{ label = "Poison Stack Limits", modName = { "PoisonStackLimit", "CannotMultiplePoison", "Condition:NonPoisonedOnly" }, 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" }, }, },

src/Modules/ConfigOptions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,8 +1748,8 @@ Huge sets the radius to 11.
17481748
{ var = "multiplierPoisonOnEnemy", type = "count", label = "# of Poison on enemy:", ifEnemyMult = "PoisonStack", implyCond = "Poisoned", apply = function(val, modList, enemyModList)
17491749
enemyModList:NewMod("Multiplier:PoisonStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
17501750
end },
1751-
{ 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)
1752-
modList:NewMod("Condition:SinglePoison", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
1751+
{ 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)
1752+
modList:NewMod("Condition:NonPoisonedOnly", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
17531753
end },
17541754
{ var = "multiplierCurseExpiredOnEnemy", type = "count", label = "#% of Curse Expired on enemy:", ifEnemyMult = "CurseExpired", apply = function(val, modList, enemyModList)
17551755
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)