Skip to content

Commit 7550bd1

Browse files
author
LocalIdentity
committed
Add breakdown for forked crit chance
1 parent d859b87 commit 7550bd1

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/Modules/BuildDisplayStats.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ local displayStats = {
3232
{ stat = "ReloadTime", label = "Reload Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ReloadTime end },
3333
{ stat = "PreEffectiveCritChance", label = "Crit Chance", fmt = ".2f%%", flag = "hit" },
3434
{ stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", flag = "hit", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end },
35+
{ stat = "CritForks", label = "Crit Forks Chance", fmt = ".2f%%", flag = "hit", condFunc = function(v,o) return (o.CritForks or 0) > 0 end },
3536
{ stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end },
36-
--{ stat = "CritMultiplier", label = "Effective Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 and v ~= o.PreEffectiveCritMultiplier end },
3737
{ stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", flag = "attack" },
3838
{ stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end },
3939
{ stat = "AccuracyHitChanceUncapped", label = "Uncap. Hit Chance", fmt = ".0f%%", flag = "attack", condFunc = function(v,o) if o.AccuracyHitChanceUncapped then return o.AccuracyHitChanceUncapped > 100 end end },

src/Modules/CalcOffence.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,8 +3240,16 @@ function calcs.offence(env, actor, activeSkill)
32403240
-- get crit chance and calculate odds of critting twice
32413241
local critChancePercentage = output.PreForkCritChance
32423242
local forkMultiChance = (critChancePercentage ^ 2) / 100
3243+
output.CritForks = forkMultiChance
32433244
local damageBonus = extraDamage
32443245
local forkedBonus = forkMultiChance * extraDamage / 100
3246+
if breakdown and enemyInc ~= 1 then
3247+
breakdown.CritForks = {
3248+
s_format("%.2f%% ^8(effective crit chance)", critChancePercentage),
3249+
s_format("x %.2f%%", critChancePercentage),
3250+
s_format("= %d%% ^8(crit forks chance)", forkMultiChance),
3251+
}
3252+
end
32453253
extraDamage = damageBonus + forkedBonus
32463254
skillModList:NewMod("CritMultiplier", "MORE", floor(forkMultiChance, 2), "Forked Crit Damage Bonus")
32473255
end
@@ -3923,6 +3931,7 @@ function calcs.offence(env, actor, activeSkill)
39233931
combineStat("CritChance", "AVERAGE")
39243932
combineStat("PreEffectiveCritMultiplier", "AVERAGE")
39253933
combineStat("CritMultiplier", "AVERAGE")
3934+
combineStat("CritForks", "AVERAGE")
39263935
combineStat("AverageDamage", "DPS")
39273936
combineStat("PvpAverageDamage", "DPS")
39283937
combineStat("TotalDPS", "DPS")

src/Modules/CalcSections.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ return {
546546
{ label = "Player modifiers", modName = { "CritChance", "WeaponBaseCritChance", "MainHandCritIsEqualToParent", "MainHandCritIsEqualToPartyMember", "AttackCritIsEqualToParentMainHand" }, cfg = "weapon1" },
547547
{ label = "Enemy modifiers", modName = "SelfCritChance", enemy = true },
548548
}, },
549+
{ label = "MH Crit Forks", bgCol = colorCodes.MAINHANDBG, flag = "weapon1Attack", { format = "{2:output:MainHand.CritForks}%",
550+
{ breakdown = "MainHand.CritForks" },
551+
{ label = "Player modifiers", modName = "ForkCrit", cfg = "weapon1" },
552+
}, },
549553
{ label = "MH Crit Multiplier", bgCol = colorCodes.MAINHANDBG, flag = "weapon1Attack", { format = "x {2:output:MainHand.CritMultiplier}",
550554
{ breakdown = "MainHand.CritMultiplier" },
551555
{ label = "Player modifiers", modName = "CritMultiplier", cfg = "weapon1" },
@@ -562,6 +566,10 @@ return {
562566
{ label = "Player modifiers", modName = { "CritChance", "WeaponBaseCritChance", "AttackCritIsEqualToParentMainHand" }, cfg = "weapon2" },
563567
{ label = "Enemy modifiers", modName = "SelfCritChance", enemy = true },
564568
}, },
569+
{ label = "OH Crit Forks", bgCol = colorCodes.OFFHANDBG, flag = "weapon2Attack", { format = "{2:output:OffHand.CritForks}%",
570+
{ breakdown = "OffHand.CritForks" },
571+
{ label = "Player modifiers", modName = "ForkCrit", cfg = "weapon2" },
572+
}, },
565573
{ label = "OH Crit Multiplier", bgCol = colorCodes.OFFHANDBG, flag = "weapon2Attack", { format = "x {2:output:OffHand.CritMultiplier}",
566574
{ breakdown = "OffHand.CritMultiplier" },
567575
{ label = "Player modifiers", modName = "CritMultiplier", cfg = "weapon2" },

0 commit comments

Comments
 (0)