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 committed Oct 22, 2024
1 parent 78b52c9 commit bf36b6d
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 @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bf36b6d

Please sign in to comment.