[#6495] Allow for effects to adjust the bloodied threshold #6575
+14
−2
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.
Stores a numeric value in
CharacterData/NPCData#attributes.bloodiedThresholdduring the base data prep cycle, grabbing the initial value from the CONFIG, which has been adjusted to be 50 instead of 0.5 for simplicity.Adjusted to compare HP percentage using
attributes.hp.pctinstead of a calculation in theupdateBloodiedmethod usinghp.effectiveMax(unsure why this was the way it was).To allow for the edge case of "bloodied when missing any hit points" there's a comparison to
hp.pct === 100such that an effect can be applied withsystem.attributes.bloodiedThreshold | OVERRIDE | 100to satisfy this requirement.Closes #6495.