diff --git a/client/src/components/game.construct.anim.text.jsx b/client/src/components/game.construct.anim.text.jsx index 8b982cd2..670827d3 100644 --- a/client/src/components/game.construct.anim.text.jsx +++ b/client/src/components/game.construct.anim.text.jsx @@ -63,6 +63,8 @@ class AnimText extends preact.Component { } case 'Ko': return

KO!

; case 'Reflection': return

REFLECT

; + case 'CooldownIncrease': return

+{event.turns}T cooldowns

; + case 'CooldownDecrease': return

-{event.turns}T cooldowns

; default: return false; } }; diff --git a/core/src/construct.rs b/core/src/construct.rs index 2c45b7be..16b13c63 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -470,24 +470,26 @@ impl Construct { } pub fn increase_cooldowns(&mut self, turns: usize) -> Vec { - let mut events = vec![]; - + let mut cd_event = false; for skill in self.skills.iter_mut() { if skill.skill.base_cd().is_some() { // if has a cooldown + cd_event = true; match skill.cd { Some(cd) => { skill.cd = Some(cd.saturating_add(turns)); - events.push(Event::CooldownIncrease { construct: self.id, turns }) }, None => { skill.cd = Some(turns); - events.push(Event::CooldownIncrease { construct: self.id, turns }) }, } } } - return events; + if cd_event { + return vec![Event::CooldownIncrease { construct: self.id, turns }]; + } + + return vec![]; } pub fn reduce_cooldowns(&mut self) -> &mut Construct {