mirror of
https://github.com/webxoss/webxoss-core.git
synced 2025-01-31 01:39:09 +01:00
❌ stash
This commit is contained in:
parent
0e660f1a55
commit
2cc031f0a0
5 changed files with 914 additions and 288 deletions
13
Card.js
13
Card.js
|
@ -60,6 +60,7 @@ function Card (game,player,zone,pid,side) {
|
|||
this.artsEffects = this.cookEffect(info.artsEffect,'arts',1);
|
||||
this.encore = info.encore || null;
|
||||
this.chain = info.chain || null;
|
||||
this.beforeUseAsyn = info.beforeUseAsyn || null;
|
||||
// 生命迸发效果
|
||||
this.burstEffects = this.cookEffect(info.burstEffect,'burst');
|
||||
// 常时效果
|
||||
|
@ -841,6 +842,8 @@ Card.prototype.moveTo = function (zone,arg) {
|
|||
if (card === card.zone.trap) {
|
||||
card.zone.trap = null;
|
||||
}
|
||||
// 处理 acce
|
||||
card.acceingCard = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1687,4 +1690,14 @@ Card.prototype.handleTrapAsyn = function(event) {
|
|||
});
|
||||
};
|
||||
|
||||
Card.prototype.getBottomCards = function() {
|
||||
if (!inArr(this,this.player.signis)) return;
|
||||
return this.zone.cards.filter(function (card) {
|
||||
return (card !== this) &&
|
||||
(card !== this.charm) &&
|
||||
(card !== this.zone.trap) &&
|
||||
!card.acceingCard;
|
||||
},this);
|
||||
};
|
||||
|
||||
global.Card = Card;
|
1156
CardInfo.js
1156
CardInfo.js
File diff suppressed because it is too large
Load diff
7
Game.js
7
Game.js
|
@ -546,10 +546,12 @@ Game.prototype.protectBanishAsyn = function (cards,player,control) {
|
|||
// 获得玩家受保护的卡及其保护措施
|
||||
var cardList = [];
|
||||
var protectionTable = {};
|
||||
var optional = true;
|
||||
cards.forEach(function (card) {
|
||||
if (card.player !== player) return;
|
||||
card.banishProtections.forEach(function (protection) {
|
||||
if (!protection.condition.call(protection.source,card)) return;
|
||||
if (!protection.optional) optional = false;
|
||||
if (protectionTable[card.gid]) {
|
||||
protectionTable[card.gid].push(protection);
|
||||
} else {
|
||||
|
@ -559,7 +561,7 @@ Game.prototype.protectBanishAsyn = function (cards,player,control) {
|
|||
},this);
|
||||
},this);
|
||||
// 选择要保护的卡以及保护措施
|
||||
return player.selectOptionalAsyn('PROTECT',cardList).callback(this,function (card) {
|
||||
return player.selectAsyn('PROTECT',cardList,optional).callback(this,function (card) {
|
||||
if (!card) {
|
||||
// 回合玩家处理完毕,处理非回合玩家.
|
||||
if (player === this.turnPlayer) {
|
||||
|
@ -942,9 +944,6 @@ Game.prototype.handleBlockEndAsyn = function () {
|
|||
return this.banishNonPositiveAsyn();
|
||||
}).callback(this,function () {
|
||||
// 废弃【魅饰】和SIGNI下方的卡
|
||||
this.trashingCards.forEach(function (card) {
|
||||
card.acceingCard = null;
|
||||
},this);
|
||||
this.trashCards(this.trashingCharms,{ isCharm: true });
|
||||
this.trashCards(this.trashingCards);
|
||||
this.trashingCharms.length = 0;
|
||||
|
|
12
Phase.js
12
Phase.js
|
@ -353,10 +353,16 @@ Phase.prototype.wixoss = function () {
|
|||
});
|
||||
this.game.frameEnd();
|
||||
}).callback(this,function () {
|
||||
// 我方追加回合,跳过交换
|
||||
if (!this.additionalTurn) {
|
||||
var tmp = this.player;
|
||||
this.player = this.opponent;
|
||||
this.opponent = tmp;
|
||||
// 对方回合被跳过,跳过交换
|
||||
if (this.opponent.skipNextTurn) {
|
||||
this.opponent.skipNextTurn = false;
|
||||
} else {
|
||||
var tmp = this.player;
|
||||
this.player = this.opponent;
|
||||
this.opponent = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
this.game.turnPlayer = this.player;
|
||||
|
|
14
Player.js
14
Player.js
|
@ -140,6 +140,7 @@ function Player (game,io,mainDeck,lrigDeck) {
|
|||
this.canNotBeDownedByOpponentEffect = false;
|
||||
this.canNotUseColorlessSigni = false; // <绿罗植 世界树>
|
||||
this.canNotUseColorlessSpell = false; // <绿罗植 世界树>
|
||||
this.skipNextTurn = false;
|
||||
|
||||
this.usedActionEffects = [];
|
||||
this.chain = null;
|
||||
|
@ -651,6 +652,8 @@ Player.prototype.handleArtsAsyn = function (card,ignoreCost) {
|
|||
this.game.blockStart();
|
||||
// 1. 放到检查区
|
||||
card.moveTo(this.checkZone);
|
||||
if (card.beforeUseAsyn) return card.beforeUseAsyn();
|
||||
}).callback(this,function () {
|
||||
// bet
|
||||
if (!card.bet) return;
|
||||
if (this.coin < card.bet) return;
|
||||
|
@ -714,6 +717,7 @@ Player.prototype.handleArtsAsyn = function (card,ignoreCost) {
|
|||
encored = true;
|
||||
});
|
||||
}).callback(this,function () {
|
||||
// 2. 支付费用
|
||||
return this.payCostAsyn(costObj);
|
||||
}).callback(this,function (_costArg) {
|
||||
costArg = _costArg;
|
||||
|
@ -2336,4 +2340,14 @@ Player.prototype.getTraps = function() {
|
|||
});
|
||||
};
|
||||
|
||||
Player.prototype.handleWisdomAuto = function(effect) {
|
||||
var card = effect.source;
|
||||
card.beSelectedAsTarget();
|
||||
return card.player.opponent.showEffectsAsyn([effect]).callback(this,function () {
|
||||
return this.game.blockAsyn(card,function () {
|
||||
return effect.actionAsyn.call(effect.source);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
global.Player = Player;
|
Loading…
Reference in a new issue