From 91a7bb960d4a56160b99e0e8539e21c4207563b9 Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Sun, 14 May 2017 21:20:03 +0800 Subject: [PATCH] fix WX12-017 resona condition --- CardInfo.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CardInfo.js b/CardInfo.js index 8cabeb5..f9a1912 100644 --- a/CardInfo.js +++ b/CardInfo.js @@ -83299,6 +83299,26 @@ var CardInfo = { return signi.canTrashAsCost() && !signi.resona && (signi.color === 'black') && signi.hasClass('電機'); },this); if (!cards_A.length || !cards_B.length) return null; + + // 界限判断 + var canSummonWithout = function (signis) { + var cards = this.player.signis.filter(function (signi) { + return !inArr(signi,signis); + },this); + return this.canSummonWith(cards); + }.bind(this); + // 保证 A 只有 1 个,B 有 1 或 2 个。 + if (cards_A.length > cards_B.length) { + var tmp = cards_A; + cards_A = cards_B; + cards_B = tmp; + } + // 排除不满足界限的组合 + cards_B = cards_B.filter(function (card) { + return canSummonWithout([cards_A[0], card]); + },this); + if (!cards_B.length) return null; + return function () { var cards = []; return this.player.selectAsyn('TRASH',cards_A).callback(this,function (card) {