This commit is contained in:
libccy 2017-02-11 20:35:45 +08:00
parent 0dc3296750
commit 5d52df979a
2 changed files with 21 additions and 17 deletions

View File

@ -92,12 +92,13 @@ card.extra={
} }
} }
if(card){ if(card){
for(var i=0;i<game.players.length;i++){ if(game.hasPlayer(function(current){
if(ai.get.attitude(target,game.players[i])<0&& return (ai.get.attitude(target,current)<0&&
target.canUse(card,game.players[i],true,true)&& target.canUse(card,current,true,true)&&
!game.players[i].num('e','baiyin')){ !current.num('e','baiyin')&&
if(ai.get.effect(game.players[i],card,target)>0) return 1; ai.get.effect(current,card,target)>0);
} })){
return 1;
} }
} }
return 0; return 0;
@ -229,13 +230,11 @@ card.extra={
target:function(player,target){ target:function(player,target){
if(target.isLinked()) return 1; if(target.isLinked()) return 1;
if(ai.get.attitude(player,target)>=0) return -1; if(ai.get.attitude(player,target)>=0) return -1;
// if(player.isMin()) return -1;
if(ui.selected.targets.length) return -1; if(ui.selected.targets.length) return -1;
for(var i=0;i<game.players.length;i++){ if(game.hasPlayer(function(current){
if(ai.get.attitude(player,game.players[i])<=-1&& return ai.get.attitude(player,current)<=-1&&current!=target&&!current.isLinked();
game.players[i]!=target&&!game.players[i].isLinked()){ })){
return -1; return -1;
}
} }
return 0; return 0;
} }
@ -319,10 +318,9 @@ card.extra={
if(player.hasSkillTag('maixie')&&player.hp>1) return 0; if(player.hasSkillTag('maixie')&&player.hp>1) return 0;
if(player.hasSkillTag('noDirectDamage')) return 10; if(player.hasSkillTag('noDirectDamage')) return 10;
if(ai.get.damageEffect(player,player,player,'fire')>=0) return 10; if(ai.get.damageEffect(player,player,player,'fire')>=0) return 10;
var num=3; var num=3-game.countPlayer(function(current){
for(var i=0;i<game.players.length;i++){ return ai.get.attitude(current,player)<0;
if(ai.get.attitude(game.players[i],player)<0) num--; });
}
if(player.hp==1) num+=4; if(player.hp==1) num+=4;
if(player.hp==2) num+=1; if(player.hp==2) num+=1;
if(player.hp==3) num--; if(player.hp==3) num--;

View File

@ -22677,7 +22677,13 @@
var num=0; var num=0;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue; if(game.players[i].isOut()) continue;
if(func(game.players[i])) num++; var result=func(game.players[i]);
if(typeof result=='number'){
num+=result;
}
else{
num++;
}
} }
return num; return num;
}, },