pub struct CardFilter {Show 17 fields
pub creatures_only: bool,
pub controller_only: bool,
pub owner_only: bool,
pub other_only: bool,
pub commander_only: bool,
pub subtype: Option<String>,
pub nonland_only: bool,
pub land_only: bool,
pub required_color: Option<ColorSet>,
pub colorless_only: bool,
pub attacking_you: bool,
pub card_name: Option<String>,
pub token_only: bool,
pub shares_color_with_source: bool,
pub shares_color_with_equipped: bool,
pub shares_creature_type_with_source: bool,
pub shares_creature_type_with_equipped: bool,
}Expand description
Filter for which permanents are affected by a static ability.
Parsed from the Affected$ or ValidCards$ parameter, which mirrors the
Card.isValid() logic in Java Forge’s StaticAbilityContinuous.
Format: BaseType[.Qualifier][+Qualifier...]
Examples:
"Creature.YouControl"— creatures you control"Creature.White+YouCtrl"— white creatures you control (Honor of the Pure)"Creature.Other+YouControl"— creatures you control other than this card"Creature.Goblin+YouControl"— Goblins you control"Permanent.YouControl"— all permanents you control
Fields§
§creatures_only: boolOnly match cards with the Creature core type.
controller_only: boolOnly match cards controlled by the ability source’s controller.
owner_only: boolOnly match cards owned by the ability source’s controller (YouOwn).
other_only: boolExclude the source card itself (Other qualifier).
commander_only: boolOnly match commanders.
subtype: Option<String>Only match cards with this subtype (e.g. "Goblin", "Warrior").
nonland_only: boolOnly match non-land permanents.
land_only: boolOnly match land permanents.
required_color: Option<ColorSet>Only match cards that include this color (e.g. White for Honor of the Pure).
None means no color restriction.
colorless_only: boolOnly match colorless cards (Colorless qualifier).
attacking_you: boolOnly match creatures currently attacking the source’s controller
(attackingYou qualifier, e.g. Watchdog).
card_name: Option<String>Only match cards with this exact name (named<CardName> qualifier).
token_only: boolOnly match token permanents.
Only match cards that share a color with the source card.
Only match cards that share a color with the source’s equipped creature.
Only match cards that share a creature type with the source card.
Only match cards that share a creature type with the source’s equipped creature.
Implementations§
Trait Implementations§
Source§impl Clone for CardFilter
impl Clone for CardFilter
Source§fn clone(&self) -> CardFilter
fn clone(&self) -> CardFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more