Skip to main content

TriggerType

Enum TriggerType 

Source
pub enum TriggerType {
Show 160 variants ChangesZone, Phase, SpellCast, Attacks, DamageDone, Fight, FightOnce, Discarded, Countered, Blocks, AttackerBlocked, AttackerUnblocked, LifeGained, LifeLost, CounterAdded, CounterRemoved, Sacrificed, Drawn, Milled, Taps, Untaps, Transformed, Attached, Unattached, LandPlayed, BecomesTarget, TapsForMana, AbilityActivated, Explored, BecomeMonstrous, BecomeMonarch, DamageDealtOnce, Destroyed, Exiled, TokenCreated, SpellCopied, TakeInitiative, PhasedOut, PhasedIn, AttackersDeclared, BlockersDeclared, ChangesZoneAll, ChangesController, TurnBegin, DamageDoneOnce, SpellCastAll, AbilityCast, SpellAbilityCast, SpellAbilityCopy, SpellCastOrCopy, SpellCopy, LifeLostAll, CounterAddedOnce, DiscardedAll, SacrificedOnce, Cycled, PhaseIn, PhaseOut, Always, Immediate, Surveil, Scry, Foretell, SearchedLibrary, Shuffled, ManaAdded, TokenCreatedOnce, TapAll, UntapAll, BecomesTargetOnce, AttackerBlockedByCreature, AttackerBlockedOnce, AttackerUnblockedOnce, SpellCastOnce, SpellCastOfType, DamageAll, DamagePreventedOnce, ExcessDamage, CounterRemovedOnce, Exerted, Adapt, BecomeRenowned, Evolved, Investigated, Proliferate, CompletedDungeon, DungeonCompleted, CommitCrime, RingTemptsYou, PayLife, PayEcho, NewGame, DayTimeChanges, ClassLevelGained, BecomesPlotted, LosesGame, Discover, Elementalbend, ElementalBend, Airbend, Earthbend, Firebend, Waterbend, PhaseOutAll, PlanarDice, Vote, GiveGift, VisitAttraction, EnteredRoom, RoomEntered, MilledAll, MilledOnce, Abandoned, ManifestDread, Specializes, Trains, Devoured, ConjureAll, SeekAll, BecomesCrewed, Championed, Clashed, Mentored, FullyUnlock, AbilityResolves, AbilityTriggered, UnlockDoor, CounterAddedAll, CounterPlayerAddedAll, CounterTypeAddedAll, Crewed, Saddled, Stationed, DamageDoneOnceByController, ExcessDamageAll, CollectEvidence, Forage, Enlisted, FlippedCoin, RolledDie, RolledDieOnce, ManaExpend, TurnFaceUp, Explores, Exploited, PayCumulativeUpkeep, ChaosEnsues, Planeswalk, PlaneswalkedFrom, PlaneswalkedTo, ClaimPrize, CrankAdvanced, CrankContraption, CaseSolved, BecomesSaddled, SetInMotion, Mutates, Unattach, TakesInitiative, AttackersDeclaredOneTarget,
}

Variants§

§

ChangesZone

§

Phase

§

SpellCast

§

Attacks

§

DamageDone

§

Fight

Two creatures fought each other (SP$ Fight).

§

FightOnce

One or more creatures fought (batched).

§

Discarded

A card was discarded (SP$ Discard).

§

Countered

A spell was countered (SP$ Counter).

§

Blocks

A creature blocks an attacker.

§

AttackerBlocked

An attacker is blocked by at least one creature.

§

AttackerUnblocked

An attacker is not blocked.

§

LifeGained

A player gained life.

§

LifeLost

A player lost life.

§

CounterAdded

A counter was added to a permanent.

§

CounterRemoved

A counter was removed from a permanent.

§

Sacrificed

A permanent was sacrificed.

§

Drawn

A card was drawn.

§

Milled

A card was milled (library → graveyard).

§

Taps

A permanent was tapped.

§

Untaps

A permanent was untapped.

§

Transformed

A DFC was transformed.

§

Attached

An aura/equipment was attached.

§

Unattached

An aura/equipment was unattached.

§

LandPlayed

A land was played.

§

BecomesTarget

A permanent became the target of a spell or ability.

§

TapsForMana

A permanent was tapped for mana.

§

