Optimize game.asyncDrawAuto.

(cherry picked from commit 2bcbcf881b5a92d72584b27204f8b5b4729de1b9)
This commit is contained in:
Tipx-L 2023-08-24 21:07:23 -07:00
parent f090e56961
commit 4f1dd2610c
1 changed files with 8 additions and 19 deletions

View File

@ -37453,27 +37453,16 @@
}
},
asyncDrawAuto:function(players,num,drawDeck){
if(players.length==1){
var num2=1;
if(typeof num=='number'){
num2=num;
}
else if(Array.isArray(num)){
num2=num[0];
}
else if(typeof num=='function'){
num2=num(players[0]);
}
if(drawDeck&&drawDeck.drawDeck){
players[0].draw(num2,drawDeck);
}
else{
players[0].draw(num2);
}
}
else{
if(players.length>1){
game.asyncDraw.apply(this,arguments);
return;
}
let num2=1;
if(typeof num=='number') num2=num;
else if(Array.isArray(num)) num2=num[0];
else if(typeof num=='function') num2=num(players[0]);
if(drawDeck&&drawDeck.drawDeck) players[0].draw(num2,drawDeck);
else players[0].draw(num2);
},
finishSkill:(i,sub)=>{
const mode=get.mode(),info=lib.skill[i],iInfo=`${i}_info`;