aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/stats.rs')
-rw-r--r--src/shared/stats.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/shared/stats.rs b/src/shared/stats.rs
index 278a19f..749453c 100644
--- a/src/shared/stats.rs
+++ b/src/shared/stats.rs
@@ -1,16 +1,28 @@
-use crate::shared::champion::*;
use crate::shared::*;
-#[derive(Component, Message, Clone, Serialize, Deserialize, PartialEq)]
+#[derive(Clone, Copy, Serialize, Deserialize, PartialEq)]
pub struct Stats {
pub attack_range: f32,
+ pub movement_speed: f32,
}
-impl Stats {
+#[derive(Component, Message, Clone, Copy, Serialize, Deserialize, PartialEq)]
+pub struct BaseStats(pub Stats);
+
+#[derive(Component, Message, Clone, Copy, Serialize, Deserialize, PartialEq)]
+pub struct EffectiveStats(pub Stats);
+
+impl BaseStats {
pub fn from_champion(champion: Champion) -> Self {
match champion {
- Champion::Meele => Stats { attack_range: 35. },
- Champion::Ranged => Stats { attack_range: 60. },
+ Champion::Meele => BaseStats(Stats {
+ attack_range: 25.,
+ movement_speed: 75.,
+ }),
+ Champion::Ranged => BaseStats(Stats {
+ attack_range: 60.,
+ movement_speed: 85.,
+ }),
}
}
}