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>,
},
}Expand description
Canonical event stream emitted by the engine.
Variants§
Draw
Player drew a card.
Damage
Card was revealed during a damage check (damage resolution).
DamageCancel
Damage was canceled.
DamageIntent
Damage intent before modifiers/cancel resolution.
Fields
damage_type: DamageTypeDamage classification (battle vs effect damage).
DamageModifierApplied
A damage modifier was applied.
Fields
modifier: DamageModifierKindModifier kind applied.
DamageModified
Damage amount/cancel state was modified and finalized.
Fields
damage_type: DamageTypeDamage classification (battle vs effect damage).
DamageCommitted
Damage was committed (a damage card moved to clock).
Fields
damage_type: DamageTypeDamage classification (battle vs effect damage).
ReversalCommitted
A battle reversal was committed for a stage slot.
Fields
Reveal
A card was revealed (with reason/audience metadata).
Fields
reason: RevealReasonReason for the reveal.
audience: RevealAudienceAudience allowed to see the revealed card.
TriggerQueued
A trigger was queued for resolution.
Fields
effect: TriggerEffectTrigger effect kind.
TriggerGrouped
Multiple triggers were grouped for resolution ordering.
TriggerResolved
Trigger was resolved.
Fields
effect: TriggerEffectTrigger effect kind.
TriggerCanceled
Trigger was canceled.
Fields
reason: TriggerCancelReasonCancellation reason.
TimingWindowEntered
A timing window was entered.
PriorityGranted
Priority was granted to a player within a timing window.
PriorityPassed
Priority was passed by a player.
Fields
window: TimingWindowTiming window.
StackGroupPresented
Stack group was presented for ordering/selection.
Fields
StackOrderChosen
Stack order was chosen for a presented stack group.
Fields
StackPushed
A stack item was pushed.
StackResolved
A stack item was resolved.
AutoResolveCapExceeded
Automatic resolution cap was exceeded.
Fields
window: Option<TimingWindow>Timing window (if known).
WindowAdvanced
Timing window advanced.
Fields
from: TimingWindowPrevious timing window.
to: Option<TimingWindow>Next timing window (or None if leaving timing windows).
ChoicePresented
A choice was presented to a player.
Fields
reason: ChoiceReasonReason for the choice.
options: Vec<ChoiceOptionSnapshot>Current page options.
ChoicePageChanged
A choice page was changed.
Fields
ChoiceMade
A player made a choice selection.
Fields
reason: ChoiceReasonReason for the choice.
option: ChoiceOptionRefSelected option reference.
ChoiceAutopicked
A choice was autopicked by the engine.
Fields
reason: ChoiceReasonReason for the choice.
option: ChoiceOptionRefSelected option reference.
ChoiceSkipped
A choice was skipped.
ZoneMove
A card moved between zones.
Fields
ControlChanged
Control of a card changed.
Fields
ModifierAdded
A modifier was added.
ModifierRemoved
A modifier was removed.
Concede
Player conceded the game.
Play
Player played a character to a stage slot.
PlayEvent
Player played an event card.
PlayClimax
Player played a climax card.
Trigger
Trigger step processed a trigger icon.
Fields
icon: TriggerIconTrigger icon.
Attack
Player declared an attack with a slot.
AttackType
Attack type was chosen (frontal/side/direct).
Fields
attack_type: AttackTypeDeclared attack type.
Counter
Player played a counter (backup) during counter step.
Fields
Clock
A card was placed into clock (e.g., from hand or damage).
Shuffle
A zone was shuffled.
Refresh
Refresh occurred (deck refilled from waiting room).
RefreshPenalty
Refresh penalty card was applied to clock.
LevelUpChoice
Level-up choice was made.
Encore
Encore resolution occurred for a stage slot.
Fields
Stand
Stand phase occurred for a player.
EndTurn
Turn ended for a player.
Terminal
Terminal game event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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>,
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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