diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-18 07:28:33 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-18 07:30:53 +0100 |
commit | 66b4afc529e6d1c4b8f624bbfddc0195ce8d17d5 (patch) | |
tree | 54fb5ffc470ea33b46bb7b730ed1f2f41a6b3198 /src | |
parent | ad9a34852a289a19e480fc8c20eb2fe22544fadc (diff) |
feat: vary attack speed
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/cooldown.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/shared/cooldown.rs b/src/shared/cooldown.rs index 2d6b6ae..bf83e42 100644 --- a/src/shared/cooldown.rs +++ b/src/shared/cooldown.rs @@ -10,7 +10,14 @@ pub struct Cooldown(pub [Duration; 7]); pub struct BaseCooldown(pub [Duration; 7]); impl BaseCooldown { - pub fn from_champion(_champion: Champion) -> Self { - BaseCooldown([1., 5., 5., 10., 25., 50., 50.].map(Duration::from_secs_f32)) + pub fn from_champion(champion: Champion) -> Self { + match champion { + Champion::Meele => { + BaseCooldown([0.75, 5., 5., 10., 25., 50., 50.].map(Duration::from_secs_f32)) + } + Champion::Ranged => { + BaseCooldown([1.25, 5., 5., 10., 25., 50., 50.].map(Duration::from_secs_f32)) + } + } } } |