🐛 fix WX16-027 summon (add afterSummonAsyn)

This commit is contained in:
WEBXOSS 2017-08-13 19:38:59 +08:00
parent cd2086130f
commit f68afdb542
2 changed files with 13 additions and 3 deletions

11
Card.js
View file

@ -1132,7 +1132,7 @@ Card.prototype.moveTo = function (zone,arg) {
}
card.game.frameEnd();
return true;
return moveEvent;
};
Card.prototype.changeSigniZone = function (zone) {
@ -1585,10 +1585,15 @@ Card.prototype.handleSummonAsyn = function(zone,arg) {
return this.game.blockAsyn(this,function () {
return this.beforeSummonAsyn(zone);
});
}).callback(this,function () {
}).callback(this,function (afterSummonAsyn) {
arg = Object.create(arg);
arg.isSummon = true;
this.moveTo(zone,arg);
var event = this.moveTo(zone,arg);
if (isFunc(afterSummonAsyn)) {
return afterSummonAsyn.call(this,event).callback(this,function () {
this.game.handleFrameEnd(); // 增加一个空帧,以进行两次常计算
});
}
this.game.handleFrameEnd(); // 增加一个空帧,以进行两次常计算
});
};

View file

@ -118010,6 +118010,11 @@ var CardInfo = {
},this);
cards.push(target);
this.game.moveCards(cards,card.zone);
return function afterSummonAsyn (event) {
return this.game.blockAsyn(this,function () {
target.onRised.trigger(event);
});
};
});
},
// ======================