diff --git a/card/standard.js b/card/standard.js index 2d8bfe3f6..1da73115c 100755 --- a/card/standard.js +++ b/card/standard.js @@ -927,7 +927,7 @@ card.standard={ target:function(player,target){ var es=target.get('e'); var nh=target.num('h'); - var noe=(es.length==0); + var noe=(es.length==0||target.hasSkillTag('noe')); var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp0?'生效':'失效')+',是否无懈?'; diff --git a/character/refresh.js b/character/refresh.js index 08dd922fb..4aa736965 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -1,5 +1,6 @@ 'use strict'; character.refresh={ + connect:true, character:{ re_caocao:['male','wei',4,['hujia','rejianxiong'],['zhu']], re_simayi:['male','wei',3,['refankui','reguicai']], @@ -33,11 +34,13 @@ character.refresh={ }, content:function(){ 'step 0' - trigger.player.chooseTarget(function(card,playerx,target){ - return player.canUse({name:'juedou'},target)&&target!=trigger.player; - },'是否发动【利驭】?').ai=function(target){ - return ai.get.effect(target,{name:'juedou'},player,trigger.player)-2; - }; + trigger.player.chooseTarget(function(card,player,target){ + var evt=_status.event.getParent(); + return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; + },'是否发动【利驭】?').set('ai',function(target){ + var evt=_status.event.getParent(); + return ai.get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; + }); 'step 1' if(result.bool){ player.gainPlayerCard(trigger.player,'he',true); @@ -103,7 +106,7 @@ character.refresh={ }); "step 1" if(result.bool){ - player.logSkill('retuxi'); + player.logSkill('retuxi',result.targets); for(var i=0;i0){ @@ -138,7 +142,7 @@ character.refresh={ else{ return -result-ai.get.value(card)/2; } - }; + }).set('judging',trigger.player.judging[0]); "step 1" if(result.bool){ player.respond(result.cards,'highlight'); @@ -150,7 +154,12 @@ character.refresh={ if(result.bool){ player.logSkill('reguicai'); if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.delete(); + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); } ui.discardPile.appendChild(trigger.player.judging[0]); @@ -188,13 +197,13 @@ character.refresh={ "step 2" if(result.bool){ player.logSkill('refankui',trigger.source); - player.gain(result.buttons[0].link); + player.gain(result.links[0]); trigger.source.$give(1,player); event.goto(1); } }, ai:{ - result:{ + effect:{ target:function(card,player,target){ if(player.num('he')>1&&get.tag(card,'damage')){ if(player.skills.contains('jueqing')) return [1,-1.5]; @@ -306,7 +315,7 @@ character.refresh={ "step 1" player.chooseCardTarget({ filterCard:function(card){ - return _status.event.parent.cards.contains(card); + return _status.event.getParent().cards.contains(card); }, selectCard:[1,event.cards.length], filterTarget:function(card,player,target){ @@ -317,7 +326,7 @@ character.refresh={ return (_status.event.player.num('h')-_status.event.player.hp); }, ai2:function(target){ - if(target.num('h')>player.num('h')) return 0; + if(target.num('h')>_status.event.player.num('h')) return 0; return ai.get.attitude(_status.event.player,target)-4; }, prompt:'请选择要送人的卡牌' @@ -389,7 +398,7 @@ character.refresh={ target.gain(cards[0]); "step 1" target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){ - var cards=target.get('he',{suit:get.suit(player.storage.refanjian)}); + var cards=player.get('he',{suit:get.suit(player.storage.refanjian)}); if(cards.length==1) return 0; if(cards.length>=2){ for(var i=0;i0){ return att+Math.max(0,5-target.num('h')); } @@ -601,18 +619,38 @@ character.refresh={ ui.discardPile.appendChild(event.card); } game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); } else if(result.targets){ + player.line(result.targets,'green'); result.targets[0].gain(event.card); event.node.moveDelete(result.targets[0]); game.log(result.targets[0],'获得了',event.card); game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); + game.broadcast(function(card,target){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.moveDelete(target); + } + },event.card,result.targets[0]); } else{ game.log(player,'展示并弃掉了',event.card); ui.discardPile.appendChild(event.card); game.addVideo('deletenode',player,[get.cardInfo(event.node)]); event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); } game.addVideo('thrownhighlight2'); ui.arena.classList.remove('thrownhighlight'); @@ -633,6 +671,7 @@ character.refresh={ "step 0" if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){ player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel').ai=function(){ + var trigger=_status.event.getParent()._trigger; if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0; return 1; }; @@ -702,6 +741,7 @@ character.refresh={ result.targets[0].storage.reyiji2=result.cards; } player.$give(result.cards.length,result.targets[0]); + player.line(result.targets,'green'); game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']); if(num==1){ event.temp=result.targets[0]; @@ -766,7 +806,7 @@ character.refresh={ }, content:function(){ "step 0" - player.chooseToCompare(target).small=true; + player.chooseToCompare(target).set('small',true); "step 1" if(result.bool){ if(target.skills.contains('yijue2')==false){ @@ -880,12 +920,13 @@ character.refresh={ var target=trigger.target; var num=target.num('h','shan'); target.chooseToDiscard('请弃置一张'+get.translation(suit)+'牌,否则不能使用闪抵消此杀','he',function(card){ - return get.suit(card)==suit; - }).ai=function(card){ + return get.suit(card)==_status.event.suit; + }).set('ai',function(card){ + var num=_status.event.num; if(num==0) return 0; if(card.name=='shan') return num>1; return 8-ai.get.value(card); - }; + }).set('num',num).set('suit',suit); "step 2" if(!result.bool){ trigger.directHit=true; @@ -994,13 +1035,14 @@ character.refresh={ zhaxiang:{ trigger:{player:'loseHpEnd'}, forced:true, + audio:2, content:function(){ player.draw(3); if(_status.currentPhase==player){ player.addTempSkill('zhaxiang2',{player:'phaseAfter'}); } else{ - game.playAudio('skill','zhaxiang'+Math.ceil(Math.random()*2)); + game.trySkillAudio('zhaxiang',player); } } }, @@ -1032,7 +1074,7 @@ character.refresh={ }, content:function(){ player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀', - trigger.player).logSkill='zhuhai'; + trigger.player).set('logSkill','zhuhai'); } }, qianxin:{ @@ -1062,12 +1104,13 @@ character.refresh={ }, content:function(){ "step 0" - player.chooseControl(['red','black','basic','trick','equip']).ai=function(){ + player.chooseControl(['red','black','basic','trick','equip']).set('ai',function(){ + var player=_status.event.player; if(player.num('shan')==0) return 'basic'; if(player.num('e')<=1) return 'equip'; if(player.num('h')>2) return 'trick'; return 'red'; - }; + }); "step 1" var num=20; var card; @@ -1163,13 +1206,14 @@ character.refresh={ "step 0" player.chooseTarget('选择令'+get.translation(trigger.card)+'无效的目标', [1,trigger.targets.length],function(card,player,target){ - return trigger.targets.contains(target); - }).ai=function(target){ + return _status.event.getParent()._trigger.targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getParent()._trigger; if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1){ - return -ai.get.effect(target,trigger.card,trigger.player,player); + return -ai.get.effect(target,trigger.card,trigger.player,_status.event.player); } return -1; - }; + }); "step 1" if(result.bool){ player.unmarkSkill('fenwei'); @@ -1228,25 +1272,27 @@ character.refresh={ xunxun:{ audio:2, trigger:{player:'phaseDrawBefore'}, - frequent:true, + direct:true, content:function(){ "step 0" event.cards=get.cards(4); - player.chooseCardButton(event.cards,2,true,'选择获得两张牌').ai=ai.get.buttonValue; - trigger.untrigger(); - trigger.finish(); + player.chooseCardButton(event.cards,2,'选择获得两张牌').set('ai',ai.get.buttonValue); "step 1" - var choice=[]; - for(var i=0;i1&&get.tag(card,'damage')){ if(player.skills.contains('jueqing')) return [1,-1.5]; @@ -309,6 +309,9 @@ character.standard={ audio:4, trigger:{player:'judgeEnd'}, frequent:true, + filter:function(event,player){ + return get.position(event.result.card)=='d'&&event.position==ui.discardPile; + }, content:function(){ player.gain(trigger.result.card); player.$gain2(trigger.result.card); @@ -346,6 +349,7 @@ character.standard={ }); "step 3" if(result.bool){ + player.line(result.targets,'green'); result.targets[0].gain(result.cards); player.$give(result.cards.length,result.targets[0]); for(var i=0;i0){ @@ -5609,12 +5671,7 @@ game.addVideo('showCards',player,[str,get.cardsInfo(cards)]); game.delayx(2); "step 1" - game.broadcast(function(id){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - },event.dialogid); + game.broadcast('closeDialog',event.dialogid); event.dialog.close(); }, showCards:function(){ @@ -5636,12 +5693,7 @@ game.delayx(2); game.addVideo('showCards',player,[event.str,get.cardsInfo(cards)]); "step 1" - game.broadcast(function(id){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - },event.dialogid); + game.broadcast('closeDialog',event.dialogid); event.dialog.close(); }, viewHandcards:function(){ @@ -6685,10 +6737,12 @@ cards[i].goto(ui.discardPile); } if(game.online&&player==game.me&&!_status.over&&!game.controlOver&&!ui.exit){ - ui.exit=ui.create.control('退出联机',function(){ - game.saveConfig('reconnect_info'); - game.reload(); - }); + if(lib.mode[lib.configOL.mode].config.dierestart){ + ui.exit=ui.create.control('退出联机',function(){ + game.saveConfig('reconnect_info'); + game.reload(); + }); + } } if(lib.config.background_speak){ @@ -7077,7 +7131,15 @@ this.roomempty=false; var config=info[2]; var modetrans; - if(config.mode=='identity'&&config.identity_mode=='zhong'){ + if(config.mode=='versus'){ + switch(config.versus_mode){ + case '1v1':modetrans='单人对决';break; + case '2v2':modetrans='欢乐成双';break; + case '3v3':modetrans='血战到底';break; + case '4v4':modetrans='四人对决';break; + } + } + else if(config.mode=='identity'&&config.identity_mode=='zhong'){ modetrans='忠胆英杰'; } else{ @@ -7261,6 +7323,7 @@ judges:this.get('j'), position:parseInt(this.dataset.position), hujia:this.hujia, + side:this.side, identityShown:this.identityShown, identityNode:[this.node.identity.innerHTML,this.node.identity.dataset.color], identity:this.identity, @@ -9433,6 +9496,7 @@ if(self) return true; return false; } + if(_status.connectMode) return false; if(lib.config.mode=='versus'){ if(_status.mode=='four'||_status.mode=='jiange') return false; return ui.autoreplace&&ui.autoreplace.classList.contains('on')&& @@ -10840,42 +10904,8 @@ return this; }, send:function(){ - var skills={ - global:lib.skill.global - }; - var skillinfo={}; - for(var i in lib.playerOL){ - skills[i]={ - skills:lib.playerOL[i].skills, - hiddenSkills:lib.playerOL[i].hiddenSkills, - additionalSkills:lib.playerOL[i].additionalSkills, - tempSkills:lib.playerOL[i].tempSkills, - storage:lib.playerOL[i].storage, - } - } - for(var i in lib.skill){ - if(lib.skill[i].chooseButton&&lib.skill[i].enable){ - skillinfo[i]=lib.skill[i].chooseButton; - } - } - this.player.send(function(name,args,set,event,stat,skills,skillinfo){ - for(var i in skills){ - if(i=='global'){ - lib.skill.global=skills[i]; - } - else if(lib.playerOL[i]){ - for(var j in skills[i]){ - lib.playerOL[i][j]=skills[i][j]; - } - } - } - for(var i in skillinfo){ - if(!lib.skill[i]){ - lib.skill[i]={}; - } - lib.skill[i].chooseButton=skillinfo[i]; - } - game.me.stat=[stat]; + this.player.send(function(name,args,set,event,skills){ + game.me.applySkills(skills); var next=game.me[name].apply(game.me,args); for(var i=0;i>',page,function(){ - if(expanded){ - this.classList.remove('on'); - this.parentNode.classList.remove('expanded'); + if(lib.config.fold_mode){ + var clickmore=function(type){ + if(type==='expand'&&expanded) return; + if(type==='unexpand'&&!expanded) return; + if(expanded){ + this.classList.remove('on'); + this.parentNode.classList.remove('expanded'); + } + else{ + this.classList.add('on'); + this.parentNode.classList.add('expanded'); + } + expanded=!expanded; + }; + var morenodes=ui.create.div('.config.more','更多
>
',page); + morenodes.listen(clickmore); + morenodes._onclick=clickmore; + page.morenodes=morenodes; + } + else{ + page.classList.add('expanded'); + if(!connectMenu){ + page.classList.add('expanded2'); } - else{ - this.classList.add('on'); - this.parentNode.classList.add('expanded'); - } - expanded=!expanded; - }); + } for(var k=0;k=7){ + return evalue/6; + } + return evalue/10; + } + return evalue/3; } + if(player.hasSkillTag('noh')) return 0.1; var nh=player.num('h'); switch(nh){ case 1:return 2; diff --git a/game/update.js b/game/update.js index 1b89d4ba8..076699175 100644 --- a/game/update.js +++ b/game/update.js @@ -1,6 +1,6 @@ window.noname_update={ - version:'1.8.6.1', + version:'1.8.7', changeLog:[ - '修bug' + '界限武将、对决模式联机' ] } diff --git a/layout/default/layout.css b/layout/default/layout.css index d16f1b1b6..0c19b9221 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -187,6 +187,10 @@ table{table-layout: fixed;} font-family:'STHeiti','SimHei','Microsoft JhengHei','Microsoft YaHei','WenQuanYi Micro Hei',Helvetica,Arial,sans-serif } +#arena.playerhidden>.player, +#arena.playerhidden>#mebg{ + visibility: hidden; +} #arena.chess>#arenalog{ display: none !important; } @@ -1286,6 +1290,7 @@ div:hover>.intro{opacity: 1;} -webkit-animation:identity 0.8s; } .player .identity[data-color="zhu"], +.player .identity[data-color="truezhu"], div[data-nature='fire'], span[data-nature='fire']{ text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px, @@ -1345,6 +1350,7 @@ span[data-nature='woodmm']{ } .player .identity[data-color="cai"], .player .identity[data-color="wei"], +.player .identity[data-color="falsezhu"], div[data-nature='water'], span[data-nature='water']{ text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px, diff --git a/layout/default/menu.css b/layout/default/menu.css index 359b38440..8f483e595 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -210,6 +210,9 @@ .menu.main>.menu-content>div>.right.pane>.expanded{ padding-bottom:80px; } +.menu.main>.menu-content>div>.right.pane>.expanded.expanded2{ + padding-bottom:12px; +} .menu.main>.menu-content>div>.right.pane>.morenodes{ padding-bottom:10px; } diff --git a/mode/guozhan.js b/mode/guozhan.js index 58c9d95ae..6c0292d72 100755 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -513,16 +513,7 @@ mode.guozhan={ var next=game.createEvent('chooseCharacter',false); next.content=function(){ 'step 0' - var list=[]; - var libCharacter={}; - for(var i=0;i=3){ + 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; @@ -208,8 +215,10 @@ mode.identity={ case 'liuxie':skill='moukui';break; default:skill='tianming';break; } - game.zhu.addSkill(skill); - game.zhu.storage.enhance_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'){ @@ -400,7 +409,7 @@ mode.identity={ } } else if(game.me.identity=='nei'){ - if(game.players.length==1){ + if(game.players.length==1&&game.me.isAlive()){ game.over(true); } else{ @@ -924,6 +933,7 @@ mode.identity={ var list2=[]; var list3=[]; event.list=[]; + event.list2=[]; var libCharacter={}; for(var i=0;i4){ game.zhu.maxHp++; @@ -983,30 +996,50 @@ mode.identity={ var list=[]; var selectButton=(lib.configOL.double_character?2:1); + + var num,num2=0; + if(event.zhongmode){ + num=3; + } + else{ + num=Math.floor(event.list.length/(game.players.length-1)); + num2=event.list.length-num*(game.players.length-1); + if(lib.configOL.double_nei){ + num2=Math.floor(num2/2); + } + if(num>5){ + num=5; + } + if(num2>2){ + num2=2; + } + } for(var i=0;i1){ - for(var i=0;i=lib.storage.number){ - actcount=i-lib.storage.number; - } - else{ - actcount=i+lib.storage.number; - } - } - if(actcount>0){ - actcount--; - } - else{ - actcount=game.players.length-1; - } - firstAct=game.players[actcount]; - break; - } + else if(_status.mode=='jiange'){ + var firstAct; + for(var i=0;i2){ - ui.versushs=ui.create.system('手牌',null,true); - lib.setPopped(ui.versushs,game.versusHoverHandcards,220); - } - } - _status.enemyCount=ui.create.system('杀敌: '+get.cnNumber(0,true),null,true); - _status.friendCount=ui.create.system('阵亡: '+get.cnNumber(0,true),null,true); - // _status.friendCount=ui.create.system('友方',null,true); - // _status.enemyCount=ui.create.system('敌方',null,true); - - lib.setPopped(_status.friendCount,game.versusHoverFriend); - lib.setPopped(_status.enemyCount,game.versusHoverEnemy); - - if(lib.storage.zhu){ - _status.currentSide=true; - game.versusPhaseLoop(firstAct); + _status.actlist=[ + firstAct, + firstAct.next, + firstAct.previous, + firstAct.next.next, + firstAct.previous.previous, + firstAct.next.next.next, + firstAct.previous.previous.previous, + firstAct.next.next.next.next + ]; + game.gameDraw(firstAct); + game.phaseLoopJiange(); } else{ - game.versusPhaseLoop(firstAct); + var firstAct; + if(lib.storage.zhu){ + firstAct=(_status.currentSide==game.me.side)?game.friendZhu:game.enemyZhu; + } + else{ + if(!lib.storage.cross_seat&&!lib.storage.random_seat&&lib.storage.number>1){ + for(var i=0;i=lib.storage.number){ + actcount=i-lib.storage.number; + } + else{ + actcount=i+lib.storage.number; + } + } + if(actcount>0){ + actcount--; + } + else{ + actcount=game.players.length-1; + } + firstAct=game.players[actcount]; + break; + } + } + } + else{ + firstAct=game.players[Math.floor(Math.random()*game.players.length)]; + } + } + game.gameDraw(firstAct,4); + _status.first_less=true; + _status.round=0; + if(lib.storage.single_control){ + lib.skill.global.push('versus_swap'); + ui.autoreplace=ui.create.div('.caption.normal'); + ui.autoreplace.innerHTML='
自动换人
'; + ui.autoreplace.style.textAlign='center'; + if(lib.storage.autoreplaceinnerhtml){ + ui.autoreplace.classList.add('on') + } + ui.autoreplace.listen(game.switchAutoreplace); + + // ui.versusreplace=ui.create.system('换人',null,true); + // lib.setPopped(ui.versusreplace,game.versusHoverReplace); + if(game.players.length>2){ + ui.versushs=ui.create.system('手牌',null,true); + lib.setPopped(ui.versushs,game.versusHoverHandcards,220); + } + } + _status.enemyCount=ui.create.system('杀敌: '+get.cnNumber(0,true),null,true); + _status.friendCount=ui.create.system('阵亡: '+get.cnNumber(0,true),null,true); + + lib.setPopped(_status.friendCount,game.versusHoverFriend); + lib.setPopped(_status.enemyCount,game.versusHoverEnemy); + + if(lib.storage.zhu){ + _status.currentSide=true; + game.versusPhaseLoop(firstAct); + } + else{ + game.versusPhaseLoop(firstAct); + } + } + if(_status.mode!='four'){ + event.finish(); } - } - if(_status.mode!='four'){ - event.finish(); } "step 4" if(event.replaceCard&&result.bool){ @@ -246,6 +278,18 @@ mode.versus={ game.phaseLoop(_status.firstAct); }, game:{ + checkOnlineResult:function(player){ + return game.players[0].side==player.side; + }, + getRoomInfo:function(uiintro){ + if(lib.configOL.versus_mode=='1v1'){ + uiintro.add('
侯选人数:'+lib.configOL.choice_num+'人'); + uiintro.add('
替补人数:'+lib.configOL.replace_number+'人'); + } + uiintro.add('
出牌时限:'+lib.configOL.choose_timeout+'秒'); + uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); + uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')).style.paddingBottom='8px'; + }, getVideoName:function(){ var str=get.translation(game.me.name); if(game.me.name2){ @@ -1114,6 +1158,356 @@ mode.versus={ } } }, + chooseCharacterOL:function(){ + switch(lib.configOL.versus_mode){ + case '1v1':game.chooseCharacterOL1();break; + case '2v2':game.chooseCharacterOL2();break; + case '3v3':game.chooseCharacterOL3();break; + case '4v4':game.chooseCharacterOL4();break; + } + }, + chooseCharacterOL4:function(){ + var next=game.createEvent('chooseCharacter',false); + next.content=function(){ + "step 0" + var list= + event.filterChoice=function(name){ + if(['yuanshu','re_yuanshu','zhangxingcai','hetaiyou','wenpin','yuji', + 'xunyu','lusu','guanping','zhangzong','zhoutai','sp_zhangjiao','zhangjiao', + 'shixie','zhanglu','chenlin','mayunlu','yangxiu','zhugeke','chengyu', + 'zhangbao','zhangliang','sunhao','wutugu','zhugeguo','liuzan','lingcao', + 'sunru','lingju','lifeng','hanba','sunluyu','zhuling','daxiaoqiao', + 'sp_zhaoyun','sp_diaochan','sp_pangtong','sp_caoren','sp_daqiao', + 'sp_ganning','sp_zhangfei','sp_xiahoudun'].contains(name)){ + return true; + } + if(lib.characterPack.refresh[name]) return false; + if(lib.characterPack.standard[name]){ + if(lib.characterPack.refresh['re_'+name]) return true; + return false; + } + if(lib.characterPack.shenhua[name]) return false; + if(lib.characterPack.sp[name]) return false; + if(lib.characterPack.yijiang[name]) return false; + return true; + } + event.list.randomSort(); + event.list2=list2; + event.current=game.players.randomGet(); + _status.firstAct=event.current; + event.four_assign=get.config('four_assign'); + 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 names=[]; + for(var i=0;i2)){ - if(game.friend.contains(this)){ + var list=(this.side==game.me.side)?_status.friend:_status.enemy; + if((list.length==0&&lib.storage.noreplace_end)|| + (lib.storage.zhu&&lib.storage.main_zhu&&this.identity=='zhu'&&game.players.length>2)){ + if(game.friend.contains(this)){ + game.over(false); + } + else{ + game.over(true); + } + } + else if(game.friend.length==1&&this==game.friend[0]&&_status.friend.length==0){ game.over(false); } - else{ + else if(game.enemy.length==1&&this==game.enemy[0]&&_status.enemy.length==0){ game.over(true); } - } - else if(game.friend.length==1&&this==game.friend[0]&&_status.friend.length==0){ - game.over(false); - } - else if(game.enemy.length==1&&this==game.enemy[0]&&_status.enemy.length==0){ - game.over(true); - } - else{ - if(source){ - if(source.side!=this.side){ - if(lib.storage.versus_reward){ - source.draw(lib.storage.versus_reward); + else{ + if(source){ + if(source.side!=this.side){ + if(lib.storage.versus_reward){ + source.draw(lib.storage.versus_reward); + } + } + else{ + if(lib.storage.versus_punish=='弃牌'){ + source.discard(source.get('he')); + } + else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){ + source.draw(lib.storage.versus_reward); + } } } else{ - if(lib.storage.versus_punish=='弃牌'){ - source.discard(source.get('he')); - } - else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){ - source.draw(lib.storage.versus_reward); - } + game.delay(); } + game.replacePlayer(this); } - else{ - game.delay(); - } - game.replacePlayer(this); } } } @@ -1711,11 +2255,27 @@ mode.versus={ get:{ attitude:function(from,to){ if(from.side==to.side){ - if(to.identity=='zhu'&&(lib.storage.main_zhu||_status.mode=='four')) return 10; + if(to.identity=='zhu'){ + if(_status.connectMode){ + if(_status.mode=='4v4') return 10; + } + else{ + if(lib.storage.main_zhu||_status.mode=='four') return 10; + } + } return 6; } - if(to.identity=='zhu'&&(lib.storage.main_zhu||_status.mode=='four')) return -10; - return -6; + else{ + if(to.identity=='zhu'){ + if(_status.connectMode){ + if(_status.mode=='4v4') return -10; + } + else{ + if(lib.storage.main_zhu||_status.mode=='four') return -10; + } + } + return -6; + } }, } },