From 31b01e739f6ff04a51fde4b7a94d9ee33c94624a Mon Sep 17 00:00:00 2001 From: Brian Sonnenberg Date: Fri, 3 Jul 2026 11:40:14 -0700 Subject: [PATCH 1/3] Fix Shapeshifted condition being toggled on every build. --- src/Modules/CalcPerform.lua | 14 ++++++++++++++ src/Modules/ConfigOptions.lua | 8 ++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index b9bc986004..8394123f3b 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -365,6 +365,20 @@ local function doActorAttribsConditions(env, actor) modDB:NewMod("StunThreshold", "INC", 50, "Wyvern Form") modDB:NewMod("AilmentThreshold", "INC", 50, "Wyvern Form") end + -- Demon Form is a toggled shapeshift buff applied via the inDemonForm config option; flag its + -- presence so those config-applied Shapeshifted/DemonForm conditions only take effect on builds + -- that actually have the Demon Form skill. + for _, activeSkill in ipairs(actor.activeSkillList or { }) do + local activeEffect = activeSkill.activeEffect + local grantedEffect = activeEffect and activeEffect.grantedEffect + if grantedEffect and grantedEffect.name == "Demon Form" then + local statSet = env.mode == "CALCS" and activeEffect.statSetCalcs or activeEffect.statSet + if not (statSet and statSet.skillFlags.disable) then + condList["HaveDemonForm"] = true + break + end + end + end if skillFlags.hit and not skillFlags.trap and not skillFlags.mine and not skillFlags.totem then condList["HitRecently"] = true if skillFlags.spell then diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index fa9f3beb03..a897c56758 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -342,8 +342,12 @@ local configSettings = { end }, { label = "Demon Form:", ifSkill = "Demon Form" }, { var = "inDemonForm", type = "check", label = "Are you in Demon Form?", ifSkill = "Demon Form", defaultState = true, tooltip = "Players need a minimum of 2 ^xE05030Life ^7to enter Demon Form, so you cannot use it with Chaos Inoculation", apply = function(val, modList, enemyModList) - modList:NewMod("Condition:Shapeshifted", "FLAG", true, "Config") - modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "StatThreshold", stat = "Life", threshold = 2 }) + -- Gate on HaveDemonForm (set in CalcPerform when the Demon Form skill is present). ifSkill only + -- hides the UI control, not this apply(), and defaultState is true, so without a gate these would + -- grant Condition:Shapeshifted (an untagged global flag) on every build, making all + -- "while Shapeshifted" modifiers apply. + modList:NewMod("Condition:Shapeshifted", "FLAG", true, "Config", { type = "Condition", var = "HaveDemonForm" }, { type = "StatThreshold", stat = "Life", threshold = 2 }) + modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "Condition", var = "HaveDemonForm" }, { type = "StatThreshold", stat = "Life", threshold = 2 }) end }, { var = "demonFormStacks", type = "count", label = "Demonflame Stacks", ifSkill = "Demon Form", defaultPlaceholderState = 10, apply = function(val, modList, enemyModList) modList:NewMod("Multiplier:DemonFlameStacks", "BASE", val, "Config", { type = "Condition", var = "DemonForm" } ) From c71bc4517b1712a93ba520a3e34c4c8dacbc9084 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Sat, 11 Jul 2026 15:07:28 +1000 Subject: [PATCH 2/3] Revert "Fix Shapeshifted condition being toggled on every build." This reverts commit 31b01e739f6ff04a51fde4b7a94d9ee33c94624a. --- src/Modules/CalcPerform.lua | 14 -------------- src/Modules/ConfigOptions.lua | 8 ++------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 8394123f3b..b9bc986004 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -365,20 +365,6 @@ local function doActorAttribsConditions(env, actor) modDB:NewMod("StunThreshold", "INC", 50, "Wyvern Form") modDB:NewMod("AilmentThreshold", "INC", 50, "Wyvern Form") end - -- Demon Form is a toggled shapeshift buff applied via the inDemonForm config option; flag its - -- presence so those config-applied Shapeshifted/DemonForm conditions only take effect on builds - -- that actually have the Demon Form skill. - for _, activeSkill in ipairs(actor.activeSkillList or { }) do - local activeEffect = activeSkill.activeEffect - local grantedEffect = activeEffect and activeEffect.grantedEffect - if grantedEffect and grantedEffect.name == "Demon Form" then - local statSet = env.mode == "CALCS" and activeEffect.statSetCalcs or activeEffect.statSet - if not (statSet and statSet.skillFlags.disable) then - condList["HaveDemonForm"] = true - break - end - end - end if skillFlags.hit and not skillFlags.trap and not skillFlags.mine and not skillFlags.totem then condList["HitRecently"] = true if skillFlags.spell then diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index a897c56758..fa9f3beb03 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -342,12 +342,8 @@ local configSettings = { end }, { label = "Demon Form:", ifSkill = "Demon Form" }, { var = "inDemonForm", type = "check", label = "Are you in Demon Form?", ifSkill = "Demon Form", defaultState = true, tooltip = "Players need a minimum of 2 ^xE05030Life ^7to enter Demon Form, so you cannot use it with Chaos Inoculation", apply = function(val, modList, enemyModList) - -- Gate on HaveDemonForm (set in CalcPerform when the Demon Form skill is present). ifSkill only - -- hides the UI control, not this apply(), and defaultState is true, so without a gate these would - -- grant Condition:Shapeshifted (an untagged global flag) on every build, making all - -- "while Shapeshifted" modifiers apply. - modList:NewMod("Condition:Shapeshifted", "FLAG", true, "Config", { type = "Condition", var = "HaveDemonForm" }, { type = "StatThreshold", stat = "Life", threshold = 2 }) - modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "Condition", var = "HaveDemonForm" }, { type = "StatThreshold", stat = "Life", threshold = 2 }) + modList:NewMod("Condition:Shapeshifted", "FLAG", true, "Config") + modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "StatThreshold", stat = "Life", threshold = 2 }) end }, { var = "demonFormStacks", type = "count", label = "Demonflame Stacks", ifSkill = "Demon Form", defaultPlaceholderState = 10, apply = function(val, modList, enemyModList) modList:NewMod("Multiplier:DemonFlameStacks", "BASE", val, "Config", { type = "Condition", var = "DemonForm" } ) From 46016d37c41b0f28c780c2881edf7c0e4dba8fb3 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Sat, 11 Jul 2026 15:31:53 +1000 Subject: [PATCH 3/3] Simpler fix Move the shapeshifted condition to the demon form gem --- src/Data/Skills/other.lua | 3 +++ src/Export/Skills/other.txt | 1 + src/Modules/ConfigOptions.lua | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Data/Skills/other.lua b/src/Data/Skills/other.lua index d5e6ad1f4d..1d7011b75a 100644 --- a/src/Data/Skills/other.lua +++ b/src/Data/Skills/other.lua @@ -4458,6 +4458,9 @@ skills["DemonFormPlayer"] = { }, baseFlags = { }, + baseMods = { + flag("Condition:Shapeshifted", { type = "GlobalEffect", effectType = "Buff" }, { type = "Condition", var = "DemonForm" }), + }, constantStats = { { "demon_form_spell_damage_+%_final_per_stack", 3 }, }, diff --git a/src/Export/Skills/other.txt b/src/Export/Skills/other.txt index 949ad83ae8..a28299987a 100644 --- a/src/Export/Skills/other.txt +++ b/src/Export/Skills/other.txt @@ -304,6 +304,7 @@ statMap = { mod("LifeDegen", "BASE", nil, 0, 0, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "Multiplier", var = "DemonFlameStacks", limitVar = "DemonFlameMaximum" } ), div = 60, }, +#baseMod flag("Condition:Shapeshifted", { type = "GlobalEffect", effectType = "Buff" }, { type = "Condition", var = "DemonForm" }) }, #mods #skillEnd diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index fa9f3beb03..930f264fb5 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -342,7 +342,6 @@ local configSettings = { end }, { label = "Demon Form:", ifSkill = "Demon Form" }, { var = "inDemonForm", type = "check", label = "Are you in Demon Form?", ifSkill = "Demon Form", defaultState = true, tooltip = "Players need a minimum of 2 ^xE05030Life ^7to enter Demon Form, so you cannot use it with Chaos Inoculation", apply = function(val, modList, enemyModList) - modList:NewMod("Condition:Shapeshifted", "FLAG", true, "Config") modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "StatThreshold", stat = "Life", threshold = 2 }) end }, { var = "demonFormStacks", type = "count", label = "Demonflame Stacks", ifSkill = "Demon Form", defaultPlaceholderState = 10, apply = function(val, modList, enemyModList)