skill={
shaRelated:true,
audio:2,
audioname:["boss_lvbu3"],
trigger:{
player:"useCardToPlayered",
},
check:function(event,player){
return get.attitude(player,event.target)<=0;
},
filter:function(event,player){
return event.card.name=='sha';
},
logTarget:"target",
content:function(){
"step 0"
player.judge(function(){return 0});
if(trigger.target.hasSkill('fengyin')){
trigger.target.addTempSkill('fengyin');
}
"step 1"
var suit=result.suit;
var target=trigger.target;
var num=target.countCards('h','shan');
target.chooseToDiscard('请弃置一张'+get.translation(suit)+'牌,否则不能使用闪抵消此杀','he',function(card){
return get.suit(card)==_status.event.suit;
}).set('ai',function(card){
var num=_status.event.num;
if(num==0) return 0;
if(card.name=='shan') return num>1?2:0;
return 8-get.value(card);
}).set('num',num).set('suit',suit);
"step 2"
if(!result.bool){
trigger.getParent().directHit.add(trigger.target);
}
},
ai:{
ignoreSkill:true,
skillTagFilter:function(player,tag,arg){
if(tag=='directHit_ai'){
return get.attitude(player,arg.target)<=0;
}
if(!arg||arg.isLink||!arg.card||arg.card.name!='sha') return false;
if(!arg.target||get.attitude(player,arg.target)>=0) return false;
if(!arg.skill||!lib.skill[arg.skill]||lib.skill[arg.skill].charlotte||get.is.locked(arg.skill)||!arg.target.getSkills(true,false).contains(arg.skill)) return false;
},
"directHit_ai":true,
},
}
shaRelated:true,
audio:2,
audioname:["boss_lvbu3"],
trigger:{
player:"useCardToPlayered",
},
check:function(event,player){
return get.attitude(player,event.target)<=0;
},
filter:function(event,player){
return event.card.name=='sha';
},
logTarget:"target",
content:function(){
"step 0"
player.judge(function(){return 0});
if(trigger.target.hasSkill('fengyin')){
trigger.target.addTempSkill('fengyin');
}
"step 1"
var suit=result.suit;
var target=trigger.target;
var num=target.countCards('h','shan');
target.chooseToDiscard('请弃置一张'+get.translation(suit)+'牌,否则不能使用闪抵消此杀','he',function(card){
return get.suit(card)==_status.event.suit;
}).set('ai',function(card){
var num=_status.event.num;
if(num==0) return 0;
if(card.name=='shan') return num>1?2:0;
return 8-get.value(card);
}).set('num',num).set('suit',suit);
"step 2"
if(!result.bool){
trigger.getParent().directHit.add(trigger.target);
}
},
ai:{
ignoreSkill:true,
skillTagFilter:function(player,tag,arg){
if(tag=='directHit_ai'){
return get.attitude(player,arg.target)<=0;
}
if(!arg||arg.isLink||!arg.card||arg.card.name!='sha') return false;
if(!arg.target||get.attitude(player,arg.target)>=0) return false;
if(!arg.skill||!lib.skill[arg.skill]||lib.skill[arg.skill].charlotte||get.is.locked(arg.skill)||!arg.target.getSkills(true,false).contains(arg.skill)) return false;
},
"directHit_ai":true,
},
}