AbilityActivated

An activated ability was activated.

§

Explored

A creature explored.

§

BecomeMonstrous

A creature became monstrous.

§

BecomeMonarch

A player became the monarch.

§

DamageDealtOnce

Damage was dealt to a player/creature for the first time this turn.

§

Destroyed

A permanent was destroyed.

§

Exiled

A card was exiled.

§

TokenCreated

A token was created.

§

SpellCopied

A spell was copied (Storm, Replicate, etc.) — used by Magecraft.

§

TakeInitiative

A player took the initiative.

§

PhasedOut

A permanent phased out.

§

PhasedIn

A permanent phased in.

§

AttackersDeclared

All attackers declared at once (batch).

§

BlockersDeclared

All blockers declared at once (batch).

§

ChangesZoneAll

A card changed zones (batch/all variant).

§

ChangesController

A permanent changed controller.

§

TurnBegin

A turn began.

§

DamageDoneOnce

Damage done once (first-time batch).

§

SpellCastAll

Any spell cast (all players).

§

AbilityCast

Alias of SpellCast in Java TriggerType.

§

SpellAbilityCast

Alias of SpellCast in Java TriggerType.

§

SpellAbilityCopy

Alias of SpellCast in Java TriggerType.

§

SpellCastOrCopy

Alias of SpellCast in Java TriggerType.

§

SpellCopy

Alias of SpellCast in Java TriggerType.

§

LifeLostAll

Any player lost life (all players).

§

CounterAddedOnce

Counter added once (batch).

§

DiscardedAll

Any card discarded (all players).

§

SacrificedOnce

A permanent sacrificed once (batch).

§

Cycled

A card was cycled.

§

PhaseIn

Alias of PhasedIn in Java TriggerType.

§

PhaseOut

Alias of PhasedOut in Java TriggerType.

§

Always

Always fires (every phase).

§

Immediate

Fires immediately when registered.

§

Surveil

A player surveilled.

§

Scry

A player scried.

§

Foretell

A card was foretold.

§

SearchedLibrary

A player searched their library.

§

Shuffled

A player shuffled their library.

§

ManaAdded

Mana was added to a player’s pool.

§

TokenCreatedOnce

A token was created (batch).

§

TapAll

Any permanent tapped (all).

§

UntapAll

Any permanent untapped (all).

§

BecomesTargetOnce

A permanent became a target (batch).

§

AttackerBlockedByCreature

An attacker was blocked by a specific creature.

§

AttackerBlockedOnce

An attacker was blocked (batch).

§

AttackerUnblockedOnce

An attacker was unblocked (batch).

§

SpellCastOnce

Any spell cast (batch).

§

SpellCastOfType

A spell of a specific type was cast.

§

DamageAll

Damage dealt (all instances).

§

DamagePreventedOnce

Damage was prevented (batch).

§

ExcessDamage

Excess damage dealt.

§

CounterRemovedOnce

A counter was removed (batch).

§

Exerted

A creature was exerted.

§

Adapt

A creature adapted.

§

BecomeRenowned

A creature became renowned.

§

Evolved

A creature evolved.

§

Investigated

A player investigated.

§

Proliferate

A player proliferated.

§

CompletedDungeon

A player completed a dungeon.

§

DungeonCompleted

Alias of CompletedDungeon in Java TriggerType.

§

CommitCrime

A player committed a crime.

§

RingTemptsYou

The Ring tempted a player.

§

PayLife

A player paid life.

§

PayEcho

Echo was paid (or not) for a permanent.

§

NewGame

A new game started.

§

DayTimeChanges

Day/night changed.

§

ClassLevelGained

A class level was gained.

§

BecomesPlotted

A card became plotted.

§

LosesGame

A player lost the game.

§

Discover

A player discovered.

§

Elementalbend

Elementalbend event.

§

ElementalBend

Alias of Elementalbend in Java TriggerType.

§

Airbend

Alias of Elementalbend in Java TriggerType.

§

Earthbend

Alias of Elementalbend in Java TriggerType.

§

Firebend

Alias of Elementalbend in Java TriggerType.

§

Waterbend

Alias of Elementalbend in Java TriggerType.

§

PhaseOutAll

Multiple cards phased out.

§

PlanarDice

Planar die was rolled.

§

Vote

