Add support for "Walker of the Wilds" Keystone and other "leech recovers based on x" mods#1348
Merged
LocalIdentity merged 8 commits intoSep 12, 2025
Conversation
Intent was to standardize mod phrasing and logic, as well as reducing repetition of code.
There was no easy existing way to check if a specific tag is already present on a on mod (Or I couldn't find it) So I added a function for it, which makes it easy to check for, add, or replace/modify specific tags
It was kinda hard to tell `ModStore:GetCondition` to assume a condition is `false` without changing the actual conditions on the actor, so I added the opton to force the value via `cfg.overrideCond`. I needed to force the condition because I wanted to tabulate mods that do not apply, but are used as basis for the value of other mods. e.g. Leech Elemental Damage *instead* of Physical Damage
Better handling of actual conversion of mods with the correct tags for display in breakdown later
This adds general support for parsing most expected forms of leech conversion mods. Specific mods now supported: - Sap of Nightmares (Acolyte of Chayula) - Mystic Harvest (Amazon) - Spire of Ire (Unique Helix Spear)
Mostly just for testing, as these mods don't exist in the game yet, but might be added in the future via unique items.
LocalIdentity
approved these changes
Sep 12, 2025
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:
Adds support for several "leech based on x" mods including (but not limited to):
This also refactors the area of the code that determines base leech values and standardizes some of the flag naming logic for previously existing mods.
Finally, it also adds two technical things:
hasTagtomodlibinModTools.luathat determines whether a mod includes a given specific tag. From what I could tell this functionality did not previously exist, but was very useful when converting phys leech without deleting the original mod (as it might apply multiple times) and also helps to prevent adding a tag multiple times. Pretty sure that it could be useful in other scenarios as well.true/falsevia thecfgpassed toModStore:GetCondition. I had a problem with this because I needed to tabulate the values for physical leech, even though they were not applying due to the flag that disables them. Adding an option to force the value for a single calculation seemed easier than actually changing the condition on the actor, only to change it back after.Steps taken to verify a working solution:
Link to a build that showcases this PR:
Leech Test Build
includes items for testing different combinations
After screenshot:
Leech Breakdown without converion


Leech Breakdown with conversion (note that the item mod now specifies "elemental leech" instead of physical leech