battler_data/mons/event.rs
1use alloc::string::String;
2
3use hashbrown::HashSet;
4use serde::{
5 Deserialize,
6 Serialize,
7};
8
9use crate::{
10 Gender,
11 Nature,
12 PartialStatTable,
13 ShinyChance,
14};
15
16/// Data for a particular event, which is a special giveaway of some Mon.
17///
18/// Event Mons can have special moves and abilities that the species would not ordinarily have. This
19/// data is stored on each species to mark Mons that would ordinarily be illegal as legal and
20/// legitimate.
21#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
22pub struct EventData {
23 /// Level Mon was given away at.
24 pub level: Option<u8>,
25 /// Can the Mon be shiny?
26 #[serde(default)]
27 pub shiny: ShinyChance,
28 /// Gender.
29 pub gender: Option<Gender>,
30 /// Nature.
31 pub nature: Option<Nature>,
32 /// IVs.
33 #[serde(default)]
34 pub ivs: PartialStatTable,
35 /// Does the Mon have its hidden ability?
36 #[serde(default)]
37 pub hidden_ability: bool,
38 /// Moves the Mon could have been given away with.
39 ///
40 /// Moves that are ordinarily illegal should be listed here.
41 #[serde(default)]
42 pub moves: HashSet<String>,
43 /// Type of ball the Mon was given away in.
44 pub ball: Option<String>,
45}