求教,缝合了一个转化任意牌的联动技能,不知道为什么回合外需要打出“无懈可击”的时候不能触发技能,但如果手里有无懈的话是可以用技能转化无懈打出去。
"hxf_rendian":{
enable:["chooseToUse","chooseToRespond"],
direct:true,
usable:1,
filter:function(event,player){
return player.countCards('h');
},
chooseButton:{
dialog:function(){
var player=_status.event.player;
var list=[];
list.push(['基本','','sha']);
list.push(['基本','','sha','thunder']);
list.push(['基本','','sha','fire']);
list.push(['基本','','shan']);
list.push(['基本','','tao']);
list.push(['基本','','jiu']);
for(var i=0;i<player.getStorage('hxf_shenyuan').length;i++){
var name=player.getStorage('hxf_shenyuan')[i];
if(get.type2(name)=='trick') list.push(['锦囊','',name]);
}
return ui.create.dialog('〖深渊〗已记录',[list,'vcard']);
},
check:function(button){
if(_status.event.getParent().type!='phase') return 1;
var player=_status.event.player;
return player.getUseValue({
name:button.link[2],
nature:button.link[3],
});
},
backup:function(links,player){
return {
filterCard:true,
popname:true,
viewAs:{name:links[0][2],nature:links[0][3]},
precontent:function(){
player.logSkill('hxf_rendian');
},
};
},
prompt:function(links,player){
return '将一张手牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用';
},
},
},
下面是记录锦囊牌的技能
"hxf_shenyuan":{
forced:true,
trigger:{
global:"gameStart",
},
content:function(){
player.markAuto('hxf_shenyuan',['wuxie']);
player.markAuto('hxf_shenyuan',['wuzhong']);
player.markAuto('hxf_shenyuan',['guohe']);
},
intro:{
content:"已记录牌名:$",
},
group:"hxf_shenyuan_add",
subSkill:{
add:{
trigger:{
player:"phaseBegin",
},
filter:function(event,player){
return player.getStorage('hxf_shenyuan').length<15;
},
direct:true,
content:function(){
'step 0'
var dialog=[get.prompt('hxf_shenyuan')];list1=player.getStorage('hxf_shenyuan'),list2=lib.inpile.filter(function(i){
return get.type2(i,false)=='trick'&&!list1.contains(i);
});
if(list2.length){
dialog.push('<div class="text center">〖深渊〗未记录</div>');
dialog.push([list2,'vcard']);
}
player.chooseButton(dialog).set('ai',function(button){});
'step 1'
if(result.bool){
player.logSkill('hxf_shenyuan');
var name=result.links[0][2];
player.markAuto('hxf_shenyuan',[name]);
game.log(player,'向〖深渊〗记录中添加了','#y'+get.translation(name));
game.delayx();
}
},
sub:true,
},
},
},
