Merge branch 'master' of ssh://cryps.gg:40022/~/cryps

This commit is contained in:
ntr 2019-03-26 15:07:38 +11:00
commit 9bd19ee79d

View File

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