标准包xinjieyin技能使用async content
This commit is contained in:
parent
2fa474b4e7
commit
e1aaf6037b
|
@ -1901,23 +1901,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
discard:false,
|
discard:false,
|
||||||
delay:0,
|
delay:0,
|
||||||
lose:false,
|
lose:false,
|
||||||
content:function(){
|
async content(event,trigger,player){
|
||||||
'step 0'
|
const {cards,target}=event;
|
||||||
if(get.position(cards[0])=='e'){
|
if(get.position(cards[0])=='e'){
|
||||||
player.$give(cards,target);
|
player.$give(cards,target);
|
||||||
target.equip(cards[0]);
|
await target.promises.equip(cards[0]);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.discard(cards);
|
await player.promises.discard(cards);
|
||||||
}
|
}
|
||||||
'step 1'
|
|
||||||
if(player.hp>target.hp){
|
if(player.hp>target.hp){
|
||||||
player.draw();
|
await player.promises.draw();
|
||||||
if(target.isDamaged()) target.recover();
|
if(target.isDamaged()) await target.promises.recover();
|
||||||
}
|
}
|
||||||
else if(player.hp<target.hp){
|
else if(player.hp<target.hp){
|
||||||
target.draw();
|
await target.promises.draw();
|
||||||
if(player.isDamaged()) player.recover();
|
if (player.isDamaged()) await player.promises.recover();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -1981,9 +1980,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(target==player) return false;
|
if(target==player) return false;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
content:function(){
|
async content(event,trigger,player){
|
||||||
player.recover();
|
await player.promises.recover();
|
||||||
target.recover();
|
await event.target.promises.recover();
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:5.5,
|
order:5.5,
|
||||||
|
|
Loading…
Reference in New Issue