From e9891f03128ec3f783baa329f21d6ddba32915b2 Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Tue, 11 Feb 2025 16:49:50 -0600 Subject: [PATCH 1/4] Add partial support for Attrition skill gem --- src/Data/Skills/act_str.lua | 13 +++++++++++++ src/Export/Skills/act_str.txt | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/Data/Skills/act_str.lua b/src/Data/Skills/act_str.lua index 3c1911bffe..3e9e13d329 100644 --- a/src/Data/Skills/act_str.lua +++ b/src/Data/Skills/act_str.lua @@ -762,6 +762,19 @@ skills["AttritionPlayer"] = { label = "Attrition", incrementalEffectiveness = 0.054999999701977, statDescriptionScope = "attrition", + statMap = { + ["skill_attrition_presence_max_seconds"] = { + mod("Multiplier:AttritionMaxDamage", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}), + }, + ["skill_attrition_culling_strike_at_x_or_more_stacks"] = { + mod("Multiplier:AttritionCullSeconds", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}), + }, + ["skill_attrition_hit_damage_+%_final_vs_rare_or_unique_enemy_per_second_ever_in_presence_up_to_max"] = { + {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" })}, + {mod("CullPercent", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}, { type = "MultiplierThreshold", var = "EnemyPresenceSeconds", actor = "enemy", thresholdVar = "AttritionCullSeconds"}, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }), + value = 10,} + }, + }, baseFlags = { }, constantStats = { diff --git a/src/Export/Skills/act_str.txt b/src/Export/Skills/act_str.txt index 536f23972c..9869b9696e 100644 --- a/src/Export/Skills/act_str.txt +++ b/src/Export/Skills/act_str.txt @@ -41,6 +41,20 @@ local skills, mod, flag, skill = ... #skill AttritionPlayer #set AttritionPlayer #flags +statMap = { +statMap = { + ["skill_attrition_presence_max_seconds"] = { + mod("Multiplier:AttritionMaxDamage", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}), + }, + ["skill_attrition_culling_strike_at_x_or_more_stacks"] = { + mod("Multiplier:AttritionCullSeconds", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}), + }, + ["skill_attrition_hit_damage_+%_final_vs_rare_or_unique_enemy_per_second_ever_in_presence_up_to_max"] = { + {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" })}, + {mod("CullPercent", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}, { type = "MultiplierThreshold", var = "EnemyPresenceSeconds", actor = "enemy", thresholdVar = "AttritionCullSeconds"}, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }), + value = 10,} + }, +}, #mods #skillEnd From aab505a16d24a76d4490f7d8bf20259dc698f8fe Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Tue, 25 Feb 2025 03:17:52 -0600 Subject: [PATCH 2/4] thresholdVar now looks for assigned actor --- src/Classes/ModStore.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index 7347ba6473..40700e4f34 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -363,6 +363,14 @@ function ModStoreClass:EvalMod(mod, cfg) end elseif tag.type == "MultiplierThreshold" then local target = self + local thresholdTarget = self + if tag.thresholdActor then + if self.actor[tag.thresholdActor] then + thresholdTarget = self.actor[tag.thresholdActor].modDB + else + return + end + end if tag.actor then if self.actor[tag.actor] then target = self.actor[tag.actor].modDB @@ -378,7 +386,7 @@ function ModStoreClass:EvalMod(mod, cfg) else mult = target:GetMultiplier(tag.var, cfg) end - local threshold = tag.threshold or target:GetMultiplier(tag.thresholdVar, cfg) + local threshold = tag.threshold or thresholdTarget:GetMultiplier(tag.thresholdVar, cfg) if (tag.upper and mult > threshold) or (not tag.upper and mult < threshold) then return end From f587fba780b6a2bf4ef272d8a286b36db9cd97ce Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Tue, 25 Feb 2025 15:12:25 -0600 Subject: [PATCH 3/4] fixed mixed indenting on ModStore.lua lines --- src/Classes/ModStore.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index 40700e4f34..2fd39eb401 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -365,11 +365,11 @@ function ModStoreClass:EvalMod(mod, cfg) local target = self local thresholdTarget = self if tag.thresholdActor then - if self.actor[tag.thresholdActor] then - thresholdTarget = self.actor[tag.thresholdActor].modDB - else - return - end + if self.actor[tag.thresholdActor] then + thresholdTarget = self.actor[tag.thresholdActor].modDB + else + return + end end if tag.actor then if self.actor[tag.actor] then From a6d3c7687ea80cd5d75648e615b94d6a5f418638 Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Tue, 25 Feb 2025 19:13:40 -0600 Subject: [PATCH 4/4] another tiny fix --- src/Classes/ModStore.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index 2fd39eb401..5fefda41eb 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -366,7 +366,7 @@ function ModStoreClass:EvalMod(mod, cfg) local thresholdTarget = self if tag.thresholdActor then if self.actor[tag.thresholdActor] then - thresholdTarget = self.actor[tag.thresholdActor].modDB + thresholdTarget = self.actor[tag.thresholdActor].modDB else return end