让cardNameLength可输入字符串牌名直接输出牌名字数

This commit is contained in:
BauxiteAl 2023-10-07 22:16:47 +08:00
parent d8ffa36703
commit 1d4c880157
1 changed files with 1 additions and 1 deletions

View File

@ -56037,7 +56037,7 @@
//Get the card name length //Get the card name length
//获取此牌的字数 //获取此牌的字数
cardNameLength:(card,player)=>{ cardNameLength:(card,player)=>{
const actualCardName=lib.actualCardName,name=get.translation(get.name(card,player)); const actualCardName=lib.actualCardName,name=get.translation(typeof card=='string'?card:get.name(card,player));
return (actualCardName.has(name)?actualCardName.get(name):name).length; return (actualCardName.has(name)?actualCardName.get(name):name).length;
}, },
//Yingbian //Yingbian