Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,17 @@ function calcs.defence(env, actor)
-- Ancestral Vision
modDB:NewMod("AvoidElementalAilments", "BASE", m_floor(spellSuppressionToAilmentPercent * spellSuppressionChance), "Ancestral Vision")
end
if modDB:Flag(nil, "SpellSuppressionAppliesToChanceToDefendWithArmour") then
local spellSuppressionAppliesToChanceToDefendWithArmourPercent = (modDB:Sum("BASE", nil, "SpellSuppressionAppliesToChanceToDefendWithArmourPercent") or 0) / 100
local spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour = (modDB:Sum("BASE", nil, "SpellSuppressionAppliesToChanceToDefendWithArmourPercentArmour") or 0)
-- Foulborn Ancestral Vision
modDB:NewMod("ArmourDefense", "MAX", tonumber(spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour) - 100, "Ancestral Vision: Max Calc", { type = "Condition", var = "ArmourMax" })
modDB:NewMod("ArmourDefense", "MAX", math.min((spellSuppressionAppliesToChanceToDefendWithArmourPercent * spellSuppressionChance) / 100, 1.0) * (tonumber(spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour) - 100), "Ancestral Vision: Average Calc", { type = "Condition", var = "ArmourAvg" })
modDB:NewMod("ArmourDefense", "MAX", math.min(math.floor((spellSuppressionAppliesToChanceToDefendWithArmourPercent * spellSuppressionChance) / 100), 1.0) * (tonumber(spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour) - 100), "Ancestral Vision: Min Calc", { type = "Condition", var = "ArmourMax", neg = true }, { type = "Condition", var = "ArmourAvg", neg = true })
-- already calc'ed above, need to run again
output.ArmourDefense = (modDB:Max(nil, "ArmourDefense") or 0) / 100
output.RawArmourDefense = output.ArmourDefense > 0 and ((1 + output.ArmourDefense) * 100) or nil
end

-- This is only used for breakdown purposes
if modDB:Flag(nil, "ShockAvoidAppliesToElementalAilments") then
Expand Down
5 changes: 5 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3538,6 +3538,11 @@ local specialModList = {
mod("SpellSuppressionAppliesToAilmentAvoidancePercent", "BASE", num),
flag("SpellSuppressionAppliesToAilmentAvoidance")
} end,
["modifiers to chance to suppress spell damage also apply to chance to defend with (%d+)%% of armour at (%d+)%% of their value"] = function (armourPercentage, _, effectiveness) return {
mod("SpellSuppressionAppliesToChanceToDefendWithArmourPercentArmour", "BASE", armourPercentage),
mod("SpellSuppressionAppliesToChanceToDefendWithArmourPercent", "BASE", effectiveness),
flag("SpellSuppressionAppliesToChanceToDefendWithArmour"),
} end,
["enemies chilled by your hits have damage taken increased by chill effect"] = { flag("ChillEffectIncDamageTaken") },
["left ring slot: your chilling skitterbot's aura applies socketed h?e?x? ?curse instead"] = { flag("SkitterbotsCannotChill", { type = "SlotNumber", num = 1 }) },
["right ring slot: your shocking skitterbot's aura applies socketed h?e?x? ?curse instead"] = { flag("SkitterbotsCannotShock", { type = "SlotNumber", num = 2 }) },
Expand Down