💫 implement card.moveToAsyn

This commit is contained in:
WEBXOSS 2017-10-04 15:55:51 +08:00
parent ada169136a
commit 95196a3e68
2 changed files with 8 additions and 4 deletions

View file

@ -1139,6 +1139,11 @@ Card.prototype.moveTo = function (zone,arg) {
return moveEvent; return moveEvent;
}; };
Card.prototype.moveToAsyn = function(zone,arg) {
if (!arg) arg = {};
return this.game.moveCardsAdvancedAsyn([this],[zone],[arg]);
};
Card.prototype.changeSigniZone = function (zone) { Card.prototype.changeSigniZone = function (zone) {
if (!inArr(this,this.player.signis)) { if (!inArr(this,this.player.signis)) {
console.warn('card.changeSigniZone: card is not a SIGNI!'); console.warn('card.changeSigniZone: card is not a SIGNI!');

View file

@ -116749,7 +116749,7 @@ var CardInfo = {
}; };
return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) { return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) {
if (!card) return; if (!card) return;
return this.game.moveCardsAdvancedAsyn([card],[this.player.opponent.enerZone],[{}]); return card.moveToAsyn(card.player.enerZone);
}); });
}, },
}, },
@ -125435,7 +125435,7 @@ var CardInfo = {
}; };
return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) { return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) {
if (!card) return; if (!card) return;
return this.game.moveCardsAdvancedAsyn([card],[this.player.opponent.enerZone],[{}]); return card.moveToAsyn(card.player.enerZone);
}); });
}, },
}, },
@ -129054,8 +129054,7 @@ var CardInfo = {
}; };
return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) { return this.player.selectOpponentSigniAsyn(filter).callback(this,function (card) {
if (!card) return; if (!card) return;
// TODO: ... return card.moveToAsyn(card.player.enerZone);
return this.game.moveCardsAdvancedAsyn([card],[this.player.opponent.enerZone],[{}]);
}); });
}, },
}, },