diff --git a/server/src/construct.rs b/server/src/construct.rs index 6d7c2ea8..bce0d5c0 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -554,7 +554,9 @@ impl Construct { // Should red type immunity block recharge??? if let Some(immunity) = self.immune(skill) { - events.push(Event::Immunity { skill, immunity }); + if !self.is_ko() { + events.push(Event::Immunity { skill, immunity }); + } return events; } @@ -642,10 +644,9 @@ impl Construct { pub fn deal_green_damage(&mut self, skill: Skill, amount: u64) -> Vec { let mut events = vec![]; if let Some(immunity) = self.immune(skill) { - events.push(Event::Immunity { - immunity, - skill, - }); + if !self.is_ko() { + events.push(Event::Immunity { skill, immunity }); + } return events; } @@ -696,10 +697,9 @@ impl Construct { let mut events = vec![]; if let Some(immunity) = self.immune(skill) { - events.push(Event::Immunity { - skill, - immunity, - }); + if !self.is_ko() { + events.push(Event::Immunity { skill, immunity }); + } return events; } @@ -769,10 +769,9 @@ impl Construct { let mut events = vec![]; if let Some(immunity) = self.immune(skill) { - events.push(Event::Immunity { - skill, - immunity, - }); + if !self.is_ko() { + events.push(Event::Immunity { skill, immunity }); + } return events; } diff --git a/server/src/game.rs b/server/src/game.rs index bccc6588..fe4339b7 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -470,6 +470,9 @@ impl Game { let mut resolutions = resolution_steps(&cast, &mut self); r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay()); + + // the cast itself goes into this temp vec to handle cooldowns + // if theres no resolution events, the skill didn't trigger (disable etc) if resolutions.len() > 0 { casts.push(cast); } @@ -482,9 +485,6 @@ impl Game { // self.resolved.push(resolution); // } - // the cast itself goes into this temp vec - // to handle cooldowns - // sort the stack again in case speeds have changed self.stack_sort_speed(); };