diff --git a/game/game.js b/game/game.js index f8d4f06fd..a7e1bac3c 100644 --- a/game/game.js +++ b/game/game.js @@ -3735,7 +3735,7 @@ } node._customintro=func; }, - setPopped:function(node,func,width,height,forceclick){ + setPopped:function(node,func,width,height,forceclick,paused2){ node._poppedfunc=func; node._poppedwidth=width; node._poppedheight=height; @@ -3749,6 +3749,9 @@ node.addEventListener('mouseenter',ui.click.hoverpopped); // node.addEventListener('mouseleave',ui.click.hoverpopped_leave); } + if(paused2){ + node._paused2=true; + } }, placePoppedDialog:function(dialog,e){ if(dialog._place_text){ @@ -5326,7 +5329,7 @@ if(window.isNonameServer){ lib.cheat.i(); } - else if(lib.config.dev&&!lib.storage.test&&(!_status.connectMode||lib.config.debug)){ + else if(lib.config.dev&&(!_status.connectMode||lib.config.debug)){ lib.cheat.i(); } lib.config.sort_card=get.sortCard(lib.config.sort); @@ -5992,25 +5995,27 @@ delete _status.event._skillChoice; setTimeout(game.check,300); }, - aa:function(){ - game.saveConfig('test_game',!lib.config.test_game); - game.reload(); - }, - a:function(name){ - if(lib.storage.test&&!name){ - game.save('test',false); - if(lib.config.mode=='identity'){ - game.saveConfig('double_character',false,true); - } + a:function(bool){ + if(lib.config.test_game){ + game.saveConfig('test_game'); } else{ - game.save('test',name||true); - if(lib.config.mode=='identity'){ - game.saveConfig('double_character',true,true); - } + if(bool){ + game.saveConfig('test_game','single'); + } + else{ + game.saveConfig('test_game',true); + } } game.reload(); }, + as:function(){ + ui.window.classList.remove('testing'); + var bg=ui.window.querySelector('.pausedbg'); + if(bg){ + bg.remove(); + } + }, uj:function(){ cheat.e('qilin'); game.me.next.useCard({name:'jiedao'},[game.me,game.me.previous]); @@ -20508,8 +20513,8 @@ } if(ui.wuxie) ui.wuxie.hide(); - if(lib.storage.test&&!_status.connectMode){ - if(lib.config.test_game){ + if(lib.config.test_game&&!_status.connectMode){ + if(lib.config.test_game!='single'){ switch(lib.config.mode){ case 'identity':game.saveConfig('mode','guozhan');break; case 'guozhan':game.saveConfig('mode','versus');break; @@ -30635,7 +30640,7 @@ ui.pause=ui.create.system('暂停',ui.click.pause); ui.pause.id='pausebutton'; if(!lib.config.touchscreen){ - lib.setPopped(ui.pause,ui.click.pausehistory,220,400); + lib.setPopped(ui.pause,ui.click.pausehistory,220,400,null,true); } if(!lib.config.show_pause){ ui.pause.style.display='none'; @@ -30829,11 +30834,13 @@ delete window.resetExtension; localStorage.removeItem(lib.configprefix+'disable_extension',true); - - if(lib.config.test_game){ ui.window.classList.add('testing'); - lib.storage.test=true; + lib.config.game_speed='vfast'; + lib.config.low_performance=true; + lib.config.animation=false; + _status.auto=true; + ui.auto.classList.add('glow'); setTimeout(function(){ var node=ui.create.pause().animate('start'); node.appendChild(ui.sidebar); @@ -31964,6 +31971,23 @@ if(uiintro._onopen){ uiintro._onopen(); } + if(this._paused2&&!lib.config.touchscreen){ + game.pause2(); + uiintro.classList.add('static'); + var layer=ui.create.div('.poplayer',ui.window); + var clicklayer=function(e){ + uiintro.delete(); + layer.remove(); + game.resume2(); + e.stopPropagation(); + return false; + } + uiintro.style.zIndex=21; + layer.onclick=clicklayer; + layer.oncontextmenu=clicklayer; + uiintro.addEventListener('mouseleave',clicklayer); + uiintro.addEventListener('click',clicklayer); + } }, hoverpopped_leave:function(){ this._poppedalready=false; diff --git a/layout/default/layout.css b/layout/default/layout.css index 8b44e3736..c1132e5fa 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -57,7 +57,7 @@ table { position: absolute; transition: all 1s; } -#window.testing>div:not(.pausedbg){ +#window.testing>*:not(.pausedbg){ display: none !important; } #window.modepaused>div:not(.modenopause):not(#arena):not(.popped) { diff --git a/mode/boss.js b/mode/boss.js index a78f4342f..1bd5baed9 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -164,7 +164,7 @@ mode.boss={ target.classList.add('highlight'); }); } - if(lib.storage.test){ + if(lib.config.test_game){ event.current.classList.remove('highlight'); if(event.current.nextSibling&&event.current.nextSibling.classList.contains('player')){ event.current=event.current.nextSibling; @@ -172,9 +172,6 @@ mode.boss={ else{ event.current=event.current.parentNode.childNodes[1]; } - lib.config.game_speed='vfast'; - _status.auto=true; - ui.auto.classList.add('glow'); game.save('current',event.current.name); } "step 2" diff --git a/mode/chess.js b/mode/chess.js index 32e64b1ae..679e9a659 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -5,7 +5,7 @@ mode.chess={ start:function(){ "step 0" _status.mode=get.config('chess_mode'); - if(lib.storage.test){ + if(lib.config.test_game){ _status.mode='combat'; } if(_status.mode=='combat'){ @@ -105,14 +105,6 @@ mode.chess={ break; } case 'combat':{ - if(lib.storage.test){ - lib.config.game_speed='vfast'; - _status.auto=true; - setTimeout(function(){ - ui.updatehl(); - },500); - ui.auto.classList.add('glow'); - } game.chooseCharacter(); break; } diff --git a/mode/guozhan.js b/mode/guozhan.js index 07ce22a98..a08e17a89 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -46,12 +46,6 @@ mode.guozhan={ }); } else{ - if(lib.storage.test){ - lib.config.game_speed='vfast'; - lib.config.low_performance=true; - _status.auto=true; - ui.auto.classList.add('glow'); - } for(var i=0;i