-
Notifications
You must be signed in to change notification settings - Fork 118
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
Conversation
Still can't get thresholdVar to work. Sigil of Power works properly when copying the PoB1 code. I think the issue might be because the thresholdVar for Attrition is a variable stat which changes with the skill gem level, where as the sigil of power max stages is a constantStat. I've tried everything else I can think of, not sure where to go from here. |
Have you tried attaching a debugger and seeing what's going on inside here PathOfBuilding-PoE2/src/Classes/ModStore.lua Lines 364 to 385 in bdf8a7e
Also remember that git rebase exists so you can fairly easily I'll take a stab at the debugging later if you don't get around to it. |
Much appreciated if you could. I took a look with the debugger, but it's a little beyond my skills at the moment. I'm really not sure why it won't work for me, tried everything I could think of and it just doesn't seem to operate as I expect, maybe I'm doing something horribly wrong but I really didn't think so. I'll take a look at the git rebase you mentioned, haven't used git command lines much but I'll give it a shot. EDIT: And any questions feel free to PM on discord if needed |
Main issue you're running into here is that Adding the ability to select the threshold target actor should fix the issue: diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua
index 7347ba64..e1fd8260 100644
--- a/src/Classes/ModStore.lua
+++ b/src/Classes/ModStore.lua
@@ -378,7 +378,15 @@ function ModStoreClass:EvalMod(mod, cfg)
else
mult = target:GetMultiplier(tag.var, cfg)
end
- local threshold = tag.threshold or target:GetMultiplier(tag.thresholdVar, cfg)
+ local thresholdTarget = target
+ if tag.thresholdActor then
+ if self.actor[tag.thresholdActor] then
+ thresholdTarget = self.actor[tag.thresholdActor].modDB
+ else
+ return
+ end
+ end
+ 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
diff --git a/src/Data/Skills/act_str.lua b/src/Data/Skills/act_str.lua
index 1745ae0e..4890e063 100644
--- a/src/Data/Skills/act_str.lua
+++ b/src/Data/Skills/act_str.lua
@@ -772,7 +772,7 @@ skills["AttritionPlayer"] = {
},
["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" }),
+ {mod("CullPercent", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff"}, { type = "MultiplierThreshold", var = "EnemyPresenceSeconds", actor = "enemy", thresholdActor = "player", thresholdVar = "AttritionCullSeconds"}, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }),
value = 10,}
},
}, To cleanup the git history all you need to do is to run Before messing with this though i'd recommend keeping a copy of the commits either here on github or somewhere else locally like on a different branch as it's fairly easy to remove commits entirely with git rebase. |
Thanks for looking into this! I assumed thresholdVar would operate the same as LimitVar in the damage mod directly above, as it seems to use the player actor regardless of setting Managed to get the commits merged to the first initial one, it was a struggle. In the end I needed to force push, now I kinda understand... kinda. Made sure I backed it up before doing anything as you said. I'll check out your code and add it in soon. Much appreciated for the help. |
@Paliak I made a small change, put the code in the same order as the "Multiplier" code. And I also set |
Description of the problem being solved:
1% more damage per 2 seconds the enemy is in your presence properly works. And it limited to the gems maximum damage.
Thanks to @Paliak, thresholdVar works properly for the culling strike mod. Culling strike is enabled once the enemy is in your presence for the required time.
Culling Strike code will need to be changed slightly if #618 gets added, quick fix at that point.
After screenshot: