Skip to content

Commit 54f9313

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Mana Burn not applying at least 1 degen per stack (#9631)
Mana Burn was using a percent degen mod so didn't have the ability to set a minimum value per stack Changed it to use its own `DegenPercentTincture` mod so that it doesn't interfere with other degen mods Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent cb5a245 commit 54f9313

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/Modules/CalcDefence.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,9 @@ function calcs.defence(env, actor)
12691269
output[resource.."Regen"] = regenRate
12701270
end
12711271
output[resource.."RegenInc"] = inc
1272-
local baseDegen = (modDB:Sum("BASE", nil, resource.."Degen") + pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100)
1272+
local baseDegen = modDB:Sum("BASE", nil, resource.."Degen") + (pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100)
1273+
local tinctureDegenPercent = modDB:Sum("BASE", nil, resource.."DegenPercentTincture")
1274+
baseDegen = baseDegen + m_max(pool * tinctureDegenPercent / 100, tinctureDegenPercent) -- tincture minimum 1 degen per stack
12731275
local degenRate = (baseDegen > 0) and baseDegen * calcLib.mod(modDB, nil, resource.."Degen") or 0
12741276
output[resource.."Degen"] = degenRate
12751277
local recoveryRate = modDB:Sum("BASE", nil, resource.."Recovery") * recoveryRateMod

src/Modules/CalcSections.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ return {
14091409
}, },
14101410
{ label = "Recovery", { format = "{1:output:LifeRegenRecovery} ({1:output:LifeRegenPercent}%)",
14111411
{ breakdown = "LifeRegenRecovery" },
1412-
{ label = "Sources", modName = { "LifeRegen", "LifeRegenPercent", "LifeDegen", "LifeDegenPercent", "LifeRecovery" }, modType = "BASE" },
1412+
{ label = "Sources", modName = { "LifeRegen", "LifeRegenPercent", "LifeDegen", "LifeDegenPercent", "LifeDegenPercentTincture", "LifeRecovery" }, modType = "BASE" },
14131413
{ label = "Increased Life Regeneration Rate", modName = { "LifeRegen" }, modType = "INC" },
14141414
{ label = "More Life Regeneration Rate", modName = { "LifeRegen" }, modType = "MORE" },
14151415
{ label = "Recovery modifiers", modName = "LifeRecoveryRate" },
@@ -1464,7 +1464,7 @@ return {
14641464
{ label = "Unreserved", { format = "{0:output:ManaUnreserved} ({0:output:ManaUnreservedPercent}%)" }, },
14651465
{ label = "Recovery", { format = "{1:output:ManaRegenRecovery} ({1:output:ManaRegenPercent}%)",
14661466
{ breakdown = "ManaRegenRecovery" },
1467-
{ label = "Sources", modName = { "ManaRegen", "ManaRegenPercent", "ManaDegen", "ManaDegenPercent", "ManaRecovery" }, modType = "BASE" },
1467+
{ label = "Sources", modName = { "ManaRegen", "ManaRegenPercent", "ManaDegen", "ManaDegenPercent", "ManaDegenPercentTincture", "ManaRecovery" }, modType = "BASE" },
14681468
{ label = "Increased Mana Regeneration Rate", modName = { "ManaRegen" }, modType = "INC" },
14691469
{ label = "More Mana Regeneration Rate", modName = { "ManaRegen" }, modType = "MORE" },
14701470
{ label = "Recovery modifiers", modName = "ManaRecoveryRate" },

src/Modules/CalcSetup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ function calcs.initEnv(build, mode, override, specEnv)
524524
modDB:NewMod("PerAfflictionNonDamageEffect", "BASE", data.characterConstants["non_damaging_ailment_effect_+%_final_per_affliction_charge"], "Base")
525525
modDB:NewMod("PerAbsorptionElementalEnergyShieldRecoup", "BASE", data.characterConstants["elemental_damage_taken_goes_to_energy_shield_over_4_seconds_%_per_absorption_charge"], "Base")
526526
modDB:NewMod("TinctureLimit", "BASE", 1, "Base")
527-
modDB:NewMod("ManaDegenPercent", "BASE", 1, "Base", { type = "Multiplier", var = "EffectiveManaBurnStacks" })
528-
modDB:NewMod("LifeDegenPercent", "BASE", 1, "Base", { type = "Multiplier", var = "WeepingWoundsStacks" })
527+
modDB:NewMod("ManaDegenPercentTincture", "BASE", 1, "Base", { type = "Multiplier", var = "EffectiveManaBurnStacks" })
528+
modDB:NewMod("LifeDegenPercentTincture", "BASE", 1, "Base", { type = "Multiplier", var = "WeepingWoundsStacks" })
529529
modDB:NewMod("PresenceRadius", "BASE", data.characterConstants["base_presence_radius"], "Base")
530530

531531
-- Add bandit mods

src/Modules/Data.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,15 @@ data.highPrecisionMods = {
387387
["LifeDegenPercent"] = {
388388
["BASE"] = 2,
389389
},
390+
["LifeDegenPercentTincture"] = {
391+
["BASE"] = 2,
392+
},
390393
["ManaDegenPercent"] = {
391394
["BASE"] = 2,
392395
},
396+
["ManaDegenPercentTincture"] = {
397+
["BASE"] = 2,
398+
},
393399
["EnergyShieldDegenPercent"] = {
394400
["BASE"] = 2,
395401
},

0 commit comments

Comments
 (0)