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,
description: '1807-const-0',
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) {
var value = event.power - event.oldPower;
return this.player.selectOptionalAsyn('LAUNCH',[this]).callback(this,function (card) {
if (!card) return;
this.game.tillTurnEndAdd(this,this,'power',value);
});
var value = event.oldPower - event.power;
this.game.tillTurnEndAdd(this,this,'power',value);
}
});
this.player.opponent.signis.forEach(function (signi) {
@ -110523,9 +110524,9 @@ var CardInfo = {
actionAsyn: function () {
return this.player.opponent.discardAsyn(1).callback(this,function () {
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;
return card.banishAsyn();
return card.trashAsyn();
});
});
}
@ -112053,7 +112054,7 @@ var CardInfo = {
if (flag) {
this.game.frameStart();
cards.forEach(function (card) {
this.game.tillTurnEndAdd(card,'power',value);
this.game.tillTurnEndAdd(this,card,'power',value);
},this);
this.game.frameEnd();
return;

View file

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