This commit is contained in:
libccy 2017-03-02 21:11:10 +08:00
parent f025de8937
commit 9b0a35bfb1
8 changed files with 11 additions and 12 deletions

View File

@ -466,7 +466,7 @@ card.standard={
if(result&&result.control=='顺时针'){ if(result&&result.control=='顺时针'){
var evt=event.getParent(); var evt=event.getParent();
evt.fixedSeat=true; evt.fixedSeat=true;
get.sortSeat(evt.targets); evt.targets.sortBySeat();
evt.targets.reverse(); evt.targets.reverse();
if(evt.targets[evt.targets.length-1]==player){ if(evt.targets[evt.targets.length-1]==player){
evt.targets.unshift(evt.targets.pop()); evt.targets.unshift(evt.targets.pop());

View File

@ -24,7 +24,7 @@ card.yunchou={
if(result&&result.control=='顺时针'){ if(result&&result.control=='顺时针'){
var evt=event.getParent(); var evt=event.getParent();
evt.fixedSeat=true; evt.fixedSeat=true;
get.sortSeat(evt.targets); evt.targets.sortBySeat();
evt.targets.reverse(); evt.targets.reverse();
if(evt.targets[evt.targets.length-1]==player){ if(evt.targets[evt.targets.length-1]==player){
evt.targets.unshift(evt.targets.pop()); evt.targets.unshift(evt.targets.pop());
@ -315,7 +315,7 @@ card.yunchou={
event.finish(); event.finish();
} }
else{ else{
get.sortSeat(list,target); list.sortBySeat(target);
event.list=list; event.list=list;
event.torespond=[]; event.torespond=[];
} }

View File

@ -185,9 +185,8 @@ character.diy={
return 6-ai.get.value(card); return 6-ai.get.value(card);
}, },
content:function(){ content:function(){
// if(player!=target) player.draw();
var list=game.filterPlayer(); var list=game.filterPlayer();
get.sortSeat(list,target); list.sortBySeat(target);
target.useCard({name:'diaobingqianjiang'},list); target.useCard({name:'diaobingqianjiang'},list);
}, },
ai:{ ai:{

View File

@ -352,7 +352,7 @@ character.hearth={
event.targets=game.filterPlayer(function(current){ event.targets=game.filterPlayer(function(current){
return current.hp>player.hp; return current.hp>player.hp;
}); });
get.sortSeat(event.targets); event.targets.sortBySeat();
'step 1' 'step 1'
if(event.targets.length){ if(event.targets.length){
event.target=event.targets.shift(); event.target=event.targets.shift();

View File

@ -7000,7 +7000,7 @@ character.swd={
event.targets=game.filterPlayer(function(current){ event.targets=game.filterPlayer(function(current){
return current.num('j'); return current.num('j');
}); });
get.sortSeat(event.targets); event.targets.sortBySeat();
'step 2' 'step 2'
if(event.targets.length){ if(event.targets.length){
var current=event.targets.shift(); var current=event.targets.shift();
@ -8595,7 +8595,7 @@ character.swd={
event.targets=game.filterPlayer(function(current){ event.targets=game.filterPlayer(function(current){
return get.distance(target,current)<=1; return get.distance(target,current)<=1;
}); });
get.sortSeat(event.targets,event.target); event.targets.sortBySeat(event.target);
event.targets.unshift(player); event.targets.unshift(player);
"step 1" "step 1"
if(event.targets.length){ if(event.targets.length){

View File

@ -4160,7 +4160,7 @@ character.yijiang={
event.players=game.filterPlayer(function(current){ event.players=game.filterPlayer(function(current){
return current!=target&&get.distance(current,target,'attack')<=1; return current!=target&&get.distance(current,target,'attack')<=1;
}); });
get.sortSeat(event.players,target); event.players.sortBySeat(target);
"step 1" "step 1"
if(event.players.length){ if(event.players.length){
event.current=event.players.shift(); event.current=event.players.shift();

View File

@ -126,7 +126,7 @@ character.yxs={
var list=game.filterPlayer(function(current){ var list=game.filterPlayer(function(current){
return current.hasSkill('lyuxue2'); return current.hasSkill('lyuxue2');
}); });
get.sortSeat(list); list.sortBySeat();
event.list=list; event.list=list;
player.line(list,'green'); player.line(list,'green');
'step 1' 'step 1'

View File

@ -6465,7 +6465,7 @@
if(result&&result.control=='顺时针'){ if(result&&result.control=='顺时针'){
var evt=event.getParent(); var evt=event.getParent();
evt.fixedSeat=true; evt.fixedSeat=true;
get.sortSeat(evt.targets); evt.targets.sortBySeat();
evt.targets.reverse(); evt.targets.reverse();
if(evt.targets[evt.targets.length-1]==player){ if(evt.targets[evt.targets.length-1]==player){
evt.targets.unshift(evt.targets.pop()); evt.targets.unshift(evt.targets.pop());
@ -8857,7 +8857,7 @@
if(num==0&&next.targets.length>1){ if(num==0&&next.targets.length>1){
if(!info.multitarget){ if(!info.multitarget){
if(!event.fixedSeat){ if(!event.fixedSeat){
get.sortSeat(targets,player); targets.sortBySeat(player);
} }
for(var i=0;i<targets.length;i++){ for(var i=0;i<targets.length;i++){
targets[i].animate('target'); targets[i].animate('target');