Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable "gain when hit" for builds which cannot survive unlucky hits #8342

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading