Add check for KO event, skill from events
This commit is contained in:
parent
dda728bfb8
commit
d8c5d24a3d
@ -47,7 +47,9 @@ function calculateTweenParams(sourceSpawn, targetSpawn, account) {
|
||||
function animatePhase(scene, game, resolution, cb) {
|
||||
// return early for disabled skills
|
||||
if (resolution.length === 0) return cb();
|
||||
if (resolution.event[0] === 'Disable' || resolution.event[0] === 'TargetKo') return cb();
|
||||
if (resolution.event[0] === 'Disable'
|
||||
|| resolution.event[0] === 'TargetKo'
|
||||
|| resolution.event === 'Ko') return cb();
|
||||
|
||||
const group = scene.scene.get('CombatCryps').cryps;
|
||||
const animations = new CombatAnimations(scene);
|
||||
@ -73,7 +75,7 @@ function animatePhase(scene, game, resolution, cb) {
|
||||
return scene.time.delayedCall(MOVE_CREEP, () => {
|
||||
const isAlly = sourceSpawn.cryp.account === account.id;
|
||||
// animate animation
|
||||
animations.getSkill(resolution.skill, isAlly, castLocation);
|
||||
animations.getSkill(resolution.event[1].skill, isAlly, castLocation);
|
||||
// Target cryp takes damage
|
||||
scene.time.delayedCall(ANIMATION_DURATION, () => {
|
||||
console.log(resolution);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user