teseet
This commit is contained in:
parent
e5487d7b2c
commit
49e47650bc
68
game/game.js
68
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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<game.players.length;i++){
|
||||
game.players[i].node.name.hide();
|
||||
game.players[i].node.name2.hide();
|
||||
|
|
|
@ -149,11 +149,6 @@ mode.identity={
|
|||
_status.new_tutorial();
|
||||
}
|
||||
delete _status.new_tutorial;
|
||||
if(lib.storage.test){
|
||||
lib.config.game_speed='vfast';
|
||||
_status.auto=true;
|
||||
ui.auto.classList.add('glow');
|
||||
}
|
||||
if(_status.connectMode){
|
||||
game.waitForPlayer(function(){
|
||||
if(lib.configOL.identity_mode=='zhong'){
|
||||
|
@ -242,13 +237,6 @@ mode.identity={
|
|||
},game.zhu,skill);
|
||||
}
|
||||
}
|
||||
if(lib.storage.test){
|
||||
if(typeof lib.storage.test=='string'){
|
||||
if(Math.random()<0.5) game.me.next.init(lib.storage.test);
|
||||
else game.me.init(lib.storage.test);
|
||||
}
|
||||
game.showIdentity();
|
||||
}
|
||||
game.syncState();
|
||||
event.trigger('gameStart');
|
||||
|
||||
|
|
|
@ -417,11 +417,6 @@ mode.stone={
|
|||
game.players[i].classList.add('noidentity');
|
||||
}
|
||||
game.enemy=game.me.next;
|
||||
if(lib.storage.test){
|
||||
lib.config.game_speed='vfast';
|
||||
_status.auto=true;
|
||||
ui.auto.classList.add('glow');
|
||||
}
|
||||
game.chooseCharacter();
|
||||
"step 2"
|
||||
if(_status.mode=='deck'){
|
||||
|
|
|
@ -6,7 +6,7 @@ mode.versus={
|
|||
if(_status.brawl&&_status.brawl.submode){
|
||||
_status.mode=_status.brawl.submode;
|
||||
}
|
||||
if(lib.storage.test){
|
||||
if(lib.config.test_game){
|
||||
_status.mode='standard';
|
||||
}
|
||||
"step 1"
|
||||
|
@ -1321,10 +1321,7 @@ mode.versus={
|
|||
}
|
||||
if(!ui.cheat&&get.config('change_choice'))
|
||||
ui.create.cheat();
|
||||
if(lib.storage.test){
|
||||
lib.config.game_speed='vfast';
|
||||
_status.auto=true;
|
||||
ui.auto.classList.add('glow');
|
||||
if(lib.config.test_game){
|
||||
setTimeout(function(){
|
||||
event.switchToAuto();
|
||||
},500);
|
||||
|
|
Loading…
Reference in New Issue