拉拢人心ai

This commit is contained in:
PZ157 2023-12-02 17:56:10 +08:00
parent b9d27a128a
commit 3674ef68a6
1 changed files with 7 additions and 1 deletions

View File

@ -13354,7 +13354,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var target=targets.shift(); var target=targets.shift();
event.target=target; event.target=target;
source.line(target,'green'); source.line(target,'green');
target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text).set('choice',Math.random()<=0.98);//反骨[doge] target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text).set('ai',_status.event.choice).set('choice',function(){
let fs=target.getFriends(true).length;
if(game.players.length<=2*fs) return false;
if(source.getFriends(true).length+fs>game.players.length/2) return true;
if(target.isDamaged()||target.countCards('h')<4) return false;
return true;
}());
'step 6' 'step 6'
if(result.bool){ if(result.bool){
target.chat('加入'); target.chat('加入');