resolutions stuff

This commit is contained in:
ntr 2018-12-04 20:18:37 +11:00
parent 82d9bae218
commit 63a0309bb8
2 changed files with 12 additions and 2 deletions

View File

@ -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) => {

View File

@ -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::<Vec<Cast>>();
@ -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;
}