diff --git a/card/mingzhong.js b/card/mingzhong.js index a736d1b19..0b0dbd26f 100644 --- a/card/mingzhong.js +++ b/card/mingzhong.js @@ -107,7 +107,10 @@ card.mingzhong={ useful:4, value:10, result:{ - target:1 + target:function(player,target){ + if(target.num('j','lebu')) return 0; + return Math.max(1,2-target.num('h')/10); + } } } }, diff --git a/character/refresh.js b/character/refresh.js index 4aa736965..9a09f9b51 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -102,7 +102,9 @@ character.refresh={ player.chooseTarget('是否发动突袭?',[1,2],function(card,player,target){ return target.num('h')>0&&player!=target&&target.num('h')>=player.num('h'); },function(target){ - return (1-ai.get.attitude(_status.event.player,target)); + var att=ai.get.attitude(_status.event.player,target); + if(target.skills.contains('tuntian')) return att/10; + return 1-att; }); "step 1" if(result.bool){ diff --git a/character/shenhua.js b/character/shenhua.js index aea006e3f..d820ead34 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1506,7 +1506,15 @@ character.shenhua={ player.addSkill('haoshi2'); }, ai:{ - threaten:2 + threaten:2, + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.num('h')!=2) return false; + } + } + } } }, haoshi2:{ diff --git a/character/standard.js b/character/standard.js index c56e6fc7d..9397897e8 100755 --- a/character/standard.js +++ b/character/standard.js @@ -254,7 +254,9 @@ character.standard={ return target.num('h')>0&&player!=target; },function(target){ if(!_status.event.aicheck) return 0; - return (1-ai.get.attitude(_status.event.player,target)); + var att=ai.get.attitude(_status.event.player,target); + if(target.skills.contains('tuntian')) return att/10; + return 1-att; }).set('aicheck',check); "step 1" if(result.bool){ @@ -898,7 +900,15 @@ character.standard={ } } }, - group:'kongcheng1' + group:'kongcheng1', + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.num('h')!=1) return false; + } + } + } }, kongcheng1:{ audio:2, diff --git a/game/game.js b/game/game.js index 0c2c6482a..f2ad4279a 100755 --- a/game/game.js +++ b/game/game.js @@ -2261,6 +2261,12 @@ map.connect_choice_num.hide(); map.connect_replace_number.hide(); } + if(config.connect_versus_mode=='2v2'||config.connect_versus_mode=='3v3'){ + map.connect_replace_handcard.show(); + } + else{ + map.connect_replace_handcard.hide(); + } }, connect_versus_mode:{ name:'游戏模式', @@ -2268,10 +2274,16 @@ item:{ '1v1':'1v1', '2v2':'2v2', - // '4v4':'4v4', + '3v3':'3v3', + '4v4':'4v4', }, frequent:true }, + connect_replace_handcard:{ + name:'末位可换牌', + init:true, + frequent:true, + }, connect_choice_num:{ name:'侯选武将数', init:'20', @@ -5115,12 +5127,14 @@ }, chooseButtonOL:function(){ 'step 0' + ui.arena.classList.add('markhidden'); for(var i=0;i.player, -#arena.playerhidden>#mebg{ +#arena.playerhidden>#mebg, +#arena.markhidden>.player>.marks{ visibility: hidden; + opacity: 0; } #arena.chess>#arenalog{ display: none !important; diff --git a/mode/versus.js b/mode/versus.js index 20f4a94ad..c26ce9223 100755 --- a/mode/versus.js +++ b/mode/versus.js @@ -152,12 +152,28 @@ mode.versus={ game.gameDraw(_status.firstChoose.next); game.phaseLoop(_status.firstChoose.next); } - else if(_status.mode='2v2'){ + else if(_status.mode=='2v2'||_status.mode=='3v3'){ _status.first_less=true; var firstChoose=game.players.randomGet(); + if(firstChoose.next.side==firstChoose.side){ + firstChoose=firstChoose.next; + } game.gameDraw(firstChoose); + if(lib.configOL.replace_handcard){ + game.replaceHandcards(firstChoose.previous); + } game.phaseLoop(firstChoose); } + else if(_status.mode=='4v4'){ + game.gameDraw(_status.firstAct,function(player){ + if(player==_status.firstAct.previousSeat){ + return 5; + } + return 4; + }); + game.replaceHandcards(_status.firstAct.previous,_status.firstAct.previous.previous); + game.phaseLoop(_status.firstAct); + } event.finish(); } else{ @@ -286,6 +302,9 @@ mode.versus={ uiintro.add('
侯选人数:'+lib.configOL.choice_num+'人'); uiintro.add('
替补人数:'+lib.configOL.replace_number+'人'); } + else if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){ + uiintro.add('
四号位换牌:'+(lib.configOL.replace_handcard?'开启':'关闭')); + } uiintro.add('
出牌时限:'+lib.configOL.choose_timeout+'秒'); uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')).style.paddingBottom='8px'; @@ -568,7 +587,7 @@ mode.versus={ event.flipassign=true; "step 1" if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){ - var dialog=event.xdialog||ui.create.characterDialog(event.filterChoice); + var dialog=event.xdialog||ui.create.characterDialog(event.filterChoice,'expandall'); var names=[]; for(var i=0;i0.4){ + return (rank>=6)?Math.random():-Math.random(); } - if(!event.groupControl){ - event.groupControl=ui.create.groupControl(dialog); + else if(seed>0.1){ + return (rank>=4&&rank<6)?Math.random():-Math.random(); } - game.me.chooseButton(dialog,true).closeDialog=false; - event.xdialog=dialog; - dialog.static=true; - event.current.classList.add('selectedx'); - } - else{ - event.ai(event.current,event.list.randomGets(3),event.list2); - if(!event.four_assign){ - event.current=event.current.next; - event.redo(); + else{ + return (rank<4)?Math.random():-Math.random(); } - } + }).set('selected',_status.event.selected).set('dialog',event.videoId).set('seed',Math.random()); "step 2" + event.selected.push(result.links[0]); + game.broadcastAll(function(player,name,zhu){ + player.classList.remove('selectedx'); + player.init(name); + },event.current,result.links[0]); + if(event.current.identity=='zhu'){ + event.current.hp++; + event.current.maxHp++; + event.current.update(); + } event.current.classList.remove('selectedx'); - if(event.current.side==game.me.side){ - event.current.init(result.buttons[0].link); - event.list.remove(event.current.name); - event.list2.remove(event.current.name); - if(event.current.identity=='zhu'){ - event.current.hp++; - event.current.maxHp++; - event.current.update(); - } + for(var i=0;i