aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/player.rs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-18 04:58:00 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-18 07:02:29 +0100
commitec17616f8d6041ac5d93a786edec0f5d0f969a46 (patch)
treec3a1738aa715f33438591904310c1fca3f475349 /src/shared/player.rs
parent937e1ed8d240c1a5b42f5b8cf1104321b9d79c4a (diff)
feat: speed ability
Diffstat (limited to 'src/shared/player.rs')
-rw-r--r--src/shared/player.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/shared/player.rs b/src/shared/player.rs
index a886499..4f571d8 100644
--- a/src/shared/player.rs
+++ b/src/shared/player.rs
@@ -1,3 +1,6 @@
+use crate::shared::activation::*;
+use crate::shared::buffs::*;
+use crate::shared::stats::*;
use crate::shared::*;
#[derive(Bundle)]
@@ -9,6 +12,9 @@ pub struct PlayerBundle {
cooldown: Cooldown,
health: Health,
champion: Champion,
+ effective_stats: EffectiveStats,
+ buffs: Buffs,
+ activation: Activation,
replicate: Replicate,
}
@@ -20,8 +26,10 @@ impl PlayerBundle {
};
replicate.enable_replicate_once::<PlayerId>();
replicate.enable_replicate_once::<PlayerColor>();
- replicate.target::<Cooldown>(NetworkTarget::Single(id));
replicate.target::<Champion>(NetworkTarget::Single(id));
+ replicate.target::<Cooldown>(NetworkTarget::Single(id));
+ replicate.target::<EffectiveStats>(NetworkTarget::Single(id));
+ let champion = Champion::default();
PlayerBundle {
id: PlayerId(id),
position: PlayerPosition(position),
@@ -29,7 +37,10 @@ impl PlayerBundle {
imperative: Imperative::Idle,
cooldown: Cooldown::default(),
health: Health::default(),
- champion: Champion::default(),
+ champion,
+ effective_stats: EffectiveStats(BaseStats::from_champion(champion).0),
+ buffs: Buffs::default(),
+ activation: Activation::default(),
replicate,
}
}