Skip to content

Commit c1b93a2

Browse files
authored
Add support for Attrition (#777)
* Add partial support for Attrition skill gem * thresholdVar now looks for assigned actor * fixed mixed indenting on ModStore.lua lines * another tiny fix
1 parent 6157ad3 commit c1b93a2

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

src/Classes/ModStore.lua

+9-1
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@ function ModStoreClass:EvalMod(mod, cfg)
363363
end
364364
elseif tag.type == "MultiplierThreshold" then
365365
local target = self
366+
local thresholdTarget = self
367+
if tag.thresholdActor then
368+
if self.actor[tag.thresholdActor] then
369+
thresholdTarget = self.actor[tag.thresholdActor].modDB
370+
else
371+
return
372+
end
373+
end
366374
if tag.actor then
367375
if self.actor[tag.actor] then
368376
target = self.actor[tag.actor].modDB
@@ -378,7 +386,7 @@ function ModStoreClass:EvalMod(mod, cfg)
378386
else
379387
mult = target:GetMultiplier(tag.var, cfg)
380388
end
381-
local threshold = tag.threshold or target:GetMultiplier(tag.thresholdVar, cfg)
389+
local threshold = tag.threshold or thresholdTarget:GetMultiplier(tag.thresholdVar, cfg)
382390
if (tag.upper and mult > threshold) or (not tag.upper and mult < threshold) then
383391
return
384392
end

src/Data/Skills/act_str.lua

+13
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,19 @@ skills["AttritionPlayer"] = {
763763
label = "Attrition",
764764
incrementalEffectiveness = 0.054999999701977,
765765
statDescriptionScope = "attrition",
766+
statMap = {
767+
["skill_attrition_presence_max_seconds"] = {
768+
mod("Multiplier:AttritionMaxDamage", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}),
769+
},
770+
["skill_attrition_culling_strike_at_x_or_more_stacks"] = {
771+
mod("Multiplier:AttritionCullSeconds", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}),
772+
},
773+
["skill_attrition_hit_damage_+%_final_vs_rare_or_unique_enemy_per_second_ever_in_presence_up_to_max"] = {
774+
{mod("Damage", "MORE", nil, 0, KeywordFlag.Hit, { type = "GlobalEffect", effectType = "Buff"}, { type = "Multiplier", var = "EnemyPresenceSeconds", actor = "enemy", limitVar = "AttritionMaxDamage", div = 2, limitTotal = true }, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" })},
775+
{mod("CullPercent", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}, { type = "MultiplierThreshold", var = "EnemyPresenceSeconds", actor = "enemy", thresholdVar = "AttritionCullSeconds"}, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }),
776+
value = 10,}
777+
},
778+
},
766779
baseFlags = {
767780
},
768781
constantStats = {

src/Export/Skills/act_str.txt

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ local skills, mod, flag, skill = ...
4141
#skill AttritionPlayer
4242
#set AttritionPlayer
4343
#flags
44+
statMap = {
45+
statMap = {
46+
["skill_attrition_presence_max_seconds"] = {
47+
mod("Multiplier:AttritionMaxDamage", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}),
48+
},
49+
["skill_attrition_culling_strike_at_x_or_more_stacks"] = {
50+
mod("Multiplier:AttritionCullSeconds", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}),
51+
},
52+
["skill_attrition_hit_damage_+%_final_vs_rare_or_unique_enemy_per_second_ever_in_presence_up_to_max"] = {
53+
{mod("Damage", "MORE", nil, 0, KeywordFlag.Hit, { type = "GlobalEffect", effectType = "Buff"}, { type = "Multiplier", var = "EnemyPresenceSeconds", actor = "enemy", limitVar = "AttritionMaxDamage", div = 2, limitTotal = true }, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" })},
54+
{mod("CullPercent", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}, { type = "MultiplierThreshold", var = "EnemyPresenceSeconds", actor = "enemy", thresholdVar = "AttritionCullSeconds"}, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }),
55+
value = 10,}
56+
},
57+
},
4458
#mods
4559
#skillEnd
4660

0 commit comments

Comments
 (0)