use super::*;
pub(crate) const MIRAGE: Card = Card {
name: Name::Mirage,
suit: Suit::Wild,
strength: 0,
adder: None,
wild: Some(mirage_wild),
modifier: None,
immunity: None,
blanks: None,
bonus: None,
penalty: None,
};
pub(crate) fn mirage_wild(hand: &Vec<Card>, index: usize) -> Vec<Vec<Card>> {
let mut possible_cards = CardCollection::new();
possible_cards += Suit::Army;
possible_cards += Suit::Land;
possible_cards += Suit::Weather;
possible_cards += Suit::Flood;
possible_cards += Suit::Flame;
possible_cards
.iter()
.map(|card| {
let mut new_hand: Vec<Card> = hand.clone();
let new_card = Card {
strength: 0,
adder: None,
wild: None,
modifier: None,
immunity: None,
blanks: None,
bonus: None,
penalty: None,
..card
};
new_hand[index] = new_card;
new_hand
})
.collect::<Vec<Vec<Card>>>()
}