Skip to content

Commit 9512877

Browse files
PJacekWires77
andauthored
Fix elemental ailments defensive calculations (#4440)
* Fix elemental ailment defensive calculations * Fixed text piece of purity of elements Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
1 parent 9f2152d commit 9512877

File tree

8 files changed

+88
-67
lines changed

8 files changed

+88
-67
lines changed

src/Data/Skills/act_int.lua

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2890,10 +2890,14 @@ skills["ElementalWeakness"] = {
28902890
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
28912891
},
28922892
["self_elemental_status_duration_-%"] = {
2893-
mod("SelfIgniteDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2894-
mod("SelfChillDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2895-
mod("SelfFreezeDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2896-
mod("SelfShockDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2893+
mod("SelfIgniteDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2894+
mod("SelfChillDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2895+
mod("SelfFreezeDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2896+
mod("SelfShockDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2897+
mod("SelfScorchDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2898+
mod("SelfBrittleDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2899+
mod("SelfSapDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
2900+
mult = -1
28972901
}
28982902
},
28992903
baseFlags = {
@@ -7550,6 +7554,9 @@ skills["Purity"] = {
75507554
mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
75517555
mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
75527556
mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
7557+
mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
7558+
mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
7559+
mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
75537560
},
75547561
qualityStats = {
75557562
Default = {

src/Export/Skills/act_int.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,14 @@ local skills, mod, flag, skill = ...
651651
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
652652
},
653653
["self_elemental_status_duration_-%"] = {
654-
mod("SelfIgniteDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
655-
mod("SelfChillDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
656-
mod("SelfFreezeDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
657-
mod("SelfShockDuration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
654+
mod("SelfIgniteDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
655+
mod("SelfChillDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
656+
mod("SelfFreezeDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
657+
mod("SelfShockDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
658+
mod("SelfScorchDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
659+
mod("SelfBrittleDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
660+
mod("SelfSapDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
661+
mult = -1
658662
}
659663
},
660664
#baseMod skill("debuff", true)
@@ -1550,6 +1554,9 @@ local skills, mod, flag, skill = ...
15501554
#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" })
15511555
#baseMod mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" })
15521556
#baseMod mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" })
1557+
#baseMod mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
1558+
#baseMod mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
1559+
#baseMod mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
15531560
#mods
15541561

15551562
#skill LightningResistAura

src/Modules/CalcDefence.lua

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -827,30 +827,23 @@ function calcs.defence(env, actor)
827827
end
828828
output.InteruptStunAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidInteruptStun"), 100)
829829
output.BlindAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidBlind"), 100)
830-
output.ShockAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidShock"), 100)
831-
output.FreezeAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidFreeze"), 100)
832-
output.ChillAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidChill"), 100)
833-
output.IgniteAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidIgnite"), 100)
834-
output.BleedAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidBleed"), 100)
835-
output.PoisonAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidPoison"), 100)
830+
for _, ailment in ipairs(data.ailmentTypeList) do
831+
output[ailment.."AvoidChance"] = m_min(modDB:Sum("BASE", nil, "Avoid"..ailment), 100)
832+
end
836833
output.CritExtraDamageReduction = m_min(modDB:Sum("BASE", nil, "ReduceCritExtraDamage"), 100)
837834
output.LightRadiusMod = calcLib.mod(modDB, nil, "LightRadius")
838835
if breakdown then
839836
breakdown.LightRadiusMod = breakdown.mod(modDB, nil, "LightRadius")
840837
end
838+
output.CurseEffectOnSelf = modDB:More(nil, "CurseEffectOnSelf") * (100 + modDB:Sum("INC", nil, "CurseEffectOnSelf"))
841839

842-
-- Ailment duration on self
843-
output.SelfFreezeDuration = modDB:More(nil, "SelfFreezeDuration") * (100 + modDB:Sum("INC", nil, "SelfFreezeDuration"))
840+
-- Ailment duration on self
844841
output.SelfBlindDuration = modDB:More(nil, "SelfBlindDuration") * (100 + modDB:Sum("INC", nil, "SelfBlindDuration"))
845-
output.SelfShockDuration = modDB:More(nil, "SelfShockDuration") * (100 + modDB:Sum("INC", nil, "SelfShockDuration"))
846-
output.SelfChillDuration = modDB:More(nil, "SelfChillDuration") * (100 + modDB:Sum("INC", nil, "SelfChillDuration"))
847-
output.SelfIgniteDuration = modDB:More(nil, "SelfIgniteDuration") * (100 + modDB:Sum("INC", nil, "SelfIgniteDuration"))
848-
output.SelfBleedDuration = modDB:More(nil, "SelfBleedDuration") * (100 + modDB:Sum("INC", nil, "SelfBleedDuration"))
849-
output.SelfPoisonDuration = modDB:More(nil, "SelfPoisonDuration") * (100 + modDB:Sum("INC", nil, "SelfPoisonDuration"))
842+
for _, ailment in ipairs(data.ailmentTypeList) do
843+
output["Self"..ailment.."Duration"] = modDB:More(nil, "Self"..ailment.."Duration") * (100 + modDB:Sum("INC", nil, "Self"..ailment.."Duration"))
844+
end
850845
output.SelfChillEffect = modDB:More(nil, "SelfChillEffect") * (100 + modDB:Sum("INC", nil, "SelfChillEffect"))
851846
output.SelfShockEffect = modDB:More(nil, "SelfShockEffect") * (100 + modDB:Sum("INC", nil, "SelfShockEffect"))
852-
output.CurseEffectOnSelf = modDB:More(nil, "CurseEffectOnSelf") * (100 + modDB:Sum("INC", nil, "CurseEffectOnSelf"))
853-
854847
--Enemy damage input and modifications
855848
do
856849
output["totalEnemyDamage"] = 0

src/Modules/CalcOffence.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ local dmgTypeFlags = {
3939
}
4040

4141
-- List of all ailments
42-
local ailmentTypeList = { "Bleed", "Poison", "Ignite", "Chill", "Freeze", "Shock", "Scorch", "Brittle", "Sap" }
42+
local ailmentTypeList = data.ailmentTypeList
4343
-- List of elemental ailments
44-
local elementalAilmentTypeList = { "Ignite", "Chill", "Freeze", "Shock", "Scorch", "Brittle", "Sap" }
44+
local elementalAilmentTypeList = data.elementalAilmentTypeList
4545

4646
-- Magic table for caching the modifier name sets used in calcDamage()
4747
local damageStatsForTypes = setmetatable({ }, { __index = function(t, k)

src/Modules/CalcSections.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,9 @@ return {
13841384
{ label = "Freeze Avoid Ch.", haveOutput = "FreezeAvoidChance", { format = "{0:output:FreezeAvoidChance}%", { modName = "AvoidFreeze" }, }, },
13851385
{ label = "Chill Avoid Ch.", haveOutput = "ChillAvoidChance", { format = "{0:output:ChillAvoidChance}%", { modName = "AvoidChill" }, }, },
13861386
{ label = "Ignite Avoid Ch.", haveOutput = "IgniteAvoidChance", { format = "{0:output:IgniteAvoidChance}%", { modName = "AvoidIgnite" }, }, },
1387+
{ label = "Sap Avoid Ch.", haveOutput = "SapAvoidChance", { format = "{0:output:SapAvoidChance}%", { modName = "AvoidSap" }, }, },
1388+
{ label = "Brittle Avoid Ch.", haveOutput = "BrittleAvoidChance", { format = "{0:output:BrittleAvoidChance}%", { modName = "AvoidBrittle" }, }, },
1389+
{ label = "Scorch Avoid Ch.", haveOutput = "ScorchAvoidChance", { format = "{0:output:ScorchAvoidChance}%", { modName = "AvoidScorch" }, }, },
13871390
{ label = "Bleed Avoid Ch.", haveOutput = "BleedAvoidChance", { format = "{0:output:BleedAvoidChance}%", { modName = "AvoidBleed" }, }, },
13881391
{ label = "Poison Avoid Ch.", haveOutput = "PoisonAvoidChance", { format = "{0:output:PoisonAvoidChance}%", { modName = "AvoidPoison" }, }, },
13891392
{ label = "Crit Reduction", haveOutput = "CritExtraDamageReduction", { format = "{0:output:CritExtraDamageReduction}%", { modName = "ReduceCritExtraDamage" }, }, },
@@ -1393,6 +1396,9 @@ return {
13931396
{ label = "Chill Duration", { format = "{1:output:SelfChillDuration}%", { modName = "SelfChillDuration" }, }, },
13941397
{ label = "Shock Duration", { format = "{1:output:SelfShockDuration}%", { modName = "SelfShockDuration" }, }, },
13951398
{ label = "Ignite Duration", { format = "{1:output:SelfIgniteDuration}%", { modName = "SelfIgniteDuration" }, }, },
1399+
{ label = "Sap Duration", { format = "{1:output:SelfSapDuration}%", { modName = "SelfSapDuration" }, }, },
1400+
{ label = "Brittle Duration", { format = "{1:output:SelfBrittleDuration}%", { modName = "SelfBrittleDuration" }, }, },
1401+
{ label = "Scorch Duration", { format = "{1:output:SelfScorchDuration}%", { modName = "SelfScorchDuration" }, }, },
13961402
{ label = "Bleed Duration", { format = "{1:output:SelfBleedDuration}%", { modName = "SelfBleedDuration" }, }, },
13971403
{ label = "Poison Duration", { format = "{1:output:SelfPoisonDuration}%", { modName = "SelfPoisonDuration" }, }, },
13981404
{ label = "Chill Effect", { format = "{1:output:SelfChillEffect}%", { modName = "SelfChillEffect" }, }, },

src/Modules/CalcSetup.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,9 @@ function calcs.initEnv(build, mode, override, specEnv)
427427
modDB:NewMod("ElementalResist", "BASE", 15, "Bandit")
428428
elseif env.configInput.bandit == "Kraityn" then
429429
modDB:NewMod("Speed", "INC", 6, "Bandit")
430-
modDB:NewMod("AvoidShock", "BASE", 10, "Bandit")
431-
modDB:NewMod("AvoidFreeze", "BASE", 10, "Bandit")
432-
modDB:NewMod("AvoidChill", "BASE", 10, "Bandit")
433-
modDB:NewMod("AvoidIgnite", "BASE", 10, "Bandit")
430+
for _, ailment in ipairs(env.data.elementalAilmentTypeList) do
431+
modDB:NewMod("Avoid"..ailment, "BASE", 10, "Bandit")
432+
end
434433
modDB:NewMod("MovementSpeed", "INC", 6, "Bandit")
435434
elseif env.configInput.bandit == "Oak" then
436435
modDB:NewMod("LifeRegenPercent", "BASE", 1, "Bandit")

src/Modules/Data.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ data.keystones = {
335335
"Zealot's Oath",
336336
}
337337

338+
data.ailmentTypeList = { "Bleed", "Poison", "Ignite", "Chill", "Freeze", "Shock", "Scorch", "Brittle", "Sap" }
339+
data.elementalAilmentTypeList = { "Ignite", "Chill", "Freeze", "Shock", "Scorch", "Brittle", "Sap" }
340+
338341
data.nonDamagingAilment = {
339342
["Chill"] = { associatedType = "Cold", alt = false, default = 10, min = 5, max = 30, precision = 0, duration = 2 },
340343
["Freeze"] = { associatedType = "Cold", alt = false, default = nil, min = 0.3, max = 3, precision = 2, duration = nil },

src/Modules/ModParser.lua

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ local modNameList = {
282282
["to avoid being frozen"] = "AvoidFreeze",
283283
["to avoid being chilled"] = "AvoidChill",
284284
["to avoid being ignited"] = "AvoidIgnite",
285-
["to avoid elemental ailments"] = { "AvoidShock", "AvoidFreeze", "AvoidChill", "AvoidIgnite" },
286-
["to avoid elemental status ailments"] = { "AvoidShock", "AvoidFreeze", "AvoidChill", "AvoidIgnite" },
285+
["to avoid elemental ailments"] = { "AvoidShock", "AvoidFreeze", "AvoidChill", "AvoidIgnite", "AvoidSap", "AvoidBrittle", "AvoidScorch" },
286+
["to avoid elemental status ailments"] = { "AvoidShock", "AvoidFreeze", "AvoidChill", "AvoidIgnite", "AvoidSap", "AvoidBrittle", "AvoidScorch" },
287287
["to avoid bleeding"] = "AvoidBleed",
288288
["to avoid being poisoned"] = "AvoidPoison",
289289
["damage is taken from mana before life"] = "DamageTakenFromManaBeforeLife",
@@ -1671,12 +1671,13 @@ local specialModList = {
16711671
["(%d+)%% chance to gain elusive on kill"] = {
16721672
flag("Condition:CanBeElusive"),
16731673
},
1674-
["immune to elemental ailments while on consecrated ground"] = {
1675-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1676-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1677-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1678-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1679-
},
1674+
["immune to elemental ailments while on consecrated ground"] = function()
1675+
local mods = { }
1676+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1677+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" })
1678+
end
1679+
return mods
1680+
end,
16801681
-- Assassin
16811682
["poison you inflict with critical strikes deals (%d+)%% more damage"] = function(num) return { mod("Damage", "MORE", num, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "CriticalStrike" }) } end,
16821683
["(%d+)%% chance to gain elusive on critical strike"] = {
@@ -1812,12 +1813,13 @@ local specialModList = {
18121813
flag("FireCanShock", { type = "Condition", var = "AffectedByGloriousMadness" }),
18131814
flag("ChaosCanShock", { type = "Condition", var = "AffectedByGloriousMadness" }),
18141815
},
1815-
["immune to elemental ailments while affected by glorious madness"] = {
1816-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }),
1817-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }),
1818-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }),
1819-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }),
1820-
},
1816+
["immune to elemental ailments while affected by glorious madness"] = function()
1817+
local mods = { }
1818+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1819+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" })
1820+
end
1821+
return mods
1822+
end,
18211823
["summoned golems are immune to elemental damage"] = {
18221824
mod("MinionModifier", "LIST", { mod = mod("FireResist", "OVERRIDE", 100) }, { type = "SkillType", skillType = SkillType.Golem }),
18231825
mod("MinionModifier", "LIST", { mod = mod("FireResistMax", "OVERRIDE", 100) }, { type = "SkillType", skillType = SkillType.Golem }),
@@ -1912,24 +1914,26 @@ local specialModList = {
19121914
mod("LifeRegenPercent", "BASE", num, { type = "PerStat", stat = "TotemsSummoned" }, 0, KeywordFlag.Totem),
19131915
} end,
19141916
["enemies take (%d+)%% increased damage for each of your brands attached to them"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageTaken", "INC", num, { type = "Multiplier", var = "BrandsAttached" }) }) } end,
1915-
["immune to elemental ailments while you have arcane surge"] = {
1916-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }),
1917-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }),
1918-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }),
1919-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }),
1920-
},
1917+
["immune to elemental ailments while you have arcane surge"] = function()
1918+
local mods = { }
1919+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1920+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" })
1921+
end
1922+
return mods
1923+
end,
19211924
["brands have (%d+)%% more activation frequency if (%d+)%% of attached duration expired"] = function(num) return { mod("BrandActivationFrequency", "MORE", num, { type = "Condition", var = "BrandLastQuarter"} ) } end,
19221925
-- Inquisitor
19231926
["critical strikes ignore enemy monster elemental resistances"] = { flag("IgnoreElementalResistances", { type = "Condition", var = "CriticalStrike" }) },
19241927
["non%-critical strikes penetrate (%d+)%% of enemy elemental resistances"] = function(num) return { mod("ElementalPenetration", "BASE", num, { type = "Condition", var = "CriticalStrike", neg = true }) } end,
19251928
["consecrated ground you create applies (%d+)%% increased damage taken to enemies"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageTakenConsecratedGround", "INC", num, { type = "Condition", var = "OnConsecratedGround" }) }) } end,
19261929
["you have consecrated ground around you while stationary"] = { flag("Condition:OnConsecratedGround", { type = "Condition", var = "Stationary" }) },
1927-
["consecrated ground you create grants immunity to elemental ailments to you and allies"] = {
1928-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1929-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1930-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1931-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }),
1932-
},
1930+
["consecrated ground you create grants immunity to elemental ailments to you and allies"] = function()
1931+
local mods = { }
1932+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1933+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" })
1934+
end
1935+
return mods
1936+
end,
19331937
["gain fanaticism for 4 seconds on reaching maximum fanatic charges"] = function() return {
19341938
flag("Condition:CanGainFanaticism"),
19351939
} end ,
@@ -1978,20 +1982,22 @@ local specialModList = {
19781982
-- Pathfinder
19791983
["always poison on hit while using a flask"] = { mod("PoisonChance", "BASE", 100, { type = "Condition", var = "UsingFlask" }) },
19801984
["poisons you inflict during any flask effect have (%d+)%% chance to deal (%d+)%% more damage"] = function(num, _, more) return { mod("Damage", "MORE", tonumber(more) * num / 100, nil, 0, KeywordFlag.Poison, { type = "Condition", var = "UsingFlask" }) } end,
1981-
["immune to elemental ailments during any flask effect"] = {
1982-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask" }),
1983-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask" }),
1984-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "UsingFlask" }),
1985-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "UsingFlask" }),
1986-
},
1985+
["immune to elemental ailments during any flask effect"] = function()
1986+
local mods = { }
1987+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1988+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "UsingFlask" })
1989+
end
1990+
return mods
1991+
end,
19871992
-- Raider
19881993
["nearby enemies have (%d+)%% less accuracy rating while you have phasing"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("Accuracy", "MORE", -num) }, { type = "Condition", var = "Phasing" } )} end,
1989-
["immune to elemental ailments while phasing"] = {
1990-
mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Phasing" }),
1991-
mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "Phasing" }),
1992-
mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "Phasing" }),
1993-
mod("AvoidShock", "BASE", 100, { type = "Condition", var = "Phasing" }),
1994-
},
1994+
["immune to elemental ailments while phasing"] = function()
1995+
local mods = { }
1996+
for i, ailment in ipairs(data.elementalAilmentTypeList) do
1997+
mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "Phasing" })
1998+
end
1999+
return mods
2000+
end,
19952001
["nearby enemies have fire, cold and lightning exposure while you have phasing, applying %-(%d+)%% to those resistances"] = function(num) return {
19962002
mod("EnemyModifier", "LIST", { mod = mod("FireExposure", "BASE", -num) }, { type = "Condition", var = "Phasing" } ),
19972003
mod("EnemyModifier", "LIST", { mod = mod("ColdExposure", "BASE", -num) }, { type = "Condition", var = "Phasing" } ),

0 commit comments

Comments
 (0)