Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Champion foritfy #7773

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading