Merge pull request #977 from hadeszoro/master

添加无懈ai
This commit is contained in:
Spmario233 2024-02-22 18:13:22 +08:00 committed by GitHub
commit 6f68521f5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 56 additions and 5 deletions

View File

@ -137,7 +137,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
ai:{ ai:{
order:3, wuxie:function(target,card,player,viewer){
if(get.mode()=='guozhan'){
if(!_status._aozhan){
if(!player.isMajor()){
if(!viewer.isMajor()) return 0;
}
}
}
},
order:4,
value:9, value:9,
useful:6, useful:6,
tag:{ tag:{
@ -194,6 +203,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){
if(get.mode()=='guozhan'){
if(!_status._aozhan){
if(!player.isMajor()){
if(!viewer.isMajor()) return 0;
}
}
}
},
order:6, order:6,
value:9, value:9,
useful:6, useful:6,
@ -604,9 +622,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
order:7.5, order:7.5,
value:4, value:4,
useful:2, useful:2,
wuxie:function(){
return 0;
},
result:{ result:{
target:function(player,target){ target:function(player,target){
if(get.mode()=='versus'){ if(get.mode()=='versus'){
@ -697,6 +712,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){
if(get.mode()=='guozhan'){
if(!_status._aozhan){
if(!player.isMajor()){
if(!viewer.isMajor()) return 0;
}
}
}
},
order:6, order:6,
value:4, value:4,
useful:2, useful:2,
@ -821,7 +845,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.addTempSkill('diaohulishan'); target.addTempSkill('diaohulishan');
}, },
ai:{ ai:{
order:10, order:function(item, player){
if(!player) player=get.player();
if(player.hasCard(function(card){
return ['gz_haolingtianxia','gz_guguoanbang','gz_kefuzhongyuan','wuzhong','yuanjiao','lianjunshengyan','lulitongxin','yiyi'].includes(get.name(card));
},'hs')) return 3.5;
if(player.hasCard(function(card){
return get.name(card)=='taoyuan';
},'hs')) return get.order({name:'taoyuan'},player)-1;
return 9.5;
},
value:4, value:4,
useful:[2,1], useful:[2,1],
wuxie:function(){ wuxie:function(){
@ -947,6 +980,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
player.draw(3); player.draw(3);
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){
if(get.mode()=='guozhan'){
if(!_status._aozhan){
if(!player.isMajor()){
if(!viewer.isMajor()) return 0;
}
}
}
},
basic:{ basic:{
useful:4, useful:4,
value:8, value:8,

View File

@ -1145,6 +1145,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.draw(2); target.draw(2);
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){
if(get.mode()=='guozhan'){
if(!_status._aozhan){
if(!player.isMajor()){
if(!viewer.isMajor()) return 0;
}
}
}
},
basic:{ basic:{
order:7.2, order:7.2,
useful:4.5, useful:4.5,