Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2023-10-26 22:45:25 +08:00 committed by GitHub
commit fb3bb3521e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 299 additions and 106 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/die/re_wangyi.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,17 +21,99 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clan_zhonghui:['male','wei','3/4',['clanyuzhi','clanxieshu','clanbaozu'],['clan:颍川钟氏']],
clan_zhongyu:['male','wei',3,['clanjiejian','clanhuanghan','clanbaozu'],['clan:颍川钟氏']],
clan_wanglun:['male','wei',3,['clanqiuxin','clanjianyuan','clanzhongliu'],['clan:太原王氏']],
clan_xunyou:['male','wei',3,['clanbaichu','clandaojie'],['clan:颍川荀氏']],
},
characterSort:{
clan:{
clan_wu:['clan_wuxian','clan_wuban','clan_wukuang'],
clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan'],
clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan','clan_xunyou'],
clan_han:['clan_hanshao','clan_hanrong'],
clan_wang:['clan_wangling','clan_wangyun','clan_wanghun','clan_wanglun'],
clan_zhong:['clan_zhongyan','clan_zhonghui','clan_zhongyu'],
},
},
skill:{
//族荀攸
clanbaichu:{
derivation:'qice',
audio:2,
trigger:{player:'useCardAfter'},
filter:function(event,player){
if(player.getStorage('clanbaichu').contains(event.card.name)) return true;
if(get.suit(event.card)=='none') return false;
var str=(get.suit(event.card)+'、'+get.type2(event.card));
if(!player.getStorage('clanbaichu').contains(str)) return true;
return !player.hasSkill('qice');
},
forced:true,
content:function(){
'step 0'
if(player.getStorage('clanbaichu').contains(trigger.card.name)){
event.draw=true;
}
if(get.suit(trigger.card)!='none'){
var str=(get.suit(trigger.card)+'+'+get.type2(trigger.card));
if(player.getStorage('clanbaichu').contains(str)){
if(!player.hasSkill('qice')){
player.addTempSkill('qice','roundStart');
player.popup('奇策');
game.log(player,'获得了技能','#g【奇策】');
}
event.goto(2);
}
else{
player.markAuto('clanbaichu',[str]);
var list=lib.inpile.filter(name=>get.type(name)=='trick'&&!player.getStorage('clanbaichu').contains(name));
if(list.length){
var dialog=['请选择【百出】记录的普通锦囊牌牌名',[list,'vcard']];
player.chooseButton(dialog,true).set('ai',function(button){
var player=_status.event.player,name=button.link[2];
if(name=='wuxie') return 114514;
return get.effect(player,{name:name},player,player)*(1+player.countCards('hs',name));
});
}
else event.goto(2);
}
}
else event.goto(2);
'step 1'
if(result.bool){
var name=result.links[0][2];
player.markAuto('clanbaichu',[name]);
player.popup(get.translation(name));
game.log(player,'记录中了','#y'+get.translation(name));
game.delayx();
}
'step 2'
if(event.draw) player.chooseDrawRecover(true);
},
intro:{
markcount:()=>0,
content:function(storage){
var str='<span class="text center">';
var list=storage.filter(str=>str.includes('+'));
var cards=storage.filter(str=>!list.contains(str));
if(list.length){
str+='<li>已记录的花色点数组合:';
list.forEach(strx=>{
var listx=strx.split('+');
str+='<br>';
str+=get.translation(listx[0]);
str+='+';
str+=get.translation(listx[1]);
});
}
if(list.length&&cards.length) str+='<br>';
if(cards.length){
str+='<li>已记录的普通锦囊牌名:';
str+='<br>';
str+=get.translation(cards);
}
str+='</span>';
return str;
},
},
},
//族王沦
clanqiuxin:{
audio:2,
@ -2191,7 +2273,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
clandaojie:{
audio:2,
audioname:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan'],
audioname:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan','clan_xunyou'],
trigger:{player:'useCardAfter'},
filter:function(event,player){
return get.type(event.card,null,false)=='trick'&&!get.tag(event.card,'damage')&&event.cards.filterInD().length>0&&player.getHistory('useCard',evt=>{
@ -2446,7 +2528,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
characterReplace:{
wuban:['clan_wuban','dc_wuban','wuban'],
wuban:['clan_wuban','dc_wuban','wuban','xin_wuban'],
},
characterIntro:{
xunshu:'荀淑83年149年字季和为郎陵侯相颍川颍阴人今河南省许昌市人。汉和帝至汉桓帝时人物以品行高洁著称。有子八人号八龙。年轻时有高尚的德行学问渊博不喜欢雕章琢句徒在文字上用功不注重实际的学识。因此常常被俗儒看不起。但州里却称他有知人之明。安帝时征召任为郎中后来再升当涂长。离职还乡里。他的孙子荀彧是曹操部下著名的谋士。',
@ -2490,6 +2572,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clan_zhonghui_prefix:'族',
clan_zhongyu_prefix:'族',
clan_wanglun_prefix:'族',
clan_xunyou_prefix:'族',
clan_wuxian:'族吴苋',
clanyirong:'移荣',
@ -2580,6 +2663,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clanqiuxin_info:'出牌阶段限一次,你可以令一名其他角色选择一项:①你对其使用【杀】;②你对其使用任意普通锦囊牌。当你执行其选择的选项后,你视为执行另一项。',
clanjianyuan:'简远',
clanjianyuan_info:'当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其本阶段的使用牌数。',
clan_xunyou:'族荀攸',
clanbaichu:'百出',
clanbaichu_info:'锁定技当你使用一张牌结算完毕后若你未记录过此牌的点数和类型组合则你记录此组合并记录一个普通锦囊牌名否则你于本轮获得技能〖奇策〗已记录此牌牌名你回复1点体力或摸一张牌。',
clan_wu:'陈留·吴氏',
clan_xun:'颍川·荀氏',

View File

@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
connect:true,
characterSort:{
mobile:{
mobile_default:['xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi'],
mobile_default:['yanxiang','xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi'],
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan','yj_zhoubuyi'],
mobile_standard:["xin_xiahoudun","xin_zhangfei"],
mobile_shenhua_feng:['re_xiaoqiao',"xin_zhoutai"],
@ -26,6 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
yanxiang:['male','qun',3,['kujian','twruilian'],['character:tw_yanxiang','die_audio:tw_yanxiang']],
mb_sunluyu:['female','wu',3,['mbmeibu','mbmumu']],
xin_wuban:['male','shu',4,['xinjintao'],['clan:陈留吴氏','character:wuban']],
baoxin:['male','qun',4,['mutao','yimou'],['character:tw_baoxin','die_audio:tw_baoxin']],
@ -387,6 +388,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//阎象
kujian:{
audio:'twkujian',
inherit:'twkujian',
selectCard:[1,2],
content:function(){
player.give(cards,target).gaintag.add('twkujianx');
player.addSkill('kujian_draw');
player.addSkill('twkujian_discard');
},
subSkill:{
draw:{
charlotte:true,
audio:'twkujian',
trigger:{global:['useCardAfter','respondAfter']},
filter:function(event,player){
return event.player.hasHistory('lose',evt=>{
if(event!=evt.getParent()) return false;
for(var i in evt.gaintag_map){
if(evt.gaintag_map[i].contains('twkujianx')) return true;
}
});
},
forced:true,
logTarget:'player',
content:function(){
'step 0'
game.asyncDraw([player,trigger.player],2);
'step 1'
game.delayx();
},
},
},
},
//手杀差异化孙鲁育
mbmumu:{
audio:'mumu',
@ -1086,14 +1121,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else event.finish();
'step 2'
var suit=result.control;
event.suit=suit;
player.chat(get.translation(suit+2));
game.log(player,'选择了','#y'+get.translation(suit+2));
if(target.countCards('e',{suit:suit})) player.gain(target.getCards('e',{suit:suit}),target,'giveAuto');
'step 3'
var suit=event.suit;
if(target.countCards('h',{suit:suit})){
player.chooseButton(['选择获得其中一张牌',target.getCards('h',{suit:suit})],true).set('ai',button=>get.value(button.link));
}
else event.goto(5);
'step 4'
if(result.bool){
var card=result.links[0];
if(lib.filter.canBeGained(card,player,target)) player.gain(card,target,'giveAuto','bySelf');
else game.log('但',card,'不能被',player,'获得!');
}
'step 5'
var suit=event.suit;
player.storage.yichong=suit;
player.markSkill('yichong');
game.broadcastAll(function(player,suit){
if(player.marks.yichong) player.marks.yichong.firstChild.innerHTML=get.translation(suit);
},player,suit);
if(target.countCards('he',{suit:suit})) player.gain(target.getCards('he',{suit:suit}),target,'giveAuto');
game.countPlayer(function(current){
current.removeSkill('yichong_'+player.playerid);
if(current==target) target.addSkill('yichong_'+player.playerid);
@ -15396,7 +15446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xin_guozhao:'手杀郭照',
xin_guozhao_prefix:'手杀',
yichong:'易宠',
yichong_info:'①准备阶段,你可以选择一名其他角色并选择一个花色,然后你获得其所有此花色的牌,移除场上的所有“雀”标记,令其获得“雀”标记直到你的下个回合开始。②拥有“雀”标记的角色获得你最后一次发动〖易宠①〗选择的花色的牌后,你获得这些牌(你至多通过每个“雀”得到一张牌)。',
yichong_info:'①准备阶段,你可以选择一名其他角色并选择一个花色,然后你获得其所有此花色的装备牌和其一张此花色的手牌,移除场上的所有“雀”标记,令其获得“雀”标记直到你的下个回合开始。②拥有“雀”标记的角色获得你最后一次发动〖易宠①〗选择的花色的牌后,你获得这些牌(你至多通过每个“雀”得到一张牌)。',
wufei:'诬诽',
wufei_info:'若场上存在拥有“雀”标记的角色A①当你使用【杀】或伤害类锦囊牌指定第一个目标后你令A成为此牌伤害来源。②当你受到伤害后若A的体力值大于3则你可以令A受到1点无来源伤害。',
yj_zhoubuyi:'☆周不疑',
@ -15467,6 +15517,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mbmeibu_info:'其他角色的出牌阶段开始时若你在其攻击范围内你可以弃置一张牌令该角色于本回合内获得〖止息〗。若你以此法弃置的牌不是【杀】或黑色锦囊牌则本回合其与你的距离视为1。',
mbzhixi:'止息',
mbzhixi_info:'锁定技。出牌阶段若你于此阶段使用过的牌数不小于X你不能使用牌X为你的体力值当你使用锦囊牌时你结束此阶段。',
yanxiang:'阎象',
kujian:'苦谏',
kujian_info:'出牌阶段限一次,你可以将至多两张手牌称为“谏”并交给一名其他角色,然后你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸两张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。',
mobile_standard:'手杀异构·标准包',
mobile_shenhua_feng:'手杀异构·其疾如风',

View File

@ -72,7 +72,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xin_lingtong:['male','wu',4,['decadexuanfeng','yongjin']],
xin_liubiao:['male','qun',3,['decadezishou','decadezongshi']],
re_caoxiu:['male','wei',4,['qianju','reqingxi']],
re_sunxiu:['male','wu',3,['reyanzhu','rexingxue','xinzhaofu'],['zhu']],
re_sunxiu:['male','wu',3,['reyanzhu','rexingxue','zhaofu'],['zhu']],
ol_dengai:['male','wei',4,['oltuntian','olzaoxian']],
re_gongsunzan:['male','qun',4,['reqiaomeng','reyicong']],
re_manchong:['male','wei',3,['rejunxing','yuce']],
@ -935,6 +935,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var skills=player.additionalSkills['relinglong'];
return (skills&&skills.length>0)!=player.hasEmptySlot(5);
},
direct:true,
content:function(){
player.removeAdditionalSkill('relinglong');
if(player.hasEmptySlot(5)){
@ -6206,7 +6207,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
//界曹彰
xinjiangchi:{
audio:'new_jiangchi',
audio:2,
trigger:{player:'phaseUseBegin'},
direct:true,
content:function(){
@ -11095,7 +11096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('xinleiji');
player.recover();
}
player.chooseTarget('雷击:是否对一名角色造成'+event.num+'点雷电伤害?',lib.filter.notMe).ai=function(target){
player.chooseTarget('雷击:是否对一名角色造成'+event.num+'点雷电伤害?').ai=function(target){
var player=_status.event.player;
return get.damageEffect(target,player,player,'thunder');
};
@ -14736,7 +14737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xinleiji:'雷击',
xinleiji_misa:'雷击',
xinguidao:'鬼道',
xinleiji_info:'①当你使用【闪】或【闪电】,或打出【闪】时,你可以进行判定。②当你的判定的判定牌生效后,若结果为:黑桃,你可对一名其他角色造成2点雷电伤害梅花你回复1点体力并可对一名其他其他角色造成1点雷电伤害。',
xinleiji_info:'①当你使用【闪】或【闪电】,或打出【闪】时,你可以进行判定。②当你的判定的判定牌生效后,若结果为:黑桃,你可对一名角色造成2点雷电伤害梅花你回复1点体力并可对一名角色造成1点雷电伤害。',
xinleiji_append:'<span style="font-family:yuanli">不能触发〖雷击〗的判定:〖暴虐〗、〖助祭〗、<br>〖弘仪〗、〖孤影〗。</span>',
xinleiji_faq:'不能触发〖雷击〗的判定',
xinleiji_faq_info:'<br>董卓/界董卓〖暴虐〗<br>黄巾雷使〖助祭〗<br>羊徽瑜〖弘仪〗<br>鸣濑白羽〖孤影〗',

View File

@ -3237,8 +3237,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbguidao:{
audio:2,
trigger:{
global:[/*'phaseBefore',*/'damageEnd'],
//player:'enterGame',
global:['phaseBefore','damageEnd'],
player:'enterGame',
},
forced:true,
locked:false,
@ -3320,9 +3320,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return true;
},
content:function(){
player.addMark('sbguidao',1);
var num=Math.min(8-player.countMark('sbhuangtian_count'),2);
player.addMark('sbguidao',num);
player.addTempSkill('sbhuangtian_count','roundStart');
player.addMark('sbhuangtian_count',1,false);
player.addMark('sbhuangtian_count',num,false);
}
},
count:{onremove:true}
@ -4980,9 +4981,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbleiji:'雷击',
sbleiji_info:'出牌阶段你可以选择一名其他角色并弃4枚“道兵”对其造成1点雷电伤害。',
sbguidao:'鬼道',
sbguidao_info:'①一名角色受到属性伤害后你获得2枚“道兵”。②当你受到伤害时你可以弃2枚“道兵”并防止此伤害。然后若当前回合角色不为你〖鬼道①〗于你下回合开始前无效。③“道兵”上限为8。',
sbguidao_info:'①游戏开始时/一名角色受到属性伤害后,你获得4/2枚“道兵”。②当你受到伤害时你可以弃2枚“道兵”并防止此伤害。然后若当前回合角色不为你〖鬼道①〗于你下回合开始前无效。③“道兵”上限为8。',
sbhuangtian:'黄天',
sbhuangtian_info:'主公技锁定技。①回合开始时若本回合为你的第一个回合且游戏轮数为1且游戏内没有【太平要术】你装备【太平要术】。②其他群势力角色造成伤害后若你拥有〖鬼道〗你获得1枚“道兵”每轮你至多以此法获得4枚“道兵”。',
sbhuangtian_info:'主公技锁定技。①回合开始时若本回合为你的第一个回合且游戏轮数为1且游戏内没有【太平要术】你装备【太平要术】。②其他群势力角色造成伤害后若你拥有〖鬼道〗你获得2枚“道兵”每轮你至多以此法获得4枚“道兵”。',
sb_caocao:'谋曹操',
sbjianxiong:'奸雄',
sbjianxiong_info:'①游戏开始时你可获得至多2枚“治世”标记。②当你受到伤害后你可获得伤害牌摸1-X张牌X为“治世”数然后你可弃1枚“治世”。',

View File

@ -1971,24 +1971,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('choice',function(){
var info=lib.skill.olgangshu.getInfo(player);
if(info[1]==0) return 1;
if(player.hasCard(card=>{
if(info[2]<5&&player.hasCard(card=>{
return get.name(card)=='sha'&&player.hasValueTarget(card);
},'hs')&&!player.getCardUsable('sha')) return 2;
if(!game.hasPlayer(current=>{
if(info[0]<5&&!game.hasPlayer(current=>{
return player.inRange(current)&&get.effect(current,{name:'sha'},player,player)>0;
})) return 0;
var rand=Math.random();
if(rand<0.2) return 0;
if(rand<0.7) return 1;
if(rand<1.0) return 2;
return get.rand(0,2);
var list=[0,1,2].filter(i=>info[i]<5);
if(!list.length) return 'cancel2';
if(rand<0.2&&list.includes(0)) return 0;
if(rand<0.7&&list.includes(1)) return 1;
if(rand<1.0&&list.includes(2)) return 2;
return list.randomGet();
}());
'step 1'
if(result.control!='cancel2'){
player.logSkill('olgangshu');
player.addSkill('olgangshu_buff');
var info=lib.skill.olgangshu.getInfo(player);
info[result.index]=info[result.index]+1;
info[result.index]=Math.min(5,info[result.index]+1);
game.log(player,'的',result.control.slice(0,result.control.indexOf('(')),'#y+1');
player.markSkill('olgangshu_buff');
}
@ -2026,7 +2028,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
mark:true,
intro:{
markcount:()=>0,
markcount:function(storage,player){
var info=lib.skill.olgangshu.getInfo(player);
var str='';
info.forEach(num=>str+=parseFloat(num));
return str;
},
content:function(storage,player){
var info=lib.skill.olgangshu.getInfo(player);
var str='';
@ -26389,7 +26396,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olrunwei_info:'其他角色的弃牌阶段开始时,若其已受伤,则你可以选择一项:①令其弃置一张牌,其本回合手牌上限+1②令其摸一张牌其本回合手牌上限-1。',
caoxi:'曹羲',
olgangshu:'刚述',
olgangshu_info:'①当你使用非基本牌结算结束后,你可以令以下一项数值+11.攻击范围2.受〖刚述〗影响的下个摸牌阶段摸牌数3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。',
olgangshu_info:'①当你使用非基本牌结算结束后,你可以令以下一项数值+1每项至多加至51.攻击范围2.受〖刚述〗影响的下个摸牌阶段摸牌数3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。',
oljianxuan:'谏旋',
oljianxuan_info:'当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。',
ol_pengyang:'OL彭羕',

View File

@ -4765,12 +4765,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else return true;
}
},
direct:true,
frequent:true,
content:function(){
'step 0'
player.chooseToDiscard('he',get.prompt('langmie'),'弃置一张牌并摸两张牌').set('ai',(card)=>8-get.value(card)).logSkill='langmie';
'step 1'
if(result.bool) player.draw(2);
player.draw();
},
group:'langmie_damage',
},
@ -10429,7 +10426,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
duanwei:'段煨',
langmie:'狼灭',
langmie_damage:'狼灭',
langmie_info:'其他角色的出牌阶段结束时,若其本阶段内使用过的牌中有类型相同的牌,则你可以弃置一张牌并摸两张牌其他角色的结束阶段开始时若其本回合内造成的伤害大于1则你可以弃置一张牌并对其造成1点伤害。',
langmie_info:'其他角色的出牌阶段结束时,若其本阶段内使用过的牌中有类型相同的牌,则你可以摸一张牌其他角色的结束阶段开始时若其本回合内造成的伤害大于1则你可以弃置一张牌并对其造成1点伤害。',
zhangheng:'张横',
dangzai:'挡灾',
dangzai_info:'出牌阶段开始时,你可将一名其他角色判定区内的一张牌移动至你的判定区内。',

View File

@ -14054,6 +14054,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tw_caocao:['tw_caocao','jsrg_caocao','yj_caocao'],
mateng:['tw_mateng','mateng'],
xiahouen:['tw_xiahouen','jsrg_xiahouen'],
jiangji:['tw_jiangji','jiangji'],
baoxin:['tw_baoxin','baoxin'],
yanxiang:['yanxiang','tw_yanxiang'],
},
dynamicTranslate:{
twfeifu:function(player){
@ -14518,7 +14521,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tw_liwei_prefix:'TW',
twjiaohua:'教化',
twjiaohua_info:'当你或体力值最小的其他角色因摸牌而得到牌后,你可以令该角色从牌堆或弃牌堆中获得一张本次未获得的类别的牌(每种类别每回合限一次)。',
tw_yanxiang:'阎象',
tw_yanxiang:'TW阎象',
tw_yanxiang_prefix:'TW',
twkujian:'苦谏',
twkujianx:'谏',
twkujian_info:'出牌阶段限一次。你可以将至多三张手牌交给一名其他角色,称为“谏”,你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸一张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。',

View File

@ -10305,6 +10305,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
qiaoshui:{
audio:2,
audioname2:{
re_jianyong:'reqiaoshui',
xin_jianyong:'xinqiaoshui',
},
trigger:{player:'phaseUseBegin'},
direct:true,
filter:function(event,player){
@ -10345,12 +10349,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
qiaoshui3:{
charlotte:true,
audio:'qiaoshui',
audioname2:{
re_jianyong:'reqiaoshui',
xin_jianyong:'xinqiaoshui',
},
trigger:{player:'useCard2'},
direct:true,
filter:function(event,player){
var type=get.type(event.card);
return type=='basic'||type=='trick';
},
direct:true,
content:function(){
'step 0'
player.removeSkill('qiaoshui3');
@ -10390,7 +10400,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 2'
if(event.target){
player.logSkill('qiaoshui',event.target);
player.logSkill('qiaoshui3',event.target);
trigger.targets.add(event.target);
}
event.finish();
@ -10405,7 +10415,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
event.targets=result.targets;
if(event.isMine()){
player.logSkill('qiaoshui',event.targets);
player.logSkill('qiaoshui3',event.targets);
event.finish();
}
for(var i=0;i<result.targets.length;i++){
@ -10417,7 +10427,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
'step 5'
player.logSkill('qiaoshui',event.targets);
player.logSkill('qiaoshui3',event.targets);
}
},
qiaoshui4:{
@ -11877,6 +11887,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
miji:{
audio:2,
audioname:['re_wangyi'],
mod:{
aiOrder:function(player,card,num){
if(num>0&&_status.event&&_status.event.type==='phase'&&get.tag(card,'recover')){
@ -11944,6 +11955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
zhenlie:{
audio:2,
audioname:['re_wangyi'],
filter:function(event,player){
return event.player!=player&&event.card&&(event.card.name=='sha'||get.type(event.card)=='trick');
},
@ -12549,9 +12561,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
qice:{
audio:2,
audioname:['clan_xunyou'],
enable:'phaseUse',
usable:1,
audio:'qice_backup',
filter:function(event,player){
const hs=player.getCards('h');
if(!hs.length) return false;
@ -12565,6 +12577,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.filterCard(card,player,event);
});
},
usable:1,
chooseButton:{
dialog:function(player){
var list=[];
@ -12621,10 +12634,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
backup:function(links,player){
return {
audio:'qice',
audioname:['clan_xunyou'],
filterCard:true,
selectCard:-1,
position:'h',
audio:2,
popname:true,
viewAs:{name:links[0][2]},
}
@ -12655,7 +12669,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
threaten:1.6,
}
},
qice_backup:{audio:2},
zhiyu:{
audio:2,
trigger:{player:'damageEnd'},
@ -14424,6 +14437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jyzongshi:'纵适',
jyzongshi_info:'当你拼点赢时,你可以获得对方此次拼点的牌;当你拼点没赢时,你可以收回你此次拼点的牌。',
qiaoshui:'巧说',
qiaoshui3:'巧说',
qiaoshui_info:'出牌阶段开始时,你可与一名其他角色拼点。若你赢,你使用的下一张基本牌或普通锦囊牌可以额外指定任意一名其他角色为目标或减少指定一个目标;若你没赢,你不能使用锦囊牌直到回合结束。',
reqiaoshui:'巧说',
reqiaoshui_info:'出牌阶段,你可与一名其他角色拼点。若你赢,你使用的下一张基本牌或普通锦囊牌可以额外指定任意一名其他角色为目标或减少指定一个目标;若你没赢,你结束出牌阶段且本回合内锦囊牌不计入手牌上限。',

View File

@ -36859,6 +36859,101 @@
});
return audio;
},
/**
* 根据skill中的audio,audioname,audioname2和player来获取音频地址列表
* @param {String} skill 技能名
* @param {Player|String} player 角色/角色名
* @returns {Array<string|[string]>} 分析完的语音地址列表
*/
parseSkillAudio:function(skill,player){
if(typeof player=='string') player={name:player};
else if(get.itemtype(player)!='player') player={};
/**
* 处理 audioInfo 外的参数
* @param {String} skill 技能名
* @param {Player|{name:string}} player 角色
* @param {Array<string>} audioname audioname历史
* @param {Array<string>} history 判断deadlock
* @param {Number} fixedNum [audioname, number] 中的第二个参数用来限制语音数
* @returns {Array<string|[string]>} 音频地址数组有需要playSkillAudio的为[skillname])
*/
function getAudioList(skill,player,audioname,history,fixedNum){
let info=lib.skill[skill];
if(!info) return [];
if(!history) history=[];
if(history.includes(skill)){//判断deadlock
console.trace(`${skill} in ${history} forms a deadlock`);
if(info.audio!==false) return [[skill]];
return [];
}
history.push(skill);
let audioInfo=info.audio;
if(info.audioname2){
if(info.audioname2[player.name]) audioInfo=info.audioname2[player.name];
else if(info.audioname2[player.name1]) audioInfo=info.audioname2[player.name1];
else if(info.audioname2[player.name2]) audioInfo=info.audioname2[player.name2];
}
if(typeof audioInfo=='function') audioInfo=audioInfo(player);
if(!audioname) audioname=[];
if(Array.isArray(info.audioname)) audioname.addArray(info.audioname);
let audioList=parseAudio(skill,audioInfo,audioname,player,history,fixedNum);
if(fixedNum&&fixedNum<audioList.length) audioList.length=fixedNum;
if(audioList.length) return audioList;
if(info.audio!==false) return [[skill]];
return [];
}
/**
* 分析 audioInfo 获取音频地址数组
* @param {String} skill 技能名
* @param {any} audioInfo info.audio
* @param {Array<string>} audioname 要判断的audioname
* @param {Player|{name:string}} player 角色
* @param {Array<string>} history 判断deadlock
* @param {Number} fixedNum [audioname, number] 中的第二个参数用来限制语音数
* @returns {Array<string|[string]>} 音频地址数组有需要playSkillAudio的为[skillname])
*/
function parseAudio(skill,audioInfo,audioname,player,history,fixedNum){
if(Array.isArray(audioInfo)){
if(typeof audioInfo[0]=='string'&&typeof audioInfo[1]=='number'){// [audioname, number]
if(lib.skill[audioInfo[0]]) return getAudioList(audioInfo[0],player,audioname,history,fixedNum||audioInfo[1]);
return parseAudio(audioInfo[0],audioInfo[1],audioname,player,history,fixedNum||audioInfo[1]);
}
return audioInfo.reduce((total,i)=>total.addArray(parseAudio(skill,i,audioname,player,history,fixedNum)),[]);
}
if(!['string','number','boolean'].includes(typeof audioInfo)) return [];
if(audioInfo===false) return [];
if(typeof audioInfo=='string'&&lib.skill[audioInfo]) return getAudioList(audioInfo,player,audioname,history,fixedNum);
let audioList=[];
audioInfo=String(audioInfo);
let list=audioInfo.match(/(?:(.*):|^)(true|\d*)(?::(.*)|$)/);
if(list&&list[2]){
let _audioname='';
if(audioname.includes(player.name)) _audioname=`_${player.name}`;
else if(audioname.includes(player.name1)) _audioname=`_${player.name1}`;
else if(audioname.includes(player.name2)) _audioname=`_${player.name2}`;
list=list.slice(1);//[路径,number/true,格式]
if(list[1]=='true') audioList.add(`${list[0]||'skill'}/${skill}${_audioname}.${list[2]||'mp3'}`);
else{
list[1]=parseInt(list[1]);
for(let i=1;i<=list[1];i++){
audioList.add(`${list[0]||'skill'}/${skill}${_audioname}${i}.${list[2]||'mp3'}`);
}
}
}
else audioList.add(`${/(?:^db:|^ext:|\/)/.test(audioInfo)?'':'skill/'}${audioInfo}`);
return audioList;
}
return getAudioList(skill,player);
},
trySkillAudio:function(skill,player,directaudio,nobroadcast/*,index*/){
if(!nobroadcast) game.broadcast(game.trySkillAudio,skill,player,directaudio,nobroadcast/*,index*/);
var info=get.info(skill);
@ -36866,73 +36961,8 @@
if(!lib.config.background_speak) return;
if(info.direct&&!directaudio) return;
if(lib.skill.global.includes(skill)&&!lib.skill[skill].forceaudio) return;
if(typeof player=='string') player={name:player};
function getAudioList(skill,player,history,fixedNum){
let info=lib.skill[skill];
if(!info) return [];
if(!history) history=[];
if(history.includes(skill)){//直接跳出
console.trace(`${skill} in ${history} forms a deadlock`);
if(info.audio!==false) return [[skill]];//标记为playSkillAudio
return [];
}
history.push(skill);
let audioInfo=info.audio;
if(info.audioname2&&player){
if(info.audioname2[player.name]) audioInfo=info.audioname2[player.name];
else if(info.audioname2[player.name1]) audioInfo=info.audioname2[player.name1];
else if(info.audioname2[player.name2]) audioInfo=info.audioname2[player.name2];
}
if(typeof audioInfo=='function') audioInfo=audioInfo(player);
let audioname='';
if(Array.isArray(info.audioname)&&player){
if(info.audioname.includes(player.name)) audioname=`_${player.name}`;
else if(info.audioname.includes(player.name1)) audioname=`_${player.name1}`;
else if(info.audioname.includes(player.name2)) audioname=`_${player.name2}`;
}
let audioList=parseAudio(skill,audioInfo,audioname,player,history,fixedNum);
if(fixedNum&&fixedNum<audioList.length) audioList.length=fixedNum;
if(audioList.length) return audioList;//所有要的音频地址
if(info.audio!==false) return [[skill]];//标记为playSkillAudio
return [];
}
function parseAudio(skill,audioInfo,audioname,player,history,fixedNum){
if(Array.isArray(audioInfo)){
if(typeof audioInfo[1]=='number'/* ||(typeof audioInfo[1]=='string'&&/^\d*$/.test(audioInfo[1])) */){//['XXX',num]
if(lib.skill[audioInfo[0]]) return getAudioList(audioInfo[0],player,history,fixedNum||audioInfo[1]);
return parseAudio(audioInfo[0],audioInfo[1],audioname,player,history,fixedNum||audioInfo[1]);
}
return audioInfo.reduce((total,i)=>total.addArray(parseAudio(skill,i,audioname,player,history,fixedNum)),[]);
}
if(!['string','number','boolean'].includes(typeof audioInfo)) return [];
if(audioInfo===false) return [];
if(typeof audioInfo=='string'&&lib.skill[audioInfo]) return getAudioList(audioInfo,player,history,fixedNum);
audioInfo=String(audioInfo);
let audioList=[];
let list=audioInfo.match(/(?:(.*):|^)(true|\d*)(?::(.*)|$)/);
if(list&&list[2]){
list=list.slice(1);//形如[路径,number/true,格式]的形式
if(list[1]=='true') audioList.add(`${list[0]||'skill'}/${skill}${audioname}.${list[2]||'mp3'}`);
else{
list[1]=parseInt(list[1]);
for(let i=1;i<=list[1];i++){
audioList.add(`${list[0]||'skill'}/${skill}${audioname}${i}.${list[2]||'mp3'}`);
}
}
}
else audioList.add(`${/(?:^db:|^ext:|\/)/.test(audioInfo)?'':'skill/'}${audioInfo}`);
return audioList;
}
let list=getAudioList(skill,player);
// console.log(skill,lib.skill[skill]&&lib.skill[skill].audio,list);
let list=game.parseSkillAudio(skill,player);
if(!list.length) return;
// if(index) index=index%list.length||list.length;
// let audio=list[index?index-1:Math.floor(Math.random()*list.length)];

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB