Skip to content

Commit

Permalink
Fixes the display value for chance to apply and for dot multi
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Oct 10, 2024
1 parent f6d095a commit 40a9291
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3974,7 +3974,10 @@ function calcs.offence(env, actor, activeSkill)
end
local basePercent = skillData.bleedBasePercent or data.misc.BleedPercentBase
-- over-stacking bleed stacks increases the chance a critical bleed is present
local ailmentCritChance = 100 * (1 - m_pow(1 - output.CritChance / 100, m_max(globalOutput.BleedStackPotential, 1)))
local ailmentCritChance = output.CritChance
if output.BleedChanceOnHit > 0 then
ailmentCritChance = 100 * (1 - m_pow(1 - output.CritChance / 100, m_max(globalOutput.BleedStackPotential, 1)))
end

local baseMinVal = calcAilmentDamage("Bleed", ailmentCritChance, sourceMinHitDmg, 0, true) * basePercent / 100
local baseMaxVal = calcAilmentDamage("Bleed", 100, sourceMaxHitDmg, sourceMaxCritDmg, true) * basePercent / 100 * output.RuthlessBlowAilmentEffect * output.FistOfWarDamageEffect * globalOutput.AilmentWarcryEffect
Expand Down Expand Up @@ -4008,7 +4011,7 @@ function calcs.offence(env, actor, activeSkill)
globalOutput.BleedDamage = output.BaseBleedDPS * globalOutput.BleedDuration
if breakdown then
if output.CritBleedDotMulti and (output.CritBleedDotMulti ~= output.BleedDotMulti) then
local chanceFromHit = output.BleedChanceOnHit / 100 * (1 - globalOutput.CritChance / 100)
local chanceFromHit = output.BleedChanceOnHit / 100 * (1 - ailmentCritChance / 100)
local chanceFromCrit = output.BleedChanceOnCrit / 100 * ailmentCritChance / 100
local totalFromHit = chanceFromHit / (chanceFromHit + chanceFromCrit)
local totalFromCrit = chanceFromCrit / (chanceFromHit + chanceFromCrit)
Expand Down Expand Up @@ -4537,7 +4540,10 @@ function calcs.offence(env, actor, activeSkill)
end
end
-- over-stacking ignite stacks increases the chance a critical ignite is present
local ailmentCritChance = 100 * (1 - m_pow(1 - output.CritChance / 100, m_max(1, igniteStacks)))
local ailmentCritChance = output.CritChance
if output.IgniteChanceOnHit > 0 then
ailmentCritChance = 100 * (1 - m_pow(1 - output.CritChance / 100, m_max(1, igniteStacks)))
end
local baseMinVal = calcAilmentDamage("Ignite", ailmentCritChance, sourceMinHitDmg, 0, true) * data.misc.IgnitePercentBase
local baseMaxVal = calcAilmentDamage("Ignite", 100, sourceMaxHitDmg, sourceMaxCritDmg, true) * data.misc.IgnitePercentBase * output.RuthlessBlowAilmentEffect * output.FistOfWarDamageEffect * globalOutput.AilmentWarcryEffect
local baseVal = calcAilmentDamage("Ignite", ailmentCritChance, sourceHitDmg, sourceCritDmg) * data.misc.IgnitePercentBase * output.RuthlessBlowAilmentEffect * output.FistOfWarDamageEffect * globalOutput.AilmentWarcryEffect
Expand Down Expand Up @@ -4651,7 +4657,7 @@ function calcs.offence(env, actor, activeSkill)
t_insert(breakdown.IgniteDPS, s_format("%.0f to %.0f ^8(Capped Ignite DPS Range)", MinIgniteDPSCapped, MaxIgniteDPSCapped))
end
if output.CritIgniteDotMulti and (output.CritIgniteDotMulti ~= output.IgniteDotMulti) then
local chanceFromHit = output.IgniteChanceOnHit / 100 * (1 - globalOutput.CritChance / 100)
local chanceFromHit = output.IgniteChanceOnHit / 100 * (1 - ailmentCritChance / 100)
local chanceFromCrit = output.IgniteChanceOnCrit / 100 * ailmentCritChance / 100
local totalFromHit = chanceFromHit / (chanceFromHit + chanceFromCrit)
local totalFromCrit = chanceFromCrit / (chanceFromHit + chanceFromCrit)
Expand Down

0 comments on commit 40a9291

Please sign in to comment.