forked from mirrors/webxoss-core
Trash charms and other cards below a SIGNI in block end.
See http://www.takaratomy.co.jp/products/wixoss/rule/rule_rulechange/151211/index.html for details.
This commit is contained in:
parent
8316eb843f
commit
b37debbd0c
2 changed files with 17 additions and 5 deletions
15
Card.js
15
Card.js
|
@ -831,11 +831,16 @@ Card.prototype.moveTo = function (zone,arg) {
|
|||
// card.player.onSignisChange.trigger();
|
||||
card.onLeaveField.trigger(leaveFieldEvent);
|
||||
card.player.onSigniLeaveField.trigger(leaveFieldEvent);
|
||||
// SIGNI 离场时,下面的卡送入废弃区
|
||||
if (leaveFieldEvent.oldZone.cards.length) {
|
||||
if (charm) charm.trash({isCharm: true});
|
||||
this.game.trashCards(leaveFieldEvent.oldZone.cards);
|
||||
}
|
||||
// SIGNI 离场时,下面的卡送入废弃区,
|
||||
// 此处理在块结束时执行。
|
||||
// http://www.takaratomy.co.jp/products/wixoss/rule/rule_rulechange/151211/index.html
|
||||
leaveFieldEvent.oldZone.cards.forEach(function (card) {
|
||||
if (card === charm) {
|
||||
card.game.trashingCharms.push(card);
|
||||
} else {
|
||||
card.game.trashingCards.push(card);
|
||||
}
|
||||
},this);
|
||||
} else if (lrigChangeEvent) {
|
||||
// card.player.onLrigChange.trigger(lrigChangeEvent);
|
||||
var oldLrig = lrigChangeEvent.oldLrig;
|
||||
|
|
7
Game.js
7
Game.js
|
@ -22,6 +22,8 @@ function Game (cfg) {
|
|||
this.hostMsgObjs = [];
|
||||
this.guestMsgObjs = [];
|
||||
this.dataObj = {}; // 储存游戏对象(card,player 等)绑定的数据,回合结束时清空
|
||||
this.trashingCards = [];
|
||||
this.trashingCharms = [];
|
||||
|
||||
// 注册
|
||||
this.register(this);
|
||||
|
@ -905,6 +907,11 @@ Game.prototype.handleBlockEndAsyn = function () {
|
|||
this.frameEnd();
|
||||
return this.banishNonPositiveAsyn();
|
||||
}).callback(this,function () {
|
||||
// 废弃【魅饰】和SIGNI下方的卡
|
||||
this.trashCards(this.trashingCharms,{ isCharm: true });
|
||||
this.trashCards(this.trashingCards);
|
||||
this.trashingCharms.length = 0;
|
||||
this.trashingCards.length = 0;
|
||||
return this.rebuildAsyn();
|
||||
}).callback(this,function () {
|
||||
return this.effectManager.handleEffectsAsyn();
|
||||
|
|
Loading…
Reference in a new issue