From bfea0cfca53f0437cdc88dea2fbeac56524bce1a Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Sun, 11 Dec 2016 13:37:58 +0800 Subject: [PATCH] Fix PR-307 not ignore timming --- CardInfo.js | 5 ++++- Player.js | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CardInfo.js b/CardInfo.js index 661beca..4df5d58 100644 --- a/CardInfo.js +++ b/CardInfo.js @@ -121856,7 +121856,10 @@ var CardInfo = { var effects = this.player.lrig.actionEffects.filter(function (effect) { if (effect.costExceed <= 0) return; if (effect.costExceed > 3) return; - return (this.player.canUseActionEffect(effect,{ignoreExceedCost: true})); + return (this.player.canUseActionEffect(effect,{ + ignoreExceedCost: true, + ignoreTimming: true, + })); },this); if (!effects.length) return; return this.player.selectAsyn('USE_ACTION_EFFECT',effects).callback(this,function (effect) { diff --git a/Player.js b/Player.js index b5f4f90..2430e08 100644 --- a/Player.js +++ b/Player.js @@ -799,13 +799,15 @@ Player.prototype.canUseActionEffect = function (effect,arg) { if (effect.source.zone === this.trashZone && !effect.activatedInTrashZone) return false; if (effect.source.zone !== this.handZone && effect.activatedInHand) return false; // attackPhase && spellCutIn - if (arg.spellCutIn) { - if (!effect.spellCutIn) return false; - } else { - if (this.game.phase.isAttackPhase()) { - if (!effect.attackPhase) return false; + if (!arg.ignoreTimming) { + if (arg.spellCutIn) { + if (!effect.spellCutIn) return false; } else { - if (effect.attackPhase && !effect.mainPhase) return false; + if (this.game.phase.isAttackPhase()) { + if (!effect.attackPhase) return false; + } else { + if (effect.attackPhase && !effect.mainPhase) return false; + } } } // onAttack