1
0
Fork 0

Fix WX13 Hanare cards

Player.pickCardAsyn()

WX13-058
  Action
WX13-036
  Const, Action
This commit is contained in:
WEBXOSS 2016-10-29 21:36:54 +08:00
parent d581762cb3
commit f5232adf7e
2 changed files with 14 additions and 12 deletions

View file

@ -110464,14 +110464,15 @@ var CardInfo = {
source: this, source: this,
description: '1807-const-0', description: '1807-const-0',
triggerCondition: function (event) { triggerCondition: function (event) {
return (event.power < event.oldPower); if (event.oldPower <= event.power) return false;
var source = this.game.getEffectSource();
if (!source) return false;
if (source.player !== this.player) return false;
return true;
}, },
actionAsyn: function (event) { actionAsyn: function (event) {
var value = event.power - event.oldPower; var value = event.oldPower - event.power;
return this.player.selectOptionalAsyn('LAUNCH',[this]).callback(this,function (card) {
if (!card) return;
this.game.tillTurnEndAdd(this,this,'power',value); this.game.tillTurnEndAdd(this,this,'power',value);
});
} }
}); });
this.player.opponent.signis.forEach(function (signi) { this.player.opponent.signis.forEach(function (signi) {
@ -110523,9 +110524,9 @@ var CardInfo = {
actionAsyn: function () { actionAsyn: function () {
return this.player.opponent.discardAsyn(1).callback(this,function () { return this.player.opponent.discardAsyn(1).callback(this,function () {
var cards = this.player.opponent.signis; var cards = this.player.opponent.signis;
return this.player.opponent.selectAsyn('BANISH',cards).callback(this,function (card) { return this.player.opponent.selectAsyn('TRASH',cards).callback(this,function (card) {
if (!card) return; if (!card) return;
return card.banishAsyn(); return card.trashAsyn();
}); });
}); });
} }
@ -112053,7 +112054,7 @@ var CardInfo = {
if (flag) { if (flag) {
this.game.frameStart(); this.game.frameStart();
cards.forEach(function (card) { cards.forEach(function (card) {
this.game.tillTurnEndAdd(card,'power',value); this.game.tillTurnEndAdd(this,card,'power',value);
},this); },this);
this.game.frameEnd(); this.game.frameEnd();
return; return;

View file

@ -1985,10 +1985,11 @@ Player.prototype.pickCardAsyn = function (filter,min,max,zone) {
if (!zone) zone = this.trashZone; if (!zone) zone = this.trashZone;
var cards = filter? zone.cards.filter(filter) : zone.cards; var cards = filter? zone.cards.filter(filter) : zone.cards;
return this.selectSomeAsyn('ADD_TO_HAND',cards,min,max).callback(this,function (cards) { return this.selectSomeAsyn('ADD_TO_HAND',cards,min,max).callback(this,function (cards) {
return this.opponent.showCardsAsyn(cards).callback(this,function () { if (!cards.length) return;
return this.opponent.showCardsAsyn(cards);
}).callback(this,function () {
this.game.moveCards(cards,this.handZone); this.game.moveCards(cards,this.handZone);
}); });
});
}; };
Player.prototype.rearrangeOpponentSignisAsyn = function () { Player.prototype.rearrangeOpponentSignisAsyn = function () {