1use crate::{CardCost, DiceCost::Exact, Element::*, CharacterCard::{self, *}};
2
3#[derive(Debug, Hash, Clone, Copy, PartialEq, Eq)]
4#[non_exhaustive]
5pub enum TalentCard {
6 KantenSenmyouBlessing,
7 SteadyBreathing,
8 ShakenNotPurred,
9 UndividedHeart,
10 ColdBloodedStrike,
11 GloriousSeason,
12 ProphecyOfSubmersion,
13 TheScentRemained,
14 FeatherfallJudgment,
15 StellarPredator,
16 ThunderingPenance,
17 Awakening,
18 StrategicReserve,
19 IGotYourBack,
20 FloralSidewinder,
21 LandsOfDandelion,
22 ChaoticEntropy,
23 GrandExpectation,
24 FlowingFlame,
25 Crossfire,
26 NaganoharaMeteorSwarm,
27 MirrorCage,
28 StreamingSurge,
29 StonehideReforged,
30 ProliferatingSpores,
31 TranscendentAutomaton,
32 PaidInFull,
33}
34
35impl super::PlayingCard for TalentCard {
36 fn name(&self) -> &'static str {
37 self.info_dump().0
38 }
39
40 fn shop_price(&self) -> Option<super::Price> {
41 None
42 }
43
44 fn cost(&self) -> CardCost {
45 self.info_dump().1
46 }
47
48 fn talent(&self) -> Option<TalentCard> {
49 Some(*self)
50 }
51}
52
53impl TalentCard {
54 pub fn character(&self) -> CharacterCard {
56 self.info_dump().2
57 }
58
59 fn info_dump(&self) -> (&'static str, CardCost, CharacterCard) {
60 match self {
61 Self::KantenSenmyouBlessing => ("Kanten Senmyou Blessing", CardCost::new(Exact(Cryo), 2, 0), KamisatoAyaka),
62 Self::SteadyBreathing => ("Steady Breathing", CardCost::new(Exact(Cryo), 4, 0), Chongyun),
63 Self::ShakenNotPurred => ("Shaken, Not Purred", CardCost::new(Exact(Cryo), 4, 0), Diona),
64 Self::UndividedHeart => ("Undivided Heart", CardCost::new(Exact(Cryo), 5, 0), Ganyu),
65 Self::ColdBloodedStrike => ("Cold-Blooded Strike", CardCost::new(Exact(Cryo), 4, 0), Kaeya),
66 Self::GloriousSeason => ("Glorious Season", CardCost::new(Exact(Hydro), 4, 0), Barbara),
67 Self::ProphecyOfSubmersion => ("Prophecy of Submersion", CardCost::new(Exact(Hydro), 3, 3), Mona),
68 Self::TheScentRemained => ("The Scent Remained", CardCost::new(Exact(Hydro), 4, 0), Xingqiu),
69 Self::FeatherfallJudgment => ("Featherfall Judgment", CardCost::new(Exact(Electro), 3, 0), Cyno),
70 Self::StellarPredator => ("Stellar Predator", CardCost::new(Exact(Electro), 3, 0), Fischl),
71 Self::ThunderingPenance => ("Thundering Penance", CardCost::new(Exact(Electro), 3, 0), Keqing),
72 Self::Awakening => ("Awakening", CardCost::new(Exact(Electro), 4, 0), Razor),
73 Self::StrategicReserve => ("Strategic Reserve", CardCost::new(Exact(Geo), 4, 0), Ningguang),
74 Self::IGotYourBack => ("I Got Your Back", CardCost::new(Exact(Geo), 3, 0), Noelle),
75 Self::FloralSidewinder => ("Floral Sidewinder", CardCost::new(Exact(Dendro), 3, 0), Collei),
76 Self::LandsOfDandelion => ("Lands of Dandelion", CardCost::new(Exact(Anemo), 4, 3), Jean),
77 Self::ChaoticEntropy => ("Chaotic Entropy", CardCost::new(Exact(Anemo), 3, 2), Sucrose),
78 Self::GrandExpectation => ("Grand Expectation", CardCost::new(Exact(Pyro), 4, 2), Bennett),
79 Self::FlowingFlame => ("Flowing Flame", CardCost::new(Exact(Pyro), 3, 0), Diluc),
80 Self::Crossfire => ("Crossfire", CardCost::new(Exact(Pyro), 4, 0), Xiangling),
81 Self::NaganoharaMeteorSwarm => ("Naganohara Meteor Swarm", CardCost::new(Exact(Pyro), 2, 0), Yoimiya),
82 Self::MirrorCage => ("Mirror Cage", CardCost::new(Exact(Hydro), 4, 0), MirrorMaiden),
83 Self::StreamingSurge => ("Streaming Surge", CardCost::new(Exact(Hydro), 4, 3), RhodeiaOfLoch),
84 Self::StonehideReforged => ("Stonehide Reforged", CardCost::new(Exact(Geo), 4, 2), StonehideLawachurl),
85 Self::ProliferatingSpores => ("Proliferating Spores", CardCost::new(Exact(Dendro), 3, 0), JadeplumeTerrorshroom),
86 Self::TranscendentAutomaton => ("Transcendent Automaton", CardCost::new(Exact(Anemo), 3, 0), MaguuKenki),
87 Self::PaidInFull => ("Paid in Full", CardCost::new(Exact(Pyro), 3, 0), FatuiPyroAgent),
88 }
89 }
90}
91
92impl super::CardOrd for TalentCard {
93 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
94 (*self as u32).cmp(&(*other as u32))
95 }
96}
97
98impl_from!(Talent: TalentCard => crate::EquipmentCard => crate::ActionCard => crate::Card);