Why
The engine needs a small declarative contract for turn-based gameplay patterns without introducing executable custom rules. Authors need to describe a level-scoped automaton with a subject/property rule and repeatable movement pattern, while players and tools need deterministic phase state, visible beat feedback, and safe mod sharing.
What Changes
- Add an optional level automaton with
{ id, subject?, property, pattern, phase? }data. - Define
patternas object steps:{ action: 'move', dx, dy, cue?, sound? }or{ action: 'wait', cue?, sound? }. - Activate the automaton's property dynamically when the level's board contains
SUBJECT IS PROPERTY. - Advance numeric phase once per accepted player turn, including explicit
wait; blocked input does not advance it. - Include automata state in settled state, Undo/reset snapshots, replay, and solver state; report automated movement in
automatedevent entries. - Validate local CommonJS and data-only shared automata and derive visible current/next beat feedback from normalized phase and pattern data.
Capabilities
New Capabilities
rule-driven-automata: declarative pattern steps, level-scoped activation, phase state, validation/sharing, deterministic tools, and visual feedback.
Modified Capabilities
None. Existing board sentence rules and MVP vocabulary remain the source of activation; the automaton is additive level data.
Impact
- Affected level state, settled events, mod validation, data-only sharing, Undo/reset, replay, solver state keys, and presentation feedback.
- No executable callbacks, completion predicates, arbitrary shared code, or new pattern string shorthand are introduced.
- Existing levels without an automaton remain unchanged.