free
This commit is contained in:
parent
7697ad17f1
commit
1075c44aad
|
@ -66,6 +66,7 @@ window.config={
|
|||
skin:{},
|
||||
gameRecord:{},
|
||||
extensionInfo:{},
|
||||
autoskilllist:[],
|
||||
hiddenModePack:[],
|
||||
hiddenCharacterPack:[],
|
||||
hiddenCardPack:[],
|
||||
|
|
65
game/game.js
65
game/game.js
|
@ -40,6 +40,7 @@
|
|||
onover:[],
|
||||
chatHistory:[],
|
||||
arenaReady:[],
|
||||
onfree:[],
|
||||
inpile:[],
|
||||
extensions:[],
|
||||
extensionPack:{},
|
||||
|
@ -2982,11 +2983,11 @@
|
|||
if(map[i]._link.config.type=='autoskill'){
|
||||
if(!lib.config.autoskilllist.contains(i)){
|
||||
map[i].classList.add('on');
|
||||
ui.autoskill[i].lastChild.classList.add('on');
|
||||
// ui.autoskill[i].lastChild.classList.add('on');
|
||||
}
|
||||
else{
|
||||
map[i].classList.remove('on');
|
||||
ui.autoskill[i].lastChild.classList.remove('on');
|
||||
// ui.autoskill[i].lastChild.classList.remove('on');
|
||||
}
|
||||
}
|
||||
else if(map[i]._link.config.type=='banskill'){
|
||||
|
@ -7150,6 +7151,19 @@
|
|||
}
|
||||
event.goto(0);
|
||||
},
|
||||
onfree:function(){
|
||||
if(lib.onfree){
|
||||
var onfree=lib.onfree;
|
||||
delete lib.onfree;
|
||||
var loop=function(){
|
||||
if(onfree.length){
|
||||
(onfree.shift())();
|
||||
}
|
||||
setTimeout(loop,200);
|
||||
};
|
||||
setTimeout(loop,500);
|
||||
}
|
||||
},
|
||||
connection:function(ws){
|
||||
var client={
|
||||
ws:ws,
|
||||
|
@ -9446,6 +9460,9 @@
|
|||
else{
|
||||
event.result='ai';
|
||||
}
|
||||
if(event.onfree){
|
||||
lib.init.onfree();
|
||||
}
|
||||
"step 1"
|
||||
if(event.result=='ai'){
|
||||
if(event.processAI){
|
||||
|
@ -33544,22 +33561,22 @@
|
|||
game.documentZoom=game.deviceZoom*zoom;
|
||||
document.documentElement.style.zoom=game.documentZoom;
|
||||
|
||||
var autoskill={};
|
||||
ui.autoskill=autoskill;
|
||||
|
||||
if(!lib.config.autoskilllist){
|
||||
lib.config.autoskilllist=[];
|
||||
}
|
||||
var nodex;
|
||||
for(i in lib.skill){
|
||||
if(lib.skill[i].frequent&&lib.translate[i]){
|
||||
lib.translate[i+'_forbid_config']=lib.translate[i+'_noconf']||lib.translate[i];
|
||||
nodex=ui.create.switcher(i+'_forbid',
|
||||
!lib.config.autoskilllist.contains(i),ui.click.autoskill);
|
||||
nodex.link=i;
|
||||
autoskill[i]=nodex;
|
||||
}
|
||||
}
|
||||
// var autoskill={};
|
||||
// ui.autoskill=autoskill;
|
||||
//
|
||||
// if(!lib.config.autoskilllist){
|
||||
// lib.config.autoskilllist=[];
|
||||
// }
|
||||
// var nodex;
|
||||
// for(i in lib.skill){
|
||||
// if(lib.skill[i].frequent&&lib.translate[i]){
|
||||
// lib.translate[i+'_forbid_config']=lib.translate[i+'_noconf']||lib.translate[i];
|
||||
// nodex=ui.create.switcher(i+'_forbid',
|
||||
// !lib.config.autoskilllist.contains(i),ui.click.autoskill);
|
||||
// nodex.link=i;
|
||||
// autoskill[i]=nodex;
|
||||
// }
|
||||
// }
|
||||
|
||||
ui.system1=ui.create.div('#system1',ui.system);
|
||||
ui.system2=ui.create.div('#system2',ui.system);
|
||||
|
@ -33567,6 +33584,8 @@
|
|||
ui.replay=ui.create.system('重来',game.reload,true);
|
||||
ui.replay.id='restartbutton';
|
||||
ui.config2=ui.create.system('选项',ui.click.config);
|
||||
ui.config2.classList.add('hidden');
|
||||
ui.config2.style.transition='all 0.5s';
|
||||
ui.pause=ui.create.system('暂停',ui.click.pause);
|
||||
ui.pause.id='pausebutton';
|
||||
if(!lib.config.touchscreen){
|
||||
|
@ -33718,7 +33737,13 @@
|
|||
setTimerPosition.call(ui.timer);
|
||||
ui.arena.appendChild(ui.timer);
|
||||
|
||||
ui.create.menu();
|
||||
lib.onfree.push(function(){
|
||||
ui.create.menu();
|
||||
ui.config2.classList.remove('hidden');
|
||||
setTimeout(function(){
|
||||
ui.config2.style.transition='';
|
||||
},500);
|
||||
});
|
||||
|
||||
lib.status.date=new Date();
|
||||
lib.status.dateDelayed=0;
|
||||
|
@ -36288,6 +36313,7 @@
|
|||
}
|
||||
if(node.classList.contains('hidden')) return;
|
||||
if(node.classList.contains('removing')) return;
|
||||
if(node.classList.contains('disabled')) return;
|
||||
}
|
||||
if(ui.intro){
|
||||
ui.intro.close();
|
||||
|
@ -36959,6 +36985,7 @@
|
|||
return false;
|
||||
},
|
||||
config:function(){
|
||||
if(!ui.click.configMenu) return;
|
||||
if(_status.paused2) _status.config2=false;
|
||||
else _status.config2=true;
|
||||
|
||||
|
|
|
@ -1628,6 +1628,9 @@ div:not(.handcards)>.card>.info>span,
|
|||
padding: 3px;
|
||||
margin: 0
|
||||
}
|
||||
.control.disabled{
|
||||
opacity: 0.6 !important;
|
||||
}
|
||||
#control>div {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
|
|
|
@ -895,7 +895,7 @@ mode.identity={
|
|||
}
|
||||
}
|
||||
if(!event.chosen.length){
|
||||
game.me.chooseButton(dialog,true).selectButton=function(){
|
||||
game.me.chooseButton(dialog,true).set('onfree',true).selectButton=function(){
|
||||
if(_status.brawl&&_status.brawl.doubleCharacter) return 2;
|
||||
return get.config('double_character')?2:1
|
||||
};
|
||||
|
@ -958,7 +958,18 @@ mode.identity={
|
|||
});
|
||||
delete _status.createControl;
|
||||
};
|
||||
event.dialogxx=ui.create.characterDialog();
|
||||
if(lib.onfree){
|
||||
lib.onfree.push(function(){
|
||||
event.dialogxx=ui.create.characterDialog();
|
||||
if(ui.cheat2){
|
||||
ui.cheat2.classList.remove('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
event.dialogxx=ui.create.characterDialog();
|
||||
}
|
||||
|
||||
ui.create.cheat2=function(){
|
||||
ui.cheat2=ui.create.control('自由选将',function(){
|
||||
if(this.dialog==_status.event.dialog){
|
||||
|
@ -972,7 +983,7 @@ mode.identity={
|
|||
game.uncheck();
|
||||
game.check();
|
||||
if(ui.cheat){
|
||||
ui.cheat.style.opacity=1;
|
||||
ui.cheat.classList.remove('disabled');
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -987,10 +998,13 @@ mode.identity={
|
|||
game.uncheck();
|
||||
game.check();
|
||||
if(ui.cheat){
|
||||
ui.cheat.style.opacity=0.6;
|
||||
ui.cheat.classList.add('disabled');
|
||||
}
|
||||
}
|
||||
});
|
||||
if(lib.onfree){
|
||||
ui.cheat2.classList.add('disabled');
|
||||
}
|
||||
}
|
||||
if(!_status.brawl||!_status.brawl.chooseCharacterFixed){
|
||||
if(!ui.cheat&&get.config('change_choice'))
|
||||
|
|
Loading…
Reference in New Issue