修复封装VCard类后部分使用非自己牌的技能的问题

This commit is contained in:
copcap 2023-12-01 20:00:34 +08:00
parent b0e9cee011
commit ae113b46d1
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
1 changed files with 6 additions and 4 deletions

View File

@ -13909,7 +13909,9 @@ new Promise(resolve=>{
bool:true, bool:true,
targets:event.targets2||result.targets, targets:event.targets2||result.targets,
}; };
var next=player.useCard(card,event.targets2||result.targets); var args=[card,event.targets2||result.targets];
if(cards) args.push(cards.slice());
var next=player.useCard(...args);
next.oncard=event.oncard; next.oncard=event.oncard;
if(cards) next.cards=cards.slice(0); if(cards) next.cards=cards.slice(0);
if(event.nopopup) next.nopopup=true; if(event.nopopup) next.nopopup=true;
@ -61211,8 +61213,8 @@ new Promise(resolve=>{
str2+='·'+tagstr; str2+='·'+tagstr;
} }
} }
if(str.suit&&str.number){ if(str.suit&&str.number||str.isCard){
var cardnum=str.number||''; var cardnum=get.number(str,false)||'';
if([1,11,12,13].contains(cardnum)){ if([1,11,12,13].contains(cardnum)){
cardnum={'1':'A','11':'J','12':'Q','13':'K'}[cardnum] cardnum={'1':'A','11':'J','12':'Q','13':'K'}[cardnum]
} }
@ -61220,7 +61222,7 @@ new Promise(resolve=>{
str2+=''+get.translation(str)+''; str2+=''+get.translation(str)+'';
} }
else{ else{
str2+='【'+get.translation(str.suit)+cardnum+'】'; str2+='【'+get.translation(get.suit(str,false))+cardnum+'】';
// var len=str2.length-1; // var len=str2.length-1;
// str2=str2.slice(0,len)+'<span style="letter-spacing: -2px">'+str2[len]+'·</span>'+get.translation(str.suit)+str.number; // str2=str2.slice(0,len)+'<span style="letter-spacing: -2px">'+str2[len]+'·</span>'+get.translation(str.suit)+str.number;
} }