From 63a0309bb808c630dbf56b24cca0aa30a57798f1 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 4 Dec 2018 20:18:37 +1100 Subject: [PATCH] resolutions stuff --- client/src/scenes/combat.render.resolutions.js | 4 ++++ server/src/game.rs | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/scenes/combat.render.resolutions.js b/client/src/scenes/combat.render.resolutions.js index c62b9a78..3d920b87 100644 --- a/client/src/scenes/combat.render.resolutions.js +++ b/client/src/scenes/combat.render.resolutions.js @@ -32,6 +32,10 @@ function findResolutionCryps(scene, group, resolution, allyTeam, enemyTeam) { } function animatePhase(scene, group, game, resolution, cb) { + + // return early for disabled skills + if (resolution.resolution.disable.disabled) return cb(); + const animations = new CombatAnimations(scene); // Find cryps and targets const tweenParams = (targets, centreSpot, enemy) => { diff --git a/server/src/game.rs b/server/src/game.rs index 99ac8dc6..7c02bf53 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -458,6 +458,14 @@ impl Game { self.update_cryp(&mut source); self.update_cryp(&mut target); + vec![source, target].iter_mut() + .for_each(|c| { + if c.is_ko() { + self.log.push(format!("{:?} KO", c.name)); + c.effects.clear(); + } + }); + return skill.clone(); }).collect::>(); @@ -477,8 +485,6 @@ impl Game { // println!("progressing durations for {:?}", cryp.name); if cryp.is_ko() { - self.log.push(format!("{:?} KO", cryp.name)); - cryp.effects.clear(); continue; }