修复filterCard传参错误
This commit is contained in:
parent
2543faf4e7
commit
cd6e6faead
|
@ -4524,7 +4524,7 @@ export class Player extends HTMLDivElement {
|
||||||
if (typeof this.selectCard == "function") return false;
|
if (typeof this.selectCard == "function") return false;
|
||||||
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
||||||
var cards = this.player.getCards(this.position);
|
var cards = this.player.getCards(this.position);
|
||||||
if (cards.some(card => !this.filterCard(card, this))) return false;
|
if (cards.some(card => !this.filterCard(card, this.player))) return false;
|
||||||
var num = cards.length;
|
var num = cards.length;
|
||||||
for (var i = 0; i < cards.length; i++) {
|
for (var i = 0; i < cards.length; i++) {
|
||||||
if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--;
|
if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--;
|
||||||
|
@ -4783,7 +4783,7 @@ export class Player extends HTMLDivElement {
|
||||||
if (typeof this.selectCard == "function") return false;
|
if (typeof this.selectCard == "function") return false;
|
||||||
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
||||||
var cards = this.player.getCards(this.position);
|
var cards = this.player.getCards(this.position);
|
||||||
if (cards.some(card => !this.filterCard(card, this))) return false;
|
if (cards.some(card => !this.filterCard(card, this.player))) return false;
|
||||||
return get.select(this.selectCard)[0] >= this.player.countCards(this.position);
|
return get.select(this.selectCard)[0] >= this.player.countCards(this.position);
|
||||||
};
|
};
|
||||||
next.setContent("chooseCard");
|
next.setContent("chooseCard");
|
||||||
|
|
Loading…
Reference in New Issue