This commit is contained in:
libccy 2017-03-27 10:41:24 +08:00
parent 7629dad43f
commit 16e8c85c5f
3 changed files with 33 additions and 14 deletions

View File

@ -7158,8 +7158,8 @@
var loop=function(){ var loop=function(){
if(onfree.length){ if(onfree.length){
(onfree.shift())(); (onfree.shift())();
setTimeout(loop,100);
} }
setTimeout(loop,200);
}; };
setTimeout(loop,500); setTimeout(loop,500);
} }

View File

@ -2358,9 +2358,11 @@ mode.guozhan={
} }
if(_status.auto){ if(_status.auto){
event.ai(game.me,list); event.ai(game.me,list);
lib.init.onfree();
} }
else if(chosen.length){ else if(chosen.length){
game.me.init(chosen[0],chosen[1],false); game.me.init(chosen[0],chosen[1],false);
lib.init.onfree();
} }
else{ else{
var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); var dialog=ui.create.dialog('选择角色','hidden',[list,'character']);
@ -2369,7 +2371,7 @@ mode.guozhan={
addSetting(dialog); addSetting(dialog);
} }
} }
var next=game.me.chooseButton(dialog,true,2); var next=game.me.chooseButton(dialog,true,2).set('onfree',true);
next.filterButton=function(button){ next.filterButton=function(button){
if(ui.dialog.buttons.length<=10){ if(ui.dialog.buttons.length<=10){
for(var i=0;i<ui.dialog.buttons.length;i++){ for(var i=0;i<ui.dialog.buttons.length;i++){
@ -2389,18 +2391,29 @@ mode.guozhan={
event.ai(game.me,list); event.ai(game.me,list);
ui.arena.classList.remove('selecting'); ui.arena.classList.remove('selecting');
}; };
event.dialogxx=ui.create.characterDialog(function(i){ var createCharacterDialog=function(){
if(i.indexOf('gz_shibing')==0) return true; event.dialogxx=ui.create.characterDialog(function(i){
if(get.config('onlyguozhan')){ if(i.indexOf('gz_shibing')==0) return true;
if(!lib.characterPack.mode_guozhan[i]) return true; if(get.config('onlyguozhan')){
if(get.config('junzhu')){ if(!lib.characterPack.mode_guozhan[i]) return true;
if(lib.junList.contains(i.slice(3))) return true; if(get.config('junzhu')){
} if(lib.junList.contains(i.slice(3))) return true;
else{ }
if(get.is.jun(i)) return true; else{
if(get.is.jun(i)) return true;
}
} }
},get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined);
if(ui.cheat2){
ui.cheat2.classList.remove('disabled');
} }
},get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined); };
if(lib.onfree){
lib.onfree.push(createCharacterDialog);
}
else{
createCharacterDialog();
}
ui.create.cheat2=function(){ ui.create.cheat2=function(){
ui.cheat2=ui.create.control('自由选将',function(){ ui.cheat2=ui.create.control('自由选将',function(){
if(this.dialog==_status.event.dialog){ if(this.dialog==_status.event.dialog){
@ -2414,7 +2427,7 @@ mode.guozhan={
game.uncheck(); game.uncheck();
game.check(); game.check();
if(ui.cheat){ if(ui.cheat){
ui.cheat.style.opacity=1; ui.cheat.classList.add('disabled');
} }
} }
else{ else{
@ -2429,10 +2442,13 @@ mode.guozhan={
game.uncheck(); game.uncheck();
game.check(); game.check();
if(ui.cheat){ if(ui.cheat){
ui.cheat.style.opacity=0.6; ui.cheat.classList.remove('disabled');
} }
} }
}); });
if(lib.onfree){
ui.cheat2.classList.add('disabled');
}
} }
ui.create.cheat=function(){ ui.create.cheat=function(){
_status.createControl=ui.cheat2; _status.createControl=ui.cheat2;

View File

@ -900,6 +900,9 @@ mode.identity={
return get.config('double_character')?2:1 return get.config('double_character')?2:1
}; };
} }
else{
lib.init.onfree();
}
ui.create.cheat=function(){ ui.create.cheat=function(){
_status.createControl=ui.cheat2; _status.createControl=ui.cheat2;
ui.cheat=ui.create.control('更换',function(){ ui.cheat=ui.create.control('更换',function(){