1
0
Fork 0

Fix PR-307 not ignore timming

This commit is contained in:
WEBXOSS 2016-12-11 13:37:58 +08:00
parent 99bfbf378e
commit bfea0cfca5
2 changed files with 12 additions and 7 deletions

View file

@ -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) {

View file

@ -799,6 +799,7 @@ 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.ignoreTimming) {
if (arg.spellCutIn) {
if (!effect.spellCutIn) return false;
} else {
@ -808,6 +809,7 @@ Player.prototype.canUseActionEffect = function (effect,arg) {
if (effect.attackPhase && !effect.mainPhase) return false;
}
}
}
// onAttack
if (arg.onAttack && !effect.onAttack) return false;
if (!arg.onAttack && effect.onAttack) return false;