From 7c49486e1d933f280dcf0d9318c028b5aef6af71 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Thu, 7 May 2026 13:18:16 -0500 Subject: [PATCH 1/4] add support for Flame Wall's Projectile Buff --- src/Data/Skills/act_int.lua | 25 ++++++++++++------ src/Export/Skills/act_int.txt | 13 ++++++--- src/Modules/CalcActiveSkill.lua | 47 +++++++++++++++++++++++---------- src/Modules/CalcPerform.lua | 15 ++++++++++- src/Modules/ConfigOptions.lua | 5 +++- 5 files changed, 78 insertions(+), 27 deletions(-) diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index 7cf580ce2..110cbaeb3 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -7960,16 +7960,11 @@ skills["FlameWallPlayer"] = { incrementalEffectiveness = 0.12999999523163, damageIncrementalEffectiveness = 0.0096000004559755, statDescriptionScope = "flame_wall", - statMap = { - ["flame_wall_minimum_added_fire_damage"] = { - mod("FireMin", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), - }, - ["flame_wall_maximum_added_fire_damage"] = { - mod("FireMax", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), - }, - }, baseFlags = { }, + baseMods = { + flag("applyBuffsFromAllStatSets"), + }, constantStats = { { "number_of_allowed_firewalls", 3 }, { "firewall_attached_projectile_effect_mtx", 1 }, @@ -8045,6 +8040,20 @@ skills["FlameWallPlayer"] = { incrementalEffectiveness = 0.11999999731779, damageIncrementalEffectiveness = 0.0015000000130385, statDescriptionScope = "flame_wall", + statMap = { + ["flame_wall_minimum_added_fire_damage"] = { + mod("FireMin", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), + }, + ["flame_wall_maximum_added_fire_damage"] = { + mod("FireMax", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), + }, + ["flame_wall_minimum_added_lightning_damage_to_add_to_projectile"] = { + mod("LightningMin", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Flame Wall", effectCondList = { "FlameWallAddedDamage", "FlameWallInfused" } }), + }, + ["flame_wall_maximum_added_lightning_damage_to_add_to_projectile"] = { + mod("LightningMax", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Flame Wall", effectCondList = { "FlameWallAddedDamage", "FlameWallInfused" } }), + }, + }, baseFlags = { }, constantStats = { diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index e2bc3a5af..5886a2ff4 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -550,6 +550,10 @@ statMap = { #skill FlameWallPlayer #set FlameWallPlayer #flags +#baseMod flag("applyBuffsFromAllStatSets") +#mods +#set FlameWallProjectileBuffPlayer +#flags statMap = { ["flame_wall_minimum_added_fire_damage"] = { mod("FireMin", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), @@ -557,11 +561,14 @@ statMap = { ["flame_wall_maximum_added_fire_damage"] = { mod("FireMax", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Flame Wall", effectCond = "FlameWallAddedDamage" }), }, + ["flame_wall_minimum_added_lightning_damage_to_add_to_projectile"] = { + mod("LightningMin", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Flame Wall", effectCondList = { "FlameWallAddedDamage", "FlameWallInfused" } }), + }, + ["flame_wall_maximum_added_lightning_damage_to_add_to_projectile"] = { + mod("LightningMax", "BASE", nil, ModFlag.Projectile, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Flame Wall", effectCondList = { "FlameWallAddedDamage", "FlameWallInfused" } }), + }, }, #mods -#set FlameWallProjectileBuffPlayer -#flags -#mods #skillEnd #skill FlameblastPlayer diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index d5b8ccee3..115421949 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -48,6 +48,16 @@ local function mergeLevelMod(modList, mod, value) end end +local function getFlagFromBaseMods(baseMods, flag) + if baseMods then + for _, baseMod in ipairs(baseMods) do + if baseMod.type == "FLAG" and baseMod.name == flag then + return true + end + end + end + return false +end -- Merge skill effect modifiers with given mod list -- If a stat set is provided, only merge modifiers from that statset function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraStats) @@ -56,33 +66,41 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS if statSet and not isValueInArray(skillEffect.grantedEffect.statSets, statSet) then return end - local grantedEffect = skillEffect.grantedEffect - for _, statSet in ipairs(statSet and {statSet} or grantedEffect.statSets) do - local stats = calcLib.buildSkillInstanceStats(skillEffect, grantedEffect, statSet) + local grantedEffect = skillEffect.grantedEffect + -- for some skills like Flame Wall, the Projectile Buff is on a separate statSet and we want to add it regardless of which statSet is active + -- enabled by adding '#baseMod flag("applyBuffsFromAllStatSets)' to the main/first skill txt + local applyBuffsFromAllStatSets = getFlagFromBaseMods(statSet.baseMods, "buffsFromAllStatSets") + for _, set in ipairs((applyBuffsFromAllStatSets and grantedEffect.statSets or (statSet and {statSet} or grantedEffect.statSets))) do + local stats = calcLib.buildSkillInstanceStats(skillEffect, grantedEffect, set) if extraStats and extraStats[1] then for _, stat in pairs(extraStats) do stats[stat.key] = (stats[stat.key] or 0) + stat.value end end for stat, statValue in pairs(stats) do - local map = statSet.statMap[stat] + local map = set.statMap[stat] if map then - -- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this + -- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this for _, modOrGroup in ipairs(map) do - -- Found a mod, since all mods have names - if modOrGroup.name then - modOrGroup.source = string.format("Skill:%s", grantedEffect.id) - mergeLevelMod(modList, modOrGroup, map.value or statValue * (map.mult or 1) / (map.div or 1) + (map.base or 0)) - else - for _, mod in ipairs(modOrGroup) do - mod.source = string.format("Skill:%s", grantedEffect.id) - mergeLevelMod(modList, mod, modOrGroup.value or statValue * (modOrGroup.mult or 1) / (modOrGroup.div or 1) + (modOrGroup.base or 0)) + -- either we are adding the mods of the activeSkill like usual or we are adding only the Buffs from the other statSets + if set == statSet or (applyBuffsFromAllStatSets and modOrGroup[1] and modOrGroup[1].effectType == "Buff") then + -- Found a mod, since all mods have names + if modOrGroup.name then + modOrGroup.source = string.format("Skill:%s", grantedEffect.id) + mergeLevelMod(modList, modOrGroup, map.value or statValue * (map.mult or 1) / (map.div or 1) + (map.base or 0)) + else + for _, mod in ipairs(modOrGroup) do + mod.source = string.format("Skill:%s", grantedEffect.id) + mergeLevelMod(modList, mod, modOrGroup.value or statValue * (modOrGroup.mult or 1) / (modOrGroup.div or 1) + (modOrGroup.base or 0)) + end end end end end end - modList:AddList(statSet.baseMods) + --if set == statSet then + modList:AddList(set.baseMods) + --end end end @@ -917,6 +935,7 @@ function calcs.buildActiveSkillModList(env, activeSkill) name = effectName, allowTotemBuff = effectTag.allowTotemBuff, cond = effectTag.effectCond, + condList = effectTag.effectCondList, enemyCond = effectTag.effectEnemyCond, stackVar = effectTag.effectStackVar, stackLimit = effectTag.effectStackLimit, diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index cd5a2bc12..1d57f9f6a 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1801,6 +1801,19 @@ function calcs.perform(env, skipEHP) end end + + local function conditionCheck(buff, skillModList, skillCfg) + if buff.cond and not skillModList:GetCondition(buff.cond, skillCfg) then + return true + elseif buff.condList then + for _, cond in ipairs(buff.condList) do + if cond and not skillModList:GetCondition(cond, skillCfg) then + return true + end + end + end + return false + end local appliedCombustion = false local warcryList = { } for _, activeSkill in ipairs(env.player.activeSkillList) do @@ -1813,7 +1826,7 @@ function calcs.perform(env, skipEHP) local skillModList = activeSkill.skillModList local skillCfg = activeSkill.skillCfg for _, buff in ipairs(activeSkill.buffList) do - if buff.cond and not skillModList:GetCondition(buff.cond, skillCfg) then + if conditionCheck(buff, skillModList, skillCfg) then -- Nothing! elseif buff.enemyCond and not enemyDB:GetCondition(buff.enemyCond) then -- Also nothing :/ diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 721a75876..3798509e3 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -361,9 +361,12 @@ local configSettings = { modList:NewMod("EnergyShieldRecoveryRate", "INC", -val * 9, val.." Wasting Touch Stacks", { type = "GlobalEffect", effectType = "Debuff" }, { type = "Condition", var = "AffectedByGloriousMadness" }) end }, { label = "Flame Wall:", ifSkill = "Flame Wall" }, - { var = "flameWallAddedDamage", type = "check", label = "Projectile Travelled through Flame Wall?", ifSkill = "Flame Wall", apply = function(val, modList, enemyModList) + { var = "flameWallAddedDamage", type = "check", label = "Projectile Travelled through?", ifSkill = "Flame Wall", apply = function(val, modList, enemyModList) modList:NewMod("Condition:FlameWallAddedDamage", "FLAG", true, "Config") end }, + { var = "flameWallInfused", type = "check", label = "Lightning Infused?", ifSkill = "Flame Wall", apply = function(val, modList, enemyModList) + modList:NewMod("Condition:FlameWallInfused", "FLAG", true, "Config") + end }, { label = "Flicker Strike:", ifSkill = "Flicker Strike", includeTransfigured = true }, { var = "FlickerStrikeBypassCD", type = "check", label = "Bypass CD?", ifSkill = "Flicker Strike", includeTransfigured = true, defaultState = true, apply = function(val, modList, enemyModList) modList:NewMod("CooldownRecovery", "OVERRIDE", 0, "Config", { type = "SkillName", skillName = "Flicker Strike", includeTransfigured = true }) From fe41f1f6e6413fdb352f92a8b97bf93822bf4ef3 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Thu, 7 May 2026 13:28:13 -0500 Subject: [PATCH 2/4] whitespace --- src/Modules/CalcActiveSkill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 115421949..3ffa1a93a 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -80,7 +80,7 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS for stat, statValue in pairs(stats) do local map = set.statMap[stat] if map then - -- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this + -- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this for _, modOrGroup in ipairs(map) do -- either we are adding the mods of the activeSkill like usual or we are adding only the Buffs from the other statSets if set == statSet or (applyBuffsFromAllStatSets and modOrGroup[1] and modOrGroup[1].effectType == "Buff") then From 9563b9d7460a0e7d64933319e68e9cfa11444f0d Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Thu, 7 May 2026 13:28:51 -0500 Subject: [PATCH 3/4] old code --- src/Modules/CalcActiveSkill.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 3ffa1a93a..a7c470802 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -98,9 +98,7 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS end end end - --if set == statSet then - modList:AddList(set.baseMods) - --end + modList:AddList(set.baseMods) end end From cc3dce35087058419c466c657f4eb34da381a86e Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Thu, 7 May 2026 13:39:18 -0500 Subject: [PATCH 4/4] nil check --- src/Modules/CalcActiveSkill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index a7c470802..8a19d7c68 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -69,7 +69,7 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS local grantedEffect = skillEffect.grantedEffect -- for some skills like Flame Wall, the Projectile Buff is on a separate statSet and we want to add it regardless of which statSet is active -- enabled by adding '#baseMod flag("applyBuffsFromAllStatSets)' to the main/first skill txt - local applyBuffsFromAllStatSets = getFlagFromBaseMods(statSet.baseMods, "buffsFromAllStatSets") + local applyBuffsFromAllStatSets = getFlagFromBaseMods(statSet and statSet.baseMods, "buffsFromAllStatSets") for _, set in ipairs((applyBuffsFromAllStatSets and grantedEffect.statSets or (statSet and {statSet} or grantedEffect.statSets))) do local stats = calcLib.buildSkillInstanceStats(skillEffect, grantedEffect, set) if extraStats and extraStats[1] then