Event

Enum Event 

Source
pub enum Event {
Show 48 variants Draw { player: u8, card: CardId, }, Damage { player: u8, card: CardId, }, DamageCancel { player: u8, }, DamageIntent { event_id: u32, source_player: u8, source_slot: Option<u8>, target: u8, amount: i32, damage_type: DamageType, cancelable: bool, }, DamageModifierApplied { event_id: u32, modifier: DamageModifierKind, before_amount: i32, after_amount: i32, before_cancelable: bool, after_cancelable: bool, before_canceled: bool, after_canceled: bool, }, DamageModified { event_id: u32, target: u8, original: i32, modified: i32, canceled: bool, damage_type: DamageType, }, DamageCommitted { event_id: u32, target: u8, card: CardId, damage_type: DamageType, }, ReversalCommitted { player: u8, slot: u8, cause_damage_event: Option<u32>, }, Reveal { player: u8, card: CardId, reason: RevealReason, audience: RevealAudience, }, TriggerQueued { trigger_id: u32, group_id: u32, player: u8, source: CardId, effect: TriggerEffect, }, TriggerGrouped { group_id: u32, trigger_ids: Vec<u32>, }, TriggerResolved { trigger_id: u32, player: u8, effect: TriggerEffect, }, TriggerCanceled { trigger_id: u32, player: u8, reason: TriggerCancelReason, }, TimingWindowEntered { window: TimingWindow, player: u8, }, PriorityGranted { window: TimingWindow, player: u8, }, PriorityPassed { player: u8, window: TimingWindow, pass_count: u8, }, StackGroupPresented { group_id: u32, controller: u8, items: Vec<StackItem>, }, StackOrderChosen { group_id: u32, controller: u8, stack_id: u32, }, StackPushed { item: StackItem, }, StackResolved { item: StackItem, }, AutoResolveCapExceeded { cap: u32, stack_len: u32, window: Option<TimingWindow>, }, WindowAdvanced { from: TimingWindow, to: Option<TimingWindow>, }, ChoicePresented { choice_id: u32, player: u8, reason: ChoiceReason, options: Vec<ChoiceOptionSnapshot>, total_candidates: u16, page_start: u16, }, ChoicePageChanged { choice_id: u32, player: u8, from_start: u16, to_start: u16, }, ChoiceMade { choice_id: u32, player: u8, reason: ChoiceReason, option: ChoiceOptionRef, }, ChoiceAutopicked { choice_id: u32, player: u8, reason: ChoiceReason, option: ChoiceOptionRef, }, ChoiceSkipped { choice_id: u32, player: u8, reason: ChoiceReason, skip_reason: ChoiceSkipReason, }, ZoneMove { player: u8, card: CardId, from: Zone, to: Zone, from_slot: Option<u8>, to_slot: Option<u8>, }, ControlChanged { card: CardId, owner: u8, from_controller: u8, to_controller: u8, from_slot: u8, to_slot: u8, }, ModifierAdded { id: u32, source: CardId, target_player: u8, target_slot: u8, target_card: CardId, kind: ModifierKind, magnitude: i32, duration: ModifierDuration, }, ModifierRemoved { id: u32, reason: ModifierRemoveReason, }, Concede { player: u8, }, Play { player: u8, card: CardId, slot: u8, }, PlayEvent { player: u8, card: CardId, }, PlayClimax { player: u8, card: CardId, }, Trigger { player: u8, icon: TriggerIcon, card: Option<CardId>, }, Attack { player: u8, slot: u8, }, AttackType { player: u8, attacker_slot: u8, attack_type: AttackType, }, Counter { player: u8, card: CardId, power: i32, }, Clock { player: u8, card: Option<CardId>, }, Shuffle { player: u8, zone: Zone, }, Refresh { player: u8, }, RefreshPenalty { player: u8, card: CardId, }, LevelUpChoice { player: u8, card: CardId, }, Encore { player: u8, slot: u8, kept: bool, }, Stand { player: u8, }, EndTurn { player: u8, }, Terminal { winner: Option<u8>, },
}

