Skip to content

Add support various immunity mods and dynamic immunity mod parsing#2142

Merged
LocalIdentity merged 2 commits into
PathOfBuildingCommunity:devfrom
majochem:feat/immunityMods
Jun 10, 2026
Merged

Add support various immunity mods and dynamic immunity mod parsing#2142
LocalIdentity merged 2 commits into
PathOfBuildingCommunity:devfrom
majochem:feat/immunityMods

Conversation

@majochem

@majochem majochem commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Previously immunity mods did not work with flag conditions or tags as they were not supported base mod forms. This adds "IMMUNE" as a new form and thus enables dynamic parsing of many immunities and automatically attaches the correct tags, if they exist.

Example mod lines that are now automatically supported but weren't before:

  • "Immune to Bleeding while Shapeshifted"
  • "Immune to Maim while Shapeshifted"
  • "Immune to Corrupted Blood"
  • "Immune to Maim"
  • "Immune to Hinder"
  • "Cannot be Light Stunned if you haven't been Hit Recently"
  • "Immune to Exposure" Note: this technically just adds the "ExposureImmune" flag for now, which isn't actually processed

Examples of other mods that don't exist, but would also work

  • "Immune to Freeze and Chill while Shocked"
  • "Immune to Curses while Bleeding"

Examples of mods that will work once the proper condition tag is implemented:

  • "Immune to Freeze and Chill while affected by an Archon Buff"

Limitations:

  • The way this is currently implemented allows for potential "false positives" in a sense that a mod might get parsed as "<condition>Immune" even though it does not actually affect calculations yet. See "Immune to Exposure" as an example. I don't think this can be avoided unless we want to catalog every single valid status effect / condition in the game within ModParser
  • A lot of existing mods within specialModList are technically obsolete because of they could be dynamically parsed now, but I didn't think that it makes sense to remove them because they still work and also (as far as I understand) might yield a faster match as specialModList is checked first.

Steps taken to verify a working solution:

  • Checked that effects on modCache are intended
  • Checked with examples in custom mods
    • Multiword effects like "Corrupted Blood" work
    • Immunity to two effects like "Immune to Corrupted Blood and Maim" works
  • Checked that mods actually apply when conditions are fulfilled

Link to a build that showcases this PR:

eNqtW1tz27gOfm5_hcbvjS-57zi749hOk5mk8bHT9uxTh5ZomxtK9IiUE_fXL0Dq4otkkc72IdUFHwiABAiAcvev95B7KxpLJqKb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ZgHew84fNMxKve9tDRoynHTSogfXFp4VSS_lHs_n29nayJGohZvSdcXrii7C5BBjo9kUXuF9QoWYP_t3OH_C_nmbUzDh1zS9GZFqP4wKIWWCMCvd56pi98AL6_s1ooivh_JpFKrtOeTW3mHWbaF89fTgBeKGnxiPLJSibL6TJQrz1ghXGlxdwlvz8FgaWikUkzae4dqNuc-83N_8CUtPMJQ==

Before screenshot:

Non-working notables atm
image

image image

After screenshot:

Notables that now get parsed correctly
image

image image

Previously immunity mods did not work with flag conditions or tags as
they were not supported base mod forms. This adds "IMMUNE" as a new form
and thus enables dynamic parsing of many conditions and automatically
attaches the correct tags, if they exist.

Example mod lines that are now supported or would work automatically:
- "Immune to Bleeding while Shapeshifted"
- "Cannot be Light Stunned if you haven't been hit recently"
- "Immune to Freeze and Chill while Shocked"
@majochem majochem marked this pull request as ready for review June 9, 2026 16:46
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Jun 10, 2026
@LocalIdentity LocalIdentity merged commit abe5f5e into PathOfBuildingCommunity:dev Jun 10, 2026
5 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.

2 participants