Skip to content

Commit 8058e20

Browse files
committed
FEAT: Add parsing for Gain 100% of Evasion Rating as extra Ailment Threshold
Solution is general and should work for other simillar mods. This also adds general Ailment Threshold parsing and adds it under the "Other Ailment Defenses" section on the calcs tab. This is currently just a modDB:Sum display without any extra processing. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
1 parent f28eff8 commit 8058e20

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/Modules/CalcDefence.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,7 @@ function calcs.defence(env, actor)
17221722
end
17231723
end
17241724

1725+
output.AilmentThreshold = modDB:Sum("BASE", nil, "AilmentThreshold")
17251726
for _, ailment in ipairs(data.nonElementalAilmentTypeList) do
17261727
output[ailment.."AvoidChance"] = modDB:Flag(nil, ailment.."Immune") and 100 or m_floor(m_min(modDB:Sum("BASE", nil, "Avoid"..ailment, "AvoidAilments"), 100))
17271728
end

src/Modules/CalcSections.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,7 @@ return {
18011801
{ label = "Knockback Immune", haveOutput = "KnockbackImmunity", { format = "True", { modName = "KnockbackImmune" }, }, },
18021802
{ label = "Blind Duration", haveOutput = "SelfBlindDuration", { format = "{0:output:SelfBlindDuration}%", { modName = "SelfBlindDuration" }, }, },
18031803
} }, { defaultCollapsed = true, label = "Other Ailment Defences", data = {
1804+
{ label = "Ailment Threshold", { format = "{2:output:AilmentThreshold}", { modName = { "AilmentThreshold" }, }, }, },
18041805
{ label = "Freeze Duration", { format = "{1:output:SelfFreezeDuration}%", { modName = { "SelfFreezeDuration", "SelfDebuffExpirationRate", "SelfFreezeDebuffExpirationRate", "SelfAilmentDuration", "SelfElementalAilmentDuration", "SelfIgniteDurationToElementalAilments" }, }, }, },
18051806
{ label = "Chill Duration", { format = "{1:output:SelfChillDuration}%", { modName = { "SelfChillDuration", "SelfDebuffExpirationRate", "SelfChillDebuffExpirationRate", "SelfAilmentDuration", "SelfElementalAilmentDuration", "SelfIgniteDurationToElementalAilments" }, }, }, },
18061807
{ label = "Shock Duration", { format = "{1:output:SelfShockDuration}%", { modName = { "SelfShockDuration", "SelfDebuffExpirationRate", "SelfShockDebuffExpirationRate", "SelfAilmentDuration", "SelfElementalAilmentDuration", "SelfIgniteDurationToElementalAilments" }, }, }, },

src/Modules/ModParser.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ local modNameList = {
381381
["elemental damage taken recouped as energy shield"] = { "LightningEnergyShieldRecoup", "ColdEnergyShieldRecoup", "FireEnergyShieldRecoup" },
382382
["damage taken recouped as mana"] = "ManaRecoup",
383383
["damage taken recouped as life, mana and energy shield"] = { "LifeRecoup", "EnergyShieldRecoup", "ManaRecoup" },
384+
["ailment threshold"] = "AilmentThreshold",
384385
-- Stun/knockback modifiers
385386
["stun recovery"] = "StunRecovery",
386387
["stun and block recovery"] = "StunRecovery",
@@ -4499,7 +4500,7 @@ local specialModList = {
44994500
["gain stun threshold equal to the lowest of evasion and armour on your helmet"] = {
45004501
mod("StunThreshold", "BASE", 1, { type = "PerStat", stat = "LowestOfArmourAndEvasionOnHelmet" }),
45014502
},
4502-
["gain (%d+)%% of (%a+) as extra (%a+) threshold"] = function(num, _, stat, thresholdType) return {
4503+
["gain (%d+)%% of (%a+) ?r?a?t?i?n?g? as extra (%a+) threshold"] = function(num, _, stat, thresholdType) return {
45034504
mod(firstToUpper(thresholdType) .. "Threshold", "BASE", 1, { type = "PercentStat", stat = stat:gsub("^%l", string.upper):gsub(" %l", string.upper):gsub(" ", ""), percent = num })
45044505
} end,
45054506
["your stun threshold is doubled"] = {

0 commit comments

Comments
 (0)