genius_invokation/cards/action/equip/
artifact.rs1use crate::{CardCost, Element::{self, *}};
2use super::Price;
3
4#[derive(Debug, Hash, Clone, Copy, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum ArtifactCard {
7 AdventurersBandana,
8 LuckyDogsSilverCirclet,
9 TravelingDoctorsHandkerchief,
10 GamblersEarrings,
11 InstructorsCap,
12 ExilesCirclet,
13 BrokenRimesEcho,
14 BlizzardStrayer,
15 WineStainedTricorne,
16 HeartOfDepth,
17 WitchsScorchingHat,
18 CrimsonWitchOfFlames,
19 ThunderSummonersCrown,
20 ThunderingFury,
21 ViridescentVenerersDiadem,
22 ViridescentVenerer,
23 MaskOfSolitudeBasalt,
24 ArchaicPetra,
25 LaurelCoronet,
26 DeepwoodMemories,
27}
28
29impl super::PlayingCard for ArtifactCard {
30 fn name(&self) -> &'static str {
31 self.info_dump().0
32 }
33
34 fn shop_price(&self) -> Option<Price> {
35 Some(self.info_dump().1)
36 }
37
38 fn cost(&self) -> CardCost {
39 self.info_dump().2
40 }
41
42 fn artifact(&self) -> Option<ArtifactCard> {
43 Some(*self)
44 }
45}
46
47impl ArtifactCard {
48 fn info_dump(&self) -> (&'static str, Price, CardCost, Option<Element>) {
49 match self {
50 Self::AdventurersBandana => ("Adventurer's Bandana", 500, CardCost::ONE, None),
51 Self::LuckyDogsSilverCirclet => ("Lucky Dog's Silver Circlet", 500, CardCost::ANY2, None),
52 Self::TravelingDoctorsHandkerchief => ("Traveling Doctor's Handkerchief", 500, CardCost::ONE, None),
53 Self::GamblersEarrings => ("Gambler's Earrings", 500, CardCost::ONE, None),
54 Self::InstructorsCap => ("Instructor's Cap", 500, CardCost::ANY2, None),
55 Self::ExilesCirclet => ("Exile's Circlet", 500, CardCost::ANY2, None),
56 Self::BrokenRimesEcho => ("Broken Rime's Echo", 500, CardCost::MATCH2, Some(Cryo)),
57 Self::BlizzardStrayer => ("Blizzard Strayer", 700, CardCost::MATCH3, Some(Cryo)),
58 Self::WineStainedTricorne => ("Wine-Stained Tricorne", 500, CardCost::MATCH2, Some(Hydro)),
59 Self::HeartOfDepth => ("Heart of Depth", 700, CardCost::MATCH3, Some(Hydro)),
60 Self::WitchsScorchingHat => ("Witch's Scorching Hat", 500, CardCost::MATCH2, Some(Pyro)),
61 Self::CrimsonWitchOfFlames => ("Crimson Witch of Flames", 700, CardCost::MATCH3, Some(Pyro)),
62 Self::ThunderSummonersCrown => ("Thunder Summoner's Crown", 500, CardCost::MATCH2, Some(Electro)),
63 Self::ThunderingFury => ("Thundering Fury", 700, CardCost::MATCH3, Some(Electro)),
64 Self::ViridescentVenerersDiadem => ("Viridescent Venerer's Diadem", 500, CardCost::MATCH2, Some(Anemo)),
65 Self::ViridescentVenerer => ("Viridescent Venerer", 700, CardCost::MATCH3, Some(Anemo)),
66 Self::MaskOfSolitudeBasalt => ("Mask of Solitude Basalt", 500, CardCost::MATCH2, Some(Geo)),
67 Self::ArchaicPetra => ("Archaic Petra", 700, CardCost::MATCH3, Some(Geo)),
68 Self::LaurelCoronet => ("Laurel Coronet", 500, CardCost::MATCH2, Some(Dendro)),
69 Self::DeepwoodMemories => ("Deepwood Memories", 700, CardCost::MATCH3, Some(Dendro)),
70 }
71 }
72}
73
74impl super::CardOrd for ArtifactCard {
75 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
76 (*self as u32).cmp(&(*other as u32))
77 }
78}
79
80impl_from!(Artifact: ArtifactCard => crate::EquipmentCard => crate::ActionCard => crate::Card);