Skip to content

Commit

Permalink
Fix breakdown for skills that grant Ailment Immunities (#6584)
Browse files Browse the repository at this point in the history
Many of the skills were still using the old avoid chance mod instead of the new Immunity flag

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
  • Loading branch information
LocalIdentity and LocalIdentity authored Sep 5, 2023
1 parent 1882230 commit dfa383c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 56 deletions.
12 changes: 0 additions & 12 deletions src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -440,18 +440,6 @@ return {
["base_avoid_stun_%"] = {
mod("AvoidStun", "BASE", nil),
},
["base_immune_to_shock"] = {
mod("AvoidShock", "BASE", 100),
},
["base_immune_to_chill"] = {
mod("AvoidChill", "BASE", 100),
},
["base_immune_to_freeze"] = {
mod("AvoidFreeze", "BASE", 100),
},
["base_immune_to_ignite"] = {
mod("AvoidIgnite", "BASE", 100),
},
["avoid_interruption_while_using_this_skill_%"] = {
mod("AvoidInterruptStun", "BASE", nil)
},
Expand Down
13 changes: 3 additions & 10 deletions src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,13 @@ skills["ArcticArmour"] = {
mod("FireDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "Condition", var = "Stationary" }, { type = "GlobalEffect", effectType = "Buff" }),
},
["base_immune_to_freeze"] = {
--Display only
flag("FreezeImmune", { type = "GlobalEffect", effectType = "Buff"}),
},
},
baseFlags = {
spell = true,
duration = true,
},
baseMods = {
mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
},
qualityStats = {
Default = {
{ "skill_effect_duration_+%", 1 },
Expand Down Expand Up @@ -7472,10 +7469,10 @@ skills["ColdImpurity"] = {
mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_freeze"] = {
--Display only
flag("FreezeImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
["base_immune_to_chill"] = {
--Display only
flag("ChillImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
baseFlags = {
Expand All @@ -7484,10 +7481,6 @@ skills["ColdImpurity"] = {
area = true,
duration = true,
},
baseMods = {
mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }),
mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }),
},
qualityStats = {
Default = {
{ "base_skill_area_of_effect_+%", 2 },
Expand Down
11 changes: 3 additions & 8 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8037,7 +8037,7 @@ skills["Purity"] = {
mod("ElementalPenetration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["immune_to_status_ailments"] = {
--Display only
flag("ElementalAilmentImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
baseFlags = {
Expand All @@ -8047,7 +8047,6 @@ skills["Purity"] = {
},
baseMods = {
skill("radius", 40),
mod("AvoidElementalAilments", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }),
},
qualityStats = {
Default = {
Expand Down Expand Up @@ -8213,7 +8212,7 @@ skills["LightningImpurity"] = {
mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_shock"] = {
--Display only
flag("ShockImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
baseFlags = {
Expand All @@ -8222,9 +8221,6 @@ skills["LightningImpurity"] = {
area = true,
duration = true,
},
baseMods = {
flag("ShockImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
qualityStats = {
Default = {
{ "base_skill_area_of_effect_+%", 2 },
Expand Down Expand Up @@ -11506,7 +11502,7 @@ skills["TempestShield"] = {
mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
},
["skill_display_buff_grants_shock_immunity"] = {
--Display only
flag("ShockImmune", { type = "GlobalEffect", effectType = "Buff"}),
}
},
baseFlags = {
Expand All @@ -11516,7 +11512,6 @@ skills["TempestShield"] = {
},
baseMods = {
skill("triggerCounterAttack", 100, { type = "SkillType", skillType = SkillType.Spell }),
flag("ShockImmune"),
},
qualityStats = {
Default = {
Expand Down
5 changes: 1 addition & 4 deletions src/Data/Skills/act_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6183,7 +6183,7 @@ skills["FireImpurity"] = {
mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_ignite"] = {
--Display only
flag("IgniteImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
baseFlags = {
Expand All @@ -6192,9 +6192,6 @@ skills["FireImpurity"] = {
area = true,
duration = true,
},
baseMods = {
mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }),
},
qualityStats = {
Default = {
{ "base_skill_area_of_effect_+%", 2 },
Expand Down
9 changes: 3 additions & 6 deletions src/Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ local skills, mod, flag, skill = ...
mod("FireDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "Condition", var = "Stationary" }, { type = "GlobalEffect", effectType = "Buff" }),
},
["base_immune_to_freeze"] = {
--Display only
flag("FreezeImmune", { type = "GlobalEffect", effectType = "Buff"}),
},
},
#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
#mods

#skill VaalArcticArmour
Expand Down Expand Up @@ -1541,14 +1540,12 @@ local skills, mod, flag, skill = ...
mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_freeze"] = {
--Display only
flag("FreezeImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
["base_immune_to_chill"] = {
--Display only
flag("ChillImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true })
#baseMod mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true })
#mods

#skill RainOfArrows
Expand Down
9 changes: 3 additions & 6 deletions src/Export/Skills/act_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1816,11 +1816,10 @@ local skills, mod, flag, skill = ...
mod("ElementalPenetration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["immune_to_status_ailments"] = {
--Display only
flag("ElementalAilmentImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
#baseMod skill("radius", 40)
#baseMod mod("AvoidElementalAilments", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true })
#mods

#skill LightningResistAura
Expand Down Expand Up @@ -1852,10 +1851,9 @@ local skills, mod, flag, skill = ...
mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_shock"] = {
--Display only
flag("ShockImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
#baseMod flag("ShockImmune", { type = "GlobalEffect", effectType = "Aura"})
#mods

#skill MortarBarrageMine
Expand Down Expand Up @@ -2439,11 +2437,10 @@ local skills, mod, flag, skill = ...
mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
},
["skill_display_buff_grants_shock_immunity"] = {
--Display only
flag("ShockImmune", { type = "GlobalEffect", effectType = "Buff"}),
}
},
#baseMod skill("triggerCounterAttack", 100, { type = "SkillType", skillType = SkillType.Spell })
#baseMod flag("ShockImmune")
#mods

#skill VoltaxicBurst
Expand Down
3 changes: 1 addition & 2 deletions src/Export/Skills/act_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1132,10 +1132,9 @@ local skills, mod, flag, skill = ...
mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }),
},
["base_immune_to_ignite"] = {
--Display only
flag("IgniteImmune", { type = "GlobalEffect", effectType = "Aura"}),
},
},
#baseMod mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true })
#mods

#skill RageVortex
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ function calcs.defence(env, actor)
end
for _, ailment in ipairs(data.elementalAilmentTypeList) do
local shockAvoidAppliesToAll = modDB:Flag(nil, "ShockAvoidAppliesToElementalAilments") and ailment ~= "Shock"
output[ailment.."AvoidChance"] = modDB:Flag(nil, ailment.."Immune") and 100 or m_floor(m_min(modDB:Sum("BASE", nil, "Avoid"..ailment, "AvoidAilments", "AvoidElementalAilments") + (shockAvoidAppliesToAll and modDB:Sum("BASE", nil, "AvoidShock") or 0), 100))
output[ailment.."AvoidChance"] = modDB:Flag(nil, ailment.."Immune", "ElementalAilmentImmune") and 100 or m_floor(m_min(modDB:Sum("BASE", nil, "Avoid"..ailment, "AvoidAilments", "AvoidElementalAilments") + (shockAvoidAppliesToAll and modDB:Sum("BASE", nil, "AvoidShock") or 0), 100))
end

output.CurseAvoidChance = modDB:Flag(nil, "CurseImmune") and 100 or m_min(modDB:Sum("BASE", nil, "AvoidCurse"), 100)
Expand Down
14 changes: 7 additions & 7 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1654,13 +1654,13 @@ return {
}, },
} }, { defaultCollapsed = true, label = "Other Avoidance", data = {
{ label = "Blind Avoid Ch.", haveOutput = "BlindAvoidChance", { format = "{0:output:BlindAvoidChance}%", { modName = "AvoidBlind" }, }, },
{ label = "Shock Avoid Ch.", haveOutput = "ShockAvoidChance", { format = "{0:output:ShockAvoidChance}%", { modName = { "AvoidShock", "AvoidElementalAilments", "AvoidAilments", "ShockImmune" } }, }, },
{ label = "Freeze Avoid Ch.", haveOutput = "FreezeAvoidChance", { format = "{0:output:FreezeAvoidChance}%", { modName = { "AvoidFreeze", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "FreezeImmune" } }, }, },
{ label = "Chill Avoid Ch.", haveOutput = "ChillAvoidChance", { format = "{0:output:ChillAvoidChance}%", { modName = { "AvoidChill", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "ChillImmune" } }, }, },
{ label = "Ignite Avoid Ch.", haveOutput = "IgniteAvoidChance", { format = "{0:output:IgniteAvoidChance}%", { modName = { "AvoidIgnite", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "IgniteImmune" } }, }, },
{ label = "Sap Avoid Ch.", haveOutput = "SapAvoidChance", { format = "{0:output:SapAvoidChance}%", { modName = { "AvoidSap", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "SapImmune" } }, }, },
{ label = "Brittle Avoid Ch.", haveOutput = "BrittleAvoidChance", { format = "{0:output:BrittleAvoidChance}%", { modName = { "AvoidBrittle", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "BrittleImmune" } }, }, },
{ label = "Scorch Avoid Ch.", haveOutput = "ScorchAvoidChance", { format = "{0:output:ScorchAvoidChance}%", { modName = { "AvoidScorch", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "ScorchImmune" } }, }, },
{ label = "Shock Avoid Ch.", haveOutput = "ShockAvoidChance", { format = "{0:output:ShockAvoidChance}%", { modName = { "AvoidShock", "AvoidElementalAilments", "AvoidAilments", "ShockImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Freeze Avoid Ch.", haveOutput = "FreezeAvoidChance", { format = "{0:output:FreezeAvoidChance}%", { modName = { "AvoidFreeze", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "FreezeImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Chill Avoid Ch.", haveOutput = "ChillAvoidChance", { format = "{0:output:ChillAvoidChance}%", { modName = { "AvoidChill", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "ChillImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Ignite Avoid Ch.", haveOutput = "IgniteAvoidChance", { format = "{0:output:IgniteAvoidChance}%", { modName = { "AvoidIgnite", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "IgniteImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Sap Avoid Ch.", haveOutput = "SapAvoidChance", { format = "{0:output:SapAvoidChance}%", { modName = { "AvoidSap", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "SapImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Brittle Avoid Ch.", haveOutput = "BrittleAvoidChance", { format = "{0:output:BrittleAvoidChance}%", { modName = { "AvoidBrittle", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "BrittleImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Scorch Avoid Ch.", haveOutput = "ScorchAvoidChance", { format = "{0:output:ScorchAvoidChance}%", { modName = { "AvoidScorch", "AvoidElementalAilments", "AvoidAilments", "AvoidShockAppliesToElementalAilments", "ScorchImmune", "ElementalAilmentImmune" } }, }, },
{ label = "Bleed Avoid Ch.", haveOutput = "BleedAvoidChance", { format = "{0:output:BleedAvoidChance}%", { modName = { "AvoidBleed", "AvoidAilments", "BleedImmune" } }, }, },
{ label = "Poison Avoid Ch.", haveOutput = "PoisonAvoidChance", { format = "{0:output:PoisonAvoidChance}%", { modName = { "AvoidPoison", "AvoidAilments", "PoisonImmune" } }, }, },
{ label = "Curse Avoid Ch.", haveOutput = "CurseAvoidChance", { format = "{0:output:CurseAvoidChance}%", { modName = "AvoidCurse" }, }, },
Expand Down

0 comments on commit dfa383c

Please sign in to comment.