现在可以选择目标了,也能正常观看手牌了,但是在观看完后点击确定尝试结束观看就会报错,现在代码如下:
skill={
audio:"0",
trigger:{
player:"phaseZhunbeiBegin",
},
content:function (){
'step 0'
player.chooseTarget(get.prompt2('选择一名其他角色并观看其手牌'),function(card,player,target){
return player!=target&&target.countCards('h')!=0;
});
'step 1'
if(result.bool){
event.target=result.targets[0];
player.viewHandcards(result.targets[0]);
player.line(target);
var content=[get.translation(target)+'的手牌',cards];
game.log(player,'观看了',target,'的手牌');
player.chooseControl('ok').set('dialog',content);
}
else {
event.finish();
}
},
}