1#[rustfmt::skip]
2pub fn fighter_name(name: &str) -> String {
3 match name {
4 "Captain" => String::from("Captain Falcon"),
5 "Dedede" => String::from("King Dedede"),
6 "Diddy" => String::from("Diddy Kong"),
7 "Donkey" => String::from("Donkey Kong"),
8 "Falco" => String::from("Falco"),
9 "Fox" => String::from("Fox"),
10 "GKoopa" => String::from("Giga Bowser"),
11 "GameWatch" => String::from("Game & Watch"),
12 "Ganon" => String::from("Ganondorf"),
13 "Ike" => String::from("Ike"),
14 "Kirby" => String::from("Kirby"),
15 "Koopa" => String::from("Bowser"),
16 "Link" => String::from("Link"),
17 "Lucario" => String::from("Lucario"),
18 "Lucas" => String::from("Lucas"),
19 "Luigi" => String::from("Luigi"),
20 "Mario" => String::from("Mario"),
21 "Marth" => String::from("Marth"),
22 "Metaknight" => String::from("Meta Knight"),
23 "Mewtwo" => String::from("Mewtwo"),
24 "Ness" => String::from("Ness"),
25 "Peach" => String::from("Peach"),
26 "Pikachu" => String::from("Pikachu"),
27 "Pikmin" => String::from("Olimar"),
28 "Pit" => String::from("Pit"),
29 "PokeFushigisou" => String::from("Ivysaur"),
30 "PokeLizardon" => String::from("Charizard"),
31 "PokeTrainer" => String::from("Pokemon Trainer"),
32 "PokeZenigame" => String::from("Squirtle"),
33 "Popo" => String::from("Ice Climbers"),
34 "Purin" => String::from("Jigglypuff"),
35 "Robot" => String::from("R.O.B"),
36 "Roy" => String::from("Roy"),
37 "SZerosuit" => String::from("Zero Suit Samus"),
38 "Samus" => String::from("Samus"),
39 "Sheik" => String::from("Sheik"),
40 "Snake" => String::from("Snake"),
41 "Sonic" => String::from("Sonic"),
42 "ToonLink" => String::from("Toon Link"),
43 "Wario" => String::from("Wario"),
44 "WarioMan" => String::from("Wario-Man"),
45 "Wolf" => String::from("Wolf"),
46 "Yoshi" => String::from("Yoshi"),
47 "Zakoball" => String::from("Green Alloy"),
48 "Zakoboy" => String::from("Red Alloy"),
49 "Zakochild" => String::from("Yellow Alloy"),
50 "Zakogirl" => String::from("Blue Alloy"),
51 "Zelda" => String::from("Zelda"),
52 _ => name.to_string(),
53 }
54}
55
56#[rustfmt::skip]
57pub fn fighter_id(name: &str) -> Option<u8> {
58 match name {
59 "Captain" => Some(0x09),
60 "Dedede" => Some(0x20),
61 "Diddy" => Some(0x1B),
62 "Donkey" => Some(0x01),
63 "Falco" => Some(0x13),
64 "Fox" => Some(0x06),
65 "GKoopa" => Some(0x30),
66 "GameWatch" => Some(0x12),
67 "Ganon" => Some(0x14),
68 "Ike" => Some(0x22),
69 "Kirby" => Some(0x05),
70 "Knuckles" => Some(0x2D),
71 "Koopa" => Some(0x0B),
72 "Link" => Some(0x02),
73 "Lucario" => Some(0x21),
74 "Lucas" => Some(0x1A),
75 "Luigi" => Some(0x08),
76 "Mario" => Some(0x00),
77 "Marth" => Some(0x11),
78 "Metaknight" => Some(0x16),
79 "Mewtwo" => Some(0x26),
80 "Nana" => Some(0x10),
81 "Ness" => Some(0x0A),
82 "Peach" => Some(0x0C),
83 "Pikachu" => Some(0x07),
84 "Pikmin" => Some(0x19),
85 "Pit" => Some(0x17),
86 "PokeFushigisou" => Some(0x1F),
87 "PokeLizardon" => Some(0x1D),
88 "PokeTrainer" => Some(0x1C),
89 "PokeZenigame" => Some(0x1E),
90 "Popo" => Some(0x0F),
91 "Purin" => Some(0x25),
92 "Robot" => Some(0x23),
93 "Roy" => Some(0x27),
94 "SZerosuit" => Some(0x18),
95 "Samus" => Some(0x03),
96 "Sheik" => Some(0x0E),
97 "Snake" => Some(0x2E),
98 "Sonic" => Some(0x2F),
99 "ToonLink" => Some(0x29),
100 "Wario" => Some(0x15),
101 "WarioMan" => Some(0x31),
102 "Wolf" => Some(0x2C),
103 "Yoshi" => Some(0x04),
104 "Zakoball" => Some(0x35),
105 "Zakoboy" => Some(0x32),
106 "Zakochild" => Some(0x34),
107 "Zakogirl" => Some(0x33),
108 "Zelda" => Some(0x0D),
109 _ => None
110 }
111}