forked from mirrors/webxoss-core
💫 implement WX16-047 mustAttack
This commit is contained in:
parent
fab86e97b4
commit
bfb92d8871
3 changed files with 6 additions and 7 deletions
1
Card.js
1
Card.js
|
@ -140,6 +140,7 @@ function Card (game,player,zone,pid,side) {
|
||||||
|
|
||||||
// 附加的属性
|
// 附加的属性
|
||||||
this.canNotAttack = false;
|
this.canNotAttack = false;
|
||||||
|
this.mustAttack = false;
|
||||||
this.lancer = false;
|
this.lancer = false;
|
||||||
this.doubleCrash = false;
|
this.doubleCrash = false;
|
||||||
this.tripleCrash = false;
|
this.tripleCrash = false;
|
||||||
|
|
|
@ -119117,7 +119117,6 @@ var CardInfo = {
|
||||||
actionAsyn: function () {
|
actionAsyn: function () {
|
||||||
this.game.frame(this,function () {
|
this.game.frame(this,function () {
|
||||||
this.player.opponent.getInfectedCards().forEach(function (card) {
|
this.player.opponent.getInfectedCards().forEach(function (card) {
|
||||||
// TODO: ...
|
|
||||||
this.game.tillTurnEndSet(this,card,'mustAttack',true);
|
this.game.tillTurnEndSet(this,card,'mustAttack',true);
|
||||||
},this);
|
},this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1044,12 +1044,11 @@ Player.prototype.signiAttackAsyn = function () {
|
||||||
|
|
||||||
// 玩家结束SIGNI攻击步骤
|
// 玩家结束SIGNI攻击步骤
|
||||||
Player.prototype.endSigniAttackStepAsyn = function () {
|
Player.prototype.endSigniAttackStepAsyn = function () {
|
||||||
if (this.forceSigniAttack) {
|
// 必须进行攻击的卡
|
||||||
var cards = this.signis.filter(function (card) {
|
var cards = this.signis.filter(function (card) {
|
||||||
return card.canAttack() && !card.attackCostColorless;
|
return (this.forceSigniAttack || card.mustAttack) && card.canAttack() && !card.attackCostColorless;
|
||||||
});
|
});
|
||||||
if (cards.length) return Callback.never();
|
if (cards.length) return Callback.never();
|
||||||
}
|
|
||||||
return this.selectAsyn('END_SIGNI_ATTACK_STEP');
|
return this.selectAsyn('END_SIGNI_ATTACK_STEP');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue