From bfb92d8871545af99a097d2694a9575d84b28135 Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Thu, 8 Jun 2017 01:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20implement=20WX16-047=20mustAttac?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Card.js | 1 + CardInfo.js | 1 - Player.js | 11 +++++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Card.js b/Card.js index a5dd879..d355b96 100644 --- a/Card.js +++ b/Card.js @@ -140,6 +140,7 @@ function Card (game,player,zone,pid,side) { // 附加的属性 this.canNotAttack = false; + this.mustAttack = false; this.lancer = false; this.doubleCrash = false; this.tripleCrash = false; diff --git a/CardInfo.js b/CardInfo.js index 84e4996..9f79c82 100644 --- a/CardInfo.js +++ b/CardInfo.js @@ -119117,7 +119117,6 @@ var CardInfo = { actionAsyn: function () { this.game.frame(this,function () { this.player.opponent.getInfectedCards().forEach(function (card) { - // TODO: ... this.game.tillTurnEndSet(this,card,'mustAttack',true); },this); }); diff --git a/Player.js b/Player.js index 5d84260..3e5c1cd 100644 --- a/Player.js +++ b/Player.js @@ -1044,12 +1044,11 @@ Player.prototype.signiAttackAsyn = function () { // 玩家结束SIGNI攻击步骤 Player.prototype.endSigniAttackStepAsyn = function () { - if (this.forceSigniAttack) { - var cards = this.signis.filter(function (card) { - return card.canAttack() && !card.attackCostColorless; - }); - if (cards.length) return Callback.never(); - } + // 必须进行攻击的卡 + var cards = this.signis.filter(function (card) { + return (this.forceSigniAttack || card.mustAttack) && card.canAttack() && !card.attackCostColorless; + }); + if (cards.length) return Callback.never(); return this.selectAsyn('END_SIGNI_ATTACK_STEP'); };