aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/champion.rs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-18 04:19:34 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-18 04:19:34 +0100
commit937e1ed8d240c1a5b42f5b8cf1104321b9d79c4a (patch)
treec9cc6f8ec35e3e9b1ba97b5fd42091cf0ab2afb6 /src/shared/champion.rs
parentab675360c0005718a3c9b8b5e7962af897269c04 (diff)
fix: fix abilities selecting the right cooldown
Diffstat (limited to 'src/shared/champion.rs')
-rw-r--r--src/shared/champion.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/champion.rs b/src/shared/champion.rs
index 8de12a5..28d1ff2 100644
--- a/src/shared/champion.rs
+++ b/src/shared/champion.rs
@@ -40,14 +40,14 @@ impl Stats {
}
impl Champion {
- pub fn to_ability(self, attack_key: AttackKey) -> Ability {
+ pub fn to_ability(self, ability_slot: AbilitySlot) -> Ability {
match self {
- Champion::Meele => match attack_key {
- AttackKey::Q => Ability::Directional(DirectionalAbility::Spear),
+ Champion::Meele => match ability_slot {
+ AbilitySlot::Q => Ability::Directional(DirectionalAbility::Spear),
_ => Ability::Targeted(TargetedAbility::MeeleAttack),
},
- Champion::Ranged => match attack_key {
- AttackKey::Q => Ability::Directional(DirectionalAbility::Spear),
+ Champion::Ranged => match ability_slot {
+ AbilitySlot::Q => Ability::Directional(DirectionalAbility::Spear),
_ => Ability::Targeted(TargetedAbility::RangedAttack),
},
}