text and results early return

This commit is contained in:
ntr 2018-12-17 14:53:13 +11:00
parent 6a5ecb1b2f
commit 11de6afd00
3 changed files with 8 additions and 6 deletions

View File

@ -45,6 +45,8 @@ function calculateTweenParams(sourceSpawn, targetSpawn, account) {
}
function animatePhase(scene, game, resolution, cb) {
console.log(resolution);
// return early for disabled skills
if (resolution.resolution.disable.disabled) return cb();
const group = scene.scene.get('CombatCryps').cryps;
@ -60,7 +62,7 @@ function animatePhase(scene, game, resolution, cb) {
// ew
const { resolution: { results } } = resolution;
if (results.len === 0) return cb();
if (results.length === 0) return cb();
// Move cryps into posistion
if (moveSourceBattle) scene.tweens.add(moveSourceBattle);

View File

@ -23,7 +23,7 @@ class GameList extends Phaser.GameObjects.Group {
.setOrigin(0);
this.add(list.add
.text(spawn.getCenter().x, spawn.getCenter().y, 'SPAWN', TEXT.HEADER)
.text(spawn.getCenter().x, spawn.getCenter().y, 'spawn\ncryp', TEXT.HEADER)
.setOrigin(0.5, 0.5));
const pvp = list.add
@ -32,7 +32,7 @@ class GameList extends Phaser.GameObjects.Group {
.setOrigin(0);
this.add(list.add
.text(pvp.getCenter().x, pvp.getCenter().y, 'PVP', TEXT.HEADER)
.text(pvp.getCenter().x, pvp.getCenter().y, 'new PVP\ngame', TEXT.HEADER)
.setOrigin(0.5, 0.5));
const pve = list.add
@ -41,7 +41,7 @@ class GameList extends Phaser.GameObjects.Group {
.setOrigin(0);
this.add(list.add
.text(pve.getCenter().x, pve.getCenter().y, 'PVE', TEXT.HEADER)
.text(pve.getCenter().x, pve.getCenter().y, 'new PVE\ngame', TEXT.HEADER)
.setOrigin(0.5, 0.5));
const refresh = list.add
@ -50,7 +50,7 @@ class GameList extends Phaser.GameObjects.Group {
.setOrigin(0);
this.add(list.add
.text(refresh.getCenter().x, refresh.getCenter().y, 'REFRESH', TEXT.HEADER)
.text(refresh.getCenter().x, refresh.getCenter().y, 'refresh\ngame list', TEXT.HEADER)
.setOrigin(0.5, 0.5));

View File

@ -360,7 +360,7 @@ impl Skill {
Skill::Parry => Some(1), // avoid all dmg
Skill::Snare => Some(2),
Skill::Paralyse => Some(3),
Skill::Paralyse => Some(2),
Skill::Strangle => Some(3),
// Strangle