diff --git a/core/src/game.rs b/core/src/game.rs index abf3165c..2f1faa99 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -437,9 +437,6 @@ impl Game { let mut r_animation_ms = 0; while let Some(cast) = self.stack.pop() { // info!("{:} casts ", cast); - - // r_animation_ms = Resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay()); - // if theres no resolution Resolutions, the skill didn't trigger (disable etc) // if Resolutions.len() > 0 && cast.used_cooldown() { // casters.push(cast); @@ -452,10 +449,13 @@ impl Game { }; // go through the whole most recent round and modify delays of the resolutions - let last = self.resolutions.len() - 1; - let mut iter = self.resolutions[last].iter_mut().peekable(); - while let Some(res) = iter.next() { - res.set_delay(iter.peek()); + { + let last = self.resolutions.len() - 1; + let mut iter = self.resolutions[last].iter_mut().peekable(); + while let Some(res) = iter.next() { + res.set_delay(iter.peek()); + r_animation_ms += res.delay; + } } // info!("{:#?}", self.casts);