diff --git a/Card.js b/Card.js index 2c4f9db..dbb03e9 100644 --- a/Card.js +++ b/Card.js @@ -1141,8 +1141,8 @@ Card.prototype.changeSigniZone = function (zone) { // 交换 zone.cards var oldZone = this.zone; - var tmp = oldZone.cards; - oldZone.cards = zone.cards; + var tmp = oldZone.getNonTrapCards().concat(zone.trap || []); + oldZone.cards = zone.getNonTrapCards().concat(oldZone.trap || []); zone.cards = tmp; // 设置 card.zone oldZone.cards.forEach(function (card) { diff --git a/Zone.js b/Zone.js index 95ed54e..b22e29c 100644 --- a/Zone.js +++ b/Zone.js @@ -59,6 +59,12 @@ Zone.prototype.getActualCards = function () { },this); }; +Zone.prototype.getNonTrapCards = function() { + return this.cards.filter(function (card) { + return (card !== this.trap); + },this); +}; + Zone.prototype.getSigni = function() { return this.player.signis.filter(function (signi) { return signi.zone === this;