mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-23 01:54:22 +00:00
Refactor region_refs
so that only the CardRegion
enum is kept
This commit is contained in:
parent
4a8a5e36bb
commit
7597e073bd
1 changed files with 27 additions and 5 deletions
|
@ -13,13 +13,12 @@ pub struct Card {
|
|||
/// Art assets of this card.
|
||||
pub assets: Vec<Asset>,
|
||||
|
||||
/// Localized names of the regions this card belongs to.
|
||||
pub regions: Vec<String>,
|
||||
/// IDs of the regions this card belongs to.
|
||||
pub region_refs: Vec<String>,
|
||||
/// Regions this card belongs to.
|
||||
#[serde(rename = "region_refs")]
|
||||
pub regions: Vec<CardRegion>,
|
||||
|
||||
/// Base attack of the card.
|
||||
pub attack: i8,
|
||||
pub attack: i64,
|
||||
/// Base cost of the card.
|
||||
pub cost: i8,
|
||||
/// Base health of the card.
|
||||
|
@ -85,6 +84,29 @@ impl Card {
|
|||
}
|
||||
|
||||
|
||||
/// Regions to which cards can belong to.
|
||||
#[non_exhaustive]
|
||||
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
|
||||
pub enum CardRegion {
|
||||
Noxus,
|
||||
Demacia,
|
||||
Freljord,
|
||||
ShadowIsles,
|
||||
Targon,
|
||||
Ionia,
|
||||
Shurima,
|
||||
PiltoverZaun,
|
||||
BandleCity,
|
||||
|
||||
// I'm not sure what this region is for.
|
||||
Runeterra,
|
||||
|
||||
Jhin,
|
||||
Evelynn,
|
||||
Bard,
|
||||
}
|
||||
|
||||
|
||||
/// An art asset associated with a given card.
|
||||
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
|
||||
#[serde(rename_all="camelCase")]
|
||||
|
|
Loading…
Reference in a new issue