mirror of
https://github.com/webxoss/webxoss-core.git
synced 2025-01-18 19:56:02 +01:00
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({
|
||||
source: this,
|
||||
description: '1437-const-0',
|
||||
triggerCondition: function () {
|
||||
return !this.player.addCardTohandBanned
|
||||
},
|
||||
actionAsyn: function () {
|
||||
this.player.draw(1);
|
||||
}
|
||||
|
|
|
@ -261,6 +261,7 @@ Player.prototype.up = function () {
|
|||
// 返回:
|
||||
// cards: Array,抽到的卡,长度可能少于n(卡组没有足够的卡可以抽),也可能为空数组.
|
||||
Player.prototype.draw = function (n) {
|
||||
if (this.addCardToHandBanned) return [];
|
||||
var cards = this.mainDeck.getTopCards(n);
|
||||
if (!cards.length) return [];
|
||||
if (this.game.phase.isAttackPhase()) {
|
||||
|
|
Loading…
Reference in a new issue