Skip to content

Commit dc96827

Browse files
LocalIdentityLocalIdentity
andauthored
Add option when using Balance of Terror to disable curse effect on enemy (#9252)
* Add option when using Balance of Terror to disable curse effect on enemy When using a Balance of Terror, many users will add a curse to their build that doesn't help their damage, but give them utility in some way The only way for the Balance of Terror mods to work are if you have the curse as an active skill in your build. Problems arise when you use 2 or more curses in your build but PoB prioritises the utility curse as the active one affecting the enemy e.g. Use Assassins Mark + Elemental weakness in a build will always apply the Ele weakness even though you're only using it for the 40% phys as extra ele buff I added the disable curses part to a new section atm as I wasn't too sure where to put them. Maybe the skill options part? They only show up atm if you have the corresponding Balance of Terror mod and skill gem in a build * Change to be in skill options * Colour heading --------- Co-authored-by: LocalIdentity <[email protected]>
1 parent 5132a59 commit dc96827

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/Modules/CalcPerform.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,13 @@ function calcs.perform(env, skipEHP)
23152315
elseif buff.type == "Curse" or buff.type == "CurseBuff" then
23162316
local mark = activeSkill.skillTypes[SkillType.Mark]
23172317
modDB.conditions["SelfCast"..buff.name:gsub(" ","")] = not (activeSkill.skillTypes[SkillType.Triggered] or activeSkill.skillTypes[SkillType.Aura])
2318-
if env.mode_effective and (not enemyDB:Flag(nil, "Hexproof") or modDB:Flag(nil, "CursesIgnoreHexproof") or activeSkill.skillData.ignoreHexLimit or activeSkill.skillData.ignoreHexproof) or mark then
2318+
local skipCurse = false
2319+
local configVar = "balanceOfTerrorSelfCast"..buff.name:gsub(" ", "")
2320+
if configVar and env.configInput[configVar] and not mark then
2321+
-- User flagged this curse as Balance of Terror self-only, so don't apply it to enemies.
2322+
skipCurse = true
2323+
end
2324+
if (not skipCurse) and (env.mode_effective and (not enemyDB:Flag(nil, "Hexproof") or modDB:Flag(nil, "CursesIgnoreHexproof") or activeSkill.skillData.ignoreHexLimit or activeSkill.skillData.ignoreHexproof) or mark) then
23192325
local curse = {
23202326
name = buff.name,
23212327
fromPlayer = true,

src/Modules/ConfigOptions.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,16 @@ Huge sets the radius to 11.
719719
{ var = "TotalVaalRejuvenationTotemLife", type = "integer", label = "Total Vaal Rejuvenation Totem Life:", ifSkill = { "Vaal Rejuvenation Totem" }, ifMod = "takenFromVaalRejuvenationTotemsBeforeYou", tooltip = "The total life of your Vaal Rejuvenation Totems that can be taken before yours", apply = function(val, modList, enemyModList)
720720
modList:NewMod("TotalVaalRejuvenationTotemLife", "BASE", val, "Config")
721721
end },
722+
{ label = "^xAF6025Balance of Terror ^7Curse Disable:", ifCond = { "SelfCastConductivity", "SelfCastDespair", "SelfCastElementalWeakness", "SelfCastEnfeeble", "SelfCastFlammability", "SelfCastFrostbite", "SelfCastPunishment", "SelfCastTemporalChains", "SelfCastVulnerability" } },
723+
{ var = "balanceOfTerrorSelfCastConductivity", type = "check", label = "Conductivity self-only", ifSkill = "Conductivity", ifCond = "SelfCastConductivity", tooltip = "Counts Conductivity as self-cast for Balance of Terror without applying it to enemies." },
724+
{ var = "balanceOfTerrorSelfCastDespair", type = "check", label = "Despair self-only", ifSkill = "Despair", ifCond = "SelfCastDespair", tooltip = "Counts Despair as self-cast for Balance of Terror without applying it to enemies." },
725+
{ var = "balanceOfTerrorSelfCastElementalWeakness", type = "check", label = "Elemental Weakness self-only", ifSkill = "Elemental Weakness", ifCond = "SelfCastElementalWeakness", tooltip = "Counts Elemental Weakness as self-cast for Balance of Terror without applying it to enemies." },
726+
{ var = "balanceOfTerrorSelfCastEnfeeble", type = "check", label = "Enfeeble self-only", ifSkill = "Enfeeble", ifCond = "SelfCastEnfeeble", tooltip = "Counts Enfeeble as self-cast for Balance of Terror without applying it to enemies." },
727+
{ var = "balanceOfTerrorSelfCastFlammability", type = "check", label = "Flammability self-only", ifSkill = "Flammability", ifCond = "SelfCastFlammability", tooltip = "Counts Flammability as self-cast for Balance of Terror without applying it to enemies." },
728+
{ var = "balanceOfTerrorSelfCastFrostbite", type = "check", label = "Frostbite self-only", ifSkill = "Frostbite", ifCond = "SelfCastFrostbite", tooltip = "Counts Frostbite as self-cast for Balance of Terror without applying it to enemies." },
729+
{ var = "balanceOfTerrorSelfCastPunishment", type = "check", label = "Punishment self-only", ifSkill = "Punishment", ifCond = "SelfCastPunishment", tooltip = "Counts Punishment as self-cast for Balance of Terror without applying it to enemies." },
730+
{ var = "balanceOfTerrorSelfCastTemporalChains", type = "check", label = "Temporal Chains self-only", ifSkill = "Temporal Chains", ifCond = "SelfCastTemporalChains", tooltip = "Counts Temporal Chains as self-cast for Balance of Terror without applying it to enemies." },
731+
{ var = "balanceOfTerrorSelfCastVulnerability", type = "check", label = "Vulnerability self-only", ifSkill = "Vulnerability", ifCond = "SelfCastVulnerability", tooltip = "Counts Vulnerability as self-cast for Balance of Terror without applying it to enemies." },
722732
-- Section: Map modifiers/curses
723733
{ section = "Map Modifiers and Player Debuffs", col = 2 },
724734
{ var = "multiplierSextant", type = "count", label = "# of Sextants affecting the area", ifMult = "Sextant", apply = function(val, modList, enemyModList)

0 commit comments

Comments
 (0)