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

Fixed Non-Damaging Ailment issue with Critical Mastery in Calc Screen #8393

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
15 changes: 15 additions & 0 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,7 @@
end
end

-- Ailment + Non Damaging Ailment Section
local ailmentData = data.nonDamagingAilment
for _, ailment in ipairs(ailmentTypeList) do
skillFlags[string.lower(ailment)] = false
Expand Down Expand Up @@ -3650,6 +3651,7 @@
output.PoisonChanceOnHit = m_min(100, skillModList:Sum("BASE", cfg, "PoisonChance") + enemyDB:Sum("BASE", nil, "SelfPoisonChance"))
output.ChaosPoisonChance = m_min(100, skillModList:Sum("BASE", cfg, "ChaosPoisonChance"))
end
-- Elemental Ailment Affliction Chance | Elemental Ailment Additionals

Check warning on line 3654 in src/Modules/CalcOffence.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Additionals)
for _, ailment in ipairs(elementalAilmentTypeList) do
local chance = skillModList:Sum("BASE", cfg, "Enemy"..ailment.."Chance") + enemyDB:Sum("BASE", nil, "Self"..ailment.."Chance")
if ailment == "Chill" then
Expand Down Expand Up @@ -4698,6 +4700,7 @@
local enemyTypeMult = isBoss and 7.68 or 1
local enemyThreshold = enemyAilmentThreshold * enemyTypeMult * enemyMapLifeMult * enemyDB:More(nil, "Life") * enemyMapAilmentMult * enemyDB:More(nil, "AilmentThreshold")

-- Defaulting ailments dictionary | Done to organize non-damaging ailments by type and have standardized effect and threshhold calcs

Check warning on line 4703 in src/Modules/CalcOffence.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (threshhold)
local ailments = {
["Chill"] = {
effList = { 10, 20 },
Expand Down Expand Up @@ -4730,6 +4733,7 @@
ramping = false,
},
}
-- Chilling Area like floor Frost has a different effect and must be done differently
if activeSkill.skillTypes[SkillType.ChillingArea] or activeSkill.skillTypes[SkillType.NonHitChill] then
skillFlags.chill = true
local incChill = skillModList:Sum("INC", cfg, "EnemyChillEffect")
Expand All @@ -4748,6 +4752,7 @@
})
end
end
-- Crit ailments are done differently for Freeze
if (output.FreezeChanceOnHit + output.FreezeChanceOnCrit) > 0 then
if globalBreakdown then
globalBreakdown.FreezeDurationMod = {
Expand All @@ -4764,19 +4769,29 @@
end
end
end
-- Cycle through all non-damage ailments here, modifying them if needed
for ailment, val in pairs(ailments) do
if (output[ailment.."ChanceOnHit"] + output[ailment.."ChanceOnCrit"]) > 0 then
if globalBreakdown then
globalBreakdown[ailment.."EffectMod"] = {
s_format("Ailment mode: %s ^8(can be changed in the Configuration tab)", ailmentMode == "CRIT" and "Crits Only" or "Average Damage")
}
end
-- Sets the crit strike condition to match ailment mode.
if ailmentMode == "CRIT" then
cfg.skillCond["CriticalStrike"] = true
else
cfg.skillCond["CriticalStrike"] = false
end

local damage = calcAilmentDamage(ailment, output.CritChance, calcAverageSourceDamage(ailment)) * skillModList:More(cfg, ailment.."AsThoughDealing")
-- We check if there is a damage instance above 0 since if you deal 0 damage, you don't apply anything.
if damage > 0 then
skillFlags[string.lower(ailment)] = true
local incDur = skillModList:Sum("INC", cfg, "Enemy"..ailment.."Duration", "EnemyElementalAilmentDuration", "EnemyAilmentDuration") + enemyDB:Sum("INC", nil, "Self"..ailment.."Duration", "SelfElementalAilmentDuration", "SelfAilmentDuration")
local moreDur = skillModList:More(cfg, "Enemy"..ailment.."Duration", "EnemyElementalAilmentDuration", "EnemyAilmentDuration") * enemyDB:More(nil, "Self"..ailment.."Duration", "SelfElementalAilmentDuration", "SelfAilmentDuration")
output[ailment.."Duration"] = ailmentData[ailment].duration * (1 + incDur / 100) * moreDur * debuffDurationMult
-- Line Controlls Crit Conditional for Crit Mastery

Check warning on line 4794 in src/Modules/CalcOffence.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Controlls)
output[ailment.."EffectMod"] = calcLib.mod(skillModList, cfg, "Enemy"..ailment.."Effect")
if breakdown then
local maximum = globalOutput["Maximum"..ailment] or ailmentData[ailment].max
Expand Down
Loading