mirror of
https://github.com/webxoss/webxoss-core.git
synced 2024-11-20 06:49:53 +01:00
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.acceingCard = null;
|
||||
this.trap = info.trap || null;
|
||||
this.shadow = false;
|
||||
|
||||
// 杂项
|
||||
this.effectFilters = [];
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
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) {
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue