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
25 changes: 17 additions & 8 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 = {
Expand Down
13 changes: 10 additions & 3 deletions src/Export/Skills/act_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -550,18 +550,25 @@ 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" }),
},
["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
Expand Down
43 changes: 30 additions & 13 deletions src/Modules/CalcActiveSkill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -56,33 +66,39 @@ 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 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
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
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)
modList:AddList(set.baseMods)
end
end

Expand Down Expand Up @@ -917,6 +933,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,
Expand Down
15 changes: 14 additions & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 :/
Expand Down
5 changes: 4 additions & 1 deletion src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
Loading