Skip to content

Commit 2067fea

Browse files
committed
add fortification max, min, duration, and effect to CalcSections
remove effect scaling from Ichi/buffs on self
1 parent 4445e2a commit 2067fea

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/Modules/CalcPerform.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,16 @@ local function doActorMisc(env, actor)
617617
local maxStacks = modDB:Override(nil, "MaximumFortification") or modDB:Sum("BASE", skillCfg, "MaximumFortification")
618618
local minStacks = m_min(modDB:Flag(nil, "Condition:HaveMaxFortification") and maxStacks or modDB:Sum("BASE", nil, "MinimumFortification"), maxStacks)
619619
local stacks = m_min(modDB:Override(nil, "FortificationStacks") or (alliedFortify > 0 and alliedFortify) or (minStacks > 0 and minStacks) or maxStacks, maxStacks)
620+
local duration = modDB:Sum("INC", nil, "FortificationDuration")
621+
output.MaximumFortification = maxStacks
622+
output.MinimumFortification = minStacks
620623
output.FortificationStacks = stacks
621624
output.FortificationStacksOver20 = m_min(m_max(0, stacks - 20), maxStacks - 20)
625+
output.FortificationDuration = (6 + (env.player.mainSkill.skillCfg.skillName == "Vigilant Strike" and 2 or 0)) * (1 + duration / 100)
626+
output.FortificationEffect = "0" -- string allows shown for Willowgift mod
622627
if not modDB:Flag(nil,"Condition:NoFortificationMitigation") then
623-
local effectScale = 1 + modDB:Sum("INC", nil, "BuffEffectOnSelf") / 100
624-
local effect = m_floor(effectScale * stacks)
625-
modDB:NewMod("DamageTakenWhenHit", "MORE", -effect, "Fortification")
628+
output.FortificationEffect = stacks
629+
modDB:NewMod("DamageTakenWhenHit", "MORE", -stacks, "Fortification")
626630
end
627631
if stacks >= maxStacks then
628632
modDB:NewMod("Condition:HaveMaximumFortification", "FLAG", true, "")

src/Modules/CalcSections.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,11 @@ return {
17401740
{ label = "Exposure Effect", { format = "{1:output:ExposureEffectOnSelf}%", { modName = "ExposureEffectOnSelf" }, }, },
17411741
{ label = "Wither Effect", { format = "{1:output:WitherEffectOnSelf}%", { modName = "WitherEffectOnSelf" }, }, },
17421742
{ label = "Debuff Dur. Mult.", haveOutput = "showDebuffExpirationModifier", { format = "{1:output:DebuffExpirationModifier}%", { modName = "SelfDebuffExpirationRate" }, }, },
1743+
} }, { defaultCollapsed = false, label = "Fortification", data = {
1744+
{ label = "Maximum Stacks", haveOutput = "MaximumFortification", { format = "{0:output:MaximumFortification}", { breakdown = "MaximumFortification" }, { modName = "MaximumFortification" }, }, },
1745+
{ label = "Minimum Stacks", haveOutput = "MinimumFortification", { format = "{0:output:MinimumFortification}", { breakdown = "MinimumFortification" }, { modName = "MinimumFortification" }, }, },
1746+
{ label = "Duration", haveOutput = "FortificationDuration", { format = "{2:output:FortificationDuration}s", { breakdown = "FortificationDuration" }, { modName = "FortificationDuration" }, }, },
1747+
{ label = "Less Dmg. Taken", haveOutput = "FortificationEffect", { format = "{output:FortificationEffect}%", { breakdown = "FortificationEffect" }, { modName = "Condition:NoFortificationMitigation" }, }, },
17431748
} }, { defaultCollapsed = false, label = "Stun Duration", data = {
17441749
{ label = "Stun Avoid Chance", haveOutput = "StunAvoidChance", { format = "{0:output:StunAvoidChance}%", { breakdown = "StunAvoidChance" }, { modName = "AvoidStun" }, }, },
17451750
{ label = "Stun Threshold", { format = "{0:output:StunThreshold}", { breakdown = "StunThreshold" }, { modName = { "StunThreshold", "StunThresholdManaPercent", "StunThresholdEnergyShieldPercent" } }, }, },

0 commit comments

Comments
 (0)