diff --git a/game/game.js b/game/game.js index 6d981fa99..14efcbc8f 100755 --- a/game/game.js +++ b/game/game.js @@ -1917,8 +1917,10 @@ var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; else dialog=_status.event.dialog; - if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); - else _status.event.getParent().removeSetting(dialog); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); + else _status.event.getParent().removeSetting(dialog); + } ui.update(); } }, @@ -2196,8 +2198,10 @@ var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; else dialog=_status.event.dialog; - if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); - else _status.event.getParent().removeSetting(dialog); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); + else _status.event.getParent().removeSetting(dialog); + } ui.update(); } }, @@ -2468,8 +2472,10 @@ var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; else dialog=_status.event.dialog; - if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); - else _status.event.getParent().removeSetting(dialog); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog); + else _status.event.getParent().removeSetting(dialog); + } ui.update(); } }, diff --git a/mode/brawl.js b/mode/brawl.js index a91eb27c7..1de602a1c 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -875,35 +875,67 @@ mode.brawl={ }, content:{ submode:'normal', - chooseCharacterFixed:true, + noAddSetting:true, + identityShown:true, chooseCharacterBefore:function(){ var scene=_status.brawl.scene; var playercontrol=[]; - var withseat=[],withoutseat=[]; + var maxpos=0; for(var i=0;i=8){ + addCharacter.disabled=true; + } resetCharacter(); }); ui.create.div('.menubutton.large','取消',line4,style3,resetCharacter); @@ -1456,7 +1494,12 @@ mode.brawl={ line9.style.display='none'; line9.style.marginTop='20px'; var resetStatus=function(){ - addCharacter.disabled=false; + if(line7.childElementCount>=8){ + addCharacter.disabled=true; + } + else{ + addCharacter.disabled=false; + } // editCode.disabled=false; saveButton.disabled=false; exportButton.disabled=false; diff --git a/mode/guozhan.js b/mode/guozhan.js index 20f3bc1ff..ed9e53a1b 100755 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -485,8 +485,10 @@ mode.guozhan={ } else{ var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); - if(get.config('change_identity')){ - addSetting(dialog); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(get.config('change_identity')){ + addSetting(dialog); + } } var next=game.me.chooseButton(dialog,true,2); next.filterButton=function(button){ diff --git a/mode/identity.js b/mode/identity.js index b750e97c3..3c542f21b 100755 --- a/mode/identity.js +++ b/mode/identity.js @@ -202,38 +202,43 @@ mode.identity={ game.players[i].ai.shown=0; } } - game.zhu.ai.shown=1; - if(game.zhu2){ - game.zhong=game.zhu; - game.zhu=game.zhu2; - delete game.zhu2; - } - var enhance_zhu=false; - if(_status.connectMode){ - enhance_zhu=(_status.mode!='zhong'&&lib.configOL.enhance_zhu&&get.population('fan')>=3) + if(game.zhu==game.me&&game.zhu.identity!='zhu'&&_status.brawl&&_status.brawl.identityShown){ + delete game.zhu; } else{ - enhance_zhu=(_status.mode!='zhong'&&get.config('enhance_zhu')&&get.population('fan')>=3); - } - if(enhance_zhu){ - var skill; - switch(game.zhu.name){ - case 'liubei':skill='jizhen';break; - case 'dongzhuo':skill='hengzheng';break; - case 'sunquan':skill='batu';break; - case 'sp_zhangjiao':skill='tiangong';break; - case 'liushan':skill='shengxi';break; - case 'sunce':skill='ciqiu';break; - case 'yuanshao':skill='geju';break; - case 're_caocao':skill='dangping';break; - case 'caopi':skill='junxing';break; - case 'liuxie':skill='moukui';break; - default:skill='tianming';break; + game.zhu.ai.shown=1; + if(game.zhu2){ + game.zhong=game.zhu; + game.zhu=game.zhu2; + delete game.zhu2; + } + var enhance_zhu=false; + if(_status.connectMode){ + enhance_zhu=(_status.mode!='zhong'&&lib.configOL.enhance_zhu&&get.population('fan')>=3) + } + else{ + enhance_zhu=(_status.mode!='zhong'&&get.config('enhance_zhu')&&get.population('fan')>=3); + } + if(enhance_zhu){ + var skill; + switch(game.zhu.name){ + case 'liubei':skill='jizhen';break; + case 'dongzhuo':skill='hengzheng';break; + case 'sunquan':skill='batu';break; + case 'sp_zhangjiao':skill='tiangong';break; + case 'liushan':skill='shengxi';break; + case 'sunce':skill='ciqiu';break; + case 'yuanshao':skill='geju';break; + case 're_caocao':skill='dangping';break; + case 'caopi':skill='junxing';break; + case 'liuxie':skill='moukui';break; + default:skill='tianming';break; + } + game.broadcastAll(function(player,skill){ + player.addSkill(skill); + player.storage.enhance_zhu=skill; + },game.zhu,skill); } - game.broadcastAll(function(player,skill){ - player.addSkill(skill); - player.storage.enhance_zhu=skill; - },game.zhu,skill); } if(lib.storage.test){ if(typeof lib.storage.test=='string'){ @@ -257,8 +262,8 @@ mode.identity={ _status.videoInited=true, game.addVideo('init',null,info); - game.gameDraw(game.zhong||game.zhu); - game.phaseLoop(game.zhong||game.zhu); + game.gameDraw(game.zhong||game.zhu||_status.firstAct||game.me); + game.phaseLoop(game.zhong||game.zhu||_status.firstAct||game.me); }, game:{ getState:function(){ @@ -678,7 +683,6 @@ mode.identity={ } dialog.content.appendChild(table); - dialog.add('选择座位'); var seats=document.createElement('table'); seats.style.margin='0 auto'; @@ -744,27 +748,36 @@ mode.identity={ delete event.identity; } for(i=0;i