forked from mirrors/webxoss-core
🐛 fix WX16-027 summon (add afterSummonAsyn)
This commit is contained in:
parent
cd2086130f
commit
f68afdb542
2 changed files with 13 additions and 3 deletions
11
Card.js
11
Card.js
|
@ -1132,7 +1132,7 @@ Card.prototype.moveTo = function (zone,arg) {
|
||||||
}
|
}
|
||||||
card.game.frameEnd();
|
card.game.frameEnd();
|
||||||
|
|
||||||
return true;
|
return moveEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
Card.prototype.changeSigniZone = function (zone) {
|
Card.prototype.changeSigniZone = function (zone) {
|
||||||
|
@ -1585,10 +1585,15 @@ Card.prototype.handleSummonAsyn = function(zone,arg) {
|
||||||
return this.game.blockAsyn(this,function () {
|
return this.game.blockAsyn(this,function () {
|
||||||
return this.beforeSummonAsyn(zone);
|
return this.beforeSummonAsyn(zone);
|
||||||
});
|
});
|
||||||
}).callback(this,function () {
|
}).callback(this,function (afterSummonAsyn) {
|
||||||
arg = Object.create(arg);
|
arg = Object.create(arg);
|
||||||
arg.isSummon = true;
|
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(); // 增加一个空帧,以进行两次常计算
|
this.game.handleFrameEnd(); // 增加一个空帧,以进行两次常计算
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -118010,6 +118010,11 @@ var CardInfo = {
|
||||||
},this);
|
},this);
|
||||||
cards.push(target);
|
cards.push(target);
|
||||||
this.game.moveCards(cards,card.zone);
|
this.game.moveCards(cards,card.zone);
|
||||||
|
return function afterSummonAsyn (event) {
|
||||||
|
return this.game.blockAsyn(this,function () {
|
||||||
|
target.onRised.trigger(event);
|
||||||
|
});
|
||||||
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// ======================
|
// ======================
|
||||||
|
|
Loading…
Reference in a new issue