Very early proof of concept for adding typed damage multipliers to system.traits.dm - #7289
Open
roth-michael wants to merge 1 commit into
Open
Very early proof of concept for adding typed damage multipliers to system.traits.dm#7289roth-michael wants to merge 1 commit into
system.traits.dm#7289roth-michael wants to merge 1 commit into
Conversation
roth-michael
marked this pull request as ready for review
July 30, 2026 14:38
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.
Closes #4917, if we go this direction.
Very basic implementation of "what if we just add
multiplyundertraits.dm?"Besides just generally lacking some polish (there's a few areas for code deduplication, if nothing else), the main two pieces I'd call out as potentially troublesome are:
DamagesConfigTODOs: I added a not-currently-typedhintandfieldto theSelectChoicesbeing created so that they can be different fordm.multiplyvsdm.amount. A better solution would also be a more involved solution, either registering them as different traits (maybe we should) or introducing logic inSelectChoicesand intrait.mjsfor scenarios like this one. Of which I think there are probably 0, not including this one.dm.amountmodification. I think any decision here will be a bit of a guess, since there isn't really a concept of arbitrary damage multiplication. Best we could do probably is determine how something like absorption would be intended to work in a scenario where a creature has resistance to all damage types, but also absorption of, say, fire damage. Should they absorb the non-resisted amount, or the post-resist amount, etc etc.Also entirely possible that this method of implementation is not one that you guys wanna go with. The "hard" part of this PR was just making it play nice with the sheet UI, so nothing much would be lost if so.
Edit: unmarking as draft since in theory this is fully functional as-is; I just knew it'd need some cleanup which made me want to mark it draft, but there's nothing more I feel inclined to do on it without feedback on direction.