@@ -1391,7 +1391,7 @@ function calcs.defence(env, actor)
13911391 if output [damageType .. " EnergyShieldBypass" ] > 0 then
13921392 local poolProtected = output .EnergyShieldRecoveryCap / (1 - output [damageType .. " EnergyShieldBypass" ] / 100 ) * (output [damageType .. " EnergyShieldBypass" ] / 100 )
13931393 output [damageType .. " TotalPool" ] = m_max (output [damageType .. " TotalPool" ] - poolProtected , 0 ) + m_min (output [damageType .. " TotalPool" ], poolProtected ) / (output [damageType .. " EnergyShieldBypass" ] / 100 )
1394- else
1394+ else
13951395 output [damageType .. " TotalPool" ] = output [damageType .. " TotalPool" ] + output .EnergyShieldRecoveryCap
13961396 end
13971397 end
@@ -1449,8 +1449,10 @@ function calcs.defence(env, actor)
14491449 if not DamageIn [damageType .. " EnergyShieldBypass" ] then
14501450 DamageIn [damageType .. " EnergyShieldBypass" ] = output [damageType .. " EnergyShieldBypass" ] or 0
14511451 end
1452+
14521453 end
14531454 DamageIn [" LifeLossBelowHalfLost" ] = DamageIn [" LifeLossBelowHalfLost" ] or 0
1455+ DamageIn [" WardBypass" ] = DamageIn [" WardBypass" ] or modDB :Sum (" BASE" , nil , " WardBypass" ) or 0
14541456
14551457 local itterationMultiplier = 1
14561458 local maxHits = data .misc .ehpCalcMaxHitsToCalc
@@ -1500,7 +1502,7 @@ function calcs.defence(env, actor)
15001502 Damage [damageType ] = Damage [damageType ] - tempDamage
15011503 end
15021504 if ward > 0 then
1503- local tempDamage = m_min (Damage [damageType ], ward )
1505+ local tempDamage = m_min (Damage [damageType ] * ( 1 - DamageIn [ " WardBypass " ] / 100 ) , ward )
15041506 ward = ward - tempDamage
15051507 Damage [damageType ] = Damage [damageType ] - tempDamage
15061508 end
@@ -1919,7 +1921,15 @@ function calcs.defence(env, actor)
19191921 output [damageType .. " TotalPool" ] = output [damageType .. " TotalPool" ] / (1 - output [" preventedLifeLoss" ] / 100 )
19201922 end
19211923 -- ward
1922- output [damageType .. " TotalPool" ] = output [damageType .. " TotalPool" ] + output .Ward or 0
1924+ local wardBypass = modDB :Sum (" BASE" , nil , " WardBypass" ) or 0
1925+ if wardBypass > 0 then
1926+ local poolProtected = output .Ward / (1 - wardBypass / 100 ) * (wardBypass / 100 )
1927+ local sourcePool = output [damageType .. " TotalPool" ]
1928+ sourcePool = m_max (sourcePool - poolProtected , 0 ) + m_min (sourcePool , poolProtected ) / (wardBypass / 100 )
1929+ output [damageType .. " TotalPool" ] = sourcePool
1930+ else
1931+ output [damageType .. " TotalPool" ] = output [damageType .. " TotalPool" ] + output .Ward or 0
1932+ end
19231933 -- aegis
19241934 output [damageType .. " TotalHitPool" ] = output [damageType .. " TotalPool" ] + output [damageType .. " Aegis" ] or 0 + output [damageType .. " sharedAegis" ] or 0 + isElemental [damageType ] and output [damageType .. " sharedElementalAegis" ] or 0
19251935 -- guardskill
0 commit comments