STAGE_OUTCOME_REFERENCE.md

Stage Outcome System — Win/Lose Condition Layer

Purpose: Detects and commits stage victory/defeat conditions with safe timing. Read after AC_CONTEXT.md.


1. Overview

The Stage Outcome System separates detection from commitment:

Condition detected → PendingOutcome recorded → (wait for safe timing) → Outcome committed

This ensures no game state is finalized during an active Action Chain.


2. StageOutcome (Enum)

None      — No outcome determined yet
Victory   — Stage won
Defeat    — Stage lost

3. StageRuntimeData

Plain C# class created by StageController at stage start. Holds all dynamic stage state.

Turn Tracking

Field Type Default Description
CurrentTurn int 1 Mirrors TurnService.TurnNumber. Updated by StageOutcomeService.OnTurnStarted().

Mission Flags (Placeholders)

Flag Default Description
MissionAccomplished false Primary objective completed.
MissionEndDeclarationAvailable false Player is allowed to declare mission end.
MissionEnded false Player has declared mission end.

All three must be true for victory. No systems set these yet — they are placeholders for future mission logic.

Outcome State