forked from mirrors/webxoss-core
fix player.draw
This commit is contained in:
parent
4b929e75e9
commit
4aa2461875
2 changed files with 1 additions and 3 deletions
|
@ -87853,9 +87853,6 @@ var CardInfo = {
|
||||||
var effect = this.game.newEffect({
|
var effect = this.game.newEffect({
|
||||||
source: this,
|
source: this,
|
||||||
description: '1437-const-0',
|
description: '1437-const-0',
|
||||||
triggerCondition: function () {
|
|
||||||
return !this.player.addCardTohandBanned
|
|
||||||
},
|
|
||||||
actionAsyn: function () {
|
actionAsyn: function () {
|
||||||
this.player.draw(1);
|
this.player.draw(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,6 +261,7 @@ Player.prototype.up = function () {
|
||||||
// 返回:
|
// 返回:
|
||||||
// cards: Array,抽到的卡,长度可能少于n(卡组没有足够的卡可以抽),也可能为空数组.
|
// cards: Array,抽到的卡,长度可能少于n(卡组没有足够的卡可以抽),也可能为空数组.
|
||||||
Player.prototype.draw = function (n) {
|
Player.prototype.draw = function (n) {
|
||||||
|
if (this.addCardToHandBanned) return [];
|
||||||
var cards = this.mainDeck.getTopCards(n);
|
var cards = this.mainDeck.getTopCards(n);
|
||||||
if (!cards.length) return [];
|
if (!cards.length) return [];
|
||||||
if (this.game.phase.isAttackPhase()) {
|
if (this.game.phase.isAttackPhase()) {
|
||||||
|
|
Loading…
Reference in a new issue