Skip to content

Commit

Permalink
Champion foritfy (#7773)
Browse files Browse the repository at this point in the history
* Champion Fortify for minions

* add party tab export

---------

Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
  • Loading branch information
Regisle and LocalIdentity authored Jul 22, 2024
1 parent 4f9a818 commit 46cb9eb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" }) }) },
Expand Down

0 comments on commit 46cb9eb

Please sign in to comment.