pub struct AnimateEffect;Trait Implementations§
Source§impl SpellAbilityEffect for AnimateEffect
impl SpellAbilityEffect for AnimateEffect
Source§fn resolve(ctx: &mut EffectContext<'_>, sa: &SpellAbility)
fn resolve(ctx: &mut EffectContext<'_>, sa: &SpellAbility)
SP$ Animate — turn a non-creature permanent into a creature (or modify creature stats).
Mirrors Java’s AnimateEffectBase.java + AnimateEffect.java.
§Params
Defined$— target card(s) (default: source card itself)Power— set base powerToughness— set base toughnessTypes— comma-separated types to add (e.g. “Creature,Land”)Keywords— comma-separated keywords to grant (until EOT)Colors— comma-separated colors to set (e.g. “White,Blue”)OverwriteTypes— if “True”, replace type_line instead of adding
The animate_state is saved so step_cleanup can restore the original card state.
Struct form of this effect so it can participate in the
SpellAbilityEffect trait hierarchy — mirrors Java’s
AnimateEffect class extending SpellAbilityEffect.
Source§fn get_stack_description(sa: &SpellAbility) -> String
fn get_stack_description(sa: &SpellAbility) -> String
Return the stack description for this effect.
Defaults to the spell ability’s own description.
Source§fn build_spell_ability(_sa: &mut SpellAbility)
fn build_spell_ability(_sa: &mut SpellAbility)
Build/configure the spell ability after construction.
Default is a no-op; some effects override this to add parameters.
Source§fn tokenize_string(game: &GameState, sa: &SpellAbility, desc: &str) -> String
fn tokenize_string(game: &GameState, sa: &SpellAbility, desc: &str) -> String
Tokenize a description string, replacing CARDNAME with the card’s name.
Mirrors Java’s
SpellAbilityEffect.tokenizeString(SpellAbility, String).Source§fn add_forget_on_moved_trigger(
game: &mut GameState,
host_id: CardId,
remembered_card_id: CardId,
)
fn add_forget_on_moved_trigger( game: &mut GameState, host_id: CardId, remembered_card_id: CardId, )
Add a “forget on moved” trigger for remembered cards.
Mirrors Java’s
SpellAbilityEffect.addForgetOnMovedTrigger(SpellAbility, Card, String).Source§fn create_effect(
game: &mut GameState,
sa: &SpellAbility,
name: &str,
image: &str,
) -> CardId
fn create_effect( game: &mut GameState, sa: &SpellAbility, name: &str, image: &str, ) -> CardId
Create a temporary effect card in the command zone.
Mirrors Java’s
SpellAbilityEffect.createEffect(SpellAbility, Player, String, String).Source§fn run(ctx: &mut EffectContext<'_>, sa: &SpellAbility)
fn run(ctx: &mut EffectContext<'_>, sa: &SpellAbility)
Run the effect (resolve entry point).
Mirrors Java’s
SpellAbilityEffect.run(SpellAbility).Source§fn handle_exiled_with(
game: &mut GameState,
sa: &SpellAbility,
exiled_card_id: CardId,
)
fn handle_exiled_with( game: &mut GameState, sa: &SpellAbility, exiled_card_id: CardId, )
Track which card exiled another card, for “exile until” effects.
Mirrors Java’s
SpellAbilityEffect.handleExiledWith(SpellAbility, Card).Source§fn exile_effect_command(
game: &mut GameState,
trigger_handler: &mut TriggerHandler,
sa: &SpellAbility,
card_id: CardId,
)
fn exile_effect_command( game: &mut GameState, trigger_handler: &mut TriggerHandler, sa: &SpellAbility, card_id: CardId, )
Execute the exile-with command.
Mirrors Java’s
SpellAbilityEffect.exileEffectCommand(Game, SpellAbility, Card).Source§fn get_stack_description_with_subs(
game: &GameState,
sa: &SpellAbility,
) -> String
fn get_stack_description_with_subs( game: &GameState, sa: &SpellAbility, ) -> String
Full stack-description with sub-ability concatenation.
Mirrors Java
SpellAbilityEffect.getStackDescriptionWithSubs(Map, SpellAbility).Source§fn get_new_chooser(
game: &GameState,
agents: &mut [Box<dyn PlayerAgent>],
sa: &SpellAbility,
loser: PlayerId,
) -> Option<PlayerId>
fn get_new_chooser( game: &GameState, agents: &mut [Box<dyn PlayerAgent>], sa: &SpellAbility, loser: PlayerId, ) -> Option<PlayerId>
Resolve a replacement chooser when the original lost the game (CR 800.4g).
Mirrors Java
SpellAbilityEffect.getNewChooser(SpellAbility, Player).Auto Trait Implementations§
impl Freeze for AnimateEffect
impl RefUnwindSafe for AnimateEffect
impl Send for AnimateEffect
impl Sync for AnimateEffect
impl Unpin for AnimateEffect
impl UnsafeUnpin for AnimateEffect
impl UnwindSafe for AnimateEffect
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.