Correctly update current HP change from Drained for Svetocher and Sanguine Tenacity#22147
Open
iDantar wants to merge 2 commits intofoundryvtt:v14-devfrom
Open
Correctly update current HP change from Drained for Svetocher and Sanguine Tenacity#22147iDantar wants to merge 2 commits intofoundryvtt:v14-devfrom
iDantar wants to merge 2 commits intofoundryvtt:v14-devfrom
Conversation
…Svetocher, fix their stacking
stwlam
reviewed
Apr 30, 2026
Comment on lines
+55
to
+65
| /** HP loss that occurs when this rule first applies to the actor (including any Drained-specific mitigation) */ | ||
| #resolveInitialHpLoss(): number { | ||
| if ( | ||
| this.item.isOfType("condition") && | ||
| this.item.slug === "drained" && | ||
| this.actor.getRollOptions().includes("drained-hp-effective-minus-one") | ||
| ) { | ||
| return this.actor.level * ((this.item.value ?? 1) - 1); | ||
| } | ||
| return Math.trunc(Math.abs(Number(this.resolveValue(this.value)) || 0)); | ||
| } |
Collaborator
There was a problem hiding this comment.
We're not going to adjust an RE for a specific item. What problem are you trying to solve?
Collaborator
Author
There was a problem hiding this comment.
Application of Drained reduces current HP - I'm trying to mitigate that for Svetocher and Sanguine Tenacity, since they treat HP loss from that as if condition was 1 lower.
I didn't find a way to do that with only data changes, so had to adjust the method that applies the HP loss - if I missed it, could you suggest a better way of approaching this please?
Collaborator
Author
There was a problem hiding this comment.
@stwlam I found a different approach: implemented predicates for LoseHitPoints and adjusted Drained RE - could you take another look please?
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 #22120
Also fixes a bug where having both Sanguine Tenacity and Svetocher resulted in Drained 1 increasing max HP and Fort