forked from mirrors/webxoss-core
Fix PR-307 not ignore timming
This commit is contained in:
parent
99bfbf378e
commit
bfea0cfca5
2 changed files with 12 additions and 7 deletions
|
@ -121856,7 +121856,10 @@ var CardInfo = {
|
||||||
var effects = this.player.lrig.actionEffects.filter(function (effect) {
|
var effects = this.player.lrig.actionEffects.filter(function (effect) {
|
||||||
if (effect.costExceed <= 0) return;
|
if (effect.costExceed <= 0) return;
|
||||||
if (effect.costExceed > 3) return;
|
if (effect.costExceed > 3) return;
|
||||||
return (this.player.canUseActionEffect(effect,{ignoreExceedCost: true}));
|
return (this.player.canUseActionEffect(effect,{
|
||||||
|
ignoreExceedCost: true,
|
||||||
|
ignoreTimming: true,
|
||||||
|
}));
|
||||||
},this);
|
},this);
|
||||||
if (!effects.length) return;
|
if (!effects.length) return;
|
||||||
return this.player.selectAsyn('USE_ACTION_EFFECT',effects).callback(this,function (effect) {
|
return this.player.selectAsyn('USE_ACTION_EFFECT',effects).callback(this,function (effect) {
|
||||||
|
|
|
@ -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.trashZone && !effect.activatedInTrashZone) return false;
|
||||||
if (effect.source.zone !== this.handZone && effect.activatedInHand) return false;
|
if (effect.source.zone !== this.handZone && effect.activatedInHand) return false;
|
||||||
// attackPhase && spellCutIn
|
// attackPhase && spellCutIn
|
||||||
|
if (!arg.ignoreTimming) {
|
||||||
if (arg.spellCutIn) {
|
if (arg.spellCutIn) {
|
||||||
if (!effect.spellCutIn) return false;
|
if (!effect.spellCutIn) return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -808,6 +809,7 @@ Player.prototype.canUseActionEffect = function (effect,arg) {
|
||||||
if (effect.attackPhase && !effect.mainPhase) return false;
|
if (effect.attackPhase && !effect.mainPhase) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// onAttack
|
// onAttack
|
||||||
if (arg.onAttack && !effect.onAttack) return false;
|
if (arg.onAttack && !effect.onAttack) return false;
|
||||||
if (!arg.onAttack && effect.onAttack) return false;
|
if (!arg.onAttack && effect.onAttack) return false;
|
||||||
|
|
Loading…
Reference in a new issue