cast event for single target fix

This commit is contained in:
Mashy 2019-12-20 12:12:19 +10:00
parent c9acab9def
commit 550e1123ad

View File

@ -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);