Skip to main content

vitium_api/game/
race.rs

1use std::collections::{HashMap, HashSet};
2
3use serde::{Deserialize, Serialize};
4
5use fe3o4::Id;
6
7use super::{Mart, Spell};
8
9#[derive(Clone, Serialize, Deserialize)]
10#[cfg_attr(target_family = "wasm", derive(tsify_next::Tsify))]
11#[cfg_attr(
12    target_family = "wasm",
13    tsify(into_wasm_abi, from_wasm_abi, large_number_types_as_bigints)
14)]
15pub struct Race {
16    /// Average height.
17    pub height: u16,
18    /// Average weight.
19    pub weight: u16,
20    /// Average life, in years.
21    pub life: u16,
22    /// Martial arts automatically learnt.
23    pub mart: HashMap<Id<Mart>, i16>,
24    /// Spells automatically learnt.
25    pub spell: HashSet<Id<Spell>>,
26}