feat: a custom system's health model takes damage and healing by its … - #113
Merged
Merged
Conversation
…own rules systemBuilder/health.js works out DAMAGE and HEAL under each health model from the token and the sheet behind it: a second track that spills into the first when overflow is on; damage types whose lighter boxes turn heavier once the track is full; harm notes that move up a level when theirs is full and put the character out past the top; wounds with a per-wound penalty; hit locations noted on their line; and none, which refuses. The token keeps the "how hurt" the heart monitor reads under every model. The HIT_POINTS route uses it only when the running system is a custom one whose health is not one pool, and runs the rule inside the sheet's write queue so an edit made at the same moment is kept. The built-in systems, and a custom one-pool system, go through the route as before.
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.
…own rules
systemBuilder/health.js works out DAMAGE and HEAL under each health model from the token and the sheet behind it: a second track that spills into the first when overflow is on; damage types whose lighter boxes turn heavier once the track is full; harm notes that move up a level when theirs is full and put the character out past the top; wounds with a per-wound penalty; hit locations noted on their line; and none, which refuses. The token keeps the "how hurt" the heart monitor reads under every model.
The HIT_POINTS route uses it only when the running system is a custom one whose health is not one pool, and runs the rule inside the sheet's write queue so an edit made at the same moment is kept. The built-in systems, and a custom one-pool system, go through the route as before.
Summary
Test plan
Pre-merge checklist
Code quality:
Version & Release:
frontend/package.jsonversiondocker-compose.ymlAPP_VERSIONCHANGELOG.mdwith release notesBefore merging to main:
Related issues