修复神鲁肃AI的操作bug

This commit is contained in:
Spmario233 2024-01-29 11:50:12 +08:00
parent 9df13a67ca
commit 88749fd97d
1 changed files with 5 additions and 2 deletions

View File

@ -235,14 +235,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
next.set('processAI',list=>{ next.set('processAI',list=>{
const listx=list[0][1][0]; const listx=list[0][1][0];
const me=listx.find(info=>parseInt(info.split('|')[0])==get.player().getSeatNum()); const me=listx.find(info=>parseInt(info.split('|')[0])==get.player().getSeatNum());
listx.remove(me);
listx.randomSort(); listx.randomSort();
listx.unshift(me); if(me){
listx.remove(me);
listx.unshift(me);
}
return [listx]; return [listx];
}); });
const {result}=await next; const {result}=await next;
if(!result.bool) return; if(!result.bool) return;
player.logSkill('tamo'); player.logSkill('tamo');
console.log(result.moved)
const resultList=result.moved[0].map(info=>{ const resultList=result.moved[0].map(info=>{
return parseInt(info.split('|')[0]); return parseInt(info.split('|')[0]);
}); });