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:{ ai:{
halfneg:true,
effect:{ effect:{
player:function(card,player,target,current){ player:function(card,player,target,current){
if(get.color(card)=='red') return [1,0,1,-2]; 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' content:'turn'
}, },
ai:{ ai:{
neg:true,
mingzhi:false, mingzhi:false,
threaten:0.8 threaten:0.8
}, },

View File

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

View File

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

View File

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

View File

@ -6787,7 +6787,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.removeSkill(player.additionalSkills.tianshu); player.removeSkill(player.additionalSkills.tianshu);
} }
event.skillai=function(list){ event.skillai=function(list){
return list.randomGet(); return get.max(list,get.skillRank,'item');
}; };
if(event.isMine()){ if(event.isMine()){
var dialog=ui.create.dialog(); var dialog=ui.create.dialog();
@ -6943,7 +6943,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0" "step 0"
// target.gain(cards,player); // target.gain(cards,player);
event.skillai=function(list){ event.skillai=function(list){
return list.randomGet(); return get.max(list,get.skillRank,'item');
}; };
if(event.isMine()){ if(event.isMine()){
event.dialog=lib.skill.tianshu.createDialog(player,target); 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:{ kuangchan:{
ai:{
neg:true
},
init:function(player){ init:function(player){
if(lib.config.mode=='identity'&&player.isZhu){ if(lib.config.mode=='identity'&&player.isZhu){
player.maxHp--; player.maxHp--;

View File

@ -40540,6 +40540,15 @@
} }
return num?Math.round(9*(num-1)/8+1):'x'; 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){ targetsInfo:function(targets){
var info=[]; var info=[];
for(var i=0;i<targets.length;i++){ for(var i=0;i<targets.length;i++){