This commit is contained in:
libccy 2017-03-27 12:43:46 +08:00
parent 0927163d5a
commit bfc8cd98b0
5 changed files with 54 additions and 72 deletions

View File

@ -24770,18 +24770,7 @@
game.showHistory(); game.showHistory();
ui.create.players(num); ui.create.players(num);
ui.create.me(); ui.create.me();
if(lib.onfree){ ui.create.cardsAsync();
_status.waitingForCards=true;
lib.onfree.push(function(){
if(_status.waitingForCards){
ui.create.cards();
delete _status.waitingForCards;
}
});
}
else{
ui.create.cards();
}
game.finishCards(); game.finishCards();
}, },
clearArena:function(){ clearArena:function(){
@ -34268,16 +34257,30 @@
} }
return node; return node;
}, },
cards:function(random){ cardsAsync:function(){
if(lib.onfree){
_status.waitingForCards=Array.from(arguments);
lib.onfree.push(function(){
if(_status.waitingForCards){
ui.create.cards.apply(ui.create,_status.waitingForCards);
delete _status.waitingForCards;
}
});
}
else{
ui.create.cards.apply(ui.create,arguments);
}
},
cards:function(ordered){
if(_status.brawl){ if(_status.brawl){
if(_status.brawl.cardPile){ if(_status.brawl.cardPile){
lib.card.list=_status.brawl.cardPile(lib.card.list); lib.card.list=_status.brawl.cardPile(lib.card.list);
} }
if(_status.brawl.orderedPile){ if(_status.brawl.orderedPile){
random=true; ordered=true;
} }
} }
if(!random){ if(!ordered){
lib.card.list.randomSort(); lib.card.list.randomSort();
} }
for(var i=0;i<lib.card.list.length;i++){ for(var i=0;i<lib.card.list.length;i++){
@ -34688,36 +34691,36 @@
} }
uiintro.add(node); uiintro.add(node);
} }
if(_status.video) return uiintro; // if(_status.video) return uiintro;
//
var auto=null; // var auto=null;
var ng=null; // var ng=null;
var sks=[]; // var sks=[];
var autoskill=ui.autoskill; // var autoskill=ui.autoskill;
if(game.players){ // if(game.players){
for(var i=0;i<game.players.length;i++){ // for(var i=0;i<game.players.length;i++){
if(game.players[i]==game.me||game.players[i].isUnderControl()){ // if(game.players[i]==game.me||game.players[i].isUnderControl()){
sks=sks.concat(game.expandSkills(game.players[i].get('s'))); // sks=sks.concat(game.expandSkills(game.players[i].get('s')));
} // }
} // }
} // }
for(var i=0;i<sks.length;i++){ // for(var i=0;i<sks.length;i++){
if(autoskill[sks[i]]){ // if(autoskill[sks[i]]){
if(!auto){ // if(!auto){
ng=ui.create.div('.text'); // ng=ui.create.div('.text');
ng.style.marginBottom=0; // ng.style.marginBottom=0;
ng.innerHTML='新游戏'; // ng.innerHTML='新游戏';
uiintro.content.insertBefore(ng,uiintro.content.firstChild); // uiintro.content.insertBefore(ng,uiintro.content.firstChild);
//
auto=ui.create.div('.text'); // auto=ui.create.div('.text');
auto.style.marginBottom=0; // auto.style.marginBottom=0;
auto.innerHTML='自动发动'; // auto.innerHTML='自动发动';
uiintro.add(auto); // uiintro.add(auto);
} // }
autoskill[sks[i]].style.display=''; // autoskill[sks[i]].style.display='';
uiintro.add(autoskill[sks[i]]); // uiintro.add(autoskill[sks[i]]);
} // }
} // }
return uiintro; return uiintro;
}, },
@ -38544,7 +38547,7 @@
}, },
cards:function(num){ cards:function(num){
if(_status.waitingForCards){ if(_status.waitingForCards){
ui.create.cards(); ui.create.cards.apply(ui.create,_status.waitingForCards);
delete _status.waitingForCards; delete _status.waitingForCards;
} }
var list=[]; var list=[];

View File

@ -129,14 +129,7 @@ mode.boss={
} }
ui.create.div(bosslist); ui.create.div(bosslist);
lib.translate.boss_pangtong='涅槃凤雏'; lib.translate.boss_pangtong='涅槃凤雏';
if(lib.onfree){ ui.create.cardsAsync();
lib.onfree.push(function(){
ui.create.cards();
});
}
else{
ui.create.cards();
}
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap'); game.addGlobalSkill('autoswap');
ui.arena.setNumber(8); ui.arena.setNumber(8);

View File

@ -43,7 +43,7 @@ mode.chess={
if(get.config('chess_card')){ if(get.config('chess_card')){
lib.card.list=lib.card.list.concat(lib.chess_cardlist); lib.card.list=lib.card.list.concat(lib.chess_cardlist);
} }
ui.create.cards(); ui.create.cardsAsync();
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap'); game.addGlobalSkill('autoswap');
ui.chessContainer=ui.create.div('#chess-container',ui.arena); ui.chessContainer=ui.create.div('#chess-container',ui.arena);

View File

@ -59,7 +59,7 @@ mode.tafang={
lib.character[i][4]=[]; lib.character[i][4]=[];
} }
} }
ui.create.cards(); ui.create.cardsAsync();
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap'); game.addGlobalSkill('autoswap');
ui.chessContainer=ui.create.div('#chess-container',ui.arena); ui.chessContainer=ui.create.div('#chess-container',ui.arena);

View File

@ -83,14 +83,7 @@ mode.versus={
lib.translate.zhuge_info='锁定技,出牌阶段,你使用杀的次数上限+3'; lib.translate.zhuge_info='锁定技,出牌阶段,你使用杀的次数上限+3';
lib.card.list=lib.cardsThree; lib.card.list=lib.cardsThree;
} }
if(lib.onfree){ ui.create.cardsAsync();
lib.onfree.push(function(){
ui.create.cards();
});
}
else{
ui.create.cards();
}
game.finishCards(); game.finishCards();
} }
else{ else{
@ -112,14 +105,7 @@ mode.versus={
} }
game.save('only_zhu',true); game.save('only_zhu',true);
ui.wuxie.hide(); ui.wuxie.hide();
if(lib.onfree){ ui.create.cardsAsync();
lib.onfree.push(function(){
ui.create.cards();
});
}
else{
ui.create.cards();
}
game.finishCards(); game.finishCards();
} }
// game.delay(); // game.delay();