From 6a9947c43b375f345b642baf0b8b869925baf69e Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Fri, 17 Feb 2017 22:54:30 +0800 Subject: [PATCH] review WD18 --- CardInfo.js | 215 ++++++++++++++++++---------------------------------- 1 file changed, 75 insertions(+), 140 deletions(-) diff --git a/CardInfo.js b/CardInfo.js index 6d96d35..c47fd72 100644 --- a/CardInfo.js +++ b/CardInfo.js @@ -125599,11 +125599,10 @@ var CardInfo = { costCoin: 1, actionAsyn: function () { var filter = function (card) { - return card.isAccessor; + return card.accessory; }; return this.player.searchAsyn(filter,2).callback(this,function (cards) { this.game.moveCards(cards,this.player.enerZone); - this.player.shuffle(); }); } }], @@ -125614,14 +125613,21 @@ var CardInfo = { "【起】それぞれレベルの異なる<調理>のシグニ4枚をあなたのエナゾーンからトラッシュに置く:あなたのデッキの一番上のカードをライフクロスに加える。この能力は1ターンに一度しか使用できない。" ], actionEffectTexts_zh_CN: [ - "【起】:将4张不同等级的<料理>SIGNI从能量区放置到废弃区,将我方卡组顶1张卡加入生命护甲。将这个能力一回合只能使用一次。" + "【起】将4张不同等级的<料理>SIGNI从能量区放置到废弃区:将我方卡组顶1张卡加入生命护甲。将这个能力一回合只能使用一次。" ], actionEffectTexts_en: [ "[Action] Put 4 SIGNI with different levels from your Ener Zone into the trash: Add the top card of your deck to Life Cloth. This ability can only be used once per turn." ], actionEffects: [{ + once: true, costCondition: function () { - return (this.player.enerZone.length >= 4); + var levels = []; + this.player.enerZone.cards.forEach(function (card) { + if (!card.hasClass('調理')) return; + if (inArr(card.level,levels)) return; + levels.push(card.level); + },this); + return (levels.length >= 4); }, costAsyn: function () { var signis = []; @@ -125629,16 +125635,17 @@ var CardInfo = { return Callback.loop(this,4,function () { if (done) return; var cards = this.player.enerZone.cards.filter(function (card) { - return (card.type === 'SIGNI') && (card.hasClass('調理') && signis.every(function (signi) { - return signi.level !== card.level; - }); + if (!card.hasClass('調理')) return false; + return signis.every(function (signi) { + return card.level !== signi.level; + },this); },this); - return this.player.selectSomeAsyn('SEEK',cards,0,1,false,this.player.enerZone.cards).callback(this,function (cards) { - if (!cards.length) { + return this.player.selectAsyn('TARGET',cards).callback(this,function (card) { + if (!card) { done = true; return; } - signis.push(cards[0]); + signis.push(card); }); }).callback(this,function () { this.game.trashCards(signis); @@ -125693,7 +125700,7 @@ var CardInfo = { "【出】【绿绿】:获得《COIN》《COIN》。" ], startUpEffectTexts_en: [ - "[On-Play] Green Green: Gain 2 Coins." + "[On-Play] [Green] [Green]: Gain 2 Coins." ], startUpEffects: [{ costGreen: 2, @@ -125744,7 +125751,7 @@ var CardInfo = { "【出】:获得《COIN》。" ], startUpEffectTexts_en: [ - "[On-Play] Gain 1 Coin." + "[On-Play]: Gain 1 Coin." ], startUpEffects: [{ actionAsyn: function () { @@ -125961,21 +125968,17 @@ var CardInfo = { ], bet: 2, artsEffect: { - actionAsyn: function () { - var cards = this.player.enerZone.cards.filter(function(card){ - return card.hasColor('green') - }); - return this.player.selectSomeAsyn('ADD_TO_HAND',cards,0,3).callback(this,function (cards) { - return this.player.opponent.showCardsAsyn(cards).callback(this,function () { - this.game.moveCards(cards,this.player.handZone); - }); - }); - if (this.player.betted) { + actionAsyn: function (costArg) { + var filter = function (card) { + return card.hasColor('green'); + }; + return this.player.pickCardAsyn(filter,0,3,this.player.enerZone).callback(this,function () { + if (!costArg.bet) return; var done = false; return Callback.loop(this,3,function () { if (done) return; var cards = this.player.handZone.cards.filter(function (card) { - return card.hasColor('green') && (card.type === 'SIGNI') && card.canSummon(); + return card.hasColor('green') && card.canSummon(); },this); return this.player.selectOptionalAsyn('SUMMON_SIGNI',cards).callback(this,function (card) { if (!card) { @@ -125985,7 +125988,7 @@ var CardInfo = { return card.summonAsyn(); }); }); - } + }); } } }, @@ -126037,24 +126040,18 @@ var CardInfo = { ], bet: 1, artsEffect: { - actionAsyn: function () { - var cards = this.player.enerZone.cards.filter(function(card){ - return (cards.hasColor('green')) - }); - return this.player.selectSomeAsyn('ADD_TO_HAND',cards,0,3).callback(this,function (cards) { - return this.player.opponent.showCardsAsyn(cards).callback(this,function () { - this.game.moveCards(cards,this.player.handZone); - }); - }); - if (this.player.betted) { - var signis = this.player.signis; - return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { + actionAsyn: function (costArg) { + this.player.signis.forEach(function (signi) { + this.game.tillTurnEndAdd(this,signi,'power',2000); + },this); + + if (this.game.turnPlayer !== this.player.opponent) return; + if (costArg.bet) { + return this.player.selectSelfSigniAsyn().callback(this,function (signi) { if (!signi) return; - if (this.game.turnPlayer !== this.player.opponent) return; - var filter = function (card) { + this.game.tillTurnEndAdd(this,card,'effectFilters',function (card) { return (card.player === this.player) || (card.type !== 'ARTS'); - }; - this.game.tillTurnEndAdd(card,card,'effectFilters',filter); + }); }); } } @@ -126106,10 +126103,11 @@ var CardInfo = { "[Constant]: As long as this SIGNI is accessorized, this SIGNI gets +3000 power." ], constEffects: [{ + condition: function () { + return this.accessorized; + }, action: function (set,add) { - if (this.accessorized) { - add(this,'power',3000); - } + add(this,'power',3000); } }], // ====================== @@ -126126,15 +126124,17 @@ var CardInfo = { ], constEffects: [{ auto: 'onBanished', - actionAsyn: function (event) { + condition: function () { + return this.accessorized; + }, + actionAsyn: function () { var cards = this.player.trashZone.filter(function (card) { - return card.isAccessory + return card.accessory; + }); + return this.player.selectOptionalAsyn('TARGET',cards).callback(this,function (card) { + if (!card) return; + card.moveTo(this.player.enerZone); }); - if (this.accessorized) { - return this.player.selectOptionalAsyn('TARGET',cards).callback(this,function (card) { - if (!card) return; - card.moveTo(this.player.enerZone); - } }, }], // ====================== @@ -126151,23 +126151,19 @@ var CardInfo = { ], burstEffect: { actionAsyn: function () { - var cards = this.player.mainDeck.filter(function (card) { - return card.Accessor - }) - var target; - this.player.searchAsyn(filter,1,1).callback(this,function (card) { + var filter = function (card) { + return card.accessory; + }; + this.player.searchAsyn(filter,1).callback(this,function (card) { if (!card) return; + card.moveTo(this.player.enerZone); this.game.moveCards(card,this.player.enerZone); - target = card; - }); - if (!target) return; - var signis = this.player.opponent.signis.filter(function (signi) { - return !signi.accessorized; - },this); - return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { - if (!signi) return; - target.accessorizeTo(signi); - this.player.shuffle(); + + var signis = this.player.signis; + return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { + if (!signi) return; + card.accessorizeTo(signi); + }); }); }, } @@ -126241,10 +126237,6 @@ var CardInfo = { "costGreen": 0, "costColorless": 0, "guardFlag": false, - cardSkills: [ - "【常】:このシグニがアクセされているかぎり、このシグニは【ランサー】を得る。", - "(【ランサー】を持つシグニがバトルで対戦相手のシグニをバニッシュした場合、それは対戦相手のライフクロス1枚をクラッシュする)" - ], "multiEner": false, cardText: "突き刺すような辛さ!~カレー~", cardText_zh_CN: "", @@ -126351,23 +126343,16 @@ var CardInfo = { ], actionEffects: [{ costGreen: 1, - actionEffects: [{ - mainPhase: true, - attackPhase: true, - activatedInHand: true, - costCondition: function () { - return this.zone === this.player.enerZone; - }, - actionAsyn: function () { - var signis = this.player.opponent.signis.filter(function (signi) { - return !signi.accessorized; - },this); - return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { - if (!signi) return; - this.accessorizeTo(signi); - }); - } - }], + activatedInEnerZone: true, + actionAsyn: function () { + var signis = this.player.signis.filter(function (signi) { + return !signi.accessorized; + },this); + return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { + if (!signi) return; + this.accessorizeTo(signi); + }); + } }], // ====================== // 常时效果 @@ -126383,7 +126368,7 @@ var CardInfo = { ], constEffects: [{ action: function (set,add) { - if (this.accessorizeCard.hasClass('調理')) { + if (this.accessorizeCard && this.accessorizeCard.hasClass('調理')) { add(this.accessorizeCard,'power',5000); } } @@ -126486,14 +126471,9 @@ var CardInfo = { "[Action] [Green 0] Put this card from your Ener Zone under 1 of your SIGNI as an [Accessory]." ], actionEffects: [{ - mainPhase: true, - attackPhase: true, activatedInEnerZone: true, - costCondition: function () { - return this.zone === this.player.enerZone; - }, actionAsyn: function () { - var signis = this.player.opponent.signis.filter(function (signi) { + var signis = this.player.signis.filter(function (signi) { return !signi.accessorized; },this); return this.player.selectTargetOptionalAsyn(signis).callback(this,function (signi) { @@ -126567,31 +126547,10 @@ var CardInfo = { "costGreen": 0, "costColorless": 0, "guardFlag": true, - cardSkills: [ - "【ガード】(このカードを手札から捨てることで、ルリグのアタックを一度無効にする)", - "【常】:【マルチエナ】(エナコストを支払う際、このカードは好きな色1つとして支払える)" - ], "multiEner": false, cardText: "だけど、欠片はすべてでようやく一つ。", cardText_zh_CN: "", cardText_en: "", - // ====================== - // 迸发效果 - // ====================== - burstEffectTexts: [ - "【※】:カードを1枚引く。" - ], - burstEffectTexts_zh_CN: [ - "【※】:抽1张牌。" - ], - burstEffectTexts_en: [ - "【※】:Draw one card." - ], - burstEffect: { - actionAsyn: function () { - this.player.draw(1); - } - } }, "2034": { "pid": 2034, @@ -126621,31 +126580,10 @@ var CardInfo = { "costGreen": 0, "costColorless": 0, "guardFlag": true, - cardSkills: [ - "【ガード】(このカードを手札から捨てることで、ルリグのアタックを一度無効にする)", - "【常】:【マルチエナ】(エナコストを支払う際、このカードは好きな色1つとして支払える)" - ], "multiEner": false, cardText: "喪っては戻らない。", cardText_zh_CN: "", cardText_en: "", - // ====================== - // 迸发效果 - // ====================== - burstEffectTexts: [ - "【※】:カードを1枚引く。" - ], - burstEffectTexts_zh_CN: [ - "【※】:抽1张牌。" - ], - burstEffectTexts_en: [ - "【※】:Draw one card." - ], - burstEffect: { - actionAsyn: function () { - this.player.draw(1); - } - } }, "2035": { "pid": 2035, @@ -126711,12 +126649,9 @@ var CardInfo = { return card.banishAsyn().callback(this,function (succ) { if (!succ) return; var filter = function (card) { - return (card.hasClass('調理')); + return card.hasClass('調理'); }; - return this.player.searchAsyn(filter,1).callback(this,function (cards) { - this.game.moveCards(cards,this.player.enerZone); - this.player.shuffle(); - }); + return this.player.seekAsyn(filter,1); }); } },{