From 47c8bb54860a61e60c0ca0ea96b42181d57b1fa3 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 9 Dec 2015 16:49:22 +0800 Subject: [PATCH] tafang --- game/game.js | 5 +++-- layout/mode/chess.css | 3 ++- mode/boss.js | 4 ++-- mode/chess.js | 25 ++++++++++++++++++------- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/game/game.js b/game/game.js index d11f008bd..7be902cc7 100755 --- a/game/game.js +++ b/game/game.js @@ -11834,8 +11834,9 @@ li.innerHTML=lib.changeLog[i]; ul.appendChild(li); } - var dialog=ui.create.dialog(lib.version+'更新内容'); + var dialog=ui.create.dialog(lib.version+'更新内容','hidden'); dialog.content.appendChild(ul); + dialog.open(); var hidden=false; if(!ui.auto.classList.contains('hidden')){ ui.auto.hide(); @@ -18056,7 +18057,7 @@ } if(ui.dialog&&!ui.dialog.classList.contains('noupdate')){ if(lib.config.mode=='chess'){ - if(ui.dialog.content.offsetHeight<240&&(!ui.dialog.buttons||!ui.dialog.buttons.length)){ + if(ui.dialog.content.scrollHeight<240&&(!ui.dialog.buttons||!ui.dialog.buttons.length)){ ui.dialog.style.height=ui.dialog.content.offsetHeight+'px'; ui.dialog.classList.add('slim'); } diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 4861f3bfb..26ddb5478 100755 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -204,7 +204,8 @@ font-family: 'xinwei'; font-size: 20px; top: 66px; - left: 5px; + right: 5px; + left:auto; } .dialog .buttons>.button.character.squarebutton{ height:90px; diff --git a/mode/boss.js b/mode/boss.js index 9b28b0b86..a6b8d150e 100755 --- a/mode/boss.js +++ b/mode/boss.js @@ -314,7 +314,7 @@ mode.boss={ game.gameDraw(game.boss); game.bossPhaseLoop(); setTimeout(function(){ - ui.updateh(true); + ui.updatehl(); },200); } }, @@ -395,7 +395,7 @@ mode.boss={ ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; // ui.fakeme.style.backgroundSize='cover'; } - ui.updateh(true); + ui.updatehl(); }, modeSwapPlayer:function(player){ game.swapControl(player); diff --git a/mode/chess.js b/mode/chess.js index 5856abd41..18a14e436 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -331,7 +331,16 @@ mode.chess={ return; } } - if(get.config('chess_mode')=='tafang') return; + if(get.config('chess_mode')=='tafang'){ + if(_status.friends.length==0&&ui.fakeme){ + ui.fakeme.hide(); + this.node.handcards1.delete(); + this.node.handcards2.delete(); + game.me=ui.create.player(); + game.me.side=true; + } + return; + } game.over(game.me.side==game.players[0].side); }, $draw:function(num){ @@ -880,6 +889,7 @@ mode.chess={ var difficulty=parseInt(get.config('tafang_difficulty')); for(var i=0;i