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) {
|
||||
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) {
|
||||
|
|
14
Player.js
14
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
|
||||
|
|
Loading…
Reference in a new issue