Merge pull request #973 from hadeszoro/master

修改王平将略ai,合纵ai,联军盛宴
This commit is contained in:
Spmario233 2024-02-21 20:39:45 +08:00 committed by GitHub
commit 3c3afce32f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 8 deletions

View File

@ -678,7 +678,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
list.push('摸'+(num-i)+'回'+i); list.push('摸'+(num-i)+'回'+i);
} }
target.chooseControl(list).set('prompt','请分配自己的摸牌数和回复量').ai=function(){ target.chooseControl(list).set('prompt','请分配自己的摸牌数和回复量').ai=function(){
return Math.min(_status.event.player.getDamagedHp(),list.length)-1; return 0;
}; };
} }
} }
@ -697,7 +697,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
ai:{ ai:{
order:3, order:6,
value:4, value:4,
useful:2, useful:2,
result:{ result:{

View File

@ -8692,12 +8692,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(event.current&&event.current.isAlive()){ if(event.current&&event.current.isAlive()){
event.showCharacter=false; event.showCharacter=false;
var choiceList=['执行该军令增加1点体力上限然后回复1点体力','不执行该军令']; var choiceList=['执行该军令增加1点体力上限然后回复1点体力','不执行该军令'];
if(event.current.isFriendOf(player)) event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){return 0}); if(event.current.isFriendOf(player)) event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){if(event.junling=='junling6'&&(event.current.countCards('h')>3||event.current.countCards('e')>2)) return 1;
return event.junling=='junling5'?1:0;});
else if((event.filterName(event.current.name1)||event.filterName(event.current.name2))&&event.current.wontYe(player.identity)){ else if((event.filterName(event.current.name1)||event.filterName(event.current.name2))&&event.current.wontYe(player.identity)){
event.showCharacter=true; event.showCharacter=true;
choiceList[0]='明置一张武将牌以'+choiceList[0]; choiceList[0]='明置一张武将牌以'+choiceList[0];
choiceList[1]='不明置武将牌且'+choiceList[1]; choiceList[1]='不明置武将牌且'+choiceList[1];
event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){return 0}); event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){if(event.junling=='junling6'&&(event.current.countCards('h')>3||event.current.countCards('e')>2)) return 1;
return event.junling=='junling5'?1:0;});
} }
else event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('controls',['ok']); else event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('controls',['ok']);
} }
@ -8744,7 +8746,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
skillAnimation:'epic', skillAnimation:'epic',
animationColor:'soil', animationColor:'soil',
ai:{ ai:{
order:4, order:10,
result:{ result:{
player:function(player){ player:function(player){
if(player.isUnseen()&&player.wontYe()){ if(player.isUnseen()&&player.wontYe()){
@ -10555,7 +10557,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
check:function(card){ check:function(card){
if(card.name=='tao') return 0; if(card.name=='tao') return 0;
return 5-get.value(card); return 7-get.value(card);
}, },
selectCard:[1,3], selectCard:[1,3],
discard:false, discard:false,
@ -10571,7 +10573,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
basic:{ basic:{
order:2 order:8
}, },
result:{ result:{
player:function(player,target){ player:function(player,target){
@ -10585,7 +10587,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(huoshao&&player.inline(target.getNext())) return -3; if(huoshao&&player.inline(target.getNext())) return -3;
if(target.isUnseen()) return 0; if(target.isUnseen()) return 0;
if(player.isMajor()) return 0; if(player.isMajor()) return 0;
return 0.5; if(!player.isMajor()&&huoshao&&player.getNext().isMajor()) return -2;
if(!player.isMajor()&&huoshao&&player.getNext().isMajor()&&player.getNext().getNext().isMajor()) return -3;
if(!player.isMajor()&&huoshao&&!target.isMajor()&&target.getNext().isMajor()&&target.getNext().getNext().isMajor()) return 3;
if(!player.isMajor()&&huoshao&&!target.isMajor()&&target.getNext().isMajor()) return 1.5;
return 1;
}, },
target:function(player,target){ target:function(player,target){
if(target.isUnseen()) return 0; if(target.isUnseen()) return 0;