Skip to content
Open
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
14 changes: 14 additions & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" } )
Expand Down