Skip to content

Commit cf62094

Browse files
authored
Add support for additional empowering effects (#563)
1 parent 7979297 commit cf62094

File tree

10 files changed

+73
-11
lines changed

10 files changed

+73
-11
lines changed

src/Data/ModCache.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ c["100% increased Magnitude of Ignite you inflict"]={{[1]={flags=0,keywordFlags=
759759
c["100% increased Mana Regeneration Rate"]={{[1]={flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=100}},nil}
760760
c["100% increased Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamage",type="INC",value=100}},nil}
761761
c["100% increased Spell Damage"]={{[1]={flags=2,keywordFlags=0,name="Damage",type="INC",value=100}},nil}
762-
c["100% increased Stun Threshold during Empowered Attacks"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},flags=0,keywordFlags=0,name="StunThreshold",type="INC",value=100}},nil}
762+
c["100% increased Stun Threshold during Empowered Attacks"]={{[1]={[1]={type="Condition",var="Empowered"},flags=0,keywordFlags=0,name="StunThreshold",type="INC",value=100}},nil}
763763
c["100% increased Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="Damage",type="INC",value=100}}," Thorns "}
764764
c["100% increased amount of Life Leeched"]={{[1]={flags=0,keywordFlags=0,name="LifeLeech",type="INC",value=100}},nil}
765765
c["100% increased chance to Ignite"]={{[1]={flags=0,keywordFlags=0,name="EnemyIgniteChance",type="INC",value=100}},nil}
@@ -1075,7 +1075,7 @@ c["20% chance for Lightning Skills to Chain an additional time"]={{}," for Light
10751075
c["20% chance for Slam Skills you use yourself to cause Aftershocks"]={{}," for Slam Skills you use yourself to cause Aftershocks "}
10761076
c["20% chance to Aggravate Bleeding on targets you Critically Hit with Attacks"]={{}," to Aggravate Bleeding on targets you Critically Hit "}
10771077
c["20% chance to Aggravate Bleeding on targets you Hit with Empowered Attacks"]={{}," to Aggravate Bleeding on targets you Hit "}
1078-
c["20% chance to Aggravate Bleeding on targets you Hit with Empowered Attacks Empowered Attacks deal 30% increased Damage"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},flags=0,keywordFlags=0,name="Damage",type="BASE",value=20}}," to Aggravate Bleeding on targets you Hit Empowered Attacks deal 30% increased "}
1078+
c["20% chance to Aggravate Bleeding on targets you Hit with Empowered Attacks Empowered Attacks deal 30% increased Damage"]={{[1]={[1]={type="Condition",var="Empowered"},flags=0,keywordFlags=0,name="Damage",type="BASE",value=20}}," to Aggravate Bleeding on targets you Hit Empowered Attacks deal 30% increased "}
10791079
c["20% chance to Knock Enemies Back with Hits at Close Range"]={{}," to Knock Enemies Back "}
10801080
c["20% chance to Poison on Hit"]={{[1]={flags=0,keywordFlags=0,name="PoisonChance",type="BASE",value=20}},nil}
10811081
c["20% chance to gain a Power Charge on Hit"]={nil,"a Power Charge on Hit "}
@@ -2366,11 +2366,11 @@ c["Elemental Ailment Threshold is increased by Overcapped Chaos Resistance"]={ni
23662366
c["Elemental Ailment Threshold is increased by Overcapped Chaos Resistance Armour is increased by Overcapped Fire Resistance"]={nil,"Elemental Ailment Threshold is increased by Overcapped Chaos Resistance Armour is increased by Overcapped Fire Resistance "}
23672367
c["Elemental Damage also Contributes to Bleeding Magnitude"]={{[1]={flags=0,keywordFlags=0,name="FireCanBleed",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ColdCanBleed",type="FLAG",value=true},[3]={flags=0,keywordFlags=0,name="LightningCanBleed",type="FLAG",value=true}},nil}
23682368
c["Elemental Storm has 150% more Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Elemental Storm",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="MORE",value=150}},nil}
2369-
c["Empowered Attacks deal 10% increased Damage"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=10}},nil}
2370-
c["Empowered Attacks deal 16% increased Damage"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=16}},nil}
2371-
c["Empowered Attacks deal 30% increased Damage"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=30}},nil}
2369+
c["Empowered Attacks deal 10% increased Damage"]={{[1]={[1]={type="Condition",var="Empowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=10}},nil}
2370+
c["Empowered Attacks deal 16% increased Damage"]={{[1]={[1]={type="Condition",var="Empowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=16}},nil}
2371+
c["Empowered Attacks deal 30% increased Damage"]={{[1]={[1]={type="Condition",var="Empowered"},flags=1,keywordFlags=0,name="Damage",type="INC",value=30}},nil}
23722372
c["Empowered Attacks have 50% increased Stun Buildup"]={{}," Stun Buildup "}
2373-
c["Empowered Attacks have 50% increased Stun Buildup 100% increased Stun Threshold during Empowered Attacks"]={{[1]={[1]={type="Condition",var="SkillEmpowered"},[2]={type="Condition",var="SkillEmpowered"},flags=1,keywordFlags=0,name="StunThreshold",type="INC",value=50}}," Stun Buildup 100% increased "}
2373+
c["Empowered Attacks have 50% increased Stun Buildup 100% increased Stun Threshold during Empowered Attacks"]={{[1]={[1]={type="Condition",var="Empowered"},[2]={type="Condition",var="Empowered"},flags=1,keywordFlags=0,name="StunThreshold",type="INC",value=50}}," Stun Buildup 100% increased "}
23742374
c["Enemies Chilled by your Hits can be Shattered as though Frozen"]={nil,"your Hits can be Shattered as though Frozen "}
23752375
c["Enemies Chilled by your Hits increase damage taken by Chill Magnitude"]={nil,"your Hits increase damage taken by Chill Magnitude "}
23762376
c["Enemies Chilled by your Hits increase damage taken by Chill Magnitude Attacks Gain 10% of Damage as Extra Cold Damage"]={nil,"your Hits increase damage taken by Chill Magnitude Attacks Gain 10% of Damage as Extra Cold Damage "}

src/Data/Skills/act_int.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11682,6 +11682,9 @@ skills["ManaTempestPlayer"] = {
1168211682
statDescriptionScope = "mana_tempest",
1168311683
baseFlags = {
1168411684
},
11685+
baseMods = {
11686+
mod("Empowered", "FLAG", true, ModFlag.Spell, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "StatThreshold", stat = "ManaCost", threshold = 1 }),
11687+
},
1168511688
constantStats = {
1168611689
{ "mana_tempest_mana_cost_%_to_add_to_cost_per_second", 30 },
1168711690
{ "active_skill_base_area_of_effect_radius", 26 },
@@ -16814,6 +16817,9 @@ skills["StaffUnleashNextSpellPlayer"] = {
1681416817
statDescriptionScope = "skill_stat_descriptions",
1681516818
baseFlags = {
1681616819
},
16820+
baseMods = {
16821+
mod("Empowered", "FLAG", true, ModFlag.Spell, 0, { type = "GlobalEffect", effectType = "Buff" }),
16822+
},
1681716823
constantStats = {
1681816824
{ "base_skill_effect_duration", 4000 },
1681916825
{ "staff_unleash_number_of_seals_for_next_skill", 2 },

src/Data/Skills/sup_dex.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,12 @@ skills["SupportEmpoweredCullPlayer"] = {
13331333
label = "Murderous Intent",
13341334
incrementalEffectiveness = 0.054999999701977,
13351335
statDescriptionScope = "gem_stat_descriptions",
1336+
statMap = {
1337+
["support_empowered_culling_strike"] = {
1338+
mod("ExtraEmpowerMod", "LIST", { mod = mod("CullPercent", "MAX", nil), unscalable = true }),
1339+
value = 10,
1340+
}
1341+
},
13361342
baseFlags = {
13371343
},
13381344
stats = {

src/Data/Skills/sup_str.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,6 +1628,11 @@ skills["SupportEmpoweredDamagePlayer"] = {
16281628
label = "Premeditation",
16291629
incrementalEffectiveness = 0.054999999701977,
16301630
statDescriptionScope = "gem_stat_descriptions",
1631+
statMap = {
1632+
["support_empowered_damage_+%_final"] = {
1633+
mod("ExtraEmpowerMod", "LIST", { mod = mod("Damage", "MORE", nil) }),
1634+
}
1635+
},
16311636
baseFlags = {
16321637
},
16331638
constantStats = {

src/Export/Skills/act_int.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ statMap = {
795795
#startSets
796796
#set ManaTempestPlayer
797797
#flags
798+
#baseMod mod("Empowered", "FLAG", true, ModFlag.Spell, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "StatThreshold", stat = "ManaCost", threshold = 1 })
798799
#mods
799800
#skillEnd
800801

@@ -1138,6 +1139,7 @@ statMap = {
11381139
#startSets
11391140
#set StaffUnleashNextSpellPlayer
11401141
#flags
1142+
#baseMod mod("Empowered", "FLAG", true, ModFlag.Spell, 0, { type = "GlobalEffect", effectType = "Buff" })
11411143
#mods
11421144
#skillEnd
11431145

src/Export/Skills/sup_dex.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,12 @@ statMap = {
354354
#skill SupportEmpoweredCullPlayer
355355
#startSets
356356
#set SupportEmpoweredCullPlayer
357+
statMap = {
358+
["support_empowered_culling_strike"] = {
359+
mod("ExtraEmpowerMod", "LIST", { mod = mod("CullPercent", "MAX", nil), unscalable = true }),
360+
value = 10,
361+
}
362+
},
357363
#mods
358364
#skillEnd
359365

src/Export/Skills/sup_str.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,11 @@ statMap = {
466466
#skill SupportEmpoweredDamagePlayer
467467
#startSets
468468
#set SupportEmpoweredDamagePlayer
469+
statMap = {
470+
["support_empowered_damage_+%_final"] = {
471+
mod("ExtraEmpowerMod", "LIST", { mod = mod("Damage", "MORE", nil) }),
472+
}
473+
},
469474
#mods
470475
#skillEnd
471476

src/Modules/CalcActiveSkill.lua

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,36 @@ local function getWeaponFlags(env, weaponData, weaponTypes)
231231
return flags, info
232232
end
233233

234+
--- Applies additional modifiers to skills with the "Empowered" flag.
235+
--- Checks for "ExtraEmpoweredMod" mods and applies them
236+
--- if they match the conditions set by the empowering effect.
237+
--- @param activeSkill table @Active skill data.
238+
local function applyExtraEmpowerMods(activeSkill)
239+
local skillModList = activeSkill.skillModList
240+
local empoweredMod
241+
for _, mod in ipairs(skillModList) do
242+
if mod.name == "Empowered" then
243+
empoweredMod = mod
244+
break
245+
end
246+
end
247+
if empoweredMod then
248+
for _, value in ipairs(skillModList:List(activeSkill.skillCfg, "ExtraEmpowerMod")) do
249+
local mod = value.mod
250+
if band(mod.flags, empoweredMod.flags) == mod.flags and MatchKeywordFlags(empoweredMod.flags, mod.keywordFlags) then
251+
local newMod = copyTable(mod)
252+
for _, etag in ipairs(empoweredMod) do
253+
t_insert(newMod, copyTable(etag))
254+
if etag.type == "GlobalEffect" then
255+
newMod[#newMod].unscalable = value.unscalable
256+
end
257+
end
258+
skillModList:AddMod(newMod)
259+
end
260+
end
261+
end
262+
end
263+
234264
-- Build list of modifiers for given active skill
235265
function calcs.buildActiveSkillModList(env, activeSkill)
236266
local skillTypes = activeSkill.skillTypes
@@ -594,6 +624,8 @@ function calcs.buildActiveSkillModList(env, activeSkill)
594624
skillModList:AddMod(value.mod)
595625
t_insert(activeSkill.extraSkillModList, value.mod)
596626
end
627+
628+
applyExtraEmpowerMods(activeSkill)
597629

598630
-- Find totem level
599631
if skillFlags.totem then

src/Modules/ConfigOptions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ local configSettings = {
604604
{ var = "windDancerStacks", type = "count", label = "# of Wind Dancer Stacks:", ifSkill = "Wind Dancer", apply = function(val, modList, enemyModList)
605605
modList:NewMod("Multiplier:WindDancerStacks", "BASE", val, "Config")
606606
end },
607-
{ var = "conditionSkillEmpowered", type = "check", label = "Is the skill Empowered?", ifCond = "SkillEmpowered", tooltip = "Skills can be temporarily Empowered by certain buff skills.", apply = function(val, modList, enemyModList)
608-
modList:NewMod("Condition:SkillEmpowered", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
607+
{ var = "conditionEmpowered", type = "check", label = "Is the skill Empowered?", ifCond = "Empowered", tooltip = "Skills can be temporarily Empowered by certain buff skills.", apply = function(val, modList, enemyModList)
608+
modList:NewMod("Condition:Empowered", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
609609
end },
610610
{ var = "multiplierWoCExpiredDuration", type = "count", label = "% Wave of Conviction duration expired:", ifMod = "WaveOfConvictionDurationDotMulti", apply = function(val, modList, enemyModList)
611611
modList:NewMod("Multiplier:WoCDurationExpired", "BASE", m_min(val, 100), "Config", { type = "Condition", var = "Effective" })

src/Modules/ModParser.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ local preFlagList = {
12501250
["^for each nearby corpse, "] = { tag = { type = "Multiplier", var = "NearbyCorpse" } },
12511251
["^enemies in your link beams have "] = { tag = { type = "Condition", var = "BetweenYouAndLinkedTarget" }, applyToEnemy = true },
12521252
["^consecrated ground you create also grants "] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
1253-
["^empowered attacks [hgd][ae][via][enl] "] = { flags = ModFlag.Attack, tag = { type = "Condition", var = "SkillEmpowered" } },
1253+
["^empowered attacks [hgd][ae][via][enl] "] = { flags = ModFlag.Attack, tag = { type = "Condition", var = "Empowered" } },
12541254
-- While in the presence of...
12551255
["^while a unique enemy is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } },
12561256
["^while a pinnacle atlas boss is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } },
@@ -1267,8 +1267,8 @@ local modTagList = {
12671267
["with critical hits"] = { tag = { type = "Condition", var = "CriticalStrike" } },
12681268
["while affected by auras you cast"] = { tag = { type = "Condition", var = "AffectedByAura" } },
12691269
["for you and nearby allies"] = { newAura = true },
1270-
["with empowered attacks"] = { tag = { type = "Condition", var = "SkillEmpowered" } },
1271-
["during empowered attacks"] = { tag = { type = "Condition", var = "SkillEmpowered" } },
1270+
["with empowered attacks"] = { tag = { type = "Condition", var = "Empowered" } },
1271+
["during empowered attacks"] = { tag = { type = "Condition", var = "Empowered" } },
12721272
-- Multipliers
12731273
["per power charge"] = { tag = { type = "Multiplier", var = "PowerCharge" } },
12741274
["if you've consumed an? (%D+) charge recently"] = function(charge) return { tag = { type = "Multiplier", var = "Removable" .. firstToUpper(charge) .. "Charge", limit = 1 }} end,

0 commit comments

Comments
 (0)