use crate::shared::*; #[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Debug)] pub struct Stats { pub attack_range: f32, pub movement_speed: f32, } #[derive(Component, Message, Clone, Copy, Serialize, Deserialize, PartialEq, Debug)] pub struct BaseStats(pub Stats); #[derive(Component, Message, Clone, Copy, Serialize, Deserialize, PartialEq, Debug)] pub struct EffectiveStats(pub Stats); impl BaseStats { pub fn from_champion(champion: Champion) -> Self { match champion { Champion::Meele => BaseStats(Stats { attack_range: 25., movement_speed: 75., }), Champion::Ranged => BaseStats(Stats { attack_range: 60., movement_speed: 85., }), } } }