Skip to content

Commit 5cca1ee

Browse files
authored
Disable gain when hit for builds which cannot survive unlucky hits (#8342)
1 parent 82af739 commit 5cca1ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Modules/CalcDefence.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@ function calcs.buildDefenceEstimations(env, actor)
25532553
local suppressionEffect = 1
25542554
local ExtraAvoidChance = 0
25552555
local averageAvoidChance = 0
2556-
if not env.configInput.DisableEHPGainOnBlock then
2556+
if not env.configInput.DisableEHPGainOnBlock and (output["NumberOfDamagingHits"] > 1) then
25572557
DamageIn.LifeWhenHit = output.LifeOnBlock * BlockChance
25582558
DamageIn.ManaWhenHit = output.ManaOnBlock * BlockChance
25592559
DamageIn.EnergyShieldWhenHit = output.EnergyShieldOnBlock * BlockChance
@@ -2586,7 +2586,7 @@ function calcs.buildDefenceEstimations(env, actor)
25862586
ExtraAvoidChance = ExtraAvoidChance + output.AvoidProjectilesChance / 2
25872587
end
25882588
-- gain when hit (currently just gain on block/suppress)
2589-
if not env.configInput.DisableEHPGainOnBlock then
2589+
if not env.configInput.DisableEHPGainOnBlock and (output["NumberOfDamagingHits"] > 1) then
25902590
if (DamageIn.LifeWhenHit or 0) ~= 0 or (DamageIn.ManaWhenHit or 0) ~= 0 or DamageIn.EnergyShieldWhenHit ~= 0 then
25912591
DamageIn.GainWhenHit = true
25922592
end

0 commit comments

Comments
 (0)