Skip to content

Commit 479c754

Browse files
author
LocalIdentity
committed
Fixed EHP based on block effect calculation
Copy from PathOfBuildingCommunity/PathOfBuilding#8711
1 parent a22a781 commit 479c754

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Modules/CalcDefence.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,8 @@ function calcs.defence(env, actor)
10151015
end
10161016
end
10171017
output.EffectiveAverageBlockChance = (output.EffectiveBlockChance + output.EffectiveProjectileBlockChance + output.EffectiveSpellBlockChance + output.EffectiveSpellProjectileBlockChance) / 4
1018-
output.BlockEffect = m_max(100 - modDB:Sum("BASE", nil, "BlockEffect"), 0)
1019-
if output.BlockEffect == 0 or output.BlockEffect == 100 then
1020-
output.BlockEffect = 100
1021-
else
1018+
output.BlockEffect = 100 - modDB:Sum("BASE", nil, "BlockEffect")
1019+
if output.BlockEffect ~= 0 then
10221020
output.ShowBlockEffect = true
10231021
output.DamageTakenOnBlock = 100 - output.BlockEffect
10241022
end

0 commit comments

Comments
 (0)