feat: automate Shock Roll consequences - #22
Open
Solarion63 wants to merge 40 commits into
Open
Conversation
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.
Summary
Adds optional HârnMaster Shock Roll consequence automation for Foundry VTT v14.
Behavior
game.hm3.macros.shockRollAPI through one canonical workflow when enabled.showIcon = ALWAYSbehavior so their status indicators appear on tokens.Architecture
shock-rules.js: pure, testable Shock state/outcome rules and out-of-combat timing calculation.shock-service.js: Actor flags, managed Active Effects, H5 Shock injury persistence, and recovery-state cleanup.shock-workflow-v14.js: v14 roll orchestration, consequence presentation, and 2d6 non-crisis recovery scheduling.shock-api-v14.js: preserves the historical public macro API while routing it through the optional workflow.shock-turn-v14.js: authoritative-GM combat-turn dispatcher for NPC automatic recovery and player reminder delivery.shock-out-of-combat-v14.js: authoritative-GM world-time dispatcher for non-crisis recovery and post-combat scheduling.The workflow only removes Unconscious effects that it created itself. Prone is deliberately retained after consciousness returns or an automated Shock recovery state is cleared.
Validation
validate.ymlto verify syntax, required files, API load order, Shock workflow wiring, combat-turn automation, out-of-combat world-time automation, and chat actions.Runtime test plan
game.hm3.macros.shockRoll(false, actor)follows the same setting-controlled workflow.Do not merge until the exact final head SHA passes CI and Foundry 14.365 runtime testing.