标准包new_jiangchi技能使用async content,修复两处错误

This commit is contained in:
shijian 2023-12-09 15:44:57 +08:00
parent 395131abb1
commit 78b159049f
1 changed files with 12 additions and 14 deletions

View File

@ -2217,7 +2217,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
frequent:true, frequent:true,
preHidden:true, preHidden:true,
async content(event,trigger,player){ async content(event,trigger,player){
await player.promise.draw(); await player.promises.draw();
}, },
}, },
xinbiyue:{ xinbiyue:{
@ -2226,7 +2226,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
frequent:true, frequent:true,
// alter:true, // alter:true,
async content(event,trigger,player){ async content(event,trigger,player){
await player.promise.draw(1); await player.promises.draw(1);
}, },
}, },
yaowu:{ yaowu:{
@ -2244,7 +2244,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false; return false;
}, },
async content(event,trigger,player){ async content(event,trigger,player){
await trigger.source.promise.chooseDrawRecover(true); await trigger.source.promises.chooseDrawRecover(true);
}, },
ai:{ ai:{
effect:{ effect:{
@ -2262,13 +2262,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"phaseDrawEnd", player:"phaseDrawEnd",
}, },
direct:true, direct:true,
content:function (){ async content(event,trigger,player){
"step 0" const list=['弃牌','摸牌','取消'];
var list=['弃牌','摸牌','取消'];
if(!player.countCards('he')) list.remove('弃牌'); if(!player.countCards('he')) list.remove('弃牌');
player.chooseControl(list,function(){ const {result:{control}}=await player.promises.chooseControl(list,()=>{
var player=_status.event.player; const player=_status.event.player;
if(list.contains('弃牌')){ if(list.includes('弃牌')){
if(player.countCards('h')>3&&player.countCards('h','sha')>1){ if(player.countCards('h')>3&&player.countCards('h','sha')>1){
return '弃牌'; return '弃牌';
} }
@ -2281,14 +2280,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
return 'cancel2'; return 'cancel2';
}).set('prompt',get.prompt2('new_jiangchi')); }).set('prompt',get.prompt2('new_jiangchi'));
"step 1" if(control=='弃牌'){
if(result.control=='弃牌'){ await player.promises.chooseToDiscard(true,'he');
player.chooseToDiscard(true,'he');
player.addTempSkill('jiangchi2','phaseUseEnd'); player.addTempSkill('jiangchi2','phaseUseEnd');
player.logSkill('new_jiangchi'); player.logSkill('new_jiangchi');
} }
else if(result.control=='摸牌'){ else if(control=='摸牌'){
player.draw(); await player.promises.draw();
player.addTempSkill('new_jiangchi3','phaseEnd'); player.addTempSkill('new_jiangchi3','phaseEnd');
player.logSkill('new_jiangchi'); player.logSkill('new_jiangchi');
} }