diff --git a/character/ow.js b/character/ow.js index f75745c6c..758a59583 100644 --- a/character/ow.js +++ b/character/ow.js @@ -1182,7 +1182,7 @@ character.ow={ check:function(card){ if(ui.selected.cards.length) return 0; var player=_status.event.player; - var max=0,min=0,players=game.filterPlayer; + var max=0,min=0,players=game.filterPlayer(); for(var i=0;i0){ - for(var i=0;i2){ + if(game.hasPlayer(function(current){ + return current!=player&¤t!=trigger.target&¤t.num('he'); + })){ trigger.target.chooseTarget(function(card,player,target){ return target!=player&&target!=_status.event.parent.player&&target.num('he')>0; },'选择一名角色并令'+get.translation(player)+'弃置其一张牌').ai=function(target){ @@ -963,12 +962,9 @@ character.xianjian={ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ - for(var i=0;i0){ + var players=game.filterPlayer(); + for(var i=0;i0){ num++; if(num>1) return 8-ai.get.value(card); } @@ -1203,9 +1200,10 @@ character.xianjian={ if(card.name=='sha'&&player.num('h','sha')<2&&player.num('h')<=player.hp){ var num=0; var player=_status.event.player; - for(var i=0;i1) return [0,0,0,0]; } @@ -1420,21 +1418,21 @@ character.xianjian={ filter:function(event,player){ if(!player.num('he')) return false; if(player==event.player) return false; - for(var i=0;i0) num++; else if(att<0) num--; - targets.push(game.players[i]); + targets.push(players[i]); } } event.targets=targets; @@ -1625,9 +1623,10 @@ character.xianjian={ effect:{ target:function(card,player,target,current){ if(get.type(card)=='equip'){ - for(var i=0;i0){ + var players=game.filterPlayer(); + for(var i=0;i0){ return [1,3]; } } @@ -1780,12 +1779,13 @@ character.xianjian={ "step 0" var ainum=0; var num=3-player.storage.xuanning; + var players=[]; event.targets=[]; - for(var i=0;i0){ @@ -323,12 +324,12 @@ character.yijiang={ order:4, result:{ player:function(player){ - var allshown=true; - for(var i=0;i0){ + if(players[i]!=player&&players[i].num('h')&&ai.get.attitude(player,players[i])>0){ return 1; } } @@ -396,9 +397,9 @@ character.yijiang={ return true; }, check:function(event,player){ - var allshown=true; - for(var i=0;i1&&ai.get.attitude(player,game.players[i])>0){ + var allshown=true,players=game.filterPlayer(); + for(var i=0;i1&&ai.get.attitude(player,players[i])>0){ return 1; } } @@ -478,20 +479,15 @@ character.yijiang={ direct:true, filter:function(event,player){ if(player.num('h')) return false; - for(var i=0;i0; + if(target==player||target==get.zhu(player)) return false; + return get.distance(target,get.zhu(player),'attack')<=1&&target.num('he')>0; }).set('ai',function(target){ var player=_status.event.player; var zhu=_status.event.zhu; @@ -640,7 +638,7 @@ character.yijiang={ if(nh>nh2) return 2; if(nh==nh2&&target.num('e')) return 1.5; return 1; - }).set('zhu',game.zhu); + }).set('zhu',get.zhu(player)); 'step 1' if(result.bool){ event.target=result.targets[0]; @@ -653,7 +651,7 @@ character.yijiang={ 'step 2' event.target.draw(); 'step 3' - if(event.target.num('h')>game.zhu.num('h')){ + if(event.target.num('h')>get.zhu(player).num('h')){ player.draw(); } }, @@ -840,19 +838,19 @@ character.yijiang={ return button.link=='sha'?1:0; } var player=_status.event.player; - var recover=0,lose=1; - for(var i=0;i0){ - if(game.players[i].hp<2){ + var recover=0,lose=1,players=game.filterPlayer(); + for(var i=0;i0){ + if(players[i].hp<2){ lose--; recover+=0.5; } lose--; recover++; } - else if(ai.get.attitude(player,game.players[i])<0){ + else if(ai.get.attitude(player,players[i])<0){ if(game.players[i].hp<2){ lose++; recover-=0.5; @@ -862,10 +860,10 @@ character.yijiang={ } } else{ - if(ai.get.attitude(player,game.players[i])>0){ + if(ai.get.attitude(player,players[i])>0){ lose--; } - else if(ai.get.attitude(player,game.players[i])<0){ + else if(ai.get.attitude(player,players[i])<0){ lose++; } } @@ -1298,10 +1296,10 @@ character.yijiang={ order:1, result:{ player:function(player){ - var num=0; - for(var i=0;i0){ num--; } @@ -1946,8 +1944,9 @@ character.yijiang={ return _status.currentPhase==player; }, content:function(){ - for(var i=0;i1){ + var players=game.filterPlayer(); + for(var i=0;i1){ player.removeSkill('unequip'); return; } @@ -1964,8 +1963,9 @@ character.yijiang={ selectTarget:function(card,player,range){ if(_status.currentPhase==player){ if(card.name=='sha'&&range[1]!=-1){ - for(var i=0;i1) return; + var players=game.filterPlayer(); + for(var i=0;i1) return; } range[1]++; } @@ -1985,8 +1985,9 @@ character.yijiang={ content:function(){ player.storage.benxi=!player.hasSkill('unequip'); if(player.storage.benxi){ - for(var i=0;i1){ + var players=game.filterPlayer(); + for(var i=0;i1){ return; } }