Skip to content

Commit

Permalink
Disable gain when hit for builds which cannot survive unlucky hits (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle authored Feb 12, 2025
1 parent 82af739 commit 5cca1ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,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
Expand Down Expand Up @@ -2586,7 +2586,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
Expand Down

0 comments on commit 5cca1ee

Please sign in to comment.