forked from mirrors/webxoss-core
add shadow
This commit is contained in:
parent
97d6778f2d
commit
65e3293833
3 changed files with 10 additions and 2 deletions
1
Card.js
1
Card.js
|
@ -104,6 +104,7 @@ function Card (game,player,zone,pid,side) {
|
||||||
this.acce = !!info.acce;
|
this.acce = !!info.acce;
|
||||||
this.acceingCard = null;
|
this.acceingCard = null;
|
||||||
this.trap = info.trap || null;
|
this.trap = info.trap || null;
|
||||||
|
this.shadow = false;
|
||||||
|
|
||||||
// 杂项
|
// 杂项
|
||||||
this.effectFilters = [];
|
this.effectFilters = [];
|
||||||
|
|
|
@ -109462,7 +109462,6 @@ var CardInfo = {
|
||||||
destroyTimming: this.game.phase.onTurnEnd,
|
destroyTimming: this.game.phase.onTurnEnd,
|
||||||
action: function (set,add) {
|
action: function (set,add) {
|
||||||
this.player.signis.forEach(function (signi) {
|
this.player.signis.forEach(function (signi) {
|
||||||
// TODO...
|
|
||||||
set(signi,'shadow',true);
|
set(signi,'shadow',true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
10
Player.js
10
Player.js
|
@ -1920,7 +1920,15 @@ Player.prototype.selectSomeTargetsAsyn = function (cards,min,max,careOrder) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Player.prototype.selectSomeAsyn = function (label,items,min,max,careOrder,extraCards) {
|
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 (!(min >= 0)) min = 0;
|
||||||
if (max === undefined || max < 0) {
|
if (max === undefined || max < 0) {
|
||||||
max = items.length;
|
max = items.length;
|
||||||
|
|
Loading…
Reference in a new issue