Variants§

§

Draw

Fields

§player: u8
§card: CardId
§

Damage

Fields

§player: u8
§card: CardId
§

DamageCancel

Fields

§player: u8
§

DamageIntent

Fields

§event_id: u32
§source_player: u8
§source_slot: Option<u8>
§target: u8
§amount: i32
§damage_type: DamageType
§cancelable: bool
§

DamageModifierApplied

Fields

§event_id: u32
§before_amount: i32
§after_amount: i32
§before_cancelable: bool
§after_cancelable: bool
§before_canceled: bool
§after_canceled: bool
§

DamageModified

Fields

§event_id: u32
§target: u8
§original: i32
§modified: i32
§canceled: bool
§damage_type: DamageType
§

DamageCommitted

Fields

§event_id: u32
§target: u8
§card: CardId
§damage_type: DamageType
§

ReversalCommitted

Fields

§player: u8
§slot: u8
§cause_damage_event: Option<u32>
§

Reveal

Fields

§player: u8
§card: CardId
§

TriggerQueued

Fields

§trigger_id: u32
§group_id: u32
§player: u8
§source: CardId
§

TriggerGrouped

Fields

§group_id: u32
§trigger_ids: Vec<u32>
§

TriggerResolved

Fields

§trigger_id: u32
§player: u8
§

TriggerCanceled

Fields

§trigger_id: u32
§player: u8
§

TimingWindowEntered

Fields

§player: u8
§

PriorityGranted

Fields

§player: u8
§

PriorityPassed

Fields

§player: u8
§pass_count: u8
§

StackGroupPresented

Fields

§group_id: u32
§controller: u8
§

StackOrderChosen

Fields

§group_id: u32
§controller: u8
§stack_id: u32
§

StackPushed

Fields

§

StackResolved

Fields

§

AutoResolveCapExceeded

Fields

§cap: u32
§stack_len: u32
§

WindowAdvanced

§

ChoicePresented

Fields

§choice_id: u32
§player: u8
§total_candidates: u16
§page_start: u16
§

ChoicePageChanged

Fields

§choice_id: u32
§player: u8
§from_start: u16
§to_start: u16
§

ChoiceMade

Fields

§choice_id: u32
§player: u8
§

ChoiceAutopicked

Fields

§choice_id: u32
§player: u8
§

ChoiceSkipped

Fields

§choice_id: u32
§player: u8
§skip_reason: ChoiceSkipReason
§

ZoneMove

Fields

§player: u8
§card: CardId
§from: Zone
§to: Zone
§from_slot: Option<u8>
§to_slot: Option<u8>
§

ControlChanged

Fields

§card: CardId
§owner: u8
§from_controller: u8
§to_controller: u8
§from_slot: u8
§to_slot: u8
§

ModifierAdded

Fields

§id: u32
§source: CardId
§target_player: u8
§target_slot: u8
§target_card: CardId
§magnitude: i32
§

ModifierRemoved

Fields

§id: u32
§

Concede

Fields

§player: u8
§

Play

Fields

§player: u8
§card: CardId
§slot: u8
§

PlayEvent

Fields

§player: u8
§card: CardId
§

PlayClimax

Fields

§player: u8
§card: CardId
§

Trigger

Fields

§player: u8
§

Attack

Fields

§player: u8
§slot: u8
§

AttackType

Fields

§player: u8
§attacker_slot: u8
§attack_type: AttackType
§

Counter

Fields

§player: u8
§card: CardId
§power: i32
§

Clock

Fields

§player: u8
§

Shuffle

Fields

§player: u8
§zone: Zone
§

Refresh

Fields

§player: u8
§

RefreshPenalty

Fields

§player: u8
§card: CardId
§

LevelUpChoice

Fields

§player: u8
§card: CardId
§

Encore

Fields

§player: u8
§slot: u8
§kept: bool
§

Stand

Fields

§player: u8
§

EndTurn

Fields

§player: u8
§

Terminal

Fields

§winner: Option<u8>

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,