From b5daee0a3faaf593dcf2362c9f38387b9fbbceb7 Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 1 May 2015 21:51:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=86=B3=E6=A8=A1=E5=BC=8F=E6=8D=A2?= =?UTF-8?q?=E5=BA=A7=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/gujian.js | 7 ++++--- character/jiange.js | 27 ++++----------------------- character/sp.js | 2 +- character/swd.js | 5 +---- character/xianjian.js | 4 ++-- character/yxs.js | 2 +- game/game.js | 5 +++-- mode/versus.js | 24 ++++++++---------------- 8 files changed, 24 insertions(+), 52 deletions(-) diff --git a/character/gujian.js b/character/gujian.js index b28425a62..8c396f6e6 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -493,7 +493,7 @@ character.gujian={ } }, xiuhua:{ - forbid:['versus'], + changeSeat:true, trigger:{player:'shaHit'}, filter:function(event,player){ return event.target!=player.previous; @@ -580,7 +580,7 @@ character.gujian={ jizhan:{ enable:'phaseUse', usable:1, - forbid:['versus'], + changeSeat:true, filterTarget:function(card,player,target){ return player!=target&&player.next!=target&&player.canUse('sha',target,false); }, @@ -602,7 +602,6 @@ character.gujian={ direct:true, filter:function(event,player){ if(event.card.name!='sha') return false; - // if(event.skill=='qianjun') return false; if(event.targets.length!=1) return false; if(player.num('h',{type:'basic'})==player.num('h')) return false; var target=event.targets[0]; @@ -619,6 +618,7 @@ character.gujian={ for(var i=0;i0){ return 7-ai.get.useful(card); diff --git a/character/swd.js b/character/swd.js index 373f22c9f..9cad69119 100644 --- a/character/swd.js +++ b/character/swd.js @@ -171,11 +171,8 @@ character.swd={ if(player.identity=='unknown') return 0; return get.population(player.identity)>=3?-1:0; } - case 'versus':{ - return -1; - } default:{ - return 0; + return -1; } } }, diff --git a/character/xianjian.js b/character/xianjian.js index c8edd99ec..c06807d94 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -1214,7 +1214,7 @@ character.xianjian={ check:function(event,player){ return ai.get.effect(player,event.card,event.player,player)<0 }, - forbid:['versus'], + changeSeat:true, trigger:{target:'useCardToBefore'}, content:function(){ if(trigger.player==player.next){ @@ -1241,7 +1241,7 @@ character.xianjian={ yujian:{ enable:'phaseUse', usable:1, - forbid:['versus'], + changeSeat:true, filterTarget:function(card,player,target){ return player!=target&&player.next!=target; }, diff --git a/character/yxs.js b/character/yxs.js index 0d7dbc9c4..2289273f1 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -420,7 +420,7 @@ character.yxs={ qiandu:{ enable:'phaseUse', usable:1, - forbid:['versus'], + changeSeat:true, filterTarget:function(card,player,target){ return player!=target&&player.next!=target; }, diff --git a/game/game.js b/game/game.js index 2ef583e35..11a8fcabe 100644 --- a/game/game.js +++ b/game/game.js @@ -5651,8 +5651,9 @@ window.play={}; player1.dataset.position=player2.dataset.position; player2.dataset.position=temp1; game.arrangePlayers(); - if(player1==game.me||player2==game.me){ - pos=parseInt(game.me.dataset.position); + if(player1.dataset.position=='0'||player2.dataset.position=='0'){ + pos=parseInt(player1.dataset.position); + if(pos==0) pos=parseInt(player2.dataset.position); num=game.players.length+game.dead.length; for(i=0;i=dialog.versus_number.link+dialog.replace_number.link){ - // if(!ui.confirm) ui.confirm=ui.create.control('start',_status.event.confirm); event.fill.firstChild.innerHTML='开始'; _status.choosefinished=true; } @@ -268,7 +257,6 @@ mode.versus={ } game.save('only_zhu',dialog.versus_only_zhu.link); game.save('main_zhu',dialog.versus_main_zhu.link); - // game.save('replace',dialog.versus_replace.link); game.save('assign_enemy',dialog.versus_assign_enemy.link); game.save('random_seat',dialog.versus_random_seat.link); game.save('noreplace_end',dialog.versus_noreplace_end.link); @@ -358,6 +346,14 @@ mode.versus={ } } else{ + for(var i in lib.skill){ + if(lib.skill[i].changeSeat){ + lib.skill[i]={}; + if(lib.translate[i+'_info']){ + lib.translate[i+'_info']='固定位置时不可用'; + } + } + } for(i=0;i