Skip to content

Commit

Permalink
千 里 单 机
Browse files Browse the repository at this point in the history
  • Loading branch information
Spmario233 authored Aug 11, 2020
1 parent 82cede0 commit ef51702
Show file tree
Hide file tree
Showing 16 changed files with 3,062 additions and 2,477 deletions.
26 changes: 12 additions & 14 deletions card/gujian.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,13 +870,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return 0;
},
result:{
player:function(player,target){
return game.countPlayer(function(current){
if(current==target||(get.distance(target,current,'pure')==1&&current.countCards('he'))){
return -get.sgn(get.attitude(player,current));
}
});
}
target:-1,
}
}
},
Expand Down Expand Up @@ -933,13 +927,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
multineg:1,
},
result:{
player:function(player,target){
return game.countPlayer(function(current){
if(current==target||(get.distance(target,current,'pure')==1)){
return get.sgn(get.effect(current,{name:'chiyuxi'},player,player));
}
});
}
target:function(player,target){
if(target.hasSkillTag('nofire')) return 0;
if(player.hasUnknown(2)) return 0;
var nh=target.countCards('h');
if(lib.config.mode=='identity'){
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
}
if(nh==0) return -2;
if(nh==1) return -1.7
return -1.5;
},
}
}
},
Expand Down
33 changes: 10 additions & 23 deletions card/guozhan.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,27 +280,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return 0;
},
result:{
player:function(player,target){
if(get.mode()=='versus') return game.countPlayer(function(current){
if(target.isFriendOf(current)){
if(current.isFriendOf(player)&&current.isLinked()){
return get.attitude(player,target);
}
else if(current.isEnemyOf(player)&&!current.isLinked()){
return -get.attitude(player,target)*0.6;
}
}
});
return game.countPlayer(function(current){
if(target.isMajor()==current.isMajor()){
if(current.isLinked()){
return get.attitude(player,target);
}
else{
return -get.attitude(player,target)*0.8;
}
}
});
target:function(player,target){
if(get.mode()=='versus'){
if(target.isFriendOf(player)) return target.isLinked()?1:0;
return target.isLinked()?0:-1;
}
return target.isLinked()?1:-1;
}
}
}
Expand Down Expand Up @@ -390,8 +375,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
value:4,
useful:2,
result:{
player:1.5,
target:1,
target:function(player,target){
if(player==target) return 2;
return 1;
},
},
},
},
Expand Down
Loading

0 comments on commit ef51702

Please sign in to comment.