@@ -2282,7 +2282,7 @@ function calcs.buildDefenceEstimations(env, actor)
22822282 takenFlat = takenFlat + modDB :Sum (" BASE" , nil , " DamageTakenFromAttacks" , damageType .. " DamageTakenFromAttacks" ) / 2 + modDB :Sum (" BASE" , nil , damageType .. " DamageTakenFromProjectileAttacks" ) / 4 + modDB :Sum (" BASE" , nil , " DamageTakenFromSpells" , damageType .. " DamageTakenFromSpells" ) / 2 + modDB :Sum (" BASE" , nil , " DamageTakenFromSpellProjectiles" , damageType .. " DamageTakenFromSpellProjectiles" ) / 4
22832283 end
22842284 output [damageType .. " takenFlat" ] = takenFlat
2285- if percentOfArmourApplies > 0 then
2285+ if effectiveAppliedArmour > 0 then
22862286 armourReduct = calcs .armourReduction (effectiveAppliedArmour , damage )
22872287 armourReduct = m_min (output [damageType .. " DamageReductionMax" ], armourReduct )
22882288 if impaleDamage > 0 then
@@ -2299,18 +2299,19 @@ function calcs.buildDefenceEstimations(env, actor)
22992299 if breakdown then
23002300 breakdown [damageType .. " DamageReduction" ] = { }
23012301 if armourReduct ~= 0 then
2302- if percentOfArmourApplies ~= 100 then
2303- t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" %d%% percent of armour applies" , percentOfArmourApplies ))
2302+ if ( percentOfArmourApplies ~= ( damageType == " Physical " and 100 or 0 )) and ( percentOfArmourApplies > 0 ) then
2303+ t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" %d%% percent of Armour applies" , percentOfArmourApplies ))
23042304 end
23052305 if effectiveArmourFromArmour == effectiveAppliedArmour then
23062306 t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Reduction from Armour: %d%%" , armourReduct ))
23072307 else
23082308 t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Armour contributing to reduction: %d" , effectiveArmourFromArmour ))
23092309 for source , amount in pairs (effectiveArmourFromOther ) do
2310+ t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" %d%% percent of %s applies" , percentOfEvasionApplies , source ))
23102311 t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" %s contributing to reduction: %d" ,source , amount ))
23112312 end
2312- t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Combined Armour used for reduction: %d" , effectiveAppliedArmour ))
2313- t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Reduction from combined Armour : %d%%" , armourReduct ))
2313+ t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Combined Defence used for reduction: %d" , effectiveAppliedArmour ))
2314+ t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Reduction from combined Defence : %d%%" , armourReduct ))
23142315 end
23152316 if resMult ~= 1 then
23162317 t_insert (breakdown [damageType .. " DamageReduction" ], s_format (" Enemy Hit Damage After Resistance: %d ^8(total incoming damage)" , damage * resMult ))
@@ -2359,18 +2360,21 @@ function calcs.buildDefenceEstimations(env, actor)
23592360 t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Base %s Damage Taken: %.2f" , damageType , 1 - reduction / 100 ))
23602361 end
23612362 if armourReduct ~= 0 then
2362- if percentOfArmourApplies ~= 100 then
2363- t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" %d%% percent of armour applies" , percentOfArmourApplies ))
2363+ if ( percentOfArmourApplies ~= ( damageType == " Physical " and 100 or 0 )) and ( percentOfArmourApplies > 0 ) then
2364+ t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" %d%% percent of Armour applies" , percentOfArmourApplies ))
23642365 end
23652366 if effectiveArmourFromArmour == effectiveAppliedArmour then
23662367 t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Reduction from Armour: %.2f" , 1 - armourReduct / 100 ))
23672368 else
2368- t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Armour contributing to reduction: %d" , effectiveArmourFromArmour ))
2369+ if effectiveArmourFromArmour > 0 then
2370+ t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Armour contributing to reduction: %d" , effectiveArmourFromArmour ))
2371+ end
23692372 for source , amount in pairs (effectiveArmourFromOther ) do
2373+ t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" %d%% percent of %s applies" , percentOfEvasionApplies , source ))
23702374 t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" %s contributing to reduction: %d" ,source , amount ))
23712375 end
2372- t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Combined Armour used for reduction: %d" , effectiveAppliedArmour ))
2373- t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Reduction from combined Armour : %.2f" , 1 - armourReduct / 100 ))
2376+ t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Combined Defence used for reduction: %d" , effectiveAppliedArmour ))
2377+ t_insert (breakdown [damageType .. " TakenHitMult" ], s_format (" Reduction from combined Defence : %.2f" , 1 - armourReduct / 100 ))
23742378 end
23752379 end
23762380 if enemyOverwhelm ~= 0 then
0 commit comments