genius_invokation/cards/action/event/
normal.rs

1use crate::{CardCost, DiceCost::Same};
2
3use super::Price;
4
5#[derive(Debug, Hash, Clone, Copy, PartialEq, Eq)]
6#[non_exhaustive]
7pub enum NormalEventCard {
8    TossUp,
9    SendOff,
10    Starsigns,
11    CalxsArts,
12    QuickKnit,
13    Strategize,
14    LeaveItToMe,
15    GuardiansOath,
16    ChangingShifts,
17    IHaventLostYet,
18    AbyssalSummons,
19    MasterOfWeaponry,
20    WhenTheCraneReturned,
21    TheBestestTravelCompanion,
22    BlessingOfTheDivineRelicsInstallation, // i might cut this one's name in half in the future lol
23}
24
25impl super::PlayingCard for NormalEventCard {
26    fn name(&self) -> &'static str {
27        self.info_dump().0
28    }
29
30    fn shop_price(&self) -> Option<Price> {
31        self.info_dump().1
32    }
33
34    fn cost(&self) -> CardCost {
35        self.info_dump().2
36    }
37
38    fn normal_event(&self) -> Option<NormalEventCard> {
39        Some(*self)
40    }
41}
42
43impl NormalEventCard {
44    fn info_dump(&self) -> (&'static str, Option<Price>, CardCost) {
45        match self {
46            Self::TossUp =>               ("Toss-Up",                       None,      CardCost::ZERO),
47            Self::SendOff =>              ("Send Off",                      Some(500), CardCost::ANY2),
48            Self::Starsigns =>            ("Starsigns",                     Some(500), CardCost::ANY2),
49            Self::CalxsArts =>            ("Calx's Arts",                   Some(500), CardCost::ONE),
50            Self::QuickKnit =>            ("Quick Knit",                    Some(500), CardCost::ONE),
51            Self::Strategize =>           ("Strategize",                    Some(500), CardCost::ONE),
52            Self::LeaveItToMe =>          ("Leave It To Me!",               Some(500), CardCost::ZERO),
53            Self::GuardiansOath =>        ("Guardian's Oath",               Some(500), CardCost::new(Same, 4, 0)),
54            Self::ChangingShifts =>       ("Changing Shifts",               Some(500), CardCost::ZERO),
55            Self::IHaventLostYet =>       ("I haven't Lost Yet!",           Some(500), CardCost::ZERO),
56            Self::AbyssalSummons =>       ("Abyssal Summons",               Some(500), CardCost::MATCH2),
57            Self::MasterOfWeaponry =>     ("Master of Weaponry",            Some(500), CardCost::ZERO),
58            Self::WhenTheCraneReturned => ("When The Crane Returned",       Some(500), CardCost::ONE),
59            Self::TheBestestTravelCompanion => ("The Bestest Travel Companion!", None, CardCost::ANY2),
60            Self::BlessingOfTheDivineRelicsInstallation => {
61                ("Blessing of the Divine Relic's Installation", Some(500), CardCost::ZERO)
62            },
63        }
64    }
65}
66
67impl super::CardOrd for NormalEventCard {
68    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
69        (*self as u32).cmp(&(*other as u32))
70    }
71}
72
73impl_from!(Normal: NormalEventCard => crate::EventCard => crate::ActionCard => crate::Card);