Skip to content

Commit aeee2f2

Browse files
authored
FIX: ailment conditionals not being based on DMG (#5948)
Ailment config option did not show up even though current build was capable of inflicting them, causing annoyances when trying to use item/gem sorting to optimize for their effect. This pr attempts to preemptively set related enemy conditionals based on used mods to fix this.
1 parent 5c593c7 commit aeee2f2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Modules/Calcs.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,17 @@ function calcs.buildOutput(build, mode)
520520
end
521521
local function addModTags(actor, mod)
522522
addTo(env.modsUsed, mod.name, mod)
523+
524+
-- Imply enemy conditionals based on damage type
525+
-- Needed to preemptively show config options for elemental ailments
526+
for dmgType, conditions in pairs({["[fi][ig][rn][ei]t?e?"] = {"Ignited", "Burning"}, ["[cf][or][le][de]z?e?"] = {"Frozen"}}) do
527+
if mod.name:lower():match(dmgType) then
528+
for _, var in ipairs(conditions) do
529+
addTo(env.enemyConditionsUsed, var, mod)
530+
end
531+
end
532+
end
533+
523534
for _, tag in ipairs(mod) do
524535
addTo(env.tagTypesUsed, tag.type, mod)
525536
if tag.type == "IgnoreCond" then

0 commit comments

Comments
 (0)