标准包tieji技能使用async content

This commit is contained in:
shijian 2023-12-09 14:33:54 +08:00
parent 9cf1d6334e
commit 8a044c6292
1 changed files with 6 additions and 8 deletions

View File

@ -1294,9 +1294,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
logTarget:'target', logTarget:'target',
preHidden:true, preHidden:true,
content:function(){ async content(event,trigger,player){
"step 0" const judgeEvent=player.promises.judge(card=>{
player.judge(function(card){
if(get.zhu(_status.event.player,'shouyue')){ if(get.zhu(_status.event.player,'shouyue')){
if(get.suit(card)!='spade') return 2; if(get.suit(card)!='spade') return 2;
} }
@ -1304,11 +1303,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.color(card)=='red') return 2; if(get.color(card)=='red') return 2;
} }
return -0.5; return -0.5;
}).judge2=function(result){ });
return result.bool; judgeEvent.judge2=result=>result.bool;
}; const {result:{bool}}=await judgeEvent;
"step 1" if(bool){
if(result.bool){
trigger.getParent().directHit.add(trigger.target); trigger.getParent().directHit.add(trigger.target);
} }
}, },