Skip to main content

weiss_core/state/
turn.rs

1use serde::{Deserialize, Serialize};
2
3/// Turn phase.
4#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
5pub enum Phase {
6    /// Mulligan step before the first turn begins.
7    Mulligan,
8    /// Stand phase: stand rested characters.
9    Stand,
10    /// Draw phase: draw a card.
11    Draw,
12    /// Clock phase: optionally place a card into clock.
13    Clock,
14    /// Main phase: play cards and use main-phase abilities.
15    Main,
16    /// Climax phase: optionally place a climax.
17    Climax,
18    /// Attack phase.
19    Attack,
20    /// End phase cleanup.
21    End,
22}
23
24/// Timing window for triggered effects.
25#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
26pub enum TimingWindow {
27    /// Main phase timing window.
28    MainWindow,
29    /// Climax phase timing window.
30    ClimaxWindow,
31    /// After an attack is declared.
32    AttackDeclarationWindow,
33    /// During trigger reveal/resolution.
34    TriggerResolutionWindow,
35    /// During counter timing.
36    CounterWindow,
37    /// During damage resolution.
38    DamageResolutionWindow,
39    /// During encore timing.
40    EncoreWindow,
41    /// During end phase timing.
42    EndPhaseWindow,
43}