resolutions stuff
This commit is contained in:
parent
82d9bae218
commit
63a0309bb8
@ -32,6 +32,10 @@ function findResolutionCryps(scene, group, resolution, allyTeam, enemyTeam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function animatePhase(scene, group, game, resolution, cb) {
|
function animatePhase(scene, group, game, resolution, cb) {
|
||||||
|
|
||||||
|
// return early for disabled skills
|
||||||
|
if (resolution.resolution.disable.disabled) return cb();
|
||||||
|
|
||||||
const animations = new CombatAnimations(scene);
|
const animations = new CombatAnimations(scene);
|
||||||
// Find cryps and targets
|
// Find cryps and targets
|
||||||
const tweenParams = (targets, centreSpot, enemy) => {
|
const tweenParams = (targets, centreSpot, enemy) => {
|
||||||
|
|||||||
@ -458,6 +458,14 @@ impl Game {
|
|||||||
self.update_cryp(&mut source);
|
self.update_cryp(&mut source);
|
||||||
self.update_cryp(&mut target);
|
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();
|
return skill.clone();
|
||||||
}).collect::<Vec<Cast>>();
|
}).collect::<Vec<Cast>>();
|
||||||
|
|
||||||
@ -477,8 +485,6 @@ impl Game {
|
|||||||
// println!("progressing durations for {:?}", cryp.name);
|
// println!("progressing durations for {:?}", cryp.name);
|
||||||
|
|
||||||
if cryp.is_ko() {
|
if cryp.is_ko() {
|
||||||
self.log.push(format!("{:?} KO", cryp.name));
|
|
||||||
cryp.effects.clear();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user