Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Attrition #777

Merged
merged 4 commits into from
Mar 10, 2025
Merged
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
10 changes: 9 additions & 1 deletion src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 13 additions & 0 deletions src/Data/Skills/act_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
14 changes: 14 additions & 0 deletions src/Export/Skills/act_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down