Skip to content
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
27 changes: 5 additions & 22 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,6 @@ function calcs.perform(env, avoidCache)
end
end
end
local affectedByAura = { }
for _, activeSkill in ipairs(env.player.activeSkillList) do
local skillModList = activeSkill.skillModList
local skillCfg = activeSkill.skillCfg
Expand Down Expand Up @@ -1858,7 +1857,7 @@ function calcs.perform(env, avoidCache)
end
if not activeSkill.skillData.auraCannotAffectSelf then
activeSkill.buffSkill = true
affectedByAura[env.player] = true
modDB.conditions["AffectedByAura"] = true
if buff.name:sub(1,4) == "Vaal" then
modDB.conditions["AffectedBy"..buff.name:sub(6):gsub(" ","")] = true
end
Expand All @@ -1873,8 +1872,8 @@ function calcs.perform(env, avoidCache)
end
if env.minion and not (modDB:Flag(nil, "SelfAurasCannotAffectAllies") or modDB:Flag(nil, "SelfAurasOnlyAffectYou") or modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies")) then
activeSkill.minionBuffSkill = true
affectedByAura[env.minion] = true
env.minion.modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] = true
env.minion.modDB.conditions["AffectedByAura"] = true
local srcList = new("ModList")
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect") * env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
Expand All @@ -1885,8 +1884,8 @@ function calcs.perform(env, avoidCache)
end
if env.player.mainSkill.skillFlags.totem and not (modDB:Flag(nil, "SelfAurasCannotAffectAllies") or modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies")) then
activeSkill.totemBuffSkill = true
affectedByAura[env.player.mainSkill] = true
env.player.mainSkill.skillModList.conditions["AffectedBy"..buff.name:gsub(" ","")] = true
env.player.mainSkill.skillModList.conditions["AffectedByAura"] = true

local srcList = new("ModList")
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect", "AuraBuffEffect")
Expand Down Expand Up @@ -1952,13 +1951,13 @@ function calcs.perform(env, avoidCache)
end
elseif buff.type == "Curse" or buff.type == "CurseBuff" then
local mark = activeSkill.skillTypes[SkillType.Mark]
if env.mode_effective and (not enemyDB:Flag(nil, "Hexproof") or modDB:Flag(nil, "CursesIgnoreHexproof")) or mark then
if env.mode_effective and (not enemyDB:Flag(nil, "Hexproof") or modDB:Flag(nil, "CursesIgnoreHexproof") or activeSkill.skillData.ignoreHexLimit) or mark then
local curse = {
name = buff.name,
fromPlayer = true,
priority = determineCursePriority(buff.name, activeSkill),
isMark = mark,
ignoreHexLimit = modDB:Flag(activeSkill.skillCfg, "CursesIgnoreHexLimit") and not mark or false,
ignoreHexLimit = (modDB:Flag(activeSkill.skillCfg, "CursesIgnoreHexLimit") or activeSkill.skillData.ignoreHexLimit) and not mark or false,
socketedCursesHexLimit = modDB:Flag(activeSkill.skillCfg, "SocketedCursesAdditionalLimit")
}
local inc = skillModList:Sum("INC", skillCfg, "CurseEffect") + enemyDB:Sum("INC", nil, "CurseEffectOnSelf")
Expand Down Expand Up @@ -2323,15 +2322,11 @@ function calcs.perform(env, avoidCache)
enemyDB:AddList(modList)
end
modDB.multipliers["CurseOnEnemy"] = #curseSlots
local affectedByCurse = { }
for _, slot in ipairs(curseSlots) do
enemyDB.conditions["Cursed"] = true
if slot.isMark then
enemyDB.conditions["Marked"] = true
end
if slot.fromPlayer then
affectedByCurse[env.enemy] = true
end
if slot.modList then
enemyDB:AddList(slot.modList)
end
Expand Down Expand Up @@ -3129,18 +3124,6 @@ function calcs.perform(env, avoidCache)
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
for _, value in ipairs(modDB:List(nil, "AffectedByCurseMod")) do
for actor in pairs(affectedByCurse) do
actor.modDB:AddMod(value.mod)
end
end

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

Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,9 @@ return {
{ var = "multiplierPoisonOnEnemy", type = "count", label = "# of Poison on enemy:", implyCond = "Poisoned", apply = function(val, modList, enemyModList)
enemyModList:NewMod("Multiplier:PoisonStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
{ var = "multiplierCurseExpiredOnEnemy", type = "count", label = "#% of Curse Expired on enemy:", ifEnemyMult = "CurseExpired", apply = function(val, modList, enemyModList)
enemyModList:NewMod("Multiplier:CurseExpired", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
{ var = "multiplierWitheredStackCount", type = "count", label = "# of Withered Stacks:", ifFlag = "Condition:CanWither", tooltip = "Withered applies 6% increased ^xD02090Chaos ^7Damage Taken to the enemy, up to 15 stacks.", apply = function(val, modList, enemyModList)
enemyModList:NewMod("Multiplier:WitheredStack", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
Expand Down
Loading