Skip to content

Commit c18aa2c

Browse files
LocalIdentityLocalIdentity
andauthored
Add support for Champions new maximum Fortification mod (#8668)
The mod was added with the 3.26 tree but didn't have support yet Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 5cae908 commit c18aa2c

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11920,7 +11920,7 @@ c["You have Zealot's Oath if you haven't been hit recently"]={{[1]={[1]={neg=tru
1192011920
c["You have no Armour or Maximum Energy Shield"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="MORE",value=-100},[2]={flags=0,keywordFlags=0,name="EnergyShield",type="MORE",value=-100}},nil}
1192111921
c["You have no Intelligence"]={{[1]={flags=0,keywordFlags=0,name="Int",type="MORE",value=-100}},nil}
1192211922
c["You have no Life Regeneration"]={{[1]={flags=0,keywordFlags=0,name="NoLifeRegen",type="FLAG",value=true}},nil}
11923-
c["You have your maximum Fortification"]={nil,"your maximum Fortification "}
11923+
c["You have your maximum Fortification"]={{[1]={flags=0,keywordFlags=0,name="Condition:Fortified",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="Condition:HaveMaxFortification",type="FLAG",value=true}},nil}
1192411924
c["You lose all Endurance Charges on reaching maximum Endurance Charges"]={nil,"You lose all Endurance Charges on reaching maximum Endurance Charges "}
1192511925
c["You lose all Endurance Charges on reaching maximum Endurance Charges Cannot Block"]={nil,"You lose all Endurance Charges on reaching maximum Endurance Charges Cannot Block "}
1192611926
c["You lose all Endurance Charges when Hit"]={nil,"You lose all Endurance Charges when Hit "}

src/Modules/CalcPerform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ local function doActorMisc(env, actor)
610610
-- Fortify
611611
if modDB:Flag(nil, "Fortified") or modDB:Sum("BASE", nil, "Multiplier:Fortification") > 0 then
612612
local maxStacks = modDB:Override(nil, "MaximumFortification") or modDB:Sum("BASE", skillCfg, "MaximumFortification")
613-
local minStacks = m_min(modDB:Sum("BASE", nil, "MinimumFortification"), maxStacks)
613+
local minStacks = m_min(modDB:Flag(nil, "Condition:HaveMaxFortification") and maxStacks or modDB:Sum("BASE", nil, "MinimumFortification"), maxStacks)
614614
local stacks = modDB:Override(nil, "FortificationStacks") or (alliedFortify > 0 and alliedFortify) or (minStacks > 0 and minStacks) or maxStacks
615615
output.FortificationStacks = stacks
616616
output.FortificationStacksOver20 = m_min(m_max(0, stacks - 20), maxStacks - 20)

src/Modules/ModParser.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,6 +2344,7 @@ local specialModList = {
23442344
["cannot be stunned while fortified"] = { flag("StunImmune", { type = "Condition", var = "Fortified" }) },
23452345
["you cannot be stunned while at maximum endurance charges"] = { flag("StunImmune", { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }) },
23462346
["fortify"] = { flag("Condition:Fortified") },
2347+
["you have your maximum fortification"] = { flag("Condition:Fortified"), flag("Condition:HaveMaxFortification") },
23472348
["you have (%d+) fortification"] = function(num) return { mod("MinimumFortification", "BASE", num) } end,
23482349
["nearby allies count as having fortification equal to yours"] = { mod("ExtraAura", "LIST", { onlyAllies = true, mod = mod("YourFortifyEqualToParent", "FLAG", true, { type = "GlobalEffect", effectType = "Global", unscalable = true } ) }) },
23492350
["enemies taunted by you cannot evade attacks"] = { mod("EnemyModifier", "LIST", { mod = flag("CannotEvade", { type = "Condition", var = "Taunted" }) }) },

0 commit comments

Comments
 (0)