标准包rende技能使用async content

This commit is contained in:
shijian 2023-12-09 14:00:52 +08:00
parent 95572ccaad
commit cce372e73f
1 changed files with 6 additions and 6 deletions

View File

@ -835,14 +835,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return 10-get.value(card);
},
content:function(){
player.give(cards,target);
var evt2=event.getParent(3);
var num=0;
player.getHistory('lose',function(evt){
async content(event,trigger,player){
const evt2=event.getParent(3);
let num=0;
player.getHistory('lose',evt=>{
if(evt.getParent(2).name=='rende'&&evt.getParent(5)==evt2) num+=evt.cards.length;
});
if(num<2&&num+cards.length>1) player.recover();
await player.promises.give(event.cards,event.target);
if(num<2&&num+event.cards.length>1) await player.promises.recover();
},
ai:{
order:function(skill,player){