优化童渊【朝凤】ai

This commit is contained in:
157 2023-09-30 20:21:27 +08:00 committed by GitHub
parent 241864da23
commit 44607e8abc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -3394,12 +3394,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
var next=player.chooseToDiscard('he',get.prompt('chaofeng',trigger.player),str); var next=player.chooseToDiscard('he',get.prompt('chaofeng',trigger.player),str);
next.set('ai',function(card){ next.set('ai',function(card){
var player=_status.event.player,suit=_status.event.color,number=_status.event.type,att=_status.event.att; var player=_status.event.player,att=_status.event.att;
var val=4-get.value(card); var val=4.2-get.value(card);
if(get.color(card)==suit) val+=3; if(get.color(card)==_status.event.color) val+=3;
if(get.type2(card)==number){ if(get.type2(card)==_status.event.type){
if(att<=0) val+=4; if(att<0) val+=4;
else val-=3; else if(att===0) val+=2;
else val=0;
} }
return val; return val;
}); });