标准包liuli技能使用async content
This commit is contained in:
parent
29e6c17a08
commit
ee7c41a849
|
@ -1678,22 +1678,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
current!=player&&lib.filter.targetEnabled(event.card,event.player,current);
|
current!=player&&lib.filter.targetEnabled(event.card,event.player,current);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
content:function(){
|
async content(event,trigger,player){
|
||||||
"step 0"
|
const {result:{bool,targets,cards}}=await player.promises.chooseCardTarget({
|
||||||
var next=player.chooseCardTarget({
|
|
||||||
position:'he',
|
position:'he',
|
||||||
filterCard:lib.filter.cardDiscardable,
|
filterCard:lib.filter.cardDiscardable,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:(card,player,target)=>{
|
||||||
var trigger=_status.event;
|
const trigger=_status.event;
|
||||||
if(player.inRange(target)&&target!=trigger.source){
|
if(player.inRange(target)&&target!=trigger.source){
|
||||||
if(lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true;
|
if(lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
ai1:function(card){
|
ai1:card=>get.unuseful(card)+9,
|
||||||
return get.unuseful(card)+9;
|
ai2:target=>{
|
||||||
},
|
|
||||||
ai2:function(target){
|
|
||||||
if(_status.event.player.countCards('h','shan')){
|
if(_status.event.player.countCards('h','shan')){
|
||||||
return -get.attitude(_status.event.player,target);
|
return -get.attitude(_status.event.player,target);
|
||||||
}
|
}
|
||||||
|
@ -1713,12 +1710,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
source:trigger.player,
|
source:trigger.player,
|
||||||
card:trigger.card,
|
card:trigger.card,
|
||||||
}).setHiddenSkill(event.name);
|
}).setHiddenSkill(event.name);
|
||||||
"step 1"
|
if(bool){
|
||||||
if(result.bool){
|
const target=targets[0];
|
||||||
var target=result.targets[0];
|
|
||||||
player.logSkill(event.name,target);
|
player.logSkill(event.name,target);
|
||||||
player.discard(result.cards);
|
await player.promises.discard(cards);
|
||||||
var evt=trigger.getParent();
|
const evt=trigger.getParent();
|
||||||
evt.triggeredTargets2.remove(player);
|
evt.triggeredTargets2.remove(player);
|
||||||
evt.targets.remove(player);
|
evt.targets.remove(player);
|
||||||
evt.targets.push(target);
|
evt.targets.push(target);
|
||||||
|
|
Loading…
Reference in New Issue