From bf36b6d11d7a0cca9ce82ee53db30cfc5a3326b4 Mon Sep 17 00:00:00 2001 From: Regisle Date: Tue, 22 Oct 2024 15:55:28 +1030 Subject: [PATCH] Disable `gain when hit` for builds which cannot survive unlucky hits --- src/Modules/CalcDefence.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 2eb2e9e7b8..9749ffc3fa 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -2524,7 +2524,7 @@ function calcs.buildDefenceEstimations(env, actor) local suppressionEffect = 1 local ExtraAvoidChance = 0 local averageAvoidChance = 0 - if not env.configInput.DisableEHPGainOnBlock then + if not env.configInput.DisableEHPGainOnBlock and (output["NumberOfDamagingHits"] > 1) then DamageIn.LifeWhenHit = output.LifeOnBlock * BlockChance DamageIn.ManaWhenHit = output.ManaOnBlock * BlockChance DamageIn.EnergyShieldWhenHit = output.EnergyShieldOnBlock * BlockChance @@ -2557,7 +2557,7 @@ function calcs.buildDefenceEstimations(env, actor) ExtraAvoidChance = ExtraAvoidChance + output.AvoidProjectilesChance / 2 end -- gain when hit (currently just gain on block/suppress) - if not env.configInput.DisableEHPGainOnBlock then + if not env.configInput.DisableEHPGainOnBlock and (output["NumberOfDamagingHits"] > 1) then if (DamageIn.LifeWhenHit or 0) ~= 0 or (DamageIn.ManaWhenHit or 0) ~= 0 or DamageIn.EnergyShieldWhenHit ~= 0 then DamageIn.GainWhenHit = true end