Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions crates/engine/src/game/scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,17 @@ impl<'a> CardBuilder<'a> {
self
}

/// Add the Snow supertype (CR 205.4a: supertypes are printed before card types;
/// CR 205.4g: any permanent with the supertype "snow" is a snow permanent).
pub fn as_snow(&mut self) -> &mut Self {
let obj = self.obj();
if !obj.card_types.supertypes.contains(&Supertype::Snow) {
obj.card_types.supertypes.push(Supertype::Snow);
}
self.sync_base_card_types();
self
}

// --- Special modifiers ---

/// CR 903.3: Mark this object as its owner's commander IN PLACE, without
Expand Down Expand Up @@ -1389,6 +1400,14 @@ impl<'a> CardBuilder<'a> {
self
}

/// Set the color and base color of this card (CR 105.1).
pub fn with_color(&mut self, colors: Vec<crate::types::mana::ManaColor>) -> &mut Self {
let obj = self.obj();
obj.color = colors.clone();
obj.base_color = colors;
self
}

/// Add +1/+1 counters to this creature.
pub fn with_plus_counters(&mut self, count: u32) -> &mut Self {
let counter = crate::types::counter::CounterType::Plus1Plus1;
Expand Down
Loading
Loading