From 46cb9eb42c897a539f90ea56478f0d97d9615233 Mon Sep 17 00:00:00 2001 From: Regisle <49933620+Regisle@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:44:40 +0930 Subject: [PATCH] Champion foritfy (#7773) * Champion Fortify for minions * add party tab export --------- Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com> --- src/Modules/CalcPerform.lua | 22 +++++++++++++++++++--- src/Modules/ModParser.lua | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 88723c2ae1..51450a1001 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -539,15 +539,20 @@ local function doActorMisc(env, actor) if env.player.mainSkill.baseSkillModList:Flag(nil, "Cruelty") then modDB.multipliers["Cruelty"] = modDB:Override(nil, "Cruelty") or 40 end - -- Minimum Fortification from King Maker of Perfect Naval Officer spectres - if modDB:Sum("BASE", nil, "MinimumFortification") > 0 then + -- Minimum Rage + if modDB:Sum("BASE", nil, "MinimumRage") > (modDB.multipliers["Rage"] or 0) then + modDB.multipliers["Rage"] = modDB:Sum("BASE", nil, "MinimumRage") + end + local alliedFortify = modDB:Flag(nil, "YourFortifyEqualToParent") and actor.parent.output.FortificationStacks or env.partyMembers and env.partyMembers.modDB:Flag(nil, "PartyMemberFortifyEqualToYours") and env.partyMembers.output.FortificationStacks or 0 + -- Minimum Fortification from King Maker or Perfect Naval Officer spectres or Ally override + if modDB:Sum("BASE", nil, "MinimumFortification") > 0 or alliedFortify > 0 then condList["Fortified"] = true end -- Fortify if modDB:Flag(nil, "Fortified") or modDB:Sum("BASE", nil, "Multiplier:Fortification") > 0 then local maxStacks = modDB:Override(nil, "MaximumFortification") or modDB:Sum("BASE", skillCfg, "MaximumFortification") local minStacks = m_min(modDB:Sum("BASE", nil, "MinimumFortification"), maxStacks) - local stacks = modDB:Override(nil, "FortificationStacks") or (minStacks > 0 and minStacks) or maxStacks + local stacks = modDB:Override(nil, "FortificationStacks") or (alliedFortify > 0 and alliedFortify) or (minStacks > 0 and minStacks) or maxStacks output.FortificationStacks = stacks if not modDB:Flag(nil,"Condition:NoFortificationMitigation") then local effectScale = 1 + modDB:Sum("INC", nil, "BuffEffectOnSelf") / 100 @@ -3055,6 +3060,17 @@ function calcs.perform(env, skipEHP) end buffExports.PlayerMods["MovementSpeedMod|percent|max="..tostring(output["MovementSpeedMod"] * 100)] = true + + for _, mod in ipairs(buffExports["Aura"]["extraAura"].modList) do + -- leaving comment to make it easier for future similar mods + --if mod.name:match("Parent") then + -- ConPrintTable(mod) + --end + if mod.name == "YourFortifyEqualToParent" then + buffExports.PlayerMods["PartyMemberFortifyEqualToYours"] = true + buffExports.PlayerMods["FortificationStacks="..tostring(output.FortificationStacks or 0)] = true + end + end -- preStack Mine auras for auraName, aura in pairs(buffExports["Aura"]) do diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index dda3833810..a0593d60f8 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2304,6 +2304,7 @@ local specialModList = { ["you cannot be stunned while at maximum endurance charges"] = { flag("StunImmune", { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }) }, ["fortify"] = { flag("Condition:Fortified") }, ["you have (%d+) fortification"] = function(num) return { mod("MinimumFortification", "BASE", num) } end, + ["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 } ) }) }, ["enemies taunted by you cannot evade attacks"] = { mod("EnemyModifier", "LIST", { mod = flag("CannotEvade", { type = "Condition", var = "Taunted" }) }) }, ["if you've impaled an enemy recently, you and nearby allies have %+(%d+) to armour"] = function (num) return { mod("ExtraAura", "LIST", { mod = mod("Armour", "BASE", num) }, { type = "Condition", var = "ImpaledRecently" }) } end, ["your hits permanently intimidate enemies that are on full life"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated", { type = "Condition", var = "ChampionIntimidate" }) }) },