pub enum CostPart {
Show 42 variants
Tap,
Mana {
cost: ManaCost,
x_min: i32,
is_exiled_creature_cost: bool,
is_enchanted_creature_cost: bool,
is_cost_pay_any_number_of_times: bool,
max_waterbend: Option<String>,
},
PayLife(AmountSpec),
Sacrifice {
amount: AmountSpec,
type_filter: String,
},
Discard {
amount: AmountSpec,
type_filter: String,
},
SubCounter {
amount: AmountSpec,
counter_type: CounterType,
type_filter: String,
},
AddCounter {
amount: AmountSpec,
counter_type: CounterType,
},
Exile {
amount: AmountSpec,
type_filter: String,
from: ZoneType,
},
ExileFromAnyGrave {
amount: AmountSpec,
type_filter: String,
},
ExileFromSameGrave {
amount: AmountSpec,
type_filter: String,
},
Return {
amount: AmountSpec,
type_filter: String,
},
TapType {
amount: AmountSpec,
type_filter: String,
min_total_power: Option<i32>,
},
Untap,
UntapType {
amount: AmountSpec,
type_filter: String,
can_untap_source: bool,
},
PayEnergy(AmountSpec),
PayShards(AmountSpec),
DamageYou(AmountSpec),
Draw(AmountSpec),
Mill(AmountSpec),
Reveal {
amount: AmountSpec,
type_filter: String,
from: RevealFrom,
},
Exert {
amount: AmountSpec,
type_filter: String,
},
GainLife(AmountSpec),
GainControl {
amount: AmountSpec,
type_filter: String,
},
RemoveAnyCounter {
amount: AmountSpec,
type_filter: String,
counter_type: Option<CounterType>,
},
Unattach {
type_filter: String,
description: Option<String>,
},
ExiledMoveToGrave {
amount: AmountSpec,
type_filter: String,
},
AddMana {
amount: AmountSpec,
mana_type: String,
},
Waterbend {
amount: AmountSpec,
},
ChooseColor(AmountSpec),
ChooseCreatureType(AmountSpec),
FlipCoin(AmountSpec),
RollDice {
amount: AmountSpec,
sides: i32,
result_svar: String,
},
ExileFromStack {
amount: AmountSpec,
type_filter: String,
},
CollectEvidence(AmountSpec),
Forage,
PutCardToLib {
amount: AmountSpec,
lib_pos: i32,
type_filter: String,
from: ZoneType,
same_zone: bool,
},
Enlist {
amount: AmountSpec,
type_filter: String,
},
PromiseGift,
RevealChosen {
reveal_type: String,
},
Behold {
amount: AmountSpec,
type_filter: String,
exile: bool,
},
Blight(AmountSpec),
ExileCtrlOrGrave {
amount: AmountSpec,
type_filter: String,
},
}Variants§
Tap
Tap the source permanent. {T}
Mana
Pay mana. Mirrors Java CostPartMana.
Fields
is_exiled_creature_cost: boolWhen true, the base mana cost is augmented by the exiled creature’s mana cost.
is_enchanted_creature_cost: boolWhen true, the base mana cost is augmented by the enchanted creature’s mana cost.
PayLife(AmountSpec)
Pay life. Mirrors CostPayLife.
Sacrifice
Sacrifice permanents. type_filter “CARDNAME” means sacrifice self.
Discard
Discard cards. type_filter “CARDNAME” means discard self.
SubCounter
Remove counters from a permanent (e.g. SubCounter<1/DREAM/NICKNAME>).
AddCounter
Add counters to the source permanent (e.g. AddCounter<1/LOYALTY>). Mirrors CostPutCounter.
Exile
Exile cards from a specific zone (own zone) as cost. Mirrors CostExile.
ExileFromAnyGrave
Exile cards from any player’s graveyard as cost (ExileAnyGrave). Mirrors CostExile zoneMode=-1.
ExileFromSameGrave
Exile cards from the same graveyard as cost (ExileSameGrave). Mirrors CostExile zoneMode=0.
Return
Return permanents to owner’s hand as cost. Mirrors CostReturn.
TapType
Tap other permanents of a type as cost (tapXType<n/filter>). Mirrors CostTapType.
When min_total_power is Some(N), tap any number of creatures whose total power >= N
(used by Crew). When None, tap exactly amount matching permanents.
Untap
Untap permanents as cost. Mirrors CostUntap.
UntapType
Untap other permanents of a type as cost (untapYType<n/filter>). Mirrors CostUntapType.
PayEnergy(AmountSpec)
Pay energy counters. Mirrors CostPayEnergy.
PayShards(AmountSpec)
Pay shard counters. Mirrors CostPayShards.
DamageYou(AmountSpec)
Deal damage to the source’s controller as cost. Mirrors CostDamage.
Draw(AmountSpec)
Draw cards as cost. Mirrors CostDraw.
Mill(AmountSpec)
Mill cards as cost. Mirrors CostMill.
Reveal
Reveal cards as cost. Mirrors CostReveal.
Exert
Exert permanent(s) as cost. Mirrors CostExert.
GainLife(AmountSpec)
Opponent gains life as cost. Mirrors CostGainLife.
GainControl
Gain control of permanents matching type_filter as cost. Mirrors CostGainControl.
RemoveAnyCounter
Remove any counter type from permanents matching type_filter. Mirrors CostRemoveAnyCounter.
counter_type is None means any counter type.
Unattach
Unattach equipment as a cost. Mirrors CostUnattach.
type_filter can be “CARDNAME” (source is the equipment), “OriginalHost”,
or a card filter expression (source is the equipped creature, filter matches equipment).
ExiledMoveToGrave
Move cards from exile to graveyard as cost. Mirrors CostExiledMoveToGrave.
AddMana
Add mana to the pool as a cost (AddMana<amount/type>). Mirrors CostAddMana. Always payable. Payment adds the specified mana to the activating player’s pool.
Waterbend
Waterbend cost (Waterbend
Fields
amount: AmountSpecChooseColor(AmountSpec)
Choose one or more colors as a cost. Mirrors CostChooseColor.
ChooseCreatureType(AmountSpec)
Choose a creature type as a cost. Mirrors CostChooseCreatureType.
FlipCoin(AmountSpec)
Flip one or more coins as a cost. Mirrors CostFlipCoin.
RollDice
Roll dice as a cost. Mirrors CostRollDice.
ExileFromStack
Exile spells from stack as a cost. Mirrors CostExileFromStack.
CollectEvidence(AmountSpec)
Collect evidence N (exile cards from your graveyard with total MV >= N).
Forage
Forage: exile 3 from your graveyard or sacrifice a Food.
PutCardToLib
Put card(s) to library from a zone as a cost. Mirrors CostPutCardToLib.
Enlist
Enlist another creature as a cost. Mirrors CostEnlist.
PromiseGift
Promise gift to an opponent as a cost. Mirrors CostPromiseGift.
RevealChosen
Reveal previously chosen player/type as a cost. Mirrors CostRevealChosen.
Behold
Behold (reveal from hand/battlefield), optionally exile revealed cards.
Blight(AmountSpec)
Blight N = put N -1/-1 counters on creature(s) you control.
ExileCtrlOrGrave
Exile from battlefield or graveyard as a combined cost (craft).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostPart
impl<'de> Deserialize<'de> for CostPart
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>,
impl Eq for CostPart
Source§impl Ord for CostPart
impl Ord for CostPart
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for CostPart
impl RefUnwindSafe for CostPart
impl Send for CostPart
impl Sync for CostPart
impl Unpin for CostPart
impl UnsafeUnpin for CostPart
impl UnwindSafe for CostPart
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.