A vote resolved.

§

GiveGift

A gift was given.

§

VisitAttraction

A player visited an attraction.

§

EnteredRoom

A room was entered.

§

RoomEntered

Alias of EnteredRoom in Java TriggerType.

§

MilledAll

Multiple cards were milled.

§

MilledOnce

Cards were milled once for a player.

§

Abandoned

A scheme was abandoned.

§

ManifestDread

Manifest dread event.

§

Specializes

A card specialized.

§

Trains

A card trained.

§

Devoured

A card devoured.

§

ConjureAll

Cards were conjured in batch.

§

SeekAll

Cards were sought in batch.

§

BecomesCrewed

A card became crewed.

§

Championed

A card was championed.

§

Clashed

A clash happened.

§

Mentored

A card was mentored.

§

FullyUnlock

A room/door became fully unlocked.

§

AbilityResolves

A spell ability resolved.

§

AbilityTriggered

A spell ability triggered another trigger.

§

UnlockDoor

A door was unlocked.

§

CounterAddedAll

Counter-added batch event across multiple entities.

§

CounterPlayerAddedAll

Counter-added batch event for a single object/source pair.

§

CounterTypeAddedAll

Counter-added batch event grouped by counter type.

§

Crewed

Crew/Saddle/Station grouped trigger.

§

Saddled

Saddle alias for Crewed trigger class.

§

Stationed

Station alias for Crewed trigger class.

§

DamageDoneOnceByController

Damage done once grouped by controller.

§

ExcessDamageAll

Excess damage dealt to multiple targets.

§

CollectEvidence

A player collected evidence.

§

Forage

A player foraged.

§

Enlisted

A creature enlisted another creature.

§

FlippedCoin

A player flipped a coin.

§

RolledDie

A player rolled a die.

§

RolledDieOnce

A player completed a die-roll action.

§

ManaExpend

Mana was expended (cumulative per-turn tracking for Expend mechanic).

§

TurnFaceUp

A face-down card was turned face-up (Morph/Megamorph/Manifest).

§

Explores

Alias of Explored in Java TriggerType.

§

Exploited

A creature was exploited (Exploit keyword).

§

PayCumulativeUpkeep

Cumulative upkeep was paid (or not). Mirrors Java TriggerType.PayCumulativeUpkeep.

§

ChaosEnsues

Chaos ensues (Planechase chaos die result).

§

Planeswalk

A player planeswalked to a new plane (Planechase).

§

PlaneswalkedFrom

Alias of Planeswalk in Java TriggerType.

§

PlaneswalkedTo

Alias of Planeswalk in Java TriggerType.

§

ClaimPrize

A player claimed the prize from an attraction (Unfinity).

§

CrankAdvanced

A player advanced their crank counter (Unstable).

§

CrankContraption

Alias of CrankAdvanced in Java TriggerType.

§

CaseSolved

A Case enchantment was solved (MKM).

§

BecomesSaddled

A creature became saddled (OTJ).

§

SetInMotion

A scheme was set in motion (Archenemy).

§

Mutates

A creature mutated onto another (IKO).

§

Unattach

Alias of Unattached in Java TriggerType.

§

TakesInitiative

Alias of TakeInitiative in Java TriggerType.

§

AttackersDeclaredOneTarget

Alias of AttackersDeclared in Java TriggerType.

Implementations§

Source§

impl TriggerType

Source

pub fn name(&self) -> &'static str

Returns the string name of this trigger type, matching the Java TriggerType enum name.

Trait Implementations§

Source§

impl Clone for TriggerType

Source§

fn clone(&self) -> TriggerType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TriggerType

Source§

impl Debug for TriggerType

Source§

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

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

impl Default for TriggerType

Source§

fn default() -> TriggerType

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TriggerType

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 Eq for TriggerType

Source§

impl FromStr for TriggerType

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<TriggerType, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for TriggerType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TriggerType

Source§

fn eq(&self, other: &TriggerType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for TriggerType

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
Source§

impl StructuralPartialEq for TriggerType

Source§

impl TryFrom<&str> for TriggerType

Source§

type Error = ParseError

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

fn try_from(s: &str) -> Result<TriggerType, <Self as TryFrom<&str>>::Error>

Performs the conversion.

Auto Trait Implementations§

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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

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

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V