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.onHeaven = new Timming(game);
|
||||||
this.onFreeze = new Timming(game);
|
this.onFreeze = new Timming(game);
|
||||||
this.onChangeSigniZone = new Timming(game);
|
this.onChangeSigniZone = new Timming(game);
|
||||||
|
this.onRised = new Timming(game);
|
||||||
|
|
||||||
// 附加的属性
|
// 附加的属性
|
||||||
this.canNotAttack = false;
|
this.canNotAttack = false;
|
||||||
|
@ -781,6 +782,7 @@ Card.prototype.moveTo = function (zone,arg) {
|
||||||
isSigni: inArr(card,card.player.signis),
|
isSigni: inArr(card,card.player.signis),
|
||||||
isCharm: arg.isCharm || false,
|
isCharm: arg.isCharm || false,
|
||||||
isCrossed: !!card.crossed,
|
isCrossed: !!card.crossed,
|
||||||
|
riseTarget: null,
|
||||||
isUp: arg.up,
|
isUp: arg.up,
|
||||||
oldZone: card.zone,
|
oldZone: card.zone,
|
||||||
newZone: zone,
|
newZone: zone,
|
||||||
|
@ -842,6 +844,7 @@ Card.prototype.moveTo = function (zone,arg) {
|
||||||
// 出场
|
// 出场
|
||||||
arg.bottom = false;
|
arg.bottom = false;
|
||||||
enterFieldEvent = moveEvent;
|
enterFieldEvent = moveEvent;
|
||||||
|
enterFieldEvent.riseTarget = signi;
|
||||||
card.player.signis.push(card);
|
card.player.signis.push(card);
|
||||||
} else {
|
} else {
|
||||||
// 放置到 SIGNI 下面的卡
|
// 放置到 SIGNI 下面的卡
|
||||||
|
@ -945,6 +948,10 @@ Card.prototype.moveTo = function (zone,arg) {
|
||||||
if (!(arg.dontTriggerStartUp || card.player.signiStartUpBanned)) {
|
if (!(arg.dontTriggerStartUp || card.player.signiStartUpBanned)) {
|
||||||
card.onStartUp.trigger(enterFieldEvent);
|
card.onStartUp.trigger(enterFieldEvent);
|
||||||
}
|
}
|
||||||
|
// rise
|
||||||
|
if (enterFieldEvent.riseTarget) {
|
||||||
|
enterFieldEvent.riseTarget.onRised.trigger(enterFieldEvent);
|
||||||
|
}
|
||||||
} else if (leaveFieldEvent) {
|
} else if (leaveFieldEvent) {
|
||||||
// card.player.onSignisChange.trigger();
|
// card.player.onSignisChange.trigger();
|
||||||
card.onLeaveField.trigger(leaveFieldEvent);
|
card.onLeaveField.trigger(leaveFieldEvent);
|
||||||
|
|
Loading…
Reference in a new issue