diff options
Diffstat (limited to 'src/shared/champion.rs')
-rw-r--r-- | src/shared/champion.rs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/shared/champion.rs b/src/shared/champion.rs index f48faa1..1667672 100644 --- a/src/shared/champion.rs +++ b/src/shared/champion.rs @@ -1,4 +1,5 @@ use crate::shared::ability::*; +use crate::shared::shape::*; use crate::shared::stats::*; use crate::shared::*; use bevy::utils::*; @@ -8,6 +9,7 @@ use std::str::FromStr; pub enum Champion { Meele, Ranged, + Tower, } impl Default for Champion { @@ -23,6 +25,7 @@ impl FromStr for Champion { match s { "ranged" => Ok(Champion::Ranged), "meele" => Ok(Champion::Meele), + "tower" => Ok(Champion::Tower), _ => Err(format!("unknown champion: {}", s)), } } @@ -32,17 +35,23 @@ impl Champion { pub fn base_stats(self) -> BaseStats { match self { Champion::Meele => BaseStats(Stats { - attack_range: 25., + attack_range: Shape::player().radius, attack_speed: 0.75, max_health: 150., movement_speed: 75., }), Champion::Ranged => BaseStats(Stats { - attack_range: 60., + attack_range: 50., attack_speed: 1.5, max_health: 100., movement_speed: 85., }), + Champion::Tower => BaseStats(Stats { + attack_range: 100., + attack_speed: 4.5, + max_health: 500., + movement_speed: 0., + }), } } @@ -88,6 +97,11 @@ impl Champion { } _ => Ability::Targeted(TargetedAbility::RangedAttack(RangedAttack { damage: 8. })), }, + Champion::Tower => match ability_slot { + _ => { + Ability::Targeted(TargetedAbility::RangedAttack(RangedAttack { damage: 100. })) + } + }, } } @@ -99,6 +113,9 @@ impl Champion { Champion::Ranged => { BaseCooldown([0., 10., 10., 15., 35., 50., 50.].map(Duration::from_secs_f32)) } + Champion::Tower => { + BaseCooldown([10., 10., 10., 10., 10., 10., 10.].map(Duration::from_secs_f32)) + } } } } |