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 Break Enemy Armour Below 0 - "Imploding Impacts" Warbringer #759

Merged

Conversation

majochem
Copy link
Contributor

@majochem majochem commented Feb 11, 2025

Fixes # .

Description of the problem being solved:

  • Adds support for "You can Break Enemy Armour Below 0" mod from the Warbringer Ascendancy node "Imploding Impacts"
    • Existing "Is Enemy Armour Broken?" Config option automatically defaults to maximum negative value, if node is allocated
    • Manual config of # armour break stacks still allowed, but capped at inverse of enemy base Armour instead of 0
    • The ability to break Armour below zero disables the ability to inflict "Fully Broken Armour"

Assumptions made for the calculations:

  1. Negative Armour is capped at exactly -1 * enemy starting Armour (as defined in the Config) [this was basically already known]
  2. For any given Armour & Damage value pair that leads to x% PDR, the outcome in case of equivalent negative Armour and Damage would lead to x% physical damage 'anti-reduction' (for lack of a better term, since 'increased' and 'more' both have specific implications) [confirmed]
  3. Maximum % 'anti-reduction' is 90%, as PDR is also capped at 90% (really not sure on this. otherwise theoretical maximum would approach 100% given 1 damage and infinite Armour) As per Viperesque from GGG, there is no cap on bonus damage from negative Armour, apart from the mathematical cap of 100%. [fixed]
  4. 'Anti-reduction' is still additive with flat % sources of PDR [confirmed]
  5. 'Anti-reduction' is otherwise independent of sources of "increased damage taken" [confirmed]
  6. "Ignore Enemy Armour" (e.g. from Vulnerability Curse) does not interact with negative Armour and essentially just has no affect below 0 Armour [confirmed]

Limitations:

  • If you manually enter an Armour Break value in the Config that exceeds the cap, that nominal value is displayed in the breakdown (however, the applied value is still capped properly and the same is technically true for Armour Break capped at 0)
  • Does not account for mods such as "enemies have incresed/reduced/more/less Armour" should those ever exist
  • Does not currently affect physical damage reduction calculation for Impale (which is not in PoE2 atm)
  • Does not properly limit negative Armour values for player defence (no real use case for that atm)
  • Interaction with mods that "ignore enemy physical damage reduction" not fully tested (also not currently available in PoE2 afaik)

Steps taken to verify a working solution:

  • Check mod is parsed correctly (appears blue)
  • Check Config behaves correctly
    • Maximum Armour Break value changes automatically when node is allocated
    • Manually assigning an Armour Break value removes the override, but still allows negative totals
    • Changing enemy Armour in Config also correctly changes the negative Armour cap
  • Check effective DPS is correct
    • Maximum effective DPS is 1.9 1.99
    • Flat % PDR correctly modifies this value (flat 10% PDR does not automatically mean maximum 1.9 effective DPS because the 90% cap is applied after the addition of 'anti-reduction' and PDR). Order no longer relevant because the cap is now 100%
    • Smaller hits benefit more than larger hits
    • Manually entered Armour break values are still affected by the negative Armour cap
  • Mods that "Ignore x enemy Armour" (Vulnerability) has no effect when Armour is already negative
  • Mods that grant increased or more damage "against enemies with fully broken Armour" are correctly disabled/ineffective

Link to a build that showcases this PR:

Test Build

Before screenshot:

None

After screenshot:

Imploding Impacts node effect
{9E9F5340-0A2A-4317-8494-700005EC75B8}

Breakdown Armour Broken Below Zero (max)
{3BB76391-7D7A-47E7-BF1D-0A78741547C6}

Breakdown Armour Broken Below Zero (partial)
{92032552-2E22-47E5-9207-566B7D5E1FEE}

enemyModList:NewMod("Condition:ArmourFullyBroken", "FLAG", true, "ArmourBreak", { type = "Condition", var = "Effective" }, { type = "ActorCondition", actor = "enemy", var = "CanArmourBreakBelowZero", neg = true })
enemyModList:NewMod("Condition:ArmourBrokenBelowZeroMax", "FLAG", true, "ArmourBreak", { type = "Condition", var = "Effective" }, { type = "ActorCondition", actor = "enemy", var = "CanArmourBreakBelowZero" })
enemyModList:NewMod("Armour", "OVERRIDE", 0, "ArmourBreak", { type = "Condition", var = "ArmourFullyBroken" }, { type = "GlobalEffect", effectType= "Debuff", effectName = "ArmourBreak" })
end },
Copy link
Contributor Author

@majochem majochem Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I previously tried adding a mod that directly affects Armour here already, but couldn't figure out how to access the enemyArmour Config value, which is not assigned until later. So it is now done in CalcOffence instead. If anyone has a more elegant solution, I'd prefer to have this step done here instead. (I still think it's better in CalcOffence than further down in the ConfigOptions where enemy Armour is assigned though)

This was the code I tried:
enemyModList:NewMod("Armour", "OVERRIDE", -enemyModList:Sum("BASE", { source = "Config" }, "Armour"), "ArmourBreak", { type = "Condition", var = "ArmourBrokenBelowZeroMax" }, { type = "GlobalEffect", effectType= "Debuff", effectName = "ArmourBreak" })

@majochem majochem marked this pull request as ready for review February 11, 2025 11:05
@majochem
Copy link
Contributor Author

majochem commented Feb 12, 2025

I updated the damage bonus cap according to the info supplied by Viperesque. The rest of the assumptions were confirmed.

@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Mar 10, 2025
@LocalIdentity LocalIdentity merged commit bcb7ce5 into PathOfBuildingCommunity:dev Mar 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, calculation, or mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants