Add support various immunity mods and dynamic immunity mod parsing#2142
Merged
LocalIdentity merged 2 commits intoJun 10, 2026
Merged
Conversation
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"
LocalIdentity
approved these changes
Jun 10, 2026
LocalIdentity
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
"ExposureImmune"flag for now, which isn't actually processedExamples of other mods that don't exist, but would also work
Examples of mods that will work once the proper condition tag is implemented:
Limitations:
"<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 withinModParserspecialModListare 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 asspecialModListis checked first.Steps taken to verify a working solution:
Link to a build that showcases this PR:
Before screenshot:
Non-working notables atm

After screenshot:
Notables that now get parsed correctly
