Merge pull request #665 from mengxinzxz/PR-Branch

技能调整
This commit is contained in:
Spmario233 2023-11-24 00:32:34 +08:00 committed by GitHub
commit db979c97a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 147 additions and 360 deletions

View File

@ -12626,32 +12626,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
//十周年削弱版张让
junktaoluan:{
hiddenCard:function(player,name){
return !player.getStorage('junktaoluan').includes(name)&&player.countCards('hes',card=>!player.getStorage('junktaoluan2').includes(get.suit(card)))>0&&!player.hasSkill('junktaoluan3')&&lib.inpile.includes(name);
},
audio:'taoluan',
enable:'chooseToUse',
filter:function(event,player){
return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('junktaoluan3')&&player.countCards('hes',function(card){
return !player.storage.junktaoluan2.contains(get.suit(card));
return !player.hasSkill('junktaoluan3')&&player.countCards('hes',card=>{
return lib.inpile.some(name=>{
if(player.getStorage('junktaoluan2').includes(get.suit(card))) return false;
if(player.getStorage('junktaoluan').includes(name)) return false;
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
if(event.filterCard({name:name,isCard:true,cards:[card]})) return true;
if(name=='sha'){
for(var nature of lib.inpile_nature){
if(event.filterCard({name:name,nature:nature,isCard:true,cards:[card]})) return true;
}
}
return false;
});
})>0;
},
init:function(player){
if(!player.storage.junktaoluan) player.storage.junktaoluan=[];
if(!player.storage.junktaoluan2) player.storage.junktaoluan2=[];
},
chooseButton:{
dialog:function(event,player){
var list=[];
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
if(player.storage.junktaoluan.contains(name)) continue;
if(name=='sha'){
list.push(['基本','','sha']);
for(var j of lib.inpile_nature) list.push(['基本','',name,j]);
var list=[];
for(var name of lib.inpile){
if(get.type(name)=='basic'||get.type(name)=='trick'){
if(player.getStorage('junktaoluan').includes(name)) continue;
list.push([get.translation(get.type(name)),'',name]);
if(name=='sha'){
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
}
}
else if(get.type(name)=='trick') list.push(['锦囊','',name]);
else if(get.type(name)=='basic') list.push(['基本','',name]);
}
if(list.length==0){
return ui.create.dialog('滔乱已无可用牌');
}
return ui.create.dialog('滔乱',[list,'vcard']);
},
@ -12660,27 +12666,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
check:function(button){
var player=_status.event.player;
if(player.countCards('sh',button.link[2])>0) return 0;
if(button.link[2]=='wugu') return;
var effect=player.getUseValue(button.link[2]);
if(effect>0) return effect;
return 0;
var card={name:button.link[2],nature:button.link[3]};
if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0;
return _status.event.getParent().type=='phase'?player.getUseValue(card):1;
},
backup:function(links,player){
return {
filterCard:function(card,player){
return !player.storage.junktaoluan2.contains(get.suit(card));
return !player.getStorage('junktaoluan2').includes(get.suit(card));
},
audio:'taoluan',
selectCard:1,
popname:true,
check:function(card){
return 6-get.value(card);
return 7-get.value(card);
},
position:'hse',
viewAs:{name:links[0][2],nature:links[0][3]},
onuse:function(result,player){
player.storage.junktaoluan2.add(get.suit(result.cards[0],player));
player.markAuto('junktaoluan2',[get.suit(result.cards[0],player)]);
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.junktaoluan){
evt.junktaoluan=true;
@ -12689,11 +12692,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
evt.after.push(next);
next.player=player;
next.setContent(function(){
//player.storage.junktaoluan=[];
player.storage.junktaoluan2=[];
delete player.storage.junktaoluan2;
});
}
player.storage.junktaoluan.add(result.card.name);
player.markAuto('junktaoluan',[result.card.name]);
},
}
},
@ -12703,6 +12705,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
order:4,
save:true,
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag,arg){
if(!player.countCards('hes',card=>!player.getStorage('junktaoluan2').includes(get.suit(card)))||player.hasSkill('taoluan3')) return false;
if(tag=='respondSha'||tag=='respondShan'){
if(arg=='respond') return false;
return !player.getStorage('taoluan').includes(tag=='respondSha'?'sha':'shan');
}
return !player.getStorage('taoluan').includes('tao')||(!player.getStorage('taoluan').includes('jiu')&&arg==player);
},
result:{
player:function(player){
var players=game.filterPlayer();
@ -12716,7 +12729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
threaten:1.9,
},
group:['junktaoluan2','junktaoluan4','junktaoluan5']
group:'junktaoluan2',
},
junktaoluan2:{
trigger:{player:['useCardAfter','respondAfter']},
@ -12725,7 +12738,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
charlotte:true,
filter:function(event,player){
if(!game.hasPlayer(current=>current!=player)) return false;
return event.skill=='junktaoluan_backup'||event.skill=='junktaoluan5'||event.skill=='junktaoluan4';
return event.skill=='junktaoluan_backup';
},
content:function(){
'step 0'
@ -12764,117 +12777,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
junktaoluan3:{
charlotte:true,
trigger:{player:'phaseEnd'},
forced:true,
popup:false,
charlotte:true,
content:function(){
player.loseHp();
},
},
junktaoluan4:{
audio:'taoluan',
prompt:'将一张牌当做闪使用',
enable:'chooseToUse',
filter:function(event,player){
return player.countCards('hes',function(card){
return !player.storage.junktaoluan2.contains(get.suit(card));
})&&!player.storage.junktaoluan.contains('shan')&&!player.hasSkill('junktaoluan3');
},
onuse:function(result,player){
player.storage.junktaoluan2.add(get.suit(result.cards[0],player));
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.junktaoluan){
var next=game.createEvent('taoluan_clear');
_status.event.next.remove(next);
evt.after.push(next);
evt.junktaoluan=true;
next.player=player;
next.setContent(function(){
//player.storage.junktaoluan=[];
player.storage.junktaoluan2=[];
});
}
player.storage.junktaoluan.add('shan');
},
filterCard:function(card,player){
return !player.storage.junktaoluan2.contains(get.suit(card));
},
position:'hes',
selectCard:1,
viewAs:{name:'shan'},
check:function(card){
var player=_status.event.player;
var allshown=true,players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(players[i].ai.shown==0){
allshown=false;
}
if(players[i]!=player&&players[i].countCards('he')&&get.attitude(player,players[i])>0){
return 6-get.value(card);
}
}
return 0;
},
ai:{
skillTagFilter:function(player){
return player.countCards('hse')&&!player.storage.junktaoluan.contains('shan')&&!player.hasSkill('junktaoluan3');
},
threaten:1.5,
respondShan:true,
}
},
junktaoluan5:{
audio:'taoluan',
enable:'chooseToUse',
prompt:'将一张牌当做无懈可击使用',
filter:function(event,player){
return player.countCards('hes',function(card){
return !player.storage.junktaoluan2.contains(get.suit(card));
})&&(!player.storage.junktaoluan.contains('wuxie'))&&!player.hasSkill('junktaoluan3');
},
viewAsFilter:function(player){
return player.countCards('hes',function(card){
return !player.storage.junktaoluan2.contains(get.suit(card));
})&&(!player.storage.junktaoluan.contains('wuxie'))&&!player.hasSkill('junktaoluan3');
},
onuse:function(result,player){
player.storage.junktaoluan2.add(get.suit(result.cards[0],player));
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.junktaoluan){
evt.junktaoluan=true;
var next=game.createEvent('taoluan_clear');
_status.event.next.remove(next);
evt.after.push(next);
next.player=player;
next.setContent(function(){
//player.storage.junktaoluan=[];
player.storage.junktaoluan2=[];
});
}
player.storage.junktaoluan.add('wuxie');
},
filterCard:function(card,player){
return !player.storage.junktaoluan2.contains(get.suit(card));
},
position:'hse',
selectCard:1,
viewAs:{name:'wuxie'},
check:function(card){
var player=_status.event.player;
if(player.isPhaseUsing()) return 0;
var allshown=true,players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(players[i].ai.shown==0){
allshown=false;
}
if(players[i]!=player&&players[i].countCards('he')&&get.attitude(player,players[i])>0){
return 6-get.value(card);
}
}
return 0;
},
},
junktaoluan_backup:{charlotte:true},
nshuaishuang:{
@ -19022,9 +18932,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nshanlang_info:'准备阶段,你可以和至多三名角色拼点。然后若这些角色中有拼点牌唯一最大的角色,则你可以令该角色从牌堆中获得一张不符合“四象天阵”的牌。',
junktaoluan:'滔乱',
junktaoluan3:'滔乱',
junktaoluan4:'滔乱',
junktaoluan5:'滔乱',
junktaoluan_backup:'滔乱',
junktaoluan_info:'你可将一张牌当做任意一张基本牌或普通锦囊牌使用此牌不得是本局游戏你以此法使用过的牌且每回合每种花色限一次然后你令一名其他角色选择一项1.交给你一张与“滔乱”声明的牌类别不同的牌2.本回合“滔乱”失效且回合结束时你失去1点体力。',
ns_caimao:'蔡瑁',

View File

@ -1212,7 +1212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target.turnOver(false);
},
getNum:function(player){
return Math.max(1,4+player.countCards('e'));
return Math.max(2,Math.floor(4-player.countCards('e',card=>get.subtype(card)!='equip5')/2));
},
ai:{
expose:0.2,
@ -15702,7 +15702,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mbhuiyao:'慧夭',
mbhuiyao_info:'出牌阶段限一次。你可以受到1点无来源伤害然后你选择一名其他角色令其视为对另一名角色造成过1点伤害。',
mbquesong:'雀颂',
mbquesong_info:'一名角色的结束阶段若你于本回合受到过伤害你可以令一名角色选择一项1.摸X张牌并复原武将牌X为4+其装备区牌数且X至少为12.回复1点体力。',
mbquesong_info:'一名角色的结束阶段若你于本回合受到过伤害你可以令一名角色选择一项1.摸X张牌并复原武将牌X为4-其装备区非宝物牌牌数的一半X向下取整且至少为22.回复1点体力。',
xin_yuanshao:'手杀界袁绍',
xin_yuanshao_prefix:'手杀界',
re_baosanniang:'手杀鲍三娘',

View File

@ -637,6 +637,7 @@ window.noname_character_rank={
'pangshanmin',
'kuaiqi',
'shen_huatuo',
'dc_guansuo',
],
bp:[
'chess_diaochan',
@ -1317,6 +1318,7 @@ window.noname_character_rank={
'laimin',
'baoxin',
'mb_xianglang',
'lvboshe',
],
bm:[
'diy_xizhenxihong',
@ -1798,6 +1800,7 @@ window.noname_character_rank={
'ol_wanglang',
'xin_guozhao',
'shichangshi',
'dc_guansuo',
],
epic:[
'ol_pengyang',
@ -2062,6 +2065,8 @@ window.noname_character_rank={
'star_caoren',
'star_yuanshu',
'clan_xunyou',
'lvboshe',
'yj_zhoubuyi',
],
rare:[
'luoxian',

View File

@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'sb',
connect:true,
character:{
sb_huangyueying:['female','shu',3,['sbqicai','sbjizhi']],
sb_huangyueying:['female','shu',3,['sbjizhi','sbqicai']],
sb_sp_zhugeliang:['male','shu',3,['sbhuoji','sbkanpo']],
sb_zhugeliang:['male','shu',3,['sbguanxing','sbkongcheng'],['unseen']],
sb_zhanghe:['male','wei',4,['sbqiaobian']],
@ -574,9 +574,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
]).set('prompt','观星:点击将牌移动到牌堆顶').set('processAI',function(list){
var cards=list[0][1].slice(),player=_status.event.player;
var name=_status.event.getTrigger().name;
var target=(name=='phaseZhunbei'?player:target);
var target=(name=='phaseZhunbei'?player:player.getNext());
var judges=target.getCards('j');
var top=[],att=get.sgn(get.attitude(player,target));
if(att!=0&&(target!=player||!player.hasWuxie())){
if(judges.length&&att!=0&&(target!=player||!player.hasWuxie())){
for(var i=0;i<judges.length;i++){
var judge=get.judge(judges[i])*att;
cards.sort((a,b)=>judge(b)-judge(a));
@ -762,7 +763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
discard:false,
lose:false,
delay:0,
usable:3,
usable:2,
prompt:'将一张红色牌交给一名角色并令其获得此花色的“天香”标记',
content:function(){
player.give(cards,target);
@ -5714,7 +5715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sb_xiaoqiao:'谋小乔',
sb_xiaoqiao_prefix:'谋',
sbtianxiang:'天香',
sbtianxiang_info:'①出牌阶段限你可以交给一名没有“天香”标记的其他角色一张红色牌然后令其获得此牌花色的“天香”标记。②当你受到伤害时你可以移去一名角色的“天香”标记若此“天香”标记为红桃你防止此伤害其受到伤害来源对其造成的1点伤害若没有伤害来源则改为无来源伤害方片其交给你两张牌。③准备阶段你移去场上所有的“天香”标记然后摸等量的牌。',
sbtianxiang_info:'①出牌阶段限你可以交给一名没有“天香”标记的其他角色一张红色牌然后令其获得此牌花色的“天香”标记。②当你受到伤害时你可以移去一名角色的“天香”标记若此“天香”标记为红桃你防止此伤害其受到伤害来源对其造成的1点伤害若没有伤害来源则改为无来源伤害方片其交给你两张牌。③准备阶段你移去场上所有的“天香”标记然后摸等量的牌。',
sb_sp_zhugeliang:'谋诸葛亮',
sb_sp_zhugeliang_prefix:'谋',
sb_zhugeliang:'谋诸葛亮',

View File

@ -1428,6 +1428,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
filter:function(event,player){
if(!player.countCards('h')) return false;
var num=player.countCards('h')%2;
return !player.hasSkill('yanru_'+num);
},

View File

@ -12,7 +12,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
old_re_lidian:['male','wei',3,['xunxun','wangxi']],
old_re_lidian:['male','wei',3,['xunxun','wangxi'],['die_audio:lidian']],
ganfuren:['female','shu',3,['stdshushen','shenzhi']],
std_panfeng:['male','qun',4,['stdkuangfu']],
caocao:['male','wei',4,['jianxiong','hujia'],['zhu']],

View File

@ -2675,29 +2675,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
xintaoluan:{
hiddenCard:function(player,name){
return !player.getStorage('xintaoluan').includes(name)&&player.countCards('hes')>0&&!player.hasSkill('xintaoluan3')&&lib.inpile.includes(name);
},
audio:'taoluan',
enable:'chooseToUse',
filter:function(event,player){
return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('xintaoluan3')&&player.countCards('hes')>0&&!_status.dying.length;
},
init:function(player){
if(!player.storage.xintaoluan) player.storage.xintaoluan=[];
return !player.hasSkill('xintaoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
if(player.getStorage('xintaoluan').includes(name)) return false;
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
if(event.filterCard({name:name,isCard:true,cards:[card]})) return true;
if(name=='sha'){
for(var nature of lib.inpile_nature){
if(event.filterCard({name:name,nature:nature,isCard:true,cards:[card]})) return true;
}
}
return false;
}))>0&&!_status.dying.length;
},
chooseButton:{
dialog:function(event,player){
var list=[];
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
if(player.storage.xintaoluan.contains(name)) continue;
if(name=='sha'){
list.push(['基本','','sha']);
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
for(var name of lib.inpile){
if(get.type(name)=='basic'||get.type(name)=='trick'){
if(player.getStorage('xintaoluan').includes(name)) continue;
list.push([get.translation(get.type(name)),'',name]);
if(name=='sha'){
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
}
}
else if(get.type(name)=='trick') list.push(['锦囊','',name]);
else if(get.type(name)=='basic') list.push(['基本','',name]);
}
if(list.length==0){
return ui.create.dialog('滔乱已无可用牌');
}
return ui.create.dialog('滔乱',[list,'vcard']);
},
@ -2706,20 +2712,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
check:function(button){
var player=_status.event.player;
if(player.countCards('hs',button.link[2])>0) return 0;
if(button.link[2]=='wugu') return;
var effect=player.getUseValue(button.link[2]);
if(effect>0) return effect;
return 0;
var card={name:button.link[2],nature:button.link[3]};
if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0;
return _status.event.getParent().type=='phase'?player.getUseValue(card):1;
},
backup:function(links,player){
return {
filterCard:true,
audio:'taoluan',
selectCard:1,
popname:true,
check:function(card){
return 6-get.value(card);
return 7-get.value(card);
},
position:'hes',
viewAs:{name:links[0][2],nature:links[0][3]},
@ -2727,16 +2730,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.xintaoluan){
evt.xintaoluan=true;
var next=game.createEvent('taoluan_clear');
var next=game.createEvent('xintaoluan_clear');
_status.event.next.remove(next);
evt.after.push(next);
next.player=player;
next.setContent(function(){
player.storage.xintaoluan=[];
delete player.storage.xintaoluan;
delete player.storage.xintaoluan2;
});
}
player.storage.xintaoluan.add(result.card.name);
player.markAuto('xintaoluan',[result.card.name]);
},
}
},
@ -2746,12 +2749,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
order:4,
save:true,
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag,arg){
if(!player.countCards('hes')||player.hasSkill('taoluan3')) return false;
if(tag=='respondSha'||tag=='respondShan'){
if(arg=='respond') return false;
return !player.getStorage('taoluan').includes(tag=='respondSha'?'sha':'shan');
}
return !player.getStorage('taoluan').includes('tao')||(!player.getStorage('taoluan').includes('jiu')&&arg==player);
},
result:{
player:function(player){
if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0;
var num=player.countMark('xintaoluan2');
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(players[i]!=player&&players[i].countCards('he')>((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){
if(players[i]!=player&&players[i].countCards('he')>((num+1)*2)&&get.attitude(player,players[i])>0){
return 1;
}
}
@ -2760,7 +2774,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
threaten:1.9,
},
group:['xintaoluan2','xintaoluan4','xintaoluan5']
group:'xintaoluan2',
},
xintaoluan2:{
trigger:{player:['useCardAfter','respondAfter']},
@ -2769,13 +2783,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
charlotte:true,
filter:function(event,player){
if(!game.hasPlayer(current=>current!=player)) return false;
return event.skill=='xintaoluan_backup'||event.skill=='xintaoluan5'||event.skill=='xintaoluan4';
return event.skill=='xintaoluan_backup';
},
content:function(){
'step 0'
if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0;
if(player.storage.xintaoluan2<3) player.storage.xintaoluan2++;
event.num=player.storage.xintaoluan2;
player.addMark('xintaoluan2',1,false);
event.num=player.countMark('xintaoluan2');
player.chooseTarget(true,function(card,player,target){
return target!=player;
},'滔乱<br><br><div class="text center">令一名其他角色选择一项1.交给你'+get.cnNumber(event.num)+'张与你以此法使用的牌类别相同的牌2.你失去'+get.cnNumber(event.num)+'点体力').set('ai',function(target){
@ -2813,108 +2826,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
xintaoluan3:{charlotte:true},
xintaoluan4:{
audio:'taoluan',
prompt:'将一张牌当做闪使用',
enable:'chooseToUse',
filter:function(event,player){
return player.countCards('hes')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3')&&!_status.dying.length;
},
onuse:function(result,player){
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.xintaoluan){
var next=game.createEvent('taoluan_clear');
_status.event.next.remove(next);
evt.after.push(next);
evt.xintaoluan=true;
next.player=player;
next.setContent(function(){
player.storage.xintaoluan=[];
delete player.storage.xintaoluan2;
});
}
player.storage.xintaoluan.add('shan');
},
filterCard:true,
position:'hes',
selectCard:1,
viewAs:{name:'shan'},
check:function(card){
var player=_status.event.player;
if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0;
var allshown=true,players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(players[i].ai.shown==0){
allshown=false;
}
if(players[i]!=player&&players[i].countCards('he')>((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){
return 6-get.value(card);
}
}
return 0;
},
ai:{
skillTagFilter:function(player){
return player.countCards('hes')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3');
},
threaten:1.5,
respondShan:true,
}
},
xintaoluan5:{
audio:'taoluan',
enable:'chooseToUse',
prompt:'将一张牌当做无懈可击使用',
filter:function(event,player){
return player.countCards('hes')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length;
},
viewAsFilter:function(player){
return player.countCards('hes')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length;
},
onuse:function(result,player){
var evt=_status.event.getParent('phase');
if(evt&&evt.name=='phase'&&!evt.xintaoluan){
evt.xintaoluan=true;
var next=game.createEvent('taoluan_clear');
_status.event.next.remove(next);
evt.after.push(next);
next.player=player;
next.setContent(function(){
player.storage.xintaoluan=[];
delete player.storage.xintaoluan2;
});
}
player.storage.xintaoluan.add('wuxie');
},
filterCard:true,
position:'hes',
selectCard:1,
viewAs:{name:'wuxie'},
check:function(card){
var player=_status.event.player;
if(player.isPhaseUsing()) return 0;
if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0;
var allshown=true,players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(players[i].ai.shown==0){
allshown=false;
}
if(players[i]!=player&&players[i].countCards('he')>((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){
return 6-get.value(card);
}
}
return 0;
},
},
xintaoluan6:{
trigger:{global:'phaseAfter'},
silent:true,
charlotte:true,
content:function(){
player.storage.xintaoluan=[];
player.storage.xintaoluan2=0;
},
},
xintaoluan_backup:{},
xincaishi:{
trigger:{
@ -5346,33 +5257,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
taoluan:{
hiddenCard:function(player,name){
return !player.getStorage('taoluan').includes(name)&&player.countCards('hes')>0&&!player.hasSkill('taoluan3')&&lib.inpile.includes(name);
},
audio:2,
enable:'chooseToUse',
filter:function(event,player){
return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('taoluan3')&&player.countCards('hes')>0;//&&!_status.dying.length;
},
hiddenCard:function(player,name){
return (!player.getStorage('taoluan').contains(name)&&player.countCards('hes')>0&&!player.hasSkill('taoluan3')&&lib.inpile.contains(name));
},
init:function(player){
if(!player.storage.taoluan) player.storage.taoluan=[];
return !player.hasSkill('taoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
if(player.getStorage('taoluan').includes(name)) return false;
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
if(event.filterCard({name:name,isCard:true,cards:[card]})) return true;
if(name=='sha'){
for(var nature of lib.inpile_nature){
if(event.filterCard({name:name,nature:nature,isCard:true,cards:[card]})) return true;
}
}
return false;
}))>0;
},
onremove:true,
chooseButton:{
dialog:function(event,player){
var list=[];
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
if(player.storage.taoluan&&player.storage.taoluan.contains(name)) continue;
if(name=='sha'){
list.push(['基本','','sha']);
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
for(var name of lib.inpile){
if(get.type(name)=='basic'||get.type(name)=='trick'){
if(player.getStorage('taoluan').includes(name)) continue;
list.push([get.translation(get.type(name)),'',name]);
if(name=='sha'){
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
}
}
else if(get.type(name)=='trick') list.push(['锦囊','',name]);
else if(get.type(name)=='basic') list.push(['基本','',name]);
}
if(list.length==0){
return ui.create.dialog('滔乱已无可用牌');
}
return ui.create.dialog('滔乱',[list,'vcard']);
},
@ -5381,25 +5295,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
check:function(button){
var player=_status.event.player;
if(player.countCards('hs',button.link[2])>0) return 0;
if(button.link[2]=='wugu') return 0;
var effect=player.getUseValue(button.link[2]);
if(effect>0) return effect;
return 0;
var card={name:button.link[2],nature:button.link[3]};
if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0;
return _status.event.getParent().type=='phase'?player.getUseValue(card):1;
},
backup:function(links,player){
return {
filterCard:true,
audio:'taoluan',
selectCard:1,
filterCard:true,
popname:true,
check:function(card){
return 6-get.value(card);
return 7-get.value(card);
},
position:'hes',
viewAs:{name:links[0][2],nature:links[0][3]},
onuse:function(result,player){
player.storage.taoluan.add(result.card.name);
player.markAuto('taoluan',[result.card.name]);
},
}
},
@ -5408,11 +5319,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
ai:{
skillTagFilter:function(player){
save:true,
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag,arg){
if(!player.countCards('hes')||player.hasSkill('taoluan3')) return false;
if(!player.storage.taoluan.contains('tao')){ /* empty */ }
else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){ /* empty */ }
else return false;
if(tag=='respondSha'||tag=='respondShan'){
if(arg=='respond') return false;
return !player.getStorage('taoluan').includes(tag=='respondSha'?'sha':'shan');
}
return !player.getStorage('taoluan').includes('tao')||(!player.getStorage('taoluan').includes('jiu')&&arg==player);
},
order:4,
result:{
@ -5432,17 +5348,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
threaten:1.9,
},
group:['taoluan2','taoluan4','taoluan5']
group:'taoluan2',
},
taoluan2:{
trigger:{player:['useCardAfter','respondAfter']},
forced:true,
popup:false,
charlotte:true,
trigger:{player:'useCardAfter'},
filter:function(event,player){
if(!game.hasPlayer(current=>current!=player)) return false;
return event.skill=='taoluan_backup'||event.skill=='taoluan5'||event.skill=='taoluan4';
return event.skill=='taoluan_backup';
},
forced:true,
popup:false,
content:function(){
'step 0'
player.chooseTarget(true,function(card,player,target){
@ -5482,43 +5398,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
taoluan3:{charlotte:true},
taoluan4:{
audio:'taoluan',
prompt:'将一张牌当做闪使用',
enable:'chooseToUse',
filter:function(event,player){
return !player.getStorage('taoluan').contains('shan')&&!player.hasSkill('taoluan3')&&player.countCards('hes');//&&!_status.dying.length;
},
onuse:function(result,player){
player.storage.taoluan.add('shan');
},
filterCard:true,
position:'hes',
selectCard:1,
viewAs:{name:'shan'},
ai:{
skillTagFilter:function(player){
return player.countCards('hes')&&!player.getStorage('taoluan').contains('shan')&&!player.hasSkill('taoluan3');
},
threaten:1.5,
respondShan:true,
}
},
taoluan5:{
audio:'taoluan',
enable:'chooseToUse',
prompt:'将一张牌当做无懈可击使用',
viewAsFilter:function(player){
return !player.getStorage('taoluan').contains('wuxie')&&!player.hasSkill('taoluan3')&&player.countCards('hes');
},
onuse:function(result,player){
player.storage.taoluan.add('wuxie');
},
filterCard:true,
position:'hes',
selectCard:1,
viewAs:{name:'wuxie'},
},
taoluan_backup:{},
jishe:{
audio:2,
@ -14238,15 +14117,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lianhuo_info:'锁定技,当你受到火焰伤害时,若你的武将牌处于横置状态且此伤害不为连环伤害,则此伤害+1。',
taoluan:'滔乱',
taoluan_backup:'滔乱',
taoluan4:'滔乱',
taoluan5:'滔乱',
taoluan_backup:'滔乱',
taoluan_info:'你可以将一张牌当做任意一张基本牌或普通锦囊牌使用此牌不得是本局游戏你以此法使用过的牌然后你令一名其他角色选择一项1.交给你一张与你以此法使用的牌类别不同的牌2.你失去1点体力且〖滔乱〗无效直到回合结束。',
xintaoluan:'滔乱',
xintaoluan_backup:'滔乱',
xintaoluan4:'滔乱',
xintaoluan5:'滔乱',
xintaoluan_backup:'滔乱',
xintaoluan_info:'若场上没有濒死的角色则你可以将一张牌当做任意一张基本牌或普通锦囊牌使用此牌不得是本回合内你以此法使用过的牌然后你令一名其他角色选择一项1.交给你X张与你以此法使用的牌类别不同的牌2.你失去X点体力且滔乱无效直到回合结束X为你本回合内发动过〖滔乱〗的次数且至多为3。',
jiaozhao:'矫诏',
jiaozhao3:'矫诏',