diff --git a/Card.js b/Card.js index 9e36c61..77e0422 100644 --- a/Card.js +++ b/Card.js @@ -202,15 +202,42 @@ var mixins = { return signi.canBeAcced(); },this); }, - actionAsyn: function () { - var signis = this.player.signis.filter(function (signi) { + costChange: function () { + var obj = Object.create(this); + obj.costChange = null; + var flag = this.player.signis.some(function (signi) { + return signi.canBeAcced() && signi._2313; + },this); + if (flag) { + obj.costGreen -= 1; + if (obj.costGreen < 0) obj.costGreen = 0; + } + return obj; + }, + costChangeAsyn: function () { + var cost = Object.create(this); + cost.costChange = null; + var reducedCost = Object.create(this); + reducedCost.costGreen -= 1; + if (reducedCost.costGreen < 0) reducedCost.costGreen = 0; + + var cards = this.player.signis.filter(function (signi) { return signi.canBeAcced(); },this); - return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { - if (!signi) return; - this.acceTo(signi); + if (!this.player.enoughCost(cost)) { + cards = cards.filter(function (signi) { + return signi._2313; + },this); + } + return this.player.selectTargetAsyn(cards).callback(this,function (card) { + this._data = card; + return (card && card._2313) ? reducedCost : cost; }); }, + actionAsyn: function () { + if (!this._data) return; + this.acceTo(this._data); + }, }, }; Card.prototype.cookEffect = function (rawEffect,type,offset) { diff --git a/CardInfo.js b/CardInfo.js index 2962319..211d391 100644 --- a/CardInfo.js +++ b/CardInfo.js @@ -119040,7 +119040,6 @@ var CardInfo = { ], constEffects: [{ action: function (set,add) { - // TODO: ... set(this,'_2313',true); }, },{