@@ -1013,8 +1013,6 @@ function calcs.defence(env, actor)
10131013 end
10141014 output .EnergyShield = modDB :Override (nil , " EnergyShield" ) or m_max (round (energyShield ), 0 )
10151015 output .Armour = m_max (round (armour ), 0 )
1016- output .ArmourDefense = (modDB :Max (nil , " ArmourDefense" ) or 0 ) / 100
1017- output .RawArmourDefense = output .ArmourDefense > 0 and ((1 + output .ArmourDefense ) * 100 ) or nil
10181016 output .Evasion = m_max (round (evasion ), 0 )
10191017 output .MeleeEvasion = m_max (round (evasion * calcLib .mod (modDB , nil , " MeleeEvasion" )), 0 )
10201018 output .ProjectileEvasion = m_max (round (evasion * calcLib .mod (modDB , nil , " ProjectileEvasion" )), 0 )
@@ -1500,6 +1498,16 @@ function calcs.defence(env, actor)
15001498 -- Ancestral Vision
15011499 modDB :NewMod (" AvoidElementalAilments" , " BASE" , m_floor (spellSuppressionToAilmentPercent * spellSuppressionChance ), " Ancestral Vision" )
15021500 end
1501+ if modDB :Flag (nil , " SpellSuppressionAppliesToChanceToDefendWithArmour" ) then
1502+ local spellSuppressionAppliesToChanceToDefendWithArmourPercent = (modDB :Max (nil , " SpellSuppressionAppliesToChanceToDefendWithArmourPercent" ) or 0 )
1503+ local spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour = (modDB :Max (nil , " SpellSuppressionAppliesToChanceToDefendWithArmourPercentArmour" ) or 0 )
1504+ -- Foulborn Ancestral Vision
1505+ modDB :NewMod (" ArmourDefense" , " MAX" , tonumber (spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour ) - 100 , " Chance to Defend from Spell Suppression: Max Calc" , { type = " Condition" , var = " ArmourMax" })
1506+ modDB :NewMod (" ArmourDefense" , " MAX" , math.min ((spellSuppressionAppliesToChanceToDefendWithArmourPercent * spellSuppressionChance ) / 100 , 1.0 ) * (tonumber (spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour ) - 100 ), " Chance to Defend from Spell Suppression: Average Calc" , { type = " Condition" , var = " ArmourAvg" })
1507+ modDB :NewMod (" ArmourDefense" , " MAX" , math.min (math.floor ((spellSuppressionAppliesToChanceToDefendWithArmourPercent * spellSuppressionChance ) / 100 ), 1.0 ) * (tonumber (spellSuppressionAppliesToChanceToDefendWithArmourPercentArmour ) - 100 ), modSource or " Chance to Defend from Spell Suppression: Min Calc" , { type = " Condition" , var = " ArmourMax" , neg = true }, { type = " Condition" , var = " ArmourAvg" , neg = true })
1508+ end
1509+ output .ArmourDefense = (modDB :Max (nil , " ArmourDefense" ) or 0 ) / 100
1510+ output .RawArmourDefense = output .ArmourDefense > 0 and ((1 + output .ArmourDefense ) * 100 ) or nil
15031511
15041512 -- This is only used for breakdown purposes
15051513 if modDB :Flag (nil , " ShockAvoidAppliesToElementalAilments" ) then
0 commit comments