This commit is contained in:
libccy 2017-05-19 17:07:59 +08:00
parent 9d313e3130
commit 311a549f32
7 changed files with 23 additions and 5 deletions

View File

@ -303,6 +303,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
ai:{
halfneg:true,
effect:{
player:function(card,player,target,current){
if(get.color(card)=='red') return [1,0,1,-2];
@ -1401,6 +1402,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:'turn'
},
ai:{
neg:true,
mingzhi:false,
threaten:0.8
},

View File

@ -1000,7 +1000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
list.remove(player.getSkills());
list=list.randomGets(3);
event.skillai=function(){
return list.randomGet();
return get.max(list,get.skillRank,'item');
};
if(event.isMine()){
var dialog=ui.create.dialog();
@ -3251,7 +3251,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
list.remove('maoxian');
list=list.randomGets(3);
event.skillai=function(){
return list.randomGet();
return get.max(list,get.skillRank,'item');
};
if(event.isMine()){
var dialog=ui.create.dialog();

View File

@ -239,6 +239,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.target){
player.useCard({name:'juedou'},event.target,'noai');
}
},
ai:{
halfneg:true
}
},
reqicai:{

View File

@ -2448,7 +2448,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
ai:{
threaten:0.5
threaten:0.5,
neg:true,
}
},
baonue:{

View File

@ -6787,7 +6787,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.removeSkill(player.additionalSkills.tianshu);
}
event.skillai=function(list){
return list.randomGet();
return get.max(list,get.skillRank,'item');
};
if(event.isMine()){
var dialog=ui.create.dialog();
@ -6943,7 +6943,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0"
// target.gain(cards,player);
event.skillai=function(list){
return list.randomGet();
return get.max(list,get.skillRank,'item');
};
if(event.isMine()){
event.dialog=lib.skill.tianshu.createDialog(player,target);

View File

@ -728,6 +728,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
kuangchan:{
ai:{
neg:true
},
init:function(player){
if(lib.config.mode=='identity'&&player.isZhu){
player.maxHp--;

View File

@ -40540,6 +40540,15 @@
}
return num?Math.round(9*(num-1)/8+1):'x';
},
skillRank:function(skill){
var info=lib.skill[skill];
if(!info) return 0;
if(info.ai){
if(info.ai.halfneg) return 0;
if(info.ai.neg) return -1;
}
return 1;
},
targetsInfo:function(targets){
var info=[];
for(var i=0;i<targets.length;i++){