diff --git a/client/src/scenes/combat.hitbox.js b/client/src/scenes/combat.hitbox.js index e096f2d5..f099c96b 100644 --- a/client/src/scenes/combat.hitbox.js +++ b/client/src/scenes/combat.hitbox.js @@ -65,7 +65,6 @@ class CombatHitBox extends Phaser.Scene { t.cryps.forEach((c) => { const cback = () => { const { activeSkill } = skillScene; - console.log(activeSkill); if (activeSkill) { activeSkill.activate(); skillScene.activeSkill = null; @@ -75,7 +74,6 @@ class CombatHitBox extends Phaser.Scene { const crypSpawn = group.children.entries.find(s => s.cryp.id === c.id); const team = c.account === account.id ? 0 : 1; - console.log(crypSpawn); this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback)); }); }); diff --git a/client/src/scenes/combat.render.resolutions.js b/client/src/scenes/combat.render.resolutions.js index aafc9c79..fdad4bdd 100644 --- a/client/src/scenes/combat.render.resolutions.js +++ b/client/src/scenes/combat.render.resolutions.js @@ -7,13 +7,14 @@ const { } = require('./constants'); function findResolutionCryps(scene, group, resolution, game) { - const sourceCryp = game.teams.find(t => t.cryps.find(c => c.id === resolution.source_cryp_id)) .cryps.find(c => c.id === resolution.source_cryp_id); + const sourceSpawn = group.children.entries.find(c => c.cryp.id === sourceCryp.id); const targetCryp = game.teams.find(t => t.cryps.find(c => c.id === resolution.target_cryp_id)) .cryps.find(c => c.id === resolution.target_cryp_id); + const targetSpawn = group.children.entries.find(c => c.cryp.id === targetCryp.id); return { sourceSpawn, targetSpawn }; @@ -52,6 +53,7 @@ function animatePhase(scene, game, resolution, cb) { // Find cryps, targets const { sourceSpawn, targetSpawn } = findResolutionCryps(scene, group, resolution, game); + const { moveSourceBattle, moveSourceOrig, moveTargetBattle, moveTargetOrig, } = calculateTweenParams(sourceSpawn, targetSpawn, account); @@ -72,7 +74,8 @@ function animatePhase(scene, game, resolution, cb) { scene.tweens.add(moveTargetBattle); return scene.time.delayedCall(MOVE_CREEP, () => { - const isAlly = resolution.target_team_id !== account.id; + const isAlly = sourceSpawn.cryp.account === account.id; + // animate animation const workingSkills = ['Heal', 'Block']; if (workingSkills.includes(resolution.skill)) animations.getSkill(resolution.skill, isAlly, castLocation);