This commit is contained in:
parent
e15c3557aa
commit
174824f647
|
@ -182,9 +182,10 @@ character.gujian={
|
||||||
player.chooseButton(dialog).ai=function(button){
|
player.chooseButton(dialog).ai=function(button){
|
||||||
var name=button.link[2];
|
var name=button.link[2];
|
||||||
var taoyuan=0,nanman=0;
|
var taoyuan=0,nanman=0;
|
||||||
for(var i=0;i<game.players.length;i++){
|
var players=game.filterPlayer();
|
||||||
var eff1=ai.get.effect(game.players[i],{name:'taoyuan'},player,player);
|
for(var i=0;i<players.length;i++){
|
||||||
var eff2=ai.get.effect(game.players[i],{name:'nanman'},player,player);
|
var eff1=ai.get.effect(players[i],{name:'taoyuan'},player,player);
|
||||||
|
var eff2=ai.get.effect(players[i],{name:'nanman'},player,player);
|
||||||
if(eff1>0){
|
if(eff1>0){
|
||||||
taoyuan++;
|
taoyuan++;
|
||||||
}
|
}
|
||||||
|
@ -216,12 +217,9 @@ character.gujian={
|
||||||
var info=lib.card[name];
|
var info=lib.card[name];
|
||||||
var card={name:name};
|
var card={name:name};
|
||||||
if(info.selectTarget==-1){
|
if(info.selectTarget==-1){
|
||||||
var targets=[];
|
var targets=game.filterPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return lib.filter.filterTarget(card,player,current);
|
||||||
if(lib.filter.filterTarget(card,player,game.players[i])){
|
});
|
||||||
targets.push(game.players[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(targets.length){
|
if(targets.length){
|
||||||
targets.sort(lib.sort.seat);
|
targets.sort(lib.sort.seat);
|
||||||
player.useCard(card,targets);
|
player.useCard(card,targets);
|
||||||
|
@ -359,24 +357,18 @@ character.gujian={
|
||||||
trigger:{player:'useCard'},
|
trigger:{player:'useCard'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.card.name!='sha') return false;
|
if(event.card.name!='sha') return false;
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(){
|
||||||
if(event.targets.contains(game.players[i])==false&&game.players[i]!=player&&
|
return (event.targets.contains(current)==false&¤t!=player&&
|
||||||
lib.filter.targetEnabled(event.card,player,game.players[i])){
|
lib.filter.targetEnabled(event.card,player,current))
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var list=[];
|
var list=game.filterPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return (trigger.targets.contains(current)==false&¤t!=player&&
|
||||||
if(trigger.targets.contains(game.players[i])==false&&game.players[i]!=player&&
|
lib.filter.targetEnabled(trigger.card,player,current))
|
||||||
lib.filter.targetEnabled(trigger.card,player,game.players[i])){
|
});
|
||||||
list.push(game.players[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
event.list=list;
|
event.list=list;
|
||||||
'step 1'
|
'step 1'
|
||||||
if(event.list.length){
|
if(event.list.length){
|
||||||
|
@ -619,24 +611,16 @@ character.gujian={
|
||||||
popup:false,
|
popup:false,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.card.name!='sha') return false;
|
if(event.card.name!='sha') return false;
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
if(event.targets.contains(game.players[i])==false&&
|
return (event.targets.contains(current)==false&¤t!=player&&
|
||||||
game.players[i]!=player&&
|
lib.filter.targetEnabled(event.card,player,current))
|
||||||
lib.filter.targetEnabled(event.card,player,game.players[i])){
|
});
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var list=[];
|
var list=game.filterPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return (trigger.targets.contains(current)==false&¤t!=player&&
|
||||||
if(trigger.targets.contains(game.players[i])==false&&
|
lib.filter.targetEnabled(trigger.card,player,current))
|
||||||
game.players[i]!=player&&
|
});
|
||||||
lib.filter.targetEnabled(trigger.card,player,game.players[i])){
|
|
||||||
list.push(game.players[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(list.length){
|
if(list.length){
|
||||||
event.target=list.randomGet();
|
event.target=list.randomGet();
|
||||||
player.line(event.target,'green');
|
player.line(event.target,'green');
|
||||||
|
@ -1176,21 +1160,16 @@ character.gujian={
|
||||||
if(event.targets.length!=1) return false;
|
if(event.targets.length!=1) return false;
|
||||||
if(!player.num('he')) return false;
|
if(!player.num('he')) return false;
|
||||||
var target=event.targets[0];
|
var target=event.targets[0];
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
if(player!=game.players[i]&&target!=game.players[i]&&get.distance(target,game.players[i])<=1){
|
return player!=current&&target!=current&&get.distance(target,current)<=1;
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
event.targets=[];
|
event.targets=game.filterPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
var target=trigger.targets[0];
|
||||||
if(player!=game.players[i]&&trigger.targets[0]!=game.players[i]&&get.distance(trigger.targets[0],game.players[i])<=1){
|
return player!=current&&target!=current&&get.distance(target,current)<=1;
|
||||||
event.targets.push(game.players[i]);
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
var num=0;
|
var num=0;
|
||||||
for(var i=0;i<event.targets.length;i++){
|
for(var i=0;i<event.targets.length;i++){
|
||||||
num+=ai.get.effect(event.targets[i],{name:'sha'},player,player);
|
num+=ai.get.effect(event.targets[i],{name:'sha'},player,player);
|
||||||
|
@ -1373,12 +1352,9 @@ character.gujian={
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.removeSkill('yangming2');
|
player.removeSkill('yangming2');
|
||||||
var num=0
|
var num=game.countPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return get.distance(player,current)<=1&¤t.isDamaged();
|
||||||
if(get.distance(player,game.players[i])<=1&&game.players[i].hp<game.players[i].maxHp){
|
});
|
||||||
num++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(num==0){
|
if(num==0){
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue