add shadow

This commit is contained in:
WEBXOSS 2017-05-06 15:51:12 +08:00
parent 97d6778f2d
commit 65e3293833
3 changed files with 10 additions and 2 deletions

View file

@ -104,6 +104,7 @@ function Card (game,player,zone,pid,side) {
this.acce = !!info.acce;
this.acceingCard = null;
this.trap = info.trap || null;
this.shadow = false;
// 杂项
this.effectFilters = [];

View file

@ -109462,7 +109462,6 @@ var CardInfo = {
destroyTimming: this.game.phase.onTurnEnd,
action: function (set,add) {
this.player.signis.forEach(function (signi) {
// TODO...
set(signi,'shadow',true);
});
}

View file

@ -1920,7 +1920,15 @@ Player.prototype.selectSomeTargetsAsyn = function (cards,min,max,careOrder) {
};
Player.prototype.selectSomeAsyn = function (label,items,min,max,careOrder,extraCards) {
items = items.slice();
// 过滤 shadow 目标
items = items.filter(item => {
if (item.shadow) {
if ((item.player !== this) || (this.game.getEffectSource().player !== this)) {
return false;
}
}
return true;
});
if (!(min >= 0)) min = 0;
if (max === undefined || max < 0) {
max = items.length;