Skip to content

Commit

Permalink
Party tab improvements (PathOfBuildingCommunity#6143)
Browse files Browse the repository at this point in the history
* reenable export of enemy conditions/modifiers

* improvements to UI relating to enemy mods

* add UI guides to make working with all the controls easier

* sort aura and curse simple list

* improve mod parsing

* add some checking for party conditions

* fix exporting it exporting values that come from party

* fix simple enemy mods

* fix vaal auras

* add support for exporting generic buffs like harbinger of time

* allow for more generic other effects

* improve extra aura grabbing

* move ally buffs into a fake actor

* allow for multiple enemy mods of the same stat (eg eye of malice expose)

* improve enemy mods export

* add support for some player mods before links need them

* update help txt

* fix spelling

* improve error message

* rename UIGuides to theme
  • Loading branch information
Regisle authored and shafouz committed Dec 5, 2023
1 parent a345752 commit 0327c76
Show file tree
Hide file tree
Showing 8 changed files with 457 additions and 258 deletions.
7 changes: 4 additions & 3 deletions help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,16 @@ The Party tab Allows you to import support characters and have their auras and c

To import a build it must be exported with "Export support" enabled in the import/export tab and must be imported in the party tab
You can import a specific type like aura or curse, or import to all
You can also set it to append to a section rather than replacing it (curses are always replaced)
You can also set it to append to a section rather than replacing it (curses are always replaced if new one has a curse)

This does not add the auras or curses into the skills tab, but they do show up on calcs tab under "aura and buff skills" as well as "curses and debuffs" respectively
This does not add the auras, curses or links into the skills tab, but they do show up on calcs tab under "aura and buff skills" as well as "curses and debuffs" respectively
They also show other effects they add, like when physical damage reduction is applied by an aurabot with the Guardian node

Auras with the highest effect will take priority
Your curses will take priority over a support's

For now Enemy conditions and Modifiers are not exported but can be imported if its saved in the XML, and Links skills are not exported or parsed
For now Links skills are not exported or parsed
Some Enemy conditions and Modifiers may not be properly exported, please let us know if something is broken
Some auras like Mines which use a stack value for their effect will not apply as their stack value is missing

---[Items Tab]
Expand Down
3 changes: 1 addition & 2 deletions src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ You can get this from your web browser's cookies while logged into the Path of E
self.controls.enablePartyExportBuffs = new("CheckBoxControl", {"LEFT",self.controls.generateCode,"RIGHT"}, 100, 0, 18, "Export Support", function(state)
self.build.partyTab.enableExportBuffs = state
self.build.buildFlag = true
--end, "This is for party play, to export support character, it enables the exporting of auras, curses and modifiers to the enemy", false)
end, "This is for party play, to export support character, it enables the exporting of auras and curses", false)
end, "This is for party play, to export support character, it enables the exporting of auras, curses and modifiers to the enemy", false)
self.controls.generateCodeOut = new("EditControl", {"TOPLEFT",self.controls.generateCodeLabel,"BOTTOMLEFT"}, 0, 8, 250, 20, "", "Code", "%Z")
self.controls.generateCodeOut.enabled = function()
return #self.controls.generateCodeOut.buf > 0
Expand Down
434 changes: 277 additions & 157 deletions src/Classes/PartyTab.lua

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ function calcs.offence(env, actor, activeSkill)
local resist
if env.modDB:Flag(nil, "Enemy"..damageType.."ResistEqualToYours") then
resist = env.player.output[damageType.."Resist"]
elseif env.partyMembers.ModList:Flag(nil, "Enemy"..damageType.."ResistEqualToYours") then
resist = env.partyMembers.output[damageType.."Resist"]
elseif isElemental[damageType] then
resist = enemyDB:Sum("BASE", cfg, damageType.."Resist", "ElementalResist") * m_max(calcLib.mod(enemyDB, cfg, damageType.."Resist", "ElementalResist"), 0)
else
Expand Down Expand Up @@ -2876,7 +2878,7 @@ function calcs.offence(env, actor, activeSkill)
-- resist = (1 - invertChance) * resist + invertChance * (-1 * resist)
resist = resist - 2 * invertChance * resist
end
sourceRes = env.modDB:Flag(nil, "Enemy"..sourceRes.."ResistEqualToYours") and "Your "..sourceRes.." Resistance" or sourceRes
sourceRes = env.modDB:Flag(nil, "Enemy"..sourceRes.."ResistEqualToYours") and "Your "..sourceRes.." Resistance" or (env.partyMembers.ModList:Flag(nil, "Enemy"..sourceRes.."ResistEqualToYours") and "Party Member "..sourceRes.." Resistance" or sourceRes)
if skillFlags.projectile then
takenInc = takenInc + enemyDB:Sum("INC", nil, "ProjectileDamageTaken")
end
Expand Down Expand Up @@ -3969,7 +3971,7 @@ function calcs.offence(env, actor, activeSkill)
effMult = (1 - resist / 100) * (1 + takenInc / 100) * takenMore
globalOutput["PoisonEffMult"] = effMult
if breakdown and effMult ~= 1 then
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or "Chaos"
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or (env.partyMembers.ModList:Flag(nil, "EnemyChaosResistEqualToYours") and "Party Member Chaos Resistance" or "Chaos")
globalBreakdown.PoisonEffMult = breakdown.effMult("Chaos", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
end
end
Expand Down Expand Up @@ -4294,7 +4296,7 @@ function calcs.offence(env, actor, activeSkill)
effMult = (1 - resist / 100) * (1 + takenInc / 100) * takenMore
globalOutput["IgniteEffMult"] = effMult
if breakdown and effMult ~= 1 then
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or "Chaos"
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or (env.partyMembers.ModList:Flag(nil, "EnemyChaosResistEqualToYours") and "Party Member Chaos Resistance" or "Chaos")
globalBreakdown.IgniteEffMult = breakdown.effMult("Chaos", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
end
else
Expand All @@ -4304,7 +4306,7 @@ function calcs.offence(env, actor, activeSkill)
effMult = (1 - resist / 100) * (1 + takenInc / 100) * takenMore
globalOutput["IgniteEffMult"] = effMult
if breakdown and effMult ~= 1 then
local sourceRes = env.modDB:Flag(nil, "EnemyFireResistEqualToYours") and "Your Fire Resistance" or "Fire"
local sourceRes = env.modDB:Flag(nil, "EnemyFireResistEqualToYours") and "Your Fire Resistance" or (env.partyMembers.ModList:Flag(nil, "EnemyFireResistEqualToYours") and "Party Member Fire Resistance" or "Fire")
globalBreakdown.IgniteEffMult = breakdown.effMult("Fire", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
end
end
Expand Down Expand Up @@ -4792,7 +4794,7 @@ function calcs.offence(env, actor, activeSkill)
effMult = (1 - resist / 100) * (1 + takenInc / 100) * takenMore
output["DecayEffMult"] = effMult
if breakdown and effMult ~= 1 then
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or "Chaos"
local sourceRes = env.modDB:Flag(nil, "EnemyChaosResistEqualToYours") and "Your Chaos Resistance" or (env.partyMembers.ModList:Flag(nil, "EnemyChaosResistEqualToYours") and "Party Member Chaos Resistance" or "Chaos")
breakdown.DecayEffMult = breakdown.effMult("Chaos", resist, 0, takenInc, effMult, takenMore, sourceRes, true)
end
end
Expand Down Expand Up @@ -4905,7 +4907,7 @@ function calcs.offence(env, actor, activeSkill)
effMult = (1 - resist / 100) * (1 + takenInc / 100) * takenMore
output[damageType.."DotEffMult"] = effMult
if breakdown and effMult ~= 1 then
local sourceRes = env.modDB:Flag(nil, "Enemy"..damageType.."ResistEqualToYours") and "Your "..damageType.." Resistance" or damageType
local sourceRes = env.modDB:Flag(nil, "Enemy"..damageType.."ResistEqualToYours") and "Your "..damageType.." Resistance" or (env.partyMembers.ModList:Flag(nil, "Enemy"..damageType.."ResistEqualToYours") and "Party Member "..damageType.." Resistance" or damageType)
breakdown[damageType.."DotEffMult"] = breakdown.effMult(damageType, resist, 0, takenInc, effMult, takenMore, sourceRes, true)
end
end
Expand Down
Loading

0 comments on commit 0327c76

Please sign in to comment.