pub enum PhaseType {
Show 13 variants
Untap,
Upkeep,
Draw,
Main1,
CombatBegin,
CombatDeclareAttackers,
CombatDeclareBlockers,
CombatFirstStrikeDamage,
CombatDamage,
CombatEnd,
Main2,
EndOfTurn,
Cleanup,
}Expand description
Turn phases/steps. Mirrors Java PhaseType.
Variants§
Untap
Upkeep
Draw
Main1
CombatBegin
CombatDeclareAttackers
CombatDeclareBlockers
CombatFirstStrikeDamage
CombatDamage
CombatEnd
Main2
EndOfTurn
Cleanup
Implementations§
Source§impl PhaseType
impl PhaseType
Sourcepub const TURN_ORDER: [PhaseType; 13]
pub const TURN_ORDER: [PhaseType; 13]
The full turn sequence in order.
Sourcepub const BEGINNING_PHASE: [PhaseType; 3]
pub const BEGINNING_PHASE: [PhaseType; 3]
Phase groups for grouping related steps.
pub const COMBAT_PHASE: [PhaseType; 6]
pub fn is_main(self) -> bool
pub fn is_combat(self) -> bool
Sourcepub fn next(self) -> PhaseType
pub fn next(self) -> PhaseType
Get the next phase in the turn sequence. Wraps from Cleanup -> Untap.
pub fn is_before(self, other: PhaseType) -> bool
pub fn is_after(self, other: PhaseType) -> bool
Sourcepub fn script_name(self) -> &'static str
pub fn script_name(self) -> &'static str
Script-compatible name used in card definition files.
pub fn from_script_name(s: &str) -> Option<Self>
pub fn parse_range(values: &str) -> Vec<Self>
Trait Implementations§
impl Copy for PhaseType
Source§impl<'de> Deserialize<'de> for PhaseType
impl<'de> Deserialize<'de> for PhaseType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PhaseType
impl StructuralPartialEq for PhaseType
Auto Trait Implementations§
impl Freeze for PhaseType
impl RefUnwindSafe for PhaseType
impl Send for PhaseType
impl Sync for PhaseType
impl Unpin for PhaseType
impl UnsafeUnpin for PhaseType
impl UnwindSafe for PhaseType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more