Skip to content

Commit 357bcff

Browse files
LocalIdentityLocalIdentity
andauthored
Fixed EHP based on block effect calculation (#1227)
Copy from PathOfBuildingCommunity/PathOfBuilding#8711 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent eac9208 commit 357bcff

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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)