From 4059196a0c9d0e8a0d61f901177d203cdfa3bc9b Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 9 Dec 2015 11:05:36 +0800 Subject: [PATCH] b --- character/refresh.js | 2 +- character/sp.js | 1 + game/game.js | 176 +++++++++++++++++++++++++++----------- layout/default/layout.css | 9 ++ mode/stone.js | 3 +- 5 files changed, 140 insertions(+), 51 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index 02d724975..bbe5bdbd6 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -1022,7 +1022,7 @@ character.refresh={ usable:1, content:function(){ "step 0" - player.chooseControl(['red','black'].concat(get.types())).ai=function(){ + player.chooseControl(['red','black','basic','trick','equip']).ai=function(){ if(player.num('shan')==0) return 'basic'; if(player.num('e')<=1) return 'equip'; if(player.num('h')>2) return 'trick'; diff --git a/character/sp.js b/character/sp.js index 2bd37d446..5283c9630 100755 --- a/character/sp.js +++ b/character/sp.js @@ -209,6 +209,7 @@ character.sp={ if(event.isMine()){ next.openskilldialog='将一张手牌当'+get.translation(card)+'使用'; } + next.norestore=true; next.backup('mozhix'); } } diff --git a/game/game.js b/game/game.js index c2271ab9c..a5234019e 100755 --- a/game/game.js +++ b/game/game.js @@ -226,7 +226,7 @@ }, show_splash:{ name:'显示开始界面', - init:false, + init:true, }, game_speed:{ name:'游戏速度', @@ -1339,12 +1339,6 @@ name:'身份', config:{ update:function(config,map){ - if(config.player_number=='8'){ - map.double_nei.show(); - } - else{ - map.double_nei.hide(); - } if(config.identity_mode=='zhong'){ map.player_number.hide(); map.enhance_zhu.hide(); @@ -1354,8 +1348,13 @@ else{ map.player_number.show(); map.enhance_zhu.show(); - map.double_nei.show(); map.auto_identity.show(); + if(config.player_number=='8'){ + map.double_nei.show(); + } + else{ + map.double_nei.hide(); + } } }, identity_mode:{ @@ -3014,20 +3013,25 @@ _status.event.aiexclude.length=0; } else{ - if(event.skill){ - var skill=event.skill; - ui.click.cancel(); - event.aiexclude.add(skill); + if(!event.norestore){ + if(event.skill){ + var skill=event.skill; + ui.click.cancel(); + event.aiexclude.add(skill); + } + else{ + get.card().aiexclude(); + game.uncheck(); + } + event.redo(); + game.resume(); } else{ - get.card().aiexclude(); - game.uncheck(); + ui.click.cancel(); } - event.redo(); - game.resume(); } } - else if(event.skill){ + else if(event.skill&&!event.norestore){ var skill=event.skill; ui.click.cancel(); event.aiexclude.add(skill); @@ -12708,9 +12712,10 @@ delete window.isIpad; } ui.refresh(ui.window); - setTimeout(function(){ - ui.window.show(); - },500); + // setTimeout(function(){ + // ui.window.show(); + // },500); + ui.window.show(); ui.window.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.window); ui.system=ui.create.div("#system.",ui.window); ui.arena=ui.create.div('#arena',ui.window); @@ -13825,6 +13830,7 @@ var button=this; var delnode=ui.create.div('.menubutton.large','删除',confirm.parentNode,function(){ button.remove(); + lib.customCharacters.remove(button.link); game.deleteDB('character',button.link); game.deleteDB('image','character:'+button.link); var skills=lib.character[button.link][3]; @@ -13998,8 +14004,7 @@ packExporting=true; } else{ - exportCharacter.style.display='none'; - packExporting=false; + resetExport(); } }); var resetExport=function(){ @@ -17080,7 +17085,7 @@ if(event.custom.replace.confirm){ event.custom.replace.confirm(false);return; } - if(event.skill){ + if(event.skill&&!event.norestore){ if(event.skillDialog&&get.objtype(event.skillDialog)=='div'){ event.skillDialog.close(); } @@ -17924,6 +17929,7 @@ updatehl:function(){ if(!game.me) return; if(!ui.handcards1Container||!ui.handcards2Container) return; + if(!ui.handcards1Container.childNodes.length) return; var hs1=[],hs2=[]; for(var i=0;i