From 1bc871c66e08a1fc7357079dddcc02680e403886 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 9 Jan 2020 12:11:11 +1000 Subject: [PATCH] set cd --- core/src/construct.rs | 4 ++-- core/src/game.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/construct.rs b/core/src/construct.rs index c9c4cd4d..2a59ba25 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -455,7 +455,7 @@ impl Construct { }); } - pub fn skill_set_cd(&mut self, skill: Skill, cd: Cooldown) -> &mut Construct { + pub fn skill_set_cd(&mut self, skill: Skill) -> &mut Construct { // println!("{:?} {:?} skill cooldown set", self.name, skill); // tests force resolve some skills @@ -466,7 +466,7 @@ impl Construct { // self.skills.insert(i, ConstructSkill::new(skill)); //} if let Some(sk) = self.skills.iter_mut().find(|s| s.skill == skill) { - sk.set_cooldown(cd); + sk.set_cooldown(skill.base_cd()); } self diff --git a/core/src/game.rs b/core/src/game.rs index cb2037e8..d45e8d7b 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -601,7 +601,7 @@ impl Game { Event::Damage { construct, colour: _, amount: _, mitigation: _, display: _ } => self.construct_by_id(construct).unwrap().damage_trigger_casts(&cast, &event), Event::Cast { construct, skill, player: _, target: _, direction: _ } => { - self.construct_by_id(construct).unwrap().skill_set_cd(skill, skill.base_cd()); + self.construct_by_id(construct).unwrap().skill_set_cd(skill); vec![] } Event::Ko { construct } =>