Merge pull request #1034 from XboxSoldier/PR-Branch

fix:`get.is.vituralCard()`将实体牌判断为虚拟牌修复虚拟牌判断
This commit is contained in:
Spmario233 2024-03-07 18:28:29 +08:00 committed by GitHub
commit 014e7a304c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -131,8 +131,8 @@ export class Is extends Uninstantable {
* @param { Card | VCard } card
*/
// @ts-ignore
static vituralCard(card) {
return card.isCard || (!("cards" in card) || !Array.isArray(card.cards) || card.cards.length == 0);
static virtualCard(card) {
return !card.isCard || (!("cards" in card) || !Array.isArray(card.cards) || card.cards.length === 0);
}
/**
* 是否是转化牌
@ -147,7 +147,9 @@ export class Is extends Uninstantable {
* @param { Card | VCard } card
*/
// @ts-ignore
static ordinaryCard(card) { return card.isCard && ("cards" in card) && Array.isArray(card.cards) && card.cards.length == 1 }
static ordinaryCard(card) {
return card.isCard && ("cards" in card) && Array.isArray(card.cards) && card.cards.length === 1
}
/**
* 押韵判断
* @param { string } str1