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

Fix Tailwind not applying #6919

Merged
merged 1 commit into from
Dec 5, 2023
Merged
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
133 changes: 67 additions & 66 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2682,6 +2682,73 @@ function calcs.perform(env, fullDPSSkipEHP)
enemyDB:ReplaceMod("Multiplier:ImpaleStacks", "BASE", maxImpaleStacks, "Config", { type = "Condition", var = "Combat" })
end

-- Check for extra auras
buffExports["Aura"]["extraAura"] = { effectMult = 1, modList = new("ModList") }
for _, value in ipairs(modDB:List(nil, "ExtraAura")) do
local modList = { value.mod }
if not value.onlyAllies then
local inc = modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
modDB:ScaleAddList(modList, (1 + inc / 100) * more)
if not value.notBuff then
modDB.multipliers["BuffOnSelf"] = (modDB.multipliers["BuffOnSelf"] or 0) + 1
end
end
if not modDB:Flag(nil, "SelfAurasCannotAffectAllies") then
if env.minion then
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
end
buffExports["Aura"]["extraAura"].modList:AddMod(value.mod)
local totemModBlacklist = value.mod.name and (value.mod.name == "Speed" or value.mod.name == "CritMultiplier" or value.mod.name == "CritChance")
if env.player.mainSkill.skillFlags.totem and not totemModBlacklist then
local totemMod = copyTable(value.mod)
local totemModName, matches = totemMod.name:gsub("Condition:", "Condition:Totem")
if matches < 1 then
totemModName = "Totem" .. totemMod.name
end
totemMod.name = totemModName
modDB:AddMod(totemMod)
end
end
end
if allyBuffs["extraAura"] then
for _, buff in pairs(allyBuffs["extraAura"]) do
local modList = buff.modList
local inc = modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
modDB:ScaleAddList(modList, (1 + inc / 100) * more)
if env.minion then
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
end
end
end

-- Check for modifiers to apply to actors affected by player auras or curses
for _, value in ipairs(modDB:List(nil, "AffectedByAuraMod")) do
for actor in pairs(affectedByAura) do
actor.modDB:AddMod(value.mod)
end
end

-- Merge keystones again to catch any that were added by buffs
mergeKeystones(env)

-- Special handling for Dancing Dervish
if modDB:Flag(nil, "DisableWeapons") then
env.player.weaponData1 = copyTable(env.data.unarmedWeaponData[env.classId])
modDB.conditions["Unarmed"] = true
if not env.player.Gloves or env.player.Gloves == None then
modDB.conditions["Unencumbered"] = true
end
elseif env.weaponModList1 then
modDB:AddList(env.weaponModList1)
end

-- Process misc buffs/modifiers
doActorMisc(env, env.player)
if env.minion then
doActorMisc(env, env.minion)
Expand Down Expand Up @@ -2780,72 +2847,6 @@ function calcs.perform(env, fullDPSSkipEHP)
enemyDB:NewMod("Multiplier:ShockEffect", "BASE", output["CurrentShock"] - shockEffectMultiplier, "")
end

-- Check for extra auras
buffExports["Aura"]["extraAura"] = { effectMult = 1, modList = new("ModList") }
for _, value in ipairs(modDB:List(nil, "ExtraAura")) do
local modList = { value.mod }
if not value.onlyAllies then
local inc = modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
modDB:ScaleAddList(modList, (1 + inc / 100) * more)
if not value.notBuff then
modDB.multipliers["BuffOnSelf"] = (modDB.multipliers["BuffOnSelf"] or 0) + 1
end
end
if not modDB:Flag(nil, "SelfAurasCannotAffectAllies") then
if env.minion then
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
end
buffExports["Aura"]["extraAura"].modList:AddMod(value.mod)
local totemModBlacklist = value.mod.name and (value.mod.name == "Speed" or value.mod.name == "CritMultiplier" or value.mod.name == "CritChance")
if env.player.mainSkill.skillFlags.totem and not totemModBlacklist then
local totemMod = copyTable(value.mod)
local totemModName, matches = totemMod.name:gsub("Condition:", "Condition:Totem")
if matches < 1 then
totemModName = "Totem" .. totemMod.name
end
totemMod.name = totemModName
modDB:AddMod(totemMod)
end
end
end
if allyBuffs["extraAura"] then
for _, buff in pairs(allyBuffs["extraAura"]) do
local modList = buff.modList
local inc = modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
modDB:ScaleAddList(modList, (1 + inc / 100) * more)
if env.minion then
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
end
end
end

-- Check for modifiers to apply to actors affected by player auras or curses
for _, value in ipairs(modDB:List(nil, "AffectedByAuraMod")) do
for actor in pairs(affectedByAura) do
actor.modDB:AddMod(value.mod)
end
end

-- Merge keystones again to catch any that were added by buffs
mergeKeystones(env)

-- Special handling for Dancing Dervish
if modDB:Flag(nil, "DisableWeapons") then
env.player.weaponData1 = copyTable(env.data.unarmedWeaponData[env.classId])
modDB.conditions["Unarmed"] = true
if not env.player.Gloves or env.player.Gloves == None then
modDB.conditions["Unencumbered"] = true
end
elseif env.weaponModList1 then
modDB:AddList(env.weaponModList1)
end

doActorMisc(env, env.enemy)

for _, activeSkill in ipairs(env.player.activeSkillList) do
Expand Down