skill={
group:["殇_3"],
subSkill:{
"1":{
trigger:{
player:"damageEnd",
},
direct:true,
content:function(){
'step 0'
var list={basic:[],equip:[],trick:[],delay:[]};
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
var info=lib.card[name];
if(info.autoViewAs||name=='yuansuhuimie') continue;
if(lib.filter.cardEnabled({name:name},player)){
if(!list[info.type]){
list[info.type]=[];
}
list[info.type].push([get.translation(lib.card[name].type),'',name]);
}
}
list.trick.sort(lib.sort.name);
var dialog=ui.create.dialog('雷泽',[list.trick,'vcard']);
var rand1=Math.random()<1/3;
var rand2=Math.random()<0.5;
var rand3=Math.random()<1/3;
var rand4=Math.random()<1/3;
player.chooseButton(dialog).ai=function(button){
var name=button.link[2];
if(player.hp<=1){
switch(name){
case 'zhiliaobo':return 1;
case 'dunpaigedang':return 0.8;
case 'nanman':return 0.5;
default:return 0;
}
}
if(rand4&&player.countCards('h')<=1){
switch(name){
case 'zengbin':return 1;
case 'wuzhong':return 0.8;
default:return 0;
}
}
if(player.hasSkill('qinglonglingzhu')){
if(rand2) return name=='chiyuxi'?0.8:0;
return name=='jingleishan'?0.8:0;
}
if(rand2) return name=='wanjian'?0.8:0;
return name=='nanman'?0.8:0;
}
'step 1'
if(result.bool){
player.chooseUseTarget(result.links[0][2],true,false);
}
},
ai:{
threaten:1.5,
},
sub:true,
},
"2":{
trigger:{
player:"damageEnd",
},
direct:true,
content:function(){
'step 0'
var list={basic:[],equip:[],trick:[],delay:[]};
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
var info=lib.card[name];
if(info.autoViewAs||name=='yuansuhuimie') continue;
if(lib.filter.cardEnabled({name:name},player)){
if(!list[info.type]){
list[info.type]=[];
}
list[info.type].push([get.translation(lib.card[name].type),'',name]);
}
}
list.trick.sort(lib.sort.name);
var dialog=ui.create.dialog('雷泽',[list.basic,'vcard']);
var rand1=Math.random()<1/3;
var rand2=Math.random()<0.5;
var rand3=Math.random()<1/3;
var rand4=Math.random()<1/3;
player.chooseButton(dialog).ai=function(button){
var name=button.link[2];
if(player.hp<=1){
switch(name){
case 'tao':return 1;
case 'jiu':return 0.8;
default:return 0;
}
}
}
'step 1'
if(result.bool){
player.chooseUseTarget(result.links[0][2],true,false);
}
},
ai:{
threaten:1.5,
},
sub:true,
},
"3":{
trigger:{
player:"damageEnd",
},
preHidden:true,
content:function(){
"step 0"
player.judge(function(card){
if(get.zhu(_status.event.player,'shouyue')){
if(get.suit(card)!='spade') return 2;
}
else{
if(get.color(card)=='red') return 2;
}
return -0.5;
}).judge2=function(result){
return result.bool;
};
"step 1"
if(result.bool){
player.addTempSkill("殇_1","damageAfter")
}
else
{
player.addTempSkill("殇_2","damageAfter")
}
},
ai:{
"directHit_ai":true,
skillTagFilter:function(player,tag,arg){
if(get.attitude(player,arg.target)>0||arg.card.name!='sha'||!ui.cardPile.firstChild||get.color(ui.cardPile.firstChild,player)!='red') return false;
},
},
sub:true,
},
},
}