MissionPhase sub-state and combat system ordering #8

Open
opened 2026-08-06 21:51:50 +00:00 by icub3d · 0 comments
Owner

Declare in-mission phases as a sub-state and combat ordering as named SystemSets, so
"what runs when" is readable in one place rather than reconstructed from .after()
chains scattered across plugins.

Follow MenuScreen in src/core/state.rs — a sub-state, not a resource, so leaving
GameState::Mission tears everything down for free.

Scope

  • MissionPhase sub-state of GameState::Mission: PlayerTurn, EnemyTurn,
    Resolving, Animating.
  • A CombatSet enum of named ordering sets, configured in one place.
  • Systems gated by state, never by a boolean guard in the system body
    (CLAUDE.md § State).

Acceptance criteria

  • MissionPhase does not exist outside GameState::Mission, asserted by a test in
    the style of menu_screen_exists_only_inside_main_menu.
  • Phase transitions are driven by the scheduler and by outcome playback completing,
    not by timers.
  • The full combat ordering is declared in a single readable block.
Declare in-mission phases as a sub-state and combat ordering as named `SystemSet`s, so "what runs when" is readable in one place rather than reconstructed from `.after()` chains scattered across plugins. Follow `MenuScreen` in `src/core/state.rs` — a sub-state, not a resource, so leaving `GameState::Mission` tears everything down for free. ## Scope - `MissionPhase` sub-state of `GameState::Mission`: `PlayerTurn`, `EnemyTurn`, `Resolving`, `Animating`. - A `CombatSet` enum of named ordering sets, configured in one place. - Systems gated by state, never by a boolean guard in the system body (`CLAUDE.md` § State). ## Acceptance criteria - [ ] `MissionPhase` does not exist outside `GameState::Mission`, asserted by a test in the style of `menu_screen_exists_only_inside_main_menu`. - [ ] Phase transitions are driven by the scheduler and by outcome playback completing, not by timers. - [ ] The full combat ordering is declared in a single readable block.
Sign in to join this conversation.
No description provided.