Optimize game.asyncDrawAuto.
(cherry picked from commit 2bcbcf881b5a92d72584b27204f8b5b4729de1b9)
This commit is contained in:
parent
f090e56961
commit
4f1dd2610c
27
game/game.js
27
game/game.js
|
@ -37453,27 +37453,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
asyncDrawAuto:function(players,num,drawDeck){
|
asyncDrawAuto:function(players,num,drawDeck){
|
||||||
if(players.length==1){
|
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{
|
|
||||||
game.asyncDraw.apply(this,arguments);
|
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)=>{
|
finishSkill:(i,sub)=>{
|
||||||
const mode=get.mode(),info=lib.skill[i],iInfo=`${i}_info`;
|
const mode=get.mode(),info=lib.skill[i],iInfo=`${i}_info`;
|
||||||
|
|
Loading…
Reference in New Issue