mirror of
https://github.com/webxoss/webxoss-core.git
synced 2024-11-20 06:49:53 +01:00
implement onRised timing
This commit is contained in:
parent
a8131ba290
commit
75939a5dc8
1 changed files with 7 additions and 0 deletions
7
Card.js
7
Card.js
|
@ -124,6 +124,7 @@ function Card (game,player,zone,pid,side) {
|
|||
this.onHeaven = new Timming(game);
|
||||
this.onFreeze = new Timming(game);
|
||||
this.onChangeSigniZone = new Timming(game);
|
||||
this.onRised = new Timming(game);
|
||||
|
||||
// 附加的属性
|
||||
this.canNotAttack = false;
|
||||
|
@ -781,6 +782,7 @@ Card.prototype.moveTo = function (zone,arg) {
|
|||
isSigni: inArr(card,card.player.signis),
|
||||
isCharm: arg.isCharm || false,
|
||||
isCrossed: !!card.crossed,
|
||||
riseTarget: null,
|
||||
isUp: arg.up,
|
||||
oldZone: card.zone,
|
||||
newZone: zone,
|
||||
|
@ -842,6 +844,7 @@ Card.prototype.moveTo = function (zone,arg) {
|
|||
// 出场
|
||||
arg.bottom = false;
|
||||
enterFieldEvent = moveEvent;
|
||||
enterFieldEvent.riseTarget = signi;
|
||||
card.player.signis.push(card);
|
||||
} else {
|
||||
// 放置到 SIGNI 下面的卡
|
||||
|
@ -945,6 +948,10 @@ Card.prototype.moveTo = function (zone,arg) {
|
|||
if (!(arg.dontTriggerStartUp || card.player.signiStartUpBanned)) {
|
||||
card.onStartUp.trigger(enterFieldEvent);
|
||||
}
|
||||
// rise
|
||||
if (enterFieldEvent.riseTarget) {
|
||||
enterFieldEvent.riseTarget.onRised.trigger(enterFieldEvent);
|
||||
}
|
||||
} else if (leaveFieldEvent) {
|
||||
// card.player.onSignisChange.trigger();
|
||||
card.onLeaveField.trigger(leaveFieldEvent);
|
||||
|
|
Loading…
Reference in a new issue