Skip to content

Commit a026952

Browse files
committed
Add skillName partialMatch to fix config for spectre curses
1 parent 237ffc2 commit a026952

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

src/Classes/ModStore.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,13 +695,14 @@ function ModStoreClass:EvalMod(mod, cfg)
695695
matchName = matchName:lower()
696696
if tag.skillNameList then
697697
for _, name in pairs(tag.skillNameList) do
698-
if name:lower() == matchName then
698+
local nameLower = name:lower()
699+
if (tag.partialMatch and matchName:find(nameLower, 1, true)) or (not tag.partialMatch and nameLower == matchName) then
699700
match = true
700701
break
701702
end
702703
end
703704
else
704-
match = (tag.skillName and tag.skillName:lower() == matchName)
705+
match = (tag.partialMatch and matchName:find(tag.skillName:lower(), 1, true) ~= nil) or (tag.skillName:lower() == matchName)
705706
end
706707
end
707708
if tag.neg then

src/Data/Skills/spectre.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ skills["AzmeriFabricationDespair"] = {
2121
[1] = {
2222
label = "Despair",
2323
statDescriptionScope = "despair",
24+
statMap = {
25+
["base_chaos_damage_resistance_%"] = {
26+
mod("ChaosResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
27+
},
28+
},
2429
baseFlags = {
2530
spell = true,
2631
curse = true,
@@ -57,6 +62,14 @@ skills["AzmeriFabricationEnfeeble"] = {
5762
[1] = {
5863
label = "Enfeeble",
5964
statDescriptionScope = "enfeeble",
65+
statMap = {
66+
["base_skill_buff_damage_+%_final_to_apply"] = {
67+
mod("Damage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }, { type = "Condition", var = "Unique", neg = true }),
68+
},
69+
["base_skill_buff_damage_+%_final_vs_unique_to_apply"] = {
70+
mod("Damage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }, { type = "Condition", var = "Unique" }),
71+
},
72+
},
6073
baseFlags = {
6174
spell = true,
6275
curse = true,

src/Export/Skills/spectre.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@ local skills, mod, flag, skill = ...
88
#skill AzmeriFabricationDespair
99
#set AzmeriFabricationDespair
1010
#flags spell curse area duration
11+
statMap = {
12+
["base_chaos_damage_resistance_%"] = {
13+
mod("ChaosResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
14+
},
15+
},
1116
#mods
1217
#skillEnd
1318

1419
#skill AzmeriFabricationEnfeeble
1520
#set AzmeriFabricationEnfeeble
1621
#flags spell curse area duration
22+
statMap = {
23+
["base_skill_buff_damage_+%_final_to_apply"] = {
24+
mod("Damage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }, { type = "Condition", var = "Unique", neg = true }),
25+
},
26+
["base_skill_buff_damage_+%_final_vs_unique_to_apply"] = {
27+
mod("Damage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }, { type = "Condition", var = "Unique" }),
28+
},
29+
},
1730
#mods
1831
#skillEnd
1932

src/Modules/ConfigOptions.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,10 @@ local configSettings = {
472472
end },
473473
{ label = "Raise Spectre:", ifSkillFlag = "spectre", includeTransfigured = true },
474474
{ var = "raiseSpectreEnableBuffs", type = "check", defaultState = true, label = "Enable buffs:", ifSkillFlag = "spectre", includeTransfigured = true, tooltip = "Enable any buff skills that your spectres have.", apply = function(val, modList, enemyModList)
475-
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.Buff }, { type = "SkillName", skillName = "Spectre: {0} ", includeTransfigured = true, summonSkill = true })
475+
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.Buff }, { type = "SkillName", skillName = "Spectre", partialMatch = true, summonSkill = true })
476476
end },
477477
{ var = "raiseSpectreEnableCurses", type = "check", defaultState = true, label = "Enable curses:", ifSkillFlag = "spectre", includeTransfigured = true, tooltip = "Enable any curse skills that your spectres have.", apply = function(val, modList, enemyModList)
478-
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.AppliesCurse }, { type = "SkillName", skillName = "Spectre: {0} ", includeTransfigured = true, summonSkill = true })
478+
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.AppliesCurse }, { type = "SkillName", skillName = "Spectre", partialMatch = true, summonSkill = true })
479479
end },
480480
{ var = "conditionSummonedSpectreInPast8Sec", type = "check", label = "Summoned Spectre in past 8 Seconds?", ifCond = "SummonedSpectreInPast8Sec", ifSkillFlag = "spectre", includeTransfigured = true, apply = function(val, modList, enemyModList)
481481
modList:NewMod("Condition:SummonedSpectreInPast8Sec", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
@@ -568,10 +568,10 @@ local configSettings = {
568568
end },
569569
{ label = "Summon Companion:", ifSkillFlag = "summonBeast", includeTransfigured = true },
570570
{ var = "summonCompanionEnableBuffs", type = "check", defaultState = true, label = "Enable buffs:", ifSkillFlag = "summonBeast", includeTransfigured = true, tooltip = "Enable any buff skills that your Companions have.", apply = function(val, modList, enemyModList)
571-
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.Buff }, { type = "SkillName", skillName = "Companion: {0}", includeTransfigured = true, summonSkill = true })
571+
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.Buff }, { type = "SkillName", skillName = "Companion", partialMatch = true, summonSkill = true })
572572
end },
573573
{ var = "summonCompanionEnableCurses", type = "check", defaultState = true, label = "Enable curses:", ifSkillFlag = "summonBeast", includeTransfigured = true, tooltip = "Enable any curse skills that your Companions have.", apply = function(val, modList, enemyModList)
574-
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.AppliesCurse }, { type = "SkillName", skillName = "Companion: {0}", includeTransfigured = true, summonSkill = true })
574+
modList:NewMod("SkillData", "LIST", { key = "enable", value = true }, "Config", { type = "SkillType", skillType = SkillType.AppliesCurse }, { type = "SkillName", skillName = "Companion", partialMatch = true, summonSkill = true })
575575
end },
576576
{ label = "Summon Elemental Relic:", ifSkill = "Summon Elemental Relic" },
577577
{ var = "summonElementalRelicEnableAngerAura", type = "check", defaultState = true, label = "Enable Anger Aura:", ifSkill = "Summon Elemental Relic", apply = function(val, modList, enemyModList)

0 commit comments

Comments
 (0)