aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/stats.rs
blob: 45f33523d57e8a709622a2034ab065b3d97d88dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use bevy::prelude::*;
use lightyear::prelude::*;
use serde::*;

#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Debug)]
pub struct Stats {
    pub attack_range: f32,
    pub attack_speed: f32,
    pub max_health: f32,
    pub movement_speed: f32,
    pub armor: f32,
    pub magic_resist: 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);