From 550e1123ad0cf5a850e199bd9da2da9b209c4b23 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Dec 2019 12:12:19 +1000 Subject: [PATCH] cast event for single target fix --- core/src/game.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/game.rs b/core/src/game.rs index 0d4a358f..a729d4d0 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -494,11 +494,10 @@ impl Game { self.resolve(Cast { skill, ..cast }); } - if cast.skill.cast_animation() { - self.action(cast, Action::Cast); - } - if cast.skill.aoe() { + if cast.skill.cast_animation() { + self.action(cast, Action::Cast); + } self.action(cast, Action::HitAoe); } @@ -521,6 +520,11 @@ impl Game { return self; } + // For normal skills we show the cast as long as the target isn't ko + if !cast.skill.aoe() && cast.skill.cast_animation() { + self.action(cast, Action::Cast); + } + // maybe this should be done with a status immunity if self.construct(cast.target).affected(Effect::Reflect) && cast.skill.colours().contains(&Colour::Blue) && !cast.skill.is_tick() { self.add_resolution(&cast, &Event::Reflection { construct: cast.target }); @@ -534,9 +538,7 @@ impl Game { return self.resolve(Cast { target: cast.source, ..cast }); } - if !cast.skill.aoe() { - self.action(cast, Action::Hit); - } + self.action(cast, Action::Hit); cast.resolve(self);