From 25f427050e14a8ee0bf880a06e0aa009cd7ff52b Mon Sep 17 00:00:00 2001 From: Andrew B <3247221+andrewbelu@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:51:32 -0600 Subject: [PATCH] Critical cull chance uses hit rate (#5378) * critical cull chance uses hit rate * Move lines Co-authored-by: LocalIdentity --- src/Modules/CalcOffence.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index a9af23e8b5..3b33d92f70 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2336,16 +2336,20 @@ function calcs.offence(env, actor, activeSkill) output.DoubleDamageChance = m_max(output.DoubleDamageChance - output.TripleDamageChance * output.DoubleDamageChance / 100, 0) end output.DoubleDamageEffect = 1 + output.DoubleDamageChance / 100 - output.ScaledDamageEffect = output.ScaledDamageEffect * output.DoubleDamageEffect + output.ScaledDamageEffect = output.ScaledDamageEffect * output.DoubleDamageEffect + + local hitRate = output.HitChance / 100 * (globalOutput.HitSpeed or globalOutput.Speed) * (skillData.dpsMultiplier or 1) + -- Calculate culling DPS local criticalCull = skillModList:Max(cfg, "CriticalCullPercent") or 0 if criticalCull > 0 then - criticalCull = criticalCull * (output.CritChance / 100) + criticalCull = m_min(criticalCull, criticalCull * (1 - (1 - output.CritChance / 100) ^ hitRate)) end local regularCull = skillModList:Max(cfg, "CullPercent") or 0 local maxCullPercent = m_max(criticalCull, regularCull) globalOutput.CullPercent = maxCullPercent globalOutput.CullMultiplier = 100 / (100 - globalOutput.CullPercent) + -- Calculate base hit damage for _, damageType in ipairs(dmgTypeList) do local damageTypeMin = damageType.."Min" @@ -2673,8 +2677,6 @@ function calcs.offence(env, actor, activeSkill) skillModList:NewMod("Condition:"..highestType.."IsHighestDamageType", "FLAG", true, "Config") end - local hitRate = output.HitChance / 100 * (globalOutput.HitSpeed or globalOutput.Speed) * (skillData.dpsMultiplier or 1) - -- Calculate leech local function getLeechInstances(amount, total) if total == 0 then