diff --git a/audio/die/fazheng.mp3 b/audio/die/fazheng.mp3 index 8d71c3697..b5885ed4e 100644 Binary files a/audio/die/fazheng.mp3 and b/audio/die/fazheng.mp3 differ diff --git a/audio/die/madai.mp3 b/audio/die/madai.mp3 index 57f980bfb..04ba81c9d 100644 Binary files a/audio/die/madai.mp3 and b/audio/die/madai.mp3 differ diff --git a/audio/die/old_guanzhang.mp3 b/audio/die/old_guanzhang.mp3 new file mode 100644 index 000000000..0b7914796 Binary files /dev/null and b/audio/die/old_guanzhang.mp3 differ diff --git a/audio/die/old_madai.mp3 b/audio/die/old_madai.mp3 new file mode 100644 index 000000000..57f980bfb Binary files /dev/null and b/audio/die/old_madai.mp3 differ diff --git a/audio/die/old_wangyi.mp3 b/audio/die/old_wangyi.mp3 new file mode 100644 index 000000000..8b2a8639f Binary files /dev/null and b/audio/die/old_wangyi.mp3 differ diff --git a/audio/die/sunshao.mp3 b/audio/die/sunshao.mp3 new file mode 100644 index 000000000..8741ec2f6 Binary files /dev/null and b/audio/die/sunshao.mp3 differ diff --git a/audio/die/xushu.mp3 b/audio/die/xushu.mp3 index 01c3c197a..a5c37c3bd 100644 Binary files a/audio/die/xushu.mp3 and b/audio/die/xushu.mp3 differ diff --git a/audio/skill/enyuan11.mp3 b/audio/skill/enyuan11.mp3 index dc9a514c6..c2b1784e6 100644 Binary files a/audio/skill/enyuan11.mp3 and b/audio/skill/enyuan11.mp3 differ diff --git a/audio/skill/jujian1.mp3 b/audio/skill/jujian1.mp3 index 34d21f158..122692066 100644 Binary files a/audio/skill/jujian1.mp3 and b/audio/skill/jujian1.mp3 differ diff --git a/audio/skill/jujian2.mp3 b/audio/skill/jujian2.mp3 index 07ad345da..412148b2d 100644 Binary files a/audio/skill/jujian2.mp3 and b/audio/skill/jujian2.mp3 differ diff --git a/audio/skill/old_fuhun1.mp3 b/audio/skill/old_fuhun1.mp3 new file mode 100644 index 000000000..41d7a0042 Binary files /dev/null and b/audio/skill/old_fuhun1.mp3 differ diff --git a/audio/skill/old_fuhun2.mp3 b/audio/skill/old_fuhun2.mp3 new file mode 100644 index 000000000..effc2ce89 Binary files /dev/null and b/audio/skill/old_fuhun2.mp3 differ diff --git a/audio/skill/oldmiji1.mp3 b/audio/skill/oldmiji1.mp3 new file mode 100644 index 000000000..cee6a4afa Binary files /dev/null and b/audio/skill/oldmiji1.mp3 differ diff --git a/audio/skill/oldmiji2.mp3 b/audio/skill/oldmiji2.mp3 new file mode 100644 index 000000000..198178df6 Binary files /dev/null and b/audio/skill/oldmiji2.mp3 differ diff --git a/audio/skill/oldqianxi1.mp3 b/audio/skill/oldqianxi1.mp3 new file mode 100644 index 000000000..c8291f554 Binary files /dev/null and b/audio/skill/oldqianxi1.mp3 differ diff --git a/audio/skill/oldqianxi2.mp3 b/audio/skill/oldqianxi2.mp3 new file mode 100644 index 000000000..75f9924ee Binary files /dev/null and b/audio/skill/oldqianxi2.mp3 differ diff --git a/audio/skill/oldzhenlie1.mp3 b/audio/skill/oldzhenlie1.mp3 new file mode 100644 index 000000000..f0040ff6f Binary files /dev/null and b/audio/skill/oldzhenlie1.mp3 differ diff --git a/audio/skill/oldzhenlie2.mp3 b/audio/skill/oldzhenlie2.mp3 new file mode 100644 index 000000000..9f32f6126 Binary files /dev/null and b/audio/skill/oldzhenlie2.mp3 differ diff --git a/audio/skill/wuyan1.mp3 b/audio/skill/wuyan1.mp3 index db3cf1ee6..d0ce4701e 100644 Binary files a/audio/skill/wuyan1.mp3 and b/audio/skill/wuyan1.mp3 differ diff --git a/audio/skill/wuyan2.mp3 b/audio/skill/wuyan2.mp3 index f884758d5..dd0a75cea 100644 Binary files a/audio/skill/wuyan2.mp3 and b/audio/skill/wuyan2.mp3 differ diff --git a/audio/skill/xuanhuo1.mp3 b/audio/skill/xuanhuo1.mp3 index 79a5639dc..f34704de2 100644 Binary files a/audio/skill/xuanhuo1.mp3 and b/audio/skill/xuanhuo1.mp3 differ diff --git a/audio/skill/xuanhuo2.mp3 b/audio/skill/xuanhuo2.mp3 index 9b99c324d..248756ff5 100644 Binary files a/audio/skill/xuanhuo2.mp3 and b/audio/skill/xuanhuo2.mp3 differ diff --git a/character/diy.js b/character/diy.js index 7066b767b..ddceb35a3 100755 --- a/character/diy.js +++ b/character/diy.js @@ -1,10611 +1,10744 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'diy', - connect:true, - connectBanned:['diy_tianyu','diy_yangyi','diy_lukang','ns_huamulan','ns_yuji','ns_duangui','ns_liuzhang'], - character:{ - ns_zhangwei:['female','wei',3,['nsqiyue','nsxuezhu']], - ns_chendao:['male','shu',4,['nsjianglie']], - yj_caoang:['male','wei',4,['yjxuepin']], - diy_wenyang:['male','wei','4/6',['lvli','choujue']], - key_lucia:['female','key','1/2',['lucia_duqu','lucia_zhenren']], - key_kyousuke:['male','key',4,['nk_shekong','key_huanjie']], - key_yuri:['female','key',3,['yuri_xingdong','key_huanjie','yuri_wangxi'],['zhu']], - key_haruko:['female','key',4,['haruko_haofang','haruko_zhuishi']], - key_umi:['female','key',3,['umi_chaofan','umi_lunhui','umi_qihuan']], - key_umi2:['female','key',3,[],['unseen']], - key_rei:['male','key',4,['xiandeng','shulv','xisheng']], - key_komari:['female','key',3,['komari_tiankou','komari_xueshang']], - key_yukine:['female','key',3,['yukine_wenzhou']], - key_yusa:['female','key',3,['yusa_yanyi','yusa_misa','dualside'],['dualside:key_misa']], - key_misa:['female','key',3,['misa_yehuo','misa_yusa','dualside'],['unseen']], - key_masato:['male','key','4/8',['masato_baoquan']], - key_iwasawa:['female','key',3,['iwasawa_yinhang','iwasawa_mysong']], - key_kengo:['male','key',4,['kengo_weishang','kengo_guidui']], - key_yoshino:['male','key',4,['yoshino_jueyi']], - key_yui:['female','key',3,['yui_jiang','yui_lieyin','yui_takaramono']], - key_tsumugi:['female','key',3,['tsumugi_mugyu','tsumugi_huilang']], - key_saya:['female','key',3,['saya_shouji','saya_powei']], - key_harukakanata:['female','key',3,['haruka_shuangche']], - key_inari:['female','key',2,['inari_baiwei','inari_huhun']], - key_shiina:['female','key',3,['shiina_qingshen','shiina_feiyan']], - key_sunohara:['unknown','key','3/4',['sunohara_chengshuang','sunohara_tiaoyin','sunohara_jianren']], - key_rin:['female','key',3,['rin_baoqiu']], - key_sasami:['female','key',3,['sasami_miaobian']], - key_akane:['female','key',3,['akane_jugu','akane_quanqing','akane_yifu'],['zhu']], - key_doruji:['female','key',16,['doruji_feiqu']], - key_yuiko:['female','key',3,['yuiko_fenglun','yuiko_dilve']], - key_riki:['female','key',3,['riki_spwenji','riki_nvzhuang','riki_mengzhong']], - key_hisako:['female','key',3,['hisako_yinbao','hisako_zhuanyun']], - key_hinata:['male','key',4,['hinata_qiulve','hinata_ehou']], - key_noda:['male','key',4,['noda_fengcheng','noda_xunxin']], - key_tomoya:['male','key',4,['tomoya_shangxian','tomoya_wangjin']], - key_nagisa:['female','key',3,['nagisa_tiandu','nagisa_fuxin']], - key_ayato:['male','key',3,['ayato_jianshen','ayato_zonghuan']], - key_ao:['female','key',3,['ao_xishi','ao_kuihun','ao_shixin']], - key_yuzuru:['male','key',5,['yuzuru_wuxin','yuzuru_deyi']], - sp_key_kanade:['female','key',3,['kanade_mapo','kanade_benzhan']], - key_mio:['female','key',3,['mio_tuifu','mio_tishen']], - key_midori:['female','key',3,['midori_nonghuan','midori_tishen']], - key_kyoko:['female','key',3,['kyoko_juwu','kyoko_zhengyi']], - key_shizuru:['female','key',3,['shizuru_nianli','shizuru_benzhan']], - key_shiorimiyuki:['female','key',3,['shiorimiyuki_banyin','shiorimiyuki_tingxian']], - key_miki:['female','key',3,['miki_shenqiang','miki_huanmeng','miki_zhiluo']], - - key_kud:['female','key',3,['kud_qiaoshou','kud_buhui']], - key_misuzu:['female','key',3,['misuzu_hengzhou','misuzu_nongyin','misuzu_zhongxing']], - key_kamome:['female','key',3,['kamome_yangfan','kamome_huanmeng','kamome_jieban']], - key_nao:['female','key',3,['nao_duyin','nao_wanxin','nao_shouqing']], - - ns_huangchengyan:['male','shu',3,['nslongyue','nszhenyin']], - ns_sunchensunjun:['male','wu',5,['nsxianhai','nsxingchu']], - ns_yuanxi:['male','qun',4,['nsshengyan','nsdaizhan']], - ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']], - // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], - // diy_hanlong:['male','wei',4,['siji','ciqiu']], - diy_feishi:['male','shu',3,['nsshuaiyan','moshou']], - diy_liuyan:['male','shu',3,['juedao','geju']], - // diy_luxun:['male','wu',3,['shaoying','zonghuo']], - diy_yuji:['male','qun',3,['diyguhuo','diychanyuan']], - // diy_zhouyu:['male','wu',3,['jieyan','honglian']], - // diy_zhouyu:['male','wu',3,['xiongzi','yaliang']], - diy_caiwenji:['female','qun',3,['beige','guihan']], - diy_lukang:['male','wu',4,['luweiyan','qianxun']], - // diy_xuhuang:['male','wei',4,['diyduanliang']], - // diy_dianwei:['male','wei',4,['diyqiangxi']], - // diy_huangzhong:['male','shu',4,['liegong','fuli']], - // diy_weiyan:['male','shu',4,['diykuanggu']], - diy_zhenji:['female','wei',3,['diy_jiaoxia','yiesheng']], - // diy_menghuo:['male','shu',4,['huoshou','zaiqix']], - //re_huangyueying:['female','shu',3,['rejizhi','qicai']], - - diy_liufu:['male','wei',3,['zhucheng','duoqi']], - diy_xizhenxihong:['male','shu',4,['fuchou','jinyan']], - diy_liuzan:['male','wu',4,['kangyin']], - diy_zaozhirenjun:['male','wei',3,['liangce','jianbi','juntun']], - diy_yangyi:['male','shu',3,['choudu','liduan']], - diy_tianyu:['male','wei',4,['chezhen','youzhan']], - - ns_zuoci:['male','qun',3,['nsxinsheng','nsdunxing']], - ns_lvzhi:['female','qun',3,['nsnongquan','nsdufu']], - ns_wangyun:["male","qun",4,["liangji","jugong","chengmou"]], - ns_nanhua:["male","qun",3,["nshuanxian","nstaiping","nsshoudao"]], - ns_nanhua_left:["male","qun",2,[],['unseen']], - ns_nanhua_right:["female","qun",2,[],['unseen']], - ns_huamulan:['female','qun',3,['nscongjun','xiaoji','gongji']], - ns_huangzu:['male','qun',4,['nsjihui','nsmouyun']], - ns_jinke:['male','qun',4,['nspinmin','nsshishou']], - ns_yanliang:['male','qun',4,['nsduijue','nsshuangxiong','dualside'],['dualside:ns_wenchou']], - ns_wenchou:['male','qun',2,['nsguanyong','dualside'],['unseen']], - - ns_caocao:['male','wei',4,['nscaiyi','nsgefa','nshaoling']], - ns_caocaosp:['male','qun',3,['nsjianxiong','nsxionglue']], - ns_zhugeliang:['male','shu',3,['nsguanxing','kongcheng','nsyunxing']], - ns_wangyue:['male','qun',4,['nsjianshu','nscangjian']], - ns_yuji:['male','qun',3,['nsyaowang','nshuanhuo']], - ns_xinxianying:['female','wei',3,['nsdongcha','nscaijian','nsgongjian']], - ns_guanlu:['male','wei',3,['nsbugua','nstuiyan','nstianji']], - ns_simazhao:['male','wei',3,['nszhaoxin','nsxiuxin','nsshijun']], - ns_sunjian:['male','wu',4,['nswulie','nshunyou','nscangxi']], - - ns_duangui:['male','qun',3,['nscuanquan','nsjianning','nschangshi','nsbaquan']], - ns_zhangbao:['male','qun',3,['nsfuhuo','nswangfeng']], - ns_masu:['male','shu',3,['nstanbing','nsxinzhan']], - ns_zhangxiu:['male','qun',4,['nsbaiming','nsfuge']], - ns_lvmeng:['male','wu',3,['nsqinxue','nsbaiyi']], - ns_shenpei:['male','qun',3,['nshunji','shibei']], - - ns_yujisp:['male','qun',3,['nsguhuo']], - ns_yangyi:['male','shu',3,['nsjuanli','nsyuanchou']], - ns_liuzhang:['male','qun',3,['nsanruo','nsxunshan','nskaicheng']], - // ns_zhaoyun:['male','qun',3,[]], - // ns_lvmeng:['male','qun',3,[]], - // ns_zhaoyunshen:['male','qun',3,[]], - // ns_lisu:['male','qun',3,[]], - // ns_sunhao:['male','qun',3,[]], - ns_xinnanhua:['male','qun',3,['ns_xiandao','ns_xiuzheng','ns_chuanshu'],[]], - }, - characterFilter:{ - key_tomoya:function(mode){ - return mode!='chess'&&mode!='tafang'&&mode!='stone'; - }, - key_sunohara:function(mode){ - return mode!='guozhan'; - }, - ns_duangui:function(mode){ - return mode=='identity'&&_status.mode=='normal'; - }, - diy_liuyan:function(mode){ - return mode!='chess'&&mode!='tafang'; - } - }, - characterSort:{ - diy:{ - diy_yijiang:["key_kud","key_misuzu","key_kamome","key_nao", - "ns_huangchengyan","ns_sunchensunjun","ns_yuanxi","ns_caoshuang"], - diy_tieba:["diy_wenyang","ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_zhangwei"], - diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"], - diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki"], - diy_yongjian:["ns_chendao","yj_caoang"], - }, - }, - characterIntro:{ - ns_zhangwei:'血骑教习·张葳,三国杀集换式卡牌游戏《阵面对决》中的帝畿系列卡牌。游卡桌游官方原创的三国时期女性角色。', - diy_feishi:'字公举,生卒年不详,益州犍为郡南安县(今四川省乐山市)人。刘璋占据益州时,以费诗为绵竹县县令。刘备进攻刘璋夺取益州,费诗举城而降,后受拜督军从事,转任牂牁郡太守,再为州前部司马。', - //diy_liuyan:'字元海,新兴(今山西忻州北)人,匈奴族,匈奴首领冒顿单于之后,南匈奴单于于夫罗之孙,左贤王刘豹之子,母呼延氏,十六国时期前赵政权开国皇帝,304年-310年在位。', - diy_lukang:'字幼节,吴郡吴县(今江苏苏州)人。三国时期吴国名将,丞相陆逊次子。', - diy_liufu:'字元颖,沛国相县(今安徽濉溪县西北)人。东汉末年名守。在汉末避难于淮南,说服袁术将戚寄和秦翊率部投奔曹操,曹操大悦,使司徒辟其为掾属。', - diy_xizhenxihong:'习珍,襄阳人。三国时蜀汉将领。先主刘备时曾任零陵北部都尉,加裨将军。建安二十四年,关羽率荆州大军攻打樊城,唯有习珍据城不降。被困月余,直到箭尽粮绝,拔剑自刎而死。习宏,生卒年不详,习珍之弟。曾在东吴入侵蜀汉时建议哥哥习珍伪降,约樊胄举兵。习珍死后,弟弟习宏落在东吴,有问必不答,终身不为孙权发一言。', - diy_zaozhirenjun:'枣祗,生卒年月不详,东汉末年颍川阳翟(今河南省禹州市)人。曾任东阿令、羽林监、屯田都尉、陈留太守等职。任峻(?—204年),字伯达,河南郡中牟县人。曹操每次出征,任峻通常在后方补给军队。后来发生饥荒,枣祗建议实施屯田,任峻被任命为典农中郎将,招募百姓在许下屯田,结果连年丰收,积谷足以装满全部粮仓。', - diy_yangyi:'字威公,襄阳(今湖北襄阳)人,三国时期蜀汉政治家。最初,为荆州刺史傅群的主簿,后投奔关羽,任为功曹。羽遣其至成都,大受刘备赞赏,擢为尚书。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。亮生前定蒋琬继己任,仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', - diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', - }, - characterTitle:{ - key_miki:'#bSummer Pockets', - key_shiorimiyuki:'#rAngel Beats!', - key_shizuru:'#bRewrite', - key_kyoko:'#bSummer Pockets', - sp_key_kanade:'#rAngel Beats!', - key_yuzuru:'#rAngel Beats!', - key_tsumugi:'#bSummer Pockets', - key_ayato:'#rAngel Beats!', - key_nagisa:'#gClannad', - key_tomoya:'#gClannad', - key_noda:'#rAngel Beats!', - key_hinata:'#rAngel Beats!', - key_hisako:'#rAngel Beats!', - key_doruji:'#bLittle Busters!', - key_riki:'#bLittle Busters!', - key_yuiko:'#bLittle Busters!', - key_akane:'#bRewrite', - key_sasami:'#bLittle Busters!', - key_rin:'#bLittle Busters!', - key_shiina:'#rAngel Beats!', - key_inari:'#bSummer Pockets', - key_saya:'#bLittle Busters!', - key_harukakanata:'#bLittle Busters!', - key_tsumugi:'#bSummer Pockets', - key_yui:'#rAngel Beats!', - key_yoshino:'#bRewrite', - key_kengo:'#bLittle Busters!', - key_iwasawa:'#rAngel Beats!', - key_masato:'#bLittle Busters!', - key_yusa:'#bCharlotte', - key_misa:'#rCharlotte', - key_yukine:'#gClannad', - key_komari:'#bLittle Busters!', - key_umi:'#bSummer Pockets', - key_rei:'#gHarmonia', - key_lucia:'#bRewrite', - key_kyousuke:'#bLittle Busters!', - key_yuri:'#rAngel Beats!', - key_haruko:'#bAIR', - - key_kud:'#b千夜', - key_misuzu:'#b长发及腰黑长直', - key_kamome:'#b仿生纱', - key_nao:'#b潮鸣', - - ns_huangchengyan:'#g竹邀月', - ns_sunchensunjun:'#gVenusjeu', - ns_yuanxi:'#g食茸二十四', - ns_caoshuang:'#g荬庀芬兰', - - diy_wenyang:'#g最粗的梦想XD', - ns_zuoci:'#bskystarwuwei', - ns_lvzhi:'#bskystarwuwei', - ns_wangyun:'#rSukincen', - ns_guanlu:'#rSukincen', - ns_xinnanhua:'#rSukincen', - ns_nanhua:'#g戒除联盟', - ns_shenpei:'#g戒除联盟', - ns_huamulan:'#p哎别管我是谁', - ns_jinke:'#p哎别管我是谁', - ns_huangzu:'#r小芯儿童鞋', - ns_lisu:'#r小芯儿童鞋', - ns_yanliang:'#r丶橙续缘', - ns_wenchou:'#r丶橙续缘', - ns_caocao:'#r一瞬间丶遗忘', - ns_caocaosp:'#g希望教主', - ns_zhugeliang:'#p死不死什么的', - ns_xinxianying:'#b扶苏公子', - ns_zhangbao:'#b扶苏公子', - ns_wangyue:'#p废城君', - ns_sunjian:'#b兔子两只2', - ns_lvmeng:'#b兔子两只2', - ns_yujisp:'#b兔子两只2', - ns_yuji:'#g蔚屿凉音', - ns_simazhao:'#r一纸载春秋', - ns_duangui:'#b宝宝酱紫萌萌哒', - ns_masu:'#g修女', - ns_zhangxiu:'#p本因坊神策', - ns_yangyi:'#p本因坊神策', - ns_liuzhang:'#r矮子剑薄荷糖', - }, - card:{ - kamome_suitcase:{ - fullskin:true, - type:'equip', - subtype:'equip5', - derivation:'key_kamome', - skills:['kamome_suitcase'], - ai:{ - equipValue:function(card){ - return 7; - }, - basic:{ - equipValue:7 - } - } - }, - miki_hydrogladiator:{ - fullskin:true, - type:'equip', - subtype:'equip1', - derivation:'key_miki', - skills:['miki_hydrogladiator_skill'], - distance:{ - attackFrom:-5, - }, - ai:{ - equipValue:function(card){ - return 7; - }, - basic:{ - equipValue:7 - }, - }, - }, - miki_binoculars:{ - fullskin:true, - type:'equip', - subtype:'equip5', - derivation:'key_miki', - skills:['miki_binoculars'], - ai:{ - equipValue:function(card){ - return 7; - }, - basic:{ - equipValue:7 - }, - }, - }, - }, - perfectPair:{ - yuji:['zuoci'], - key_riki:['key_rin','key_saya','key_kyousuke'], - key_komari:['key_rin','key_sasami'], - key_masato:['key_kengo'], - key_yuiko:['key_harukakanata'], - key_doruji:['key_rin'], - key_tomoya:['key_nagisa','key_sunohara'], - key_ao:['key_inari'], - key_yuzuru:['key_hinata','key_kanade','key_ayato'], - key_yuri:['key_kanade'], - key_hinata:['key_yui'], - key_iwasawa:['key_hisako'], - key_lucia:['key_shizuru'], - }, - skill:{ - miki_shenqiang:{ - trigger:{ - global:'gameDrawAfter', - player:'enterGame', - }, - forced:true, - content:function(){ - player.equip(game.createCard2('miki_hydrogladiator','club',6)); - player.equip(game.createCard2('miki_binoculars','diamond',6)); - }, - mod:{ - canBeDiscarded:function(card){ - if(get.position(card)=='e'&&['equip1','equip5'].contains(get.subtype(card))) return false; - }, - }, - }, - miki_huanmeng:{ - inherit:'kamome_huanmeng', - }, - miki_zhiluo:{ - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - return !event.player.countCards('e')&&player.inRange(event.player); - }, - direct:true, - locked:true, - content:function(){ - 'step 0' - if(!player.canUse('sha',trigger.player,false)) event._result={index:0}; - else player.chooseControl().set('prompt','制裸:请选择一项').set('choiceList',[ - '摸一张牌', - '视为对'+get.translation(trigger.player)+'使用一张【杀】', - ]).set('ai',function(){ - if(get.effect(_status.event.getTrigger().player,{name:'sha'},_status.event.player)>0) return 1; - return 0; - }); - 'step 1' - if(result.index==0){ - player.logSkill('miki_zhiluo'); - player.draw(); - } - else player.useCard({name:'sha',isCard:true},trigger.player,'miki_zhiluo'); - }, - }, - miki_hydrogladiator_skill:{ - trigger:{ - source:'damageSource', - }, - direct:true, - locked:true, - popup:'海德洛', - filter:function(event,player){ - return event.getParent().name=='sha'&&game.hasPlayer(function(current){ - return (current==event.player||current!=player&&get.distance(current,event.player)<=1)&¤t.countDiscardableCards(player,'he')>0; - }); - }, - content:function(){ - 'step 0' - var list=[]; - var choiceList=[]; - if(trigger.player.countDiscardableCards(player,'he')>0){ - list.push(true); - choiceList.push('弃置'+get.translation(trigger.player)+'的两张牌'); - } - if(game.hasPlayer(function(current){ - return current!=player&&get.distance(current,trigger.player)<=1; - })){ - list.push(false); - choiceList.push('弃置所有至'+get.translation(trigger.player)+'距离为1的角色的各一张牌'); - } - event.list=list; - if(list.length==1) event._result={index:0}; - else{ - player.chooseControl().set('choiceList',choiceList).set('prompt','海德洛格拉迪尔特·改').set('ai',function(){ - var player=_status.event.player; - var source=_status.event.getTrigger().player; - var num=game.countPlayer(function(current){ - if(current!=player&&get.distance(current,source)<=1&¤t.countDiscardableCards(player,'he')>0) return -get.sgn(get.attitude(player,current)); - }); - if(num>Math.min(2,source.countDiscardableCards(player,'he'))) return 1; - return 0; - }); - } - 'step 1' - if(event.list[result.index]){ - player.logSkill(['miki_hydrogladiator_skill','海德洛'],trigger.player); - player.discardPlayerCard(trigger.player,'he',2,true); - event.finish(); - } - else{ - event.targets=game.filterPlayer(function(current){ - return current!=player&&get.distance(current,trigger.player)<=1; - }).sortBySeat(); - player.logSkill(['miki_hydrogladiator_skill','海德洛'],event.targets); - } - 'step 2' - var target=targets.shift(); - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); - if(targets.length) event.redo(); - }, - }, - miki_binoculars:{ - locked:true, - ai:{ - viewHandcard:true, - skillTagFilter:function(player,tag,arg){ - if(player==arg) return false; - }, - }, - }, - kud_qiaoshou:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.getStorage('kud_qiaoshou_equip').length&&player.countCards('h')>0; - }, - chooseButton:{ - dialog:function(){ - var list=[]; - for(var i of lib.inpile){ - var sub=get.subtype(i); - if(['equip1','equip4'].contains(sub)) list.push([sub,'',i]); - } - return ui.create.dialog('巧手:选择一种装备牌',[list,'vcard'],'hidden'); - }, - check:function(button){ - var player=_status.event.player; - var name=button.link[2]; - if(get.subtype(name)=='equip4'||player.getEquip(name)) return 0; - var sha=player.countCards('h','sha'); - switch(name){ - case 'zhuge': - return sha-player.getCardUsable('sha'); - case 'guding': - if(sha>0&&game.hasPlayer(function(current){ - return get.attitude(player,current)<0&&!current.countCards('h')&&player.canUse('sha',current)&&get.effect(current,{name:'sha'},player)>0; - })) return 1.4+Math.random(); - return 0; - case 'guanshi': - if(sha>0) return 0.7+Math.random(); - return 0; - case 'qinggang': - if(sha>0) return 0.4+Math.random(); - return 0; - case 'zhuque': - if(game.hasPlayer(function(current){ - return get.attitude(player,current)<0&¤t.getEquip('tengjia')&&get.effect(current,{name:'sha',nature:'fire'},player)>0; - })) return 1.2+Math.random(); - return 0; - default: return 0; - } - }, - backup:function(links){ - var next=get.copy(lib.skill.kud_qiaoshou_backupx); - next.cardname=links[0][2]; - return next; - }, - prompt:function(links){ - return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]); - }, - }, - group:'kud_qiaoshou_end', - ai:{ - order:5, - result:{ - player:1, - }, - }, - }, - kud_qiaoshou_backupx:{ - filterCard:true, - discard:false, - toStorage:true, - delay:false, - check:function(event,player){ - return 6-get.value(card); - }, - content:function(){ - player.addTempSkill('kud_qiaoshou_equip',{player:['phaseUseEnd','phaseZhunbeiBegin']}); - var name=lib.skill.kud_qiaoshou_backup.cardname; - player.storage.kud_qiaoshou_equip2=name; - player.markAuto('kud_qiaoshou_equip',cards); - var info=lib.card[name].skills; - if(info&&info.length) player.addAdditionalSkill('kud_qiaoshou_equip',info); - player.draw(); - game.log(player,'声明了','#y'+get.translation(name)); - }, - ai:{ - result:{ - player:1, - }, - }, - }, - kud_qiaoshou_equip:{ - charlotte:true, - mod:{ - globalFrom:function(from,to,distance){ - var info=lib.card[from.storage.kud_qiaoshou_equip2]; - if(info&&info.distance&&info.distance.globalFrom) return distance+info.distance.globalFrom; - }, - globalTo:function(from,to,distance){ - var info=lib.card[to.storage.kud_qiaoshou_equip2]; - if(info&&info.distance&&info.distance.globalTo) return distance+info.distance.globalTo; - }, - attackFrom:function(from,to,distance){ - var info=lib.card[from.storage.kud_qiaoshou_equip2]; - if(info&&info.distance&&info.distance.attackFrom) return distance+info.distance.attackFrom; - }, - attackTo:function(from,to,distance){ - var info=lib.card[to.storage.kud_qiaoshou_equip2]; - if(info&&info.distance&&info.distance.attackTo) return distance+info.distance.attackTo; - }, - }, - intro:{ - mark:function(dialog,storage,player){ - dialog.add(storage); - dialog.addText('当前装备:'+get.translation(player.storage.kud_qiaoshou_equip2)); - var str2=lib.translate[player.storage.kud_qiaoshou_equip2+'_info']; - if(str2){ - if(str2.length>=12) dialog.addText(str2,false); - else dialog.addText(str2); - } - }, - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - player.removeAdditionalSkill('kud_qiaoshou_equip'); - delete player.storage.kud_qiaoshou_equip2; - }, - }, - }, - kud_qiaoshou_end:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&!player.getStorage('kud_qiaoshou_equip').length; - }, - content:function(){ - 'step 0' - var list=[]; - for(var i of lib.inpile){ - var sub=get.subtype(i); - if(['equip2','equip3'].contains(sub)) list.push([sub,'',i]); - } - player.chooseButton([get.prompt('kud_qiaoshou'),[list,'vcard']]).set('ai',function(button){ - var player=_status.event.player; - var name=button.link[2]; - if(get.subtype(name)=='equip3'||player.getEquip(name)) return false; - switch(name){ - case 'yexingyi': - if(player.hp>2||player.getEquip('bagua')||player.getEquip('tengjia')) return 1.5+Math.random(); - return 0.5+Math.random(); - case 'bagua':case 'renwang': - if(player.getEquip('bagua')||player.getEquip('tengjia')||player.getEquip('renwang')) return Math.random(); - return 1.2+Math.random(); - case 'tengjia': - if(player.getEquip('baiyin')) return 1.3+Math.random(); - return Math.random(); - case 'baiyin': - return 0.4+Math.random(); - default: return 0; - } - }); - 'step 1' - if(result.bool){ - player.logSkill('kud_qiaoshou'); - event.cardname=result.links[0][2]; - player.chooseCard('h',true,'将一张手牌置于武将牌上,然后视为装备'+get.translation(event.cardname)); - } - else event.finish(); - 'step 2' - player.addTempSkill('kud_qiaoshou_equip',{player:['phaseUseEnd','phaseZhunbeiBegin']}); - var name=event.cardname; - player.storage.kud_qiaoshou_equip2=name; - var cards=result.cards; - player.lose(cards,ui.special,'toStorage'); - player.markAuto('kud_qiaoshou_equip',cards); - var info=lib.card[name].skills; - if(info&&info.length) player.addAdditionalSkill('kud_qiaoshou_equip',info); - player.draw(); - game.log(player,'声明了','#y'+get.translation(name)); - }, - }, - kud_buhui:{ - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&player==event.dying&&(player.getStorage('kud_qiaoshou_equip').length+player.countCards('e'))>0; - }, - skillAnimation:true, - limited:true, - animationColor:'gray', - content:function(){ - 'step 0' - player.awakenSkill('kud_buhui'); - var cards=player.getCards('e'); - var length=player.getStorage('kud_qiaoshou_equip').length; - if(cards.length) player.discard(cards); - player.removeSkill('kud_qiaoshou_equip'); - player.draw(cards.length+length); - player.addSkill('kud_chongzhen'); - 'step 1' - var num=2-player.hp; - if(num) player.recover(num); - }, - derivation:'riki_chongzhen', - ai:{ - order:0.5, - result:{ - player:1, - }, - save:true, - skillTagFilter:function(player){ - return player.isDying(); - }, - }, - }, - kud_chongzhen:{ - inherit:'riki_chongzhen', - }, - misuzu_hengzhou:{ - trigger:{player:['phaseJieshuBegin','recoverEnd','damageEnd','phaseDrawBegin2','phaseZhunbeiBegin']}, - forced:true, - filter:function(event,player){ - if(event.name=='phaseZhunbei') return true; - if(['damage','recover'].contains(event.name)) return event.num>0; - var num=player.countMark('misuzu_hengzhou'); - if(event.name=='phaseDraw') return num>0&&!event.numFixed; - return num>3; - }, - content:function(){ - var num=player.countMark('misuzu_hengzhou'); - if(trigger.name=='phaseDraw') trigger.num+=num; - else if(trigger.name=='phaseJieshu'){ - player.removeMark('misuzu_hengzhou',num); - player.loseHp(); - } - else player.addMark('misuzu_hengzhou',trigger.num||1); - }, - intro:{ - name:'诅咒', - name2:'诅咒', - content:'mark', - }, - marktext:'诅', - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('misuzu_hengzhou'); - }, - }, - }, - misuzu_nongyin:{ - enable:'chooseToUse', - viewAs:{ - name:'tao', - isCard:true, - }, - viewAsFilter:function(player){ - return !player.hasJudge('lebu')&&player.countCards('he',function(card){ - return get.color(card)=='red'&&get.type(card,'trick')!='trick'; - }); - }, - filterCard:function(card){ - return get.color(card)=='red'&&get.type(card,'trick')!='trick'; - }, - check:function(card){ - return 7+(_status.event.dying||_status.event.player).getDamagedHp()-get.value(card); - }, - ignoreMod:true, - position:'he', - precontent:function(){ - player.logSkill('misuzu_nongyin'); - player.$throw(event.result.cards); - player.addJudge({name:'lebu'},event.result.cards); - event.result.card.cards=[]; - event.result.cards=[]; - delete event.result.skill; - delete event.result.card.suit; - delete event.result.card.number; - }, - ai:{ - result:0.5, - save:true, - skillTagFilter:function(player){ - return !player.hasJudge('lebu')&&player.countCards('he',function(card){ - return get.color(card)=='red' - }); - }, - }, - }, - misuzu_zhongxing:{ - trigger:{player:'loseAfter'}, - direct:true, - filter:function(event,player){ - return event.js&&event.js.length>0&&!player.hasSkill('misuzu_zhongxing_haruko'); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('misuzu_zhongxing'),'令一名角色选择摸两张牌或回复1点体力').set('ai',function(card){ - return get.attitude(_status.event.player,card); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('misuzu_zhongxing',target); - player.addTempSkill('misuzu_zhongxing_haruko'); - target.chooseDrawRecover(2,true); - } - }, - }, - misuzu_zhongxing_haruko:{}, - kamome_suitcase:{ - trigger:{player:['phaseJudgeBefore','phaseDiscardBefore','turnOverBefore']}, - forced:true, - popup:false, - equipSkill:true, - content:function(){ - trigger.cancel(); - }, - }, - kamome_yangfan:{ - trigger:{ - global:'gameDrawAfter', - player:['enterGame','loseAfter'], - }, - forced:true, - filter:function(event,player){ - if(event.name!='lose') return true; - return event.es&&event.es.length; - }, - content:function(){ - if(trigger.name=='lose') player.draw(2*trigger.es.length); - else player.equip(game.createCard2('kamome_suitcase','spade',1)); - }, - ai:{ - noe:true, - reverseEquip:true, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; - } - } - } - }, - kamome_huanmeng:{ - trigger:{player:'phaseZhunbeiBegin'}, - frequent:true, - content:function(){ - "step 0" - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var num=1+player.countCards('e'); - var cards=get.cards(num); - event.cards=cards; - var switchToAuto=function(){ - _status.imchoosing=false; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - var top=[]; - var judges=player.getCards('j'); - var stopped=false; - if(!player.hasWuxie()){ - for(var i=0;i=num&&!player.hasSkill('kamome_jieban_phase'); - }, - content:function(){ - 'step 0' - event.num=player.storage.kamome_jieban?1:2; - player.chooseCardTarget({ - position:'he', - filterCard:true, - filterTarget:lib.filter.notMe, - selectCard:event.num, - prompt:get.prompt('kamome_jieban'), - prompt2:event.num==2?'将两张牌交给一名其他角色,然后其交给你一张牌。':'将一张牌交给一名其他角色,然后其交给你两张牌。', - ai1:function(card){ - if(card.name=='du') return 20; - var val=get.value(card); - var player=_status.event.player; - if(get.position(card)=='e'){ - if(val<=0) return 10; - return 10/val; - } - return 6-val; - }, - ai2:function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(ui.selected.cards[0].name=='du') return -2*att; - if(att>0) return 1.5*att; - var num=get.select(_status.event.selectCard)[1]; - if(att<0&&num==1) return -0.7*att; - return att; - }, - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('kamome_jieban',target); - player.addTempSkill('kamome_jieban_phase'); - target.gain(result.cards,player,'giveAuto'); - player.storage.kamome_jieban=!player.storage.kamome_jieban; - } - else event.finish(); - 'step 2' - var num=3-event.num; - var hs=target.getCards('he'); - if(hs.length){ - if(hs.length<=num) event._result={bool:true,cards:hs}; - else{ - target.chooseCard('he',true,'交给'+get.translation(player)+get.cnNumber(num)+'张牌',num).set('ai',function(card){ - var player=_status.event.player; - var target=_status.event.getParent().player; - if(get.attitude(player,target)>0){ - if(!target.hasShan()&&card.name=='shan') return 10; - if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')&&target.hasUseTarget(card)) return 10-get.value(card); - return 6-get.value(card); - } - return -get.value(card); - }); - } - } - else event.finish(); - 'step 3' - player.gain(result.cards,target,'giveAuto'); - }, - }, - kamome_jieban_phase:{}, - nao_duyin:{ - trigger:{global:'phaseBegin'}, - filter:function(event,player){ - return event.player!=player&&(!player.storage.nao_duyin||!player.storage.nao_duyin.contains(event.player)); - }, - logTarget:'player', - charlotte:true, - check:function(){ - return false; - }, - content:function(){ - 'step 0' - player.chooseToDiscard('he','弃置一张牌,或将武将牌翻面').set('ai',function(card){ - if(_status.event.player.isTurnedOver()) return 0; - return 6-get.value(card); - }); - 'step 1' - if(!result.bool) player.turnOver(); - player.addTempSkill('nao_duyin2',{player:'phaseAfter'}); - if(!player.storage.nao_duyin) player.storage.nao_duyin=[]; - player.storage.nao_duyin.push(trigger.player); - if(!player.storage.nao_duyin2) player.storage.nao_duyin2=[]; - player.storage.nao_duyin2.push(trigger.player); - player.markSkill('nao_duyin2'); - }, - }, - nao_duyin2:{ - intro:{ - content:'$不能使用牌指定你为目标,对$使用牌没有距离和次数限制', - }, - mod:{ - targetEnabled:function(card,player,target){ - if(target.storage.nao_duyin2&&target.storage.nao_duyin2.contains(player)) return false; - }, - targetInRange:function(card,player,target){ - if(player.storage.nao_duyin2&&player.storage.nao_duyin2.contains(target)) return true; - }, - }, - trigger:{player:'useCardEnd'}, - firstDo:true, - silent:true, - onremove:true, - filter:function(event,player){ - if(player.storage.nao_duyin2){ - for(var i of player.storage.nao_duyin2){ - if(event.targets.contains(i)) return true; - } - } - return false; - }, - content:function(){ - if(trigger.addCount!==false){ - trigger.addCount=false; - var stat=player.getStat(); - if(stat&&stat.card&&stat.card[trigger.card.name]) stat.card[trigger.card.name]--; - } - }, - }, - nao_wanxin:{ - trigger:{global:'roundStart'}, - hasHistory:function(player){ - var list=player.actionHistory; - for(var i=list.length-1;i>=0;i--){ - if(list[i].isRound) break; - } - list=list.slice(i); - return list.filter(function(yuu){ - return yuu.damage&&yuu.damage.length>0; - }).length>0; - }, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return lib.skill.nao_wanxin.hasHistory(current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('nao_wanxin'),function(card,player,target){ - return _status.event.yuus.contains(target); - }).set('yuus',game.filterPlayer(function(current){ - return lib.skill.nao_wanxin.hasHistory(current); - })).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('nao_wanxin',target); - target.draw(2); - } - else event.finish(); - 'step 2' - player.turnOver(false); - 'step 3' - player.link(false); - if(target==player) event.finish(); - 'step 4' - target.turnOver(false); - 'step 5' - target.link(false); - }, - }, - nao_shouqing:{ - global:'nao_shouqing2', - }, - nao_shouqing2:{ - enable:'phaseUse', - viewAs:function(){ - return {name:'tao'} - }, - filterCard:{name:'tao'}, - ignoreMod:true, - filterTarget:function(card,player,target){ - return target!=player&&target.isDamaged()&&target.hasSkill('nao_shouqing'); - }, - selectTarget:function(){ - return game.countPlayer(function(current){ - return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); - })>1?1:-1; - }, - filter:function(event,player){ - return player.countCards('h','tao')&&game.hasPlayer(function(current){ - return lib.skill.nao_shouqing2.filterTarget(null,player,current) - }); - }, - onuse:function(links,player){ - player.addSkill('nao_shouqing3'); - player.addMark('nao_shouqing3',1,false); - }, - prompt:function(){ - var list=game.filterPlayer(function(current){ - return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); - }); - var str='对'+get.translation(list); - if(list.length>1) str+='中的一名角色'; - str+='使用一张【桃】'; - return str; - }, - }, - nao_shouqing3:{ - intro:{ - content:'手牌上限+#', - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('nao_shouqing3'); - }, - }, - trigger:{player:'useCardAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='nao_shouqing2'; - }, - content:function(){ - player.draw(); - }, - }, - shiorimiyuki_banyin:{ - trigger:{player:['damageEnd','recoverEnd']}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.isDamaged(); - }) - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('shiorimiyuki_banyin'),'令一名其他角色回复1点体力',lib.filter.notMe).set('ai',function(target){ - var player=_status.event.player; - return get.recoverEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('shiorimiyuki_banyin',target); - target.recover(); - } - }, - }, - shiorimiyuki_tingxian:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseControl('一张','两张','三张','cancel2').set('prompt',get.prompt2('shiorimiyuki_tingxian')).set('ai',function(){ - var player=_status.event.player; - var max=Math.min(player.hp+1,player.maxHp) - var min=Math.min(Math.max(max-2,max-player.hp),3); - if(min) return min-1; - return 3; - }); - 'step 1' - if(result.control=='cancel2'){event.finish();return;} - var num=1+result.index; - player.draw(num); - 'step 2' - event.cards=result; - player.recover(); - 'step 3' - if(get.itemtype(cards)=='cards'){ - trigger.shiorimiyuki_tingxian=cards; - player.addTempSkill('shiorimiyuki_tingxian2'); - } - }, - }, - shiorimiyuki_tingxian2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - charlotte:true, - mod:{ - aiOrder:function(player,card,num){ - var cards=_status.event.getParent('phaseUse').shiorimiyuki_tingxian; - if(cards&&cards.contains(card)) return num+2; - }, - aiValuetarget:function(player,card,num){ - var cards=_status.event.getParent('phaseUse').shiorimiyuki_tingxian; - if(cards&&cards.contains(card)) return 0; - }, - }, - filter:function(event,player){ - var hs=player.getCards('h'); - return Array.isArray(event.shiorimiyuki_tingxian)&&event.shiorimiyuki_tingxian.filter(function(card){ - return hs.contains(card); - }).length>0 - }, - content:function(){ - var hs=player.getCards('h'); - player.loseHp(trigger.shiorimiyuki_tingxian.filter(function(card){ - return hs.contains(card); - }).length); - }, - }, - shizuru_nianli:{ - enable:'chooseToUse', - prompt:'展示一张♦/♣/♥/♠手牌,然后视为使用一张雷杀/闪/桃/无懈可击', - viewAs:function(cards,player){ - var name=false; - var nature=null; - switch(get.suit(cards[0],player)){ - case 'club':name='shan';break; - case 'diamond':name='sha';nature='thunder';break; - case 'spade':name='wuxie';break; - case 'heart':name='tao';break; - } - if(name) return {name:name,nature:nature,isCard:true}; - return null; - }, - check:function(card){ - var player=_status.event.player; - if(_status.event.type=='phase'){ - var max=0; - var name2; - var list=['sha','tao']; - var map={sha:'diamond',tao:'heart'} - for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'fire':null})>0){ - var temp=get.order({name:name,nature:name=='sha'?'fire':null}); - if(temp>max){ - max=temp; - name2=map[name]; - } - } - } - if(name2==get.suit(card,player)) return 1; - return 0; - } - return 1; - }, - ignoreMod:true, - filterCard:function(card,player,event){ - event=event||_status.event; - var filter=event._backup.filterCard; - var name=get.suit(card,player); - if(name=='club'&&filter({name:'shan'},player,event)) return true; - if(name=='diamond'&&filter({name:'sha',nature:'thunder'},player,event)) return true; - if(name=='spade'&&filter({name:'wuxie'},player,event)) return true; - if(name=='heart'&&filter({name:'tao'},player,event)) return true; - return false; - }, - filter:function(event,player){ - if(player.hasSkill('shizuru_nianli_round')) return false; - var filter=event.filterCard; - if(filter({name:'sha',nature:'thunder'},player,event)&&player.countCards('h',{suit:'diamond'})) return true; - if(filter({name:'shan'},player,event)&&player.countCards('h',{suit:'club'})) return true; - if(filter({name:'tao'},player,event)&&player.countCards('h',{suit:'heart'})) return true; - if(filter({name:'wuxie'},player,event)&&player.countCards('h',{suit:'spade'})) return true; - return false; - }, - precontent:function(){ - player.logSkill('shizuru_nianli'); - player.addTempSkill('shizuru_nianli_round','roundStart'); - player.showCards(get.translation(player)+'发动了【念力】',event.result.cards.slice(0)); - event.result.card.cards=[]; - event.result.cards=[]; - delete event.result.skill; - delete event.result.card.suit; - delete event.result.card.number; - event.getParent().addCount=false; - event.getParent().shizuru_nianli=true; - }, - ai:{ - respondSha:true, - respondShan:true, - save:true, - skillTagFilter:function(player,tag){ - if(player.hasSkill('shizuru_nianli_round')) return false; - var name; - switch(tag){ - case 'respondSha':name='diamond';break; - case 'respondShan':name='club';break; - case 'save':name='heart';break; - } - if(!player.countCards('h',{suit:name})) return false; - }, - order:function(item,player){ - if(player&&_status.event.type=='phase'){ - var max=0; - var list=['sha','tao']; - var map={sha:'diamond',tao:'heart'} - for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'thunder':null})>0){ - var temp=get.order({name:name,nature:name=='sha'?'thunder':null}); - if(temp>max) max=temp; - } - } - max/=1.1; - return max; - } - return 2; - }, - }, - hiddenCard:function(player,name){ - return name=='wuxie'&&player.countCards('h',{suit:'spade'})>0&&!player.hasSkill('shizuru_nianli_round'); - }, - group:'shizuru_nianli_clear', - subSkill:{ - round:{ - mark:true, - intro:{content:'本轮已发动'}, - }, - clear:{ - trigger:{player:'useCardAfter'}, - lastDo:true, - silent:true, - filter:function(event,player){ - return event.getParent().shizuru_nianli==true; - }, - content:function(){ - player.getHistory('useCard').remove(trigger); - }, - }, - }, - }, - shizuru_benzhan:{ - trigger:{global:['useCard','respond']}, - direct:true, - filter:function(event,player){ - return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); - }, - content:function(){ - 'step 0' - event.type=get.type(trigger.card)=='basic'; - var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; - player.chooseTarget(get.prompt('shizuru_benzhan'),prompt).set('ai',function(target){ - var player=_status.event.player; - if(_status.event.getParent().type){ - var att=get.attitude(player,target); - if(target.hasSkillTag('nogain')) return -att; - if(target.countCards('he')==1&&att<0) att/=2; - return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) - } - return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('shizuru_benzhan',target,'thunder'); - var trans=get.translation(target); - var list; - if(event.type){ - if(!target.countCards('he')) event._result={index:0}; - else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; - } - else{ - if(target.isHealthy()) event._result={index:1}; - else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; - } - player.chooseControl().set('choiceList',list).set('choice',function(){ - if(event.type) return (get.attitude(player,target)>0)?0:1; - return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; - }()).set('ai',function(){ - return _status.event.choice; - }); - } - else event.finish(); - 'step 2' - player.addExpose(0.2); - if(event.type){ - if(result.index==0) target.draw(2); - else target.chooseToDiscard(2,'he',true); - } - else{ - if(result.index==0) target.recover(); - else target.damage(); - } - }, - }, - kyoko_juwu:{ - trigger:{global:['loseAfter','cardsDiscardAfter']}, - direct:true, - filter:function(event,player){ - return player!=event.player&&player!=_status.currentPhase&&event.cards&&event.cards.filter(function(card){ - return get.position(card,true)=='d'&&get.type(card,false)=='equip'; - }).length>0; - }, - content:function(){ - 'step 0' - var cards=trigger.cards.filter(function(card){ - return get.position(card,true)=='d'&&get.type(card,false)=='equip'; - }); - player.chooseButton([get.prompt('kyoko_juwu'),cards],[1,cards.length]).set('ai',function(){return 1}); - 'step 1' - if(result.bool){ - player.gain(result.links,'gain2','log'); - player.logSkill('kyoko_juwu'); - } - }, - }, - kyoko_zhengyi:{ - group:['kyoko_jingce','kyoko_shelie','kyoko_zhiheng'], - count:function(player){ - var list=[]; - player.countCards('e',function(card){ - list.add(get.suit(card,player)); - }); - return list.length; - }, - }, - kyoko_jingce:{ - trigger:{player:['phaseUseEnd','phaseJieshuBegin']}, - filter:function(event,player){ - var num=lib.skill.kyoko_zhengyi.count(player); - if(!num||(event.name=='phaseUse')==(num>3)) return false; - return player.getHistory('useCard',function(evt){ - return event.name!='phaseUse'||evt.getParent('phaseUse')==event; - }).length>=player.hp; - }, - frequent:true, - content:function(){ - player.draw(2); - }, - }, - kyoko_shelie:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - filter:function(event,player){ - return !event.numFixed&&lib.skill.kyoko_zhengyi.count(player)>1; - }, - content:function(){ - "step 0" - trigger.changeToZero(); - event.cards=get.cards(5); - game.cardsGotoOrdering(event.cards); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards){ - var str; - if(player==game.me&&!_status.auto){ - str='涉猎:获取花色各不相同的牌'; - } - else{ - str='涉猎'; - } - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards); - event.time=get.utc(); - game.addVideo('showCards',player,['涉猎',get.cardsInfo(event.cards)]); - game.addVideo('delay',null,2); - "step 1" - var next=player.chooseButton([0,5],true); - next.set('dialog',event.videoId); - next.set('filterButton',function(button){ - for(var i=0;i0){ - game.delay(0,time); - } - "step 3" - game.broadcastAll('closeDialog',event.videoId); - var cards2=event.cards2; - player.gain(cards2,'log','gain2'); - }, - }, - kyoko_zhiheng:{ - enable:'phaseUse', - usable:1, - position:'he', - filter:function(event,player){ - return lib.skill.kyoko_zhengyi.count(player)>2; - }, - prompt:function(){ - var str='弃置任意张牌并摸等量的牌'; - if(lib.skill.kyoko_zhengyi.count(_status.event.player)>3) str+=',若弃置了所有手牌则多摸一张牌。'; - return str; - }, - filterCard:lib.filter.cardDiscardable, - discard:false, - lose:false, - delay:false, - selectCard:[1,Infinity], - check:function(card){ - var player=_status.event.player; - if(get.position(card)=='h'){ - return 8-get.value(card); - } - return 6-get.value(card) - }, - content:function(){ - 'step 0' - player.discard(cards); - event.num=1; - var hs=player.getCards('h'); - if(!hs.length||lib.skill.kyoko_zhengyi.count(player)<4) event.num=0; - else for(var i=0;i1; - }, - content:function(){ - player.awakenSkill(event.name); - var num=player.maxHp-player.hp; - player.recover(num); - player.draw(num); - if(_status.characterlist&&_status.characterlist.contains('key_midori')){ - player.reinit('key_mio','key_midori',false); - _status.characterlist.remove('key_midori'); - _status.characterlist.add('key_mio'); - } - }, - }, - midori_nonghuan:{ - enable:'phaseUse', - filter:function(event,player){ - return (player.getStat('skill').midori_nonghuan||0)0; - }, - content:function(){ - 'step 0' - var stat=player.getStat(); - if(!stat.midori_nonghuan) stat.midori_nonghuan=[]; - stat.midori_nonghuan.push(target); - player.gainPlayerCard(target,'hej',true); - player.draw(); - 'step 1' - if(player.countCards('he')>0) player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌'); - else event.goto(3); - 'step 2' - target.gain(result.cards,player,'giveAuto'); - 'step 3' - var history=game.getGlobalHistory('cardMove'); - for(var i=0;i1; - }, - content:function(){ - player.awakenSkill(event.name); - var num=player.maxHp-player.hp; - player.recover(num); - player.draw(num); - if(_status.characterlist&&_status.characterlist.contains('key_mio')){ - player.reinit('key_midori','key_mio',false); - _status.characterlist.remove('key_mio'); - _status.characterlist.add('key_midori'); - } - }, - }, - kanade_mapo:{ - derivation:'mapodoufu', - enable:'chooseToUse', - viewAs:{name:'mapodoufu'}, - filterCard:{suit:'heart'}, - viewAsFilter:function(player){ - return player.countCards('he',{suit:'heart'})>0; - }, - position:'he', - mod:{ - selectTarget:function(card,player,range){ - if(card.name=='mapodoufu'&&range[1]!=-1) range[1]++; - }, - }, - check:function(card){ - var player=_status.event.player; - if(game.countPlayer(function(current){ - return player.canUse('mapodoufu',current)&&get.effect(current,{name:'mapodoufu'},player,player)>0; - })>1) return 6-get.value(card); - return 4-get.value(card); - }, - }, - kanade_benzhan:{ - trigger:{global:['useCard','respond']}, - direct:true, - filter:function(event,player){ - return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); - }, - content:function(){ - 'step 0' - event.type=get.type(trigger.card)=='basic'; - var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; - player.chooseTarget(get.prompt('kanade_benzhan'),prompt).set('ai',function(target){ - var player=_status.event.player; - if(_status.event.getParent().type){ - var att=get.attitude(player,target); - if(target.hasSkillTag('nogain')) return -att; - if(target.countCards('he')==1&&att<0) att/=2; - return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) - } - return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('kanade_benzhan',target,'thunder'); - var trans=get.translation(target); - var list; - if(event.type){ - if(!target.countCards('he')) event._result={index:0}; - else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; - } - else{ - if(target.isHealthy()) event._result={index:1}; - else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; - } - player.chooseControl().set('choiceList',list).set('choice',function(){ - if(event.type) return (get.attitude(player,target)>0)?0:1; - return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; - }()).set('ai',function(){ - return _status.event.choice; - }); - } - else event.finish(); - 'step 2' - player.addExpose(0.2); - if(event.type){ - if(result.index==0) target.draw(2); - else target.chooseToDiscard(2,'he',true); - } - else{ - if(result.index==0) target.recover(); - else target.damage(); - } - }, - }, - yuzuru_wuxin:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterTarget:function(){ - if(ui.selected.cards.length) return false; - return true; - }, - filterCard:function(){ - if(ui.selected.targets.length) return false; - return lib.filter.cardDiscardable.apply(this,arguments); - }, - selectTarget:function(){ - if(!ui.selected.cards.length) return [1,1]; - return [0,1]; - }, - selectCard:function(){ - if(!ui.selected.cards.length) return [0,2]; - return [2,2]; - }, - prompt:get.prompt2('yuzuru_wuxin'), - ai1:function(card){ - var player=_status.event.player; - if(player.hp>3) return 0; - return player.getDamagedHp()*2-get.value(card); - }, - ai2:function(target){ - if(player.hp<4||target.hasSkillTag('nogain')) return 0; - return get.attitude(_status.event.player,target); - }, - }); - 'step 1' - if(result.bool){ - if(result.cards.length){ - player.logSkill('yuzuru_wuxin'); - player.discard(result.cards); - player.recover(); - } - else{ - var target=result.targets[0]; - player.logSkill('yuzuru_wuxin',target,{color:[194,117,92]}); - player.loseHp(); - target.draw(2); - } - } - }, - }, - yuzuru_deyi:{ - derivation:['yuzuru_kunfen','yuzuru_quji','yuzuru_wangsheng','yuzuru_kunfen_rewrite','yuzuru_quji_rewrite'], - trigger:{global:'dieAfter'}, - forced:true, - unique:true, - juexingji:true, - skillAnimation:true, - animationColor:'orange', - content:function(){ - player.awakenSkill('yuzuru_deyi'); - player.removeSkill('yuzuru_wuxin'); - player.addSkillLog('yuzuru_kunfen'); - player.addSkillLog('yuzuru_quji'); - player.addSkillLog('yuzuru_wangsheng'); - player.loseMaxHp(); - player.recover(); - }, - }, - yuzuru_kunfen:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - content:function(){ - 'step 0' - if(!player._yuzuru_sss) player.loseHp(); - player.draw(2); - 'step 1' - if(player.countCards('he')<2) event.finish(); - else{ - player.chooseCardTarget({ - selectCard:2, - filterTarget:lib.filter.notMe, - prompt:'是否交给一名其他角色两张牌?', - position:'he', - ai1:function(card){ - var player=_status.event.player; - if(player.maxHp-player.hp==1&&card.name=='du') return 30; - var check=player.countCards('h')-2; - if(check<1) return 0; - if(player.hp>1&&check<2) return 0; - return get.unuseful(card)+9; - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; - return att-2; - }, - }); - } - 'step 2' - if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); - }, - }, - yuzuru_quji:{ - audio:2, - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - selectCard:function(){ - var player=_status.event.player; - return player.getDamagedHp(); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.hp0){ - player.chooseCardTarget({ - selectCard:[1,Infinity], - filterTarget:lib.filter.notMe, - prompt:'将任意张牌交给一名其他角色,或点【取消】。', - position:'he', - ai1:function(card){ - var player=_status.event.player; - if(get.suit(card,false)=='heart'&&game.hasPlayer(function(current){ - return current.hasSkill('kanade_mapo')&&get.attitude(player,current)>0; - })) return 1; - return 0; - }, - ai2:function(kanade){ - if(kanade.hasSkill('kanade_mapo')&&get.attitude(_status.event.player,kanade)>0) return 2; - return 0; - }, - }); - } - else event.goto(2); - 'step 1' - if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); - 'step 2' - player.loseMaxHp(); - 'step 3' - if(player.hp<2) player.recover(2-player.hp); - }, - }, - ao_xishi:{ - trigger:{ - player:['useCard','respond'], - target:'useCardToTargeted', - }, - forced:true, - filter:function(event,player,name){ - return (name=='useCard'||name=='respond'||event.player!=player)&&get.suit(event.card)=='diamond'; - }, - content:function(){player.draw()}, - }, - ao_kuihun:{ - trigger:{global:'dying'}, - logTarget:'player', - line:'thunder', - filter:function(event,player){ - return player!=event.player; - }, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(!trigger.player.countCards('h')) event.finish(); - else player.chooseButton(['选择一张牌作为「蝶」',trigger.player.getCards('h')]).set('ai',function(button){ - var val=get.buttonValue(button); - if(get.attitude(_status.event.player,get.owner(button.link))>0) return -val; - return val; - }); - 'step 2' - if(result.bool){ - trigger.player.lose(result.links,ui.special,'visible','toStorage'); - trigger.player.$give(result.links,player,false); - player.markAuto('ao_diegui',result.links); - game.log(result.links,'飞向了',player); - } - }, - locked:false, - mod:{ - targetInRange:function(card,player){ - var list=player.getStorage('ao_diegui'); - for(var i=0;i2; - }, - content:function(){ - player.awakenSkill('ao_shixin'); - player.removeSkill('ao_kuihun'); - player.addSkill('ao_diegui'); - player.gainMaxHp(); - player.recover(); - }, - }, - ao_diegui:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.getStorage('ao_diegui').length>0; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('蝶归',player.storage.ao_diegui,'hidden'); - }, - backup:function(links,player){ - return { - card:links, - filterCard:function(){return false}, - selectCard:-1, - filterTarget:true, - delay:false, - content:lib.skill.ao_diegui.contentx, - line:'thunder', - ai:{ - result:{ - target:function(player,target){ - if(target!=player&&target.hasSkillTag('nogain')) return 0; - var num=1; - if(target.isTurnedOver()) num+=2; - if(target.isLinked()) num+=0.5; - return num; - }, - } - }, - } - }, - prompt:function(links,player){ - return '选择一名角色,令其获得'+get.translation(links[0])+',摸两张牌并将武将牌复原。' - }, - }, - contentx:function(){ - 'step 0' - target.gain(lib.skill.ao_diegui_backup.card,player,'give','fromStorage'); - player.unmarkAuto('ao_diegui',lib.skill.ao_diegui_backup.card); - target.draw(2); - 'step 1' - target.link(false); - 'step 2' - target.turnOver(false); - }, - intro:{name:'七影蝶',content:'cards',onunmark:'throw'}, - ai:{order:1,result:{player:1}}, - }, - ayato_jianshen:{ - mod:{ - cardnature:function(card,player){ - if(get.name(card)=='sha') return 'kami'; - }, - }, - ai:{threaten:3}, - }, - ayato_zonghuan:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseButton(['请选择'+get.translation(target)+'的一张手牌',target.getCards('h')],true).set('ai',get.buttonValue); - 'step 1' - if(result.bool){ - var card=result.links[0]; - event.card=card; - if(!lib.filter.cardEnabled(card,target)) event._result={bool:false}; - else{ - var targets=game.players.slice(0); - var info=get.info(card); - var range; - if(!info.notarget){ - var select=get.copy(info.selectTarget); - if(select==undefined){ - range=[1,1]; - } - else if(typeof select=='number') range=[select,select]; - else if(get.itemtype(select)=='select') range=select; - else if(typeof select=='function') range=select(card,player); - game.checkMod(card,target,range,'selectTarget',target); - } - if(info.notarget||range[1]==-1){ - if(range[1]==-1){ - for(var i=0;i0; - }; - } - else{ - var next=player.chooseTarget(); - next.set('_get_card',card); - next.set('source',target); - next.set('filterTarget',function(card,player,target){ - return lib.filter.filterTarget(_status.event._get_card,_status.event.source,target); - }); - next.set('ai',function(target){ - var evt=_status.event; - return get.effect(target,evt._get_card,evt.source,evt.player) - }); - next.set('selectTarget',function(){ - var card=get.card(),player=_status.event.source; - if(card==undefined) return; - var range; - var select=get.copy(get.info(card).selectTarget); - if(select==undefined){ - if(get.info(card).filterTarget==undefined) return[0,0]; - range=[1,1]; - } - else if(typeof select=='number') range=[select,select]; - else if(get.itemtype(select)=='select') range=select; - else if(typeof select=='function') range=select(card,player); - game.checkMod(card,player,range,'selectTarget',player); - return range; - }); - next.set('prompt',event.prompt||('选择'+get.translation(target)+'使用'+get.translation(card)+'的目标')); - next.set('prompt2','或点「取消」令其将此牌置入弃牌堆'); - } - } - } - else event.finish(); - 'step 2' - if(result.bool){ - target.useCard(card,event.targets2||result.targets,false,'noai'); - player.draw(); - } - else{ - target.lose(card,ui.discardPile); - target.$throw(card); - game.log(target,'将',card,'置入了弃牌堆'); - } - }, - ai:{order:10,result:{target:-1}}, - }, - nagisa_tiandu:{ - trigger:{player:'judgeEnd'}, - frequent:function(event){ - if(event.result.card.name=='du') return false; - return true; - }, - check:function(event){ - if(event.result.card.name=='du') return false; - return true; - }, - filter:function(event,player){ - return get.position(event.result.card,true)=='o'; - }, - content:function(){ - player.gain(trigger.result.card,'gain2'); - } - }, - nagisa_fuxin:{ - trigger:{ - global:["gainAfter","loseAfter","damageEnd"], - }, - filter:function (event){ - var evt=event; - if(event.name=='lose'){ - if(event.type!='discard') return false; - evt=event.getParent(); - } - var player=evt[event.name=='gain'?'source':'player']; - if(!player||player==_status.currentPhase||player.isDead()) return false; - if(event.name=='damage') return true; - if(evt[event.name=='gain'?'bySelf':'notBySelf']!=true) return false; - if(event.name=='lose') return event.hs.length>0; - return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; - }, - check:function(event,player){ - return get.attitude(player,event[event.name=='gain'?'source':'player'])>0&&get.attitude(player,_status.currentPhase)<=0; - }, - logTarget:function(event){ - return event[event.name=='gain'?'source':'player']; - }, - content:function(){ - "step 0" - event.target=trigger[trigger.name=='gain'?'source':'player']; - event.target.judge(); - "step 1" - if(result.color=='red') target.draw(); - else if(_status.currentPhase&&_status.currentPhase.countCards('he')) _status.currentPhase.chooseToDiscard('he',true); - }, - ai:{expose:0.2}, - }, - tomoya_shangxian:{ - trigger:{player:'phaseUseBegin'}, - mark:true, - intro:{ - content:function(s){ - return '计算与其他角色的距离时始终从'+(s?'逆':'顺')+'时针计算' - }, - }, - content:function(){ - player.draw(); - player.storage.tomoya_shangxian=!player.storage.tomoya_shangxian; - }, - ai:{ - left_hand:true, - right_hand:true, - skillTagFilter:function(player,tag){ - return (player.storage.tomoya_shangxian==true)==(tag=='left_hand'); - }, - }, - }, - tomoya_wangjin:{ - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - return player!=event.player&&!player.hasSkill('tomoya_wangjin_'+player.inRange(event.player)); - }, - logTarget:'player', - check:function(event,player){ - var target=event.player; - var bool=player.inRange(target); - if(!bool){ - if(target.hp>player.hp) return get.effect(target,{name:'sha',isCard:true},player,player)>0; - var temp=target; - while(true){ - temp=temp.getNext(); - if(temp==target||temp==_status.roundStart) return true; - if(temp==player) continue; - if(temp.hp>player.hp&&!player.inRange(temp)&&get.effect(temp,{name:'sha',isCard:true},player,player)>0) return false; - } - } - if(get.attitude(player,target)<2) return false; - if(target.hp=2&&!temp.hasSkillTag('nogain')) return false; - } - }, - content:function(){ - 'step 0' - event.bool=player.inRange(trigger.player); - player.addTempSkill('tomoya_wangjin_'+event.bool,{global:'roundStart'}); - if(event.bool){ - trigger.player.draw(); - } - else player.draw(2); - 'step 1' - if(event.bool){ - if(trigger.player.hp0) trigger.player.discardPlayerCard(player,'h',true); - else event.finish(); - } - 'step 2' - if(event.bool){ - player.chooseCard('h','是否交给'+get.translation(trigger.player)+'一张牌?'); - } - else{ - event.finish(); - if(player.hp>=trigger.player.hp) return; - var card={name:'sha',isCard:true}; - if(player.canUse(card,trigger.player,false)) player.useCard(card,trigger.player,false); - } - 'step 3' - if(result.bool) trigger.player.gain(result.cards,player,'giveAuto') - }, - subSkill:{true:{},false:{}}, - ai:{expose:0.2}, - }, - noda_fengcheng:{ - trigger:{ - player:"gainAfter", - }, - forced:true, - filter:function(event,player){ - return get.itemtype(event.source)=='player'&&event.bySelf!=true; - }, - check:function(event,player){ - return get.attitude(player,event.source)>0; - }, - logTarget:"source", - content:function(){ - trigger.source.draw(); - }, - }, - noda_xunxin:{ - enable:'phaseUse', - viewAs:{name:'juedou'}, - filter:function(event,player){ - return (player.getStat('skill').noda_xunxin||0)0; - }, - content:function(){ - 'step 0' - event.giver=trigger.turn; - event.gainner=event.giver==player?trigger.target:player; - event.giver.chooseCard('he',true,'交给'+get.translation(event.gainner)+'一张牌'); - 'step 1' - event.gainner.gain(result.cards,event.giver,'giveAuto'); - }, - }, - hinata_qiulve:{ - enable:['chooseToUse','chooseToRespond'], - viewAsFilter:function(player){ - return player.countCards('he',function(card){ - return get.type(card)!='basic'; - })>0; - }, - viewAs:{name:'sha'}, - filterCard:function(card,player){ - return get.type(card)!='basic'; - }, - locked:false, - position:'he', - check:function(card){ - var val=get.value(card); - if(val>=6) return 0; - if(get.color(card)=='black') return 12-val; - return 6-val; - }, - mod:{ - targetInRange:function(card,player,target){ - if(_status.event.skill=='hinata_qiulve') return true; - }, - }, - group:'hinata_qiulve_clear', - ai:{ - respondSha:true, - skillTagFilter:function(player){ - return player.countCards('he',function(card){ - return get.type(card)!='basic'; - })>0; - }, - }, - }, - hinata_qiulve_clear:{ - trigger:{player:'useCard1'}, - firstDo:true, - silent:true, - filter:function(event,player){ - return event.skill=='hinata_qiulve'; - }, - content:function(){ - if(get.color(trigger.card)=='red') trigger.directHit.addArray(game.players); - else if(trigger.addCount!==false){ - trigger.addCount=false; - var stat=player.getStat().card; - if(stat.sha) stat.sha--; - } - }, - }, - hinata_ehou:{ - trigger:{global:'useCardAfter'}, - direct:true, - filter:function(event,player){ - return player!=event.player&&event.targets&&event.targets.contains(player)&&(_status.connectMode||player.hasSha()); - }, - content:function(){ - 'step 0' - player.chooseToUse({ - logSkill:'hinata_ehou', - preTarget:trigger.player, - prompt:'是否发动【扼喉】,对'+get.translation(trigger.player)+'使用一张【杀】?', - filterCard:function(card,player){ - return get.name(card)=='sha'&&lib.filter.filterCard.apply(this,arguments); - }, - filterTarget:function(card,player,target){ - return target==_status.event.preTarget&&lib.filter.filterTarget.apply(this,arguments); - }, - addCount:false, - }); - 'step 1' - if(result.bool&&player.getHistory('sourceDamage',function(evt){ - return evt.getParent(4)==event; - }).length) player.draw(); - }, - }, - hisako_yinbao:{ - trigger:{player:['damageEnd','recoverAfter']}, - content:function(){ - 'step 0' - player.judge(function(card){ - return get.suit(card)=='spade'?2:-2; - }); - 'step 1' - if(result.bool){ - player.chooseTarget(lib.filter.notMe,true,'选择一名其他角色,对其造成1点雷属性伤害').set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player,'thunder'); - }); - } - else event.finish(); - 'step 2' - var target=result.targets[0]; - player.addExpose(0.2); - player.line(target,'thunder'); - target.damage(); - }, - }, - hisako_zhuanyun:{ - trigger:{player:'judgeBegin'}, - forced:true, - silent:true, - filter:function(event,player){ - return !event.directresult; - }, - content:function(){ - var tempcard=false,temp=-Infinity; - for(var i=0;itemp){ - tempcard=card; - temp=temp2; - } - } - if(tempcard) trigger.directresult=tempcard; - }, - ai:{luckyStar:true}, - }, - riki_spwenji:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('he'); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('riki_spwenji'),function(card,player,target){ - return target!=player&&target.countCards('he'); - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0) return Math.sqrt(att)/10; - return 5-att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('riki_spwenji',target); - target.chooseCard('he',true,'问计:将一张牌交给'+get.translation(player)); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.addTempSkill('riki_spwenji_respond'); - player.storage.riki_spwenji_respond=result.cards[0].name; - event.target.give(result.cards,player,true); - } - }, - ai:{expose:0.2}, - subSkill:{ - respond:{ - onremove:true, - trigger:{player:'useCard'}, - forced:true, - charlotte:true, - audio:'riki_spwenji', - filter:function(event,player){ - return event.card.name==player.storage.riki_spwenji_respond; - }, - content:function(){ - trigger.directHit.addArray(game.players); - }, - } - } - }, - riki_nvzhuang:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - content:function(){ - player.draw(player.countCards('h')==0?2:1); - }, - }, - riki_mengzhong:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - derivation:'riki_chongzhen', - juexingji:true, - unique:true, - skillAnimation:true, - animationColor:'key', - filter:function(event,player){ - var num=0; - player.getAllHistory('gain',function(evt){ - if(evt.getParent().name=='riki_spwenji') num+=evt.cards.length; - }); - return num>=3; - }, - content:function(){ - player.awakenSkill('riki_mengzhong'); - player.removeSkill('riki_spwenji'); - player.gainMaxHp(); - player.recover(); - player.addSkill('riki_chongzhen'); - }, - }, - riki_chongzhen:{ - trigger:{ - player:"phaseUseBegin", - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('riki_chongzhen'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - return -get.attitude(player,target)*(1+target.countCards('e'))/(1+target.countCards('j')); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('riki_chongzhen',target); - player.chooseToCompare(target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - var num=0; - if(target.countCards('h')) num++; - if(target.countCards('e')) num++; - if(target.countCards('j')) num++; - if(num){ - player.gainPlayerCard(target,num,'hej',true).set('filterButton',function(button){ - for(var i=0;i0&&game.hasPlayer(function(current){ - return player.canCompare(current); - }); - }, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool) player.addTempSkill('yuiko_fenglun2','phaseUseEnd'); - }, - ai:{ - order:10, - result:{target:-1}, - }, - }, - yuiko_fenglun2:{ - mod:{ - cardUsable:function(){return Infinity}, - targetInRange:function(){return true}, - }, - }, - yuiko_dilve:{ - enable:"chooseCard", - check:function(){ - return 20; - }, - filter:function(event){ - return event.type=='compare'&&!event.directresult; - }, - onCompare:function(player){ - return game.cardsGotoOrdering(get.bottomCards()).cards; - }, - group:'yuiko_dilve_gain', - subSkill:{ - gain:{ - trigger:{ - player:['chooseToCompareAfter','compareMultipleAfter'], - target:['chooseToCompareAfter','compareMultipleAfter'] - }, - filter:function(event,player){ - if(event.preserve) return false; - return [event.card1,event.card2].filterInD('od').length>0; - }, - prompt2:function(event,player){ - return '获得'+get.translation([event.card1,event.card2].filterInD('od')); - }, - content:function(){ - player.gain([trigger.card1,trigger.card2].filterInD('od'),'gain2','log'); - } - }, - }, - }, - doruji_feiqu:{ - trigger:{ - player:'useCard', - target:'useCardToTargeted', - }, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - content:function(){ - if(trigger.name=='useCard') trigger.directHit.addArray(game.players); - else trigger.directHit.add(player); - }, - }, - akane_jugu:{ - audio:2, - mod:{ - maxHandcard:function(player,num){ - return num+player.maxHp; - } - }, - trigger:{global:'gameDrawAfter',player:'enterGame'}, - forced:true, - content:function(){ - player.draw(player.maxHp); - } - }, - akane_quanqing:{ - enable:'phaseUse', - filterCard:true, - filterTarget:function(card,player,target){ - return target!=player&&player.inRange(target); - }, - position:'he', - check:function(card){ - var val=get.value(card); - var num=card.number; - if(num>10) return 8-val; - var player=_status.event.player; - if(player.getUseValue(card,null,true)>player.getUseValue({name:'guohe'})) return 0; - if(num>6) return 6-val; - return 3-val; - }, - content:function(){ - 'step 0' - var num=cards[0].number; - var trans=get.translation(target); - var list=['令'+trans+'摸一张牌']; - event.addIndex=0; - if(num>6){ - if(target.countDiscardableCards(player,'hej')>0) list.push('弃置'+trans+'区域内的一张牌'); - else event.addIndex++; - } - if(num>10) list.push('对'+trans+'造成1点伤害'); - if(list.length==1) event._result={index:0}; - else player.chooseControl().set('choiceList',list).set('index',list.length-1).set('ai',function(){return _status.event.index}); - 'step 1' - if(result.index>0) result.index+=event.addIndex; - switch(result.index){ - case 0:target.draw();break; - case 1:player.discardPlayerCard(target,'hej',true);break; - case 2:target.damage('nocard');break; - } - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - var card=ui.selected.cards[0]; - if(card){ - if(card.number>10) return get.damageEffect(target,player,target); - if(card.number>6) return lib.card.guohe.ai.result.target.apply(this,arguments); - return 1; - } - }, - }, - }, - }, - akane_yifu:{ - unique:true, - global:'akane_yifu2', - zhuSkill:true, - }, - akane_yifu2:{ - audio:2, - enable:'phaseUse', - discard:false, - line:true, - direct:true, - clearTime:true, - delay:false, - lose:false, - prepare:function(cards,player,targets){ - targets[0].logSkill('akane_yifu'); - }, - prompt:function(){ - var player=_status.event.player; - var list=game.filterPlayer(function(target){ - return target!=player&&target.hasZhuSkill('akane_yifu',player); - }); - var str='将一张手牌交给'+get.translation(list); - if(list.length>1) str+='中的一人'; - return str; - }, - filter:function(event,player){ - if(player.group!='key') return false; - if(player.countCards('h')==0) return 0; - return game.hasPlayer(function(target){ - return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3'); - }); - }, - filterCard:true, - log:false, - filterTarget:function(card,player,target){ - return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3'); - }, - content:function(){ - 'step 0' - target.gain(cards,player,'giveAuto'); - target.addTempSkill('akane_yifu3','phaseUseEnd'); - target.draw(); - 'step 1' - if(target.countCards('h')>0) target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌').set('ai',function(card){ - return 14-get.value(card); - }); - else event.finish(); - 'step 2' - player.gain(result.cards,target,'giveAuto'); - }, - ai:{ - expose:0.3, - order:10, - result:{ - target:5 - } - } - }, - akane_yifu3:{}, - sasami_miaobian:{ - derivation:['sasami_gongqing','sasami_funan','sasami_baoqiu'], - init2:function(player){ - if(player.hp<=3) player.addSkill('sasami_gongqing'); - if(player.hp<=2) player.addSkill('sasami_funan'); - if(player.hp<=1) player.addSkill('sasami_baoqiu'); - }, - trigger:{player:'changeHp'}, - firstDo:true, - silent:true, - content:function(){ - lib.skill.sasami_miaobian.init2(player); - }, - }, - sasami_baoqiu:{ - line:{color:[173,149,206]}, - inherit:'rin_baoqiu' - }, - "sasami_gongqing":{ - audio:true, - trigger:{ - player:["damageBegin3","damageBegin4"], - }, - forced:true, - filter:function (event,player,name){ - if(!event.source) return false; - var range=event.source.getAttackRange(); - if(name=='damageBegin3') return range>3; - return event.num>1&&range<3; - }, - content:function (){ - trigger.num=event.triggername=='damageBegin4'?1:trigger.num+1; - }, - ai:{ - filterDamage:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.player){ - if(arg.player.hasSkillTag('jueqing',false,player)) return false; - if(arg.player.getAttackRange()<3) return true; - } - return false; - } - }, - }, - sasami_funan:{ - audio:2, - trigger:{global:['respond','useCard']}, - line:{color:[173,149,206]}, - filter:function(event,player){ - if(!event.respondTo) return false; - if(event.player==player) return false; - if(player!=event.respondTo[0]) return false; - if(!player.hasSkill('sasami_funan_jiexun')){ - var cards=[] - if(get.itemtype(event.respondTo[1])=='card') cards.push(event.respondTo[1]); - else if(event.respondTo[1].cards) cards.addArray(event.respondTo[1].cards); - return cards.filterInD('od').length>0; - } - else return event.cards.filterInD('od').length>0; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return true; - if(player.hasSkill('sasami_funan_jiexun')) return true; - if(event.cards.length>1) return true; - return get.value(event.cards[0])>get.value(event.respondTo[1]); - }, - content:function(){ - 'step 0' - if(!player.hasSkill('sasami_funan_jiexun')){ - var cards=[] - if(get.itemtype(trigger.respondTo[1])=='card') cards.push(trigger.respondTo[1]); - else if(trigger.respondTo[1].cards) cards.addArray(trigger.respondTo[1].cards); - cards=cards.filterInD('od'); - trigger.player.gain(cards,'gain2','log'); - trigger.player.addTempSkill('sasami_funan_use'); - if(!trigger.player.storage.sasami_funan_use){ - trigger.player.storage.sasami_funan_use=[]; - } - trigger.player.storage.sasami_funan_use.addArray(cards); - } - 'step 1' - var cards=trigger.cards.filterInD('od'); - player.gain(cards,'log','gain2'); - }, - subSkill:{ - jiexun:{ - charlotte:true, - mark:true, - intro:{ - content:'你发动“复难”时,无须令其他角色获得你使用的牌' - }, - }, - use:{ - onremove:true, - mod:{ - cardEnabled2:function(card,player){ - if(player.storage.sasami_funan_use&&player.storage.sasami_funan_use.contains(card)){ - return false; - } - } - } - } - } - }, - rin_baoqiu:{ - mod:{ - attackFrom:function(rin,riki,ball){ - return ball-2; - }, - }, - trigger:{player:'useCardToPlayered'}, - forced:true, - logTarget:'target', - filter:function(event,player){ - return event.card.name=='sha'; - }, - line:{color:[194,117,92]}, - content:function(){ - 'step 0' - player.judge(function(){return 0}); - 'step 1' - var target=trigger.target; - var map=trigger.customArgs; - var id=target.playerid; - if(!map[id]) map[id]={}; - if(result.color=='red'){ - if(!map[id].extraDamage) map[id].extraDamage=0; - map[id].extraDamage++; - } - if(result.color=='black'){ - trigger.directHit.add(target); - } - if(result.suit=='spade'||result.suit=='heart'){ - var evt=event.getParent(); - if(evt.addCount!==false){ - evt.addCount=false; - player.getStat().card.sha--; - } - player.draw(); - } - if(result.suit=='diamond'||result.suit=='club'){ - target.addTempSkill('fengyin'); - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); - } - }, - }, - sunohara_chengshuang:{ - trigger:{ - global:'gameDrawAfter', - player:'enterGame', - }, - group:'sunohara_chengshuang_phase', - forced:true, - content:function(){ - 'step 0' - var evt=event.getParent('phase'); - if(evt&&evt.player==player) evt.sunohara_chengshuang=true; - player.chooseControl('male','female').set('prompt','成双:请选择自己的性别'); - 'step 1' - var sex=result.control; - game.broadcastAll(function(player,sex){ - player.sex=sex; - if(player.marks&&player.marks.sunohara_chengshuang) player.marks.sunohara_chengshuang.firstChild.innerHTML=sex=='male'?'♂':'♀'; - },player,sex); - game.log(player,'将性别变更为','#g'+get.translation(sex)); - }, - mark:true, - intro:{ - content:function(storage,player){ - if(player.sex=='unknown') return '当前性别未确定'; - return '当前性别:'+get.translation(player.sex); - }, - }, - }, - sunohara_chengshuang_phase:{ - trigger:{ - player:'phaseBegin', - }, - filter:function(event,player){ - if(event.sunohara_chengshuang) return false; - return game.phaseNumber>1; - }, - prompt2:function(event,player){ - if(player.sex=='unknown') return '选择自己的性别'; - return '将自己的性别变更为'+(player.sex=='male'?'女性':'男性'); - }, - content:function(){ - 'step 0' - if(player.sex=='unknown') player.chooseControl('male','female').set('prompt','成双:请选择自己的性别'); - else event._result={control:player.sex=='male'?'female':'male'}; - 'step 1' - var sex=result.control; - game.broadcastAll(function(player,sex){ - player.sex=sex; - if(player.marks&&player.marks.sunohara_chengshuang) player.marks.sunohara_chengshuang.firstChild.innerHTML=sex=='male'?'♂':'♀'; - },player,sex); - game.log(player,'将性别变更为','#g'+get.translation(sex)); - }, - }, - sunohara_tiaoyin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countGainableCards(player,'hej')>0; - }, - selectCard:[1,4], - filterCard:function(card){ - for(var i=0;i0) player.gainPlayerCard(target,'hej','visible'); - }, - contentAfter:function(){ - var bool=false; - for(var i=0;i0)?1:-2; - }, - } - }, - }, - sunohara_jianren:{ - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - 'step 0' - event.num=(!trigger.source||trigger.source.isDead()||trigger.source.sex!=player.sex)?3:1; - player.chooseTarget(get.prompt('sunohara_jianren'),'令一名角色摸'+get.cnNumber(event.num)+'张牌。').set('ai',function(target){ - var att=get.attitude(player,target); - if(att<=0) return 0; - if(target.hasSkillTag('nogain')&&target!=_status.currentPhase) return 0.1; - return att/(1+0.1*target.countCards('h')); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('sunohara_jianren',target,{color:[145,149,179]}); - target.draw(event.num); - } - }, - }, - shiina_qingshen:{ - trigger:{ - player:'damageEnd', - source:'damageSource', - }, - filter:function(event,player){ - return event.cards&&event.cards.filterInD().length>0; - }, - frequent:true, - content:function(){ - 'step 0' - var cards=trigger.cards.filterInD('od'); - player.gain(cards,'gain2','log'); - event.count=cards.length; - 'step 1' - var cards=player.getCards('he'); - if(cards.length==0){ - event.finish(); - return; - } - else if(cards.length<=event.count){ - event._result={bool:true,cards:cards}; - } - else player.chooseCard(true,'he',event.count,'请选择要置于武将牌上的牌'); - 'step 2' - if(result.bool&&result.cards.length){ - var cards=result.cards; - player.lose(cards,ui.special,'toStorage'); - player.markAuto('shiina_qingshen',cards); - game.log(player,'将',cards,'置于武将牌上'); - } - }, - intro:{ - content:'cards', - onunmark:'throw', - }, - mod:{ - attackFrom:function(from,to,num){ - return num-from.getStorage('shiina_qingshen').length; - }, - maxHandcard:function(from,num){ - return num+from.getStorage('shiina_qingshen').length; - }, - }, - }, - shiina_feiyan:{ - animalList:['key_inari','key_doruji'], - trigger:{global:'phaseBegin'}, - direct:true, - filter:function(event,player){ - if(lib.skill.shiina_feiyan.animalList.contains(event.player.name)) return false; - return player.getStorage('shiina_qingshen').length>0&&player.inRange(event.player); - }, - content:function(){ - 'step 0' - player.chooseButton([get.prompt('shiina_feiyan',trigger.player),player.getStorage('shiina_qingshen')]).set('goon',get.attitude(player,trigger.player)<0?1:-1).set('ai',function(){return _status.event.goon}); - 'step 1' - if(result.bool){ - var cards=result.links; - player.unmarkAuto('shiina_qingshen',cards); - game.cardsDiscard(cards); - player.$throw(cards); - event.card={name:'sha',isCard:true}; - if(lib.filter.targetEnabled(event.card,player,trigger.player)){ - event.card=player.useCard(event.card,trigger.player,'shiina_feiyan').card; - } - else player.logSkill('shiina_feiyan',trigger.player); - } - else event.finish(); - 'step 2' - if(!player.getHistory('sourceDamage',function(evt){ - return event.card==evt.card; - }).length) player.draw(); - }, - group:'shiina_retieji', - }, - shiina_retieji:{ - shaRelated:true, - trigger:{player:'useCardToPlayered'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - filter:function(event,player){ - return event.card.name=='sha'&&event.getParent().skill=='shiina_feiyan'; - }, - logTarget:'target', - content:function(){ - "step 0" - player.judge(function(){return 0}); - if(!trigger.target.hasSkill('fengyin')){ - trigger.target.addTempSkill('fengyin'); - } - "step 1" - var suit=get.suit(result.card); - 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); - } - } - }, - inari_baiwei:{ - enable:'chooseToUse', - filter:function(event,player){ - if(event.type=='wuxie'||!player.countCards('he',{suit:'diamond'})) return false; - for(var i=0;i0) return get.order(fakecard); - return 0; - } - return 1; - }, - backup:function(links,player){ - return { - selectCard:1, - filterCard:{suit:'diamond'}, - popname:true, - check:function(card){ - if(get.type(card)=='basic') return 6; - return 1/Math.max(0.1,get.value(card)); - }, - position:'he', - viewAs:{name:links[0][2],nature:links[0][3]}, - } - }, - prompt:function(links,player){ - return '将一张♦牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:function(item,player){ - if(player&&_status.event.type=='phase'){ - var max=0 - for(var i=0;i0){ - var temp=get.order({name:name}); - if(temp>max) max=temp; - } - } - if(max>0) max+=0.5; - return max; - } - return 4; - }, - result:{ - player:1, - }, - save:true, - skillTagFilter:function(player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - }, - group:['inari_baiwei_sha','inari_baiwei_shan','inari_baiwei_draw'], - }, - inari_baiwei_shan:{ - prompt:'将一张♦牌当做闪打出', - enable:'chooseToRespond', - viewAs:{name:'shan'}, - selectCard:1, - filterCard:{suit:'diamond'}, - popname:true, - check:function(card){ - return 1/Math.max(0.1,get.value(card)); - }, - position:'he', - ai:{ - order:1, - result:{player:1}, - respondShan:true, - skillTagFilter:function(player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - }, - }, - inari_baiwei_sha:{ - prompt:'将一张♦牌当做杀打出', - enable:'chooseToRespond', - viewAs:{name:'sha'}, - selectCard:1, - filterCard:{suit:'diamond'}, - popname:true, - check:function(card){ - return 1/Math.max(0.1,get.value(card)); - }, - position:'he', - ai:{ - order:1, - result:{player:1}, - respondSha:true, - skillTagFilter:function(player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - }, - }, - inari_baiwei_draw:{ - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill&&event.skill.indexOf('inari_baiwei')==0; - }, - content:function(){player.draw()}, - }, - inari_huhun:{ - mod:{ - suit:function(card,suit){ - if(suit=='club') return 'diamond'; - }, - maxHandcard:function(player,num){ - return num+1; - }, - } - }, - saya_powei:{ - audio:2, - trigger:{player:'phaseAfter'}, - direct:true, - locked:true, - limited:true, - unique:true, - skillAnimation:true, - animationColor:'metal', - filter:function(event,player){ - return event.type!='saya_powei'&&game.hasPlayer(function(current){ - return current.hp>player.hp; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('saya_powei'),function(card,saya,kyousuke){ - return kyousuke.hp>saya.hp; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att>=-2) return 0; - if(target!=get.zhu(target)&&player.hasUnknown()) return 0; - if(target.getEquip(3)&&!player.getEquip(4)) att/=2; - if(player.hp<=1) att*=1.5; - return -att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('saya_powei',target); - player.awakenSkill('saya_powei'); - game.delay(3); - var next=game.createEvent('saya_powei_loop',false,trigger); - next.playertrue=player; - next.playerfalse=target; - next.setContent(lib.skill.saya_powei.content2); - } - }, - content2:function(){ - 'step 0' - event.count=0; - event.stat=true; - event.current=event['player'+event.stat]; - game.countPlayer2(function(current){ - if(current!=event.playertrue&¤t!=event.playerfalse) current.addSkill('saya_nodis'); - }); - event.playertrue.addSkill('saya_judge'); - 'step 1' - event.count++; - event.current.phase().set('type','saya_powei'); - 'step 2' - if(event.count==9||event.playertrue.isDead()||event.playerfalse.isDead()){ - game.countPlayer2(function(current){ - current.removeSkill('saya_nodis'); - current.removeSkill('saya_judge'); - }); - } - else{ - event.stat=!event.stat; - event.current=event['player'+event.stat]; - event.goto(1); - } - } - }, - saya_nodis:{ - group:'undist', - mark:true, - intro:{content:'不计入距离和座次的计算'}, - }, - saya_judge:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.type=='saya_powei'&&player==event.getParent().playertrue; - }, - content:function(){ - 'step 0' - player.judge(function(card){ - return get.color(card)=='red'?5:0; - }); - 'step 1' - if(result.bool){ - player.line(trigger.getParent().playerfalse); - trigger.getParent().playerfalse.damage(); - } - }, - }, - saya_shouji:{ - audio:2, - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - return !player.getStat('skill').saya_shouji&&event.cards.filterInD().length>0; - }, - direct:true, - content:function(){ - 'step 0' - var goon=function(){ - var num=0; - var cards=trigger.cards.filterInD(); - for(var i=0;inum; - })==0; - }(); - player.chooseTarget(get.prompt2('saya_shouji'),lib.filter.notMe).set('ai',function(target){ - if(!_status.event.goon) return 0; - var player=_status.event.player; - var cards=_status.event.getTrigger().cards.filterInD(); - var att=get.attitude(player,target); - var num=0; - for(var i=0;i0) return 0; - if(button.link[2]=='wugu') return 0; - var effect=player.getUseValue(button.link[2]); - if(effect>0) return effect; - return 0; - }, - backup:function(links,player){ - return { - filterCard:true, - audio:'haruka_shuangche', - selectCard:-1, - filterCard:function(){return false}, - popname:true, - check:function(card){ - return 6-get.value(card); - }, - position:'he', - viewAs:{name:links[0][2],nature:links[0][3],isCard:true}, - } - }, - prompt:function(links,player){ - return '请选择'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'的目标'; - } - }, - ai:{ - order:4, - result:{ - player:function(player){ - var cards=player.getCards('he').sort(function(a,b){ - return get.value(a)-get.value(b); - }); - var num=(player.getStat('skill').haruka_shuangche||0); - if(cards.length>num){ - var val=0; - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseCard('he',[1,player.countCards('he')],get.prompt2('tsumugi_huilang')).set('ai',function(card){ - if(get.position(card)!='h') return -1; - if(!['shan','wuxie','caochuan'].contains(get.name(card))) return 9; - return 5-get.value(card); - }); - 'step 1' - if(result.bool){ - var cards=result.cards; - player.logSkill('tsumugi_huilang'); - player.addSkill('tsumugi_huilang2'); - player.markAuto('tsumugi_huilang2',cards); - player.lose(cards,ui.special); - } - }, - }, - tsumugi_huilang2:{ - charlotte:true, - marktext:'隐', - intro:{content:'cardCount',onunmark:'throw'}, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.getStorage('tsumugi_huilang2').length>0; - }, - content:function(){ - 'step 0' - var cards=player.getStorage('tsumugi_huilang2'); - event.num=cards.length; - player.gain(cards,'draw'); - game.log(player,'获得了'+get.cnNumber(cards.length)+'张牌'); - player.unmarkAuto('tsumugi_huilang2',cards); - 'step 1' - player.chooseTarget([1,num],'是否令至多'+get.cnNumber(num)+'名角色各摸一张牌?').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 2' - if(result.bool){ - var targets=result.targets; - player.line(targets,lib.skill.tsumugi_huilang.line); - targets.sortBySeat(); - game.asyncDraw(targets); - } - else event.finish(); - 'step 3' - game.delay(); - }, - }, - yui_jiang:{ - shaRelated:true, - audio:2, - audioname:['sp_lvmeng','re_sunben','re_sunce'], - trigger:{ - player:'useCardToPlayered', - target:'useCardToTargeted', - }, - filter:function(event,player){ - if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false; - return player==event.target||event.getParent().triggeredTargets3.length==1; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(card.name=='sha'&&get.color(card)=='red') return [1,0.6]; - }, - player:function(card,player,target){ - if(card.name=='sha'&&get.color(card)=='red') return [1,1]; - } - } - } - }, - yui_lieyin:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - locked:true, - content:function(){ - 'step 0' - var list=[]; - if(player._ichiban_no_takaramono) list.push('cancel2'); - player.chooseControl.apply(player,list).set('choiceList',[ - '令此阶段内的所有红色牌视为【杀】', - '令此阶段内的所有【杀】视为【决斗】' - ]).set('prompt',player._ichiban_no_takaramono?get.prompt('yui_lieyin'):'烈音:请选择一项').set('ai',function(){ - var player=_status.event.player; - var shas=player.countCards('h','sha') - if(shas>0){ - if(game.hasPlayer(function(current){ - return get.attitude(player,current)<0&&player.canUse('juedou',current)&&!current.hasSha()&&get.effect(current,{name:'juedou'},player,player)>0; - })) return 1; - if(player._ichiban_no_takaramono) return 'cancel2'; - } - if(player.countCards('h',function(card){ - return get.color(card)=='red'&&card.name!='sha'&&player.hasValueTarget(card); - })==0) return 0; - if(player._ichiban_no_takaramono) return 'cancel2'; - return 1; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('yui_lieyin'); - player.addTempSkill('yui_lieyin'+result.index,'phaseUseEnd') - } - }, - }, - yui_lieyin0:{ - mod:{ - cardname:function(card){ - if(get.color(card)=='red') return 'sha'; - }, - }, - }, - yui_lieyin1:{ - mod:{ - cardname:function(card){ - if(card.name=='sha') return 'juedou'; - }, - }, - }, - yui_takaramono:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - unique:true, - juexingji:true, - skillAnimation:true, - animationColor:'key', - filter:function(event,player){ - var num=0; - if(player.hp<=1) num++; - if(game.dead.length>0) num++; - if(num!=1) return num>1; - var draw=0; - player.getAllHistory('gain',function(evt){ - if(evt.getParent(2).name=='yui_jiang') draw+=evt.cards.length; - }); - return draw>=3; - }, - content:function(){ - player.awakenSkill('yui_takaramono'); - player.addSkill('yui_yinhang'); - player._ichiban_no_takaramono=true; - player.gainMaxHp(); - player.recover(); - }, - derivation:'yui_yinhang', - }, - yui_yinhang:{ - trigger:{player:'changeHp'}, - locked:true, - direct:true, - line:{color:[253, 153, 182]}, - content:function(){ - 'step 0' - event.count=Math.abs(trigger.num); - 'step 1' - event.count--; - player.chooseTarget([1,2],get.prompt('yui_yinhang'),'令至多两名角色各摸一张牌').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 2' - if(result.bool){ - var targets=result.targets; - targets.sortBySeat(); - player.logSkill('yui_yinhang',targets,lib.skill.yui_yinhang.line); - game.asyncDraw(targets); - } - else event.finish(); - 'step 3' - game.delay(); - if(event.count>0) event.goto(1); - }, - }, - yoshino_jueyi:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(lib.filter.notMe,get.prompt2('yoshino_jueyi')).set('ai',function(target){ - var player=_status.event.player; - if(get.damageEffect(target,player,player)<0) return 0; - var att=get.attitude(player,target); - if(att>0) return 0; - if(att==0) return 0.1; - var eff=0; - var hs=player.getCards('h'); - for(var i=0;i0) eff+=eff2; - } - } - return -att/(1+eff); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('yoshino_jueyi',target); - player.draw(); - } - else event.finish(); - 'step 2' - player.chooseToPSS(target); - 'step 3' - if(result.tie) event.goto(2); - else if(result.bool) target.damage(); - else target.addTempSkill('yoshino_fail','phaseUseEnd'); - }, - }, - yoshino_fail:{ - mod:{ - targetEnabled:function(card,player,target){ - if(player==_status.currentPhase) return false; - }, - }, - }, - kengo_weishang:{ - locked:false, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'&&player.isDisabled(1)) return num+1; - }, - globalFrom:function(from,to,distance){ - if(from.isDisabled(4)) return distance-1; - }, - globalTo:function(from,to,distance){ - if(to.isDisabled(3)) return distance+1; - }, - }, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var list=['equip1','equip2','equip3','equip4','equip5']; - for(var i=0;i0 - })) return 'equip1'; - if(list.contains('equip3')&&player.isEmpty('equip3')) return 'equip3'; - if(list.contains('equip4')&&player.isEmpty('equip4')) return 'equip4'; - if(list.contains('equip5')&&player.isEmpty('equip5')) return 'equip5'; - if(list.contains('equip2')&&player.isEmpty('equip2')) return 'equip2'; - return list.randomGet(); - }; - 'step 1' - player.disableEquip(result.control); - player.draw(2); - }, - group:['kengo_weishang_sha','kengo_weishang_shan'], - ai:{ - order:10, - result:{player:1}, - }, - }, - kengo_weishang_sha:{ - trigger:{player:'useCardToPlayered'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&player.isDisabled(1)&&event.target.countCards('he')>0; - }, - logTarget:'target', - content:function(){ - trigger.target.chooseToDiscard('he',true); - }, - }, - kengo_weishang_shan:{ - enable:['chooseToUse','chooseToRespond'], - viewAs:{name:'shan'}, - filterCard:true, - position:'he', - prompt:'将一张牌当做闪使用或打出', - viewAsFilter:function(player){ - return player.isDisabled(2)&&player.countCards('he')>0; - }, - check:function(card){ - return 1/Math.max(0.1,get.value(card)); - }, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - return player.isDisabled(2)&&player.countCards('he')>0; - }, - }, - }, - kengo_guidui:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.countDisabled()>0; - }, - content:function(){ - var list=['equip1','equip2','equip3','equip4','equip5']; - for(var i=0;i0) event.goto(1); - }, - }, - iwasawa_mysong:{ - trigger:{player:['phaseBeginStart','phaseAfter','dyingBefore']}, - forced:true, - filter:function(event,player){ - return event.name=='dying'||player.hp<1; - }, - content:function(){ - if(trigger.name=='dying') trigger.cancel(); - else if(event.triggername=='phaseBeginStart') player.addTempSkill('iwasawa_refenyin'); - else player.die(); - }, - nobracket:true, - derivation:'iwasawa_refenyin', - }, - iwasawa_refenyin:{ - trigger:{global:['loseAfter','cardsDiscardAfter']}, - forced:true, - filter:function(event,player){ - if(player!=_status.currentPhase) return false; - if(event.name=='lose'&&event.position!=ui.discardPile) return false; - var list=[]; - for(var i=0;i0; - }, - content:function(){ - var list=[]; - var list2=[]; - for(var i=0;i=0?0:1).set('ai',function(){return _status.event.choice}); - 'step 1' - if(result.control=='增加伤害'){ - player.loseMaxHp(); - trigger.num+=2; - } - else trigger.cancel(); - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(get.attitude(player,target)>0&&get.tag(card,'damage')) return 'zeroplayertarget'; - }, - }, - }, - }, - yusa_yanyi:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return get.distance(player,target)<=player.hp; - }, - selectTarget:function(){ - return [1,Math.max(_status.event.player.getAttackRange())]; - }, - line:'thunder', - content:function(){ - 'step 0' - if(target.isHealthy()){ - player.draw(); - event.finish(); - } - else{ - var name=get.translation(player); - target.chooseControl().set('choiceList',[ - '令'+name+'摸一张牌', - '回复1点体力,然后交给'+name+'一张牌', - ]).set('ai',function(){ - return 1; - }); - } - 'step 1' - if(result.index==0){ - player.draw(); - event.finish(); - } - else{ - target.recover(); - } - 'step 2' - if(target!=player&&target.countCards('he')>0){ - target.chooseCard('交给'+get.translation(player)+'一张牌','he',true); - } - else event.finish(); - 'step 3' - target.give(result.cards,player,'giveAuto'); - }, - ai:{ - order:10, - result:{ - player:function(player,target){ - return target.isHealthy()?1:0; - }, - target:function(player,target){ - if(target.isHealthy()) return 0; - return get.recoverEffect(target,player,target); - }, - }, - }, - }, - yusa_misa:{ - charlotte:true, - trigger:{player:'useSkillAfter'}, - filter:function(event,player){ - return event.skill=='yusa_yanyi'&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); - }, - content:function(){ - player.turnOver(); - }, - }, - misa_yusa:{ - charlotte:true, - trigger:{player:'misa_yehuoAfter'}, - filter:function(event,player){ - return event.bool===true&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); - }, - content:function(){ - player.turnOver(); - }, - }, - misa_yehuo:{ - charlotte:true, - trigger:{global:'phaseDrawBegin1'}, - direct:true, - locked:true, - line:{color:[236,137,52]}, - filter:function(event,player){ - var target=event.player; - return player.inRange(target)&&player.countCards('he')>=get.distance(player,target); - }, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he',get.distance(player,trigger.player)||1,get.prompt2('misa_yehuo',trigger.player)); - next.set('logSkill',['misa_yehuo',trigger.player,'fire']); - next.set('ai',function(card){ - var val=_status.event.val; - for(var i=0;i0; - }, - content:function(){ - "step 0" - event.forceDie=true; - var ask=trigger.player.chooseCard('he',get.prompt('yukine_wenzhou')); - if(player==trigger.player){ - ask.set('prompt2','选择一张牌,然后从牌堆中获得一张与此牌类型相同的牌。本回合内使用与此牌类型相同的牌时不可被其他角色响应。'); - } - else ask.set('prompt2','将一张牌交给'+get.translation(player)+'然后其可以选择:交给你一张牌;或令你从牌堆中获得一张与此牌类型相同的牌,且你本回合内使用与此牌类型相同的牌时不可被响应。'); - ask.set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0) return 10-get.value(card); - return -1; - }); - "step 1" - if(result.bool){ - player.logSkill('yukine_wenzhou',trigger.player); - event.type=get.type(result.cards[0],'trick'); - if(trigger.player!=player) trigger.player.give(result.cards,player,'giveAuto'); - } - else event.finish(); - "step 2" - if(player==trigger.player||player.countCards('he')==0){ - event._result={index:1}; - } - else{ - player.chooseControl().set('choiceList',[ - '将一张牌交给'+get.translation(trigger.player), - '令'+get.translation(trigger.player)+'从牌堆中获得一张'+get.translation(event.type)+'牌,且其本回合内使用与此牌名称相同的牌时不可被响应', - ]).set('forceDie',true).set('ai',function(){ - if(get.attitude(_status.event.player,_status.event.getTrigger().player)>0) return 1; - return 0; - }); - } - "step 3" - event.index=result.index; - if(result.index==1){ - var magic=get.cardPile2(function(card){ - return get.type(card,'trick')==event.type; - }); - if(magic){ - trigger.player.addTempSkill('yukine_magic','phaseUseEnd'); - trigger.player.storage.yukine_magic.add(magic.name); - trigger.player.gain(magic,'draw'); - } - else event.finish(); - } - else player.chooseCard('he',true,'选择要交给'+get.translation(trigger.player)+'的牌').set('ai',function(card){ - return -get.value(card,_status.event.getTrigger().player); - }); - "step 4" - if(event.index==1) game.updateRoundNumber(); - else if(result.bool) player.give(result.cards,trigger.player,'giveAuto'); - }, - }, - yukine_magic:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return player.storage.yukine_magic&&player.storage.yukine_magic.contains(event.card.name); - }, - content:function(){ - trigger.directHit.addArray(game.filterPlayer(function(current){ - if(player!=current) return true; - return !player.hasSkill('yukine_wenzhou'); - })); - }, - onremove:true, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - }, - komari_tiankou:{ - trigger:{ - player:'useCard2', - target:'useCardToTarget', - }, - forced:true, - filter:function(event,player,name){ - if(name=='useCardToTarget'&&player==event.player) return false; - if(get.color(event.card)!='red') return false; - if(get.tag(event.card,'damage')) return false; - return ['basic','trick'].contains(get.type(event.card)); - }, - content:function(){ - 'step 0' - var info=get.info(trigger.card); - var bool=true; - if(info.multitarget||info.allowMultiple===false) bool=false; - else{ - var list=game.filterPlayer(function(current){ - return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); - }) - if(!list.length) bool=false; - } - if(bool) player.chooseTarget('甜口:为'+get.translation(trigger.card)+'增加一个额外目标,或点【取消】摸一张牌。',function(candy,komari,rin){ - return _status.event.rin_chan.contains(rin); - }).set('rin_chan',list).set('ai',function(target){ - var evt=_status.event; - return get.effect(target,evt.candy,evt.source,evt.player); - }).set('candy',trigger.card).set('',trigger.player); - else event._result={bool:false}; - 'step 1' - if(result.bool){ - var rin=result.targets[0]; - trigger.targets.push(rin); - player.line(rin,{color:[255, 224,172]}); - } - else player.draw(); - }, - }, - komari_xueshang:{ - trigger:{global:'die'}, - forced:true, - skillAnimation:true, - filter:function(event,player){ - return player.hp>0; - }, - animationColor:'metal', - content:function(){ - 'step 0' - player.addSkill('riki_xueshang'); - var map={}; - var list=[]; - for(var i=1;i<=player.hp;i++){ - var cn=get.cnNumber(i,true); - map[cn]=i; - list.push(cn); - } - event.map=map; - player.chooseControl(list,function(){ - return '一'; - }).set('prompt','血殇:请选择自己受到的伤害的点数'); - 'step 1' - var num=event.map[result.control]||1; - event.num=num>1?2:1; - event.list=game.filterPlayer(function(current){ - return current!=player; - }).sortBySeat(); - player.damage(num); - player.line(event.list,{color:[255, 224,172]}); - 'step 2' - if(!player.hasSkill(event.name)) return; - else{ - event.list.shift().damage(num); - if(event.list.length) event.redo(); - } - }, - }, - riki_xueshang:{ - trigger:{global:'dying'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return event.getParent(2).name=='komari_xueshang'&&event.getParent(2).player==player; - }, - content:function(){ - player.removeSkill('komari_xueshang'); - player.gainMaxHp(true); - player.recover(); - }, - }, - umi_chaofan:{ - enable:'phaseUse', - usable:1, - selectCard:2, - complexCard:true, - filter:function(summer,umi){ - return umi.countCards('h')>1; - }, - check:function(ingredient){ - return 7-get.value(ingredient); - }, - filterCard:function(ingredient){ - if(ui.selected.cards.length) return get.suit(ingredient)!=get.suit(ui.selected.cards[0]); - return true; - }, - line:{color:[251, 193, 217]}, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(player.hp>2) target.recover(); - else if(player.hp==2) target.draw(2); - else target.damage('fire','nosource'); - }, - ai:{ - order:2, - result:{ - target:function(umi,takahara){ - if(umi.hp>2&&takahara.isDamaged()) return 2.2; - if(umi.hp==2&&!takahara.hasSkillTag('nogain')) return 2; - if(umi.hp<2) return get.damageEffect(takahara,umi,umi,'fire'); - }, - }, - }, - }, - umi_lunhui:{ - trigger:{global:'phaseAfter'}, - filter:function(summer,umi){ - return summer.player!=umi&&umi.countCards('h')0; - }, - check:function(event,player){ - return get.attitude(player,event.player)>1; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.gain(trigger.player.getCards('j'),trigger.player,'give'); - 'step 1' - if(player.hp>1) player.loseHp(); - }, - }, - yuri_xingdong:{ - audio:2, - group:'yuri_xingdong_gain', - subSkill:{ - mark:{ - mark:true, - marktext:'令', - intro:{ - content:'跳过下个回合的判定阶段和摸牌阶段', - }, - }, - gain:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - content:function(){ - 'step 0' - var card=get.cardPile(function(card){ - return card.name=='sha'||get.type(card)=='trick'; - }); - if(card) player.gain(card,'gain2','log'); - 'step 1' - game.updateRoundNumber(); - }, - }, - }, - enable:'phaseUse', - usable:1, - locked:true, - filter:function(event,player){ - return player.countCards('h',lib.skill.yuri_xingdong.filterCard); - }, - filterCard:function(card){ - return card.name=='sha'||get.type(card)=='trick'; - }, - check:function(card){return 1}, - filterTarget:lib.filter.notMe, - discard:false, - lose:false, - delay:0, - content:function(){ - 'step 0' - target.gain(cards,player,'give'); - 'step 1' - target.chooseUseTarget(cards[0],game.filterPlayer(function(current){ - return current!=player; - }),'请使用得到的牌,或者跳过下回合的判定阶段和摸牌阶段'); - 'step 2' - if(result.bool) game.asyncDraw([player,target]); - else{ - target.addTempSkill('yuri_xingdong_mark','phaseJudgeSkipped'); - target.skip('phaseJudge'); - target.skip('phaseDraw'); - target.addTempSkill('zhengjing3',{player:'phaseAfter'}); - event.finish(); - } - 'step 3' - game.delay(); - }, - ai:{ - order:12, - result:{ - target:function(player,target){ - var card=ui.selected.cards[0]; - if(target.hasSkill('pingkou')) return 1; - if(!card) return 0; - var info=get.info(card); - if(info.selectTarget==-1){ - var eff=0; - game.countPlayer(function(current){ - if(current!=player&&target.canUse(card,current)) eff+=get.effect(current,card,target,target); - }); - if(eff>0||get.value(card)<3) return eff; - return 0; - } - else if(game.hasPlayer(function(current){ - return current!=player&&target.canUse(card,current)&&get.effect(current,card,target,target)>0 - })) return 1.5; - else if(get.value(card)<3) return -1; - return 0; - }, - }, - }, - }, - yuri_wangxi:{ - trigger:{global:'dieAfter'}, - direct:true, - limited:true, - mark:false, - init:function(player){ - if(player.hasZhuSkill('yuri_wangxi')){ - player.markSkill('yuri_wangxi'); - player.storage.yuri_wangxi=false; - } - }, - zhuSkill:true, - unique:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - if(get.mode()!='identity') return false; - if(!player.hasZhuSkill('yuri_wangxi')) return false; - if(event.player.isAlive()) return false; - if(event.player.identity=='mingzhong') return false; - var evt=event.getParent('yuri_xingdong'); - return evt&&evt.name=='yuri_xingdong'&&evt.player==player; - }, - content:function(){ - 'step 0' - trigger.player.chooseBool('是否发动'+get.translation(player)+'的【忘隙】?').forceDie=true; - 'step 1' - if(result.bool){ - player.logSkill('yuri_wangxi',trigger.player); - player.awakenSkill('yuri_wangxi'); - var identity='zhong'; - if(_status.mode=='purple'){ - if(['rNei','bNei'].contains(player.identity)) identity=player.identity; - else if(['rZhu','rZhong','bNei'].contains(player.identity)) identity='rZhong'; - else identity='bZhong'; - } - game.broadcastAll(function(source,identity){ - if(source.node.dieidentity){ - source.node.dieidentity.innerHTML=get.translation(identity+2); - } - source.revive(2,false); - source.identity=identity; - source.setIdentity(); - },trigger.player,identity); - trigger.player.changeGroup(player.group); - trigger.player.draw(); - var evt=trigger.getParent('damage'); - if(evt.untrigger) evt.untrigger(false,trigger.player); - game.addVideo('setIdentity',trigger.player,'zhong'); - } - }, - }, - nk_shekong:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - selectCard:function(){ - if(ui.selected.targets.length) return [1,ui.selected.targets[0].countCards('he')]; - return [1,Infinity]; - }, - filterTarget:function(event,player,target){ - return target!=player&&target.countCards('he')>=Math.max(1,ui.selected.cards.length); - }, - check:function(card){ - if(!game.hasPlayer(function(current){ - return current!=_status.event.player&&get.attitude(_status.event.player,current)<0&¤t.countCards('he')>ui.selected.cards.length; - })) return 0; - return 6-get.value(card); - }, - content:function(){ - 'step 0' - event.cardsx=cards.slice(0); - var num=get.cnNumber(cards.length); - var trans=get.translation(player); - var prompt=('弃置'+num+'张牌,然后'+trans+'摸一张牌'); - if(cards.length>1) prompt+=(';或弃置一张牌,然后'+trans+'摸'+num+'张牌'); - var next=target.chooseToDiscard(prompt,'he',true); - next.numx=cards.length; - next.selectCard=function(){ - if(ui.selected.cards.length>1) return _status.event.numx; - return [1,_status.event.numx]; - }; - next.complexCard=true; - next.ai=function(card){ - if(ui.selected.cards.length==0||(_status.event.player.countCards('he',function(cardxq){ - return get.value(cardxq)<7; - })>=_status.event.numx)) return 7-get.value(card); - return -1; - }; - 'step 1' - if(result.bool){ - if(result.cards.length==cards.length) player.draw(); - else player.draw(cards.length); - event.cardsx.addArray(result.cards); - for(var i=0;i0; - }, - content:function(){ - 'step 0' - var es=player.getCards('e'); - event.count=es.length; - player.discard(es); - 'step 1' - event.count--; - if(game.hasPlayer(function(current){ - return current.countDiscardableCards(player,'ej')>0; - })){ - player.chooseTarget('请选择一名角色,弃置其装备区或判定区内的一张牌。',true,function(card,player,target){ - return target.countDiscardableCards(player,'ej')>0; - }).ai=function(target){ - var att=get.attitude(_status.event.player,target); - if(target.countCards('j')&&att>0) return att*1.5; - return -att; - }; - } - else event.finish(); - 'step 2' - if(result.bool&&result.targets&&result.targets.length){ - var target=result.targets[0]; - player.line(target,{color:[220, 90, 139]}); - player.discardPlayerCard(target,'ej',true); - if(event.count) event.goto(1); - } - }, - }, - - nslongyue:{ - trigger:{global:'useCard'}, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'&&event.player.getHistory('useCard').indexOf(event)==0; - }, - logTarget:'player', - check:function(event,player){ - return get.attitude(player,event.player)>0; - }, - content:function(){ - trigger.player.draw(); - }, - ai:{ - expose:0.2, - }, - global:'nslongyue_ai', - }, - nslongyue_ai:{ - mod:{ - aiOrder:function(player,card,num){ - if(!player.getHistory('useCard').length&&get.type(card)=='trick'&&game.hasPlayer(function(current){ - return current.hasSkill('nslongyue')&&get.attitude(player,current)>=0; - })) return num+6; - }, - }, - }, - nszhenyin:{ - trigger:{global:'judge'}, - usable:1, - filter:function(event,player){ - return _status.currentPhase&&_status.currentPhase.countCards('h')>0; - }, - logTarget:function(){ - return _status.currentPhase; - }, - check:function(event,player){ - var target=_status.currentPhase; - var judge=event.judge(event.player.judging[0]); - var max=0; - var hs=target.getCards('h',function(card){ - var mod2=game.checkMod(card,target,'unchanged','cardEnabled2',target); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,target,'unchanged','cardRespondable',target); - if(mod!='unchanged') return mod; - return true; - }); - for(var i of hs){ - var num=event.judge(i)-judge; - if(num>max) max=num; - } - var att=get.attitude(player,target); - if(att>0) return max>0; - if(att<0) return max<=0; - return false; - }, - content:function(){ - "step 0" - if(!_status.currentPhase.countCards('h',function(card){ - var player=_status.currentPhase; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - })){ - event.finish(); - return; - }; - _status.currentPhase.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+',请打出一张手牌进行改判','h',true,function(card){ - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result/Math.max(0.1,get.value(card)); - } - else{ - return -result/Math.max(0.1,get.value(card)); - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - _status.currentPhase.respond(result.cards,'highlight').nopopup=true; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1, - } - } - }, - nsxianhai:{ - trigger:{global:'damageSource'}, - filter:function(event,player){ - return event.source&&event.source!=player&&event.source.isAlive()&&event.source==_status.currentPhase&& - (event.source.getStat('damage')||0)>(player.getLastStat('damage')||0)&& - !player.hasSkill('nsxianhai_round'); - }, - check:function(event,player){ - return player.maxHp>1&&get.attitude(player,event.source)<-4; - }, - logTarget:'source', - content:function(){ - 'step 0' - player.addTempSkill('nsxianhai_round','roundStart'); - player.loseMaxHp(); - var list=[]; - for(var i=1;i<6;i++){ - if(!trigger.source.isDisabled(i)) list.add('equip'+((i==3||i==4)?6:i)); - } - if(list.length){ - player.chooseControl(list).set('prompt','选择废除'+get.translation(trigger.source)+'的一种装备栏').set('ai',function(){ - var target=_status.event.getTrigger().source; - if(list.contains('equip6')&&target.getEquip('equip3')&&target.getEquip('equip4')) return 'equip6'; - if(list.contains('equip2')&&target.getEquip(2)&&get.value(target.getEquip(2),target)>0) return 'equip2'; - if(list.contains('equip5')&&target.getEquip(5)&&get.value(target.getEquip(5),target)>0) return 'equip5'; - return 0; - }); - } - else event.goto(2); - 'step 1' - if(result.control!='equip6') trigger.source.disableEquip(result.control); - else{ - trigger.source.disableEquip(3); - trigger.source.disableEquip(4); - } - 'step 2' - if(player.awakenedSkills.contains('nsxingchu')){ - var next=game.createEvent('nsxianhai_clear'); - event.next.remove(next); - event.getParent('phase').after.push(next); - next.player=player; - next.setContent(function(){ - player.restoreSkill('nsxingchu'); - }); - } - 'step 3' - if(trigger.source){ - var hs=trigger.source.getCards('h','shan'); - if(hs.length) trigger.source.discard(hs); - } - }, - }, - nsxianhai_round:{}, - nsxingchu:{ - trigger:{global:'die'}, - forceDie:true, - filter:function(event,player){ - return player==event.player||player==event.source; - }, - limited:true, - skillAnimation:true, - animationColor:'wood', - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('nsxingchu')).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('forceDie',true); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('nsxingchu',target); - player.awakenSkill('nsxingchu'); - var he=trigger.player.getCards('he'); - if(he.length) target.gain(he,trigger.player,'giveAuto'); - target.gainMaxHp(); - } - }, - }, - nsshengyan:{ - trigger:{player:'judgeEnd'}, - forced:true, - filter:function(event,player){ - return _status.currentPhase&&_status.currentPhase.isAlive()&&(!player.storage.nsshengyan2||!player.storage.nsshengyan2.contains(event.result.suit)); - }, - logTarget:function(){ - return _status.currentPhase; - }, - content:function(){ - player.addTempSkill('nsshengyan2'); - if(!player.storage.nsshengyan2) player.storage.nsshengyan2=[]; - _status.currentPhase.addTempSkill('nsshengyan3'); - player.storage.nsshengyan2.add(trigger.result.suit); - _status.currentPhase.addMark('nsshengyan3',2,false); - }, - }, - nsshengyan2:{onremove:true}, - nsshengyan3:{ - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('nsshengyan3'); - }, - }, - onremove:true, - intro:{ - content:'本回合手牌上限+#', - }, - marktext:'筵', - }, - nsdaizhan:{ - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return (!player.hasJudge('lebu')||!player.hasJudge('bingliang'))&&player.countCards('he',function(card){ - if(_status.connectMode) return true; - return get.type(card,'trick')!='trick'; - }); - }, - content:function(){ - var next=player.chooseToUse(); - next.set('norestore',true); - next.set('_backupevent','nsdaizhanx'); - next.backup('nsdaizhanx'); - }, - }, - nsdaizhanx:{ - chooseButton:{ - dialog:function(){ - var list=['lebu','bingliang']; - var list2=[]; - for(var i of list){ - list2.push(['延时锦囊','',i]); - } - return ui.create.dialog(get.prompt('nsdaizhan'),[list2,'vcard'],'hidden'); - }, - filter:function(button,player){ - return !player.hasJudge(button.link[2]) - }, - check:function(button){ - if(button.link[2]=='lebu') return 0; - var player=_status.event.player; - var delta=player.getHandcardLimit()+player.countCards('j')*2+2-player.hp; - if(delta>=2) return 1+Math.random(); - if(delta>=0&&!player.countCards('h',function(card){ - return player.hasValueTarget(card); - })) return Math.random(); - return 0; - }, - backup:function(links,player){ - return { - filterCard:function(card,player){ - return get.itemtype(card)=='card'&&get.type(card,'trick')!='trick'&&player.canAddJudge({name:links[0][2],cards:[card]}); - }, - filterTarget:function(card,player,target){ - return player==target; - }, - check:function(card){ - return 8-get.value(card); - }, - viewAs:{name:links[0][2]}, - position:'he', - precontent:function(){ - player.addTempSkill('nsdaizhany'); - event.result.skill='nsdaizhan'; - }, - ai:{ - result:{ - target:1, - }, - }, - }; - }, - prompt:function(links){ - return '将一张牌当做'+get.translation(links[0][2])+'对自己使用'; - }, - }, - }, - nsdaizhany:{ - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.countCards('h')0; - }, - content:function(){ - 'step 0' - var target=(event.triggername=='damageSource'?trigger.source:trigger.player); - event.target=target; - player.choosePlayerCard(target,'hej',player.storage.nsfuwei?true:1).set('ai',function(button){ - var val=get.buttonValue(button); - if(get.attitude(_status.event.player,get.owner(button.link))>0) return -val; - return val; - }); - 'step 1' - if(result.bool){ - player.logSkill('nsjiquan',target); - target.lose(result.cards,ui.special,'toStorage'); - player.markAuto('nsjiquan_mark',result.cards); - target.$give(result.cards,player,false); - } - else event.finish(); - 'step 2' - game.delayx(); - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.getStorage('nsjiquan_mark').length; - }, - }, - }, - nsjiquan_mark:{ - intro:{ - content:'cards', - onunmark:'throw', - }, - marktext:'威', - }, - nsfuwei:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - unique:true, - juexingji:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - return player.getStorage('nsjiquan_mark').length>4; - }, - content:function(){ - player.awakenSkill('nsfuwei'); - player.storage.nsfuwei=true; - player.addSkill('nsdiemou'); - player.addSkill('nszhihuang'); - player.gainMaxHp(2); - }, - derivation:['nsdiemou','nszhihuang'], - }, - nsdiemou:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - filter:function(event,player){ - return player.getStorage('nsjiquan_mark').length>game.players.length; - }, - content:function(){ - var num=player.getStorage('nsjiquan_mark').length; - player.draw(num); - player.loseMaxHp(); - player.unmarkSkill('nsjiquan_mark'); - if(num>4) player.turnOver(); - }, - }, - nszhihuang:{ - group:'nszhihuang_damage', - trigger:{global:'useCard'}, - usable:1, - filter:function(event,player){ - return event.player==get.zhu(player)&&player.getStorage('nsjiquan_mark').length>0&&event.cards&&event.cards.filterInD().length>0; - }, - prompt2:function(event){ - return '移去一张“威”并获得'+get.translation(event.cards.filterInD()); - }, - check:function(event,player){ - if(['equip','delay'].contains(get.type(event.card))) return get.attitude(player,event.player)<0; - return get.value(event.cards.filterInD()>0); - }, - logTarget:'player', - content:function(){ - 'step 0' - var cards=player.getStorage('nsjiquan_mark'); - if(cards.length==1) event._result={ - bool:true, - links:cards.slice(0), - } - else player.chooseButton(['选择移去一张“威”',cards],true); - 'step 1' - player.unmarkAuto('nsjiquan_mark',result.links); - game.cardsDiscard(result.links); - player.gain(trigger.cards.filterInD(),'gain2','log'); - }, - }, - nszhihuang_damage:{ - trigger:{source:'damageBegin1'}, - forced:true, - filter:function(event,player){ - var zhu=get.zhu(player); - return zhu&&player.countCards('h')>zhu.countCards('h')&&event.getParent().type=='card'; - }, - content:function(){ - trigger.num++; - }, - }, - - yjxuepin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(event,player,target){ - return player.inRange(target); - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true); - else event.finish(); - 'step 2' - if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover(); - }, - ai:{ - order:4, - result:{ - player:function(player,target){ - if(player.hp==1) return -4; - if(target.countCards('e')>1) return 0; - if(player.hp>2||target.countCards('h')>1) return -0.5; - return -2; - }, - target:function(player,target){ - return -2; - }, - }, - }, - }, - nsjianglie:{ - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.countCards('h')>0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - logTarget:'target', - content:function(){ - 'step 0' - trigger.target.showHandcards(); - 'step 1' - var cards=trigger.target.getCards('h'); - var list=[]; - for(var i=0;i=get.value(player.getCards('h',{color:'black'}))) return 'black'; - return 'red'; - }); - } - 'step 2' - trigger.target.discard(trigger.target.getCards('h',{color:result.control})); - }, - }, - ns_chuanshu:{ - audio:["xingshuai",2], - trigger:{ - global:"dying", - }, - priority:8, - unique:true, - skillAnimation:true, - animationColor:"water", - filter:function (event,player){ - return event.player.hp<=0&&event.player!=player; - }, - check:function (event,player){ - return get.attitude(player,event.player)>0; - }, - logTarget:"player", - content:function (){ - 'step 0' - trigger.player.chooseControl('releiji','guidao').set('prompt',''+get.translation(trigger.player)+'获得一项技能'); - goon=true; - if(!goon){ - event.finish(); - } - 'step 1' - trigger.player.addSkillLog(result.control); - trigger.player.recover(1-trigger.player.hp); - trigger.player.draw(2); - trigger.player.storage.ns_chuanshu2=player; - trigger.player.addSkill('ns_chuanshu2'); - //game.broadcastAll()+trigger.player.node.avatar.setBackgroundImage('extension/群英会/ns_zhangjiao.jpg'); - //player.removeSkill('ns_chuanshu'); - player.awakenSkill('ns_chuanshu'); - }, - }, - ns_xiandao1:{ - audio:["huashen",2], - forced:true, - //noLose:true, - //locked:true, - //noRemove:true, - //noDisable:true, - priority:10, - trigger:{ - global:"gameStart", - player:["phaseEnd","enterGame"], - }, - //filter:function (event,player){ - // return player.isAlive(); - //}, - content:function (){ - var n=[1,2].randomGet(); - if(n==1){ - player.addTempSkill("releiji",{player:"phaseUseBegin"}); - player.markSkill("releiji",{player:"phaseUseBegin"}); - }; - if(n==2){ - player.addTempSkill("guidao",{player:"phaseUseBegin"}); - player.markSkill("guidao",{player:"phaseUseBegin"}); - }; - }, - }, - ns_xiandao2:{ - audio:["huashen",2], - forced:true, - //noLose:true, - //locked:true, - //noRemove:true, - //noDisable:true, - trigger:{ - player:"damageBefore", - }, - filter:function (event,player){ - if(!event.nature) return false; - return true; - }, - content:function (){ - trigger.cancel(); - //event.finish(); - }, - }, - ns_xiandao:{ - forced:true, - //noLose:true, - //locked:true, - noRemove:true, - //noDisable:true, - group:["ns_xiandao1","ns_xiandao2"], - }, - ns_chuanshu2:{ - audio:["songwei",2], - mark:"character", - intro:{ - content:"当你造成或受到一次伤害后,$摸一张牌", - }, - nopop:true, - trigger:{ - source:"damageEnd", - player:"damageEnd", - }, - forced:true, - popup:false, - filter:function (event,player){ - return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn()&&event.num>0; - }, - content:function (){ - 'step 0' - game.delayx(); - 'step 1' - var target=player.storage.ns_chuanshu2; - player.line(target,'green'); - target.draw(); - game.delay(); - }, - onremove:true, - group:"ns_chuanshu3", - }, - ns_chuanshu3:{ - audio:1, - trigger:{ - player:"dieBegin", - }, - silent:true, - onremove:true, - filter:function (event,player){ - return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn(); - }, - content:function (){ - 'step 0' - game.delayx(); - 'step 1' - var target=player.storage.ns_chuanshu2; - player.line(target,'green'); - //target.addSkill('ns_chuanshu'); - target.restoreSkill('ns_chuanshu'); - target.update(); - }, - forced:true, - popup:false, - }, - ns_xiuzheng:{ - audio:["xinsheng",2], - enable:"phaseUse", - usable:1, - priority:10, - filter:function (event,player){ - return (ui.cardPile.childElementCount+ui.discardPile.childElementCount)>=2; - }, - filterTarget:function (card,player,target){ - return player!=target; - }, - content:function (){ - "step 0" - event.cards=get.cards(2); - player.showCards(event.cards); - "step 1" - if(get.color(event.cards[0])=='red'&&get.color(event.cards[1])=='red'){ - target.damage('fire'); - } - if(get.color(event.cards[0])!=get.color(event.cards[1])){ - player.discardPlayerCard(target,"he",true); - } - if(get.color(event.cards[0])=='black'&&get.color(event.cards[1])=='black'){ - target.damage('thunder'); - } - "step 2" - if(event.cards.length){ - player.gain(event.cards,'gain2'); - game.delay(); - } - "step 3" - player.chooseToDiscard(2,'he','请弃置两张牌',true); - }, - ai:{ - threaten:0.5, - order:13, - result:{ - target:function (player,target){ - return get.damageEffect(target,player); - }, - }, - }, - }, - nsanruo:{ - unique:true, - init:function(player){ - if(!player.node.handcards1.cardMod){ - player.node.handcards1.cardMod={}; - } - if(!player.node.handcards2.cardMod){ - player.node.handcards2.cardMod={}; - } - var cardMod=function(card){ - if(get.info(card).multitarget) return; - if(card.name=='sha'||get.type(card)=='trick') return ['暗弱','杀或普通锦囊牌对你不可见']; - }; - player.node.handcards1.cardMod.nsanruo=cardMod; - player.node.handcards2.cardMod.nsanruo=cardMod; - player.node.handcards1.classList.add('nsanruo'); - player.node.handcards2.classList.add('nsanruo'); - if(!ui.css.nsanruo){ - ui.css.nsanruo=lib.init.sheet( - '.handcards.nsanruo>.card[data-card-type="trick"]:not(*[data-card-multitarget="1"])>*,'+ - '.handcards.nsanruo>.card[data-card-name="sha"]>*{visibility:hidden !important}' - ); - } - }, - onremove:function(player){ - player.node.handcards1.classList.remove('nsanruo'); - player.node.handcards2.classList.remove('nsanruo'); - delete player.node.handcards1.cardMod.nsanruo; - delete player.node.handcards2.cardMod.nsanruo; - }, - ai:{ - neg:true - } - }, - nsxunshan:{ - mod:{ - selectTarget:function(card,player,range){ - if(!player.hasSkill('nsanruo')) return; - if(_status.auto) return; - if(get.position(card)!='h'||get.owner(card)!=player) return; - if(get.info(card).multitarget) return; - if(card.name=='sha'||get.type(card)=='trick') range[1]=game.countPlayer(); - }, - // playerEnabled:function(card,player,target,current){ - // if(current==false) return; - // var filter=get.info(card).modTarget; - // if(typeof filter=='boolean'&&filter) return 'forceEnable'; - // if(typeof filter=='function'&&filter(card,player,target)) return 'forceEnable'; - // } - // targetInRange:function(card,player){ - // if(_status.auto) return; - // if(get.position(card)!='h'||get.owner(card)!=player) return; - // if(get.info(card).multitarget) return; - // if(card.name=='sha'||get.type(card)=='trick') return true; - // } - }, - ai:{ - combo:'nsanruo' - } - }, - nskaicheng:{ - enable:'phaseUse', - usable:1, - zhuSkill:true, - unique:true, - filter:function(event,player){ - if(!player.hasZhuSkill('nskaicheng')) return false; - if(!player.hasCard(function(card){ - if(get.info(card).multitarget) return false; - return card.name=='sha'||get.type(card)=='trick'; - })){ - return false; - } - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='qun'; - }); - }, - filterCard:function(card){ - if(get.info(card).multitarget) return false; - return card.name=='sha'||get.type(card)=='trick'; - }, - filterTarget:function(card,player,target){ - return player!=target&&target.group=='qun'; - }, - lose:false, - content:function(){ - 'step 0' - target.chooseBool(function(){ - return get.attitude(target,player)>0; - },'是否将'+get.translation(cards)+'告知'+get.translation(player)); - 'step 1' - if(!player.hasUseTarget(cards[0])){ - if(result.bool){ - player.chooseControl('确定').set('prompt','你展示的手牌为'+get.translation(cards)); - } - else{ - event.hidden=true; - player.chooseControl('确定').set('prompt',get.translation(target)+'拒绝告知你卡牌信息'); - } - } - else{ - if(result.bool){ - player.chooseBool('是否使用展示的牌?','你展示的手牌为'+get.translation(cards)+'。如果你使用此牌,则在结算后摸一张牌;如果你不使用此牌,则结束出牌阶段'); - } - else{ - event.hidden=true; - player.chooseBool('是否使用展示的牌?',get.translation(target)+'拒绝告知你卡牌信息。如果你使用此牌,则在结算后摸一张牌;如果你不使用此牌,则结束出牌阶段'); - } - } - 'step 2' - if(result.bool){ - player.chooseUseTarget(true,cards[0],event.hidden?'选择此牌的目标':null); - } - else{ - var evt=_status.event.getParent('phaseUse'); - if(evt){ - evt.skipped=true; - } - event.finish(); - } - 'step 3' - player.draw(); - }, - ai:{ - combo:'nsanruo' - } - }, - nsjuanli:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h'); - }, - init:function(player){ - player.storage.nsjuanli_win=[]; - player.storage.nsjuanli_lose=[]; - }, - intro:{ - content:function(storage,player){ - var str=''; - if(player.storage.nsjuanli_win.length){ - str+=get.translation(player.storage.nsjuanli_win)+'与你距离-1直到与你下次赌牌'; - } - if(player.storage.nsjuanli_lose.length){ - if(str.length){ - str+=';'; - } - str+=get.translation(player.storage.nsjuanli_lose)+'与你距离+1直到与你下次赌牌'; - } - return str; - } - }, - onremove:['nsjuanli_win','nsjuanli_lose'], - content:function(){ - 'step 0' - player.storage.nsjuanli_win.remove(target); - player.storage.nsjuanli_lose.remove(target); - event.prompt2='赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利'; - player.chooseCard('h',true).set('prompt2',event.prompt2); - 'step 1' - if(result.bool){ - event.card1=result.cards[0]; - target.chooseCard('h',true).set('prompt2',event.prompt2); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - event.card2=result.cards[0]; - } - else{ - event.finish(); - } - 'step 3' - player.$compare(event.card1,event.target,event.card2); - game.delay(0,1500); - game.log(player,'亮出的牌为',event.card1); - game.log(target,'亮出的牌为',event.card2); - 'step 4' - var suit1=get.suit(event.card1); - var suit2=get.suit(event.card2); - if(suit1==suit2){ - game.broadcastAll(function(str){ - var dialog=ui.create.dialog(str); - dialog.classList.add('center'); - setTimeout(function(){ - dialog.close(); - },1000); - },'平局'); - game.delay(2); - if(!player.storage.nsjuanli_win.length&&!player.storage.nsjuanli_lose.length){ - player.unmarkSkill('nsjuanli'); - } - } - else{ - var cards=[]; - for(var i=0;i<1000;i++){ - var current=get.cards(); - if(current&¤t.length){ - current=current[0]; - current.discard(); - cards.push(current); - var suit=get.suit(current); - if(suit==suit1){ - player.showCards(cards,get.translation(player)+'赌牌获胜'); - player.storage.nsjuanli_win.add(target); - target.loseHp(); - player.markSkill('nsjuanli'); - break; - } - else if(suit==suit2){ - player.showCards(cards,get.translation(target)+'赌牌获胜'); - player.storage.nsjuanli_lose.add(target); - target.recover(); - player.markSkill('nsjuanli'); - break; - } - } - else{ - break; - } - } - } - }, - mod:{ - globalTo:function(from,to,distance){ - if(to.storage.nsjuanli_win&&to.storage.nsjuanli_win.contains(from)){ - return distance-1; - } - if(to.storage.nsjuanli_lose&&to.storage.nsjuanli_lose.contains(from)){ - return distance+1; - } - } - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(target.isHealthy()){ - return -1/(1+target.hp); - } - else{ - return -0.3/(1+target.hp); - } - } - } - } - }, - nsyuanchou:{ - trigger:{target:'useCardToBefore'}, - forced:true, - priority:15, - check:function(event,player){ - return get.effect(event.target,event.card,event.player,player)<0; - }, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'&&get.distance(event.player,player)>1; - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card,'trick')=='trick'&&get.distance(player,target)>1) return 'zeroplayertarget'; - }, - } - } - }, - nsguhuo:{ - trigger:{player:'useCardAfter'}, - forced:true, - usable:2, - filter:function(event,player){ - if(event.parent.name=='nsguhuo') return false; - if(event.card==event.cards[0]){ - var type=get.type(event.card,'trick'); - var names=[]; - if(get.cardPile(function(card){ - if(get.type(card,'trick')!=type) return false; - if(get.info(card).multitarget) return false; - if(names.contains(card.name)) return false; - if(player.hasUseTarget(card)){ - return true; - } - else{ - names.add(card.name); - return false; - } - })){ - return true; - } - } - return true; - }, - content:function(){ - var type=get.type(trigger.card,'trick'); - var names=[]; - var card=get.cardPile(function(card){ - if(get.type(card,'trick')!=type) return false; - if(get.info(card).multitarget) return false; - if(names.contains(card.name)) return false; - if(player.hasUseTarget(card)){ - return true; - } - else{ - names.add(card.name); - return false; - } - }); - if(card){ - var info=get.info(card); - var targets=game.filterPlayer(function(current){ - return lib.filter.filterTarget(card,player,current); - }); - if(targets.length){ - targets.sort(lib.sort.seat); - var select=get.select(info.selectTarget); - if(select[0]==-1||select[1]==-1){ - player.useCard(card,targets,'noai'); - } - else if(targets.length>=select[0]){ - var num=select[0]+Math.floor(Math.random()*(select[1]-select[0]+1)); - player.useCard(card,targets.randomGets(num),'noai'); - } - } - } - } - }, - nsbaiyi:{ - trigger:{player:'phaseDiscardBefore'}, - forced:true, - filter:function(event,player){ - return player.storage.nsqinxue&&player.storage.nsqinxue.length; - }, - content:function(){ - 'step 0' - trigger.cancel(); - var num=player.storage.nsqinxue.length; - player.chooseToDiscard('白衣:请弃置'+get.cnNumber(num)+'张牌','he',true,num); - 'step 1' - if(result.bool&&result.cards.length){ - event.goon=true; - if(result.cards.length==3){ - var type=[]; - for(var i=0;i=2; - }, - content:function(){ - player.storage.nsfuge=true; - player.insertPhase(); - }, - group:'nsfuge_draw', - subSkill:{ - draw:{ - trigger:{player:'phaseDrawBegin'}, - silent:true, - filter:function(event,player){ - var evt=event.getParent('phase'); - return evt&&evt.skill=='nsfuge'; - }, - content:function(){ - trigger.num+=player.maxHp-player.hp; - } - } - } - }, - nsbaiming:{ - trigger:{player:'useCard'}, - direct:true, - filter:function(event,player){ - if(player.additionalSkills.nsbaiming) return false; - return event.card&&event.card.name=='sha'&&player.storage.nsbaiming&&player.storage.nsbaiming.length>0; - }, - group:'nsbaiming_clear', - init:function(player){ - var check=function(list){ - for(var i=0;i
【'+ - translation+'】
'+lib.translate[list[i]+'_info']+'
'); - item.firstChild.addEventListener('click',clickItem); - item.firstChild.link=list[i]; - } - } - dialog.add(ui.create.div('.placeholder')); - event.switchToAuto=function(){ - event._result=event.skillai(); - dialog.close(); - game.resume(); - }; - event.confirm=ui.create.confirm('c'); - event.custom.replace.confirm=function(){ - event._result=null; - dialog.close(); - game.resume(); - }; - _status.imchoosing=true; - game.pause(); - } - else{ - event._result=event.skillai(); - } - 'step 1' - _status.imchoosing=false; - if(event.confirm){ - event.confirm.close(); - } - if(typeof result=='string'){ - player.logSkill('nsbaiming'); - var link=result; - player.addAdditionalSkill('nsbaiming',link); - player.logSkill('nsbaiming'); - player.popup(link); - game.log(player,'获得了技能','【'+get.translation(link)+'】'); - game.delay(); - player.storage.nsbaiming.remove(link); - trigger.nsbaiming=true; - } - }, - subSkill:{ - clear:{ - trigger:{player:'useCardAfter'}, - silent:true, - filter:function(event){ - return event.nsbaiming==true; - }, - content:function(){ - player.removeAdditionalSkill('nsbaiming'); - } - } - } - }, - nsxinzhan:{ - enable:'phaseUse', - filterCard:[1,Infinity], - filter:function(event,player){ - return player.countCards('h')>0; - }, - usable:1, - selectCard:[1,Infinity], - check:function(card){ - var player=_status.event.player; - if(player.countCards('h')>=8&&game.hasPlayer(function(current){ - return current.isDamaged()&&get.attitude(player,current)>3; - })){ - if(ui.selected.cards.length>=6){ - return 0; - } - return 1; - } - else{ - if(ui.selected.cards.length>=2){ - return 0; - } - if(player.countCards('h',function(card){ - return get.value(card)<0; - })){ - return 8-get.value(card,player,'raw'); - } - else{ - return 4-get.value(card,player,'raw'); - } - } - }, - discard:false, - prepare:'give2', - content:function(){ - target.gain(cards,player); - var num=Math.floor(cards.length/2); - if(num>=3){ - target.loseMaxHp(true); - } - else if(num){ - target.loseHp(num); - } - }, - filterTarget:function(card,player,target){ - return target!=player; - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(ui.selected.cards.length>=6){ - if(target.isDamaged()) return 2; - return 1; - } - if(ui.selected.cards.length==1){ - return 1; - } - return -1; - } - } - } - }, - nstanbing:{ - trigger:{player:'phaseDrawBegin'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard('h',get.prompt2('nstanbing')).set('ai',function(card){ - if(!player.needsToDiscard(1)){ - return get.translation(card.name).length-1; - } - return 0; - }).logSkill='nstanbing'; - 'step 1' - if(result.bool){ - player.draw(get.translation(result.cards[0].name).length); - player.addTempSkill('nstanbing_sha'); - } - }, - subSkill:{ - sha:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name=='sha'){ - return false; - } - }, - cardUsable:function(card,player){ - if(card.name=='sha'){ - return false; - } - }, - } - } - } - }, - nswangfeng:{ - trigger:{global:'judge'}, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - direct:true, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ - return get.color(card)=='red'; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result; - } - else{ - return -result; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('nswangfeng'); - player.$gain2(trigger.player.judging[0]); - player.gain(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - if(!get.owner(result.cards[0],'judge')){ - trigger.position.appendChild(result.cards[0]); - } - game.log(trigger.player,'的判定牌改为',result.cards[0]); - } - "step 3" - game.delay(2); - }, - ai:{ - tag:{ - rejudge:1 - } - } - }, - nsfuhuo:{ - enable:'phaseUse', - usable:1, - filterCard:true, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('nsfuhuo2'); - }, - prepare:'throw', - discard:false, - content:function(){ - target.$gain2(cards); - target.storage.nsfuhuo2=cards[0]; - target.addSkill('nsfuhuo2'); - target.storage.nsfuhuo3=player; - ui.special.appendChild(cards[0]); - target.syncStorage('nsfuhuo2'); - }, - check:function(card){ - return 6-get.value(card) - }, - ai:{ - expose:0.1, - order:4, - result:{ - target:function(player,target){ - if(target.hasSkillTag('maixie')) return 0; - return -1; - } - } - }, - group:['nsfuhuo_die','nsfuhuo_gain'], - subSkill:{ - die:{ - trigger:{player:'dieBegin'}, - silent:true, - content:function(){ - for(var i=0;i0; - }, - check:function(event,player){ - if(player.hasShan()||player.hujia>0) return false; - var nh=player.countCards('h'); - if(player.hp==1){ - return nh<=3; - } - if(player.hp==2){ - return nh<=1; - } - return false; - }, - content:function(){ - var cards=player.getCards('h'); - player.discard(cards); - player.changeHujia(cards.length); - player.storage.nsbaquan=true; - }, - group:'nsbaquan_clear', - subSkill:{ - clear:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.nsbaquan&&player.hujia>0; - }, - content:function(){ - player.changeHujia(-player.hujia); - game.log(player,'失去了所有护甲'); - delete player.storage.nsbaquan; - } - } - } - }, - nschangshi:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.identity=='fan'; - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(ui.selected.targets.length){ - return target.hp!=ui.selected.targets[0].hp; - } - return true; - }, - multitarget:true, - selectTarget:2, - content:function(){ - var tmp=targets[0].hp; - targets[0].hp=targets[1].hp; - targets[1].hp=tmp; - targets[0].update(); - targets[1].update(); - if(Math.abs(targets[0].hp-targets[1].hp)==1){ - player.loseHp(); - } - //else{ - //player.die(); - //} - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(target==game.zhu) return -1; - if(get.attitude(player,target)>3){ - var num=game.zhu.hp-target.hp; - if(num==1){ - return 1; - } - if(num>1){ - if(player.hp==1) return num; - if(target.hp==1) return num; - if(num>=3) return num; - } - } - return 0; - } - } - } - }, - nsjianning:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.identity=='nei'; - }, - filterTarget:function(card,player,target){ - return target.countCards('h')=8; - })&&player.countCards('h')-target.countCards('h')<=1){ - if(target.hp==1||player.countCards('h',function(card){ - return get.value(card)<0; - })){ - return get.damageEffect(target,player,target); - } - } - return 0; - } - } - } - }, - nscuanquan:{ - init:function(player){ - player.storage.nscuanquan=0; - }, - forced:true, - unique:true, - forceunique:true, - skillAnimation:true, - animationColor:'thunder', - trigger:{player:'damageAfter'}, - filter:function(event,player){ - return player.identity=='zhong'&&player.storage.nscuanquan==3&&game.zhu&&game.zhu.isZhu; - }, - group:'nscuanquan_count', - subSkill:{ - count:{ - trigger:{player:'damageEnd'}, - silent:true, - content:function(){ - player.storage.nscuanquan++; - } - } - }, - logTarget:function(){ - return [game.zhu]; - }, - content:function(){ - player.awakenSkill('nscuanquan'); - var tmp=player.maxHp; - player.identity='zhu'; - player.maxHp=game.zhu.hp; - player.showIdentity(); - player.update(); - game.zhu.identity='zhong'; - game.zhu.maxHp=tmp; - game.zhu.showIdentity(); - game.zhu.update(); - game.zhu=player; - } - }, - nstianji:{ - trigger:{global:'dying'}, - priority:6, - unique:true, - skillAnimation:true, - animationColor:'water', - filter:function(event,player){ - return event.player.hp<=0&&event.player!=player; - }, - logTarget:'player', - check:function(event,player){ - return get.attitude(player,event.player)>1; - }, - content:function(){ - 'step 0' - player.awakenSkill('nstianji'); - player.loseMaxHp(); - 'step 1' - trigger.player.recover(1-trigger.player.hp); - 'step 2' - trigger.player.gainMaxHp(); - } - }, - nsbugua:{ - group:'nsbugua_use', - ai:{ - threaten:1.4, - }, - subSkill:{ - use:{ - enable:'phaseUse', - usable:1, - filterCard:true, - check:function(card){ - return 9-get.value(card); - }, - filter:function(event,player){ - // if(!player.storage.nstuiyan2_done&&player.getStat().skill.nsbugua_use){ - // return false; - // } - return player.countCards('he'); - }, - position:'he', - ai:{ - order:9.5, - result:{ - player:1 - } - }, - content:function(){ - 'step 0' - player.throwDice(); - 'step 1' - var cards=get.cards(6); - var cards2=cards.slice(0); - var card=(cards2.splice(event.num-1,1))[0]; - player.showCards(get.translation(player)+'亮出了'+get.translation(card),cards).set('hiddencards',cards2); - card.discard(); - var name=null; - switch(get.suit(card)){ - case 'club':{ - if(card.number%2==0){ - name='guohe'; - } - else{ - name='jiedao'; - } - break; - } - case 'spade':{ - if(card.number%2==0){ - name='nanman'; - } - else{ - name='juedou'; - } - break; - } - case 'diamond':{ - if(card.number%2==0){ - name='shunshou'; - } - else{ - name='huogong'; - } - break; - } - case 'heart':{ - if(card.number%2==0){ - name='wuzhong'; - } - else{ - name='wanjian'; - } - break; - } - } - var togain=get.cardPile(name,'cardPile'); - if(togain){ - player.gain(togain,'gain2'); - } - else{ - player.draw(); - } - event.list=cards2; - 'step 2' - player.chooseCardButton(event.list,true,'按顺序将牌置于牌堆顶(先选择的在上)',event.list.length); - 'step 3' - var list=result.links.slice(0); - while(list.length){ - ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); - } - }, - }, - twice:{} - } - }, - nstuiyan:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.getParent('phaseUse',true)&&!player.hasSkill('nstuiyan_fail')&& - typeof player.storage.nstuiyan=='number'&&event.card.number>player.storage.nstuiyan; - }, - frequent:true, - priority:2, - content:function(){ - player.draw(); - }, - onremove:function(player){ - delete player.storage.nstuiyan; - delete player.storage.nstuiyan_done; - delete player.storage.nstuiyan2; - delete player.storage.nstuiyan2_done; - }, - intro:{ - mark:function(dialog,content,player){ - if(player.storage.nstuiyan_done){ - dialog.addText('推演摸牌已结束'); - } - else{ - dialog.addText('上一张点数:'+player.storage.nstuiyan); - } - if(player.storage.nstuiyan2_done){ - dialog.addText('总点数8的倍数已达成'); - } - else{ - dialog.addText('总点数:'+player.storage.nstuiyan2); - } - }, - content:function(storage,player){ - var str=''; - if(player.storage.nstuiyan_done){ - str+='推演摸牌已结束;' - } - else{ - str+='上一张牌点数:'+storage+';'; - } - if(player.storage.nstuiyan2_done){ - str+='总点数8的倍数已达成'; - } - else{ - str+='总点数:'+player.storage.nstuiyan2; - } - return str; - }, - markcount:function(storage,player){ - if(player.storage.nstuiyan2_done){ - if(player.storage.nstuiyan_done){ - return 0; - } - else{ - return player.storage.nstuiyan; - } - } - else{ - return player.storage.nstuiyan2; - } - } - }, - group:['nstuiyan_use','nstuiyan_clear'], - subSkill:{ - bugua:{ - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - 'step 0' - player.removeSkill('nstuiyan_bugua'); - player.chooseToDiscard('he','推演:是否发动一次【卜卦】?').set('ai',function(card){ - return 8-get.value(card); - }).set('logSkill','nstuiyan'); - 'step 1' - if(result.bool){ - event.insert(lib.skill.nsbugua.subSkill.use.content,{player:player}); - } - } - }, - use:{ - trigger:{player:'useCard'}, - silent:true, - priority:-1, - filter:function(event,player){ - return _status.currentPhase==player&&event.getParent('phaseUse',true)&&typeof event.card.number=='number'; - }, - content:function(){ - if(typeof player.storage.nstuiyan2!='number'){ - player.storage.nstuiyan2=0; - } - if(!player.hasSkill('nstuiyan_fail')&& - (trigger.card.number<=player.storage.nstuiyan||typeof trigger.card.number!='number')){ - player.storage.nstuiyan_done=true; - player.addTempSkill('nstuiyan_fail'); - } - player.storage.nstuiyan=trigger.card.number; - player.storage.nstuiyan2+=trigger.card.number; - if(player.storage.nstuiyan2%8==0&&!player.storage.nstuiyan2_done){ - player.storage.nstuiyan2_done=true; - player.addTempSkill('nstuiyan_bugua'); - } - player.markSkill('nstuiyan'); - } - }, - clear:{ - trigger:{player:['phaseUseAfter','phaseAfter']}, - silent:true, - content:function(){ - delete player.storage.nstuiyan; - delete player.storage.nstuiyan_done; - delete player.storage.nstuiyan2; - delete player.storage.nstuiyan2_done; - player.unmarkSkill('nstuiyan'); - } - }, - fail:{} - }, - ai:{ - threaten:1.4 - } - }, - nsshijun:{ - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - trigger.nsshijun=true; - }, - subSkill:{ - hp:{ - trigger:{source:'damageAfter'}, - silent:true, - filter:function(event){ - return event.nsshijun; - }, - content:function(){ - player.loseHp(); - } - } - }, - group:'nsshijun_hp' - }, - nszhaoxin:{ - mark:true, - intro:{ - mark:function(dialog,content,player){ - var hs=player.getCards('h'); - if(hs.length){ - dialog.addSmall(hs); - } - else{ - dialog.addText('无手牌'); - } - }, - content:function(content,player){ - var hs=player.getCards('h'); - if(hs.length){ - return get.translation(hs); - } - else{ - return '无手牌'; - } - } - }, - }, - nsxiuxin:{ - mod:{ - targetEnabled:function(card,player,target){ - var suit=get.suit(card); - if(suit&&!target.countCards('h',{suit:suit})){ - return false; - } - } - } - }, - nscangxi:{ - unique:true, - global:'nscangxi2', - zhuSkill:true, - init:function(player){ - player.storage.nscangxi=0; - }, - intro:{ - content:'手牌上限+#' - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.nscangxi; - } - } - }, - nscangxi2:{ - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - if(!event.cards||event.cards.length<=1) return false; - if(player.group!='wu') return false; - return game.hasPlayer(function(target){ - return player!=target&&target.hasZhuSkill('nscangxi',player); - }); - }, - direct:true, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current!=player&¤t.hasZhuSkill('nscangxi',player); - }); - list.sortBySeat(); - event.list=list; - 'step 1' - if(event.list.length){ - var current=event.list.shift(); - event.current=current; - player.chooseBool(get.prompt('nscangxi',current)).set('choice',get.attitude(player,current)>0); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.logSkill('nscangxi',event.current); - player.judge(function(card){ - return _status.event.att*(get.color(card)=='black'?1:0); - }).set('att',get.sgnAttitude(player,event.current)); - } - else{ - event.goto(1); - } - 'step 3' - if(result.color=='black'){ - var name=get.translation(event.current.name); - var att=0; - if(event.current.needsToDiscard()){ - att=1; - } - player.chooseControlList(['令'+name+'摸一张牌展示','令'+name+'手牌上永久+1','弃置一张牌并令'+name+'获得一张本回进入弃牌堆的牌'],function(){ - return _status.event.att; - }).set('att',att); - } - else{ - event.goto(1); - } - 'step 4' - switch(result.index){ - case 0: event.current.draw('visible');break; - case 1: { - if(typeof event.current.storage.nscangxi!='number'){ - event.current.storage.nscangxi=0; - } - event.current.storage.nscangxi++; - event.current.syncStorage('nscangxi'); - event.current.markSkill('nscangxi'); - break; - } - case 2: { - player.chooseToDiscard(true,'he'); - break; - } - } - if(result.index!=2){ - event.goto(1); - } - 'step 5' - if(result.bool){ - var discarded=get.discarded(); - if(discarded.length){ - event.current.chooseCardButton('选择一张获得之',discarded,true).set('ai',function(button){ - return get.value(button.link); - }); - } - else{ - event.goto(1); - } - } - else{ - event.goto(1); - } - 'step 6' - if(result.bool&&result.links&&result.links.length){ - event.current.gain(result.links,'gain2'); - } - event.goto(1); - } - }, - nswulie:{ - trigger:{player:'phaseBegin'}, - skillAnimation:true, - animationColor:'metal', - unique:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return ui.discardPile.childElementCount>0; - }, - content:function(){ - 'step 0' - player.awakenSkill('nswulie'); - player.loseMaxHp(); - 'step 1' - player.chooseCardButton(Array.from(ui.discardPile.childNodes),'将至多3张任意顺置于牌堆顶(先选择的在上)',true,[1,3]); - 'step 2' - if(result.bool){ - var cards=result.links.slice(0); - while(cards.length){ - ui.cardPile.insertBefore(cards.pop(),ui.cardPile.firstChild); - } - player.addTempSkill('nswulie_end'); - } - }, - subSkill:{ - end:{ - trigger:{player:'phaseEnd'}, - check:function(){ - return false; - }, - filter:function(event,player){ - return ui.discardPile.childElementCount>0; - }, - content:function(){ - 'step 0' - player.loseMaxHp(); - 'step 1' - player.chooseCardButton(Array.from(ui.discardPile.childNodes),'将至多3张任意顺置于牌堆顶(先选择的在上)',true,[1,3]); - 'step 2' - if(result.bool){ - var cards=result.links.slice(0); - while(cards.length){ - ui.cardPile.insertBefore(cards.pop(),ui.cardPile.firstChild); - } - } - } - } - } - }, - nshunyou:{ - enable:'phaseUse', - usable:1, - filterCard:{type:'basic'}, - filter:function(event,player){ - return player.countCards('h',{type:'basic'}); - }, - content:function(){ - 'step 0' - var equip=null, trick=null; - for(var i=0;i1){ - if(!target.getEquip(_status.event.subtype)) return att; - } - return 0; - }).set('subtype',get.subtype(event.equip)); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.line(result.targets,'green'); - player.$give(event.equip,result.targets[0]); - player.lose(event.equip,ui.special); - } - else{ - event.finish(); - } - 'step 3' - game.delay(0.5); - 'step 4' - result.targets[0].equip(event.equip); - 'step 5' - game.delay(); - }, - check:function(card){ - return 7-get.value(card); - }, - ai:{ - order:7, - result:{ - player:1 - } - } - }, - nsgongjian:{ - trigger:{player:'phaseDiscardEnd'}, - forced:true, - filter:function(event,player){ - if(event.cards&&event.cards.length>0){ - return game.hasPlayer(function(current){ - return current.hp>player.hp; - }); - } - return false; - }, - content:function(){ - 'step 0' - player.chooseTarget('恭俭:将置的牌交给一名体力值大于你的角色',function(card,player,target){ - return target.hp>player.hp; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target)/Math.sqrt(target.countCards('h')+1); - }); - 'step 1' - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(trigger.cards,'gain2'); - } - }, - }, - nscaijian:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var nh=player.countCards('h'); - return nh&&nh<=player.maxHp; - }, - content:function(){ - 'step 0' - player.showHandcards(); - event.num=player.countCards('h'); - 'step 1' - player.directgain(get.cards(event.num)); - player.chooseCard('将'+get.cnNumber(event.num)+'张手牌以按顺序置于牌堆顶(先选择的在上)',event.num,true).set('ai',function(card){ - return -get.value(card); - }); - 'step 2' - if(result.bool){ - player.lose(result.cards,ui.special)._triggered=null; - event.cards=result.cards.slice(0); - } - else{ - event.finish(); - } - 'step 3' - if(player==game.me&&_status.auto){ - game.delay(); - } - 'step 4' - while(event.cards.length){ - var current=event.cards.pop(); - current.fix(); - ui.cardPile.insertBefore(current,ui.cardPile.firstChild); - } - }, - ai:{ - order:10, - result:{ - player:1 - } - } - }, - nsdongcha:{ - trigger:{player:'damageBefore'}, - forced:true, - priority:15, - filter:function(event,player){ - if(get.type(event.card,'trick')=='trick'){ - if(event.getParent(2).name=='useCard'){ - return event.getParent(2).targets.length==1; - } - return true; - } - return false; - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - notrick:true, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='trick'&&get.tag(card,'damage')&&!get.tag(card,'multitarget')){ - return 'zeroplayertarget'; - } - } - } - }, - group:'nsdongcha_cancel', - subSkill:{ - cancel:{ - trigger:{target:'useCardToAfter'}, - silent:true, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'&&_status.currentPhase==event.player&&event.player!=player; - }, - content:function(){ - player.addTempSkill('nsdongcha_disable'); - } - }, - disable:{ - trigger:{target:'useCardToBefore'}, - forced:true, - priority:15, - onremove:true, - filter:function(event,player){ - return (event.player==_status.currentPhase&&get.type(event.card,'trick')=='trick'); - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card,'trick')=='trick'&&_status.currentPhase==player) return 'zeroplayertarget'; - } - } - } - } - } - }, - nsjianxiong:{ - trigger:{target:'useCardToBefore'}, - direct:true, - content:function(){ - 'step 0' - player.chooseToUse(function(card){ - return !get.info(card).multitarget; - },get.prompt('nsjianxiong',trigger.player),trigger.player,-1); - 'step 1' - if(event.damaged){ - trigger.cancel(); - if(get.color(trigger.card)=='black'){ - player.draw(); - } - } - }, - subSkill:{ - damage:{ - trigger:{source:'damageAfter'}, - silent:true, - filter:function(event,player){ - return event.getParent(4).name=='nsjianxiong'; - }, - content:function(){ - trigger.getParent(4).damaged=true; - } - } - }, - group:'nsjianxiong_damage', - ai:{ - effect:{ - player:function(card,player,target){ - if(_status.currentPhase!=player) return; - if(get.tag(card,'damage')&&!player.needsToDiscard(1)&&target.hp>1){ - return 'zeroplayertarget'; - } - } - } - } - }, - nsxionglue:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h',{color:'black'}); - }, - check:function(card){ - return 7-get.value(card); - }, - filterCard:{color:'black'}, - content:function(){ - 'step 0' - var list=get.inpile('trick'); - list=list.randomGets(3); - for(var i=0;i1; - return true; - }, - direct:true, - skillAnimation:true, - animationColor:'thunder', - content:function(){ - 'step 0' - player.chooseTarget(2,get.prompt2('nshuanhuo'),function(card,player,target){ - return target!=player&&!target.isUnseen(2); - }).set('ai',function(target){ - var att=get.attitude(player,target); - if(ui.selected.targets.length){ - if(att<0){ - return get.rank(target,true)-get.rank(ui.selected.targets[0],true); - } - } - else{ - if(att>=0){ - return 1/(1+get.rank(target,true)); - } - } - return 0; - }); - 'step 1' - if(result.bool){ - player.logSkill('nshuanhuo',result.targets); - } - else{ - event.finish(); - } - 'step 2' - var name1=result.targets[0].name; - var name2=result.targets[1].name; - result.targets[0].reinit(name1,name2,false); - result.targets[1].reinit(name2,name1,false); - } - }, - nsyaowang:{ - trigger:{player:'phaseBegin'}, - direct:true, - group:'tianshu_remove', - createDialog:function(player,target,onlylist){ - var names=[]; - var list=[]; - if(target.name&&!target.isUnseen(0)) names.add(target.name); - if(target.name1&&!target.isUnseen(0)) names.add(target.name1); - if(target.name2&&!target.isUnseen(1)) names.add(target.name2); - var pss=player.getSkills(); - for(var i=0;i
【'+ - translation+'】
'+lib.translate[list[i]+'_info']+'
'); - item.firstChild.addEventListener('click',clickItem); - item.firstChild.link=list[i]; - } - } - dialog.add(ui.create.div('.placeholder')); - return dialog; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('nsyaowang'),function(card,player,target){ - var names=[]; - if(target.name&&!target.isUnseen(0)) names.add(target.name); - if(target.name1&&!target.isUnseen(0)) names.add(target.name1); - if(target.name2&&!target.isUnseen(1)) names.add(target.name2); - var pss=player.getSkills(); - for(var i=0;i0) return Math.random(); - return 0; - }); - 'step 1' - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('nsyaowang',event.target); - } - else{ - event.finish(); - } - 'step 2' - event.skillai=function(list){ - return get.max(list,get.skillRank,'item'); - }; - if(event.isMine()){ - event.dialog=lib.skill.tianshu.createDialog(player,target); - event.switchToAuto=function(){ - event._result=event.skillai(event.list); - game.resume(); - }; - _status.imchoosing=true; - game.pause(); - } - else{ - event._result=event.skillai(lib.skill.nsyaowang.createDialog(player,target,true)); - } - 'step 3' - _status.imchoosing=false; - if(event.dialog){ - event.dialog.close(); - } - player.addTempSkill(result); - player.popup(result); - game.log(player,'获得了','【'+get.translation(result)+'】'); - - var names=[]; - for(var i=0;i2){ - return att*2; - } - else{ - return att; - } - } - else{ - return -att; - } - }); - 'step 1' - if(result.bool){ - player.logSkill('nsyunxing',result.targets); - result.targets[0].turnOver(); - } - } - } - } - }, - nsguanxing:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.hp>0; - }, - content:function(){ - 'step 0' - event.cards=get.cards(game.countPlayer()); - event.chosen=[]; - event.num=player.hp; - 'step 1' - var js=player.getCards('j'); - var pos; - var choice=-1; - var getval=function(card,pos){ - if(js[pos]){ - return (get.judge(js[pos]))(card); - } - else{ - return get.value(card); - } - }; - for(pos=0;posmax){ - choice=j; - max=current; - } - } - if(choice!=-1){ - break; - } - } - player.chooseCardButton('观星:选择要移动的牌(还能移动'+event.num+'张)',event.cards).set('filterButton',function(button){ - return !_status.event.chosen.contains(button.link); - }).set('chosen',event.chosen).set('ai',function(button){ - return button.link==_status.event.choice?1:0; - }).set('choice',event.cards[choice]); - event.pos=pos; - 'step 2' - if(result.bool){ - var card=result.links[0]; - var index=event.cards.indexOf(card); - event.card=card; - event.chosen.push(card); - event.cards.remove(event.card); - var buttons=event.cards.slice(0); - player.chooseControl(function(){ - return _status.event.controlai; - }).set('controlai',event.pos||0).set('sortcard',buttons).set('tosort',card); - } - else{ - event.goto(4); - } - 'step 3' - if(typeof result.index=='number'){ - if(result.index>event.cards.length){ - ui.cardPile.appendChild(event.card); - } - else{ - event.cards.splice(result.index,0,event.card); - } - event.num--; - if(event.num>0){ - event.goto(1); - } - } - 'step 4' - while(event.cards.length){ - ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); - } - var js=player.getCards('j'); - if(js.length==1){ - if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ - player.addTempSkill('guanxing_fail'); - } - } - }, - ai:{ - guanxing:true - } - }, - nshaoling:{ - skillAnimation:true, - animationColor:'water', - unique:true, - limited:true, - enable:'phaseUse', - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - "step 0" - player.awakenSkill('nshaoling'); - event.targets=game.filterPlayer(); - event.targets.remove(player); - event.targets.remove(target); - event.targets.sortBySeat(); - "step 1" - if(event.targets.length){ - event.current=event.targets.shift(); - if(event.current.countCards('he')&&target.isAlive()){ - event.current.chooseToUse({name:'sha'},target,-1,'号令').set('prompt2','选择一项:1. 对'+get.translation(event.current)+'使用一张杀;2. 取消并交给'+get.translation(player)+'一张牌,然后视'+get.translation(player)+'为对你使用一张杀'); - } - } - else{ - event.finish(); - } - "step 2" - if(result.bool==false){ - if(event.current.countCards('he')){ - event.current.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); - } - else{ - event.goto(4); - } - } - else{ - event.goto(1); - } - "step 3" - if(result.bool){ - event.current.give(result.cards,player); - } - "step 4" - player.useCard({name:'sha'},event.current,false); - event.goto(1); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - var players=game.filterPlayer(); - if(player.hp>1){ - if(game.phaseNumber0; - }, - threaten:1.5, - save:true, - respondTao:true, - } - }, - nscaiyi:{ - trigger:{global:'drawAfter'}, - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - if(get.effect(event.player,{name:'sha'},player,player)<=0) return false; - if(get.effect(player,{name:'sha'},event.player,player)>=0) return true; - return player.hasShan()&&player.hp>=event.player.hp; - }, - filter:function(event,player){ - return player!=event.player&&Array.isArray(event.result)&&event.result.length>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.viewCards(get.translation(trigger.player)+'摸到的牌',trigger.result); - if(!event.isMine()){ - game.delayx(); - } - 'step 1' - var list=[]; - for(var i=0;i0; - }, - content:function(){ - trigger.cancel(); - player.hp=1; - player.update(); - if(_status.currentPhase==player){ - var num=4; - // if(game.countPlayer()>=7){ - // num=5; - // } - if(!player.hasSkill('nspinmin_used')&&player.maxHp=4){ - return false; - } - } - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'save')){ - if(_status.currentPhase==player) return 0; - if(target.maxHp>1&&player!=target) return 0; - } - if(get.tag(card,'recover')){ - if(_status.currentPhase==player) return 0; - } - } - } - } - }, - nsduijue:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - "step 0" - var color={ - black:player.countCards('h',function(card){ - return get.color(card)=='red'&&get.value(card)<8; - }), - red:player.countCards('h',function(card){ - return get.color(card)=='black'&&get.value(card)<8; - }) - }; - player.chooseToDiscard(get.prompt2('nsduijue')).set('ai',function(card){ - var num=_status.event.color[get.color(card)]; - if(_status.event.goon&&num>=1){ - return 7+num-get.value(card); - } - }).set('goon',game.hasPlayer(function(current){ - return get.effect(current,{name:'juedou'},player,player)>0; - })).set('color',color).set('logSkill','nsduijue'); - "step 1" - if(result.bool){ - player.addTempSkill('nsduijue_use'); - player.storage.nsduijue_use=get.color(result.cards[0]); - } - }, - subSkill:{ - use:{ - enable:'phaseUse', - viewAs:{name:'juedou'}, - usable:2, - filter:function(event,player){ - return player.hasCard(function(card){ - return get.color(card)!=player.storage.nsduijue_use; - }); - }, - filterCard:function(card,player){ - return get.color(card)!=player.storage.nsduijue_use; - }, - check:function(card){ - return 8-get.value(card); - }, - ai:{ - basic:{ - order:10 - } - } - } - } - }, - nsshuangxiong:{ - trigger:{player:'juedouBegin',target:'juedouBegin'}, - check:function(event,player){ - return player.isTurnedOver(); - }, - content:function(){ - player.turnOver(); - } - }, - nsguanyong:{ - enable:'chooseToRespond', - filterCard:true, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('h')) return false; - }, - prompt:'将一张手牌当杀打出', - check:function(card){return 7-get.value(card)}, - ai:{ - respondSha:true, - skillTagFilter:function(player,tag,arg){ - if(arg!='respond') return false; - if(!player.countCards('h')) return false; - }, - } - }, - nsjihui:{ - trigger:{global:'discardAfter'}, - filter:function(event,player){ - return event.cards.length>=3; - }, - content:function(){ - player.insertPhase(); - player.storage.nsjihui_use=_status.currentPhase; - player.addSkill('nsjihui_use'); - }, - subSkill:{ - use:{ - mark:'character', - intro:{ - content:'使用牌只能指定自己与$为目标' - }, - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='nsjihui'; - }, - onremove:true, - content:function(){ - player.removeSkill('nsjihui_use'); - }, - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target&&player.storage.nsjihui_use!=target) return false; - } - } - } - } - }, - nsmouyun:{ - enable:'phaseUse', - round:2, - filterTarget:function(card,player,target){ - return target.isMinHp()&&target!=player&&target.isDamaged(); - }, - content:function(){ - if(target.isDamaged()){ - player.discardPlayerCard(target,'hej',target.maxHp-target.hp,true); - } - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - return target.hp-target.maxHp; - } - } - } - }, - nscongjun:{ - forbid:['guozhan'], - unique:true, - forceunique:true, - init:function(player){ - if(player.storage.nscongjun_show) return false; - var change=function(target){ - if(target==player){ - var list; - if(_status.connectMode){ - list=get.charactersOL(function(i){ - return lib.character[i][0]!='male'; - }); - } - else{ - list=get.gainableCharacters(function(info){ - return info[0]=='male'; - }); - } - var name=list.randomGet(); - target.reinit('ns_huamulan',name,'nosmooth'); - target.storage.nscongjun_show=name; - target.addSkill('nscongjun_show'); - player._inits.remove(change); - player.hp=player.maxHp; - player.update(); - } - } - if(!player._inits){ - player._inits=[]; - } - player._inits.push(change); - }, - subSkill:{ - show:{ - trigger:{global:'useCard'}, - filter:function(event,player){ - return player.getEnemies().contains(event.player)&&event.card.name=='wuxie'&&event.getRand()<0.1; - }, - direct:true, - skillAnimation:true, - animationColor:'thunder', - content:function(){ - 'step 0' - game.delay(0.5); - 'step 1' - player.reinit(player.storage.nscongjun_show,'ns_huamulan','nosmooth'); - player.logSkill('nscongjun_show'); - 'step 2' - player.removeSkill('nscongjun_show'); - player.line(trigger.player,'green'); - trigger.player.damage(2); - } - } - } - }, - nstaiping:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return !event.nshuanxian&&player.getSubPlayers('nshuanxian').length; - }, - direct:true, - priority:-0.1, - ai:{ - maixie:true, - maixie_hp:true - }, - content:function(){ - 'step 0' - event.num=trigger.num; - 'step 1' - var left=player.storage.nshuanxian_left; - var right=player.storage.nshuanxian_right; - var list=[]; - var choice=0; - var hpleft=0; - var maxleft=0; - if(left&&player.hasSkill(left)){ - if(player.storage[left].hp1){ - event.num--; - event.goto(1); - } - } - }, - nsshoudao:{ - group:['nsshoudao_gain','nsshoudao_die'], - subSkill:{ - gain:{ - trigger:{player:'subPlayerDie'}, - forced:true, - filter:function(event,player){ - var left=player.storage.nshuanxian_left; - if(left&&player.hasSkill(left)) return false; - var right=player.storage.nshuanxian_right; - if(right&&player.hasSkill(right)) return false; - if(!player.storage.nshuanxian_damage) return false; - return true; - }, - content:function(){ - player.addSkill('releiji'); - player.addSkill('guidao'); - } - }, - die:{ - trigger:{player:'dieBegin'}, - direct:true, - filter:function(event,player){ - if(game.countPlayer()<=2) return false; - var left=player.storage.nshuanxian_left; - if(left&&player.hasSkill(left)) return true; - var right=player.storage.nshuanxian_right; - if(right&&player.hasSkill(right)) return true; - return false; - }, - content:function(){ - 'step 0' - var str; - var left=player.storage.nshuanxian_left; - var right=player.storage.nshuanxian_right; - if(left&&player.hasSkill(left)&&right&&player.hasSkill(right)){ - str='令一名其他角色获得技能【雷击】和【鬼道】'; - } - else{ - str='令一名其他角色获得技能【雷击】或【鬼道】'; - } - if(trigger.source){ - str+='('+get.translation(trigger.source)+'除外)'; - } - player.chooseTarget(function(card,player,target){ - return target!=player&&target!=_status.event.source; - },get.prompt('nsshoudao')).set('ai',function(target){ - if(target.hasSkill('releiji')) return 0; - return get.attitude(_status.event.player,target); - }).set('source',trigger.source).set('prompt2',str); - 'step 1' - var goon=false; - if(result.bool){ - var target=result.targets[0]; - player.logSkill('nsshoudao',target); - var left=player.storage.nshuanxian_left; - var right=player.storage.nshuanxian_right; - if(left&&player.hasSkill(left)&&right&&player.hasSkill(right)){ - target.addSkillLog('releiji'); - target.addSkillLog('guidao'); - } - else{ - event.target=target; - player.chooseControl('releiji','guidao').set('prompt','令'+get.translation(target)+'获得一项技能'); - goon=true; - } - } - if(!goon){ - event.finish(); - } - 'step 2' - event.target.addSkillLog(result.control); - } - } - } - }, - nshuanxian:{ - trigger:{global:'gameStart',player:'enterGame'}, - forced:true, - nosub:true, - unique:true, - group:['nshuanxian_left','nshuanxian_right','nshuanxian_damage','nshuanxian_swap','nshuanxian_draw'], - content:function(){ - player.storage.nshuanxian_right=player.addSubPlayer({ - name:'ns_nanhua_right', - skills:['nshuanxian_left','nshuanxian_draw','nshuanxian_swap'], - hp:2, - maxHp:2, - hs:get.cards(2), - skill:'nshuanxian', - intro:'你的本体回合结束后,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的下家的准备阶段,切换至此随从', - intro2:'当前回合结束后切换回本体', - onremove:function(player){ - delete player.storage.nshuanxian_right; - } - }); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(!target.hasFriend()) return; - if(target.hp<=2) return; - if(!target.storage.nshuanxian_damage){ - if(get.attitude(player,target)<0||get.tag(card,'multineg')) return [0,1]; - return [1,1]; - } - } - } - } - }, - // mod:{ - // globalFrom:function(from,to,distance){ - // - // }, - // globalTo:function(from,to,distance){ - // - // } - // }, - // global:'nshuanxian_choose', - subSkill:{ - chosen:{}, - leftdist:{ - mod:{ - globalFrom:function(from,to,distance){ - - }, - globalTo:function(from,to,distance){ - - } - } - }, - rightdist:{ - mod:{ - globalFrom:function(from,to,distance){ - - }, - globalTo:function(from,to,distance){ - - } - } - }, - swap:{ - trigger:{global:'phaseBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player!=player; - }, - priority:20, - content:function(){ - var next=player.getNext(); - var prev=player.getPrevious(); - var left=player.storage.nshuanxian_left; - var right=player.storage.nshuanxian_right; - if(prev==next||(trigger.player!=next&&trigger.player!=prev)){ - if(player.hasSkill('subplayer')){ - player.exitSubPlayer(); - } - } - else if(prev==trigger.player&&player.name!=left&&left){ - if(!player.hasSkill('subplayer')){ - player.callSubPlayer(left); - } - else{ - player.toggleSubPlayer(left); - } - } - else if(next==trigger.player&&player.name!=right&&right){ - if(!player.hasSkill('subplayer')){ - player.callSubPlayer(right); - } - else{ - player.toggleSubPlayer(right); - } - } - } - }, - damage:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - return !player.storage.nshuanxian_damage; - }, - content:function(){ - player.storage.nshuanxian_damage=true; - player.storage.nshuanxian_left=player.addSubPlayer({ - name:'ns_nanhua_left', - skills:['nshuanxian_middle','nshuanxian_draw','nshuanxian_swap'], - hp:2, - maxHp:2, - hs:get.cards(2), - skill:'nshuanxian', - intro:'你的本体回合开始前,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的上家的准备阶段,切换至此随从', - intro2:'当前回合结束后切换回本体', - onremove:function(player){ - delete player.storage.nshuanxian_left; - } - }); - trigger.nshuanxian=true; - } - }, - draw:{ - trigger:{player:'phaseDrawBegin'}, - silent:true, - filter:function(event){ - return event.num>0; - }, - content:function(){ - trigger.num--; - } - }, - left:{ - trigger:{player:'phaseBefore'}, - forced:true, - popup:false, - priority:40, - filter:function(event,player){ - if(event.skill=='nshuanxian_middle') return false; - if(event.skill=='nshuanxian_right') return false; - var left=player.storage.nshuanxian_left; - if(player.hasSkill('subplayer')){ - if(!left) return player.name==player.storage.nshuanxian_right; - return player.storage.subplayer.skills.contains(left); - } - else{ - if(!left) return false; - return player.hasSkill(left); - } - }, - content:function(){ - if(player.hasSkill('subplayer')){ - var left=player.storage.nshuanxian_left; - if(left&&player.storage.subplayer.skills.contains(left)){ - player.toggleSubPlayer(player.storage.nshuanxian_left); - } - else{ - player.exitSubPlayer(); - } - } - else{ - player.callSubPlayer(player.storage.nshuanxian_left); - } - } - }, - middle:{ - trigger:{player:['phaseAfter','phaseCancelled']}, - forced:true, - popup:false, - priority:-40, - filter:function(event,player){ - if(player.hasSkill('nshuanxian_chosen')) return false; - return true; - }, - content:function(){ - player.exitSubPlayer(); - player.insertPhase(null,true); - } - }, - right:{ - trigger:{player:['phaseAfter','phaseCancelled']}, - forced:true, - popup:false, - priority:-40, - filter:function(event,player){ - if(player.hasSkill('nshuanxian_chosen')) return false; - if(player.hasSkill('subplayer')) return false; - var right=player.storage.nshuanxian_right; - if(!right) return false; - return player.hasSkill(right); - }, - content:function(){ - player.callSubPlayer(player.storage.nshuanxian_right); - player.insertPhase(null,true); - player.addTempSkill('nshuanxian_chosen',['phaseBegin','phaseCancelled']); - } - }, - end:{ - trigger:{player:['phaseAfter','phaseCancelled']}, - forced:true, - popup:false, - priority:-40, - filter:function(event,player){ - if(player.hasSkill('nshuanxian_chosen')) return false; - return true; - }, - content:function(){ - if(player.hasSkill('subplayer')){ - player.exitSubPlayer(); - } - }, - content_old:function(){ - 'step 0' - var controls=['本体']; - var left=player.storage.nshuanxian_left; - var right=player.storage.nshuanxian_right; - if(player.hasSkill('subplayer')){ - if(player.storage.subplayer.skills.contains(left)){ - controls.unshift('幻身·左'); - } - if(player.storage.subplayer.skills.contains(right)){ - controls.push('幻身·右'); - } - } - else{ - if(player.hasSkill(left)){ - controls.unshift('幻身·左'); - } - if(player.hasSkill(right)){ - controls.push('幻身·右'); - } - } - if(controls.length>1){ - player.chooseControl(controls,function(event,player){ - return Math.floor(Math.random()*_status.event.num); - }).set('prompt','选择一个形态直到下一回合开始').set('num',controls.length); - } - else{ - event.finish(); - } - 'step 1' - switch(result.control){ - case '幻身·左':{ - if(!player.hasSkill('subplayer')){ - player.callSubPlayer(player.storage.nshuanxian_left); - } - else{ - player.toggleSubPlayer(player.storage.nshuanxian_left); - } - break; - } - case '幻身·右':{ - if(!player.hasSkill('subplayer')){ - player.callSubPlayer(player.storage.nshuanxian_right); - } - break; - } - default:{ - if(player.hasSkill('subplayer')){ - player.exitSubPlayer(); - } - break; - } - } - player.addTempSkill('nshuanxian_chosen','phaseBegin'); - } - } - } - }, - nsnongquan:{ - enable:'phaseUse', - // usable:4, - filter:function(event,player){ - return player.countCards('h')==1&&player.canUse('wuzhong',player); - }, - direct:true, - delay:0, - content:function(){ - player.useCard({name:'wuzhong'},player.getCards('h'),player,'nsnongquan'); - }, - ai:{ - order:10, - result:{ - player:function(player,target){ - return 10-get.value(player.getCards('h')[0]); - } - } - } - }, - nsdufu:{ - trigger:{source:'damageBefore'}, - check:function(event,player){ - return event.player.hasSkillTag('maixie'); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('nsdufu'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - if(_status.event.bool){ - return -get.attitude(_status.event.player,target); - } - return 0; - }).set('bool',trigger.player.hasSkillTag('maixie_defend')); - 'step 1' - if(result.bool){ - player.logSkill('nsdufu',result.targets); - trigger.source=result.targets[0]; - } - } - }, - diyjizhi:{ - audio:2, - usable:3, - trigger:{player:'useCard'}, - frequent:true, - filter:function(event){ - var type=get.type(event.card,'trick'); - return (type=='trick'||type=='equip')&&event.card.isCard; - }, - content:function(){ - "step 0" - var cards=get.cards(); - player.gain(cards,'gain2','log'); - if(get.type(cards[0])!='basic'){ - event.finish(); - } - "step 1" - player.chooseToDiscard('h',true); - }, - ai:{ - threaten:1.4 - } - }, - yiesheng:{ - enable:'phaseUse', - filterCard:{color:'black'}, - filter:function(event,player){ - return player.countCards('h',{color:'black'})>0; - }, - selectCard:[1,Infinity], - prompt:'弃置任意张黑色手牌并摸等量的牌', - check:function(card){return 5-get.value(card)}, - content:function(){ - player.draw(cards.length); - }, - ai:{ - order:1, - result:{ - player:1 - }, - }, - }, - liangji:{ - audio:["liangji",2], - enable:"phaseUse", - usable:1, - filterTarget:function (card,player,target){ - return target!=player&&!target.hasSkill('liangji_1'); - }, - content:function (){ - 'step 0' - player.chooseCard('h','环计:将1张牌置于'+get.translation(target)+'的武将牌上',true).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 7-get.value(card); - } - return -get.value(card); - }); - 'step 1' - if(result.bool){ - player.$give(result.cards,target); - player.lose(result.cards,ui.special); - target.storage.liangji_1=result.cards; - target.storage.liangji_1_source=target; - target.syncStorage('liangji_1'); - target.addSkill('liangji_1'); - } - }, - ai:{ - order:1, - result:{ - target:function (player,target){ - if(get.attitude(player,target)>0){ - return Math.sqrt(target.countCards('he')); - } - return 0; - }, - player:1, - }, - }, - subSkill:{ - "1":{ - trigger:{ - player:"phaseDrawBegin", - }, - forced:true, - mark:true, - intro:{ - content:"cards", - }, - content:function (){ - 'step 0' - var cards=player.storage.liangji_1; - if(cards){ - player.gain(cards,'gain2'); - } - player.storage.liangji_1=0; - 'step 1' - if(player.sex=='male')player.addTempSkill('wushuang'); - if(player.sex=='female')player.addTempSkill('lijian'); - player.removeSkill('liangji_1'); - }, - sub:true, - }, - }, - }, - jugong:{ - audio:["jingong",2], - trigger:{ - global:"damageEnd", - }, - usable:1, - frequent:true, - locked:false, - notemp:true, - marktext:"功", - init:function (player){ - player.storage.jugong=[]; - }, - filter:function (event,player){ - return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink() - &&_status.currentPhase!=player; - }, - content:function (){ - "step 0" - player.draw(); - "step 1" - if(player.countCards('h')){ - player.chooseCard('将'+get.cnNumber(1)+'张手牌置于武将牌上作为“功”',1,true); - } - else{ - event.finish(); - } - "step 2" - if(result.cards&&result.cards.length){ - player.lose(result.cards,ui.special); - player.storage.jugong=player.storage.jugong.concat(result.cards); - player.syncStorage('jugong'); - player.markSkill('jugong'); - game.log(player,'将',result.cards,'置于武将牌上作为“功”'); - } - }, - intro:{ - content:"cards", - }, - group:"jugong_1", - subSkill:{ - "1":{ - trigger:{ - player:"damageBegin", - }, - filter:function (event,player){ - return player.storage.jugong.length>1; - }, - content:function (){ - "step 0" - player.chooseCardButton('移去两张“功”',2,player.storage.jugong,true); - "step 1" - if(event.directresult||result.bool){ - player.logSkill('jugong'); - var links=event.directresult||result.links; - for(var i=0;i=4) return [0.5,get.tag(card,'damage')*2]; - if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==3) return [0.5,get.tag(card,'damage')*0.2]; - if(target.hp==2) return [0.1,get.tag(card,'damage')*0.1]; - } - }, - }, - }, - }, - chengmou:{ - audio:["moucheng",2], - trigger:{ - player:"phaseDrawBegin", - }, - frequent:true, - filter:function (event,player){ - return player.storage.jugong.length>0; - }, - content:function (){ - 'step 0' - if(player.storage.jugong.length>2) player.loseHp(); - 'step 1' - var cards=player.storage.jugong; - if(cards){ - player.gain(cards,'gain2'); - } - player.storage.jugong=[]; - 'step 2' - trigger.cancel(); - }, - }, - nsxinsheng:{ - trigger:{source:'damageEnd'}, - frequent:true, - filter:function(event,player){ - return player.isHealthy(); - }, - content:function(){ - player.gainMaxHp(trigger.num,true); - player.draw(trigger.num); - } - }, - nsdunxing:{ - trigger:{player:'damageBefore'}, - filter:function(event,player){ - return player.isDamaged(); - }, - content:function(){ - trigger.cancel(); - player.loseMaxHp(trigger.num,true); - player.draw(trigger.num); - } - }, - liangce:{ - enable:'phaseUse', - viewAs:{name:'wugu'}, - usable:1, - filterCard:{type:'basic'}, - filter:function(event,player){ - return player.countCards('h',{type:'basic'})>0; - }, - check:function(card){ - return 6-get.value(card); - }, - group:'liangce2' - }, - liangce2:{ - trigger:{global:'wuguRemained'}, - direct:true, - filter:function(event){ - return event.remained.length>0; - }, - content:function(){ - 'step 0' - var du=0; - for(var i=0;i=trigger.remained.length/2) return -att; - return att; - }); - 'step 1' - if(result.bool){ - player.logSkill('liangce',result.targets); - result.targets[0].gain(trigger.remained.slice(0),'gain2','log'); - trigger.remained.length=0; - } - } - }, - jianbi:{ - trigger:{global:'useCard'}, - priority:5, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - if(get.info(event.card).multitarget) return false; - if(event.targets.length<2) return false; - if(!event.targets.contains(player)) return false; - return true; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('jianbi'), - [1,1],function(card,player,target){ - return _status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var eff=-get.effect(target,trigger.card,trigger.player,_status.event.player); - if(trigger.card.name=='wugu'&&eff==0&&get.attitude(player,target)<0){ - return 0.01; - } - return eff; - }); - "step 1" - if(result.bool){ - event.targets=result.targets; - if(event.isMine()){ - player.logSkill('jianbi',event.targets); - event.finish(); - } - for(var i=0;i0; - }, - position:'he', - filterCard:{type:'equip'}, - check:function(card){ - var player=_status.event.player; - var he=player.getCards('he'); - var subtype=get.subtype(card); - var value=get.equipValue(card); - for(var i=0;i=value){ - return 10; - } - } - if(!player.needsToDiscard()){ - return 4-get.equipValue(card); - } - return 0; - }, - content:function(){ - player.draw(); - }, - discard:false, - prompt:'将一张装备牌置入弃牌堆并摸一张牌', - delay:0.5, - loseTo:'discardPile', - prepare:function(cards,player){ - player.$throw(cards,1000); - game.log(player,'将',cards,'置入了弃牌堆'); - }, - ai:{ - basic:{ - order:8.5 - }, - result:{ - player:1, - }, - } - }, - choudu:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - return lib.filter.cardEnabled({name:'diaobingqianjiang'},target); - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - var list=game.filterPlayer(); - list.sortBySeat(target); - target.useCard({name:'diaobingqianjiang'},list); - }, - ai:{ - order:1, - result:{ - player:function(player,target){ - if(get.attitude(player,target)<=1) return 0; - return game.countPlayer(function(current){ - return get.effect(current,{name:'diaobingqianjiang'},target,player); - }); - } - } - } - }, - liduan:{ - trigger:{global:'gainAfter'}, - filter:function(event,player){ - if(event.player==player) return false; - if(_status.currentPhase==event.player) return false; - if(event.cards.length!=1) return false; - return get.type(event.cards[0])=='equip'&&get.position(event.cards[0])=='h'&&event.player.hasUseTarget(event.cards[0]); - }, - logTarget:'player', - check:function(event,player){ - var att=get.attitude(player,event.player); - var subtype=get.subtype(event.cards[0]); - if(att>0){ - if(event.player.countCards('h')>=player.countCards('h')+2) return true; - return event.player.countCards('e',{subtype:subtype})==0; - } - else{ - return event.player.countCards('e',{subtype:subtype})>0; - } - }, - content:function(){ - 'step 0' - var bool=false; - var subtype=get.subtype(trigger.cards[0]); - var current=trigger.player.getEquip('e',parseInt(subtype[5])); - var att=get.attitude(trigger.player,player); - if(current){ - if(att>0){ - bool=true; - } - else{ - if(get.equipValue(current)>get.equipValue(trigger.cards[0])){ - bool=true; - } - } - } - trigger.player.chooseCard('立断').set('prompt2','将一张手牌交给'+get.translation(player)+',或取消并使用'+get.translation(trigger.cards)).ai=function(card){ - if(bool){ - if(att>0){ - return 8-get.value(card); - } - else{ - return 4-get.value(card); - } - } - else{ - if(att<=0) return -get.value(card); - return 0; - } - } - 'step 1' - if(result.bool){ - player.gain(result.cards,trigger.player); - trigger.player.$give(1,player); - } - else{ - trigger.player.chooseUseTarget(trigger.cards[0],true); - } - } - }, - jinyan:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardUsable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardRespondable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardSavable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - }, - enable:['chooseToUse','chooseToRespond'], - filterCard:function(card){ - return get.type(card,'trick')=='trick'&&get.color(card)=='black'; - }, - viewAsFilter:function(player){ - if(player.hp>2) return false; - if(!player.hasCard(function(card){ - return get.type(card,'trick')=='trick'&&get.color(card)=='black'; - })) return false; - }, - viewAs:{name:'sha'}, - prompt:'将一张黑色锦囊牌当作杀使用或打出', - check:function(){return 1}, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - if(player.hp>2) return false; - if(!player.hasCard(function(card){ - return get.type(card,'trick')=='trick'&&get.color(card)=='black'; - })) return false; - } - } - }, - fuchou:{ - trigger:{target:'shaBefore'}, - filter:function(event,player){ - return player.countCards('he')>0; - }, - direct:true, - content:function(){ - 'step 0' - var bool=false; - if(!player.hasShan()&&get.effect(player,trigger.card,trigger.player,player)<0){ - bool=true; - } - player.chooseCard('he',get.prompt('fuchou',trigger.player)).set('ai',function(card){ - var player=_status.event.player; - if(bool){ - if(player.hp<=1){ - if(get.tag(card,'save')) return 0; - return 8-get.value(card); - } - return 6-get.value(card); - } - return -get.value(card); - }); - 'step 1' - if(result.bool){ - trigger.cancel(); - player.logSkill('fuchou',trigger.player); - trigger.player.gain(result.cards,player); - if(get.position(result.cards[0])=='h'){ - player.$give(1,trigger.player); - } - else{ - player.$give(result.cards,trigger.player); - } - player.storage.fuchou2.add(trigger.player); - } - }, - group:'fuchou2' - }, - fuchou2:{ - init:function(player){ - player.storage.fuchou2=[]; - }, - forced:true, - trigger:{global:'phaseAfter'}, - filter:function(event,player){ - for(var i=0;i0); - var next=player.chooseToDiscard('he',{type:'equip'},get.prompt('youzhan',trigger.target)); - next.ai=function(card){ - if(bool){ - return 7-get.value(card); - } - return 0; - }; - next.logSkill=['youzhan',trigger.target]; - 'step 1' - if(result.bool){ - event.youdiinfo={ - source:trigger.player, - evt:trigger - } - trigger.target.useCard({name:'youdishenru'}); - } - } - }, - kangyin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - player.discardPlayerCard(target,true); - 'step 2' - if(player.isDamaged()&&result.links&&result.links.length){ - if(get.type(result.links[0])=='basic'){ - player.chooseTarget([1,player.maxHp-player.hp], - '选择至多'+get.cnNumber(player.maxHp-player.hp)+'名角色各摸一张牌').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - } - else{ - player.storage.kangyin2=player.maxHp-player.hp; - player.addTempSkill('kangyin2'); - event.finish(); - } - } - else{ - event.finish(); - } - 'step 3' - if(result.targets&&result.targets.length){ - result.targets.sort(lib.sort.seat); - player.line(result.targets,'green'); - game.asyncDraw(result.targets); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(player.hp>=4) return -1; - if(player.hp==3&&!player.needsToDiscard()) return -1; - return 0; - } - } - } - }, - kangyin2:{ - mark:true, - intro:{ - content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#' - }, - onremove:true, - mod:{ - globalFrom:function(from,to,distance){ - return distance-from.storage.kangyin2; - }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]+=player.storage.kangyin2; - }, - } - }, - duoqi:{ - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(_status.currentPhase==player) return false; - if(!player.storage.zhucheng||!player.storage.zhucheng.length) return false; - var evt=event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse') return true; - return false; - }, - direct:true, - content:function(){ - 'step 0' - var bool=false; - if(get.attitude(player,trigger.player)<0&&trigger.player.needsToDiscard()){ - bool=true; - } - player.chooseCardButton(get.prompt('zhucheng',_status.currentPhase),player.storage.zhucheng).set('ai',function(button){ - return _status.event.bool?1:0; - }).set('bool',bool); - 'step 1' - if(result.bool){ - player.logSkill('zhucheng',_status.currentPhase); - player.$throw(result.links[0]); - player.storage.zhucheng.remove(result.links[0]); - result.links[0].discard(); - player.syncStorage('zhucheng'); - if(player.storage.zhucheng.length==0){ - player.unmarkSkill('zhucheng'); - } - else{ - player.updateMarks(); - } - var evt=trigger.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - } - }, - ai:{ - expose:0.2 - } - }, - zhucheng:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - return !player.storage.zhucheng||!player.storage.zhucheng.length; - }, - check:function(event,player){ - if(player.storage.zhucheng&&player.storage.zhucheng.length){ - if(!player.hasShan()) return false; - if(player.storage.zhucheng.length>=2) return false; - } - return true; - }, - intro:{ - content:'cards' - }, - content:function(){ - if(player.storage.zhucheng&&player.storage.zhucheng.length){ - player.gain(player.storage.zhucheng,'gain2'); - delete player.storage.zhucheng; - player.unmarkSkill('zhucheng'); - } - else{ - var cards=get.cards(Math.max(1,player.maxHp-player.hp)); - player.$gain2(cards); - player.storage.zhucheng=cards; - player.markSkill('zhucheng'); - } - }, - ai:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&player.storage.zhucheng&&player.storage.zhucheng.length){ - if(player.storage.zhucheng.length>=2){ - if(!player.hasFriend()&&player.countCards('he')-20; - }, - content:function(){ - 'step 0' - var bool=false; - if(get.effect(player,trigger.card,trigger.player,trigger.player)>=0){ - bool=true; - } - var num=player.storage.zhucheng.length; - trigger.player.chooseToDiscard('弃置'+get.cnNumber(num)+'张牌,或令杀无效','he',num).set('ai',function(card){ - if(_status.event.bool){ - return 10-get.value(card); - } - return 0; - }).set('bool',bool); - 'step 1' - if(!result.bool){ - trigger.cancel(); - } - } - }, - diy_jiaoxia:{ - audio:['jiaoxia',2], - trigger:{target:'useCardToBegin'}, - filter:function(event,player){ - return event.card&&get.color(event.card)=='red'; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:function(card,player,target){ - if(get.color(card)=='red') return [1,1]; - }, - } - }, - zaiqix:{ - trigger:{player:'phaseDrawBefore'}, - filter:function(event,player){ - return player.hp=2; - } - return true; - }, - content:function(){ - "step 0" - trigger.cancel(); - event.cards=get.cards(player.maxHp-player.hp+1); - player.showCards(event.cards); - "step 1" - var num=0; - for(var i=0;i=player.maxHp-1) return [0,0]; - } - } - } - }, - diykuanggu:{ - trigger:{source:'damageEnd'}, - forced:true, - content:function(){ - if(get.distance(trigger.player,player,'attack')>1){ - player.draw(trigger.num); - } - else{ - player.recover(trigger.num); - } - } - }, - diyduanliang:{ - group:['diyduanliang1','diyduanliang2'], - ai:{ - threaten:1.2 - } - }, - diyduanliang1:{ - enable:'phaseUse', - usable:1, - discard:false, - filter:function(event,player){ - var cards=player.getCards('he',{color:'black'}); - for(var i=0;i0) return false; - }, - save:true, - result:{ - player:4, - target:function(player,target){ - if(target.hp==target.maxHp) return 2; - return 4; - } - }, - threaten:function(player,target){ - if(!target.storage.guihan) return 0.8; - } - } - }, - luweiyan:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.type(card)!='basic'; - }, - position:'he', - filter:function(event,player){ - return player.hasCard(function(card){ - return get.type(card)!='basic'; - },'he'); - }, - viewAs:{name:'shuiyanqijun'}, - prompt:'将一张非基本牌当水淹七军使用', - check:function(card){return 8-get.value(card)}, - group:'luweiyan2' - }, - luweiyan2:{ - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - if(event.skill!='luweiyan') return false; - for(var i=0;i0; - }, - content:function(){ - trigger.source.discard(trigger.source.getCards('he',{color:'red'})); - }, - ai:{ - expose:0.1, - result:{ - threaten:0.8, - target:function(card,player,target){ - if(get.tag(card,'damage')&&get.attitude(target,player)<0){ - return [1,0,0,-player.countCards('he',{color:'red'})]; - } - } - } - } - }, - diyguhuo:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.countCards('hej')>0; - }, - content:function(){ - "step 0" - player.draw(2); - "step 1" - var next=player.discardPlayerCard(player,'hej',2,true); - next.ai=function(button){ - if(get.position(button.link)=='j') return 10; - return -get.value(button.link); - }; - next.filterButton=function(button){ - return lib.filter.cardDiscardable(button.link,player); - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)=='delay') return [0,0.5]; - } - } - } - }, - diychanyuan:{ - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source!=undefined; - }, - content:function(){ - trigger.source.loseMaxHp(true); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 0.2; - }, - result:{ - target:function(card,player,target,current){ - if(target.hp<=1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-5]; - return [1,0,0,-2]; - } - } - } - } - }, - zonghuo:{ - trigger:{source:'damageBefore'}, - direct:true, - priority:10, - filter:function(event){ - return event.nature!='fire'; - }, - content:function(){ - "step 0" - player.chooseToDiscard(get.prompt('zonghuo')).ai=function(card){ - var att=get.attitude(player,trigger.player); - if(trigger.player.hasSkillTag('nofire')){ - if(att>0) return 8-get.value(card); - return -1; - } - if(att<0){ - return 7-get.value(card); - } - return -1; - } - "step 1" - if(result.bool){ - player.logSkill('zonghuo',trigger.player,'fire'); - trigger.nature='fire'; - } - } - }, - shaoying:{ - trigger:{source:'damageAfter'}, - direct:true, - filter:function(event){ - return event.nature=='fire'; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ - return get.distance(trigger.player,target)<=1&&trigger.player!=target; - }).ai=function(target){ - return get.damageEffect(target,player,player,'fire'); - } - "step 1" - if(result.bool){ - var card=get.cards()[0]; - card.discard(); - player.showCards(card); - event.bool=get.color(card)=='red'; - event.target=result.targets[0]; - player.logSkill('shaoying',event.target,false); - trigger.player.line(event.target,'fire'); - } - else{ - event.finish(); - } - "step 2" - if(event.bool){ - event.target.damage('fire'); - } - } - }, - tiangong:{ - group:['tiangong2'], - trigger:{player:'damageBefore'}, - filter:function(event){ - if(event.nature=='thunder') return true; - }, - forced:true, - content:function(){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='tiesuo') return 0; - if(get.tag(card,'thunderDamage')) return 0; - } - }, - threaten:0.5 - } - }, - tiangong2:{ - trigger:{source:'damageAfter'}, - filter:function(event){ - if(event.nature=='thunder') return true; - }, - forced:true, - popup:false, - priority:1, - content:function(){ - player.draw(); - }, - }, - xicai:{ - inherit:'jianxiong' - }, - diyjianxiong:{ - mode:['identity'], - trigger:{global:'dieBefore'}, - forced:true, - filter:function(event,player){ - return event.player!=game.zhu&&_status.currentPhase==player; - }, - content:function(){ - trigger.player.identity='fan'; - trigger.player.setIdentity('fan'); - trigger.player.identityShown=true; - } - }, - nsshuaiyan:{ - trigger:{global:'recoverAfter'}, - filter:function(event,player){ - return event.player!=player&&_status.currentPhase!=player; - }, - logTarget:'player', - content:function(){ - "step 0" - var att=get.attitude(trigger.player,player); - var bool=0; - if(att<0){ - if(trigger.player.countCards('e')==0&&trigger.player.countCards('h')>2) bool=1; - else if(trigger.player.countCards('he')==0) bool=1; - } - else if(att==0&&trigger.player.countCards('he')==0){ - bool=1; - } - trigger.player.chooseControl(function(){ - return _status.event.bool; - }).set('prompt','率言').set('bool',bool).set('choiceList',['令'+get.translation(player)+'摸一张牌','令'+get.translation(player)+'弃置你一张牌']); - "step 1" - if(result.control=='选项一'){ - player.draw(); - event.finish(); - } - else if(trigger.player.countCards('he')){ - player.discardPlayerCard(trigger.player,true,'he'); - } - else{ - event.finish(); - } - }, - ai:{ - threaten:1.2 - } - }, - moshou:{ - mod:{ - targetEnabled:function(card,player,target,now){ - if(card.name=='bingliang'||card.name=='lebu') return false; - } - }, - }, - siji:{ - trigger:{player:'phaseDiscardEnd'}, - frequent:true, - filter:function(event,player){ - if(event.cards){ - for(var i=0;i0; - }, - content:function(){ - var list=[]; - var players=game.filterPlayer(); - for(var i=0;i0) player.draw(list.length); - } - }, - diyqiangxi:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.subtype(card)=='equip1'; - }, - selectCard:[0,1], - filterTarget:function(card,player,target){ - if(player==target) return false; - return get.distance(player,target,'attack')<=1; - }, - content:function(){ - "step 0" - if(cards.length==0){ - player.loseHp(); - } - "step 1" - target.damage(); - "step 2" - if(target.isAlive()&&target.countCards('he')){ - player.discardPlayerCard(target); - } - }, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - ai:{ - order:8, - result:{ - player:function(player,target){ - if(ui.selected.cards.length) return 0; - if(player.hp>=target.hp) return -0.9; - if(player.hp<=2) return -10; - return -2; - }, - target:function(player,target){ - if(player.hp<=1) return 0; - return get.damageEffect(target,player); - } - } - }, - threaten:1.3 - }, - }, - translate:{ - diy_liufu:'刘馥', - diy_xizhenxihong:'习珍习宏', - diy_liuzan:'留赞', - diy_zaozhirenjun:'枣祗任峻', - diy_yangyi:'杨仪', - diy_tianyu:'田豫', - - // diy_caocao:'曹操', - diy_menghuo:'孟获', - diy_huangzhong:'黄汉升', - diy_xuhuang:'徐公明', - diy_dianwei:'新典韦', - diy_weiyan:'魏文长', - xicai:'惜才', - diyjianxiong:'奸雄', - diy_feishi:'费诗', - nsshuaiyan:'率言', - moshou:'墨守', - diy_hanlong:'韩龙', - diy_luxun:'陆伯言', - diy_yuji:'于吉', - diy_zhouyu:'周公瑾', - diy_lukang:'陆抗', - diy_caiwenji:'蔡昭姬', - diy_zhenji:'甄宓', - - ns_zuoci:'左慈', - ns_wangyun:'王允', - ns_lvzhi:'吕后', - ns_nanhua:'南华', - ns_nanhua_left:'幻身·左', - ns_nanhua_right:'幻身·右', - ns_huamulan:'SP花木兰', - ns_huangzu:'黄祖', - ns_yanliang:'颜良', - ns_wenchou:'文丑', - ns_jinke:'荆轲', - - ns_caocao:'曹操', - ns_zhugeliang:'诸葛亮', - ns_wangyue:'王越', - ns_yuji:'于吉', - ns_caocaosp:'SP曹操', - ns_xinxianying:'辛宪英', - ns_sunjian:'孙坚', - ns_simazhao:'司马昭', - ns_guanlu:'管辂', - - ns_duangui:'段珪', - ns_shenpei:'审配', - ns_zhangbao:'张宝', - ns_masu:'马谡', - ns_zhangxiu:'张绣', - ns_lvmeng:'吕蒙', - - ns_yujisp:'于吉', - ns_lisu:'李肃', - ns_yangyi:'杨仪', - ns_liuzhang:'刘璋', - ns_xinnanhua:'南华老仙', - - key_lucia:'此花露西娅', - key_kyousuke:'枣恭介', - key_yuri:'仲村由理', - key_haruko:'神尾晴子', - key_umi:'加藤うみ', - key_umi2:'鹰原羽未', - key_rei:'零', - key_komari:'神北小毬', - key_yukine:'宫泽有纪宁', - key_yusa:'西森柚咲', - key_misa:'黑羽美砂', - key_masato:'井之原真人', - key_iwasawa:'岩泽雅美', - key_kengo:'宫泽谦吾', - key_yoshino:'吉野晴彦', - key_yui:'由依', - key_tsumugi:'紬文德斯', - key_saya:'朱鹭户沙耶', - key_harukakanata:'三枝叶留佳&二木佳奈多', - key_harukakanata_ab:'三枝二木', - key_inari:'稻荷', - key_shiina:'椎名', - key_sunohara:'春原阳平&春原芽衣', - key_sunohara_ab:'阳平芽衣', - //该武将国战模式下不可用 - key_rin:'枣铃', - key_sasami:'笹濑川佐佐美', - key_akane:'千里朱音', - key_doruji:'多鲁基', - key_yuiko:'来谷唯湖', - key_riki:'直枝理树'/*+'子'*/, - key_hisako:'久子', - key_hinata:'日向秀树', - key_noda:'野田', - key_tomoya:'冈崎朋也', - key_nagisa:'古河渚', - key_ayato:'直井文人', - key_ao:'空门苍', - key_yuzuru:'音无结弦', - sp_key_kanade:'SP立华奏', - key_mio:'西园美鱼', - key_midori:'西园美鸟', - key_kyoko:'岬镜子', - key_shizuru:'中津静流', - key_shiorimiyuki:'关根诗织&入江美雪', - key_shiorimiyuki_ab:'关根入江', - key_miki:'野村美希', - lucia_duqu:'毒躯', - lucia_duqu_info:'锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你和对方各获得一张花色点数随机的【毒】。
②当你因【毒】失去体力时,你改为回复等量的体力。
③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。', - lucia_zhenren:'振刃', - lucia_zhenren_info:'锁定技,每个结束阶段,若你的装备区内有牌,则你弃置之。然后,你依次弃置场上的X张牌。(X为你以此法弃置的牌数)', - nk_shekong:'设控', - nk_shekong_info:'出牌阶段限一次,你可以弃置任意张手牌并选择一名其他角色(不能超过该角色的牌数),然后令其选择一项:弃置一张牌并令你摸X张牌,或弃置X张牌并令你摸一张牌。然后,你将你与其弃置的且位于弃牌堆中的牌以任意顺序置于牌堆顶。', - key_huanjie:'幻界', - key_huanjie_info:'锁定技,当你进行判定或摸牌时,你改为从牌堆的另一端获取相应的牌。', - yuri_xingdong:'行动', - yuri_xingdong_info:'锁定技,出牌阶段开始时,你获得一张【杀】或普通锦囊牌。出牌阶段限一次,你可以将一张【杀】或普通锦囊牌交给一名其他角色,然后该角色选择一项:对除你以外的角色使用此牌并在此牌结算完成后和你各摸一张牌;或跳过下回合的判定阶段和摸牌阶段。', - //目标角色跳过阶段的同时 该回合不能发动〖整经(郑玄)〗 - yuri_wangxi:'忘隙', - yuri_wangxi_info:'主公技,限定技,当有角色因你发动的【行动】而死亡后,若其身份不为【明忠】,则其可以将身份改为忠臣并重新加入游戏,然后将势力改为与你相同,将体力值回复至2点并摸一张牌。', - haruko_haofang:'豪放', - haruko_haofang_info:'锁定技,你的延时锦囊牌视为【无中生有】。当你因执行【无中生有】的效果而摸牌时,你令摸牌数+2。', - haruko_zhuishi:'追逝', - haruko_zhuishi_info:'一名角色的判定阶段开始时,若其判定区内有牌,则你可以获得其判定区内的所有牌。若你的体力值大于1,你失去1点体力。', - umi_chaofan:'炒饭', - umi_chaofan_info:'出牌阶段限一次,你可以弃置两张花色不同的手牌并选择一名其他角色。你摸一张牌,若你的体力值:大于2,目标角色回复1点体力;等于2,目标角色摸两张牌;小于2,目标角色受到1点无来源且对应渠道为这两张牌的火焰伤害。', - umi_lunhui:'轮回', - umi_lunhui_info:'一名其他角色的回合结束时,若你的手牌数小于体力值,则你可以失去1点体力。若如此做,你摸两张牌并进行一个额外回合,且你于此回合内计算与此角色的距离视为1。', - umi_shiroha:'轮回 - 延时效果', - umi_qihuan:'七幻', - umi_qihuan_info:'限定技,当你处于濒死状态时,你可以移去此武将牌。若如此做,你回复X点体力(X为场上势力数)。然后,你可获得场上已死亡角色武将牌上的至多两个技能。', - komari_tiankou:'甜口', - komari_tiankou_info:'锁定技,当你使用红色的非伤害性基本牌/锦囊牌选择目标时,或成为其他角色使用的这些牌的目标时,你选择一项:1.摸一张牌;2.为此牌增加一个目标', - komari_xueshang:'血殇', - komari_xueshang_info:'锁定技,蓄力技,当有角色死亡时,你对自己造成1点伤害,然后对所有其他角色依次造成1点伤害。当有角色因此法进入濒死状态时,你加1点体力上限并回复1点体力,然后失去此技能并终止此技能的所有后续结算。', - yukine_wenzhou:'问咒', - yukine_wenzhou_info:'一名角色的出牌阶段开始时,其可以交给你一张牌。若如此做,你选择一项:交给其一张牌,或令其从牌堆中获得一张与此牌类型相同的牌,且其于此阶段内使用与此牌牌名相同的牌时无法被响应。', - //如果对自己发动【问咒】,则自己可以响应这些牌。但其他角色发动【问咒】时,该角色自己并不能响应 - yusa_yanyi:'演艺', - yusa_yanyi_info:'出牌阶段限一次,你可以指定至多X名与你距离不大于你的体力值的角色。这些角色选择一项:①令你摸一张牌。②回复1点体力,然后交给你一张牌。(X为你的攻击范围且至少为1)', - misa_yehuo:'业火', - misa_yehuo_info:'一名角色的摸牌阶段开始时,若其在你的攻击范围内,你可以弃置X张牌并选择一项:①对其造成1点火属性伤害。②令其于此摸牌阶段放弃摸牌。(X为你与其的的距离)', - yusa_misa:'通灵', - yusa_misa_info:'当你发动的〖演艺〗结算完成之后,你可以将武将牌翻面。', - misa_yusa:'归魂', - misa_yusa_info:'当你发动的〖业火〗结算完成后,你可以将武将牌翻面。', - masato_baoquan:'暴拳', - masato_baoquan_info:'锁定技,当你即将造成伤害时,你选择一项:1.令此伤害+2并减1点体力上限。2.防止此伤害。', - iwasawa_yinhang:'引吭', - iwasawa_yinhang_info:'锁定技,当你的体力值变化1点时,你可以令至多两名角色摸一张牌。', - iwasawa_mysong:'My Song', - iwasawa_mysong_info:'锁定技,当你即将进行濒死结算时,取消之。回合开始时,若你的体力值小于1,则你获得技能〖奋音〗直到回合结束。回合结束时,若你的体力值小于1,你死亡。', - iwasawa_fenyin:'奋音', - iwasawa_fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', - iwasawa_refenyin:'奋音', - iwasawa_refenyin_info:'锁定技,你的回合内,当一张牌进入弃牌堆后,若本回合内没有过与此牌花色相同的卡牌进入过弃牌堆,则你摸一张牌。', - //卡牌花色的计算不受【红颜】等技能的影响 - kengo_weishang:'伪伤', - key_weishang_sha:'伪伤', - key_weishang_shan:'伪伤', - kengo_weishang_info:'出牌阶段限一次,你可以废除一个装备栏并摸两张牌。若你的武器栏已废除,则你使用【杀】的次数上限+1,且当你使用【杀】指定目标后,目标角色弃置一张牌;若你的防具栏已废除,则你可以将一张牌当做【闪】使用或打出;若你的攻击/防御坐骑栏已废除,则你至其他角色的距离-1/其他角色至你的距离-1。', - kengo_guidui:'归队', - kengo_guidui_info:'锁定技,准备阶段,若你有已废除的装备栏,则你恢复这些装备栏,且本回合内发动【伪伤】时不能废除这些装备栏。', - yoshino_jueyi:'决义', - yoshino_jueyi_info:'出牌阶段开始时,你可以选择一名其他角色。你摸一张牌并与其猜拳(平局则重来)。若你赢,你对其造成1点伤害。若你没赢,你本阶段内使用牌时不能指定其为目标。', - yui_jiang:'激昂', - yui_jiang_info:'每当你使用(指定目标后)或被使用(成为目标后)一张【决斗】或红色的【杀】时,你可以摸一张牌。', - yui_lieyin:'烈音', - yui_lieyin_info:'锁定技,出牌阶段开始时,你选择一项:①本阶段内的红色牌均视为【杀】;②本阶段内的【杀】均视为【决斗】。', - yui_takaramono:'珍宝', - yui_takaramono_info:'觉醒技,准备阶段,若你满足以下条件中的至少两个:①体力值不大于1;②场上有已死亡的角色;③已因〖激昂〗累计获得过至少三张牌;则你获得技能〖引吭〗,将〖烈音〗描述中的「你选择」改为「你可选择」,然后加1点体力上限并回复1点体力。', - //ユイ/孙笨双将组合时,孙笨的【激昂】不计入【珍宝】的次数统计 - yui_yinhang:'引吭', - yui_yinhang_info:'锁定技,当你的体力值变化1点时,你可以令至多两名角色摸一张牌。', - tsumugi_mugyu:'姆啾', - tsumugi_mugyu_info:'当你成为牌的目标后,若你的手牌数小于体力上限,则你可以摸一张牌。', - tsumugi_huilang:'回廊', - tsumugi_huilang2:'回廊', - tsumugi_huilang_info:'回合结束时,你可以将任意张牌扣置于武将牌下(均称为「隐」)。回合开始时,你获得所有「隐」,然后可令等量的角色各摸一张牌。', - //〖回廊〗涉及的所有卡牌移动的结算不会触发〖良姻〗 - haruka_shuangche:'双掣', - kanata_shuangche:'双掣', - haruka_shuangche_backup:'双掣', - haruka_shuangche_info:'出牌阶段,你可以视为使用任意基本牌或普通锦囊牌。此牌结算完成后,你选择一项:1.弃置X张牌。2.失去1点体力且本回合内不能再发动〖双掣〗。(X为你于此回合内发动过〖双掣〗的次数)', - //你不能以此法使用【回魂】 - saya_shouji:'授计', - saya_shouji_info:'每回合限一次,当你使用的牌结算完成后,你可以将此牌对应的所有实体牌交给一名其他角色。其可以使用这些牌中的一张,若如此做,你摸一张牌。', - saya_powei:'破围', - saya_powei_info:'限定技,回合结束后,你可以选择一名体力值大于你的其他角色。你与其交替进行额外回合,直到你与其中的一名角色死亡或进行到九个回合。你于回合开始时进行判定,若结果为红色,则你对其造成1点伤害。此过程中其他角色不计入距离和座次计算。', - saya_judge:'破围', - saya_nodis:'破围', - //〖破围〗不会因为〖铁骑〗无效 - inari_baiwei:'摆尾', - inari_baiwei_info:'你可以将一张♦牌当做任意基本牌使用或打出。此牌结算完成后,你摸一张牌。', - //你不能以此法使用【毒】 - inari_baiwei_backup:'摆尾', - inari_baiwei_sha:'摆尾', - inari_baiwei_shan:'摆尾', - inari_huhun:'狐魂', - inari_huhun_info:'锁定技,你的♣牌的花色均视为♦。你的手牌上限+1。', - shiina_qingshen:'轻身', - shiina_qingshen_info:'当你受到或造成伤害后,你可以获得此次伤害的渠道对应的实体牌,然后将等量的武将牌置于你的武将牌上,称为「轻」。锁定技,你的手牌上限和攻击范围+X(X为「轻」数)。', - shiina_feiyan:'飞燕', - shiina_feiyan_info:'一名其他角色的回合开始时,若其在你的攻击范围内,则你可以将一张「轻」置于弃牌堆,然后视为对其使用一张【杀】。若此【杀】未造成伤害,你摸一张牌。你于此【杀】的结算流程中视为拥有技能【铁骑】。', - shiina_retieji:'铁骑', - //你不能对稻荷和多鲁基发动【飞燕】 - sunohara_chengshuang:'成双', - sunohara_chengshuang_phase:'成双', - sunohara_chengshuang_info:'锁定技,游戏开始时,你选择你的性别。回合开始时,你可以切换你的性别。', - sunohara_tiaoyin:'挑引', - sunohara_tiaoyin_info:'出牌阶段限一次,你可以弃置任意张花色各不相同的手牌,然后获得等量角色区域内的各一张牌。若你以此法获得了异性角色区域内的牌,则你失去1点体力。', - sunohara_jianren:'坚忍', - sunohara_jianren_info:'当你受到伤害后,你可以令一名角色摸一张牌。若伤害无来源或来源与你性别不同,则改为摸三张牌。', - rin_baoqiu:'暴球', - rin_baoqiu_info:'锁定技,你的攻击范围+2。当你使用【杀】指定目标后,你进行判定。若结果:为红色,此【杀】对其的伤害值基数+1;为黑色,其无法闪避此【杀】;为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。', - sasami_miaobian:'喵变', - sasami_miaobian_info:'当你的体力值变为:3以下时,你获得技能〖公清〗,2以下时,你获得技能〖复难〗,1以下时,你获得技能〖暴球〗', - "sasami_gongqing":"公清", - "sasami_gongqing_info":"锁定技。当你受到伤害时,若伤害来源的攻击范围:<3,则你令此伤害的数值减为1。>3,你令此伤害+1。", - sasami_funan:'复难', - sasami_funan_info:'其他角色使用或打出牌响应你使用的牌时,你可令其获得你使用的牌(其本回合不能使用或打出这些牌),然后你获得其使用或打出的牌。', - sasami_baoqiu:'暴球', - sasami_baoqiu_info:'锁定技,你的攻击范围+2。当你使用【杀】指定目标后,你进行判定。若结果:为红色,此【杀】对其的伤害值基数+1;为黑色,其无法闪避此【杀】;为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。', - akane_jugu:'巨贾', - akane_jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', - akane_quanqing:'权倾', - akane_quanqing_info:'出牌阶段,你可选择:1.弃置一张点数大于10的牌并对攻击范围内的一名其他角色造成1点伤害;2.弃置一张点数大于6的牌并弃置攻击范围内的一名其他角色区域内的一张牌。3.弃置一张牌并令攻击范围内的一名其他角色摸一张牌。', - akane_yifu:'蚁附', - akane_yifu2:'蚁附', - akane_yifu_info:'主公技,其他键势力角色的出牌阶段限一次,其可交给你一张手牌。然后你摸一张牌,并将一张手牌交给该角色。', - doruji_feiqu:'肥躯', - doruji_feiqu_info:'锁定技,当你使用【杀】时,或你成为【杀】的目标后,你令此【杀】不可被响应。', - yuiko_fenglun:'锋论', - yuiko_fenglun_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你本阶段内使用牌没有次数和距离限制。', - yuiko_dilve:'底略', - yuiko_dilve_info:'你可以使用牌堆底的一张牌进行拼点。当你拼点后,你可以获得两张拼点牌。', - riki_spwenji:'问计', - riki_spwenji_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌。你于本回合内使用与该牌名称相同的牌时不能被其他角色响应。', - riki_nvzhuang:'女装', - riki_nvzhuang_info:'锁定技,此武将牌的性别视为女性。结束阶段,若你:有手牌,你摸一张牌;没有手牌,你摸两张牌。', - riki_mengzhong:'梦终', - riki_mengzhong_info:'觉醒技,准备阶段,若你已因〖问计〗获得了三张或更多的牌,则你加1点体力上限并回复1点体力,失去〖问计〗并获得〖重振〗。', - riki_chongzhen:'重振', - riki_chongzhen_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你获得该角色手牌区,装备区,判定区的各一张牌;若你没赢,你于此阶段内使用牌时不能指定其他角色为目标。', - hisako_yinbao:'音爆', - hisako_yinbao_info:'当你受到伤害/回复体力后,你可以判定。若结果为♠,则你对一名其他角色造成1点雷属性伤害。', - hisako_zhuanyun:'转运', - hisako_zhuanyun_info:'锁定技,你的判定会朝向对你有利的方向倾斜。', - hinata_qiulve:'球略', - hinata_qiulve_info:'你可以将一张非基本牌当做【杀】使用或打出(无距离限制)。你以此法使用的红色【杀】不可被响应,黑色【杀】不计入使用次数限制。', - hinata_ehou:'扼喉', - hinata_ehou_info:'其他角色对你使用的牌结算完成后,你可对其使用一张【杀】。若此【杀】造成伤害,则你摸一张牌。', - noda_fengcheng:'奉承', - noda_fengcheng_info:'锁定技,其他角色交给你牌后,其摸一张牌。', - noda_xunxin:'寻衅', - noda_xunxin2:'寻衅', - noda_xunxin_info:'出牌阶段限X次,你可以视为对一名体力值不小于你的角色使用【决斗】。若如此做,此【决斗】结算完成后,没赢的角色交给赢的角色一张牌。(X为你的体力值)', - tomoya_shangxian:'伤弦', - tomoya_shangxian_info:'锁定技,你计算与其他角色的距离时始终从逆时针方向计算。出牌阶段开始时,你可摸一张牌,并改变此方向。', - tomoya_wangjin:'往今', - tomoya_wangjin_info:'每项每轮各限一次。一名其他角色的回合结束时,若其:在你的攻击范围内,你可令其摸一张牌。若其的体力值小于你,则你摸一张牌,并可交给其一张牌。不在你的攻击范围内,则你摸两张牌,并令其弃置你的一张手牌。若其的体力值大于你,则你视为对其使用一张【杀】(无距离限制)。', - nagisa_tiandu:'天妒', - nagisa_tiandu_info:'当你的判定牌生效后,你可以获得此牌。', - nagisa_fuxin:'抚心', - nagisa_fuxin_info:'当一名角色于回合外受到伤害,或其手牌被其他角色弃置或获得后,你可以令其判定。若结果为:红色,其摸一张牌。黑色,当前回合角色弃置一张牌。', - ayato_jianshen:'僭神', - ayato_jianshen_info:'锁定技,你手牌中的【杀】均视为神属性。', - ayato_zonghuan:'纵幻', - ayato_zonghuan_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后选择一项:将其中的一张牌置入弃牌堆,或以该角色的视角使用其中的一张,然后摸一张牌。', - ao_xishi:'习事', - ao_xishi_info:'锁定技,当你使用或打出♦牌时,或其他角色使用♦牌指定你为目标后,你摸一张牌。', - ao_kuihun:'窥魂', - ao_kuihun_info:'其他角色进入濒死状态时,你可以摸一张牌,然后观看其手牌并将其中一张牌置于你的武将牌上,称为「蝶」。你使用与一张「蝶」花色相同的牌时无距离和次数限制。你的手牌上限+X(X为蝶数)。', - ao_shixin:'释心', - ao_shixin_info:'觉醒技,准备阶段,若你的「蝶」中包含至少三种花色,则你加1点体力上限并回复1点体力,失去〖窥魂〗并获得〖蝶归〗。', - ao_diegui:'蝶归', - ao_diegui_backup:'蝶归', - ao_diegui_info:'出牌阶段限一次,你可以将一张「蝶」交给一名角色,该角色摸两张牌并复原武将牌。', - yuzuru_wuxin:'无心', - yuzuru_wuxin_info:'结束阶段,你可以选择一项:失去1点体力并令一名角色摸两张牌,或弃置两张牌并回复1点体力。', - yuzuru_deyi:'得义', - yuzuru_deyi_info:'觉醒技,当有其他角色死亡后,你减1点体力上限并回复1点体力,失去技能〖无心〗,获得技能〖往生〗〖困奋〗和〖去疾〗。', - yuzuru_wangsheng:'往生', - yuzuru_wangsheng_info:'觉醒技,当你即将死亡时,你防止此次死亡。你可以将任意张牌交给一名其他角色,然后减1点体力上限并将体力回复至2点,修改技能〖困奋〗和〖去疾〗。', - yuzuru_kunfen:'困奋', - yuzuru_kunfen_info:'锁定技,结束阶段,你失去1点体力并摸两张牌。然后你可以将两张牌交给一名其他角色。', - yuzuru_quji:'去疾', - yuzuru_quji_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。若你以此法弃置了黑色牌,则你失去1点体力。(X为你已损失的体力值)', - yuzuru_kunfen_rewrite:'困奋·改', - yuzuru_kunfen_rewrite_info:'锁定技,结束阶段,你摸两张牌。然后你可以将两张牌交给一名其他角色。', - yuzuru_quji_rewrite:'去疾·改', - yuzuru_quji_rewrite_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。(X为你已损失的体力值)', - yuzuru_bujin:'步进', - yuzuru_bujin_info:'锁定技,己方其他角色计算与其他角色的距离-1且摸牌阶段的额定摸牌数+1。', - kanade_mapo:'麻婆', - kanade_mapo_info:'你可以将一张♥牌当做【麻婆豆腐】使用。你使用的【麻婆豆腐】可以多指定一个目标。', - kanade_benzhan:'奔战', - kanade_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', - mio_tuifu:'推腐', - mio_tuifu_info:'锁定技,当一名男性角色对一名男性角色造成伤害时,你摸一张牌。', - mio_tishen:'替身', - mio_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鸟】。', - midori_nonghuan:'弄幻', - midori_nonghuan_info:'出牌阶段限X次(X为你的体力值),你可以获得一名本阶段内未选择过的其他角色的区域内的一张牌。你摸一张牌,然后将一张牌交给该角色。然后你清除此技能结算过程中所有卡牌移动事件的移动记录。', - //即技能结算完成后,所有涉及到的牌移动事件不会再被getHistory获取 - midori_tishen:'替身', - midori_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鱼】。', - kyoko_juwu:'聚物', - kyoko_juwu_info:'你的回合外,当有装备牌进入弃牌堆后,若这些牌不是从你的区域移动的,则你可以获得这些牌。', - kyoko_zhengyi:'整遗', - kyoko_zhengyi_info:'锁定技,若你装备区的花色数:大于等于1,你视为拥有〖精策〗;大于等于2,你视为拥有〖涉猎〗:大于等于3,你视为拥有〖制衡〗;大于等于4,你将〖精策〗和〖制衡〗改为界限突破版本。', - kyoko_jingce:'精策', - kyoko_shelie:'涉猎', - kyoko_zhiheng:'制衡', - shizuru_nianli:'念力', - shizuru_nianli_info:'每轮限一次,你可以展示一张♦/♣/♥/♠手牌,然后视为使用一张不计入次数限制和记录的雷【杀】/【闪】/【桃】/【无懈可击】。', - shizuru_benzhan:'奔战', - shizuru_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', - shiorimiyuki_banyin:'伴音', - shiorimiyuki_banyin_info:'当你受到伤害或回复体力后,你可令一名其他角色回复1点体力。', - shiorimiyuki_tingxian:'铤险', - shiorimiyuki_tingxian_info:'出牌阶段开始时,你可以摸至多三张牌。若如此做,你回复1点体力,且此阶段结束时你失去X点体力。(X为你获得的牌中仍在手牌区的牌的数量)', - shiorimiyuki_tingxian2:'铤险', - miki_shenqiang:'神枪', - miki_shenqiang_info:'锁定技,游戏开始时,你将一张【海德洛格拉迪尔特·改】和一张【望远镜】置入你的装备区。你装备区内的武器牌和宝物牌不能被其他角色弃置。', - miki_huanmeng:'幻梦', - miki_huanmeng_info:'准备阶段开始时,你可以观看牌堆顶的X+1张牌并可以按任意顺序置于牌堆顶或牌堆底。(X为你装备区内的牌数)', - miki_zhiluo:'治裸', - miki_zhiluo_info:'锁定技,一名其他角色的回合结束时,若其在你的攻击范围内且其装备区内没有牌,则你选择:①摸一张牌。②视为对其使用一张【杀】。', - miki_hydrogladiator:'海德洛', - miki_hydrogladiator_info:'全名为【海德洛格拉迪尔特·改】。锁定技,当你因执行【杀】的效果而对目标角色造成伤害后,你弃置所有至目标角色距离为1的其他角色的一张牌或弃置其两张牌。', - miki_hydrogladiator_skill:'海德洛格拉迪尔特·改', - miki_binoculars:'望远镜', - miki_binoculars_info:'锁定技,其他角色的手牌对你可见。', - - key_kud:'库特莉亚芙卡', - kud_qiaoshou:'巧手', - kud_qiaoshou_equip:'巧手', - kud_qiaoshou_end:'巧手', - kud_qiaoshou_backup:'巧手', - kud_qiaoshou_info:'出牌阶段/结束阶段,若你没有“巧”,则你可以将一张手牌作为“巧”置于武将牌上并摸一张牌,且视为装备了一张你选择的武器牌或进攻坐骑/防具牌或防御坐骑直到“巧”进入弃牌堆。出牌阶段结束时/准备阶段开始时,你将“巧”置入弃牌堆。', - kud_buhui:'不悔', - kud_buhui_info:'限定技,当你进入濒死状态时,你可以弃置“巧”和装备区内的所有牌(至少一张)并摸等量的牌,将体力回复至2点,获得技能〖重振〗。', - key_misuzu:'神尾观铃', - misuzu_hengzhou:'恒咒', - misuzu_hengzhou_info:'锁定技,准备阶段开始时,或当你受到1点伤害或回复1点体力后,你获得一个“诅咒”标记。你的手牌上限和摸牌阶段的额定摸牌数+X。结束阶段开始时,若X大于3,则你移去所有“诅咒”标记并失去1点体力。(X为“诅咒”标记数)', - misuzu_nongyin:'浓饮', - misuzu_nongyin_info:'当你需要使用【桃】时,你可将一张红色非锦囊牌当做【乐不思蜀】置入自己的判定区,然后视为使用一张【桃】。', - misuzu_zhongxing:'终幸', - misuzu_zhongxing_info:'每回合限一次,当你判定区的牌移动到其他区域后,你可令一名角色回复1点体力或摸两张牌。', - key_kamome:'久岛鸥', - kamome_yangfan:'扬帆', - kamome_yangfan_info:'锁定技,游戏开始时,你将一张【旅行箱】置入你的装备区。当你失去装备区内的一张牌后,你摸两张牌。', - kamome_huanmeng:'幻梦', - kamome_huanmeng_info:'准备阶段开始时,你可以观看牌堆顶的X+1张牌并可以按任意顺序置于牌堆顶或牌堆底。(X为你装备区内的牌数)', - kamome_jieban:'结伴', - kamome_jieban_info:'转换技。每回合限一次,当你受到或造成伤害后,阴:你可将两张牌交给一名其他角色,然后其交给你一张牌。阳:你可将一张牌交给一名其他角色,然后其交给你两张牌。', - kamome_suitcase:'旅行箱', - kamome_suitcase_info:'锁定技,你跳过你的判定阶段和弃牌阶段;当你即将翻面时,取消之。', - key_nao:'友利奈绪', - nao_duyin:'独隐', - nao_duyin2:'独隐', - nao_duyin_info:'一名其他角色的回合开始时,若你本局游戏内未对其发动过〖独隐〗,则你可以弃置一张牌或将武将牌翻面。若如此做,你不能成为其使用牌的目标,且对其使用牌没有距离限制且不计入使用次数直到你的下回合结束。', - nao_wanxin:'挽心', - nao_wanxin_info:'一轮游戏结束时,你可以令一名本轮内受到过伤害的角色摸两张牌,然后你与其将武将牌重置。', - nao_shouqing:'守情', - nao_shouqing2:'守情', - nao_shouqing3:'守情', - nao_shouqing_info:'其他角色的出牌阶段内可以对你使用【桃】。若如此做,其摸一张牌且本局游戏内的手牌上限+1。', - - ns_huangchengyan:'黄承彦', - nslongyue:'龙岳', - nslongyue_info:'当一名角色使用锦囊牌时,若此牌是其本回合内使用的第一张牌,则你可令其摸一张牌。', - nszhenyin:'阵引', - nszhenyin_info:'每回合限一次。一名角色的判定牌生效前,你可令当前回合角色打出一张手牌代替之。', - ns_sunchensunjun:'孙綝孙峻', - nsxianhai:'险害', - nsxianhai_info:'每轮限一次,当一名其他角色于回合内造成伤害后,若其此回合内造成过的伤害总和大于你上一回合内造成的伤害总和,则你可以减1点体力上限,令其废除一种装备栏并弃置手牌中所有的【闪】。若〖兴黜〗已发动,此回合结束后视为该限定技未发动过。', - nsxingchu:'兴黜', - nsxingchu_info:'限定技,当你杀死一名角色/你死亡时,你可以令一名角色获得其/你的所有牌并增加1点体力上限。', - ns_yuanxi:'袁熙', - nsshengyan:'盛筵', - nsshengyan3:'盛筵', - nsshengyan_info:'锁定技,你的判定牌生效后,若结果花色与你本回合内其他判定结果的花色均不同,则你令当前回合角色本回合的手牌上限+2。', - nsdaizhan:'怠战', - nsdaizhany:'怠战', - nsdaizhan_info:'准备阶段,你可以将一张非锦囊牌当做【兵粮寸断】或【乐不思蜀】对自己使用。若如此做,回合结束时,你将手牌摸至手牌上限。', - ns_caoshuang:'曹爽', - nsjiquan:'集权', - nsjiquan_mark:'集权', - nsjiquan_info:'与你距离1以内的其他角色造成或受到伤害后,你可以将其区域内的一张牌置于你的武将牌上(称为“威”)。你使用【杀】的次数上限+X(X为“威”数)。', - nsfuwei:'附位', - nsfuwei_info:'觉醒技,结束阶段开始时,若“威”数大于4,则你加2点体力上限,获得〖喋谋〗和〖制皇〗,并将〖集权〗改为锁定技。', - nsdiemou:'喋谋', - nsdiemou_info:'锁定技,出牌阶段开始时,若“威”大于全场角色数,你移去所有“威”,减一点体力上限并摸X张牌。若X大于4,你翻面。(X为移去的“威”数)', - nszhihuang:'制皇', - nszhihuang_damage:'制皇', - nszhihuang_info:'每回合限一次,当主公使用牌时,你可以移去一张“威”,然后获得此牌。锁定技,若你的手牌数大于主公,则你使用牌造成的伤害+1。', - - diy_wenyang:'文鸯', - yj_caoang:'SP曹昂', - yjxuepin:'血拼', - yjxuepin_info:'出牌阶段限一次,你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同,你回复1点体力。', - ns_chendao:'SP陈到', - nsjianglie:'将烈', - nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。', - ns_zhangwei:'张葳', - nsqiyue:'骑钺', - nsqiyue_info:'锁定技,当有角色的武将牌状态改变后,你摸一张牌。', - nsxuezhu:'血逐', - nsxuezhu_info:'当你受到伤害或造成伤害后,你可以令受到伤害的角色摸两张牌并翻面。', - ns_chuanshu:'传术', - ns_chuanshu_info:'限定技 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】', - ns_xiandao1:'仙道', - ns_xiandao1_info:'锁定技 游戏开始和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段开始', - ns_xiandao2:'仙道', - ns_xiandao2_info:'锁定技 你防止受到任何属性伤害', - ns_xiandao:'仙道', - ns_xiandao_info:'锁定技 游戏开始、你进入游戏时和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段阶段开始。你防止受到任何属性伤害', - ns_chuanshu2:'术', - ns_chuanshu2_info:'锁定技 当你造成或受到一次伤害后,南华老仙摸一张牌', - ns_chuanshu3:'术', - ns_chuanshu3_info:'锁定技 当你【传术】的角色阵亡后,你重置技能【传术】', - ns_xiuzheng:'修真', - ns_xiuzheng_info:'出牌阶段限一次,你可选择一名其他角色,然后展示牌堆顶的两张牌,若同为红色,则其受到一点火焰伤害;若同为黑色,其受到一点雷电伤害;若颜色不相同,你弃置其一张牌。然后你获得这两张展示的牌后再弃置两张牌', - nsanruo:'暗弱', - nsanruo_info:'锁定技,你手牌中的[杀]和普通锦囊牌(借刀杀人等带有指向目标的锦囊除外)均对你不可见。但你可以正常使用之', - nsxunshan:'循善', - nsxunshan_info:'锁定技,你使用【暗弱】牌可以为其指定任意名合法目标(托管无效)', - nskaicheng:'开城', - nskaicheng_info:'主公技,你的回合内,你可以将一张【暗弱】牌交给一名群势力其他角色观看,其可以选择是否告诉你此牌的名字。然后你选择一项:使用这张牌并摸一张牌;或结束此回合', - nsjuanli:'狷戾', - nsjuanli_info:'出牌阶段限一次,你可以和一名有手牌的其他角色进行赌牌,若你赢,目标角色失去1点体力且该角色与你距离-1直到与你下次赌牌,若你没赢,目标角色回复1点体力,且该角色与你距离+1直到与你的下次赌牌。(赌牌:赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利)', - nsyuanchou:'远筹', - nsyuanchou_info:'锁定技,当你成为锦囊牌的目标时,若来源角色与你的距离大于1,则取消之', - nsguhuo:'蛊惑', - nsguhuo_info:'锁定技,你在一个回合中使用前两张牌时,你对一名随机角色从牌堆(牌堆无则从弃牌堆)随机使用一张同类别卡牌', - nsqinxue:'勤学', - nsqinxue_info:'每个效果每回合只能使用一次。①当你使用一张基本牌时,你从牌堆随机获得一张锦囊牌;②当你使用一张锦囊牌时,你从牌堆随机获得一张装备牌;③当你使用一张装备牌时,你从牌堆随机获得一张基本牌', - nsbaiyi:'白衣', - nsbaiyi_info:'锁定技,若你本回合发动过勤学,你跳过弃牌阶段,改为弃置X张牌(X为本回合发动勤学次数);若你弃置了3张类别不同的牌,你获得一个额外回合(不可连续获得回合),否则你观看牌堆顶的X张牌并获得其中一张', - nsbaiming:'百鸣', - nsbaiming_info:'当你使用【杀】时,你可以获得一项未获得过且与杀或伤害相关的技能,此【杀】结算完毕后,你失去以此法获得的技能', - nsfuge:'覆戈', - nsfuge_info:'你的回合结束后,你可以执行一个额外的回合,此回合的摸牌阶段,你于摸牌阶段额外摸X张牌(X为你已损失的体力值);若如此做,直到洗牌前,你不能再发动此技能', - nstanbing:'谈兵', - nstanbing_info:'摸牌阶段开始时,你可弃置一张牌,然后摸X张牌(X为你弃置牌的名称字数),若如此做,本回合你不可使用或打出【杀】', - nsxinzhan:'心战', - nsxinzhan_info:'出牌阶段限一次,你可将任意张手牌交给一名其他角色,若如此做,该角色失去X点体力(X为你交给其的牌张数的一半,向下取整),若你给的牌达到六张,则改为该角色失去一点体力上限', - nsfuhuo:'符火', - nsfuhuo2:'符火', - nsfuhuo_info:'出牌阶段限一次,你可将一张手牌置于一名武将牌上没有“符”的角色的武将牌上,称为“符”,若如此做,其回合外使用或打出【闪】时,你可令其判定,若结果为:红桃,你对其造成2点火焰伤害;方块,你弃置其一张手牌,然后对其造成1点火焰伤害。你的下个回合开始时,你获得其武将牌上的“符”', - nswangfeng:'望风', - nswangfeng_info:'在判定牌生效前,你可以打出一张红色牌替换之', - nshunji:'混击', - nshunji_info:'出牌阶段限一次,你可以摸一张牌,视为使用一张【万箭齐发】。此【万箭齐发】造成伤害时,受伤害角色选择一项:①弃置你一张牌;②摸一张牌', - nscuanquan:'篡权', - nscuanquan_info:'锁定技,如果你的身份为忠臣,则在受伤三次后与主公,互换身份和体力上限', - nsjianning:'奸佞', - nsjianning_info:'出牌阶段限一次,如果你的身份为内奸,你可以与一名手牌数比你少的角色交换手牌,并对其造成一点伤害', - nschangshi:'常仕', - nschangshi_info:'出牌阶段限一次,如果你的身份为反贼,你可以指定两名其他角色互换体力;如果两名角色体力之差等于1,你失去一点体力', - nsbaquan:'霸权', - nsbaquan_info:'回合结束时,你可以弃置所有手牌,并获得相应点数的护甲,你的新一回合开始时清除所有护甲', - nsbugua:'卜卦', - nsbugua_use_info:'弃置一张牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数随机获得牌堆中相应的一张牌', - nsbugua_info:'出牌阶段限一次,你可以弃置一张牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数按以下规则随机获得牌堆中相应的一张牌:乾(红桃偶数):无中生有;坤(黑桃奇数):决斗;震(黑桃偶数):南蛮入侵;巽(红桃奇数):万箭齐发;坎(梅花偶数):过河拆桥、兑(梅花奇数):借刀杀人、艮(方片偶数):顺手牵羊、离(方片奇数):火攻。若牌堆中无此牌则摸一张牌,然后你观看未展示的另外五张牌并按任意顺序将其置于牌堆顶。', - nstuiyan:'推演', - nstuiyan_info:'出牌阶段,若你使用的牌点数比上一张使用的牌点数大,你可以摸一张牌,反之你本回合不能再以此法摸牌;当你使用的牌点数首次达到8的倍数时,你可以在结算后立即发动一次【卜卦】', - nstianji:'天机', - nstianji_info:'限定技,当一名其他角色进入濒死状态,你可自减一点体力上限,令其回复体力至1并增加一点体力上限', - nszhaoxin:'昭心', - nszhaoxin_info:'锁定技,你始终展示手牌', - nsxiuxin:'修穆', - nsxiuxin_info:'锁定技,若你没有某种花色的手牌,你不能成为这种花色的牌的目标', - nsshijun:'弑君', - nsshijun_info:'锁定技,你造成伤害时,你令此伤害+1,并在结算后失去一点体力', - nshunyou:'魂佑', - nshunyou_info:'出阶段限一次,你可以弃置一张基本牌,获得弃牌堆底的一张装备牌和一张锦囊牌,然后你可以将那张装备牌装备给一名角色(允许替换)。如果弃牌堆没有装备以及锦囊牌,则改为摸X张牌,X为损失的体力加一(最多3张)', - nswulie:'武烈', - nswulie_info:'限定技,准备阶段,你可以失去1点体力上限,从弃牌堆选择最多三张牌以任意顺序放置于牌堆顶。若如此做,此回合的结束阶段,你可以重复此操作', - nscangxi:'藏玺', - nscangxi2:'藏玺', - nscangxi_info:'主公技,其他吴势力角色的弃牌阶段结束时,若其弃置了至少两张牌,则可以选择判定,若是黑色,则其选择一项,1,令主公摸一张并且展示;2,主公手牌上限永久加一;3,额外弃置一张牌,令主公获得本回合进入弃牌堆的一张牌', - nsdongcha:'洞察', - nsdongcha_info:'锁定技,单体锦囊牌无法对你造成伤害。其它角色于其回合内第二次使用锦囊牌指定你为目标时,取消之', - nscaijian:'才鉴', - nscaijian_info:'出牌阶段限一次,若你的手牌数不大于你的体力上限,则你可以展示你的手牌,观看牌堆顶相同数量的牌并以任意方式交换之', - nsgongjian:'恭俭', - nsgongjian_info:'锁定技,弃牌阶段,你须将弃牌交给一名体力值大于你的其它角色', - nsjianxiong:'奸雄', - nsjianxiong_info:'当你成为一名角色牌的目标后你可以对该角色使用一张牌,若此牌对其造成伤害,则该角色的牌失效。若失效的为黑色牌,则你摸一张牌', - nsxionglue:'雄略', - nsxionglue_info:'出牌阶段限一次,你可以弃置一张黑色手牌,然后发现一张锦囊牌', - nsyaowang:'妖妄', - nsyaowang_info:'回合开始阶段你可以选择一名角色然后获得其其中一项技能直到回合结束,然后该角色随机获得一项未上场武将的其中一项技能直到其回合结束', - nshuanhuo:'幻惑', - nshuanhuo_info:'每当你流失一点体力或受到一次大于2的伤害时,你可以交换除你之外的两名角色的武将牌(体力及体力上限不变)', - nsjianshu:'剑术', - nsjianshu_info:'锁定技:每当你的装备区有武器时,你使用【杀】指定一个目标后,该角色需要依次使用两张【闪】才能抵消此【杀】', - nscangjian:'藏剑', - nscangjian_info:'每当你对一名角色造成伤害,你可以获得其装备区一张牌', - nsyunxing:'陨星', - nsyunxing_info:'锁定技,当场上一名角色死亡,若为蜀,你失去一点体力;若为吴,你回复一点体力;若为魏,你摸一张牌并弃置一名角色的手牌;若为群,你强制结束当前回合;若为你,你可以使一名角色翻面', - nsguanxing:'观星', - nsguanxing_info:'锁定技,准备阶段,你观看牌堆的X张牌(X为场上存活人数)并且任意移动Y张牌(Y为你当前体力值)', - nscaiyi:'猜疑', - nscaiyi_info:'其他角色摸牌后,你可以观看其摸到的牌,若其中有【杀】,则视为你对其使用一张【杀】,若其中没有【杀】,则视为其对你使用一张【杀】(计入出杀次数)', - nsgefa:'割发', - nsgefa_info:'当你的体力值等于0或更低时,你可以将任意一张♣牌当【桃】使用', - nshaoling:'号令', - nshaoling_info:'限定技,出牌阶段,你可以指定一名其他角色,令另外所有其他角色角色选择一项:1、对该角色使用一张【杀】;2、交给你一张牌,然后视为你对其使用一张【杀】', - nspinmin:'拼命', - nspinmin_info:'锁定技,当你于回合内死亡时,你不死亡并增加一点体力上限(每回合最多增加1点且不能超过4);当你于回合外死亡时,你不死亡并减少一点体力上限(体力上限为0会导致你死亡)', - nsshishou:'失手', - nsshishou_info:'锁定技,当你于回合内失去手牌时,你失去一点体力并摸一张牌;你回合内使用的牌数不能超过4', - nsduijue:'对决', - nsduijue_info:'出牌阶段开始时,你可以弃置一张手牌,若如此做,此阶段你可以将一张与此牌颜色不同的手牌当作[决斗]使用(限2次)', - nsshuangxiong:'双雄', - nsshuangxiong_info:'当你使用[决斗]或被使用[决斗]时,你可以将武将牌翻面', - nsshuangxiong_append:'背面武将:文丑,2体力,你可以将一张牌当[杀]打出', - nsguanyong:'冠勇', - nsguanyong_info:'你可以将一张手牌当[杀]打出', - nsjihui:'急恚', - nsjihui_info:'锁定技,每当一名角色一次弃置了三张或更多的牌,你获得一个额外回合;你的额外回合内,你使用牌只能指定你与上一回合角色为目标', - nsmouyun:'谋运', - nsmouyun_info:'每两轮限一次,你可以弃置场上体力值最少的一名其他角色区域内的X张牌。(X为其损失的体力值)', - nscongjun:'从军', - nscongjun_info:'锁定技,游戏开始时,你变身为一名随机男性角色;当一名敌方角色使用无懈可击时,你有小概率亮出此武将并变回花木兰,然后对该角色造成2点伤害', - nshuanxian:'幻仙', - nshuanxian_info:'锁定技,游戏开始时,你获得随从“幻身·右”,当你首次受到伤害时,你获得随从“幻身·左”(体力上限2,初始手牌2);你与幻身在摸牌阶段均少摸一张牌;在你的回合中(如果有对应幻身),你以【幻身·左-本体-幻身·右】的顺序进行3个连续回合', - nstaiping:'太平', - nstaiping_info:'当你受到一点伤害后(首次伤害除外),你可以选择一项: ①令一个“幻身”增加一点体力上限。②令一个“幻身”回复一点体力。', - nsshoudao:'授道', - nsshoudao_info:'当左右“幻身”全部死亡时,你获得技能“雷击”和“鬼道”。当你死亡时,若此时有两个“幻身”,你可以令一名其他角色获得技能“雷击”和“鬼道”。若有一个“幻身”,你可以令一名其他角色获得技能“雷击”或“鬼道”。(杀死你的角色除外)', - nsnongquan:'弄权', - nsnongquan_info:'出牌阶段,你可以将最后一张手牌当作【无中生有】使用', - nsdufu:'毒妇', - nsdufu_info:'每当你即将造成一次伤害时,你可以为此伤害重新指定伤害来源', - diyjizhi:'集智', - diyjizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌,每回合限3次', - yiesheng:'回雪', - yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。', - liangji:'环计', - liangji_info:'出牌阶段限一次,你可以选择一名未以此法放置牌的其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。', - chengmou:'逞谋', - chengmou_info:'摸牌阶段开始时,若你有“功”牌,你获得之并跳过摸牌阶段,若你所获得的“功”牌多于两张,你须失去一点体力。', - jugong:'居功', - jugong_info:'回合外每名角色的回合限一次,每当场上有角色因受到【杀】或【决斗】造成的伤害,你可以摸一张牌并且将一张手牌置于你的武将牌上,称之为“功”。在你即将受到伤害时,你可以弃置两张“功”,防止此伤害。', - nsxinsheng:'新生', - nsxinsheng_info:'每当你对其他角色造成伤害后,若你未受伤,则你可以增加X点体力上限并摸X张牌,X为伤害点数', - nsdunxing:'遁形', - nsdunxing_info:'每当你即将受到其他角色造成的伤害时,若你已受伤,则你可以防止此伤害,改为失去X点体力上限并摸X张牌,X为伤害点数', - liangce:'粮策', - liangce_info:'①出牌阶段限一次,你可以将一张基本牌当【五谷丰登】使用。②当因执行【五谷丰登】的效果而亮出的牌因效果执行完毕而置入弃牌堆后,你可以选择一名角色,令该角色获取之', - jianbi:'坚壁', - jianbi_info:'当你成为锦囊牌的目标时,若此牌的目标包括其他角色,你可以令此牌对1个目标无效', - juntun:'军屯', - juntun_info:'出牌阶段,你可以重铸装备牌', - choudu:'筹度', - choudu_info:'出牌阶段限一次,你可以弃置一张牌,并指定一名角色视为其使用一张调兵遣将', - liduan:'立断', - liduan_info:'当一名其他角色于其回合外获得牌后,若其此次获得的牌数为1且为装备牌(无论是否可见),你可以令该角色选择一项:1.使用此牌;2.将一张手牌交给你', - fuchou:'负仇', - fuchou2:'负仇', - fuchou_info:'当你成为【杀】的目标时,你可以将一张牌交给此【杀】的使用者,令此【杀】对你无效且你到其的距离于当前回合内视为1,若如此做,此回合的结束阶段开始时,其令你摸一张牌,然后你需对其使用【杀】,否则失去1点体力', - jinyan:'噤言', - jinyan_info:'锁定技。若你的体力值不大于2,你的黑色锦囊牌视为【杀】', - chezhen:'车阵', - chezhen_info:'锁定技。若你的装备区里:没有牌,你的防御距离+1;有牌,你的进攻距离+1', - youzhan:'诱战', - youzhan_info:'当以你距离不大于1的角色为目标的【杀】的使用结算开始时,你可以弃置一张装备牌,令该角色视为使用【诱敌深入】', - kangyin:'亢音', - kangyin2:'亢音', - kangyin_info:'出牌阶段限一次,你可以失去1点体力并选择一名其他角色,弃置该角色的一张牌。若此牌:为基本牌,你可以令一至X名角色各摸一张牌;不为基本牌,于此回合内:你的进攻距离+X,且你使用杀的额外目标数上限+X。(X为你已损失的体力值)', - zhucheng:'筑城', - zhucheng2:'筑城', - zhucheng_info:'①结束阶段开始时,若没有“筑”,你可以将牌堆顶的X张牌置于你的武将牌上〔称为“筑”〕(X为你已损失的体力值与1中的较大值),否则你可以获取所有“筑”。②当你成为杀的目标时,若有“筑”,你可以令此杀的使用者弃置X张牌(X为“筑”的数量),否则杀对你无效', - duoqi:'夺气', - duoqi_info:'当一名角色于除你之外的角色的出牌阶段内因弃置而失去牌后,你可以移去一张“筑”,并结束此出牌阶段', - - siji:'伺机', - ciqiu:'刺酋', - ciqiu2:'刺酋', - ciqiu3:'刺酋', - diy_liuyan:'刘焉', - juedao:'绝道', - geju:'割据', - shaoying:'烧营', - zonghuo:'纵火', - diychanyuan:'缠怨', - diyguhuo:'蛊惑', - jieyan:'劫焰', - honglian:'红莲', - xiongzi:'雄姿', - luweiyan:'围堰', - guihan:'归汉', - diyduanliang:'断粮', - diyduanliang1:'断粮', - diyduanliang2:'断粮', - diyqiangxi:'强袭', - diykuanggu:'狂骨', - diyzaiqi:'再起', - batu:'霸图', - zaiqix:'再起', - diy_jiaoxia:'皎霞', - yaliang:'雅量', - yaliang_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', - diy_jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', - zaiqix_info:'摸牌阶段,若你已受伤,你可以改为展示牌堆顶的X+1张牌,X为你已损失的体力值,其中每有一张♥牌,你回复1点体力,然后弃掉这些♥牌,将其余的牌收入手牌。', - batu_info:'结束阶段,你可以将手牌数补至X,X为现存的势力数', - diyzaiqi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', - diykuanggu_info:'锁定技,每当你造成一点伤害,你在其攻击范围内,你回复一点体力,否则你摸一张牌', - diyqiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害并弃置其一张牌,每回合限一次。', - diyduanliang_info:'出牌阶段限一次,你可以将一张黑色的基本牌当兵粮寸断对一名角色使用,然后摸一张牌。你的兵粮寸断可以指定距离2以内的角色作为目标', - guihan_info:'限定技,当你进入濒死状态时,可以指定一名男性角色与其各回复一点体力并摸两张牌', - luweiyan_info:'出牌阶段限一次,你可以将一张非基本牌当作水攻使用;结算后你可以视为对其中一个目标使用一张不计入出杀次数的杀', - xiongzi_info:'锁定技,你于摸牌阶段额外摸X+1张牌,X为你装备区牌数的一半,向下取整', - honglian_info:'每当你受到来自其他角色的伤害,可以弃置伤害来源的所有红色牌', - jieyan_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害', - diyguhuo_info:'锁定技,准备阶段,你摸两张牌,然后弃置区域内的两张牌', - diychanyuan_info:'锁定技,杀死你的角色失去一点体力上限', - zonghuo_info:'你可弃置一张牌将你即将造成的伤害变为火焰伤害', - shaoying_info:'每当你造成一次火焰伤害,可指定距离受伤害角色1以内的另一名角色,并展示牌堆顶的一张牌,若此牌为红色,该角色受到一点火焰伤害', - juedao_info:'出牌阶段,你可以弃置一张手牌,横置你的武将牌;锁定技,若你处于连环状态,你进攻距离-1、防御距离+1。', - geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。', - siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。', - ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;若其因此进入濒死状态,你令其死亡,然后你失去“刺酋”。 ', - nsshuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。', - moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。', - xicai_info:'你可以立即获得对你造成伤害的牌', - diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力', - diy_tieba:'吧友设计', - diy_default:'常规', - diy_key:'论外', - diy_yongjian:'用间篇', - diy_yijiang:'设计比赛2020', - }, - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'diy', + connect:true, + connectBanned:['diy_tianyu','diy_yangyi','diy_lukang','ns_huamulan','ns_yuji','ns_duangui','ns_liuzhang'], + character:{ + sp_key_yuri:['female','qun',4,['mubing','diaoling']], + ns_zhangwei:['female','wei',3,['nsqiyue','nsxuezhu']], + ns_chendao:['male','shu',4,['nsjianglie']], + yj_caoang:['male','wei',4,['yjxuepin']], + diy_wenyang:['male','wei','4/6',['lvli','choujue']], + key_lucia:['female','key','1/2',['lucia_duqu','lucia_zhenren']], + key_kyousuke:['male','key',4,['nk_shekong','key_huanjie']], + key_yuri:['female','key',3,['yuri_xingdong','key_huanjie','yuri_wangxi'],['zhu']], + key_haruko:['female','key',4,['haruko_haofang','haruko_zhuishi']], + key_umi:['female','key',3,['umi_chaofan','umi_lunhui','umi_qihuan']], + key_umi2:['female','key',3,[],['unseen']], + key_rei:['male','key',4,['xiandeng','shulv','xisheng']], + key_komari:['female','key',3,['komari_tiankou','komari_xueshang']], + key_yukine:['female','key',3,['yukine_wenzhou']], + key_yusa:['female','key',3,['yusa_yanyi','yusa_misa','dualside'],['dualside:key_misa']], + key_misa:['female','key',3,['misa_yehuo','misa_yusa','dualside'],['unseen']], + key_masato:['male','key','4/8',['masato_baoquan']], + key_iwasawa:['female','key',3,['iwasawa_yinhang','iwasawa_mysong']], + key_kengo:['male','key',4,['kengo_weishang','kengo_guidui']], + key_yoshino:['male','key',4,['yoshino_jueyi']], + key_yui:['female','key',3,['yui_jiang','yui_lieyin','yui_takaramono']], + key_tsumugi:['female','key',3,['tsumugi_mugyu','tsumugi_huilang']], + key_saya:['female','key',3,['saya_shouji','saya_powei']], + key_harukakanata:['female','key',3,['haruka_shuangche']], + key_inari:['female','key',2,['inari_baiwei','inari_huhun']], + key_shiina:['female','key',3,['shiina_qingshen','shiina_feiyan']], + key_sunohara:['unknown','key','3/4',['sunohara_chengshuang','sunohara_tiaoyin','sunohara_jianren']], + key_rin:['female','key',3,['rin_baoqiu']], + key_sasami:['female','key',3,['sasami_miaobian']], + key_akane:['female','key',3,['akane_jugu','akane_quanqing','akane_yifu'],['zhu']], + key_doruji:['female','key',16,['doruji_feiqu']], + key_yuiko:['female','key',3,['yuiko_fenglun','yuiko_dilve']], + key_riki:['female','key',3,['riki_spwenji','riki_nvzhuang','riki_mengzhong']], + key_hisako:['female','key',3,['hisako_yinbao','hisako_zhuanyun']], + key_hinata:['male','key',4,['hinata_qiulve','hinata_ehou']], + key_noda:['male','key',4,['noda_fengcheng','noda_xunxin']], + key_tomoya:['male','key',4,['tomoya_shangxian','tomoya_wangjin']], + key_nagisa:['female','key',3,['nagisa_tiandu','nagisa_fuxin']], + key_ayato:['male','key',3,['ayato_jianshen','ayato_zonghuan']], + key_ao:['female','key',3,['ao_xishi','ao_kuihun','ao_shixin']], + key_yuzuru:['male','key',5,['yuzuru_wuxin','yuzuru_deyi']], + sp_key_kanade:['female','key',3,['kanade_mapo','kanade_benzhan']], + key_mio:['female','key',3,['mio_tuifu','mio_tishen']], + key_midori:['female','key',3,['midori_nonghuan','midori_tishen']], + key_kyoko:['female','key',3,['kyoko_juwu','kyoko_zhengyi']], + key_shizuru:['female','key',3,['shizuru_nianli','shizuru_benzhan']], + key_shiorimiyuki:['female','key',3,['shiorimiyuki_banyin','shiorimiyuki_tingxian']], + key_miki:['female','key',3,['miki_shenqiang','miki_huanmeng','miki_zhiluo']], + key_shiori:['female','key','2/3',['shiori_huijuan']], + key_kaori:['female','key','3/4',['kaori_siyuan']], + + key_kud:['female','key',3,['kud_qiaoshou','kud_buhui']], + key_misuzu:['female','key',3,['misuzu_hengzhou','misuzu_nongyin','misuzu_zhongxing']], + key_kamome:['female','key',3,['kamome_yangfan','kamome_huanmeng','kamome_jieban']], + key_nao:['female','key',3,['nao_duyin','nao_wanxin','nao_shouqing']], + + ns_huangchengyan:['male','shu',3,['nslongyue','nszhenyin']], + ns_sunchensunjun:['male','wu',5,['nsxianhai','nsxingchu']], + ns_yuanxi:['male','qun',4,['nsshengyan','nsdaizhan']], + ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']], + // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], + // diy_hanlong:['male','wei',4,['siji','ciqiu']], + diy_feishi:['male','shu',3,['nsshuaiyan','moshou']], + diy_liuyan:['male','shu',3,['juedao','geju']], + // diy_luxun:['male','wu',3,['shaoying','zonghuo']], + diy_yuji:['male','qun',3,['diyguhuo','diychanyuan']], + // diy_zhouyu:['male','wu',3,['jieyan','honglian']], + // diy_zhouyu:['male','wu',3,['xiongzi','yaliang']], + diy_caiwenji:['female','qun',3,['beige','guihan']], + diy_lukang:['male','wu',4,['luweiyan','qianxun']], + // diy_xuhuang:['male','wei',4,['diyduanliang']], + // diy_dianwei:['male','wei',4,['diyqiangxi']], + // diy_huangzhong:['male','shu',4,['liegong','fuli']], + // diy_weiyan:['male','shu',4,['diykuanggu']], + diy_zhenji:['female','wei',3,['diy_jiaoxia','yiesheng']], + // diy_menghuo:['male','shu',4,['huoshou','zaiqix']], + //re_huangyueying:['female','shu',3,['rejizhi','qicai']], + + diy_liufu:['male','wei',3,['zhucheng','duoqi']], + diy_xizhenxihong:['male','shu',4,['fuchou','jinyan']], + diy_liuzan:['male','wu',4,['kangyin']], + diy_zaozhirenjun:['male','wei',3,['liangce','jianbi','juntun']], + diy_yangyi:['male','shu',3,['choudu','liduan']], + diy_tianyu:['male','wei',4,['chezhen','youzhan']], + + ns_zuoci:['male','qun',3,['nsxinsheng','nsdunxing']], + ns_lvzhi:['female','qun',3,['nsnongquan','nsdufu']], + ns_wangyun:["male","qun",4,["liangji","jugong","chengmou"]], + ns_nanhua:["male","qun",3,["nshuanxian","nstaiping","nsshoudao"]], + ns_nanhua_left:["male","qun",2,[],['unseen']], + ns_nanhua_right:["female","qun",2,[],['unseen']], + ns_huamulan:['female','qun',3,['nscongjun','xiaoji','gongji']], + ns_huangzu:['male','qun',4,['nsjihui','nsmouyun']], + ns_jinke:['male','qun',4,['nspinmin','nsshishou']], + ns_yanliang:['male','qun',4,['nsduijue','nsshuangxiong','dualside'],['dualside:ns_wenchou']], + ns_wenchou:['male','qun',2,['nsguanyong','dualside'],['unseen']], + + ns_caocao:['male','wei',4,['nscaiyi','nsgefa','nshaoling']], + ns_caocaosp:['male','qun',3,['nsjianxiong','nsxionglue']], + ns_zhugeliang:['male','shu',3,['nsguanxing','kongcheng','nsyunxing']], + ns_wangyue:['male','qun',4,['nsjianshu','nscangjian']], + ns_yuji:['male','qun',3,['nsyaowang','nshuanhuo']], + ns_xinxianying:['female','wei',3,['nsdongcha','nscaijian','nsgongjian']], + ns_guanlu:['male','wei',3,['nsbugua','nstuiyan','nstianji']], + ns_simazhao:['male','wei',3,['nszhaoxin','nsxiuxin','nsshijun']], + ns_sunjian:['male','wu',4,['nswulie','nshunyou','nscangxi']], + + ns_duangui:['male','qun',3,['nscuanquan','nsjianning','nschangshi','nsbaquan']], + ns_zhangbao:['male','qun',3,['nsfuhuo','nswangfeng']], + ns_masu:['male','shu',3,['nstanbing','nsxinzhan']], + ns_zhangxiu:['male','qun',4,['nsbaiming','nsfuge']], + ns_lvmeng:['male','wu',3,['nsqinxue','nsbaiyi']], + ns_shenpei:['male','qun',3,['nshunji','shibei']], + + ns_yujisp:['male','qun',3,['nsguhuo']], + ns_yangyi:['male','shu',3,['nsjuanli','nsyuanchou']], + ns_liuzhang:['male','qun',3,['nsanruo','nsxunshan','nskaicheng']], + // ns_zhaoyun:['male','qun',3,[]], + // ns_lvmeng:['male','qun',3,[]], + // ns_zhaoyunshen:['male','qun',3,[]], + // ns_lisu:['male','qun',3,[]], + // ns_sunhao:['male','qun',3,[]], + ns_xinnanhua:['male','qun',3,['ns_xiandao','ns_xiuzheng','ns_chuanshu'],[]], + }, + characterFilter:{ + key_tomoya:function(mode){ + return mode!='chess'&&mode!='tafang'&&mode!='stone'; + }, + key_sunohara:function(mode){ + return mode!='guozhan'; + }, + ns_duangui:function(mode){ + return mode=='identity'&&_status.mode=='normal'; + }, + diy_liuyan:function(mode){ + return mode!='chess'&&mode!='tafang'; + } + }, + characterSort:{ + diy:{ + diy_yijiang:["key_kud","key_misuzu","key_kamome","key_nao", + "ns_huangchengyan","ns_sunchensunjun","ns_yuanxi","ns_caoshuang"], + diy_tieba:["diy_wenyang","ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_zhangwei"], + diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"], + diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri"], + diy_yongjian:["ns_chendao","yj_caoang"], + }, + }, + characterIntro:{ + ns_zhangwei:'血骑教习·张葳,三国杀集换式卡牌游戏《阵面对决》中的帝畿系列卡牌。游卡桌游官方原创的三国时期女性角色。', + diy_feishi:'字公举,生卒年不详,益州犍为郡南安县(今四川省乐山市)人。刘璋占据益州时,以费诗为绵竹县县令。刘备进攻刘璋夺取益州,费诗举城而降,后受拜督军从事,转任牂牁郡太守,再为州前部司马。', + //diy_liuyan:'字元海,新兴(今山西忻州北)人,匈奴族,匈奴首领冒顿单于之后,南匈奴单于于夫罗之孙,左贤王刘豹之子,母呼延氏,十六国时期前赵政权开国皇帝,304年-310年在位。', + diy_lukang:'字幼节,吴郡吴县(今江苏苏州)人。三国时期吴国名将,丞相陆逊次子。', + diy_liufu:'字元颖,沛国相县(今安徽濉溪县西北)人。东汉末年名守。在汉末避难于淮南,说服袁术将戚寄和秦翊率部投奔曹操,曹操大悦,使司徒辟其为掾属。', + diy_xizhenxihong:'习珍,襄阳人。三国时蜀汉将领。先主刘备时曾任零陵北部都尉,加裨将军。建安二十四年,关羽率荆州大军攻打樊城,唯有习珍据城不降。被困月余,直到箭尽粮绝,拔剑自刎而死。习宏,生卒年不详,习珍之弟。曾在东吴入侵蜀汉时建议哥哥习珍伪降,约樊胄举兵。习珍死后,弟弟习宏落在东吴,有问必不答,终身不为孙权发一言。', + diy_zaozhirenjun:'枣祗,生卒年月不详,东汉末年颍川阳翟(今河南省禹州市)人。曾任东阿令、羽林监、屯田都尉、陈留太守等职。任峻(?—204年),字伯达,河南郡中牟县人。曹操每次出征,任峻通常在后方补给军队。后来发生饥荒,枣祗建议实施屯田,任峻被任命为典农中郎将,招募百姓在许下屯田,结果连年丰收,积谷足以装满全部粮仓。', + diy_yangyi:'字威公,襄阳(今湖北襄阳)人,三国时期蜀汉政治家。最初,为荆州刺史傅群的主簿,后投奔关羽,任为功曹。羽遣其至成都,大受刘备赞赏,擢为尚书。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。亮生前定蒋琬继己任,仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', + diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', + }, + characterTitle:{ + key_kaori:'#bKanon', + key_shiori:'#bKanon', + key_miki:'#bSummer Pockets', + key_shiorimiyuki:'#rAngel Beats!', + key_shizuru:'#bRewrite', + key_kyoko:'#bSummer Pockets', + sp_key_kanade:'#rAngel Beats!', + key_yuzuru:'#rAngel Beats!', + key_tsumugi:'#bSummer Pockets', + key_ayato:'#rAngel Beats!', + key_nagisa:'#gClannad', + key_tomoya:'#gClannad', + key_noda:'#rAngel Beats!', + key_hinata:'#rAngel Beats!', + key_hisako:'#rAngel Beats!', + key_doruji:'#bLittle Busters!', + key_riki:'#bLittle Busters!', + key_yuiko:'#bLittle Busters!', + key_akane:'#bRewrite', + key_sasami:'#bLittle Busters!', + key_rin:'#bLittle Busters!', + key_shiina:'#rAngel Beats!', + key_inari:'#bSummer Pockets', + key_saya:'#bLittle Busters!', + key_harukakanata:'#bLittle Busters!', + key_tsumugi:'#bSummer Pockets', + key_yui:'#rAngel Beats!', + key_yoshino:'#bRewrite', + key_kengo:'#bLittle Busters!', + key_iwasawa:'#rAngel Beats!', + key_masato:'#bLittle Busters!', + key_yusa:'#bCharlotte', + key_misa:'#rCharlotte', + key_yukine:'#gClannad', + key_komari:'#bLittle Busters!', + key_umi:'#bSummer Pockets', + key_rei:'#gHarmonia', + key_lucia:'#bRewrite', + key_kyousuke:'#bLittle Busters!', + key_yuri:'#rAngel Beats!', + key_haruko:'#bAIR', + sp_key_yuri:'#bAngel Beats!', + + key_kud:'#b千夜', + key_misuzu:'#b长发及腰黑长直', + key_kamome:'#b仿生纱', + key_nao:'#b潮鸣', + + ns_huangchengyan:'#g竹邀月', + ns_sunchensunjun:'#gVenusjeu', + ns_yuanxi:'#g食茸二十四', + ns_caoshuang:'#g荬庀芬兰', + + diy_wenyang:'#g最粗的梦想XD', + ns_zuoci:'#bskystarwuwei', + ns_lvzhi:'#bskystarwuwei', + ns_wangyun:'#rSukincen', + ns_guanlu:'#rSukincen', + ns_xinnanhua:'#rSukincen', + ns_nanhua:'#g戒除联盟', + ns_shenpei:'#g戒除联盟', + ns_huamulan:'#p哎别管我是谁', + ns_jinke:'#p哎别管我是谁', + ns_huangzu:'#r小芯儿童鞋', + ns_lisu:'#r小芯儿童鞋', + ns_yanliang:'#r丶橙续缘', + ns_wenchou:'#r丶橙续缘', + ns_caocao:'#r一瞬间丶遗忘', + ns_caocaosp:'#g希望教主', + ns_zhugeliang:'#p死不死什么的', + ns_xinxianying:'#b扶苏公子', + ns_zhangbao:'#b扶苏公子', + ns_wangyue:'#p废城君', + ns_sunjian:'#b兔子两只2', + ns_lvmeng:'#b兔子两只2', + ns_yujisp:'#b兔子两只2', + ns_yuji:'#g蔚屿凉音', + ns_simazhao:'#r一纸载春秋', + ns_duangui:'#b宝宝酱紫萌萌哒', + ns_masu:'#g修女', + ns_zhangxiu:'#p本因坊神策', + ns_yangyi:'#p本因坊神策', + ns_liuzhang:'#r矮子剑薄荷糖', + }, + card:{ + kamome_suitcase:{ + fullskin:true, + type:'equip', + subtype:'equip5', + derivation:'key_kamome', + skills:['kamome_suitcase'], + ai:{ + equipValue:function(card){ + return 7; + }, + basic:{ + equipValue:7 + } + } + }, + miki_hydrogladiator:{ + fullskin:true, + type:'equip', + subtype:'equip1', + derivation:'key_miki', + skills:['miki_hydrogladiator_skill'], + distance:{ + attackFrom:-5, + }, + ai:{ + equipValue:function(card){ + return 7; + }, + basic:{ + equipValue:7 + }, + }, + }, + miki_binoculars:{ + fullskin:true, + type:'equip', + subtype:'equip5', + derivation:'key_miki', + skills:['miki_binoculars'], + ai:{ + equipValue:function(card){ + return 7; + }, + basic:{ + equipValue:7 + }, + }, + }, + }, + perfectPair:{ + yuji:['zuoci'], + key_riki:['key_rin','key_saya','key_kyousuke'], + key_komari:['key_rin','key_sasami'], + key_masato:['key_kengo'], + key_yuiko:['key_harukakanata'], + key_doruji:['key_rin'], + key_tomoya:['key_nagisa','key_sunohara'], + key_ao:['key_inari'], + key_yuzuru:['key_hinata','key_kanade','key_ayato'], + key_yuri:['key_kanade'], + key_hinata:['key_yui'], + key_iwasawa:['key_hisako'], + key_lucia:['key_shizuru'], + }, + skill:{ + kaori_siyuan:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',lib.skill.kaori_siyuan.filterCard); + }, + filterCard:function(card){ + return ['equip','delay'].contains(get.type(card,false)); + }, + filterTarget:function(card,player,target){ + var card=ui.selected.cards[0]; + if(get.type(card,false)=='delay') return target.canAddJudge({name:card.name}); + return target.isEmpty(get.subtype(card,false)); + }, + discard:false, + lose:false, + prepare:'give', + content:function(){ + 'step 0' + var card=cards[0]; + if(get.type(card,false)=='equip') target.equip(card); + else target.addJudge(card); + 'step 1' + var list=[]; + for(var i of lib.inpile){ + var type=get.type(i); + if(type=='basic'||type=='trick') list.push([type,'',i]); + if(i=='sha'){ + list.push([type,'',i,'fire']); + list.push([type,'',i,'thunder']); + } + } + player.chooseButton(['是否视为使用一张基本牌或普通锦囊牌?',[list,'vcard']]).set('filterButton',function(button){ + return player.hasUseTarget({name:button.link[2],nature:button.link[3],isCard:true}); + }).set('ai',function(button){ + return player.getUseValue({name:button.link[2],nature:button.link[3],isCard:true}); + }); + 'step 2' + if(result.bool){ + player.chooseUseTarget(true,{name:result.links[0][2],nature:result.links[0][3],isCard:true}); + } + }, + ai:{ + basic:{ + order:10 + }, + result:{ + target:function(player,target){ + var card=ui.selected.cards[0]; + if(card) return get.effect(target,card,target,target); + return 0; + }, + }, + } + }, + shiori_huijuan:{ + trigger:{global:'phaseJieshuBegin'}, + direct:true, + locked:true, + filter:function(event,player){ + return event.player!=player&&event.player.getHistory('useCard',function(evt){ + return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card))&&player.hasUseTarget({ + name:evt.card.name, + nature:evt.card.nature, + isCard:true, + }); + }).length>0; + }, + content:function(){ + 'step 0' + var list=[]; + trigger.player.getHistory('useCard',function(evt){ + if(!evt.isPhaseUsing()||!['basic','trick'].contains(get.type(evt.card))) return; + if(evt.card.name=='sha'&&evt.card.nature) list.add('sha:'+evt.card.nature); + else list.add(evt.card.name); + }); + for(var i=0;i=0){ + if(stat[i].isMe) break; + if(stat[i].skill&&stat[i].skill.shiori_huijuan) num++; + } + return num>=Math.max(2,game.countPlayer()/2); + }, + forced:true, + content:function(){ + 'step 0' + if(!player.countDiscardableCards(player,'ej')) event._result={bool:false}; + else player.discardPlayerCard(player,'ej').set('ai',function(button){ + var card=button.link; + var player=_status.event.player; + if(get.position(card)=='j') return 7+Math.random(); + return 4+player.needsToDiscard()-get.value(card); + }); + 'step 1' + if(!result.bool) player.skip('phaseUse'); + }, + }, + miki_shenqiang:{ + trigger:{ + global:'gameDrawAfter', + player:'enterGame', + }, + forced:true, + content:function(){ + player.equip(game.createCard2('miki_hydrogladiator','club',6)); + player.equip(game.createCard2('miki_binoculars','diamond',6)); + }, + mod:{ + canBeDiscarded:function(card){ + if(get.position(card)=='e'&&['equip1','equip5'].contains(get.subtype(card))) return false; + }, + }, + }, + miki_huanmeng:{ + inherit:'kamome_huanmeng', + }, + miki_zhiluo:{ + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return !event.player.countCards('e')&&player.inRange(event.player); + }, + direct:true, + locked:true, + content:function(){ + 'step 0' + if(!player.canUse('sha',trigger.player,false)) event._result={index:0}; + else player.chooseControl().set('prompt','制裸:请选择一项').set('choiceList',[ + '摸一张牌', + '视为对'+get.translation(trigger.player)+'使用一张【杀】', + ]).set('ai',function(){ + if(get.effect(_status.event.getTrigger().player,{name:'sha'},_status.event.player)>0) return 1; + return 0; + }); + 'step 1' + if(result.index==0){ + player.logSkill('miki_zhiluo'); + player.draw(); + } + else player.useCard({name:'sha',isCard:true},trigger.player,'miki_zhiluo'); + }, + }, + miki_hydrogladiator_skill:{ + trigger:{ + source:'damageSource', + }, + direct:true, + locked:true, + popup:'海德洛', + filter:function(event,player){ + return event.getParent().name=='sha'&&game.hasPlayer(function(current){ + return (current==event.player||current!=player&&get.distance(current,event.player)<=1)&¤t.countDiscardableCards(player,'he')>0; + }); + }, + content:function(){ + 'step 0' + var list=[]; + var choiceList=[]; + if(trigger.player.countDiscardableCards(player,'he')>0){ + list.push(true); + choiceList.push('弃置'+get.translation(trigger.player)+'的两张牌'); + } + if(game.hasPlayer(function(current){ + return current!=player&&get.distance(current,trigger.player)<=1; + })){ + list.push(false); + choiceList.push('弃置所有至'+get.translation(trigger.player)+'距离为1的角色的各一张牌'); + } + event.list=list; + if(list.length==1) event._result={index:0}; + else{ + player.chooseControl().set('choiceList',choiceList).set('prompt','海德洛格拉迪尔特·改').set('ai',function(){ + var player=_status.event.player; + var source=_status.event.getTrigger().player; + var num=game.countPlayer(function(current){ + if(current!=player&&get.distance(current,source)<=1&¤t.countDiscardableCards(player,'he')>0) return -get.sgn(get.attitude(player,current)); + }); + if(num>Math.min(2,source.countDiscardableCards(player,'he'))) return 1; + return 0; + }); + } + 'step 1' + if(event.list[result.index]){ + player.logSkill(['miki_hydrogladiator_skill','海德洛'],trigger.player); + player.discardPlayerCard(trigger.player,'he',2,true); + event.finish(); + } + else{ + event.targets=game.filterPlayer(function(current){ + return current!=player&&get.distance(current,trigger.player)<=1; + }).sortBySeat(); + player.logSkill(['miki_hydrogladiator_skill','海德洛'],event.targets); + } + 'step 2' + var target=targets.shift(); + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); + if(targets.length) event.redo(); + }, + }, + miki_binoculars:{ + locked:true, + ai:{ + viewHandcard:true, + skillTagFilter:function(player,tag,arg){ + if(player==arg) return false; + }, + }, + }, + kud_qiaoshou:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.getStorage('kud_qiaoshou_equip').length&&player.countCards('h')>0; + }, + chooseButton:{ + dialog:function(){ + var list=[]; + for(var i of lib.inpile){ + var sub=get.subtype(i); + if(['equip1','equip4'].contains(sub)) list.push([sub,'',i]); + } + return ui.create.dialog('巧手:选择一种装备牌',[list,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player; + var name=button.link[2]; + if(get.subtype(name)=='equip4'||player.getEquip(name)) return 0; + var sha=player.countCards('h','sha'); + switch(name){ + case 'zhuge': + return sha-player.getCardUsable('sha'); + case 'guding': + if(sha>0&&game.hasPlayer(function(current){ + return get.attitude(player,current)<0&&!current.countCards('h')&&player.canUse('sha',current)&&get.effect(current,{name:'sha'},player)>0; + })) return 1.4+Math.random(); + return 0; + case 'guanshi': + if(sha>0) return 0.7+Math.random(); + return 0; + case 'qinggang': + if(sha>0) return 0.4+Math.random(); + return 0; + case 'zhuque': + if(game.hasPlayer(function(current){ + return get.attitude(player,current)<0&¤t.getEquip('tengjia')&&get.effect(current,{name:'sha',nature:'fire'},player)>0; + })) return 1.2+Math.random(); + return 0; + default: return 0; + } + }, + backup:function(links){ + var next=get.copy(lib.skill.kud_qiaoshou_backupx); + next.cardname=links[0][2]; + return next; + }, + prompt:function(links){ + return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]); + }, + }, + group:'kud_qiaoshou_end', + ai:{ + order:5, + result:{ + player:1, + }, + }, + }, + kud_qiaoshou_backupx:{ + filterCard:true, + discard:false, + toStorage:true, + delay:false, + check:function(event,player){ + return 6-get.value(card); + }, + content:function(){ + player.addTempSkill('kud_qiaoshou_equip',{player:['phaseUseEnd','phaseZhunbeiBegin']}); + var name=lib.skill.kud_qiaoshou_backup.cardname; + player.storage.kud_qiaoshou_equip2=name; + player.markAuto('kud_qiaoshou_equip',cards); + var info=lib.card[name].skills; + if(info&&info.length) player.addAdditionalSkill('kud_qiaoshou_equip',info); + player.draw(); + game.log(player,'声明了','#y'+get.translation(name)); + }, + ai:{ + result:{ + player:1, + }, + }, + }, + kud_qiaoshou_equip:{ + charlotte:true, + mod:{ + globalFrom:function(from,to,distance){ + var info=lib.card[from.storage.kud_qiaoshou_equip2]; + if(info&&info.distance&&info.distance.globalFrom) return distance+info.distance.globalFrom; + }, + globalTo:function(from,to,distance){ + var info=lib.card[to.storage.kud_qiaoshou_equip2]; + if(info&&info.distance&&info.distance.globalTo) return distance+info.distance.globalTo; + }, + attackFrom:function(from,to,distance){ + var info=lib.card[from.storage.kud_qiaoshou_equip2]; + if(info&&info.distance&&info.distance.attackFrom) return distance+info.distance.attackFrom; + }, + attackTo:function(from,to,distance){ + var info=lib.card[to.storage.kud_qiaoshou_equip2]; + if(info&&info.distance&&info.distance.attackTo) return distance+info.distance.attackTo; + }, + }, + intro:{ + mark:function(dialog,storage,player){ + dialog.add(storage); + dialog.addText('当前装备:'+get.translation(player.storage.kud_qiaoshou_equip2)); + var str2=lib.translate[player.storage.kud_qiaoshou_equip2+'_info']; + if(str2){ + if(str2.length>=12) dialog.addText(str2,false); + else dialog.addText(str2); + } + }, + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + player.removeAdditionalSkill('kud_qiaoshou_equip'); + delete player.storage.kud_qiaoshou_equip2; + player.addEquipTrigger(); + }, + }, + }, + kud_qiaoshou_end:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&!player.getStorage('kud_qiaoshou_equip').length; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i of lib.inpile){ + var sub=get.subtype(i); + if(['equip2','equip3'].contains(sub)) list.push([sub,'',i]); + } + player.chooseButton([get.prompt('kud_qiaoshou'),[list,'vcard']]).set('ai',function(button){ + var player=_status.event.player; + var name=button.link[2]; + if(get.subtype(name)=='equip3'||player.getEquip(name)) return false; + switch(name){ + case 'yexingyi': + if(player.hp>2||player.getEquip('bagua')||player.getEquip('tengjia')) return 1.5+Math.random(); + return 0.5+Math.random(); + case 'bagua':case 'renwang': + if(player.getEquip('bagua')||player.getEquip('tengjia')||player.getEquip('renwang')) return Math.random(); + return 1.2+Math.random(); + case 'tengjia': + if(player.getEquip('baiyin')) return 1.3+Math.random(); + return Math.random(); + case 'baiyin': + return 0.4+Math.random(); + default: return 0; + } + }); + 'step 1' + if(result.bool){ + player.logSkill('kud_qiaoshou'); + event.cardname=result.links[0][2]; + player.chooseCard('h',true,'将一张手牌置于武将牌上,然后视为装备'+get.translation(event.cardname)); + } + else event.finish(); + 'step 2' + player.addTempSkill('kud_qiaoshou_equip',{player:['phaseUseEnd','phaseZhunbeiBegin']}); + var name=event.cardname; + player.storage.kud_qiaoshou_equip2=name; + var cards=result.cards; + player.lose(cards,ui.special,'toStorage'); + player.markAuto('kud_qiaoshou_equip',cards); + var info=lib.card[name].skills; + if(info&&info.length) player.addAdditionalSkill('kud_qiaoshou_equip',info); + player.draw(); + game.log(player,'声明了','#y'+get.translation(name)); + }, + }, + kud_buhui:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&player==event.dying&&(player.getStorage('kud_qiaoshou_equip').length+player.countCards('e'))>0; + }, + skillAnimation:true, + limited:true, + animationColor:'gray', + content:function(){ + 'step 0' + player.awakenSkill('kud_buhui'); + var cards=player.getCards('e'); + var length=player.getStorage('kud_qiaoshou_equip').length; + if(cards.length) player.discard(cards); + player.removeSkill('kud_qiaoshou_equip'); + player.draw(cards.length+length); + player.addSkill('kud_chongzhen'); + 'step 1' + var num=2-player.hp; + if(num) player.recover(num); + }, + derivation:'riki_chongzhen', + ai:{ + order:0.5, + result:{ + player:1, + }, + save:true, + skillTagFilter:function(player){ + return player.isDying(); + }, + }, + }, + kud_chongzhen:{ + inherit:'riki_chongzhen', + }, + misuzu_hengzhou:{ + trigger:{player:['phaseJieshuBegin','recoverEnd','damageEnd','phaseDrawBegin2','phaseZhunbeiBegin']}, + forced:true, + filter:function(event,player){ + if(event.name=='phaseZhunbei') return true; + if(['damage','recover'].contains(event.name)) return event.num>0; + var num=player.countMark('misuzu_hengzhou'); + if(event.name=='phaseDraw') return num>0&&!event.numFixed; + return num>3; + }, + content:function(){ + var num=player.countMark('misuzu_hengzhou'); + if(trigger.name=='phaseDraw') trigger.num+=num; + else if(trigger.name=='phaseJieshu'){ + player.removeMark('misuzu_hengzhou',num); + player.loseHp(); + } + else player.addMark('misuzu_hengzhou',trigger.num||1); + }, + intro:{ + name:'诅咒', + name2:'诅咒', + content:'mark', + }, + marktext:'诅', + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('misuzu_hengzhou'); + }, + }, + }, + misuzu_nongyin:{ + enable:'chooseToUse', + viewAs:{ + name:'tao', + isCard:true, + }, + viewAsFilter:function(player){ + return !player.hasJudge('lebu')&&player.countCards('he',function(card){ + return get.color(card)=='red'&&get.type(card,'trick')!='trick'; + }); + }, + filterCard:function(card){ + return get.color(card)=='red'&&get.type(card,'trick')!='trick'; + }, + check:function(card){ + return 7+(_status.event.dying||_status.event.player).getDamagedHp()-get.value(card); + }, + ignoreMod:true, + position:'he', + precontent:function(){ + player.logSkill('misuzu_nongyin'); + player.$throw(event.result.cards); + player.addJudge({name:'lebu'},event.result.cards); + event.result.card.cards=[]; + event.result.cards=[]; + delete event.result.skill; + delete event.result.card.suit; + delete event.result.card.number; + }, + ai:{ + result:0.5, + save:true, + skillTagFilter:function(player){ + return !player.hasJudge('lebu')&&player.countCards('he',function(card){ + return get.color(card)=='red' + }); + }, + }, + }, + misuzu_zhongxing:{ + trigger:{player:'loseAfter'}, + direct:true, + filter:function(event,player){ + return event.js&&event.js.length>0&&!player.hasSkill('misuzu_zhongxing_haruko'); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('misuzu_zhongxing'),'令一名角色选择摸两张牌或回复1点体力').set('ai',function(card){ + return get.attitude(_status.event.player,card); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('misuzu_zhongxing',target); + player.addTempSkill('misuzu_zhongxing_haruko'); + target.chooseDrawRecover(2,true); + } + }, + }, + misuzu_zhongxing_haruko:{}, + kamome_suitcase:{ + trigger:{player:['phaseJudgeBefore','phaseDiscardBefore','turnOverBefore']}, + forced:true, + popup:false, + equipSkill:true, + content:function(){ + trigger.cancel(); + }, + }, + kamome_yangfan:{ + trigger:{ + global:'gameDrawAfter', + player:['enterGame','loseAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.name!='lose') return true; + return event.es&&event.es.length; + }, + content:function(){ + if(trigger.name=='lose') player.draw(2*trigger.es.length); + else player.equip(game.createCard2('kamome_suitcase','spade',1)); + }, + ai:{ + noe:true, + reverseEquip:true, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; + } + } + } + }, + kamome_huanmeng:{ + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + content:function(){ + "step 0" + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var num=1+player.countCards('e'); + var cards=get.cards(num); + event.cards=cards; + var switchToAuto=function(){ + _status.imchoosing=false; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + var top=[]; + var judges=player.getCards('j'); + var stopped=false; + if(!player.hasWuxie()){ + for(var i=0;i=num&&!player.hasSkill('kamome_jieban_phase'); + }, + content:function(){ + 'step 0' + event.num=player.storage.kamome_jieban?1:2; + player.chooseCardTarget({ + position:'he', + filterCard:true, + filterTarget:lib.filter.notMe, + selectCard:event.num, + prompt:get.prompt('kamome_jieban'), + prompt2:event.num==2?'将两张牌交给一名其他角色,然后其交给你一张牌。':'将一张牌交给一名其他角色,然后其交给你两张牌。', + ai1:function(card){ + if(card.name=='du') return 20; + var val=get.value(card); + var player=_status.event.player; + if(get.position(card)=='e'){ + if(val<=0) return 10; + return 10/val; + } + return 6-val; + }, + ai2:function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(ui.selected.cards[0].name=='du') return -2*att; + if(att>0) return 1.5*att; + var num=get.select(_status.event.selectCard)[1]; + if(att<0&&num==1) return -0.7*att; + return att; + }, + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('kamome_jieban',target); + player.addTempSkill('kamome_jieban_phase'); + target.gain(result.cards,player,'giveAuto'); + player.storage.kamome_jieban=!player.storage.kamome_jieban; + } + else event.finish(); + 'step 2' + var num=3-event.num; + var hs=target.getCards('he'); + if(hs.length){ + if(hs.length<=num) event._result={bool:true,cards:hs}; + else{ + target.chooseCard('he',true,'交给'+get.translation(player)+get.cnNumber(num)+'张牌',num).set('ai',function(card){ + var player=_status.event.player; + var target=_status.event.getParent().player; + if(get.attitude(player,target)>0){ + if(!target.hasShan()&&card.name=='shan') return 10; + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')&&target.hasUseTarget(card)) return 10-get.value(card); + return 6-get.value(card); + } + return -get.value(card); + }); + } + } + else event.finish(); + 'step 3' + player.gain(result.cards,target,'giveAuto'); + }, + }, + kamome_jieban_phase:{}, + nao_duyin:{ + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + return event.player!=player&&(!player.storage.nao_duyin||!player.storage.nao_duyin.contains(event.player)); + }, + logTarget:'player', + charlotte:true, + check:function(){ + return false; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('he','弃置一张牌,或将武将牌翻面').set('ai',function(card){ + if(_status.event.player.isTurnedOver()) return 0; + return 6-get.value(card); + }); + 'step 1' + if(!result.bool) player.turnOver(); + player.addTempSkill('nao_duyin2',{player:'phaseAfter'}); + if(!player.storage.nao_duyin) player.storage.nao_duyin=[]; + player.storage.nao_duyin.push(trigger.player); + if(!player.storage.nao_duyin2) player.storage.nao_duyin2=[]; + player.storage.nao_duyin2.push(trigger.player); + player.markSkill('nao_duyin2'); + }, + }, + nao_duyin2:{ + intro:{ + content:'$不能使用牌指定你为目标,对$使用牌没有距离和次数限制', + }, + mod:{ + targetEnabled:function(card,player,target){ + if(target.storage.nao_duyin2&&target.storage.nao_duyin2.contains(player)) return false; + }, + targetInRange:function(card,player,target){ + if(player.storage.nao_duyin2&&player.storage.nao_duyin2.contains(target)) return true; + }, + }, + trigger:{player:'useCardEnd'}, + firstDo:true, + silent:true, + onremove:true, + filter:function(event,player){ + if(player.storage.nao_duyin2){ + for(var i of player.storage.nao_duyin2){ + if(event.targets.contains(i)) return true; + } + } + return false; + }, + content:function(){ + if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat(); + if(stat&&stat.card&&stat.card[trigger.card.name]) stat.card[trigger.card.name]--; + } + }, + }, + nao_wanxin:{ + trigger:{global:'roundStart'}, + hasHistory:function(player){ + var list=player.actionHistory; + for(var i=list.length-1;i>=0;i--){ + if(list[i].isRound) break; + } + list=list.slice(i); + return list.filter(function(yuu){ + return yuu.damage&&yuu.damage.length>0; + }).length>0; + }, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return lib.skill.nao_wanxin.hasHistory(current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nao_wanxin'),function(card,player,target){ + return _status.event.yuus.contains(target); + }).set('yuus',game.filterPlayer(function(current){ + return lib.skill.nao_wanxin.hasHistory(current); + })).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('nao_wanxin',target); + target.draw(2); + } + else event.finish(); + 'step 2' + player.turnOver(false); + 'step 3' + player.link(false); + if(target==player) event.finish(); + 'step 4' + target.turnOver(false); + 'step 5' + target.link(false); + }, + }, + nao_shouqing:{ + global:'nao_shouqing2', + }, + nao_shouqing2:{ + enable:'phaseUse', + viewAs:function(){ + return {name:'tao'} + }, + filterCard:{name:'tao'}, + ignoreMod:true, + filterTarget:function(card,player,target){ + return target!=player&&target.isDamaged()&&target.hasSkill('nao_shouqing'); + }, + selectTarget:function(){ + return game.countPlayer(function(current){ + return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); + })>1?1:-1; + }, + filter:function(event,player){ + return player.countCards('h','tao')&&game.hasPlayer(function(current){ + return lib.skill.nao_shouqing2.filterTarget(null,player,current) + }); + }, + onuse:function(links,player){ + player.addSkill('nao_shouqing3'); + player.addMark('nao_shouqing3',1,false); + }, + prompt:function(){ + var list=game.filterPlayer(function(current){ + return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); + }); + var str='对'+get.translation(list); + if(list.length>1) str+='中的一名角色'; + str+='使用一张【桃】'; + return str; + }, + }, + nao_shouqing3:{ + intro:{ + content:'手牌上限+#', + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('nao_shouqing3'); + }, + }, + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='nao_shouqing2'; + }, + content:function(){ + player.draw(); + }, + }, + shiorimiyuki_banyin:{ + trigger:{player:['damageEnd','recoverEnd']}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged(); + }) + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('shiorimiyuki_banyin'),'令一名其他角色回复1点体力',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return get.recoverEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('shiorimiyuki_banyin',target); + target.recover(); + } + }, + }, + shiorimiyuki_tingxian:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseControl('一张','两张','三张','cancel2').set('prompt',get.prompt2('shiorimiyuki_tingxian')).set('ai',function(){ + var player=_status.event.player; + var max=Math.min(player.hp+1,player.maxHp) + var min=Math.min(Math.max(max-2,max-player.hp),3); + if(min) return min-1; + return 3; + }); + 'step 1' + if(result.control=='cancel2'){event.finish();return;} + var num=1+result.index; + player.draw(num); + 'step 2' + event.cards=result; + player.recover(); + 'step 3' + if(get.itemtype(cards)=='cards'){ + trigger.shiorimiyuki_tingxian=cards; + player.addTempSkill('shiorimiyuki_tingxian2'); + } + }, + }, + shiorimiyuki_tingxian2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + charlotte:true, + mod:{ + aiOrder:function(player,card,num){ + var cards=_status.event.getParent('phaseUse').shiorimiyuki_tingxian; + if(cards&&cards.contains(card)) return num+2; + }, + aiValuetarget:function(player,card,num){ + var cards=_status.event.getParent('phaseUse').shiorimiyuki_tingxian; + if(cards&&cards.contains(card)) return 0; + }, + }, + filter:function(event,player){ + var hs=player.getCards('h'); + return Array.isArray(event.shiorimiyuki_tingxian)&&event.shiorimiyuki_tingxian.filter(function(card){ + return hs.contains(card); + }).length>0 + }, + content:function(){ + var hs=player.getCards('h'); + player.loseHp(trigger.shiorimiyuki_tingxian.filter(function(card){ + return hs.contains(card); + }).length); + }, + }, + shizuru_nianli:{ + enable:'chooseToUse', + prompt:'展示一张♦/♣/♥/♠手牌,然后视为使用一张雷杀/闪/桃/无懈可击', + viewAs:function(cards,player){ + var name=false; + var nature=null; + switch(get.suit(cards[0],player)){ + case 'club':name='shan';break; + case 'diamond':name='sha';nature='thunder';break; + case 'spade':name='wuxie';break; + case 'heart':name='tao';break; + } + if(name) return {name:name,nature:nature,isCard:true}; + return null; + }, + check:function(card){ + var player=_status.event.player; + if(_status.event.type=='phase'){ + var max=0; + var name2; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'fire':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'fire':null}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.suit(card,player)) return 1; + return 0; + } + return 1; + }, + ignoreMod:true, + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.suit(card,player); + if(name=='club'&&filter({name:'shan'},player,event)) return true; + if(name=='diamond'&&filter({name:'sha',nature:'thunder'},player,event)) return true; + if(name=='spade'&&filter({name:'wuxie'},player,event)) return true; + if(name=='heart'&&filter({name:'tao'},player,event)) return true; + return false; + }, + filter:function(event,player){ + if(player.hasSkill('shizuru_nianli_round')) return false; + var filter=event.filterCard; + if(filter({name:'sha',nature:'thunder'},player,event)&&player.countCards('h',{suit:'diamond'})) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h',{suit:'club'})) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h',{suit:'heart'})) return true; + if(filter({name:'wuxie'},player,event)&&player.countCards('h',{suit:'spade'})) return true; + return false; + }, + precontent:function(){ + player.logSkill('shizuru_nianli'); + player.addTempSkill('shizuru_nianli_round','roundStart'); + player.showCards(get.translation(player)+'发动了【念力】',event.result.cards.slice(0)); + event.result.card.cards=[]; + event.result.cards=[]; + delete event.result.skill; + delete event.result.card.suit; + delete event.result.card.number; + event.getParent().addCount=false; + event.getParent().shizuru_nianli=true; + }, + ai:{ + respondSha:true, + respondShan:true, + save:true, + skillTagFilter:function(player,tag){ + if(player.hasSkill('shizuru_nianli_round')) return false; + var name; + switch(tag){ + case 'respondSha':name='diamond';break; + case 'respondShan':name='club';break; + case 'save':name='heart';break; + } + if(!player.countCards('h',{suit:name})) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'thunder':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'thunder':null}); + if(temp>max) max=temp; + } + } + max/=1.1; + return max; + } + return 2; + }, + }, + hiddenCard:function(player,name){ + return name=='wuxie'&&player.countCards('h',{suit:'spade'})>0&&!player.hasSkill('shizuru_nianli_round'); + }, + group:'shizuru_nianli_clear', + subSkill:{ + round:{ + mark:true, + intro:{content:'本轮已发动'}, + }, + clear:{ + trigger:{player:'useCardAfter'}, + lastDo:true, + silent:true, + filter:function(event,player){ + return event.getParent().shizuru_nianli==true; + }, + content:function(){ + player.getHistory('useCard').remove(trigger); + }, + }, + }, + }, + shizuru_benzhan:{ + trigger:{global:['useCard','respond']}, + direct:true, + filter:function(event,player){ + return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); + }, + content:function(){ + 'step 0' + event.type=get.type(trigger.card)=='basic'; + var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; + player.chooseTarget(get.prompt('shizuru_benzhan'),prompt).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.getParent().type){ + var att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) return -att; + if(target.countCards('he')==1&&att<0) att/=2; + return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) + } + return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('shizuru_benzhan',target,'thunder'); + var trans=get.translation(target); + var list; + if(event.type){ + if(!target.countCards('he')) event._result={index:0}; + else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; + } + else{ + if(target.isHealthy()) event._result={index:1}; + else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; + } + player.chooseControl().set('choiceList',list).set('choice',function(){ + if(event.type) return (get.attitude(player,target)>0)?0:1; + return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; + }()).set('ai',function(){ + return _status.event.choice; + }); + } + else event.finish(); + 'step 2' + player.addExpose(0.2); + if(event.type){ + if(result.index==0) target.draw(2); + else target.chooseToDiscard(2,'he',true); + } + else{ + if(result.index==0) target.recover(); + else target.damage(); + } + }, + }, + kyoko_juwu:{ + trigger:{global:['loseAfter','cardsDiscardAfter']}, + direct:true, + filter:function(event,player){ + return player!=event.player&&player!=_status.currentPhase&&event.cards&&event.cards.filter(function(card){ + return get.position(card,true)=='d'&&get.type(card,false)=='equip'; + }).length>0; + }, + content:function(){ + 'step 0' + var cards=trigger.cards.filter(function(card){ + return get.position(card,true)=='d'&&get.type(card,false)=='equip'; + }); + player.chooseButton([get.prompt('kyoko_juwu'),cards],[1,cards.length]).set('ai',function(){return 1}); + 'step 1' + if(result.bool){ + player.gain(result.links,'gain2','log'); + player.logSkill('kyoko_juwu'); + } + }, + }, + kyoko_zhengyi:{ + group:['kyoko_jingce','kyoko_shelie','kyoko_zhiheng'], + count:function(player){ + var list=[]; + player.countCards('e',function(card){ + list.add(get.suit(card,player)); + }); + return list.length; + }, + }, + kyoko_jingce:{ + trigger:{player:['phaseUseEnd','phaseJieshuBegin']}, + filter:function(event,player){ + var num=lib.skill.kyoko_zhengyi.count(player); + if(!num||(event.name=='phaseUse')==(num>3)) return false; + return player.getHistory('useCard',function(evt){ + return event.name!='phaseUse'||evt.getParent('phaseUse')==event; + }).length>=player.hp; + }, + frequent:true, + content:function(){ + player.draw(2); + }, + }, + kyoko_shelie:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return !event.numFixed&&lib.skill.kyoko_zhengyi.count(player)>1; + }, + content:function(){ + "step 0" + trigger.changeToZero(); + event.cards=get.cards(5); + game.cardsGotoOrdering(event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto){ + str='涉猎:获取花色各不相同的牌'; + } + else{ + str='涉猎'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['涉猎',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([0,5],true); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var cards2=event.cards2; + player.gain(cards2,'log','gain2'); + }, + }, + kyoko_zhiheng:{ + enable:'phaseUse', + usable:1, + position:'he', + filter:function(event,player){ + return lib.skill.kyoko_zhengyi.count(player)>2; + }, + prompt:function(){ + var str='弃置任意张牌并摸等量的牌'; + if(lib.skill.kyoko_zhengyi.count(_status.event.player)>3) str+=',若弃置了所有手牌则多摸一张牌。'; + return str; + }, + filterCard:lib.filter.cardDiscardable, + discard:false, + lose:false, + delay:false, + selectCard:[1,Infinity], + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='h'){ + return 8-get.value(card); + } + return 6-get.value(card) + }, + content:function(){ + 'step 0' + player.discard(cards); + event.num=1; + var hs=player.getCards('h'); + if(!hs.length||lib.skill.kyoko_zhengyi.count(player)<4) event.num=0; + else for(var i=0;i1; + }, + content:function(){ + player.awakenSkill(event.name); + var num=player.maxHp-player.hp; + player.recover(num); + player.draw(num); + if(_status.characterlist&&_status.characterlist.contains('key_midori')){ + player.reinit('key_mio','key_midori',false); + _status.characterlist.remove('key_midori'); + _status.characterlist.add('key_mio'); + } + }, + }, + midori_nonghuan:{ + enable:'phaseUse', + filter:function(event,player){ + return (player.getStat('skill').midori_nonghuan||0)0; + }, + content:function(){ + 'step 0' + var stat=player.getStat(); + if(!stat.midori_nonghuan) stat.midori_nonghuan=[]; + stat.midori_nonghuan.push(target); + player.gainPlayerCard(target,'hej',true); + player.draw(); + 'step 1' + if(player.countCards('he')>0) player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌'); + else event.goto(3); + 'step 2' + target.gain(result.cards,player,'giveAuto'); + 'step 3' + var history=game.getGlobalHistory('cardMove'); + for(var i=0;i1; + }, + content:function(){ + player.awakenSkill(event.name); + var num=player.maxHp-player.hp; + player.recover(num); + player.draw(num); + if(_status.characterlist&&_status.characterlist.contains('key_mio')){ + player.reinit('key_midori','key_mio',false); + _status.characterlist.remove('key_mio'); + _status.characterlist.add('key_midori'); + } + }, + }, + kanade_mapo:{ + derivation:'mapodoufu', + enable:'chooseToUse', + viewAs:{name:'mapodoufu'}, + filterCard:{suit:'heart'}, + viewAsFilter:function(player){ + return player.countCards('he',{suit:'heart'})>0; + }, + position:'he', + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='mapodoufu'&&range[1]!=-1) range[1]++; + }, + }, + check:function(card){ + var player=_status.event.player; + if(game.countPlayer(function(current){ + return player.canUse('mapodoufu',current)&&get.effect(current,{name:'mapodoufu'},player,player)>0; + })>1) return 6-get.value(card); + return 4-get.value(card); + }, + }, + kanade_benzhan:{ + trigger:{global:['useCard','respond']}, + direct:true, + filter:function(event,player){ + return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); + }, + content:function(){ + 'step 0' + event.type=get.type(trigger.card)=='basic'; + var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; + player.chooseTarget(get.prompt('kanade_benzhan'),prompt).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.getParent().type){ + var att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) return -att; + if(target.countCards('he')==1&&att<0) att/=2; + return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) + } + return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('kanade_benzhan',target,'thunder'); + var trans=get.translation(target); + var list; + if(event.type){ + if(!target.countCards('he')) event._result={index:0}; + else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; + } + else{ + if(target.isHealthy()) event._result={index:1}; + else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; + } + player.chooseControl().set('choiceList',list).set('choice',function(){ + if(event.type) return (get.attitude(player,target)>0)?0:1; + return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; + }()).set('ai',function(){ + return _status.event.choice; + }); + } + else event.finish(); + 'step 2' + player.addExpose(0.2); + if(event.type){ + if(result.index==0) target.draw(2); + else target.chooseToDiscard(2,'he',true); + } + else{ + if(result.index==0) target.recover(); + else target.damage(); + } + }, + }, + yuzuru_wuxin:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterTarget:function(){ + if(ui.selected.cards.length) return false; + return true; + }, + filterCard:function(){ + if(ui.selected.targets.length) return false; + return lib.filter.cardDiscardable.apply(this,arguments); + }, + selectTarget:function(){ + if(!ui.selected.cards.length) return [1,1]; + return [0,1]; + }, + selectCard:function(){ + if(!ui.selected.cards.length) return [0,2]; + return [2,2]; + }, + prompt:get.prompt2('yuzuru_wuxin'), + ai1:function(card){ + var player=_status.event.player; + if(player.hp>3) return 0; + return player.getDamagedHp()*2-get.value(card); + }, + ai2:function(target){ + if(player.hp<4||target.hasSkillTag('nogain')) return 0; + return get.attitude(_status.event.player,target); + }, + }); + 'step 1' + if(result.bool){ + if(result.cards.length){ + player.logSkill('yuzuru_wuxin'); + player.discard(result.cards); + player.recover(); + } + else{ + var target=result.targets[0]; + player.logSkill('yuzuru_wuxin',target,{color:[194,117,92]}); + player.loseHp(); + target.draw(2); + } + } + }, + }, + yuzuru_deyi:{ + derivation:['yuzuru_kunfen','yuzuru_quji','yuzuru_wangsheng','yuzuru_kunfen_rewrite','yuzuru_quji_rewrite'], + trigger:{global:'dieAfter'}, + forced:true, + unique:true, + juexingji:true, + skillAnimation:true, + animationColor:'orange', + content:function(){ + player.awakenSkill('yuzuru_deyi'); + player.removeSkill('yuzuru_wuxin'); + player.addSkillLog('yuzuru_kunfen'); + player.addSkillLog('yuzuru_quji'); + player.addSkillLog('yuzuru_wangsheng'); + player.loseMaxHp(); + player.recover(); + }, + }, + yuzuru_kunfen:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + 'step 0' + if(!player._yuzuru_sss) player.loseHp(); + player.draw(2); + 'step 1' + if(player.countCards('he')<2) event.finish(); + else{ + player.chooseCardTarget({ + selectCard:2, + filterTarget:lib.filter.notMe, + prompt:'是否交给一名其他角色两张牌?', + position:'he', + ai1:function(card){ + var player=_status.event.player; + if(player.maxHp-player.hp==1&&card.name=='du') return 30; + var check=player.countCards('h')-2; + if(check<1) return 0; + if(player.hp>1&&check<2) return 0; + return get.unuseful(card)+9; + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; + return att-2; + }, + }); + } + 'step 2' + if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); + }, + }, + yuzuru_quji:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + return player.getDamagedHp(); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.hp0){ + player.chooseCardTarget({ + selectCard:[1,Infinity], + filterTarget:lib.filter.notMe, + prompt:'将任意张牌交给一名其他角色,或点【取消】。', + position:'he', + ai1:function(card){ + var player=_status.event.player; + if(get.suit(card,false)=='heart'&&game.hasPlayer(function(current){ + return current.hasSkill('kanade_mapo')&&get.attitude(player,current)>0; + })) return 1; + return 0; + }, + ai2:function(kanade){ + if(kanade.hasSkill('kanade_mapo')&&get.attitude(_status.event.player,kanade)>0) return 2; + return 0; + }, + }); + } + else event.goto(2); + 'step 1' + if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); + 'step 2' + player.loseMaxHp(); + 'step 3' + if(player.hp<2) player.recover(2-player.hp); + }, + }, + ao_xishi:{ + trigger:{ + player:['useCard','respond'], + target:'useCardToTargeted', + }, + forced:true, + filter:function(event,player,name){ + return (name=='useCard'||name=='respond'||event.player!=player)&&get.suit(event.card)=='diamond'; + }, + content:function(){player.draw()}, + }, + ao_kuihun:{ + trigger:{global:'dying'}, + logTarget:'player', + line:'thunder', + filter:function(event,player){ + return player!=event.player; + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(!trigger.player.countCards('h')) event.finish(); + else player.chooseButton(['选择一张牌作为「蝶」',trigger.player.getCards('h')]).set('ai',function(button){ + var val=get.buttonValue(button); + if(get.attitude(_status.event.player,get.owner(button.link))>0) return -val; + return val; + }); + 'step 2' + if(result.bool){ + trigger.player.lose(result.links,ui.special,'visible','toStorage'); + trigger.player.$give(result.links,player,false); + player.markAuto('ao_diegui',result.links); + game.log(result.links,'飞向了',player); + } + }, + locked:false, + mod:{ + targetInRange:function(card,player){ + var list=player.getStorage('ao_diegui'); + for(var i=0;i2; + }, + content:function(){ + player.awakenSkill('ao_shixin'); + player.removeSkill('ao_kuihun'); + player.addSkill('ao_diegui'); + player.gainMaxHp(); + player.recover(); + }, + }, + ao_diegui:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getStorage('ao_diegui').length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('蝶归',player.storage.ao_diegui,'hidden'); + }, + backup:function(links,player){ + return { + card:links, + filterCard:function(){return false}, + selectCard:-1, + filterTarget:true, + delay:false, + content:lib.skill.ao_diegui.contentx, + line:'thunder', + ai:{ + result:{ + target:function(player,target){ + if(target!=player&&target.hasSkillTag('nogain')) return 0; + var num=1; + if(target.isTurnedOver()) num+=2; + if(target.isLinked()) num+=0.5; + return num; + }, + } + }, + } + }, + prompt:function(links,player){ + return '选择一名角色,令其获得'+get.translation(links[0])+',摸两张牌并将武将牌复原。' + }, + }, + contentx:function(){ + 'step 0' + target.gain(lib.skill.ao_diegui_backup.card,player,'give','fromStorage'); + player.unmarkAuto('ao_diegui',lib.skill.ao_diegui_backup.card); + target.draw(2); + 'step 1' + target.link(false); + 'step 2' + target.turnOver(false); + }, + intro:{name:'七影蝶',content:'cards',onunmark:'throw'}, + ai:{order:1,result:{player:1}}, + }, + ayato_jianshen:{ + mod:{ + cardnature:function(card,player){ + if(get.name(card)=='sha') return 'kami'; + }, + }, + ai:{threaten:3}, + }, + ayato_zonghuan:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseButton(['请选择'+get.translation(target)+'的一张手牌',target.getCards('h')],true).set('ai',get.buttonValue); + 'step 1' + if(result.bool){ + var card=result.links[0]; + event.card=card; + if(!lib.filter.cardEnabled(card,target)) event._result={bool:false}; + else{ + var targets=game.players.slice(0); + var info=get.info(card); + var range; + if(!info.notarget){ + var select=get.copy(info.selectTarget); + if(select==undefined){ + range=[1,1]; + } + else if(typeof select=='number') range=[select,select]; + else if(get.itemtype(select)=='select') range=select; + else if(typeof select=='function') range=select(card,player); + game.checkMod(card,target,range,'selectTarget',target); + } + if(info.notarget||range[1]==-1){ + if(range[1]==-1){ + for(var i=0;i0; + }; + } + else{ + var next=player.chooseTarget(); + next.set('_get_card',card); + next.set('source',target); + next.set('filterTarget',function(card,player,target){ + return lib.filter.filterTarget(_status.event._get_card,_status.event.source,target); + }); + next.set('ai',function(target){ + var evt=_status.event; + return get.effect(target,evt._get_card,evt.source,evt.player) + }); + next.set('selectTarget',function(){ + var card=get.card(),player=_status.event.source; + if(card==undefined) return; + var range; + var select=get.copy(get.info(card).selectTarget); + if(select==undefined){ + if(get.info(card).filterTarget==undefined) return[0,0]; + range=[1,1]; + } + else if(typeof select=='number') range=[select,select]; + else if(get.itemtype(select)=='select') range=select; + else if(typeof select=='function') range=select(card,player); + game.checkMod(card,player,range,'selectTarget',player); + return range; + }); + next.set('prompt',event.prompt||('选择'+get.translation(target)+'使用'+get.translation(card)+'的目标')); + next.set('prompt2','或点「取消」令其将此牌置入弃牌堆'); + } + } + } + else event.finish(); + 'step 2' + if(result.bool){ + target.useCard(card,event.targets2||result.targets,false,'noai'); + player.draw(); + } + else{ + target.lose(card,ui.discardPile); + target.$throw(card); + game.log(target,'将',card,'置入了弃牌堆'); + } + }, + ai:{order:10,result:{target:-1}}, + }, + nagisa_tiandu:{ + trigger:{player:'judgeEnd'}, + frequent:function(event){ + if(event.result.card.name=='du') return false; + return true; + }, + check:function(event){ + if(event.result.card.name=='du') return false; + return true; + }, + filter:function(event,player){ + return get.position(event.result.card,true)=='o'; + }, + content:function(){ + player.gain(trigger.result.card,'gain2'); + } + }, + nagisa_fuxin:{ + trigger:{ + global:["gainAfter","loseAfter","damageEnd"], + }, + filter:function (event){ + var evt=event; + if(event.name=='lose'){ + if(event.type!='discard') return false; + evt=event.getParent(); + } + var player=evt[event.name=='gain'?'source':'player']; + if(!player||player==_status.currentPhase||player.isDead()) return false; + if(event.name=='damage') return true; + if(evt[event.name=='gain'?'bySelf':'notBySelf']!=true) return false; + if(event.name=='lose') return event.hs.length>0; + return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; + }, + check:function(event,player){ + return get.attitude(player,event[event.name=='gain'?'source':'player'])>0&&get.attitude(player,_status.currentPhase)<=0; + }, + logTarget:function(event){ + return event[event.name=='gain'?'source':'player']; + }, + content:function(){ + "step 0" + event.target=trigger[trigger.name=='gain'?'source':'player']; + event.target.judge(); + "step 1" + if(result.color=='red') target.draw(); + else if(_status.currentPhase&&_status.currentPhase.countCards('he')) _status.currentPhase.chooseToDiscard('he',true); + }, + ai:{expose:0.2}, + }, + tomoya_shangxian:{ + trigger:{player:'phaseUseBegin'}, + mark:true, + intro:{ + content:function(s){ + return '计算与其他角色的距离时始终从'+(s?'逆':'顺')+'时针计算' + }, + }, + content:function(){ + player.draw(); + player.storage.tomoya_shangxian=!player.storage.tomoya_shangxian; + }, + ai:{ + left_hand:true, + right_hand:true, + skillTagFilter:function(player,tag){ + return (player.storage.tomoya_shangxian==true)==(tag=='left_hand'); + }, + }, + }, + tomoya_wangjin:{ + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return player!=event.player&&!player.hasSkill('tomoya_wangjin_'+player.inRange(event.player)); + }, + logTarget:'player', + check:function(event,player){ + var target=event.player; + var bool=player.inRange(target); + if(!bool){ + if(target.hp>player.hp) return get.effect(target,{name:'sha',isCard:true},player,player)>0; + var temp=target; + while(true){ + temp=temp.getNext(); + if(temp==target||temp==_status.roundStart) return true; + if(temp==player) continue; + if(temp.hp>player.hp&&!player.inRange(temp)&&get.effect(temp,{name:'sha',isCard:true},player,player)>0) return false; + } + } + if(get.attitude(player,target)<2) return false; + if(target.hp=2&&!temp.hasSkillTag('nogain')) return false; + } + }, + content:function(){ + 'step 0' + event.bool=player.inRange(trigger.player); + player.addTempSkill('tomoya_wangjin_'+event.bool,{global:'roundStart'}); + if(event.bool){ + trigger.player.draw(); + } + else player.draw(2); + 'step 1' + if(event.bool){ + if(trigger.player.hp0) trigger.player.discardPlayerCard(player,'h',true); + else event.finish(); + } + 'step 2' + if(event.bool){ + player.chooseCard('h','是否交给'+get.translation(trigger.player)+'一张牌?'); + } + else{ + event.finish(); + if(player.hp>=trigger.player.hp) return; + var card={name:'sha',isCard:true}; + if(player.canUse(card,trigger.player,false)) player.useCard(card,trigger.player,false); + } + 'step 3' + if(result.bool) trigger.player.gain(result.cards,player,'giveAuto') + }, + subSkill:{true:{},false:{}}, + ai:{expose:0.2}, + }, + noda_fengcheng:{ + trigger:{ + player:"gainAfter", + }, + forced:true, + filter:function(event,player){ + return get.itemtype(event.source)=='player'&&event.bySelf!=true; + }, + check:function(event,player){ + return get.attitude(player,event.source)>0; + }, + logTarget:"source", + content:function(){ + trigger.source.draw(); + }, + }, + noda_xunxin:{ + enable:'phaseUse', + viewAs:{name:'juedou'}, + filter:function(event,player){ + return (player.getStat('skill').noda_xunxin||0)0; + }, + content:function(){ + 'step 0' + event.giver=trigger.turn; + event.gainner=event.giver==player?trigger.target:player; + event.giver.chooseCard('he',true,'交给'+get.translation(event.gainner)+'一张牌'); + 'step 1' + event.gainner.gain(result.cards,event.giver,'giveAuto'); + }, + }, + hinata_qiulve:{ + enable:['chooseToUse','chooseToRespond'], + viewAsFilter:function(player){ + return player.countCards('he',function(card){ + return get.type(card)!='basic'; + })>0; + }, + viewAs:{name:'sha'}, + filterCard:function(card,player){ + return get.type(card)!='basic'; + }, + locked:false, + position:'he', + check:function(card){ + var val=get.value(card); + if(val>=6) return 0; + if(get.color(card)=='black') return 12-val; + return 6-val; + }, + mod:{ + targetInRange:function(card,player,target){ + if(_status.event.skill=='hinata_qiulve') return true; + }, + }, + group:'hinata_qiulve_clear', + ai:{ + respondSha:true, + skillTagFilter:function(player){ + return player.countCards('he',function(card){ + return get.type(card)!='basic'; + })>0; + }, + }, + }, + hinata_qiulve_clear:{ + trigger:{player:'useCard1'}, + firstDo:true, + silent:true, + filter:function(event,player){ + return event.skill=='hinata_qiulve'; + }, + content:function(){ + if(get.color(trigger.card)=='red') trigger.directHit.addArray(game.players); + else if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat().card; + if(stat.sha) stat.sha--; + } + }, + }, + hinata_ehou:{ + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + return player!=event.player&&event.targets&&event.targets.contains(player)&&(_status.connectMode||player.hasSha()); + }, + content:function(){ + 'step 0' + player.chooseToUse({ + logSkill:'hinata_ehou', + preTarget:trigger.player, + prompt:'是否发动【扼喉】,对'+get.translation(trigger.player)+'使用一张【杀】?', + filterCard:function(card,player){ + return get.name(card)=='sha'&&lib.filter.filterCard.apply(this,arguments); + }, + filterTarget:function(card,player,target){ + return target==_status.event.preTarget&&lib.filter.filterTarget.apply(this,arguments); + }, + addCount:false, + }); + 'step 1' + if(result.bool&&player.getHistory('sourceDamage',function(evt){ + return evt.getParent(4)==event; + }).length) player.draw(); + }, + }, + hisako_yinbao:{ + trigger:{player:['damageEnd','recoverAfter']}, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.suit(card)=='spade'?2:-2; + }); + 'step 1' + if(result.bool){ + player.chooseTarget(lib.filter.notMe,true,'选择一名其他角色,对其造成1点雷属性伤害').set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player,'thunder'); + }); + } + else event.finish(); + 'step 2' + var target=result.targets[0]; + player.addExpose(0.2); + player.line(target,'thunder'); + target.damage(); + }, + }, + hisako_zhuanyun:{ + trigger:{player:'judgeBegin'}, + forced:true, + silent:true, + filter:function(event,player){ + return !event.directresult; + }, + content:function(){ + var tempcard=false,temp=-Infinity; + for(var i=0;itemp){ + tempcard=card; + temp=temp2; + } + } + if(tempcard) trigger.directresult=tempcard; + }, + ai:{luckyStar:true}, + }, + riki_spwenji:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he'); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('riki_spwenji'),function(card,player,target){ + return target!=player&&target.countCards('he'); + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0) return Math.sqrt(att)/10; + return 5-att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('riki_spwenji',target); + target.chooseCard('he',true,'问计:将一张牌交给'+get.translation(player)); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.addTempSkill('riki_spwenji_respond'); + player.storage.riki_spwenji_respond=result.cards[0].name; + event.target.give(result.cards,player,true); + } + }, + ai:{expose:0.2}, + subSkill:{ + respond:{ + onremove:true, + trigger:{player:'useCard'}, + forced:true, + charlotte:true, + audio:'riki_spwenji', + filter:function(event,player){ + return event.card.name==player.storage.riki_spwenji_respond; + }, + content:function(){ + trigger.directHit.addArray(game.players); + }, + } + } + }, + riki_nvzhuang:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + player.draw(player.countCards('h')==0?2:1); + }, + }, + riki_mengzhong:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + derivation:'riki_chongzhen', + juexingji:true, + unique:true, + skillAnimation:true, + animationColor:'key', + filter:function(event,player){ + var num=0; + player.getAllHistory('gain',function(evt){ + if(evt.getParent().name=='riki_spwenji') num+=evt.cards.length; + }); + return num>=3; + }, + content:function(){ + player.awakenSkill('riki_mengzhong'); + player.removeSkill('riki_spwenji'); + player.gainMaxHp(); + player.recover(); + player.addSkill('riki_chongzhen'); + }, + }, + riki_chongzhen:{ + trigger:{ + player:"phaseUseBegin", + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('riki_chongzhen'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + return -get.attitude(player,target)*(1+target.countCards('e'))/(1+target.countCards('j')); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('riki_chongzhen',target); + player.chooseToCompare(target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + var num=0; + if(target.countCards('h')) num++; + if(target.countCards('e')) num++; + if(target.countCards('j')) num++; + if(num){ + player.gainPlayerCard(target,num,'hej',true).set('filterButton',function(button){ + for(var i=0;i0&&game.hasPlayer(function(current){ + return player.canCompare(current); + }); + }, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool) player.addTempSkill('yuiko_fenglun2','phaseUseEnd'); + }, + ai:{ + order:10, + result:{target:-1}, + }, + }, + yuiko_fenglun2:{ + mod:{ + cardUsable:function(){return Infinity}, + targetInRange:function(){return true}, + }, + }, + yuiko_dilve:{ + enable:"chooseCard", + check:function(){ + return 20; + }, + filter:function(event){ + return event.type=='compare'&&!event.directresult; + }, + onCompare:function(player){ + return game.cardsGotoOrdering(get.bottomCards()).cards; + }, + group:'yuiko_dilve_gain', + subSkill:{ + gain:{ + trigger:{ + player:['chooseToCompareAfter','compareMultipleAfter'], + target:['chooseToCompareAfter','compareMultipleAfter'] + }, + filter:function(event,player){ + if(event.preserve) return false; + return [event.card1,event.card2].filterInD('od').length>0; + }, + prompt2:function(event,player){ + return '获得'+get.translation([event.card1,event.card2].filterInD('od')); + }, + content:function(){ + player.gain([trigger.card1,trigger.card2].filterInD('od'),'gain2','log'); + } + }, + }, + }, + doruji_feiqu:{ + trigger:{ + player:'useCard', + target:'useCardToTargeted', + }, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + if(trigger.name=='useCard') trigger.directHit.addArray(game.players); + else trigger.directHit.add(player); + }, + }, + akane_jugu:{ + audio:2, + mod:{ + maxHandcard:function(player,num){ + return num+player.maxHp; + } + }, + trigger:{global:'gameDrawAfter',player:'enterGame'}, + forced:true, + content:function(){ + player.draw(player.maxHp); + } + }, + akane_quanqing:{ + enable:'phaseUse', + filterCard:true, + filterTarget:function(card,player,target){ + return target!=player&&player.inRange(target); + }, + position:'he', + check:function(card){ + var val=get.value(card); + var num=card.number; + if(num>10) return 8-val; + var player=_status.event.player; + if(player.getUseValue(card,null,true)>player.getUseValue({name:'guohe'})) return 0; + if(num>6) return 6-val; + return 3-val; + }, + content:function(){ + 'step 0' + var num=cards[0].number; + var trans=get.translation(target); + var list=['令'+trans+'摸一张牌']; + event.addIndex=0; + if(num>6){ + if(target.countDiscardableCards(player,'hej')>0) list.push('弃置'+trans+'区域内的一张牌'); + else event.addIndex++; + } + if(num>10) list.push('对'+trans+'造成1点伤害'); + if(list.length==1) event._result={index:0}; + else player.chooseControl().set('choiceList',list).set('index',list.length-1).set('ai',function(){return _status.event.index}); + 'step 1' + if(result.index>0) result.index+=event.addIndex; + switch(result.index){ + case 0:target.draw();break; + case 1:player.discardPlayerCard(target,'hej',true);break; + case 2:target.damage('nocard');break; + } + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + var card=ui.selected.cards[0]; + if(card){ + if(card.number>10) return get.damageEffect(target,player,target); + if(card.number>6) return lib.card.guohe.ai.result.target.apply(this,arguments); + return 1; + } + }, + }, + }, + }, + akane_yifu:{ + unique:true, + global:'akane_yifu2', + zhuSkill:true, + }, + akane_yifu2:{ + audio:2, + enable:'phaseUse', + discard:false, + line:true, + direct:true, + clearTime:true, + delay:false, + lose:false, + prepare:function(cards,player,targets){ + targets[0].logSkill('akane_yifu'); + }, + prompt:function(){ + var player=_status.event.player; + var list=game.filterPlayer(function(target){ + return target!=player&&target.hasZhuSkill('akane_yifu',player); + }); + var str='将一张手牌交给'+get.translation(list); + if(list.length>1) str+='中的一人'; + return str; + }, + filter:function(event,player){ + if(player.group!='key') return false; + if(player.countCards('h')==0) return 0; + return game.hasPlayer(function(target){ + return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3'); + }); + }, + filterCard:true, + log:false, + filterTarget:function(card,player,target){ + return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3'); + }, + content:function(){ + 'step 0' + target.gain(cards,player,'giveAuto'); + target.addTempSkill('akane_yifu3','phaseUseEnd'); + target.draw(); + 'step 1' + if(target.countCards('h')>0) target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌').set('ai',function(card){ + return 14-get.value(card); + }); + else event.finish(); + 'step 2' + player.gain(result.cards,target,'giveAuto'); + }, + ai:{ + expose:0.3, + order:10, + result:{ + target:5 + } + } + }, + akane_yifu3:{}, + sasami_miaobian:{ + derivation:['sasami_gongqing','sasami_funan','sasami_baoqiu'], + init2:function(player){ + if(player.hp<=3) player.addSkill('sasami_gongqing'); + if(player.hp<=2) player.addSkill('sasami_funan'); + if(player.hp<=1) player.addSkill('sasami_baoqiu'); + }, + trigger:{player:'changeHp'}, + firstDo:true, + silent:true, + content:function(){ + lib.skill.sasami_miaobian.init2(player); + }, + }, + sasami_baoqiu:{ + line:{color:[173,149,206]}, + inherit:'rin_baoqiu' + }, + "sasami_gongqing":{ + audio:true, + trigger:{ + player:["damageBegin3","damageBegin4"], + }, + forced:true, + filter:function (event,player,name){ + if(!event.source) return false; + var range=event.source.getAttackRange(); + if(name=='damageBegin3') return range>3; + return event.num>1&&range<3; + }, + content:function (){ + trigger.num=event.triggername=='damageBegin4'?1:trigger.num+1; + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.player){ + if(arg.player.hasSkillTag('jueqing',false,player)) return false; + if(arg.player.getAttackRange()<3) return true; + } + return false; + } + }, + }, + sasami_funan:{ + audio:2, + trigger:{global:['respond','useCard']}, + line:{color:[173,149,206]}, + filter:function(event,player){ + if(!event.respondTo) return false; + if(event.player==player) return false; + if(player!=event.respondTo[0]) return false; + if(!player.hasSkill('sasami_funan_jiexun')){ + var cards=[] + if(get.itemtype(event.respondTo[1])=='card') cards.push(event.respondTo[1]); + else if(event.respondTo[1].cards) cards.addArray(event.respondTo[1].cards); + return cards.filterInD('od').length>0; + } + else return event.cards.filterInD('od').length>0; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return true; + if(player.hasSkill('sasami_funan_jiexun')) return true; + if(event.cards.length>1) return true; + return get.value(event.cards[0])>get.value(event.respondTo[1]); + }, + content:function(){ + 'step 0' + if(!player.hasSkill('sasami_funan_jiexun')){ + var cards=[] + if(get.itemtype(trigger.respondTo[1])=='card') cards.push(trigger.respondTo[1]); + else if(trigger.respondTo[1].cards) cards.addArray(trigger.respondTo[1].cards); + cards=cards.filterInD('od'); + trigger.player.gain(cards,'gain2','log'); + trigger.player.addTempSkill('sasami_funan_use'); + if(!trigger.player.storage.sasami_funan_use){ + trigger.player.storage.sasami_funan_use=[]; + } + trigger.player.storage.sasami_funan_use.addArray(cards); + } + 'step 1' + var cards=trigger.cards.filterInD('od'); + player.gain(cards,'log','gain2'); + }, + subSkill:{ + jiexun:{ + charlotte:true, + mark:true, + intro:{ + content:'你发动“复难”时,无须令其他角色获得你使用的牌' + }, + }, + use:{ + onremove:true, + mod:{ + cardEnabled2:function(card,player){ + if(player.storage.sasami_funan_use&&player.storage.sasami_funan_use.contains(card)){ + return false; + } + } + } + } + } + }, + rin_baoqiu:{ + mod:{ + attackFrom:function(rin,riki,ball){ + return ball-2; + }, + }, + trigger:{player:'useCardToPlayered'}, + forced:true, + logTarget:'target', + filter:function(event,player){ + return event.card.name=='sha'; + }, + line:{color:[194,117,92]}, + content:function(){ + 'step 0' + player.judge(function(){return 0}); + 'step 1' + var target=trigger.target; + var map=trigger.customArgs; + var id=target.playerid; + if(!map[id]) map[id]={}; + if(result.color=='red'){ + if(!map[id].extraDamage) map[id].extraDamage=0; + map[id].extraDamage++; + } + if(result.color=='black'){ + trigger.directHit.add(target); + } + if(result.suit=='spade'||result.suit=='heart'){ + var evt=event.getParent(); + if(evt.addCount!==false){ + evt.addCount=false; + player.getStat().card.sha--; + } + player.draw(); + } + if(result.suit=='diamond'||result.suit=='club'){ + target.addTempSkill('fengyin'); + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); + } + }, + }, + sunohara_chengshuang:{ + trigger:{ + global:'gameDrawAfter', + player:'enterGame', + }, + group:'sunohara_chengshuang_phase', + forced:true, + content:function(){ + 'step 0' + var evt=event.getParent('phase'); + if(evt&&evt.player==player) evt.sunohara_chengshuang=true; + player.chooseControl('male','female').set('prompt','成双:请选择自己的性别'); + 'step 1' + var sex=result.control; + game.broadcastAll(function(player,sex){ + player.sex=sex; + if(player.marks&&player.marks.sunohara_chengshuang) player.marks.sunohara_chengshuang.firstChild.innerHTML=sex=='male'?'♂':'♀'; + },player,sex); + game.log(player,'将性别变更为','#g'+get.translation(sex)); + }, + mark:true, + intro:{ + content:function(storage,player){ + if(player.sex=='unknown') return '当前性别未确定'; + return '当前性别:'+get.translation(player.sex); + }, + }, + }, + sunohara_chengshuang_phase:{ + trigger:{ + player:'phaseBegin', + }, + filter:function(event,player){ + if(event.sunohara_chengshuang) return false; + return game.phaseNumber>1; + }, + prompt2:function(event,player){ + if(player.sex=='unknown') return '选择自己的性别'; + return '将自己的性别变更为'+(player.sex=='male'?'女性':'男性'); + }, + content:function(){ + 'step 0' + if(player.sex=='unknown') player.chooseControl('male','female').set('prompt','成双:请选择自己的性别'); + else event._result={control:player.sex=='male'?'female':'male'}; + 'step 1' + var sex=result.control; + game.broadcastAll(function(player,sex){ + player.sex=sex; + if(player.marks&&player.marks.sunohara_chengshuang) player.marks.sunohara_chengshuang.firstChild.innerHTML=sex=='male'?'♂':'♀'; + },player,sex); + game.log(player,'将性别变更为','#g'+get.translation(sex)); + }, + }, + sunohara_tiaoyin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countGainableCards(player,'hej')>0; + }, + selectCard:[1,4], + filterCard:function(card){ + for(var i=0;i0) player.gainPlayerCard(target,'hej','visible'); + }, + contentAfter:function(){ + var bool=false; + for(var i=0;i0)?1:-2; + }, + } + }, + }, + sunohara_jianren:{ + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + 'step 0' + event.num=(!trigger.source||trigger.source.isDead()||trigger.source.sex!=player.sex)?3:1; + player.chooseTarget(get.prompt('sunohara_jianren'),'令一名角色摸'+get.cnNumber(event.num)+'张牌。').set('ai',function(target){ + var att=get.attitude(player,target); + if(att<=0) return 0; + if(target.hasSkillTag('nogain')&&target!=_status.currentPhase) return 0.1; + return att/(1+0.1*target.countCards('h')); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('sunohara_jianren',target,{color:[145,149,179]}); + target.draw(event.num); + } + }, + }, + shiina_qingshen:{ + trigger:{ + player:'damageEnd', + source:'damageSource', + }, + filter:function(event,player){ + return event.cards&&event.cards.filterInD().length>0; + }, + frequent:true, + content:function(){ + 'step 0' + var cards=trigger.cards.filterInD('od'); + player.gain(cards,'gain2','log'); + event.count=cards.length; + 'step 1' + var cards=player.getCards('he'); + if(cards.length==0){ + event.finish(); + return; + } + else if(cards.length<=event.count){ + event._result={bool:true,cards:cards}; + } + else player.chooseCard(true,'he',event.count,'请选择要置于武将牌上的牌'); + 'step 2' + if(result.bool&&result.cards.length){ + var cards=result.cards; + player.lose(cards,ui.special,'toStorage'); + player.markAuto('shiina_qingshen',cards); + game.log(player,'将',cards,'置于武将牌上'); + } + }, + intro:{ + content:'cards', + onunmark:'throw', + }, + mod:{ + attackFrom:function(from,to,num){ + return num-from.getStorage('shiina_qingshen').length; + }, + maxHandcard:function(from,num){ + return num+from.getStorage('shiina_qingshen').length; + }, + }, + }, + shiina_feiyan:{ + animalList:['key_inari','key_doruji'], + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + if(lib.skill.shiina_feiyan.animalList.contains(event.player.name)) return false; + return player.getStorage('shiina_qingshen').length>0&&player.inRange(event.player); + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('shiina_feiyan',trigger.player),player.getStorage('shiina_qingshen')]).set('goon',get.attitude(player,trigger.player)<0?1:-1).set('ai',function(){return _status.event.goon}); + 'step 1' + if(result.bool){ + var cards=result.links; + player.unmarkAuto('shiina_qingshen',cards); + game.cardsDiscard(cards); + player.$throw(cards); + event.card={name:'sha',isCard:true}; + if(lib.filter.targetEnabled(event.card,player,trigger.player)){ + event.card=player.useCard(event.card,trigger.player,'shiina_feiyan').card; + } + else player.logSkill('shiina_feiyan',trigger.player); + } + else event.finish(); + 'step 2' + if(!player.getHistory('sourceDamage',function(evt){ + return event.card==evt.card; + }).length) player.draw(); + }, + group:'shiina_retieji', + }, + shiina_retieji:{ + shaRelated:true, + trigger:{player:'useCardToPlayered'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + filter:function(event,player){ + return event.card.name=='sha'&&event.getParent().skill=='shiina_feiyan'; + }, + logTarget:'target', + content:function(){ + "step 0" + player.judge(function(){return 0}); + if(!trigger.target.hasSkill('fengyin')){ + trigger.target.addTempSkill('fengyin'); + } + "step 1" + var suit=get.suit(result.card); + 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); + } + } + }, + inari_baiwei:{ + enable:'chooseToUse', + filter:function(event,player){ + if(event.type=='wuxie'||!player.countCards('he',{suit:'diamond'})) return false; + for(var i=0;i0) return get.order(fakecard); + return 0; + } + return 1; + }, + backup:function(links,player){ + return { + selectCard:1, + filterCard:{suit:'diamond'}, + popname:true, + check:function(card){ + if(get.type(card)=='basic') return 6; + return 1/Math.max(0.1,get.value(card)); + }, + position:'he', + viewAs:{name:links[0][2],nature:links[0][3]}, + } + }, + prompt:function(links,player){ + return '将一张♦牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0 + for(var i=0;i0){ + var temp=get.order({name:name}); + if(temp>max) max=temp; + } + } + if(max>0) max+=0.5; + return max; + } + return 4; + }, + result:{ + player:1, + }, + save:true, + skillTagFilter:function(player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + }, + group:['inari_baiwei_sha','inari_baiwei_shan','inari_baiwei_draw'], + }, + inari_baiwei_shan:{ + prompt:'将一张♦牌当做闪打出', + enable:'chooseToRespond', + viewAs:{name:'shan'}, + selectCard:1, + filterCard:{suit:'diamond'}, + popname:true, + check:function(card){ + return 1/Math.max(0.1,get.value(card)); + }, + position:'he', + ai:{ + order:1, + result:{player:1}, + respondShan:true, + skillTagFilter:function(player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + }, + }, + inari_baiwei_sha:{ + prompt:'将一张♦牌当做杀打出', + enable:'chooseToRespond', + viewAs:{name:'sha'}, + selectCard:1, + filterCard:{suit:'diamond'}, + popname:true, + check:function(card){ + return 1/Math.max(0.1,get.value(card)); + }, + position:'he', + ai:{ + order:1, + result:{player:1}, + respondSha:true, + skillTagFilter:function(player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + }, + }, + inari_baiwei_draw:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill&&event.skill.indexOf('inari_baiwei')==0; + }, + content:function(){player.draw()}, + }, + inari_huhun:{ + mod:{ + suit:function(card,suit){ + if(suit=='club') return 'diamond'; + }, + maxHandcard:function(player,num){ + return num+1; + }, + } + }, + saya_powei:{ + audio:2, + trigger:{player:'phaseAfter'}, + direct:true, + locked:true, + limited:true, + unique:true, + skillAnimation:true, + animationColor:'metal', + filter:function(event,player){ + return event.type!='saya_powei'&&game.hasPlayer(function(current){ + return current.hp>player.hp; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('saya_powei'),function(card,saya,kyousuke){ + return kyousuke.hp>saya.hp; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>=-2) return 0; + if(target!=get.zhu(target)&&player.hasUnknown()) return 0; + if(target.getEquip(3)&&!player.getEquip(4)) att/=2; + if(player.hp<=1) att*=1.5; + return -att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('saya_powei',target); + player.awakenSkill('saya_powei'); + game.delay(3); + var next=game.createEvent('saya_powei_loop',false,trigger); + next.playertrue=player; + next.playerfalse=target; + next.setContent(lib.skill.saya_powei.content2); + } + }, + content2:function(){ + 'step 0' + event.count=0; + event.stat=true; + event.current=event['player'+event.stat]; + game.countPlayer2(function(current){ + if(current!=event.playertrue&¤t!=event.playerfalse) current.addSkill('saya_nodis'); + }); + event.playertrue.addSkill('saya_judge'); + 'step 1' + event.count++; + event.current.phase().set('type','saya_powei'); + 'step 2' + if(event.count==9||event.playertrue.isDead()||event.playerfalse.isDead()){ + game.countPlayer2(function(current){ + current.removeSkill('saya_nodis'); + current.removeSkill('saya_judge'); + }); + } + else{ + event.stat=!event.stat; + event.current=event['player'+event.stat]; + event.goto(1); + } + } + }, + saya_nodis:{ + group:'undist', + mark:true, + intro:{content:'不计入距离和座次的计算'}, + }, + saya_judge:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.type=='saya_powei'&&player==event.getParent().playertrue; + }, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.color(card)=='red'?5:0; + }); + 'step 1' + if(result.bool){ + player.line(trigger.getParent().playerfalse); + trigger.getParent().playerfalse.damage(); + } + }, + }, + saya_shouji:{ + audio:2, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return !player.getStat('skill').saya_shouji&&event.cards.filterInD().length>0; + }, + direct:true, + content:function(){ + 'step 0' + var goon=function(){ + var num=0; + var cards=trigger.cards.filterInD(); + for(var i=0;inum; + })==0; + }(); + player.chooseTarget(get.prompt2('saya_shouji'),lib.filter.notMe).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player; + var cards=_status.event.getTrigger().cards.filterInD(); + var att=get.attitude(player,target); + var num=0; + for(var i=0;i0) return 0; + if(button.link[2]=='wugu') return 0; + var effect=player.getUseValue(button.link[2]); + if(effect>0) return effect; + return 0; + }, + backup:function(links,player){ + return { + filterCard:true, + audio:'haruka_shuangche', + selectCard:-1, + filterCard:function(){return false}, + popname:true, + check:function(card){ + return 6-get.value(card); + }, + position:'he', + viewAs:{name:links[0][2],nature:links[0][3],isCard:true}, + } + }, + prompt:function(links,player){ + return '请选择'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'的目标'; + } + }, + ai:{ + order:4, + result:{ + player:function(player){ + var cards=player.getCards('he').sort(function(a,b){ + return get.value(a)-get.value(b); + }); + var num=(player.getStat('skill').haruka_shuangche||0); + if(cards.length>num){ + var val=0; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseCard('he',[1,player.countCards('he')],get.prompt2('tsumugi_huilang')).set('ai',function(card){ + if(get.position(card)!='h') return -1; + if(!['shan','wuxie','caochuan'].contains(get.name(card))) return 9; + return 5-get.value(card); + }); + 'step 1' + if(result.bool){ + var cards=result.cards; + player.logSkill('tsumugi_huilang'); + player.addSkill('tsumugi_huilang2'); + player.markAuto('tsumugi_huilang2',cards); + player.lose(cards,ui.special); + } + }, + }, + tsumugi_huilang2:{ + charlotte:true, + marktext:'隐', + intro:{content:'cardCount',onunmark:'throw'}, + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.getStorage('tsumugi_huilang2').length>0; + }, + content:function(){ + 'step 0' + var cards=player.getStorage('tsumugi_huilang2'); + event.num=cards.length; + player.gain(cards,'draw'); + game.log(player,'获得了'+get.cnNumber(cards.length)+'张牌'); + player.unmarkAuto('tsumugi_huilang2',cards); + 'step 1' + player.chooseTarget([1,num],'是否令至多'+get.cnNumber(num)+'名角色各摸一张牌?').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 2' + if(result.bool){ + var targets=result.targets; + player.line(targets,lib.skill.tsumugi_huilang.line); + targets.sortBySeat(); + game.asyncDraw(targets); + } + else event.finish(); + 'step 3' + game.delay(); + }, + }, + yui_jiang:{ + shaRelated:true, + audio:2, + audioname:['sp_lvmeng','re_sunben','re_sunce'], + trigger:{ + player:'useCardToPlayered', + target:'useCardToTargeted', + }, + filter:function(event,player){ + if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false; + return player==event.target||event.getParent().triggeredTargets3.length==1; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='sha'&&get.color(card)=='red') return [1,0.6]; + }, + player:function(card,player,target){ + if(card.name=='sha'&&get.color(card)=='red') return [1,1]; + } + } + } + }, + yui_lieyin:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + locked:true, + content:function(){ + 'step 0' + var list=[]; + if(player._ichiban_no_takaramono) list.push('cancel2'); + player.chooseControl.apply(player,list).set('choiceList',[ + '令此阶段内的所有红色牌视为【杀】', + '令此阶段内的所有【杀】视为【决斗】' + ]).set('prompt',player._ichiban_no_takaramono?get.prompt('yui_lieyin'):'烈音:请选择一项').set('ai',function(){ + var player=_status.event.player; + var shas=player.countCards('h','sha') + if(shas>0){ + if(game.hasPlayer(function(current){ + return get.attitude(player,current)<0&&player.canUse('juedou',current)&&!current.hasSha()&&get.effect(current,{name:'juedou'},player,player)>0; + })) return 1; + if(player._ichiban_no_takaramono) return 'cancel2'; + } + if(player.countCards('h',function(card){ + return get.color(card)=='red'&&card.name!='sha'&&player.hasValueTarget(card); + })==0) return 0; + if(player._ichiban_no_takaramono) return 'cancel2'; + return 1; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('yui_lieyin'); + player.addTempSkill('yui_lieyin'+result.index,'phaseUseEnd') + } + }, + }, + yui_lieyin0:{ + mod:{ + cardname:function(card){ + if(get.color(card)=='red') return 'sha'; + }, + }, + }, + yui_lieyin1:{ + mod:{ + cardname:function(card){ + if(card.name=='sha') return 'juedou'; + }, + }, + }, + yui_takaramono:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + unique:true, + juexingji:true, + skillAnimation:true, + animationColor:'key', + filter:function(event,player){ + var num=0; + if(player.hp<=1) num++; + if(game.dead.length>0) num++; + if(num!=1) return num>1; + var draw=0; + player.getAllHistory('gain',function(evt){ + if(evt.getParent(2).name=='yui_jiang') draw+=evt.cards.length; + }); + return draw>=3; + }, + content:function(){ + player.awakenSkill('yui_takaramono'); + player.addSkill('yui_yinhang'); + player._ichiban_no_takaramono=true; + player.gainMaxHp(); + player.recover(); + }, + derivation:'yui_yinhang', + }, + yui_yinhang:{ + trigger:{player:'changeHp'}, + locked:true, + direct:true, + line:{color:[253, 153, 182]}, + content:function(){ + 'step 0' + event.count=Math.abs(trigger.num); + 'step 1' + event.count--; + player.chooseTarget([1,2],get.prompt('yui_yinhang'),'令至多两名角色各摸一张牌').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 2' + if(result.bool){ + var targets=result.targets; + targets.sortBySeat(); + player.logSkill('yui_yinhang',targets,lib.skill.yui_yinhang.line); + game.asyncDraw(targets); + } + else event.finish(); + 'step 3' + game.delay(); + if(event.count>0) event.goto(1); + }, + }, + yoshino_jueyi:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(lib.filter.notMe,get.prompt2('yoshino_jueyi')).set('ai',function(target){ + var player=_status.event.player; + if(get.damageEffect(target,player,player)<0) return 0; + var att=get.attitude(player,target); + if(att>0) return 0; + if(att==0) return 0.1; + var eff=0; + var hs=player.getCards('h'); + for(var i=0;i0) eff+=eff2; + } + } + return -att/(1+eff); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('yoshino_jueyi',target); + player.draw(); + } + else event.finish(); + 'step 2' + player.chooseToPSS(target); + 'step 3' + if(result.tie) event.goto(2); + else if(result.bool) target.damage(); + else target.addTempSkill('yoshino_fail','phaseUseEnd'); + }, + }, + yoshino_fail:{ + mod:{ + targetEnabled:function(card,player,target){ + if(player==_status.currentPhase) return false; + }, + }, + }, + kengo_weishang:{ + locked:false, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'&&player.isDisabled(1)) return num+1; + }, + globalFrom:function(from,to,distance){ + if(from.isDisabled(4)) return distance-1; + }, + globalTo:function(from,to,distance){ + if(to.isDisabled(3)) return distance+1; + }, + }, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var list=['equip1','equip2','equip3','equip4','equip5']; + for(var i=0;i0 + })) return 'equip1'; + if(list.contains('equip3')&&player.isEmpty('equip3')) return 'equip3'; + if(list.contains('equip4')&&player.isEmpty('equip4')) return 'equip4'; + if(list.contains('equip5')&&player.isEmpty('equip5')) return 'equip5'; + if(list.contains('equip2')&&player.isEmpty('equip2')) return 'equip2'; + return list.randomGet(); + }; + 'step 1' + player.disableEquip(result.control); + player.draw(2); + }, + group:['kengo_weishang_sha','kengo_weishang_shan'], + ai:{ + order:10, + result:{player:1}, + }, + }, + kengo_weishang_sha:{ + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&player.isDisabled(1)&&event.target.countCards('he')>0; + }, + logTarget:'target', + content:function(){ + trigger.target.chooseToDiscard('he',true); + }, + }, + kengo_weishang_shan:{ + enable:['chooseToUse','chooseToRespond'], + viewAs:{name:'shan'}, + filterCard:true, + position:'he', + prompt:'将一张牌当做闪使用或打出', + viewAsFilter:function(player){ + return player.isDisabled(2)&&player.countCards('he')>0; + }, + check:function(card){ + return 1/Math.max(0.1,get.value(card)); + }, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + return player.isDisabled(2)&&player.countCards('he')>0; + }, + }, + }, + kengo_guidui:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.countDisabled()>0; + }, + content:function(){ + var list=['equip1','equip2','equip3','equip4','equip5']; + for(var i=0;i0) event.goto(1); + }, + }, + iwasawa_mysong:{ + trigger:{player:['phaseBeginStart','phaseAfter','dyingBefore']}, + forced:true, + filter:function(event,player){ + return event.name=='dying'||player.hp<1; + }, + content:function(){ + if(trigger.name=='dying') trigger.cancel(); + else if(event.triggername=='phaseBeginStart') player.addTempSkill('iwasawa_refenyin'); + else player.die(); + }, + nobracket:true, + derivation:'iwasawa_refenyin', + }, + iwasawa_refenyin:{ + trigger:{global:['loseAfter','cardsDiscardAfter']}, + forced:true, + filter:function(event,player){ + if(player!=_status.currentPhase) return false; + if(event.name=='lose'&&event.position!=ui.discardPile) return false; + var list=[]; + for(var i=0;i0; + }, + content:function(){ + var list=[]; + var list2=[]; + for(var i=0;i=0?0:1).set('ai',function(){return _status.event.choice}); + 'step 1' + if(result.control=='增加伤害'){ + player.loseMaxHp(); + trigger.num+=2; + } + else trigger.cancel(); + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(get.attitude(player,target)>0&&get.tag(card,'damage')) return 'zeroplayertarget'; + }, + }, + }, + }, + yusa_yanyi:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return get.distance(player,target)<=player.hp; + }, + selectTarget:function(){ + return [1,Math.max(_status.event.player.getAttackRange())]; + }, + line:'thunder', + content:function(){ + 'step 0' + if(target.isHealthy()){ + player.draw(); + event.finish(); + } + else{ + var name=get.translation(player); + target.chooseControl().set('choiceList',[ + '令'+name+'摸一张牌', + '回复1点体力,然后交给'+name+'一张牌', + ]).set('ai',function(){ + return 1; + }); + } + 'step 1' + if(result.index==0){ + player.draw(); + event.finish(); + } + else{ + target.recover(); + } + 'step 2' + if(target!=player&&target.countCards('he')>0){ + target.chooseCard('交给'+get.translation(player)+'一张牌','he',true); + } + else event.finish(); + 'step 3' + target.give(result.cards,player,'giveAuto'); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return target.isHealthy()?1:0; + }, + target:function(player,target){ + if(target.isHealthy()) return 0; + return get.recoverEffect(target,player,target); + }, + }, + }, + }, + yusa_misa:{ + charlotte:true, + trigger:{player:'useSkillAfter'}, + filter:function(event,player){ + return event.skill=='yusa_yanyi'&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); + }, + content:function(){ + player.turnOver(); + }, + }, + misa_yusa:{ + charlotte:true, + trigger:{player:'misa_yehuoAfter'}, + filter:function(event,player){ + return event.bool===true&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); + }, + content:function(){ + player.turnOver(); + }, + }, + misa_yehuo:{ + charlotte:true, + trigger:{global:'phaseDrawBegin1'}, + direct:true, + locked:true, + line:{color:[236,137,52]}, + filter:function(event,player){ + var target=event.player; + return player.inRange(target)&&player.countCards('he')>=get.distance(player,target); + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',get.distance(player,trigger.player)||1,get.prompt2('misa_yehuo',trigger.player)); + next.set('logSkill',['misa_yehuo',trigger.player,'fire']); + next.set('ai',function(card){ + var val=_status.event.val; + for(var i=0;i0; + }, + content:function(){ + "step 0" + event.forceDie=true; + var ask=trigger.player.chooseCard('he',get.prompt('yukine_wenzhou')); + if(player==trigger.player){ + ask.set('prompt2','选择一张牌,然后从牌堆中获得一张与此牌类型相同的牌。本回合内使用与此牌类型相同的牌时不可被其他角色响应。'); + } + else ask.set('prompt2','将一张牌交给'+get.translation(player)+'然后其可以选择:交给你一张牌;或令你从牌堆中获得一张与此牌类型相同的牌,且你本回合内使用与此牌类型相同的牌时不可被响应。'); + ask.set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0) return 10-get.value(card); + return -1; + }); + "step 1" + if(result.bool){ + player.logSkill('yukine_wenzhou',trigger.player); + event.type=get.type(result.cards[0],'trick'); + if(trigger.player!=player) trigger.player.give(result.cards,player,'giveAuto'); + } + else event.finish(); + "step 2" + if(player==trigger.player||player.countCards('he')==0){ + event._result={index:1}; + } + else{ + player.chooseControl().set('choiceList',[ + '将一张牌交给'+get.translation(trigger.player), + '令'+get.translation(trigger.player)+'从牌堆中获得一张'+get.translation(event.type)+'牌,且其本回合内使用与此牌名称相同的牌时不可被响应', + ]).set('forceDie',true).set('ai',function(){ + if(get.attitude(_status.event.player,_status.event.getTrigger().player)>0) return 1; + return 0; + }); + } + "step 3" + event.index=result.index; + if(result.index==1){ + var magic=get.cardPile2(function(card){ + return get.type(card,'trick')==event.type; + }); + if(magic){ + trigger.player.addTempSkill('yukine_magic','phaseUseEnd'); + trigger.player.storage.yukine_magic.add(magic.name); + trigger.player.gain(magic,'draw'); + } + else event.finish(); + } + else player.chooseCard('he',true,'选择要交给'+get.translation(trigger.player)+'的牌').set('ai',function(card){ + return -get.value(card,_status.event.getTrigger().player); + }); + "step 4" + if(event.index==1) game.updateRoundNumber(); + else if(result.bool) player.give(result.cards,trigger.player,'giveAuto'); + }, + }, + yukine_magic:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return player.storage.yukine_magic&&player.storage.yukine_magic.contains(event.card.name); + }, + content:function(){ + trigger.directHit.addArray(game.filterPlayer(function(current){ + if(player!=current) return true; + return !player.hasSkill('yukine_wenzhou'); + })); + }, + onremove:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + }, + komari_tiankou:{ + trigger:{ + player:'useCard2', + target:'useCardToTarget', + }, + forced:true, + filter:function(event,player,name){ + if(name=='useCardToTarget'&&player==event.player) return false; + if(get.color(event.card)!='red') return false; + if(get.tag(event.card,'damage')) return false; + return ['basic','trick'].contains(get.type(event.card)); + }, + content:function(){ + 'step 0' + var info=get.info(trigger.card); + var bool=true; + if(info.multitarget||info.allowMultiple===false) bool=false; + else{ + var list=game.filterPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); + }) + if(!list.length) bool=false; + } + if(bool) player.chooseTarget('甜口:为'+get.translation(trigger.card)+'增加一个额外目标,或点【取消】摸一张牌。',function(candy,komari,rin){ + return _status.event.rin_chan.contains(rin); + }).set('rin_chan',list).set('ai',function(target){ + var evt=_status.event; + return get.effect(target,evt.candy,evt.source,evt.player); + }).set('candy',trigger.card).set('',trigger.player); + else event._result={bool:false}; + 'step 1' + if(result.bool){ + var rin=result.targets[0]; + trigger.targets.push(rin); + player.line(rin,{color:[255, 224,172]}); + } + else player.draw(); + }, + }, + komari_xueshang:{ + trigger:{global:'die'}, + forced:true, + skillAnimation:true, + filter:function(event,player){ + return player.hp>0; + }, + animationColor:'metal', + content:function(){ + 'step 0' + player.addSkill('riki_xueshang'); + var map={}; + var list=[]; + for(var i=1;i<=player.hp;i++){ + var cn=get.cnNumber(i,true); + map[cn]=i; + list.push(cn); + } + event.map=map; + player.chooseControl(list,function(){ + return '一'; + }).set('prompt','血殇:请选择自己受到的伤害的点数'); + 'step 1' + var num=event.map[result.control]||1; + event.num=num>1?2:1; + event.list=game.filterPlayer(function(current){ + return current!=player; + }).sortBySeat(); + player.damage(num); + player.line(event.list,{color:[255, 224,172]}); + 'step 2' + if(!player.hasSkill(event.name)) return; + else{ + event.list.shift().damage(num); + if(event.list.length) event.redo(); + } + }, + }, + riki_xueshang:{ + trigger:{global:'dying'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.getParent(2).name=='komari_xueshang'&&event.getParent(2).player==player; + }, + content:function(){ + player.removeSkill('komari_xueshang'); + player.gainMaxHp(true); + player.recover(); + }, + }, + umi_chaofan:{ + enable:'phaseUse', + usable:1, + selectCard:2, + complexCard:true, + filter:function(summer,umi){ + return umi.countCards('h')>1; + }, + check:function(ingredient){ + return 7-get.value(ingredient); + }, + filterCard:function(ingredient){ + if(ui.selected.cards.length) return get.suit(ingredient)!=get.suit(ui.selected.cards[0]); + return true; + }, + line:{color:[251, 193, 217]}, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(player.hp>2) target.recover(); + else if(player.hp==2) target.draw(2); + else target.damage('fire','nosource'); + }, + ai:{ + order:2, + result:{ + target:function(umi,takahara){ + if(umi.hp>2&&takahara.isDamaged()) return 2.2; + if(umi.hp==2&&!takahara.hasSkillTag('nogain')) return 2; + if(umi.hp<2) return get.damageEffect(takahara,umi,umi,'fire'); + }, + }, + }, + }, + umi_lunhui:{ + trigger:{global:'phaseAfter'}, + filter:function(summer,umi){ + return summer.player!=umi&&umi.countCards('h')0; + }, + check:function(event,player){ + return get.attitude(player,event.player)>1; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.gain(trigger.player.getCards('j'),trigger.player,'give'); + 'step 1' + if(player.hp>1) player.loseHp(); + }, + }, + yuri_xingdong:{ + audio:2, + group:'yuri_xingdong_gain', + subSkill:{ + mark:{ + mark:true, + marktext:'令', + intro:{ + content:'跳过下个回合的判定阶段和摸牌阶段', + }, + }, + gain:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + content:function(){ + 'step 0' + var card=get.cardPile(function(card){ + return card.name=='sha'||get.type(card)=='trick'; + }); + if(card) player.gain(card,'gain2','log'); + 'step 1' + game.updateRoundNumber(); + }, + }, + }, + enable:'phaseUse', + usable:1, + locked:true, + filter:function(event,player){ + return player.countCards('h',lib.skill.yuri_xingdong.filterCard); + }, + filterCard:function(card){ + return card.name=='sha'||get.type(card)=='trick'; + }, + check:function(card){return 1}, + filterTarget:lib.filter.notMe, + discard:false, + lose:false, + delay:0, + content:function(){ + 'step 0' + target.gain(cards,player,'give'); + 'step 1' + target.chooseUseTarget(cards[0],game.filterPlayer(function(current){ + return current!=player; + }),'请使用得到的牌,或者跳过下回合的判定阶段和摸牌阶段'); + 'step 2' + if(result.bool) game.asyncDraw([player,target]); + else{ + target.addTempSkill('yuri_xingdong_mark','phaseJudgeSkipped'); + target.skip('phaseJudge'); + target.skip('phaseDraw'); + target.addTempSkill('zhengjing3',{player:'phaseAfter'}); + event.finish(); + } + 'step 3' + game.delay(); + }, + ai:{ + order:12, + result:{ + target:function(player,target){ + var card=ui.selected.cards[0]; + if(target.hasSkill('pingkou')) return 1; + if(!card) return 0; + var info=get.info(card); + if(info.selectTarget==-1){ + var eff=0; + game.countPlayer(function(current){ + if(current!=player&&target.canUse(card,current)) eff+=get.effect(current,card,target,target); + }); + if(eff>0||get.value(card)<3) return eff; + return 0; + } + else if(game.hasPlayer(function(current){ + return current!=player&&target.canUse(card,current)&&get.effect(current,card,target,target)>0 + })) return 1.5; + else if(get.value(card)<3) return -1; + return 0; + }, + }, + }, + }, + yuri_wangxi:{ + trigger:{global:'dieAfter'}, + direct:true, + limited:true, + mark:false, + init:function(player){ + if(player.hasZhuSkill('yuri_wangxi')){ + player.markSkill('yuri_wangxi'); + player.storage.yuri_wangxi=false; + } + }, + zhuSkill:true, + unique:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + if(get.mode()!='identity') return false; + if(!player.hasZhuSkill('yuri_wangxi')) return false; + if(event.player.isAlive()) return false; + if(event.player.identity=='mingzhong') return false; + var evt=event.getParent('yuri_xingdong'); + return evt&&evt.name=='yuri_xingdong'&&evt.player==player; + }, + content:function(){ + 'step 0' + trigger.player.chooseBool('是否发动'+get.translation(player)+'的【忘隙】?').forceDie=true; + 'step 1' + if(result.bool){ + player.logSkill('yuri_wangxi',trigger.player); + player.awakenSkill('yuri_wangxi'); + var identity='zhong'; + if(_status.mode=='purple'){ + if(['rNei','bNei'].contains(player.identity)) identity=player.identity; + else if(['rZhu','rZhong','bNei'].contains(player.identity)) identity='rZhong'; + else identity='bZhong'; + } + game.broadcastAll(function(source,identity){ + if(source.node.dieidentity){ + source.node.dieidentity.innerHTML=get.translation(identity+2); + } + source.revive(2,false); + source.identity=identity; + source.setIdentity(); + },trigger.player,identity); + trigger.player.changeGroup(player.group); + trigger.player.draw(); + var evt=trigger.getParent('damage'); + if(evt.untrigger) evt.untrigger(false,trigger.player); + game.addVideo('setIdentity',trigger.player,'zhong'); + } + }, + }, + nk_shekong:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + selectCard:function(){ + if(ui.selected.targets.length) return [1,ui.selected.targets[0].countCards('he')]; + return [1,Infinity]; + }, + filterTarget:function(event,player,target){ + return target!=player&&target.countCards('he')>=Math.max(1,ui.selected.cards.length); + }, + check:function(card){ + if(!game.hasPlayer(function(current){ + return current!=_status.event.player&&get.attitude(_status.event.player,current)<0&¤t.countCards('he')>ui.selected.cards.length; + })) return 0; + return 6-get.value(card); + }, + content:function(){ + 'step 0' + event.cardsx=cards.slice(0); + var num=get.cnNumber(cards.length); + var trans=get.translation(player); + var prompt=('弃置'+num+'张牌,然后'+trans+'摸一张牌'); + if(cards.length>1) prompt+=(';或弃置一张牌,然后'+trans+'摸'+num+'张牌'); + var next=target.chooseToDiscard(prompt,'he',true); + next.numx=cards.length; + next.selectCard=function(){ + if(ui.selected.cards.length>1) return _status.event.numx; + return [1,_status.event.numx]; + }; + next.complexCard=true; + next.ai=function(card){ + if(ui.selected.cards.length==0||(_status.event.player.countCards('he',function(cardxq){ + return get.value(cardxq)<7; + })>=_status.event.numx)) return 7-get.value(card); + return -1; + }; + 'step 1' + if(result.bool){ + if(result.cards.length==cards.length) player.draw(); + else player.draw(cards.length); + event.cardsx.addArray(result.cards); + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var es=player.getCards('e'); + event.count=es.length; + player.discard(es); + 'step 1' + event.count--; + if(game.hasPlayer(function(current){ + return current.countDiscardableCards(player,'ej')>0; + })){ + player.chooseTarget('请选择一名角色,弃置其装备区或判定区内的一张牌。',true,function(card,player,target){ + return target.countDiscardableCards(player,'ej')>0; + }).ai=function(target){ + var att=get.attitude(_status.event.player,target); + if(target.countCards('j')&&att>0) return att*1.5; + return -att; + }; + } + else event.finish(); + 'step 2' + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,{color:[220, 90, 139]}); + player.discardPlayerCard(target,'ej',true); + if(event.count) event.goto(1); + } + }, + }, + + nslongyue:{ + trigger:{global:'useCard'}, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'&&event.player.getHistory('useCard').indexOf(event)==0; + }, + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + content:function(){ + trigger.player.draw(); + }, + ai:{ + expose:0.2, + }, + global:'nslongyue_ai', + }, + nslongyue_ai:{ + mod:{ + aiOrder:function(player,card,num){ + if(!player.getHistory('useCard').length&&get.type(card)=='trick'&&game.hasPlayer(function(current){ + return current.hasSkill('nslongyue')&&get.attitude(player,current)>=0; + })) return num+6; + }, + }, + }, + nszhenyin:{ + trigger:{global:'judge'}, + usable:1, + filter:function(event,player){ + return _status.currentPhase&&_status.currentPhase.countCards('h')>0; + }, + logTarget:function(){ + return _status.currentPhase; + }, + check:function(event,player){ + var target=_status.currentPhase; + var judge=event.judge(event.player.judging[0]); + var max=0; + var hs=target.getCards('h',function(card){ + var mod2=game.checkMod(card,target,'unchanged','cardEnabled2',target); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,target,'unchanged','cardRespondable',target); + if(mod!='unchanged') return mod; + return true; + }); + for(var i of hs){ + var num=event.judge(i)-judge; + if(num>max) max=num; + } + var att=get.attitude(player,target); + if(att>0) return max>0; + if(att<0) return max<=0; + return false; + }, + content:function(){ + "step 0" + if(!_status.currentPhase.countCards('h',function(card){ + var player=_status.currentPhase; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + })){ + event.finish(); + return; + }; + _status.currentPhase.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+',请打出一张手牌进行改判','h',true,function(card){ + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result/Math.max(0.1,get.value(card)); + } + else{ + return -result/Math.max(0.1,get.value(card)); + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + _status.currentPhase.respond(result.cards,'highlight').nopopup=true; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + } + } + }, + nsxianhai:{ + trigger:{global:'damageSource'}, + filter:function(event,player){ + return event.source&&event.source!=player&&event.source.isAlive()&&event.source==_status.currentPhase&& + (event.source.getStat('damage')||0)>(player.getLastStat('damage')||0)&& + !player.hasSkill('nsxianhai_round'); + }, + check:function(event,player){ + return player.maxHp>1&&get.attitude(player,event.source)<-4; + }, + logTarget:'source', + content:function(){ + 'step 0' + player.addTempSkill('nsxianhai_round','roundStart'); + player.loseMaxHp(); + var list=[]; + for(var i=1;i<6;i++){ + if(!trigger.source.isDisabled(i)) list.add('equip'+((i==3||i==4)?6:i)); + } + if(list.length){ + player.chooseControl(list).set('prompt','选择废除'+get.translation(trigger.source)+'的一种装备栏').set('ai',function(){ + var target=_status.event.getTrigger().source; + if(list.contains('equip6')&&target.getEquip('equip3')&&target.getEquip('equip4')) return 'equip6'; + if(list.contains('equip2')&&target.getEquip(2)&&get.value(target.getEquip(2),target)>0) return 'equip2'; + if(list.contains('equip5')&&target.getEquip(5)&&get.value(target.getEquip(5),target)>0) return 'equip5'; + return 0; + }); + } + else event.goto(2); + 'step 1' + if(result.control!='equip6') trigger.source.disableEquip(result.control); + else{ + trigger.source.disableEquip(3); + trigger.source.disableEquip(4); + } + 'step 2' + if(player.awakenedSkills.contains('nsxingchu')){ + var next=game.createEvent('nsxianhai_clear'); + event.next.remove(next); + event.getParent('phase').after.push(next); + next.player=player; + next.setContent(function(){ + player.restoreSkill('nsxingchu'); + }); + } + 'step 3' + if(trigger.source){ + var hs=trigger.source.getCards('h','shan'); + if(hs.length) trigger.source.discard(hs); + } + }, + }, + nsxianhai_round:{}, + nsxingchu:{ + trigger:{global:'die'}, + forceDie:true, + filter:function(event,player){ + return player==event.player||player==event.source; + }, + limited:true, + skillAnimation:true, + animationColor:'wood', + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nsxingchu')).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('forceDie',true); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('nsxingchu',target); + player.awakenSkill('nsxingchu'); + var he=trigger.player.getCards('he'); + if(he.length) target.gain(he,trigger.player,'giveAuto'); + target.gainMaxHp(); + } + }, + }, + nsshengyan:{ + trigger:{player:'judgeEnd'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase&&_status.currentPhase.isAlive()&&(!player.storage.nsshengyan2||!player.storage.nsshengyan2.contains(event.result.suit)); + }, + logTarget:function(){ + return _status.currentPhase; + }, + content:function(){ + player.addTempSkill('nsshengyan2'); + if(!player.storage.nsshengyan2) player.storage.nsshengyan2=[]; + _status.currentPhase.addTempSkill('nsshengyan3'); + player.storage.nsshengyan2.add(trigger.result.suit); + _status.currentPhase.addMark('nsshengyan3',2,false); + }, + }, + nsshengyan2:{onremove:true}, + nsshengyan3:{ + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('nsshengyan3'); + }, + }, + onremove:true, + intro:{ + content:'本回合手牌上限+#', + }, + marktext:'筵', + }, + nsdaizhan:{ + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return (!player.hasJudge('lebu')||!player.hasJudge('bingliang'))&&player.countCards('he',function(card){ + if(_status.connectMode) return true; + return get.type(card,'trick')!='trick'; + }); + }, + content:function(){ + var next=player.chooseToUse(); + next.set('norestore',true); + next.set('_backupevent','nsdaizhanx'); + next.backup('nsdaizhanx'); + }, + }, + nsdaizhanx:{ + chooseButton:{ + dialog:function(){ + var list=['lebu','bingliang']; + var list2=[]; + for(var i of list){ + list2.push(['延时锦囊','',i]); + } + return ui.create.dialog(get.prompt('nsdaizhan'),[list2,'vcard'],'hidden'); + }, + filter:function(button,player){ + return !player.hasJudge(button.link[2]) + }, + check:function(button){ + if(button.link[2]=='lebu') return 0; + var player=_status.event.player; + var delta=player.getHandcardLimit()+player.countCards('j')*2+2-player.hp; + if(delta>=2) return 1+Math.random(); + if(delta>=0&&!player.countCards('h',function(card){ + return player.hasValueTarget(card); + })) return Math.random(); + return 0; + }, + backup:function(links,player){ + return { + filterCard:function(card,player){ + return get.itemtype(card)=='card'&&get.type(card,'trick')!='trick'&&player.canAddJudge({name:links[0][2],cards:[card]}); + }, + filterTarget:function(card,player,target){ + return player==target; + }, + check:function(card){ + return 8-get.value(card); + }, + viewAs:{name:links[0][2]}, + position:'he', + precontent:function(){ + player.addTempSkill('nsdaizhany'); + event.result.skill='nsdaizhan'; + }, + ai:{ + result:{ + target:1, + }, + }, + }; + }, + prompt:function(links){ + return '将一张牌当做'+get.translation(links[0][2])+'对自己使用'; + }, + }, + }, + nsdaizhany:{ + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.countCards('h')0; + }, + content:function(){ + 'step 0' + var target=(event.triggername=='damageSource'?trigger.source:trigger.player); + event.target=target; + player.choosePlayerCard(target,'hej',player.storage.nsfuwei?true:1).set('ai',function(button){ + var val=get.buttonValue(button); + if(get.attitude(_status.event.player,get.owner(button.link))>0) return -val; + return val; + }); + 'step 1' + if(result.bool){ + player.logSkill('nsjiquan',target); + target.lose(result.cards,ui.special,'toStorage'); + player.markAuto('nsjiquan_mark',result.cards); + target.$give(result.cards,player,false); + } + else event.finish(); + 'step 2' + game.delayx(); + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.getStorage('nsjiquan_mark').length; + }, + }, + }, + nsjiquan_mark:{ + intro:{ + content:'cards', + onunmark:'throw', + }, + marktext:'威', + }, + nsfuwei:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + unique:true, + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return player.getStorage('nsjiquan_mark').length>4; + }, + content:function(){ + player.awakenSkill('nsfuwei'); + player.storage.nsfuwei=true; + player.addSkill('nsdiemou'); + player.addSkill('nszhihuang'); + player.gainMaxHp(2); + }, + derivation:['nsdiemou','nszhihuang'], + }, + nsdiemou:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + filter:function(event,player){ + return player.getStorage('nsjiquan_mark').length>game.players.length; + }, + content:function(){ + var num=player.getStorage('nsjiquan_mark').length; + player.draw(num); + player.loseMaxHp(); + player.unmarkSkill('nsjiquan_mark'); + if(num>4) player.turnOver(); + }, + }, + nszhihuang:{ + group:'nszhihuang_damage', + trigger:{global:'useCard'}, + usable:1, + filter:function(event,player){ + return event.player==get.zhu(player)&&player.getStorage('nsjiquan_mark').length>0&&event.cards&&event.cards.filterInD().length>0; + }, + prompt2:function(event){ + return '移去一张“威”并获得'+get.translation(event.cards.filterInD()); + }, + check:function(event,player){ + if(['equip','delay'].contains(get.type(event.card))) return get.attitude(player,event.player)<0; + return get.value(event.cards.filterInD()>0); + }, + logTarget:'player', + content:function(){ + 'step 0' + var cards=player.getStorage('nsjiquan_mark'); + if(cards.length==1) event._result={ + bool:true, + links:cards.slice(0), + } + else player.chooseButton(['选择移去一张“威”',cards],true); + 'step 1' + player.unmarkAuto('nsjiquan_mark',result.links); + game.cardsDiscard(result.links); + player.gain(trigger.cards.filterInD(),'gain2','log'); + }, + }, + nszhihuang_damage:{ + trigger:{source:'damageBegin1'}, + forced:true, + filter:function(event,player){ + var zhu=get.zhu(player); + return zhu&&player.countCards('h')>zhu.countCards('h')&&event.getParent().type=='card'; + }, + content:function(){ + trigger.num++; + }, + }, + + yjxuepin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(event,player,target){ + return player.inRange(target); + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true); + else event.finish(); + 'step 2' + if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover(); + }, + ai:{ + order:4, + result:{ + player:function(player,target){ + if(player.hp==1) return -4; + if(target.countCards('e')>1) return 0; + if(player.hp>2||target.countCards('h')>1) return -0.5; + return -2; + }, + target:function(player,target){ + return -2; + }, + }, + }, + }, + nsjianglie:{ + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countCards('h')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + logTarget:'target', + content:function(){ + 'step 0' + trigger.target.showHandcards(); + 'step 1' + var cards=trigger.target.getCards('h'); + var list=[]; + for(var i=0;i=get.value(player.getCards('h',{color:'black'}))) return 'black'; + return 'red'; + }); + } + 'step 2' + trigger.target.discard(trigger.target.getCards('h',{color:result.control})); + }, + }, + ns_chuanshu:{ + audio:["xingshuai",2], + trigger:{ + global:"dying", + }, + priority:8, + unique:true, + skillAnimation:true, + animationColor:"water", + filter:function (event,player){ + return event.player.hp<=0&&event.player!=player; + }, + check:function (event,player){ + return get.attitude(player,event.player)>0; + }, + logTarget:"player", + content:function (){ + 'step 0' + trigger.player.chooseControl('releiji','guidao').set('prompt',''+get.translation(trigger.player)+'获得一项技能'); + goon=true; + if(!goon){ + event.finish(); + } + 'step 1' + trigger.player.addSkillLog(result.control); + trigger.player.recover(1-trigger.player.hp); + trigger.player.draw(2); + trigger.player.storage.ns_chuanshu2=player; + trigger.player.addSkill('ns_chuanshu2'); + //game.broadcastAll()+trigger.player.node.avatar.setBackgroundImage('extension/群英会/ns_zhangjiao.jpg'); + //player.removeSkill('ns_chuanshu'); + player.awakenSkill('ns_chuanshu'); + }, + }, + ns_xiandao1:{ + audio:["huashen",2], + forced:true, + //noLose:true, + //locked:true, + //noRemove:true, + //noDisable:true, + priority:10, + trigger:{ + global:"gameStart", + player:["phaseEnd","enterGame"], + }, + //filter:function (event,player){ + // return player.isAlive(); + //}, + content:function (){ + var n=[1,2].randomGet(); + if(n==1){ + player.addTempSkill("releiji",{player:"phaseUseBegin"}); + player.markSkill("releiji",{player:"phaseUseBegin"}); + }; + if(n==2){ + player.addTempSkill("guidao",{player:"phaseUseBegin"}); + player.markSkill("guidao",{player:"phaseUseBegin"}); + }; + }, + }, + ns_xiandao2:{ + audio:["huashen",2], + forced:true, + //noLose:true, + //locked:true, + //noRemove:true, + //noDisable:true, + trigger:{ + player:"damageBefore", + }, + filter:function (event,player){ + if(!event.nature) return false; + return true; + }, + content:function (){ + trigger.cancel(); + //event.finish(); + }, + }, + ns_xiandao:{ + forced:true, + //noLose:true, + //locked:true, + noRemove:true, + //noDisable:true, + group:["ns_xiandao1","ns_xiandao2"], + }, + ns_chuanshu2:{ + audio:["songwei",2], + mark:"character", + intro:{ + content:"当你造成或受到一次伤害后,$摸一张牌", + }, + nopop:true, + trigger:{ + source:"damageEnd", + player:"damageEnd", + }, + forced:true, + popup:false, + filter:function (event,player){ + return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn()&&event.num>0; + }, + content:function (){ + 'step 0' + game.delayx(); + 'step 1' + var target=player.storage.ns_chuanshu2; + player.line(target,'green'); + target.draw(); + game.delay(); + }, + onremove:true, + group:"ns_chuanshu3", + }, + ns_chuanshu3:{ + audio:1, + trigger:{ + player:"dieBegin", + }, + silent:true, + onremove:true, + filter:function (event,player){ + return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn(); + }, + content:function (){ + 'step 0' + game.delayx(); + 'step 1' + var target=player.storage.ns_chuanshu2; + player.line(target,'green'); + //target.addSkill('ns_chuanshu'); + target.restoreSkill('ns_chuanshu'); + target.update(); + }, + forced:true, + popup:false, + }, + ns_xiuzheng:{ + audio:["xinsheng",2], + enable:"phaseUse", + usable:1, + priority:10, + filter:function (event,player){ + return (ui.cardPile.childElementCount+ui.discardPile.childElementCount)>=2; + }, + filterTarget:function (card,player,target){ + return player!=target; + }, + content:function (){ + "step 0" + event.cards=get.cards(2); + player.showCards(event.cards); + "step 1" + if(get.color(event.cards[0])=='red'&&get.color(event.cards[1])=='red'){ + target.damage('fire'); + } + if(get.color(event.cards[0])!=get.color(event.cards[1])){ + player.discardPlayerCard(target,"he",true); + } + if(get.color(event.cards[0])=='black'&&get.color(event.cards[1])=='black'){ + target.damage('thunder'); + } + "step 2" + if(event.cards.length){ + player.gain(event.cards,'gain2'); + game.delay(); + } + "step 3" + player.chooseToDiscard(2,'he','请弃置两张牌',true); + }, + ai:{ + threaten:0.5, + order:13, + result:{ + target:function (player,target){ + return get.damageEffect(target,player); + }, + }, + }, + }, + nsanruo:{ + unique:true, + init:function(player){ + if(!player.node.handcards1.cardMod){ + player.node.handcards1.cardMod={}; + } + if(!player.node.handcards2.cardMod){ + player.node.handcards2.cardMod={}; + } + var cardMod=function(card){ + if(get.info(card).multitarget) return; + if(card.name=='sha'||get.type(card)=='trick') return ['暗弱','杀或普通锦囊牌对你不可见']; + }; + player.node.handcards1.cardMod.nsanruo=cardMod; + player.node.handcards2.cardMod.nsanruo=cardMod; + player.node.handcards1.classList.add('nsanruo'); + player.node.handcards2.classList.add('nsanruo'); + if(!ui.css.nsanruo){ + ui.css.nsanruo=lib.init.sheet( + '.handcards.nsanruo>.card[data-card-type="trick"]:not(*[data-card-multitarget="1"])>*,'+ + '.handcards.nsanruo>.card[data-card-name="sha"]>*{visibility:hidden !important}' + ); + } + }, + onremove:function(player){ + player.node.handcards1.classList.remove('nsanruo'); + player.node.handcards2.classList.remove('nsanruo'); + delete player.node.handcards1.cardMod.nsanruo; + delete player.node.handcards2.cardMod.nsanruo; + }, + ai:{ + neg:true + } + }, + nsxunshan:{ + mod:{ + selectTarget:function(card,player,range){ + if(!player.hasSkill('nsanruo')) return; + if(_status.auto) return; + if(get.position(card)!='h'||get.owner(card)!=player) return; + if(get.info(card).multitarget) return; + if(card.name=='sha'||get.type(card)=='trick') range[1]=game.countPlayer(); + }, + // playerEnabled:function(card,player,target,current){ + // if(current==false) return; + // var filter=get.info(card).modTarget; + // if(typeof filter=='boolean'&&filter) return 'forceEnable'; + // if(typeof filter=='function'&&filter(card,player,target)) return 'forceEnable'; + // } + // targetInRange:function(card,player){ + // if(_status.auto) return; + // if(get.position(card)!='h'||get.owner(card)!=player) return; + // if(get.info(card).multitarget) return; + // if(card.name=='sha'||get.type(card)=='trick') return true; + // } + }, + ai:{ + combo:'nsanruo' + } + }, + nskaicheng:{ + enable:'phaseUse', + usable:1, + zhuSkill:true, + unique:true, + filter:function(event,player){ + if(!player.hasZhuSkill('nskaicheng')) return false; + if(!player.hasCard(function(card){ + if(get.info(card).multitarget) return false; + return card.name=='sha'||get.type(card)=='trick'; + })){ + return false; + } + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='qun'; + }); + }, + filterCard:function(card){ + if(get.info(card).multitarget) return false; + return card.name=='sha'||get.type(card)=='trick'; + }, + filterTarget:function(card,player,target){ + return player!=target&&target.group=='qun'; + }, + lose:false, + content:function(){ + 'step 0' + target.chooseBool(function(){ + return get.attitude(target,player)>0; + },'是否将'+get.translation(cards)+'告知'+get.translation(player)); + 'step 1' + if(!player.hasUseTarget(cards[0])){ + if(result.bool){ + player.chooseControl('确定').set('prompt','你展示的手牌为'+get.translation(cards)); + } + else{ + event.hidden=true; + player.chooseControl('确定').set('prompt',get.translation(target)+'拒绝告知你卡牌信息'); + } + } + else{ + if(result.bool){ + player.chooseBool('是否使用展示的牌?','你展示的手牌为'+get.translation(cards)+'。如果你使用此牌,则在结算后摸一张牌;如果你不使用此牌,则结束出牌阶段'); + } + else{ + event.hidden=true; + player.chooseBool('是否使用展示的牌?',get.translation(target)+'拒绝告知你卡牌信息。如果你使用此牌,则在结算后摸一张牌;如果你不使用此牌,则结束出牌阶段'); + } + } + 'step 2' + if(result.bool){ + player.chooseUseTarget(true,cards[0],event.hidden?'选择此牌的目标':null); + } + else{ + var evt=_status.event.getParent('phaseUse'); + if(evt){ + evt.skipped=true; + } + event.finish(); + } + 'step 3' + player.draw(); + }, + ai:{ + combo:'nsanruo' + } + }, + nsjuanli:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h'); + }, + init:function(player){ + player.storage.nsjuanli_win=[]; + player.storage.nsjuanli_lose=[]; + }, + intro:{ + content:function(storage,player){ + var str=''; + if(player.storage.nsjuanli_win.length){ + str+=get.translation(player.storage.nsjuanli_win)+'与你距离-1直到与你下次赌牌'; + } + if(player.storage.nsjuanli_lose.length){ + if(str.length){ + str+=';'; + } + str+=get.translation(player.storage.nsjuanli_lose)+'与你距离+1直到与你下次赌牌'; + } + return str; + } + }, + onremove:['nsjuanli_win','nsjuanli_lose'], + content:function(){ + 'step 0' + player.storage.nsjuanli_win.remove(target); + player.storage.nsjuanli_lose.remove(target); + event.prompt2='赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利'; + player.chooseCard('h',true).set('prompt2',event.prompt2); + 'step 1' + if(result.bool){ + event.card1=result.cards[0]; + target.chooseCard('h',true).set('prompt2',event.prompt2); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + event.card2=result.cards[0]; + } + else{ + event.finish(); + } + 'step 3' + player.$compare(event.card1,event.target,event.card2); + game.delay(0,1500); + game.log(player,'亮出的牌为',event.card1); + game.log(target,'亮出的牌为',event.card2); + 'step 4' + var suit1=get.suit(event.card1); + var suit2=get.suit(event.card2); + if(suit1==suit2){ + game.broadcastAll(function(str){ + var dialog=ui.create.dialog(str); + dialog.classList.add('center'); + setTimeout(function(){ + dialog.close(); + },1000); + },'平局'); + game.delay(2); + if(!player.storage.nsjuanli_win.length&&!player.storage.nsjuanli_lose.length){ + player.unmarkSkill('nsjuanli'); + } + } + else{ + var cards=[]; + for(var i=0;i<1000;i++){ + var current=get.cards(); + if(current&¤t.length){ + current=current[0]; + current.discard(); + cards.push(current); + var suit=get.suit(current); + if(suit==suit1){ + player.showCards(cards,get.translation(player)+'赌牌获胜'); + player.storage.nsjuanli_win.add(target); + target.loseHp(); + player.markSkill('nsjuanli'); + break; + } + else if(suit==suit2){ + player.showCards(cards,get.translation(target)+'赌牌获胜'); + player.storage.nsjuanli_lose.add(target); + target.recover(); + player.markSkill('nsjuanli'); + break; + } + } + else{ + break; + } + } + } + }, + mod:{ + globalTo:function(from,to,distance){ + if(to.storage.nsjuanli_win&&to.storage.nsjuanli_win.contains(from)){ + return distance-1; + } + if(to.storage.nsjuanli_lose&&to.storage.nsjuanli_lose.contains(from)){ + return distance+1; + } + } + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(target.isHealthy()){ + return -1/(1+target.hp); + } + else{ + return -0.3/(1+target.hp); + } + } + } + } + }, + nsyuanchou:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:15, + check:function(event,player){ + return get.effect(event.target,event.card,event.player,player)<0; + }, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'&&get.distance(event.player,player)>1; + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card,'trick')=='trick'&&get.distance(player,target)>1) return 'zeroplayertarget'; + }, + } + } + }, + nsguhuo:{ + trigger:{player:'useCardAfter'}, + forced:true, + usable:2, + filter:function(event,player){ + if(event.parent.name=='nsguhuo') return false; + if(event.card==event.cards[0]){ + var type=get.type(event.card,'trick'); + var names=[]; + if(get.cardPile(function(card){ + if(get.type(card,'trick')!=type) return false; + if(get.info(card).multitarget) return false; + if(names.contains(card.name)) return false; + if(player.hasUseTarget(card)){ + return true; + } + else{ + names.add(card.name); + return false; + } + })){ + return true; + } + } + return true; + }, + content:function(){ + var type=get.type(trigger.card,'trick'); + var names=[]; + var card=get.cardPile(function(card){ + if(get.type(card,'trick')!=type) return false; + if(get.info(card).multitarget) return false; + if(names.contains(card.name)) return false; + if(player.hasUseTarget(card)){ + return true; + } + else{ + names.add(card.name); + return false; + } + }); + if(card){ + var info=get.info(card); + var targets=game.filterPlayer(function(current){ + return lib.filter.filterTarget(card,player,current); + }); + if(targets.length){ + targets.sort(lib.sort.seat); + var select=get.select(info.selectTarget); + if(select[0]==-1||select[1]==-1){ + player.useCard(card,targets,'noai'); + } + else if(targets.length>=select[0]){ + var num=select[0]+Math.floor(Math.random()*(select[1]-select[0]+1)); + player.useCard(card,targets.randomGets(num),'noai'); + } + } + } + } + }, + nsbaiyi:{ + trigger:{player:'phaseDiscardBefore'}, + forced:true, + filter:function(event,player){ + return player.storage.nsqinxue&&player.storage.nsqinxue.length; + }, + content:function(){ + 'step 0' + trigger.cancel(); + var num=player.storage.nsqinxue.length; + player.chooseToDiscard('白衣:请弃置'+get.cnNumber(num)+'张牌','he',true,num); + 'step 1' + if(result.bool&&result.cards.length){ + event.goon=true; + if(result.cards.length==3){ + var type=[]; + for(var i=0;i=2; + }, + content:function(){ + player.storage.nsfuge=true; + player.insertPhase(); + }, + group:'nsfuge_draw', + subSkill:{ + draw:{ + trigger:{player:'phaseDrawBegin'}, + silent:true, + filter:function(event,player){ + var evt=event.getParent('phase'); + return evt&&evt.skill=='nsfuge'; + }, + content:function(){ + trigger.num+=player.maxHp-player.hp; + } + } + } + }, + nsbaiming:{ + trigger:{player:'useCard'}, + direct:true, + filter:function(event,player){ + if(player.additionalSkills.nsbaiming) return false; + return event.card&&event.card.name=='sha'&&player.storage.nsbaiming&&player.storage.nsbaiming.length>0; + }, + group:'nsbaiming_clear', + init:function(player){ + var check=function(list){ + for(var i=0;i
【'+ + translation+'】
'+lib.translate[list[i]+'_info']+'
'); + item.firstChild.addEventListener('click',clickItem); + item.firstChild.link=list[i]; + } + } + dialog.add(ui.create.div('.placeholder')); + event.switchToAuto=function(){ + event._result=event.skillai(); + dialog.close(); + game.resume(); + }; + event.confirm=ui.create.confirm('c'); + event.custom.replace.confirm=function(){ + event._result=null; + dialog.close(); + game.resume(); + }; + _status.imchoosing=true; + game.pause(); + } + else{ + event._result=event.skillai(); + } + 'step 1' + _status.imchoosing=false; + if(event.confirm){ + event.confirm.close(); + } + if(typeof result=='string'){ + player.logSkill('nsbaiming'); + var link=result; + player.addAdditionalSkill('nsbaiming',link); + player.logSkill('nsbaiming'); + player.popup(link); + game.log(player,'获得了技能','【'+get.translation(link)+'】'); + game.delay(); + player.storage.nsbaiming.remove(link); + trigger.nsbaiming=true; + } + }, + subSkill:{ + clear:{ + trigger:{player:'useCardAfter'}, + silent:true, + filter:function(event){ + return event.nsbaiming==true; + }, + content:function(){ + player.removeAdditionalSkill('nsbaiming'); + } + } + } + }, + nsxinzhan:{ + enable:'phaseUse', + filterCard:[1,Infinity], + filter:function(event,player){ + return player.countCards('h')>0; + }, + usable:1, + selectCard:[1,Infinity], + check:function(card){ + var player=_status.event.player; + if(player.countCards('h')>=8&&game.hasPlayer(function(current){ + return current.isDamaged()&&get.attitude(player,current)>3; + })){ + if(ui.selected.cards.length>=6){ + return 0; + } + return 1; + } + else{ + if(ui.selected.cards.length>=2){ + return 0; + } + if(player.countCards('h',function(card){ + return get.value(card)<0; + })){ + return 8-get.value(card,player,'raw'); + } + else{ + return 4-get.value(card,player,'raw'); + } + } + }, + discard:false, + prepare:'give2', + content:function(){ + target.gain(cards,player); + var num=Math.floor(cards.length/2); + if(num>=3){ + target.loseMaxHp(true); + } + else if(num){ + target.loseHp(num); + } + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(ui.selected.cards.length>=6){ + if(target.isDamaged()) return 2; + return 1; + } + if(ui.selected.cards.length==1){ + return 1; + } + return -1; + } + } + } + }, + nstanbing:{ + trigger:{player:'phaseDrawBegin'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard('h',get.prompt2('nstanbing')).set('ai',function(card){ + if(!player.needsToDiscard(1)){ + return get.translation(card.name).length-1; + } + return 0; + }).logSkill='nstanbing'; + 'step 1' + if(result.bool){ + player.draw(get.translation(result.cards[0].name).length); + player.addTempSkill('nstanbing_sha'); + } + }, + subSkill:{ + sha:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name=='sha'){ + return false; + } + }, + cardUsable:function(card,player){ + if(card.name=='sha'){ + return false; + } + }, + } + } + } + }, + nswangfeng:{ + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + direct:true, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ + return get.color(card)=='red'; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('nswangfeng'); + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + if(!get.owner(result.cards[0],'judge')){ + trigger.position.appendChild(result.cards[0]); + } + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + tag:{ + rejudge:1 + } + } + }, + nsfuhuo:{ + enable:'phaseUse', + usable:1, + filterCard:true, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('nsfuhuo2'); + }, + prepare:'throw', + discard:false, + content:function(){ + target.$gain2(cards); + target.storage.nsfuhuo2=cards[0]; + target.addSkill('nsfuhuo2'); + target.storage.nsfuhuo3=player; + ui.special.appendChild(cards[0]); + target.syncStorage('nsfuhuo2'); + }, + check:function(card){ + return 6-get.value(card) + }, + ai:{ + expose:0.1, + order:4, + result:{ + target:function(player,target){ + if(target.hasSkillTag('maixie')) return 0; + return -1; + } + } + }, + group:['nsfuhuo_die','nsfuhuo_gain'], + subSkill:{ + die:{ + trigger:{player:'dieBegin'}, + silent:true, + content:function(){ + for(var i=0;i0; + }, + check:function(event,player){ + if(player.hasShan()||player.hujia>0) return false; + var nh=player.countCards('h'); + if(player.hp==1){ + return nh<=3; + } + if(player.hp==2){ + return nh<=1; + } + return false; + }, + content:function(){ + var cards=player.getCards('h'); + player.discard(cards); + player.changeHujia(cards.length); + player.storage.nsbaquan=true; + }, + group:'nsbaquan_clear', + subSkill:{ + clear:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.nsbaquan&&player.hujia>0; + }, + content:function(){ + player.changeHujia(-player.hujia); + game.log(player,'失去了所有护甲'); + delete player.storage.nsbaquan; + } + } + } + }, + nschangshi:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.identity=='fan'; + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(ui.selected.targets.length){ + return target.hp!=ui.selected.targets[0].hp; + } + return true; + }, + multitarget:true, + selectTarget:2, + content:function(){ + var tmp=targets[0].hp; + targets[0].hp=targets[1].hp; + targets[1].hp=tmp; + targets[0].update(); + targets[1].update(); + if(Math.abs(targets[0].hp-targets[1].hp)==1){ + player.loseHp(); + } + //else{ + //player.die(); + //} + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(target==game.zhu) return -1; + if(get.attitude(player,target)>3){ + var num=game.zhu.hp-target.hp; + if(num==1){ + return 1; + } + if(num>1){ + if(player.hp==1) return num; + if(target.hp==1) return num; + if(num>=3) return num; + } + } + return 0; + } + } + } + }, + nsjianning:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.identity=='nei'; + }, + filterTarget:function(card,player,target){ + return target.countCards('h')=8; + })&&player.countCards('h')-target.countCards('h')<=1){ + if(target.hp==1||player.countCards('h',function(card){ + return get.value(card)<0; + })){ + return get.damageEffect(target,player,target); + } + } + return 0; + } + } + } + }, + nscuanquan:{ + init:function(player){ + player.storage.nscuanquan=0; + }, + forced:true, + unique:true, + forceunique:true, + skillAnimation:true, + animationColor:'thunder', + trigger:{player:'damageAfter'}, + filter:function(event,player){ + return player.identity=='zhong'&&player.storage.nscuanquan==3&&game.zhu&&game.zhu.isZhu; + }, + group:'nscuanquan_count', + subSkill:{ + count:{ + trigger:{player:'damageEnd'}, + silent:true, + content:function(){ + player.storage.nscuanquan++; + } + } + }, + logTarget:function(){ + return [game.zhu]; + }, + content:function(){ + player.awakenSkill('nscuanquan'); + var tmp=player.maxHp; + player.identity='zhu'; + player.maxHp=game.zhu.hp; + player.showIdentity(); + player.update(); + game.zhu.identity='zhong'; + game.zhu.maxHp=tmp; + game.zhu.showIdentity(); + game.zhu.update(); + game.zhu=player; + } + }, + nstianji:{ + trigger:{global:'dying'}, + priority:6, + unique:true, + skillAnimation:true, + animationColor:'water', + filter:function(event,player){ + return event.player.hp<=0&&event.player!=player; + }, + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)>1; + }, + content:function(){ + 'step 0' + player.awakenSkill('nstianji'); + player.loseMaxHp(); + 'step 1' + trigger.player.recover(1-trigger.player.hp); + 'step 2' + trigger.player.gainMaxHp(); + } + }, + nsbugua:{ + group:'nsbugua_use', + ai:{ + threaten:1.4, + }, + subSkill:{ + use:{ + enable:'phaseUse', + usable:1, + filterCard:true, + check:function(card){ + return 9-get.value(card); + }, + filter:function(event,player){ + // if(!player.storage.nstuiyan2_done&&player.getStat().skill.nsbugua_use){ + // return false; + // } + return player.countCards('he'); + }, + position:'he', + ai:{ + order:9.5, + result:{ + player:1 + } + }, + content:function(){ + 'step 0' + player.throwDice(); + 'step 1' + var cards=get.cards(6); + var cards2=cards.slice(0); + var card=(cards2.splice(event.num-1,1))[0]; + player.showCards(get.translation(player)+'亮出了'+get.translation(card),cards).set('hiddencards',cards2); + card.discard(); + var name=null; + switch(get.suit(card)){ + case 'club':{ + if(card.number%2==0){ + name='guohe'; + } + else{ + name='jiedao'; + } + break; + } + case 'spade':{ + if(card.number%2==0){ + name='nanman'; + } + else{ + name='juedou'; + } + break; + } + case 'diamond':{ + if(card.number%2==0){ + name='shunshou'; + } + else{ + name='huogong'; + } + break; + } + case 'heart':{ + if(card.number%2==0){ + name='wuzhong'; + } + else{ + name='wanjian'; + } + break; + } + } + var togain=get.cardPile(name,'cardPile'); + if(togain){ + player.gain(togain,'gain2'); + } + else{ + player.draw(); + } + event.list=cards2; + 'step 2' + player.chooseCardButton(event.list,true,'按顺序将牌置于牌堆顶(先选择的在上)',event.list.length); + 'step 3' + var list=result.links.slice(0); + while(list.length){ + ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); + } + }, + }, + twice:{} + } + }, + nstuiyan:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.getParent('phaseUse',true)&&!player.hasSkill('nstuiyan_fail')&& + typeof player.storage.nstuiyan=='number'&&event.card.number>player.storage.nstuiyan; + }, + frequent:true, + priority:2, + content:function(){ + player.draw(); + }, + onremove:function(player){ + delete player.storage.nstuiyan; + delete player.storage.nstuiyan_done; + delete player.storage.nstuiyan2; + delete player.storage.nstuiyan2_done; + }, + intro:{ + mark:function(dialog,content,player){ + if(player.storage.nstuiyan_done){ + dialog.addText('推演摸牌已结束'); + } + else{ + dialog.addText('上一张点数:'+player.storage.nstuiyan); + } + if(player.storage.nstuiyan2_done){ + dialog.addText('总点数8的倍数已达成'); + } + else{ + dialog.addText('总点数:'+player.storage.nstuiyan2); + } + }, + content:function(storage,player){ + var str=''; + if(player.storage.nstuiyan_done){ + str+='推演摸牌已结束;' + } + else{ + str+='上一张牌点数:'+storage+';'; + } + if(player.storage.nstuiyan2_done){ + str+='总点数8的倍数已达成'; + } + else{ + str+='总点数:'+player.storage.nstuiyan2; + } + return str; + }, + markcount:function(storage,player){ + if(player.storage.nstuiyan2_done){ + if(player.storage.nstuiyan_done){ + return 0; + } + else{ + return player.storage.nstuiyan; + } + } + else{ + return player.storage.nstuiyan2; + } + } + }, + group:['nstuiyan_use','nstuiyan_clear'], + subSkill:{ + bugua:{ + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + 'step 0' + player.removeSkill('nstuiyan_bugua'); + player.chooseToDiscard('he','推演:是否发动一次【卜卦】?').set('ai',function(card){ + return 8-get.value(card); + }).set('logSkill','nstuiyan'); + 'step 1' + if(result.bool){ + event.insert(lib.skill.nsbugua.subSkill.use.content,{player:player}); + } + } + }, + use:{ + trigger:{player:'useCard'}, + silent:true, + priority:-1, + filter:function(event,player){ + return _status.currentPhase==player&&event.getParent('phaseUse',true)&&typeof event.card.number=='number'; + }, + content:function(){ + if(typeof player.storage.nstuiyan2!='number'){ + player.storage.nstuiyan2=0; + } + if(!player.hasSkill('nstuiyan_fail')&& + (trigger.card.number<=player.storage.nstuiyan||typeof trigger.card.number!='number')){ + player.storage.nstuiyan_done=true; + player.addTempSkill('nstuiyan_fail'); + } + player.storage.nstuiyan=trigger.card.number; + player.storage.nstuiyan2+=trigger.card.number; + if(player.storage.nstuiyan2%8==0&&!player.storage.nstuiyan2_done){ + player.storage.nstuiyan2_done=true; + player.addTempSkill('nstuiyan_bugua'); + } + player.markSkill('nstuiyan'); + } + }, + clear:{ + trigger:{player:['phaseUseAfter','phaseAfter']}, + silent:true, + content:function(){ + delete player.storage.nstuiyan; + delete player.storage.nstuiyan_done; + delete player.storage.nstuiyan2; + delete player.storage.nstuiyan2_done; + player.unmarkSkill('nstuiyan'); + } + }, + fail:{} + }, + ai:{ + threaten:1.4 + } + }, + nsshijun:{ + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + trigger.nsshijun=true; + }, + subSkill:{ + hp:{ + trigger:{source:'damageAfter'}, + silent:true, + filter:function(event){ + return event.nsshijun; + }, + content:function(){ + player.loseHp(); + } + } + }, + group:'nsshijun_hp' + }, + nszhaoxin:{ + mark:true, + intro:{ + mark:function(dialog,content,player){ + var hs=player.getCards('h'); + if(hs.length){ + dialog.addSmall(hs); + } + else{ + dialog.addText('无手牌'); + } + }, + content:function(content,player){ + var hs=player.getCards('h'); + if(hs.length){ + return get.translation(hs); + } + else{ + return '无手牌'; + } + } + }, + }, + nsxiuxin:{ + mod:{ + targetEnabled:function(card,player,target){ + var suit=get.suit(card); + if(suit&&!target.countCards('h',{suit:suit})){ + return false; + } + } + } + }, + nscangxi:{ + unique:true, + global:'nscangxi2', + zhuSkill:true, + init:function(player){ + player.storage.nscangxi=0; + }, + intro:{ + content:'手牌上限+#' + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.nscangxi; + } + } + }, + nscangxi2:{ + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + if(!event.cards||event.cards.length<=1) return false; + if(player.group!='wu') return false; + return game.hasPlayer(function(target){ + return player!=target&&target.hasZhuSkill('nscangxi',player); + }); + }, + direct:true, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current!=player&¤t.hasZhuSkill('nscangxi',player); + }); + list.sortBySeat(); + event.list=list; + 'step 1' + if(event.list.length){ + var current=event.list.shift(); + event.current=current; + player.chooseBool(get.prompt('nscangxi',current)).set('choice',get.attitude(player,current)>0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('nscangxi',event.current); + player.judge(function(card){ + return _status.event.att*(get.color(card)=='black'?1:0); + }).set('att',get.sgnAttitude(player,event.current)); + } + else{ + event.goto(1); + } + 'step 3' + if(result.color=='black'){ + var name=get.translation(event.current.name); + var att=0; + if(event.current.needsToDiscard()){ + att=1; + } + player.chooseControlList(['令'+name+'摸一张牌展示','令'+name+'手牌上永久+1','弃置一张牌并令'+name+'获得一张本回进入弃牌堆的牌'],function(){ + return _status.event.att; + }).set('att',att); + } + else{ + event.goto(1); + } + 'step 4' + switch(result.index){ + case 0: event.current.draw('visible');break; + case 1: { + if(typeof event.current.storage.nscangxi!='number'){ + event.current.storage.nscangxi=0; + } + event.current.storage.nscangxi++; + event.current.syncStorage('nscangxi'); + event.current.markSkill('nscangxi'); + break; + } + case 2: { + player.chooseToDiscard(true,'he'); + break; + } + } + if(result.index!=2){ + event.goto(1); + } + 'step 5' + if(result.bool){ + var discarded=get.discarded(); + if(discarded.length){ + event.current.chooseCardButton('选择一张获得之',discarded,true).set('ai',function(button){ + return get.value(button.link); + }); + } + else{ + event.goto(1); + } + } + else{ + event.goto(1); + } + 'step 6' + if(result.bool&&result.links&&result.links.length){ + event.current.gain(result.links,'gain2'); + } + event.goto(1); + } + }, + nswulie:{ + trigger:{player:'phaseBegin'}, + skillAnimation:true, + animationColor:'metal', + unique:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return ui.discardPile.childElementCount>0; + }, + content:function(){ + 'step 0' + player.awakenSkill('nswulie'); + player.loseMaxHp(); + 'step 1' + player.chooseCardButton(Array.from(ui.discardPile.childNodes),'将至多3张任意顺置于牌堆顶(先选择的在上)',true,[1,3]); + 'step 2' + if(result.bool){ + var cards=result.links.slice(0); + while(cards.length){ + ui.cardPile.insertBefore(cards.pop(),ui.cardPile.firstChild); + } + player.addTempSkill('nswulie_end'); + } + }, + subSkill:{ + end:{ + trigger:{player:'phaseEnd'}, + check:function(){ + return false; + }, + filter:function(event,player){ + return ui.discardPile.childElementCount>0; + }, + content:function(){ + 'step 0' + player.loseMaxHp(); + 'step 1' + player.chooseCardButton(Array.from(ui.discardPile.childNodes),'将至多3张任意顺置于牌堆顶(先选择的在上)',true,[1,3]); + 'step 2' + if(result.bool){ + var cards=result.links.slice(0); + while(cards.length){ + ui.cardPile.insertBefore(cards.pop(),ui.cardPile.firstChild); + } + } + } + } + } + }, + nshunyou:{ + enable:'phaseUse', + usable:1, + filterCard:{type:'basic'}, + filter:function(event,player){ + return player.countCards('h',{type:'basic'}); + }, + content:function(){ + 'step 0' + var equip=null, trick=null; + for(var i=0;i1){ + if(!target.getEquip(_status.event.subtype)) return att; + } + return 0; + }).set('subtype',get.subtype(event.equip)); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.line(result.targets,'green'); + player.$give(event.equip,result.targets[0]); + player.lose(event.equip,ui.special); + } + else{ + event.finish(); + } + 'step 3' + game.delay(0.5); + 'step 4' + result.targets[0].equip(event.equip); + 'step 5' + game.delay(); + }, + check:function(card){ + return 7-get.value(card); + }, + ai:{ + order:7, + result:{ + player:1 + } + } + }, + nsgongjian:{ + trigger:{player:'phaseDiscardEnd'}, + forced:true, + filter:function(event,player){ + if(event.cards&&event.cards.length>0){ + return game.hasPlayer(function(current){ + return current.hp>player.hp; + }); + } + return false; + }, + content:function(){ + 'step 0' + player.chooseTarget('恭俭:将置的牌交给一名体力值大于你的角色',function(card,player,target){ + return target.hp>player.hp; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target)/Math.sqrt(target.countCards('h')+1); + }); + 'step 1' + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(trigger.cards,'gain2'); + } + }, + }, + nscaijian:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var nh=player.countCards('h'); + return nh&&nh<=player.maxHp; + }, + content:function(){ + 'step 0' + player.showHandcards(); + event.num=player.countCards('h'); + 'step 1' + player.directgain(get.cards(event.num)); + player.chooseCard('将'+get.cnNumber(event.num)+'张手牌以按顺序置于牌堆顶(先选择的在上)',event.num,true).set('ai',function(card){ + return -get.value(card); + }); + 'step 2' + if(result.bool){ + player.lose(result.cards,ui.special)._triggered=null; + event.cards=result.cards.slice(0); + } + else{ + event.finish(); + } + 'step 3' + if(player==game.me&&_status.auto){ + game.delay(); + } + 'step 4' + while(event.cards.length){ + var current=event.cards.pop(); + current.fix(); + ui.cardPile.insertBefore(current,ui.cardPile.firstChild); + } + }, + ai:{ + order:10, + result:{ + player:1 + } + } + }, + nsdongcha:{ + trigger:{player:'damageBefore'}, + forced:true, + priority:15, + filter:function(event,player){ + if(get.type(event.card,'trick')=='trick'){ + if(event.getParent(2).name=='useCard'){ + return event.getParent(2).targets.length==1; + } + return true; + } + return false; + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + notrick:true, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'&&get.tag(card,'damage')&&!get.tag(card,'multitarget')){ + return 'zeroplayertarget'; + } + } + } + }, + group:'nsdongcha_cancel', + subSkill:{ + cancel:{ + trigger:{target:'useCardToAfter'}, + silent:true, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'&&_status.currentPhase==event.player&&event.player!=player; + }, + content:function(){ + player.addTempSkill('nsdongcha_disable'); + } + }, + disable:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:15, + onremove:true, + filter:function(event,player){ + return (event.player==_status.currentPhase&&get.type(event.card,'trick')=='trick'); + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card,'trick')=='trick'&&_status.currentPhase==player) return 'zeroplayertarget'; + } + } + } + } + } + }, + nsjianxiong:{ + trigger:{target:'useCardToBefore'}, + direct:true, + content:function(){ + 'step 0' + player.chooseToUse(function(card){ + return !get.info(card).multitarget; + },get.prompt('nsjianxiong',trigger.player),trigger.player,-1); + 'step 1' + if(event.damaged){ + trigger.cancel(); + if(get.color(trigger.card)=='black'){ + player.draw(); + } + } + }, + subSkill:{ + damage:{ + trigger:{source:'damageAfter'}, + silent:true, + filter:function(event,player){ + return event.getParent(4).name=='nsjianxiong'; + }, + content:function(){ + trigger.getParent(4).damaged=true; + } + } + }, + group:'nsjianxiong_damage', + ai:{ + effect:{ + player:function(card,player,target){ + if(_status.currentPhase!=player) return; + if(get.tag(card,'damage')&&!player.needsToDiscard(1)&&target.hp>1){ + return 'zeroplayertarget'; + } + } + } + } + }, + nsxionglue:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h',{color:'black'}); + }, + check:function(card){ + return 7-get.value(card); + }, + filterCard:{color:'black'}, + content:function(){ + 'step 0' + var list=get.inpile('trick'); + list=list.randomGets(3); + for(var i=0;i1; + return true; + }, + direct:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + player.chooseTarget(2,get.prompt2('nshuanhuo'),function(card,player,target){ + return target!=player&&!target.isUnseen(2); + }).set('ai',function(target){ + var att=get.attitude(player,target); + if(ui.selected.targets.length){ + if(att<0){ + return get.rank(target,true)-get.rank(ui.selected.targets[0],true); + } + } + else{ + if(att>=0){ + return 1/(1+get.rank(target,true)); + } + } + return 0; + }); + 'step 1' + if(result.bool){ + player.logSkill('nshuanhuo',result.targets); + } + else{ + event.finish(); + } + 'step 2' + var name1=result.targets[0].name; + var name2=result.targets[1].name; + result.targets[0].reinit(name1,name2,false); + result.targets[1].reinit(name2,name1,false); + } + }, + nsyaowang:{ + trigger:{player:'phaseBegin'}, + direct:true, + group:'tianshu_remove', + createDialog:function(player,target,onlylist){ + var names=[]; + var list=[]; + if(target.name&&!target.isUnseen(0)) names.add(target.name); + if(target.name1&&!target.isUnseen(0)) names.add(target.name1); + if(target.name2&&!target.isUnseen(1)) names.add(target.name2); + var pss=player.getSkills(); + for(var i=0;i
【'+ + translation+'】
'+lib.translate[list[i]+'_info']+'
'); + item.firstChild.addEventListener('click',clickItem); + item.firstChild.link=list[i]; + } + } + dialog.add(ui.create.div('.placeholder')); + return dialog; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nsyaowang'),function(card,player,target){ + var names=[]; + if(target.name&&!target.isUnseen(0)) names.add(target.name); + if(target.name1&&!target.isUnseen(0)) names.add(target.name1); + if(target.name2&&!target.isUnseen(1)) names.add(target.name2); + var pss=player.getSkills(); + for(var i=0;i0) return Math.random(); + return 0; + }); + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('nsyaowang',event.target); + } + else{ + event.finish(); + } + 'step 2' + event.skillai=function(list){ + return get.max(list,get.skillRank,'item'); + }; + if(event.isMine()){ + event.dialog=lib.skill.tianshu.createDialog(player,target); + event.switchToAuto=function(){ + event._result=event.skillai(event.list); + game.resume(); + }; + _status.imchoosing=true; + game.pause(); + } + else{ + event._result=event.skillai(lib.skill.nsyaowang.createDialog(player,target,true)); + } + 'step 3' + _status.imchoosing=false; + if(event.dialog){ + event.dialog.close(); + } + player.addTempSkill(result); + player.popup(result); + game.log(player,'获得了','【'+get.translation(result)+'】'); + + var names=[]; + for(var i=0;i2){ + return att*2; + } + else{ + return att; + } + } + else{ + return -att; + } + }); + 'step 1' + if(result.bool){ + player.logSkill('nsyunxing',result.targets); + result.targets[0].turnOver(); + } + } + } + } + }, + nsguanxing:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.hp>0; + }, + content:function(){ + 'step 0' + event.cards=get.cards(game.countPlayer()); + event.chosen=[]; + event.num=player.hp; + 'step 1' + var js=player.getCards('j'); + var pos; + var choice=-1; + var getval=function(card,pos){ + if(js[pos]){ + return (get.judge(js[pos]))(card); + } + else{ + return get.value(card); + } + }; + for(pos=0;posmax){ + choice=j; + max=current; + } + } + if(choice!=-1){ + break; + } + } + player.chooseCardButton('观星:选择要移动的牌(还能移动'+event.num+'张)',event.cards).set('filterButton',function(button){ + return !_status.event.chosen.contains(button.link); + }).set('chosen',event.chosen).set('ai',function(button){ + return button.link==_status.event.choice?1:0; + }).set('choice',event.cards[choice]); + event.pos=pos; + 'step 2' + if(result.bool){ + var card=result.links[0]; + var index=event.cards.indexOf(card); + event.card=card; + event.chosen.push(card); + event.cards.remove(event.card); + var buttons=event.cards.slice(0); + player.chooseControl(function(){ + return _status.event.controlai; + }).set('controlai',event.pos||0).set('sortcard',buttons).set('tosort',card); + } + else{ + event.goto(4); + } + 'step 3' + if(typeof result.index=='number'){ + if(result.index>event.cards.length){ + ui.cardPile.appendChild(event.card); + } + else{ + event.cards.splice(result.index,0,event.card); + } + event.num--; + if(event.num>0){ + event.goto(1); + } + } + 'step 4' + while(event.cards.length){ + ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); + } + var js=player.getCards('j'); + if(js.length==1){ + if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ + player.addTempSkill('guanxing_fail'); + } + } + }, + ai:{ + guanxing:true + } + }, + nshaoling:{ + skillAnimation:true, + animationColor:'water', + unique:true, + limited:true, + enable:'phaseUse', + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" + player.awakenSkill('nshaoling'); + event.targets=game.filterPlayer(); + event.targets.remove(player); + event.targets.remove(target); + event.targets.sortBySeat(); + "step 1" + if(event.targets.length){ + event.current=event.targets.shift(); + if(event.current.countCards('he')&&target.isAlive()){ + event.current.chooseToUse({name:'sha'},target,-1,'号令').set('prompt2','选择一项:1. 对'+get.translation(event.current)+'使用一张杀;2. 取消并交给'+get.translation(player)+'一张牌,然后视'+get.translation(player)+'为对你使用一张杀'); + } + } + else{ + event.finish(); + } + "step 2" + if(result.bool==false){ + if(event.current.countCards('he')){ + event.current.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); + } + else{ + event.goto(4); + } + } + else{ + event.goto(1); + } + "step 3" + if(result.bool){ + event.current.give(result.cards,player); + } + "step 4" + player.useCard({name:'sha'},event.current,false); + event.goto(1); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + var players=game.filterPlayer(); + if(player.hp>1){ + if(game.phaseNumber0; + }, + threaten:1.5, + save:true, + respondTao:true, + } + }, + nscaiyi:{ + trigger:{global:'drawAfter'}, + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(get.effect(event.player,{name:'sha'},player,player)<=0) return false; + if(get.effect(player,{name:'sha'},event.player,player)>=0) return true; + return player.hasShan()&&player.hp>=event.player.hp; + }, + filter:function(event,player){ + return player!=event.player&&Array.isArray(event.result)&&event.result.length>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.viewCards(get.translation(trigger.player)+'摸到的牌',trigger.result); + if(!event.isMine()){ + game.delayx(); + } + 'step 1' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + trigger.cancel(); + player.hp=1; + player.update(); + if(_status.currentPhase==player){ + var num=4; + // if(game.countPlayer()>=7){ + // num=5; + // } + if(!player.hasSkill('nspinmin_used')&&player.maxHp=4){ + return false; + } + } + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'save')){ + if(_status.currentPhase==player) return 0; + if(target.maxHp>1&&player!=target) return 0; + } + if(get.tag(card,'recover')){ + if(_status.currentPhase==player) return 0; + } + } + } + } + }, + nsduijue:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + "step 0" + var color={ + black:player.countCards('h',function(card){ + return get.color(card)=='red'&&get.value(card)<8; + }), + red:player.countCards('h',function(card){ + return get.color(card)=='black'&&get.value(card)<8; + }) + }; + player.chooseToDiscard(get.prompt2('nsduijue')).set('ai',function(card){ + var num=_status.event.color[get.color(card)]; + if(_status.event.goon&&num>=1){ + return 7+num-get.value(card); + } + }).set('goon',game.hasPlayer(function(current){ + return get.effect(current,{name:'juedou'},player,player)>0; + })).set('color',color).set('logSkill','nsduijue'); + "step 1" + if(result.bool){ + player.addTempSkill('nsduijue_use'); + player.storage.nsduijue_use=get.color(result.cards[0]); + } + }, + subSkill:{ + use:{ + enable:'phaseUse', + viewAs:{name:'juedou'}, + usable:2, + filter:function(event,player){ + return player.hasCard(function(card){ + return get.color(card)!=player.storage.nsduijue_use; + }); + }, + filterCard:function(card,player){ + return get.color(card)!=player.storage.nsduijue_use; + }, + check:function(card){ + return 8-get.value(card); + }, + ai:{ + basic:{ + order:10 + } + } + } + } + }, + nsshuangxiong:{ + trigger:{player:'juedouBegin',target:'juedouBegin'}, + check:function(event,player){ + return player.isTurnedOver(); + }, + content:function(){ + player.turnOver(); + } + }, + nsguanyong:{ + enable:'chooseToRespond', + filterCard:true, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h')) return false; + }, + prompt:'将一张手牌当杀打出', + check:function(card){return 7-get.value(card)}, + ai:{ + respondSha:true, + skillTagFilter:function(player,tag,arg){ + if(arg!='respond') return false; + if(!player.countCards('h')) return false; + }, + } + }, + nsjihui:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + return event.cards.length>=3; + }, + content:function(){ + player.insertPhase(); + player.storage.nsjihui_use=_status.currentPhase; + player.addSkill('nsjihui_use'); + }, + subSkill:{ + use:{ + mark:'character', + intro:{ + content:'使用牌只能指定自己与$为目标' + }, + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='nsjihui'; + }, + onremove:true, + content:function(){ + player.removeSkill('nsjihui_use'); + }, + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target&&player.storage.nsjihui_use!=target) return false; + } + } + } + } + }, + nsmouyun:{ + enable:'phaseUse', + round:2, + filterTarget:function(card,player,target){ + return target.isMinHp()&&target!=player&&target.isDamaged(); + }, + content:function(){ + if(target.isDamaged()){ + player.discardPlayerCard(target,'hej',target.maxHp-target.hp,true); + } + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + return target.hp-target.maxHp; + } + } + } + }, + nscongjun:{ + forbid:['guozhan'], + unique:true, + forceunique:true, + init:function(player){ + if(player.storage.nscongjun_show) return false; + var change=function(target){ + if(target==player){ + var list; + if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][0]!='male'; + }); + } + else{ + list=get.gainableCharacters(function(info){ + return info[0]=='male'; + }); + } + var name=list.randomGet(); + target.reinit('ns_huamulan',name,'nosmooth'); + target.storage.nscongjun_show=name; + target.addSkill('nscongjun_show'); + player._inits.remove(change); + player.hp=player.maxHp; + player.update(); + } + } + if(!player._inits){ + player._inits=[]; + } + player._inits.push(change); + }, + subSkill:{ + show:{ + trigger:{global:'useCard'}, + filter:function(event,player){ + return player.getEnemies().contains(event.player)&&event.card.name=='wuxie'&&event.getRand()<0.1; + }, + direct:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + game.delay(0.5); + 'step 1' + player.reinit(player.storage.nscongjun_show,'ns_huamulan','nosmooth'); + player.logSkill('nscongjun_show'); + 'step 2' + player.removeSkill('nscongjun_show'); + player.line(trigger.player,'green'); + trigger.player.damage(2); + } + } + } + }, + nstaiping:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return !event.nshuanxian&&player.getSubPlayers('nshuanxian').length; + }, + direct:true, + priority:-0.1, + ai:{ + maixie:true, + maixie_hp:true + }, + content:function(){ + 'step 0' + event.num=trigger.num; + 'step 1' + var left=player.storage.nshuanxian_left; + var right=player.storage.nshuanxian_right; + var list=[]; + var choice=0; + var hpleft=0; + var maxleft=0; + if(left&&player.hasSkill(left)){ + if(player.storage[left].hp1){ + event.num--; + event.goto(1); + } + } + }, + nsshoudao:{ + group:['nsshoudao_gain','nsshoudao_die'], + subSkill:{ + gain:{ + trigger:{player:'subPlayerDie'}, + forced:true, + filter:function(event,player){ + var left=player.storage.nshuanxian_left; + if(left&&player.hasSkill(left)) return false; + var right=player.storage.nshuanxian_right; + if(right&&player.hasSkill(right)) return false; + if(!player.storage.nshuanxian_damage) return false; + return true; + }, + content:function(){ + player.addSkill('releiji'); + player.addSkill('guidao'); + } + }, + die:{ + trigger:{player:'dieBegin'}, + direct:true, + filter:function(event,player){ + if(game.countPlayer()<=2) return false; + var left=player.storage.nshuanxian_left; + if(left&&player.hasSkill(left)) return true; + var right=player.storage.nshuanxian_right; + if(right&&player.hasSkill(right)) return true; + return false; + }, + content:function(){ + 'step 0' + var str; + var left=player.storage.nshuanxian_left; + var right=player.storage.nshuanxian_right; + if(left&&player.hasSkill(left)&&right&&player.hasSkill(right)){ + str='令一名其他角色获得技能【雷击】和【鬼道】'; + } + else{ + str='令一名其他角色获得技能【雷击】或【鬼道】'; + } + if(trigger.source){ + str+='('+get.translation(trigger.source)+'除外)'; + } + player.chooseTarget(function(card,player,target){ + return target!=player&&target!=_status.event.source; + },get.prompt('nsshoudao')).set('ai',function(target){ + if(target.hasSkill('releiji')) return 0; + return get.attitude(_status.event.player,target); + }).set('source',trigger.source).set('prompt2',str); + 'step 1' + var goon=false; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('nsshoudao',target); + var left=player.storage.nshuanxian_left; + var right=player.storage.nshuanxian_right; + if(left&&player.hasSkill(left)&&right&&player.hasSkill(right)){ + target.addSkillLog('releiji'); + target.addSkillLog('guidao'); + } + else{ + event.target=target; + player.chooseControl('releiji','guidao').set('prompt','令'+get.translation(target)+'获得一项技能'); + goon=true; + } + } + if(!goon){ + event.finish(); + } + 'step 2' + event.target.addSkillLog(result.control); + } + } + } + }, + nshuanxian:{ + trigger:{global:'gameStart',player:'enterGame'}, + forced:true, + nosub:true, + unique:true, + group:['nshuanxian_left','nshuanxian_right','nshuanxian_damage','nshuanxian_swap','nshuanxian_draw'], + content:function(){ + player.storage.nshuanxian_right=player.addSubPlayer({ + name:'ns_nanhua_right', + skills:['nshuanxian_left','nshuanxian_draw','nshuanxian_swap'], + hp:2, + maxHp:2, + hs:get.cards(2), + skill:'nshuanxian', + intro:'你的本体回合结束后,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的下家的准备阶段,切换至此随从', + intro2:'当前回合结束后切换回本体', + onremove:function(player){ + delete player.storage.nshuanxian_right; + } + }); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(!target.hasFriend()) return; + if(target.hp<=2) return; + if(!target.storage.nshuanxian_damage){ + if(get.attitude(player,target)<0||get.tag(card,'multineg')) return [0,1]; + return [1,1]; + } + } + } + } + }, + // mod:{ + // globalFrom:function(from,to,distance){ + // + // }, + // globalTo:function(from,to,distance){ + // + // } + // }, + // global:'nshuanxian_choose', + subSkill:{ + chosen:{}, + leftdist:{ + mod:{ + globalFrom:function(from,to,distance){ + + }, + globalTo:function(from,to,distance){ + + } + } + }, + rightdist:{ + mod:{ + globalFrom:function(from,to,distance){ + + }, + globalTo:function(from,to,distance){ + + } + } + }, + swap:{ + trigger:{global:'phaseBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player!=player; + }, + priority:20, + content:function(){ + var next=player.getNext(); + var prev=player.getPrevious(); + var left=player.storage.nshuanxian_left; + var right=player.storage.nshuanxian_right; + if(prev==next||(trigger.player!=next&&trigger.player!=prev)){ + if(player.hasSkill('subplayer')){ + player.exitSubPlayer(); + } + } + else if(prev==trigger.player&&player.name!=left&&left){ + if(!player.hasSkill('subplayer')){ + player.callSubPlayer(left); + } + else{ + player.toggleSubPlayer(left); + } + } + else if(next==trigger.player&&player.name!=right&&right){ + if(!player.hasSkill('subplayer')){ + player.callSubPlayer(right); + } + else{ + player.toggleSubPlayer(right); + } + } + } + }, + damage:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return !player.storage.nshuanxian_damage; + }, + content:function(){ + player.storage.nshuanxian_damage=true; + player.storage.nshuanxian_left=player.addSubPlayer({ + name:'ns_nanhua_left', + skills:['nshuanxian_middle','nshuanxian_draw','nshuanxian_swap'], + hp:2, + maxHp:2, + hs:get.cards(2), + skill:'nshuanxian', + intro:'你的本体回合开始前,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的上家的准备阶段,切换至此随从', + intro2:'当前回合结束后切换回本体', + onremove:function(player){ + delete player.storage.nshuanxian_left; + } + }); + trigger.nshuanxian=true; + } + }, + draw:{ + trigger:{player:'phaseDrawBegin'}, + silent:true, + filter:function(event){ + return event.num>0; + }, + content:function(){ + trigger.num--; + } + }, + left:{ + trigger:{player:'phaseBefore'}, + forced:true, + popup:false, + priority:40, + filter:function(event,player){ + if(event.skill=='nshuanxian_middle') return false; + if(event.skill=='nshuanxian_right') return false; + var left=player.storage.nshuanxian_left; + if(player.hasSkill('subplayer')){ + if(!left) return player.name==player.storage.nshuanxian_right; + return player.storage.subplayer.skills.contains(left); + } + else{ + if(!left) return false; + return player.hasSkill(left); + } + }, + content:function(){ + if(player.hasSkill('subplayer')){ + var left=player.storage.nshuanxian_left; + if(left&&player.storage.subplayer.skills.contains(left)){ + player.toggleSubPlayer(player.storage.nshuanxian_left); + } + else{ + player.exitSubPlayer(); + } + } + else{ + player.callSubPlayer(player.storage.nshuanxian_left); + } + } + }, + middle:{ + trigger:{player:['phaseAfter','phaseCancelled']}, + forced:true, + popup:false, + priority:-40, + filter:function(event,player){ + if(player.hasSkill('nshuanxian_chosen')) return false; + return true; + }, + content:function(){ + player.exitSubPlayer(); + player.insertPhase(null,true); + } + }, + right:{ + trigger:{player:['phaseAfter','phaseCancelled']}, + forced:true, + popup:false, + priority:-40, + filter:function(event,player){ + if(player.hasSkill('nshuanxian_chosen')) return false; + if(player.hasSkill('subplayer')) return false; + var right=player.storage.nshuanxian_right; + if(!right) return false; + return player.hasSkill(right); + }, + content:function(){ + player.callSubPlayer(player.storage.nshuanxian_right); + player.insertPhase(null,true); + player.addTempSkill('nshuanxian_chosen',['phaseBegin','phaseCancelled']); + } + }, + end:{ + trigger:{player:['phaseAfter','phaseCancelled']}, + forced:true, + popup:false, + priority:-40, + filter:function(event,player){ + if(player.hasSkill('nshuanxian_chosen')) return false; + return true; + }, + content:function(){ + if(player.hasSkill('subplayer')){ + player.exitSubPlayer(); + } + }, + content_old:function(){ + 'step 0' + var controls=['本体']; + var left=player.storage.nshuanxian_left; + var right=player.storage.nshuanxian_right; + if(player.hasSkill('subplayer')){ + if(player.storage.subplayer.skills.contains(left)){ + controls.unshift('幻身·左'); + } + if(player.storage.subplayer.skills.contains(right)){ + controls.push('幻身·右'); + } + } + else{ + if(player.hasSkill(left)){ + controls.unshift('幻身·左'); + } + if(player.hasSkill(right)){ + controls.push('幻身·右'); + } + } + if(controls.length>1){ + player.chooseControl(controls,function(event,player){ + return Math.floor(Math.random()*_status.event.num); + }).set('prompt','选择一个形态直到下一回合开始').set('num',controls.length); + } + else{ + event.finish(); + } + 'step 1' + switch(result.control){ + case '幻身·左':{ + if(!player.hasSkill('subplayer')){ + player.callSubPlayer(player.storage.nshuanxian_left); + } + else{ + player.toggleSubPlayer(player.storage.nshuanxian_left); + } + break; + } + case '幻身·右':{ + if(!player.hasSkill('subplayer')){ + player.callSubPlayer(player.storage.nshuanxian_right); + } + break; + } + default:{ + if(player.hasSkill('subplayer')){ + player.exitSubPlayer(); + } + break; + } + } + player.addTempSkill('nshuanxian_chosen','phaseBegin'); + } + } + } + }, + nsnongquan:{ + enable:'phaseUse', + // usable:4, + filter:function(event,player){ + return player.countCards('h')==1&&player.canUse('wuzhong',player); + }, + direct:true, + delay:0, + content:function(){ + player.useCard({name:'wuzhong'},player.getCards('h'),player,'nsnongquan'); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return 10-get.value(player.getCards('h')[0]); + } + } + } + }, + nsdufu:{ + trigger:{source:'damageBefore'}, + check:function(event,player){ + return event.player.hasSkillTag('maixie'); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nsdufu'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + if(_status.event.bool){ + return -get.attitude(_status.event.player,target); + } + return 0; + }).set('bool',trigger.player.hasSkillTag('maixie_defend')); + 'step 1' + if(result.bool){ + player.logSkill('nsdufu',result.targets); + trigger.source=result.targets[0]; + } + } + }, + diyjizhi:{ + audio:2, + usable:3, + trigger:{player:'useCard'}, + frequent:true, + filter:function(event){ + var type=get.type(event.card,'trick'); + return (type=='trick'||type=='equip')&&event.card.isCard; + }, + content:function(){ + "step 0" + var cards=get.cards(); + player.gain(cards,'gain2','log'); + if(get.type(cards[0])!='basic'){ + event.finish(); + } + "step 1" + player.chooseToDiscard('h',true); + }, + ai:{ + threaten:1.4 + } + }, + yiesheng:{ + enable:'phaseUse', + filterCard:{color:'black'}, + filter:function(event,player){ + return player.countCards('h',{color:'black'})>0; + }, + selectCard:[1,Infinity], + prompt:'弃置任意张黑色手牌并摸等量的牌', + check:function(card){return 5-get.value(card)}, + content:function(){ + player.draw(cards.length); + }, + ai:{ + order:1, + result:{ + player:1 + }, + }, + }, + liangji:{ + audio:["liangji",2], + enable:"phaseUse", + usable:1, + filterTarget:function (card,player,target){ + return target!=player&&!target.hasSkill('liangji_1'); + }, + content:function (){ + 'step 0' + player.chooseCard('h','环计:将1张牌置于'+get.translation(target)+'的武将牌上',true).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 7-get.value(card); + } + return -get.value(card); + }); + 'step 1' + if(result.bool){ + player.$give(result.cards,target); + player.lose(result.cards,ui.special); + target.storage.liangji_1=result.cards; + target.storage.liangji_1_source=target; + target.syncStorage('liangji_1'); + target.addSkill('liangji_1'); + } + }, + ai:{ + order:1, + result:{ + target:function (player,target){ + if(get.attitude(player,target)>0){ + return Math.sqrt(target.countCards('he')); + } + return 0; + }, + player:1, + }, + }, + subSkill:{ + "1":{ + trigger:{ + player:"phaseDrawBegin", + }, + forced:true, + mark:true, + intro:{ + content:"cards", + }, + content:function (){ + 'step 0' + var cards=player.storage.liangji_1; + if(cards){ + player.gain(cards,'gain2'); + } + player.storage.liangji_1=0; + 'step 1' + if(player.sex=='male')player.addTempSkill('wushuang'); + if(player.sex=='female')player.addTempSkill('lijian'); + player.removeSkill('liangji_1'); + }, + sub:true, + }, + }, + }, + jugong:{ + audio:["jingong",2], + trigger:{ + global:"damageEnd", + }, + usable:1, + frequent:true, + locked:false, + notemp:true, + marktext:"功", + init:function (player){ + player.storage.jugong=[]; + }, + filter:function (event,player){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink() + &&_status.currentPhase!=player; + }, + content:function (){ + "step 0" + player.draw(); + "step 1" + if(player.countCards('h')){ + player.chooseCard('将'+get.cnNumber(1)+'张手牌置于武将牌上作为“功”',1,true); + } + else{ + event.finish(); + } + "step 2" + if(result.cards&&result.cards.length){ + player.lose(result.cards,ui.special); + player.storage.jugong=player.storage.jugong.concat(result.cards); + player.syncStorage('jugong'); + player.markSkill('jugong'); + game.log(player,'将',result.cards,'置于武将牌上作为“功”'); + } + }, + intro:{ + content:"cards", + }, + group:"jugong_1", + subSkill:{ + "1":{ + trigger:{ + player:"damageBegin", + }, + filter:function (event,player){ + return player.storage.jugong.length>1; + }, + content:function (){ + "step 0" + player.chooseCardButton('移去两张“功”',2,player.storage.jugong,true); + "step 1" + if(event.directresult||result.bool){ + player.logSkill('jugong'); + var links=event.directresult||result.links; + for(var i=0;i=4) return [0.5,get.tag(card,'damage')*2]; + if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==3) return [0.5,get.tag(card,'damage')*0.2]; + if(target.hp==2) return [0.1,get.tag(card,'damage')*0.1]; + } + }, + }, + }, + }, + chengmou:{ + audio:["moucheng",2], + trigger:{ + player:"phaseDrawBegin", + }, + frequent:true, + filter:function (event,player){ + return player.storage.jugong.length>0; + }, + content:function (){ + 'step 0' + if(player.storage.jugong.length>2) player.loseHp(); + 'step 1' + var cards=player.storage.jugong; + if(cards){ + player.gain(cards,'gain2'); + } + player.storage.jugong=[]; + 'step 2' + trigger.cancel(); + }, + }, + nsxinsheng:{ + trigger:{source:'damageEnd'}, + frequent:true, + filter:function(event,player){ + return player.isHealthy(); + }, + content:function(){ + player.gainMaxHp(trigger.num,true); + player.draw(trigger.num); + } + }, + nsdunxing:{ + trigger:{player:'damageBefore'}, + filter:function(event,player){ + return player.isDamaged(); + }, + content:function(){ + trigger.cancel(); + player.loseMaxHp(trigger.num,true); + player.draw(trigger.num); + } + }, + liangce:{ + enable:'phaseUse', + viewAs:{name:'wugu'}, + usable:1, + filterCard:{type:'basic'}, + filter:function(event,player){ + return player.countCards('h',{type:'basic'})>0; + }, + check:function(card){ + return 6-get.value(card); + }, + group:'liangce2' + }, + liangce2:{ + trigger:{global:'wuguRemained'}, + direct:true, + filter:function(event){ + return event.remained.length>0; + }, + content:function(){ + 'step 0' + var du=0; + for(var i=0;i=trigger.remained.length/2) return -att; + return att; + }); + 'step 1' + if(result.bool){ + player.logSkill('liangce',result.targets); + result.targets[0].gain(trigger.remained.slice(0),'gain2','log'); + trigger.remained.length=0; + } + } + }, + jianbi:{ + trigger:{global:'useCard'}, + priority:5, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(get.info(event.card).multitarget) return false; + if(event.targets.length<2) return false; + if(!event.targets.contains(player)) return false; + return true; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('jianbi'), + [1,1],function(card,player,target){ + return _status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var eff=-get.effect(target,trigger.card,trigger.player,_status.event.player); + if(trigger.card.name=='wugu'&&eff==0&&get.attitude(player,target)<0){ + return 0.01; + } + return eff; + }); + "step 1" + if(result.bool){ + event.targets=result.targets; + if(event.isMine()){ + player.logSkill('jianbi',event.targets); + event.finish(); + } + for(var i=0;i0; + }, + position:'he', + filterCard:{type:'equip'}, + check:function(card){ + var player=_status.event.player; + var he=player.getCards('he'); + var subtype=get.subtype(card); + var value=get.equipValue(card); + for(var i=0;i=value){ + return 10; + } + } + if(!player.needsToDiscard()){ + return 4-get.equipValue(card); + } + return 0; + }, + content:function(){ + player.draw(); + }, + discard:false, + prompt:'将一张装备牌置入弃牌堆并摸一张牌', + delay:0.5, + loseTo:'discardPile', + prepare:function(cards,player){ + player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); + }, + ai:{ + basic:{ + order:8.5 + }, + result:{ + player:1, + }, + } + }, + choudu:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return lib.filter.cardEnabled({name:'diaobingqianjiang'},target); + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + var list=game.filterPlayer(); + list.sortBySeat(target); + target.useCard({name:'diaobingqianjiang'},list); + }, + ai:{ + order:1, + result:{ + player:function(player,target){ + if(get.attitude(player,target)<=1) return 0; + return game.countPlayer(function(current){ + return get.effect(current,{name:'diaobingqianjiang'},target,player); + }); + } + } + } + }, + liduan:{ + trigger:{global:'gainAfter'}, + filter:function(event,player){ + if(event.player==player) return false; + if(_status.currentPhase==event.player) return false; + if(event.cards.length!=1) return false; + return get.type(event.cards[0])=='equip'&&get.position(event.cards[0])=='h'&&event.player.hasUseTarget(event.cards[0]); + }, + logTarget:'player', + check:function(event,player){ + var att=get.attitude(player,event.player); + var subtype=get.subtype(event.cards[0]); + if(att>0){ + if(event.player.countCards('h')>=player.countCards('h')+2) return true; + return event.player.countCards('e',{subtype:subtype})==0; + } + else{ + return event.player.countCards('e',{subtype:subtype})>0; + } + }, + content:function(){ + 'step 0' + var bool=false; + var subtype=get.subtype(trigger.cards[0]); + var current=trigger.player.getEquip('e',parseInt(subtype[5])); + var att=get.attitude(trigger.player,player); + if(current){ + if(att>0){ + bool=true; + } + else{ + if(get.equipValue(current)>get.equipValue(trigger.cards[0])){ + bool=true; + } + } + } + trigger.player.chooseCard('立断').set('prompt2','将一张手牌交给'+get.translation(player)+',或取消并使用'+get.translation(trigger.cards)).ai=function(card){ + if(bool){ + if(att>0){ + return 8-get.value(card); + } + else{ + return 4-get.value(card); + } + } + else{ + if(att<=0) return -get.value(card); + return 0; + } + } + 'step 1' + if(result.bool){ + player.gain(result.cards,trigger.player); + trigger.player.$give(1,player); + } + else{ + trigger.player.chooseUseTarget(trigger.cards[0],true); + } + } + }, + jinyan:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardUsable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardRespondable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardSavable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filterCard:function(card){ + return get.type(card,'trick')=='trick'&&get.color(card)=='black'; + }, + viewAsFilter:function(player){ + if(player.hp>2) return false; + if(!player.hasCard(function(card){ + return get.type(card,'trick')=='trick'&&get.color(card)=='black'; + })) return false; + }, + viewAs:{name:'sha'}, + prompt:'将一张黑色锦囊牌当作杀使用或打出', + check:function(){return 1}, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + if(player.hp>2) return false; + if(!player.hasCard(function(card){ + return get.type(card,'trick')=='trick'&&get.color(card)=='black'; + })) return false; + } + } + }, + fuchou:{ + trigger:{target:'shaBefore'}, + filter:function(event,player){ + return player.countCards('he')>0; + }, + direct:true, + content:function(){ + 'step 0' + var bool=false; + if(!player.hasShan()&&get.effect(player,trigger.card,trigger.player,player)<0){ + bool=true; + } + player.chooseCard('he',get.prompt('fuchou',trigger.player)).set('ai',function(card){ + var player=_status.event.player; + if(bool){ + if(player.hp<=1){ + if(get.tag(card,'save')) return 0; + return 8-get.value(card); + } + return 6-get.value(card); + } + return -get.value(card); + }); + 'step 1' + if(result.bool){ + trigger.cancel(); + player.logSkill('fuchou',trigger.player); + trigger.player.gain(result.cards,player); + if(get.position(result.cards[0])=='h'){ + player.$give(1,trigger.player); + } + else{ + player.$give(result.cards,trigger.player); + } + player.storage.fuchou2.add(trigger.player); + } + }, + group:'fuchou2' + }, + fuchou2:{ + init:function(player){ + player.storage.fuchou2=[]; + }, + forced:true, + trigger:{global:'phaseAfter'}, + filter:function(event,player){ + for(var i=0;i0); + var next=player.chooseToDiscard('he',{type:'equip'},get.prompt('youzhan',trigger.target)); + next.ai=function(card){ + if(bool){ + return 7-get.value(card); + } + return 0; + }; + next.logSkill=['youzhan',trigger.target]; + 'step 1' + if(result.bool){ + event.youdiinfo={ + source:trigger.player, + evt:trigger + } + trigger.target.useCard({name:'youdishenru'}); + } + } + }, + kangyin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + player.discardPlayerCard(target,true); + 'step 2' + if(player.isDamaged()&&result.links&&result.links.length){ + if(get.type(result.links[0])=='basic'){ + player.chooseTarget([1,player.maxHp-player.hp], + '选择至多'+get.cnNumber(player.maxHp-player.hp)+'名角色各摸一张牌').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + } + else{ + player.storage.kangyin2=player.maxHp-player.hp; + player.addTempSkill('kangyin2'); + event.finish(); + } + } + else{ + event.finish(); + } + 'step 3' + if(result.targets&&result.targets.length){ + result.targets.sort(lib.sort.seat); + player.line(result.targets,'green'); + game.asyncDraw(result.targets); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(player.hp>=4) return -1; + if(player.hp==3&&!player.needsToDiscard()) return -1; + return 0; + } + } + } + }, + kangyin2:{ + mark:true, + intro:{ + content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#' + }, + onremove:true, + mod:{ + globalFrom:function(from,to,distance){ + return distance-from.storage.kangyin2; + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]+=player.storage.kangyin2; + }, + } + }, + duoqi:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(_status.currentPhase==player) return false; + if(!player.storage.zhucheng||!player.storage.zhucheng.length) return false; + var evt=event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse') return true; + return false; + }, + direct:true, + content:function(){ + 'step 0' + var bool=false; + if(get.attitude(player,trigger.player)<0&&trigger.player.needsToDiscard()){ + bool=true; + } + player.chooseCardButton(get.prompt('zhucheng',_status.currentPhase),player.storage.zhucheng).set('ai',function(button){ + return _status.event.bool?1:0; + }).set('bool',bool); + 'step 1' + if(result.bool){ + player.logSkill('zhucheng',_status.currentPhase); + player.$throw(result.links[0]); + player.storage.zhucheng.remove(result.links[0]); + result.links[0].discard(); + player.syncStorage('zhucheng'); + if(player.storage.zhucheng.length==0){ + player.unmarkSkill('zhucheng'); + } + else{ + player.updateMarks(); + } + var evt=trigger.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; + } + } + }, + ai:{ + expose:0.2 + } + }, + zhucheng:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return !player.storage.zhucheng||!player.storage.zhucheng.length; + }, + check:function(event,player){ + if(player.storage.zhucheng&&player.storage.zhucheng.length){ + if(!player.hasShan()) return false; + if(player.storage.zhucheng.length>=2) return false; + } + return true; + }, + intro:{ + content:'cards' + }, + content:function(){ + if(player.storage.zhucheng&&player.storage.zhucheng.length){ + player.gain(player.storage.zhucheng,'gain2'); + delete player.storage.zhucheng; + player.unmarkSkill('zhucheng'); + } + else{ + var cards=get.cards(Math.max(1,player.maxHp-player.hp)); + player.$gain2(cards); + player.storage.zhucheng=cards; + player.markSkill('zhucheng'); + } + }, + ai:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&player.storage.zhucheng&&player.storage.zhucheng.length){ + if(player.storage.zhucheng.length>=2){ + if(!player.hasFriend()&&player.countCards('he')-20; + }, + content:function(){ + 'step 0' + var bool=false; + if(get.effect(player,trigger.card,trigger.player,trigger.player)>=0){ + bool=true; + } + var num=player.storage.zhucheng.length; + trigger.player.chooseToDiscard('弃置'+get.cnNumber(num)+'张牌,或令杀无效','he',num).set('ai',function(card){ + if(_status.event.bool){ + return 10-get.value(card); + } + return 0; + }).set('bool',bool); + 'step 1' + if(!result.bool){ + trigger.cancel(); + } + } + }, + diy_jiaoxia:{ + audio:['jiaoxia',2], + trigger:{target:'useCardToBegin'}, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:function(card,player,target){ + if(get.color(card)=='red') return [1,1]; + }, + } + }, + zaiqix:{ + trigger:{player:'phaseDrawBefore'}, + filter:function(event,player){ + return player.hp=2; + } + return true; + }, + content:function(){ + "step 0" + trigger.cancel(); + event.cards=get.cards(player.maxHp-player.hp+1); + player.showCards(event.cards); + "step 1" + var num=0; + for(var i=0;i=player.maxHp-1) return [0,0]; + } + } + } + }, + diykuanggu:{ + trigger:{source:'damageEnd'}, + forced:true, + content:function(){ + if(get.distance(trigger.player,player,'attack')>1){ + player.draw(trigger.num); + } + else{ + player.recover(trigger.num); + } + } + }, + diyduanliang:{ + group:['diyduanliang1','diyduanliang2'], + ai:{ + threaten:1.2 + } + }, + diyduanliang1:{ + enable:'phaseUse', + usable:1, + discard:false, + filter:function(event,player){ + var cards=player.getCards('he',{color:'black'}); + for(var i=0;i0) return false; + }, + save:true, + result:{ + player:4, + target:function(player,target){ + if(target.hp==target.maxHp) return 2; + return 4; + } + }, + threaten:function(player,target){ + if(!target.storage.guihan) return 0.8; + } + } + }, + luweiyan:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.type(card)!='basic'; + }, + position:'he', + filter:function(event,player){ + return player.hasCard(function(card){ + return get.type(card)!='basic'; + },'he'); + }, + viewAs:{name:'shuiyanqijun'}, + prompt:'将一张非基本牌当水淹七军使用', + check:function(card){return 8-get.value(card)}, + group:'luweiyan2' + }, + luweiyan2:{ + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(event.skill!='luweiyan') return false; + for(var i=0;i0; + }, + content:function(){ + trigger.source.discard(trigger.source.getCards('he',{color:'red'})); + }, + ai:{ + expose:0.1, + result:{ + threaten:0.8, + target:function(card,player,target){ + if(get.tag(card,'damage')&&get.attitude(target,player)<0){ + return [1,0,0,-player.countCards('he',{color:'red'})]; + } + } + } + } + }, + diyguhuo:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.countCards('hej')>0; + }, + content:function(){ + "step 0" + player.draw(2); + "step 1" + var next=player.discardPlayerCard(player,'hej',2,true); + next.ai=function(button){ + if(get.position(button.link)=='j') return 10; + return -get.value(button.link); + }; + next.filterButton=function(button){ + return lib.filter.cardDiscardable(button.link,player); + } + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)=='delay') return [0,0.5]; + } + } + } + }, + diychanyuan:{ + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event){ + return event.source!=undefined; + }, + content:function(){ + trigger.source.loseMaxHp(true); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 0.2; + }, + result:{ + target:function(card,player,target,current){ + if(target.hp<=1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-5]; + return [1,0,0,-2]; + } + } + } + } + }, + zonghuo:{ + trigger:{source:'damageBefore'}, + direct:true, + priority:10, + filter:function(event){ + return event.nature!='fire'; + }, + content:function(){ + "step 0" + player.chooseToDiscard(get.prompt('zonghuo')).ai=function(card){ + var att=get.attitude(player,trigger.player); + if(trigger.player.hasSkillTag('nofire')){ + if(att>0) return 8-get.value(card); + return -1; + } + if(att<0){ + return 7-get.value(card); + } + return -1; + } + "step 1" + if(result.bool){ + player.logSkill('zonghuo',trigger.player,'fire'); + trigger.nature='fire'; + } + } + }, + shaoying:{ + trigger:{source:'damageAfter'}, + direct:true, + filter:function(event){ + return event.nature=='fire'; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ + return get.distance(trigger.player,target)<=1&&trigger.player!=target; + }).ai=function(target){ + return get.damageEffect(target,player,player,'fire'); + } + "step 1" + if(result.bool){ + var card=get.cards()[0]; + card.discard(); + player.showCards(card); + event.bool=get.color(card)=='red'; + event.target=result.targets[0]; + player.logSkill('shaoying',event.target,false); + trigger.player.line(event.target,'fire'); + } + else{ + event.finish(); + } + "step 2" + if(event.bool){ + event.target.damage('fire'); + } + } + }, + tiangong:{ + group:['tiangong2'], + trigger:{player:'damageBefore'}, + filter:function(event){ + if(event.nature=='thunder') return true; + }, + forced:true, + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='tiesuo') return 0; + if(get.tag(card,'thunderDamage')) return 0; + } + }, + threaten:0.5 + } + }, + tiangong2:{ + trigger:{source:'damageAfter'}, + filter:function(event){ + if(event.nature=='thunder') return true; + }, + forced:true, + popup:false, + priority:1, + content:function(){ + player.draw(); + }, + }, + xicai:{ + inherit:'jianxiong' + }, + diyjianxiong:{ + mode:['identity'], + trigger:{global:'dieBefore'}, + forced:true, + filter:function(event,player){ + return event.player!=game.zhu&&_status.currentPhase==player; + }, + content:function(){ + trigger.player.identity='fan'; + trigger.player.setIdentity('fan'); + trigger.player.identityShown=true; + } + }, + nsshuaiyan:{ + trigger:{global:'recoverAfter'}, + filter:function(event,player){ + return event.player!=player&&_status.currentPhase!=player; + }, + logTarget:'player', + content:function(){ + "step 0" + var att=get.attitude(trigger.player,player); + var bool=0; + if(att<0){ + if(trigger.player.countCards('e')==0&&trigger.player.countCards('h')>2) bool=1; + else if(trigger.player.countCards('he')==0) bool=1; + } + else if(att==0&&trigger.player.countCards('he')==0){ + bool=1; + } + trigger.player.chooseControl(function(){ + return _status.event.bool; + }).set('prompt','率言').set('bool',bool).set('choiceList',['令'+get.translation(player)+'摸一张牌','令'+get.translation(player)+'弃置你一张牌']); + "step 1" + if(result.control=='选项一'){ + player.draw(); + event.finish(); + } + else if(trigger.player.countCards('he')){ + player.discardPlayerCard(trigger.player,true,'he'); + } + else{ + event.finish(); + } + }, + ai:{ + threaten:1.2 + } + }, + moshou:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(card.name=='bingliang'||card.name=='lebu') return false; + } + }, + }, + siji:{ + trigger:{player:'phaseDiscardEnd'}, + frequent:true, + filter:function(event,player){ + if(event.cards){ + for(var i=0;i0; + }, + content:function(){ + var list=[]; + var players=game.filterPlayer(); + for(var i=0;i0) player.draw(list.length); + } + }, + diyqiangxi:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.subtype(card)=='equip1'; + }, + selectCard:[0,1], + filterTarget:function(card,player,target){ + if(player==target) return false; + return get.distance(player,target,'attack')<=1; + }, + content:function(){ + "step 0" + if(cards.length==0){ + player.loseHp(); + } + "step 1" + target.damage(); + "step 2" + if(target.isAlive()&&target.countCards('he')){ + player.discardPlayerCard(target); + } + }, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + ai:{ + order:8, + result:{ + player:function(player,target){ + if(ui.selected.cards.length) return 0; + if(player.hp>=target.hp) return -0.9; + if(player.hp<=2) return -10; + return -2; + }, + target:function(player,target){ + if(player.hp<=1) return 0; + return get.damageEffect(target,player); + } + } + }, + threaten:1.3 + }, + }, + translate:{ + diy_liufu:'刘馥', + diy_xizhenxihong:'习珍习宏', + diy_liuzan:'留赞', + diy_zaozhirenjun:'枣祗任峻', + diy_yangyi:'杨仪', + diy_tianyu:'田豫', + + // diy_caocao:'曹操', + diy_menghuo:'孟获', + diy_huangzhong:'黄汉升', + diy_xuhuang:'徐公明', + diy_dianwei:'新典韦', + diy_weiyan:'魏文长', + xicai:'惜才', + diyjianxiong:'奸雄', + diy_feishi:'费诗', + nsshuaiyan:'率言', + moshou:'墨守', + diy_hanlong:'韩龙', + diy_luxun:'陆伯言', + diy_yuji:'于吉', + diy_zhouyu:'周公瑾', + diy_lukang:'陆抗', + diy_caiwenji:'蔡昭姬', + diy_zhenji:'甄宓', + + ns_zuoci:'左慈', + ns_wangyun:'王允', + ns_lvzhi:'吕后', + ns_nanhua:'南华', + ns_nanhua_left:'幻身·左', + ns_nanhua_right:'幻身·右', + ns_huamulan:'SP花木兰', + ns_huangzu:'黄祖', + ns_yanliang:'颜良', + ns_wenchou:'文丑', + ns_jinke:'荆轲', + + ns_caocao:'曹操', + ns_zhugeliang:'诸葛亮', + ns_wangyue:'王越', + ns_yuji:'于吉', + ns_caocaosp:'SP曹操', + ns_xinxianying:'辛宪英', + ns_sunjian:'孙坚', + ns_simazhao:'司马昭', + ns_guanlu:'管辂', + + ns_duangui:'段珪', + ns_shenpei:'审配', + ns_zhangbao:'张宝', + ns_masu:'马谡', + ns_zhangxiu:'张绣', + ns_lvmeng:'吕蒙', + + ns_yujisp:'于吉', + ns_lisu:'李肃', + ns_yangyi:'杨仪', + ns_liuzhang:'刘璋', + ns_xinnanhua:'南华老仙', + + sp_key_yuri:'SP仲村由理', + key_lucia:'此花露西娅', + key_kyousuke:'枣恭介', + key_yuri:'仲村由理', + key_haruko:'神尾晴子', + key_umi:'加藤うみ', + key_umi2:'鹰原羽未', + key_rei:'零', + key_komari:'神北小毬', + key_yukine:'宫泽有纪宁', + key_yusa:'西森柚咲', + key_misa:'黑羽美砂', + key_masato:'井之原真人', + key_iwasawa:'岩泽雅美', + key_kengo:'宫泽谦吾', + key_yoshino:'吉野晴彦', + key_yui:'由依', + key_tsumugi:'紬文德斯', + key_saya:'朱鹭户沙耶', + key_harukakanata:'三枝叶留佳&二木佳奈多', + key_harukakanata_ab:'三枝二木', + key_inari:'稻荷', + key_shiina:'椎名', + key_sunohara:'春原阳平&春原芽衣', + key_sunohara_ab:'阳平芽衣', + //该武将国战模式下不可用 + key_rin:'枣铃', + key_sasami:'笹濑川佐佐美', + key_akane:'千里朱音', + key_doruji:'多鲁基', + key_yuiko:'来谷唯湖', + key_riki:'直枝理树'/*+'子'*/, + key_hisako:'久子', + key_hinata:'日向秀树', + key_noda:'野田', + key_tomoya:'冈崎朋也', + key_nagisa:'古河渚', + key_ayato:'直井文人', + key_ao:'空门苍', + key_yuzuru:'音无结弦', + sp_key_kanade:'SP立华奏', + key_mio:'西园美鱼', + key_midori:'西园美鸟', + key_kyoko:'岬镜子', + key_shizuru:'中津静流', + key_shiorimiyuki:'关根诗织&入江美雪', + key_shiorimiyuki_ab:'关根入江', + key_miki:'野村美希', + key_shiori:'美坂栞', + key_kaori:'美坂香里', + lucia_duqu:'毒躯', + lucia_duqu_info:'锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你和对方各获得一张花色点数随机的【毒】。
②当你因【毒】失去体力时,你改为回复等量的体力。
③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。', + lucia_zhenren:'振刃', + lucia_zhenren_info:'锁定技,每个结束阶段,若你的装备区内有牌,则你弃置之。然后,你依次弃置场上的X张牌。(X为你以此法弃置的牌数)', + nk_shekong:'设控', + nk_shekong_info:'出牌阶段限一次,你可以弃置任意张手牌并选择一名其他角色(不能超过该角色的牌数),然后令其选择一项:弃置一张牌并令你摸X张牌,或弃置X张牌并令你摸一张牌。然后,你将你与其弃置的且位于弃牌堆中的牌以任意顺序置于牌堆顶。', + key_huanjie:'幻界', + key_huanjie_info:'锁定技,当你进行判定或摸牌时,你改为从牌堆的另一端获取相应的牌。', + yuri_xingdong:'行动', + yuri_xingdong_info:'锁定技,出牌阶段开始时,你获得一张【杀】或普通锦囊牌。出牌阶段限一次,你可以将一张【杀】或普通锦囊牌交给一名其他角色,然后该角色选择一项:对除你以外的角色使用此牌并在此牌结算完成后和你各摸一张牌;或跳过下回合的判定阶段和摸牌阶段。', + //目标角色跳过阶段的同时 该回合不能发动〖整经(郑玄)〗 + yuri_wangxi:'忘隙', + yuri_wangxi_info:'主公技,限定技,当有角色因你发动的【行动】而死亡后,若其身份不为【明忠】,则其可以将身份改为忠臣并重新加入游戏,然后将势力改为与你相同,将体力值回复至2点并摸一张牌。', + haruko_haofang:'豪放', + haruko_haofang_info:'锁定技,你的延时锦囊牌视为【无中生有】。当你因执行【无中生有】的效果而摸牌时,你令摸牌数+2。', + haruko_zhuishi:'追逝', + haruko_zhuishi_info:'一名角色的判定阶段开始时,若其判定区内有牌,则你可以获得其判定区内的所有牌。若你的体力值大于1,你失去1点体力。', + umi_chaofan:'炒饭', + umi_chaofan_info:'出牌阶段限一次,你可以弃置两张花色不同的手牌并选择一名其他角色。你摸一张牌,若你的体力值:大于2,目标角色回复1点体力;等于2,目标角色摸两张牌;小于2,目标角色受到1点无来源且对应渠道为这两张牌的火焰伤害。', + umi_lunhui:'轮回', + umi_lunhui_info:'一名其他角色的回合结束时,若你的手牌数小于体力值,则你可以失去1点体力。若如此做,你摸两张牌并进行一个额外回合,且你于此回合内计算与此角色的距离视为1。', + umi_shiroha:'轮回 - 延时效果', + umi_qihuan:'七幻', + umi_qihuan_info:'限定技,当你处于濒死状态时,你可以移去此武将牌。若如此做,你回复X点体力(X为场上势力数)。然后,你可获得场上已死亡角色武将牌上的至多两个技能。', + komari_tiankou:'甜口', + komari_tiankou_info:'锁定技,当你使用红色的非伤害性基本牌/锦囊牌选择目标时,或成为其他角色使用的这些牌的目标时,你选择一项:1.摸一张牌;2.为此牌增加一个目标', + komari_xueshang:'血殇', + komari_xueshang_info:'锁定技,蓄力技,当有角色死亡时,你对自己造成1点伤害,然后对所有其他角色依次造成1点伤害。当有角色因此法进入濒死状态时,你加1点体力上限并回复1点体力,然后失去此技能并终止此技能的所有后续结算。', + yukine_wenzhou:'问咒', + yukine_wenzhou_info:'一名角色的出牌阶段开始时,其可以交给你一张牌。若如此做,你选择一项:交给其一张牌,或令其从牌堆中获得一张与此牌类型相同的牌,且其于此阶段内使用与此牌牌名相同的牌时无法被响应。', + //如果对自己发动【问咒】,则自己可以响应这些牌。但其他角色发动【问咒】时,该角色自己并不能响应 + yusa_yanyi:'演艺', + yusa_yanyi_info:'出牌阶段限一次,你可以指定至多X名与你距离不大于你的体力值的角色。这些角色选择一项:①令你摸一张牌。②回复1点体力,然后交给你一张牌。(X为你的攻击范围且至少为1)', + misa_yehuo:'业火', + misa_yehuo_info:'一名角色的摸牌阶段开始时,若其在你的攻击范围内,你可以弃置X张牌并选择一项:①对其造成1点火属性伤害。②令其于此摸牌阶段放弃摸牌。(X为你与其的的距离)', + yusa_misa:'通灵', + yusa_misa_info:'当你发动的〖演艺〗结算完成之后,你可以将武将牌翻面。', + misa_yusa:'归魂', + misa_yusa_info:'当你发动的〖业火〗结算完成后,你可以将武将牌翻面。', + masato_baoquan:'暴拳', + masato_baoquan_info:'锁定技,当你即将造成伤害时,你选择一项:1.令此伤害+2并减1点体力上限。2.防止此伤害。', + iwasawa_yinhang:'引吭', + iwasawa_yinhang_info:'锁定技,当你的体力值变化1点时,你可以令至多两名角色摸一张牌。', + iwasawa_mysong:'My Song', + iwasawa_mysong_info:'锁定技,当你即将进行濒死结算时,取消之。回合开始时,若你的体力值小于1,则你获得技能〖奋音〗直到回合结束。回合结束时,若你的体力值小于1,你死亡。', + iwasawa_fenyin:'奋音', + iwasawa_fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', + iwasawa_refenyin:'奋音', + iwasawa_refenyin_info:'锁定技,你的回合内,当一张牌进入弃牌堆后,若本回合内没有过与此牌花色相同的卡牌进入过弃牌堆,则你摸一张牌。', + //卡牌花色的计算不受【红颜】等技能的影响 + kengo_weishang:'伪伤', + key_weishang_sha:'伪伤', + key_weishang_shan:'伪伤', + kengo_weishang_info:'出牌阶段限一次,你可以废除一个装备栏并摸两张牌。若你的武器栏已废除,则你使用【杀】的次数上限+1,且当你使用【杀】指定目标后,目标角色弃置一张牌;若你的防具栏已废除,则你可以将一张牌当做【闪】使用或打出;若你的攻击/防御坐骑栏已废除,则你至其他角色的距离-1/其他角色至你的距离-1。', + kengo_guidui:'归队', + kengo_guidui_info:'锁定技,准备阶段,若你有已废除的装备栏,则你恢复这些装备栏,且本回合内发动【伪伤】时不能废除这些装备栏。', + yoshino_jueyi:'决义', + yoshino_jueyi_info:'出牌阶段开始时,你可以选择一名其他角色。你摸一张牌并与其猜拳(平局则重来)。若你赢,你对其造成1点伤害。若你没赢,你本阶段内使用牌时不能指定其为目标。', + yui_jiang:'激昂', + yui_jiang_info:'每当你使用(指定目标后)或被使用(成为目标后)一张【决斗】或红色的【杀】时,你可以摸一张牌。', + yui_lieyin:'烈音', + yui_lieyin_info:'锁定技,出牌阶段开始时,你选择一项:①本阶段内的红色牌均视为【杀】;②本阶段内的【杀】均视为【决斗】。', + yui_takaramono:'珍宝', + yui_takaramono_info:'觉醒技,准备阶段,若你满足以下条件中的至少两个:①体力值不大于1;②场上有已死亡的角色;③已因〖激昂〗累计获得过至少三张牌;则你获得技能〖引吭〗,将〖烈音〗描述中的「你选择」改为「你可选择」,然后加1点体力上限并回复1点体力。', + //ユイ/孙笨双将组合时,孙笨的【激昂】不计入【珍宝】的次数统计 + yui_yinhang:'引吭', + yui_yinhang_info:'锁定技,当你的体力值变化1点时,你可以令至多两名角色摸一张牌。', + tsumugi_mugyu:'姆啾', + tsumugi_mugyu_info:'当你成为牌的目标后,若你的手牌数小于体力上限,则你可以摸一张牌。', + tsumugi_huilang:'回廊', + tsumugi_huilang2:'回廊', + tsumugi_huilang_info:'回合结束时,你可以将任意张牌扣置于武将牌下(均称为「隐」)。回合开始时,你获得所有「隐」,然后可令等量的角色各摸一张牌。', + //〖回廊〗涉及的所有卡牌移动的结算不会触发〖良姻〗 + haruka_shuangche:'双掣', + kanata_shuangche:'双掣', + haruka_shuangche_backup:'双掣', + haruka_shuangche_info:'出牌阶段,你可以视为使用任意基本牌或普通锦囊牌。此牌结算完成后,你选择一项:1.弃置X张牌。2.失去1点体力且本回合内不能再发动〖双掣〗。(X为你于此回合内发动过〖双掣〗的次数)', + //你不能以此法使用【回魂】 + saya_shouji:'授计', + saya_shouji_info:'每回合限一次,当你使用的牌结算完成后,你可以将此牌对应的所有实体牌交给一名其他角色。其可以使用这些牌中的一张,若如此做,你摸一张牌。', + saya_powei:'破围', + saya_powei_info:'限定技,回合结束后,你可以选择一名体力值大于你的其他角色。你与其交替进行额外回合,直到你与其中的一名角色死亡或进行到九个回合。你于回合开始时进行判定,若结果为红色,则你对其造成1点伤害。此过程中其他角色不计入距离和座次计算。', + saya_judge:'破围', + saya_nodis:'破围', + //〖破围〗不会因为〖铁骑〗无效 + inari_baiwei:'摆尾', + inari_baiwei_info:'你可以将一张♦牌当做任意基本牌使用或打出。此牌结算完成后,你摸一张牌。', + //你不能以此法使用【毒】 + inari_baiwei_backup:'摆尾', + inari_baiwei_sha:'摆尾', + inari_baiwei_shan:'摆尾', + inari_huhun:'狐魂', + inari_huhun_info:'锁定技,你的♣牌的花色均视为♦。你的手牌上限+1。', + shiina_qingshen:'轻身', + shiina_qingshen_info:'当你受到或造成伤害后,你可以获得此次伤害的渠道对应的实体牌,然后将等量的武将牌置于你的武将牌上,称为「轻」。锁定技,你的手牌上限和攻击范围+X(X为「轻」数)。', + shiina_feiyan:'飞燕', + shiina_feiyan_info:'一名其他角色的回合开始时,若其在你的攻击范围内,则你可以将一张「轻」置于弃牌堆,然后视为对其使用一张【杀】。若此【杀】未造成伤害,你摸一张牌。你于此【杀】的结算流程中视为拥有技能【铁骑】。', + shiina_retieji:'铁骑', + //你不能对稻荷和多鲁基发动【飞燕】 + sunohara_chengshuang:'成双', + sunohara_chengshuang_phase:'成双', + sunohara_chengshuang_info:'锁定技,游戏开始时,你选择你的性别。回合开始时,你可以切换你的性别。', + sunohara_tiaoyin:'挑引', + sunohara_tiaoyin_info:'出牌阶段限一次,你可以弃置任意张花色各不相同的手牌,然后获得等量角色区域内的各一张牌。若你以此法获得了异性角色区域内的牌,则你失去1点体力。', + sunohara_jianren:'坚忍', + sunohara_jianren_info:'当你受到伤害后,你可以令一名角色摸一张牌。若伤害无来源或来源与你性别不同,则改为摸三张牌。', + rin_baoqiu:'暴球', + rin_baoqiu_info:'锁定技,你的攻击范围+2。当你使用【杀】指定目标后,你进行判定。若结果:为红色,此【杀】对其的伤害值基数+1;为黑色,其无法闪避此【杀】;为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。', + sasami_miaobian:'喵变', + sasami_miaobian_info:'当你的体力值变为:3以下时,你获得技能〖公清〗,2以下时,你获得技能〖复难〗,1以下时,你获得技能〖暴球〗', + "sasami_gongqing":"公清", + "sasami_gongqing_info":"锁定技。当你受到伤害时,若伤害来源的攻击范围:<3,则你令此伤害的数值减为1。>3,你令此伤害+1。", + sasami_funan:'复难', + sasami_funan_info:'其他角色使用或打出牌响应你使用的牌时,你可令其获得你使用的牌(其本回合不能使用或打出这些牌),然后你获得其使用或打出的牌。', + sasami_baoqiu:'暴球', + sasami_baoqiu_info:'锁定技,你的攻击范围+2。当你使用【杀】指定目标后,你进行判定。若结果:为红色,此【杀】对其的伤害值基数+1;为黑色,其无法闪避此【杀】;为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。', + akane_jugu:'巨贾', + akane_jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', + akane_quanqing:'权倾', + akane_quanqing_info:'出牌阶段,你可选择:1.弃置一张点数大于10的牌并对攻击范围内的一名其他角色造成1点伤害;2.弃置一张点数大于6的牌并弃置攻击范围内的一名其他角色区域内的一张牌。3.弃置一张牌并令攻击范围内的一名其他角色摸一张牌。', + akane_yifu:'蚁附', + akane_yifu2:'蚁附', + akane_yifu_info:'主公技,其他键势力角色的出牌阶段限一次,其可交给你一张手牌。然后你摸一张牌,并将一张手牌交给该角色。', + doruji_feiqu:'肥躯', + doruji_feiqu_info:'锁定技,当你使用【杀】时,或你成为【杀】的目标后,你令此【杀】不可被响应。', + yuiko_fenglun:'锋论', + yuiko_fenglun_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你本阶段内使用牌没有次数和距离限制。', + yuiko_dilve:'底略', + yuiko_dilve_info:'你可以使用牌堆底的一张牌进行拼点。当你拼点后,你可以获得两张拼点牌。', + riki_spwenji:'问计', + riki_spwenji_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌。你于本回合内使用与该牌名称相同的牌时不能被其他角色响应。', + riki_nvzhuang:'女装', + riki_nvzhuang_info:'锁定技,此武将牌的性别视为女性。结束阶段,若你:有手牌,你摸一张牌;没有手牌,你摸两张牌。', + riki_mengzhong:'梦终', + riki_mengzhong_info:'觉醒技,准备阶段,若你已因〖问计〗获得了三张或更多的牌,则你加1点体力上限并回复1点体力,失去〖问计〗并获得〖重振〗。', + riki_chongzhen:'重振', + riki_chongzhen_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你获得该角色手牌区,装备区,判定区的各一张牌;若你没赢,你于此阶段内使用牌时不能指定其他角色为目标。', + hisako_yinbao:'音爆', + hisako_yinbao_info:'当你受到伤害/回复体力后,你可以判定。若结果为♠,则你对一名其他角色造成1点雷属性伤害。', + hisako_zhuanyun:'转运', + hisako_zhuanyun_info:'锁定技,你的判定会朝向对你有利的方向倾斜。', + hinata_qiulve:'球略', + hinata_qiulve_info:'你可以将一张非基本牌当做【杀】使用或打出(无距离限制)。你以此法使用的红色【杀】不可被响应,黑色【杀】不计入使用次数限制。', + hinata_ehou:'扼喉', + hinata_ehou_info:'其他角色对你使用的牌结算完成后,你可对其使用一张【杀】。若此【杀】造成伤害,则你摸一张牌。', + noda_fengcheng:'奉承', + noda_fengcheng_info:'锁定技,其他角色交给你牌后,其摸一张牌。', + noda_xunxin:'寻衅', + noda_xunxin2:'寻衅', + noda_xunxin_info:'出牌阶段限X次,你可以视为对一名体力值不小于你的角色使用【决斗】。若如此做,此【决斗】结算完成后,没赢的角色交给赢的角色一张牌。(X为你的体力值)', + tomoya_shangxian:'伤弦', + tomoya_shangxian_info:'锁定技,你计算与其他角色的距离时始终从逆时针方向计算。出牌阶段开始时,你可摸一张牌,并改变此方向。', + tomoya_wangjin:'往今', + tomoya_wangjin_info:'每项每轮各限一次。一名其他角色的回合结束时,若其:在你的攻击范围内,你可令其摸一张牌。若其的体力值小于你,则你摸一张牌,并可交给其一张牌。不在你的攻击范围内,则你摸两张牌,并令其弃置你的一张手牌。若其的体力值大于你,则你视为对其使用一张【杀】(无距离限制)。', + nagisa_tiandu:'天妒', + nagisa_tiandu_info:'当你的判定牌生效后,你可以获得此牌。', + nagisa_fuxin:'抚心', + nagisa_fuxin_info:'当一名角色于回合外受到伤害,或其手牌被其他角色弃置或获得后,你可以令其判定。若结果为:红色,其摸一张牌。黑色,当前回合角色弃置一张牌。', + ayato_jianshen:'僭神', + ayato_jianshen_info:'锁定技,你手牌中的【杀】均视为神属性。', + ayato_zonghuan:'纵幻', + ayato_zonghuan_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后选择一项:将其中的一张牌置入弃牌堆,或以该角色的视角使用其中的一张,然后摸一张牌。', + ao_xishi:'习事', + ao_xishi_info:'锁定技,当你使用或打出♦牌时,或其他角色使用♦牌指定你为目标后,你摸一张牌。', + ao_kuihun:'窥魂', + ao_kuihun_info:'其他角色进入濒死状态时,你可以摸一张牌,然后观看其手牌并将其中一张牌置于你的武将牌上,称为「蝶」。你使用与一张「蝶」花色相同的牌时无距离和次数限制。你的手牌上限+X(X为蝶数)。', + ao_shixin:'释心', + ao_shixin_info:'觉醒技,准备阶段,若你的「蝶」中包含至少三种花色,则你加1点体力上限并回复1点体力,失去〖窥魂〗并获得〖蝶归〗。', + ao_diegui:'蝶归', + ao_diegui_backup:'蝶归', + ao_diegui_info:'出牌阶段限一次,你可以将一张「蝶」交给一名角色,该角色摸两张牌并复原武将牌。', + yuzuru_wuxin:'无心', + yuzuru_wuxin_info:'结束阶段,你可以选择一项:失去1点体力并令一名角色摸两张牌,或弃置两张牌并回复1点体力。', + yuzuru_deyi:'得义', + yuzuru_deyi_info:'觉醒技,当有其他角色死亡后,你减1点体力上限并回复1点体力,失去技能〖无心〗,获得技能〖往生〗〖困奋〗和〖去疾〗。', + yuzuru_wangsheng:'往生', + yuzuru_wangsheng_info:'觉醒技,当你即将死亡时,你防止此次死亡。你可以将任意张牌交给一名其他角色,然后减1点体力上限并将体力回复至2点,修改技能〖困奋〗和〖去疾〗。', + yuzuru_kunfen:'困奋', + yuzuru_kunfen_info:'锁定技,结束阶段,你失去1点体力并摸两张牌。然后你可以将两张牌交给一名其他角色。', + yuzuru_quji:'去疾', + yuzuru_quji_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。若你以此法弃置了黑色牌,则你失去1点体力。(X为你已损失的体力值)', + yuzuru_kunfen_rewrite:'困奋·改', + yuzuru_kunfen_rewrite_info:'锁定技,结束阶段,你摸两张牌。然后你可以将两张牌交给一名其他角色。', + yuzuru_quji_rewrite:'去疾·改', + yuzuru_quji_rewrite_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。(X为你已损失的体力值)', + yuzuru_bujin:'步进', + yuzuru_bujin_info:'锁定技,己方其他角色计算与其他角色的距离-1且摸牌阶段的额定摸牌数+1。', + kanade_mapo:'麻婆', + kanade_mapo_info:'你可以将一张♥牌当做【麻婆豆腐】使用。你使用的【麻婆豆腐】可以多指定一个目标。', + kanade_benzhan:'奔战', + kanade_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', + mio_tuifu:'推腐', + mio_tuifu_info:'锁定技,当一名男性角色对一名男性角色造成伤害时,你摸一张牌。', + mio_tishen:'替身', + mio_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鸟】。', + midori_nonghuan:'弄幻', + midori_nonghuan_info:'出牌阶段限X次(X为你的体力值),你可以获得一名本阶段内未选择过的其他角色的区域内的一张牌。你摸一张牌,然后将一张牌交给该角色。然后你清除此技能结算过程中所有卡牌移动事件的移动记录。', + //即技能结算完成后,所有涉及到的牌移动事件不会再被getHistory获取 + midori_tishen:'替身', + midori_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鱼】。', + kyoko_juwu:'聚物', + kyoko_juwu_info:'你的回合外,当有装备牌进入弃牌堆后,若这些牌不是从你的区域移动的,则你可以获得这些牌。', + kyoko_zhengyi:'整遗', + kyoko_zhengyi_info:'锁定技,若你装备区的花色数:大于等于1,你视为拥有〖精策〗;大于等于2,你视为拥有〖涉猎〗:大于等于3,你视为拥有〖制衡〗;大于等于4,你将〖精策〗和〖制衡〗改为界限突破版本。', + kyoko_jingce:'精策', + kyoko_shelie:'涉猎', + kyoko_zhiheng:'制衡', + shizuru_nianli:'念力', + shizuru_nianli_info:'每轮限一次,你可以展示一张♦/♣/♥/♠手牌,然后视为使用一张不计入次数限制和记录的雷【杀】/【闪】/【桃】/【无懈可击】。', + shizuru_benzhan:'奔战', + shizuru_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', + shiorimiyuki_banyin:'伴音', + shiorimiyuki_banyin_info:'当你受到伤害或回复体力后,你可令一名其他角色回复1点体力。', + shiorimiyuki_tingxian:'铤险', + shiorimiyuki_tingxian_info:'出牌阶段开始时,你可以摸至多三张牌。若如此做,你回复1点体力,且此阶段结束时你失去X点体力。(X为你获得的牌中仍在手牌区的牌的数量)', + shiorimiyuki_tingxian2:'铤险', + miki_shenqiang:'神枪', + miki_shenqiang_info:'锁定技,游戏开始时,你将一张【海德洛格拉迪尔特·改】和一张【望远镜】置入你的装备区。你装备区内的武器牌和宝物牌不能被其他角色弃置。', + miki_huanmeng:'幻梦', + miki_huanmeng_info:'准备阶段开始时,你可以观看牌堆顶的X+1张牌并可以按任意顺序置于牌堆顶或牌堆底。(X为你装备区内的牌数)', + miki_zhiluo:'治裸', + miki_zhiluo_info:'锁定技,一名其他角色的回合结束时,若其在你的攻击范围内且其装备区内没有牌,则你选择:①摸一张牌。②视为对其使用一张【杀】。', + miki_hydrogladiator:'海德洛', + miki_hydrogladiator_info:'全名为【海德洛格拉迪尔特·改】。锁定技,当你因执行【杀】的效果而对目标角色造成伤害后,你弃置所有至目标角色距离为1的其他角色的一张牌或弃置其两张牌。', + miki_hydrogladiator_skill:'海德洛格拉迪尔特·改', + miki_binoculars:'望远镜', + miki_binoculars_info:'锁定技,其他角色的手牌对你可见。', + shiori_huijuan:'绘卷', + shiori_huijuan_discard:'绘卷', + shiori_huijuan_info:'锁定技,其他角色的结束阶段开始时,你可以视为使用一张该角色本回合出牌阶段内使用过的基本牌或普通锦囊牌。准备阶段开始时,若你自上个回合起以此法使用的牌数不小于X,则你选择一项:①弃置装备区或判定区内的一张牌。②跳过本回合的出牌阶段。(X为场上玩家数的一半且至少为2)', + kaori_siyuan:'思愿', + kaori_siyuan_info:'出牌阶段,你可以将一张装备牌或延时锦囊牌置于一名其他角色的装备区内,然后可以视为使用一张基本牌或普通锦囊牌。', + + key_kud:'库特莉亚芙卡', + kud_qiaoshou:'巧手', + kud_qiaoshou_equip:'巧手', + kud_qiaoshou_end:'巧手', + kud_qiaoshou_backup:'巧手', + kud_qiaoshou_info:'出牌阶段/结束阶段,若你没有“巧”,则你可以将一张手牌作为“巧”置于武将牌上并摸一张牌,且视为装备了一张你选择的武器牌或进攻坐骑/防具牌或防御坐骑直到“巧”进入弃牌堆。出牌阶段结束时/准备阶段开始时,你将“巧”置入弃牌堆。', + kud_buhui:'不悔', + kud_buhui_info:'限定技,当你进入濒死状态时,你可以弃置“巧”和装备区内的所有牌(至少一张)并摸等量的牌,将体力回复至2点,获得技能〖重振〗。', + key_misuzu:'神尾观铃', + misuzu_hengzhou:'恒咒', + misuzu_hengzhou_info:'锁定技,准备阶段开始时,或当你受到1点伤害或回复1点体力后,你获得一个“诅咒”标记。你的手牌上限和摸牌阶段的额定摸牌数+X。结束阶段开始时,若X大于3,则你移去所有“诅咒”标记并失去1点体力。(X为“诅咒”标记数)', + misuzu_nongyin:'浓饮', + misuzu_nongyin_info:'当你需要使用【桃】时,你可将一张红色非锦囊牌当做【乐不思蜀】置入自己的判定区,然后视为使用一张【桃】。', + misuzu_zhongxing:'终幸', + misuzu_zhongxing_info:'每回合限一次,当你判定区的牌移动到其他区域后,你可令一名角色回复1点体力或摸两张牌。', + key_kamome:'久岛鸥', + kamome_yangfan:'扬帆', + kamome_yangfan_info:'锁定技,游戏开始时,你将一张【旅行箱】置入你的装备区。当你失去装备区内的一张牌后,你摸两张牌。', + kamome_huanmeng:'幻梦', + kamome_huanmeng_info:'准备阶段开始时,你可以观看牌堆顶的X+1张牌并可以按任意顺序置于牌堆顶或牌堆底。(X为你装备区内的牌数)', + kamome_jieban:'结伴', + kamome_jieban_info:'转换技。每回合限一次,当你受到或造成伤害后,阴:你可将两张牌交给一名其他角色,然后其交给你一张牌。阳:你可将一张牌交给一名其他角色,然后其交给你两张牌。', + kamome_suitcase:'旅行箱', + kamome_suitcase_info:'锁定技,你跳过你的判定阶段和弃牌阶段;当你即将翻面时,取消之。', + key_nao:'友利奈绪', + nao_duyin:'独隐', + nao_duyin2:'独隐', + nao_duyin_info:'一名其他角色的回合开始时,若你本局游戏内未对其发动过〖独隐〗,则你可以弃置一张牌或将武将牌翻面。若如此做,你不能成为其使用牌的目标,且对其使用牌没有距离限制且不计入使用次数直到你的下回合结束。', + nao_wanxin:'挽心', + nao_wanxin_info:'一轮游戏结束时,你可以令一名本轮内受到过伤害的角色摸两张牌,然后你与其将武将牌重置。', + nao_shouqing:'守情', + nao_shouqing2:'守情', + nao_shouqing3:'守情', + nao_shouqing_info:'其他角色的出牌阶段内可以对你使用【桃】。若如此做,其摸一张牌且本局游戏内的手牌上限+1。', + + ns_huangchengyan:'黄承彦', + nslongyue:'龙岳', + nslongyue_info:'当一名角色使用锦囊牌时,若此牌是其本回合内使用的第一张牌,则你可令其摸一张牌。', + nszhenyin:'阵引', + nszhenyin_info:'每回合限一次。一名角色的判定牌生效前,你可令当前回合角色打出一张手牌代替之。', + ns_sunchensunjun:'孙綝孙峻', + nsxianhai:'险害', + nsxianhai_info:'每轮限一次,当一名其他角色于回合内造成伤害后,若其此回合内造成过的伤害总和大于你上一回合内造成的伤害总和,则你可以减1点体力上限,令其废除一种装备栏并弃置手牌中所有的【闪】。若〖兴黜〗已发动,此回合结束后视为该限定技未发动过。', + nsxingchu:'兴黜', + nsxingchu_info:'限定技,当你杀死一名角色/你死亡时,你可以令一名角色获得其/你的所有牌并增加1点体力上限。', + ns_yuanxi:'袁熙', + nsshengyan:'盛筵', + nsshengyan3:'盛筵', + nsshengyan_info:'锁定技,你的判定牌生效后,若结果花色与你本回合内其他判定结果的花色均不同,则你令当前回合角色本回合的手牌上限+2。', + nsdaizhan:'怠战', + nsdaizhany:'怠战', + nsdaizhan_info:'准备阶段,你可以将一张非锦囊牌当做【兵粮寸断】或【乐不思蜀】对自己使用。若如此做,回合结束时,你将手牌摸至手牌上限。', + ns_caoshuang:'曹爽', + nsjiquan:'集权', + nsjiquan_mark:'集权', + nsjiquan_info:'与你距离1以内的其他角色造成或受到伤害后,你可以将其区域内的一张牌置于你的武将牌上(称为“威”)。你使用【杀】的次数上限+X(X为“威”数)。', + nsfuwei:'附位', + nsfuwei_info:'觉醒技,结束阶段开始时,若“威”数大于4,则你加2点体力上限,获得〖喋谋〗和〖制皇〗,并将〖集权〗改为锁定技。', + nsdiemou:'喋谋', + nsdiemou_info:'锁定技,出牌阶段开始时,若“威”大于全场角色数,你移去所有“威”,减一点体力上限并摸X张牌。若X大于4,你翻面。(X为移去的“威”数)', + nszhihuang:'制皇', + nszhihuang_damage:'制皇', + nszhihuang_info:'每回合限一次,当主公使用牌时,你可以移去一张“威”,然后获得此牌。锁定技,若你的手牌数大于主公,则你使用牌造成的伤害+1。', + + diy_wenyang:'文鸯', + yj_caoang:'SP曹昂', + yjxuepin:'血拼', + yjxuepin_info:'出牌阶段限一次,你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同,你回复1点体力。', + ns_chendao:'SP陈到', + nsjianglie:'将烈', + nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。', + ns_zhangwei:'张葳', + nsqiyue:'骑钺', + nsqiyue_info:'锁定技,当有角色的武将牌状态改变后,你摸一张牌。', + nsxuezhu:'血逐', + nsxuezhu_info:'当你受到伤害或造成伤害后,你可以令受到伤害的角色摸两张牌并翻面。', + ns_chuanshu:'传术', + ns_chuanshu_info:'限定技 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】', + ns_xiandao1:'仙道', + ns_xiandao1_info:'锁定技 游戏开始和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段开始', + ns_xiandao2:'仙道', + ns_xiandao2_info:'锁定技 你防止受到任何属性伤害', + ns_xiandao:'仙道', + ns_xiandao_info:'锁定技 游戏开始、你进入游戏时和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段阶段开始。你防止受到任何属性伤害', + ns_chuanshu2:'术', + ns_chuanshu2_info:'锁定技 当你造成或受到一次伤害后,南华老仙摸一张牌', + ns_chuanshu3:'术', + ns_chuanshu3_info:'锁定技 当你【传术】的角色阵亡后,你重置技能【传术】', + ns_xiuzheng:'修真', + ns_xiuzheng_info:'出牌阶段限一次,你可选择一名其他角色,然后展示牌堆顶的两张牌,若同为红色,则其受到一点火焰伤害;若同为黑色,其受到一点雷电伤害;若颜色不相同,你弃置其一张牌。然后你获得这两张展示的牌后再弃置两张牌', + nsanruo:'暗弱', + nsanruo_info:'锁定技,你手牌中的[杀]和普通锦囊牌(借刀杀人等带有指向目标的锦囊除外)均对你不可见。但你可以正常使用之', + nsxunshan:'循善', + nsxunshan_info:'锁定技,你使用【暗弱】牌可以为其指定任意名合法目标(托管无效)', + nskaicheng:'开城', + nskaicheng_info:'主公技,你的回合内,你可以将一张【暗弱】牌交给一名群势力其他角色观看,其可以选择是否告诉你此牌的名字。然后你选择一项:使用这张牌并摸一张牌;或结束此回合', + nsjuanli:'狷戾', + nsjuanli_info:'出牌阶段限一次,你可以和一名有手牌的其他角色进行赌牌,若你赢,目标角色失去1点体力且该角色与你距离-1直到与你下次赌牌,若你没赢,目标角色回复1点体力,且该角色与你距离+1直到与你的下次赌牌。(赌牌:赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利)', + nsyuanchou:'远筹', + nsyuanchou_info:'锁定技,当你成为锦囊牌的目标时,若来源角色与你的距离大于1,则取消之', + nsguhuo:'蛊惑', + nsguhuo_info:'锁定技,你在一个回合中使用前两张牌时,你对一名随机角色从牌堆(牌堆无则从弃牌堆)随机使用一张同类别卡牌', + nsqinxue:'勤学', + nsqinxue_info:'每个效果每回合只能使用一次。①当你使用一张基本牌时,你从牌堆随机获得一张锦囊牌;②当你使用一张锦囊牌时,你从牌堆随机获得一张装备牌;③当你使用一张装备牌时,你从牌堆随机获得一张基本牌', + nsbaiyi:'白衣', + nsbaiyi_info:'锁定技,若你本回合发动过勤学,你跳过弃牌阶段,改为弃置X张牌(X为本回合发动勤学次数);若你弃置了3张类别不同的牌,你获得一个额外回合(不可连续获得回合),否则你观看牌堆顶的X张牌并获得其中一张', + nsbaiming:'百鸣', + nsbaiming_info:'当你使用【杀】时,你可以获得一项未获得过且与杀或伤害相关的技能,此【杀】结算完毕后,你失去以此法获得的技能', + nsfuge:'覆戈', + nsfuge_info:'你的回合结束后,你可以执行一个额外的回合,此回合的摸牌阶段,你于摸牌阶段额外摸X张牌(X为你已损失的体力值);若如此做,直到洗牌前,你不能再发动此技能', + nstanbing:'谈兵', + nstanbing_info:'摸牌阶段开始时,你可弃置一张牌,然后摸X张牌(X为你弃置牌的名称字数),若如此做,本回合你不可使用或打出【杀】', + nsxinzhan:'心战', + nsxinzhan_info:'出牌阶段限一次,你可将任意张手牌交给一名其他角色,若如此做,该角色失去X点体力(X为你交给其的牌张数的一半,向下取整),若你给的牌达到六张,则改为该角色失去一点体力上限', + nsfuhuo:'符火', + nsfuhuo2:'符火', + nsfuhuo_info:'出牌阶段限一次,你可将一张手牌置于一名武将牌上没有“符”的角色的武将牌上,称为“符”,若如此做,其回合外使用或打出【闪】时,你可令其判定,若结果为:红桃,你对其造成2点火焰伤害;方块,你弃置其一张手牌,然后对其造成1点火焰伤害。你的下个回合开始时,你获得其武将牌上的“符”', + nswangfeng:'望风', + nswangfeng_info:'在判定牌生效前,你可以打出一张红色牌替换之', + nshunji:'混击', + nshunji_info:'出牌阶段限一次,你可以摸一张牌,视为使用一张【万箭齐发】。此【万箭齐发】造成伤害时,受伤害角色选择一项:①弃置你一张牌;②摸一张牌', + nscuanquan:'篡权', + nscuanquan_info:'锁定技,如果你的身份为忠臣,则在受伤三次后与主公,互换身份和体力上限', + nsjianning:'奸佞', + nsjianning_info:'出牌阶段限一次,如果你的身份为内奸,你可以与一名手牌数比你少的角色交换手牌,并对其造成一点伤害', + nschangshi:'常仕', + nschangshi_info:'出牌阶段限一次,如果你的身份为反贼,你可以指定两名其他角色互换体力;如果两名角色体力之差等于1,你失去一点体力', + nsbaquan:'霸权', + nsbaquan_info:'回合结束时,你可以弃置所有手牌,并获得相应点数的护甲,你的新一回合开始时清除所有护甲', + nsbugua:'卜卦', + nsbugua_use_info:'弃置一张牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数随机获得牌堆中相应的一张牌', + nsbugua_info:'出牌阶段限一次,你可以弃置一张牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数按以下规则随机获得牌堆中相应的一张牌:乾(红桃偶数):无中生有;坤(黑桃奇数):决斗;震(黑桃偶数):南蛮入侵;巽(红桃奇数):万箭齐发;坎(梅花偶数):过河拆桥、兑(梅花奇数):借刀杀人、艮(方片偶数):顺手牵羊、离(方片奇数):火攻。若牌堆中无此牌则摸一张牌,然后你观看未展示的另外五张牌并按任意顺序将其置于牌堆顶。', + nstuiyan:'推演', + nstuiyan_info:'出牌阶段,若你使用的牌点数比上一张使用的牌点数大,你可以摸一张牌,反之你本回合不能再以此法摸牌;当你使用的牌点数首次达到8的倍数时,你可以在结算后立即发动一次【卜卦】', + nstianji:'天机', + nstianji_info:'限定技,当一名其他角色进入濒死状态,你可自减一点体力上限,令其回复体力至1并增加一点体力上限', + nszhaoxin:'昭心', + nszhaoxin_info:'锁定技,你始终展示手牌', + nsxiuxin:'修穆', + nsxiuxin_info:'锁定技,若你没有某种花色的手牌,你不能成为这种花色的牌的目标', + nsshijun:'弑君', + nsshijun_info:'锁定技,你造成伤害时,你令此伤害+1,并在结算后失去一点体力', + nshunyou:'魂佑', + nshunyou_info:'出阶段限一次,你可以弃置一张基本牌,获得弃牌堆底的一张装备牌和一张锦囊牌,然后你可以将那张装备牌装备给一名角色(允许替换)。如果弃牌堆没有装备以及锦囊牌,则改为摸X张牌,X为损失的体力加一(最多3张)', + nswulie:'武烈', + nswulie_info:'限定技,准备阶段,你可以失去1点体力上限,从弃牌堆选择最多三张牌以任意顺序放置于牌堆顶。若如此做,此回合的结束阶段,你可以重复此操作', + nscangxi:'藏玺', + nscangxi2:'藏玺', + nscangxi_info:'主公技,其他吴势力角色的弃牌阶段结束时,若其弃置了至少两张牌,则可以选择判定,若是黑色,则其选择一项,1,令主公摸一张并且展示;2,主公手牌上限永久加一;3,额外弃置一张牌,令主公获得本回合进入弃牌堆的一张牌', + nsdongcha:'洞察', + nsdongcha_info:'锁定技,单体锦囊牌无法对你造成伤害。其它角色于其回合内第二次使用锦囊牌指定你为目标时,取消之', + nscaijian:'才鉴', + nscaijian_info:'出牌阶段限一次,若你的手牌数不大于你的体力上限,则你可以展示你的手牌,观看牌堆顶相同数量的牌并以任意方式交换之', + nsgongjian:'恭俭', + nsgongjian_info:'锁定技,弃牌阶段,你须将弃牌交给一名体力值大于你的其它角色', + nsjianxiong:'奸雄', + nsjianxiong_info:'当你成为一名角色牌的目标后你可以对该角色使用一张牌,若此牌对其造成伤害,则该角色的牌失效。若失效的为黑色牌,则你摸一张牌', + nsxionglue:'雄略', + nsxionglue_info:'出牌阶段限一次,你可以弃置一张黑色手牌,然后发现一张锦囊牌', + nsyaowang:'妖妄', + nsyaowang_info:'回合开始阶段你可以选择一名角色然后获得其其中一项技能直到回合结束,然后该角色随机获得一项未上场武将的其中一项技能直到其回合结束', + nshuanhuo:'幻惑', + nshuanhuo_info:'每当你流失一点体力或受到一次大于2的伤害时,你可以交换除你之外的两名角色的武将牌(体力及体力上限不变)', + nsjianshu:'剑术', + nsjianshu_info:'锁定技:每当你的装备区有武器时,你使用【杀】指定一个目标后,该角色需要依次使用两张【闪】才能抵消此【杀】', + nscangjian:'藏剑', + nscangjian_info:'每当你对一名角色造成伤害,你可以获得其装备区一张牌', + nsyunxing:'陨星', + nsyunxing_info:'锁定技,当场上一名角色死亡,若为蜀,你失去一点体力;若为吴,你回复一点体力;若为魏,你摸一张牌并弃置一名角色的手牌;若为群,你强制结束当前回合;若为你,你可以使一名角色翻面', + nsguanxing:'观星', + nsguanxing_info:'锁定技,准备阶段,你观看牌堆的X张牌(X为场上存活人数)并且任意移动Y张牌(Y为你当前体力值)', + nscaiyi:'猜疑', + nscaiyi_info:'其他角色摸牌后,你可以观看其摸到的牌,若其中有【杀】,则视为你对其使用一张【杀】,若其中没有【杀】,则视为其对你使用一张【杀】(计入出杀次数)', + nsgefa:'割发', + nsgefa_info:'当你的体力值等于0或更低时,你可以将任意一张♣牌当【桃】使用', + nshaoling:'号令', + nshaoling_info:'限定技,出牌阶段,你可以指定一名其他角色,令另外所有其他角色角色选择一项:1、对该角色使用一张【杀】;2、交给你一张牌,然后视为你对其使用一张【杀】', + nspinmin:'拼命', + nspinmin_info:'锁定技,当你于回合内死亡时,你不死亡并增加一点体力上限(每回合最多增加1点且不能超过4);当你于回合外死亡时,你不死亡并减少一点体力上限(体力上限为0会导致你死亡)', + nsshishou:'失手', + nsshishou_info:'锁定技,当你于回合内失去手牌时,你失去一点体力并摸一张牌;你回合内使用的牌数不能超过4', + nsduijue:'对决', + nsduijue_info:'出牌阶段开始时,你可以弃置一张手牌,若如此做,此阶段你可以将一张与此牌颜色不同的手牌当作[决斗]使用(限2次)', + nsshuangxiong:'双雄', + nsshuangxiong_info:'当你使用[决斗]或被使用[决斗]时,你可以将武将牌翻面', + nsshuangxiong_append:'背面武将:文丑,2体力,你可以将一张牌当[杀]打出', + nsguanyong:'冠勇', + nsguanyong_info:'你可以将一张手牌当[杀]打出', + nsjihui:'急恚', + nsjihui_info:'锁定技,每当一名角色一次弃置了三张或更多的牌,你获得一个额外回合;你的额外回合内,你使用牌只能指定你与上一回合角色为目标', + nsmouyun:'谋运', + nsmouyun_info:'每两轮限一次,你可以弃置场上体力值最少的一名其他角色区域内的X张牌。(X为其损失的体力值)', + nscongjun:'从军', + nscongjun_info:'锁定技,游戏开始时,你变身为一名随机男性角色;当一名敌方角色使用无懈可击时,你有小概率亮出此武将并变回花木兰,然后对该角色造成2点伤害', + nshuanxian:'幻仙', + nshuanxian_info:'锁定技,游戏开始时,你获得随从“幻身·右”,当你首次受到伤害时,你获得随从“幻身·左”(体力上限2,初始手牌2);你与幻身在摸牌阶段均少摸一张牌;在你的回合中(如果有对应幻身),你以【幻身·左-本体-幻身·右】的顺序进行3个连续回合', + nstaiping:'太平', + nstaiping_info:'当你受到一点伤害后(首次伤害除外),你可以选择一项: ①令一个“幻身”增加一点体力上限。②令一个“幻身”回复一点体力。', + nsshoudao:'授道', + nsshoudao_info:'当左右“幻身”全部死亡时,你获得技能“雷击”和“鬼道”。当你死亡时,若此时有两个“幻身”,你可以令一名其他角色获得技能“雷击”和“鬼道”。若有一个“幻身”,你可以令一名其他角色获得技能“雷击”或“鬼道”。(杀死你的角色除外)', + nsnongquan:'弄权', + nsnongquan_info:'出牌阶段,你可以将最后一张手牌当作【无中生有】使用', + nsdufu:'毒妇', + nsdufu_info:'每当你即将造成一次伤害时,你可以为此伤害重新指定伤害来源', + diyjizhi:'集智', + diyjizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌,每回合限3次', + yiesheng:'回雪', + yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。', + liangji:'环计', + liangji_info:'出牌阶段限一次,你可以选择一名未以此法放置牌的其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。', + chengmou:'逞谋', + chengmou_info:'摸牌阶段开始时,若你有“功”牌,你获得之并跳过摸牌阶段,若你所获得的“功”牌多于两张,你须失去一点体力。', + jugong:'居功', + jugong_info:'回合外每名角色的回合限一次,每当场上有角色因受到【杀】或【决斗】造成的伤害,你可以摸一张牌并且将一张手牌置于你的武将牌上,称之为“功”。在你即将受到伤害时,你可以弃置两张“功”,防止此伤害。', + nsxinsheng:'新生', + nsxinsheng_info:'每当你对其他角色造成伤害后,若你未受伤,则你可以增加X点体力上限并摸X张牌,X为伤害点数', + nsdunxing:'遁形', + nsdunxing_info:'每当你即将受到其他角色造成的伤害时,若你已受伤,则你可以防止此伤害,改为失去X点体力上限并摸X张牌,X为伤害点数', + liangce:'粮策', + liangce_info:'①出牌阶段限一次,你可以将一张基本牌当【五谷丰登】使用。②当因执行【五谷丰登】的效果而亮出的牌因效果执行完毕而置入弃牌堆后,你可以选择一名角色,令该角色获取之', + jianbi:'坚壁', + jianbi_info:'当你成为锦囊牌的目标时,若此牌的目标包括其他角色,你可以令此牌对1个目标无效', + juntun:'军屯', + juntun_info:'出牌阶段,你可以重铸装备牌', + choudu:'筹度', + choudu_info:'出牌阶段限一次,你可以弃置一张牌,并指定一名角色视为其使用一张调兵遣将', + liduan:'立断', + liduan_info:'当一名其他角色于其回合外获得牌后,若其此次获得的牌数为1且为装备牌(无论是否可见),你可以令该角色选择一项:1.使用此牌;2.将一张手牌交给你', + fuchou:'负仇', + fuchou2:'负仇', + fuchou_info:'当你成为【杀】的目标时,你可以将一张牌交给此【杀】的使用者,令此【杀】对你无效且你到其的距离于当前回合内视为1,若如此做,此回合的结束阶段开始时,其令你摸一张牌,然后你需对其使用【杀】,否则失去1点体力', + jinyan:'噤言', + jinyan_info:'锁定技。若你的体力值不大于2,你的黑色锦囊牌视为【杀】', + chezhen:'车阵', + chezhen_info:'锁定技。若你的装备区里:没有牌,你的防御距离+1;有牌,你的进攻距离+1', + youzhan:'诱战', + youzhan_info:'当以你距离不大于1的角色为目标的【杀】的使用结算开始时,你可以弃置一张装备牌,令该角色视为使用【诱敌深入】', + kangyin:'亢音', + kangyin2:'亢音', + kangyin_info:'出牌阶段限一次,你可以失去1点体力并选择一名其他角色,弃置该角色的一张牌。若此牌:为基本牌,你可以令一至X名角色各摸一张牌;不为基本牌,于此回合内:你的进攻距离+X,且你使用杀的额外目标数上限+X。(X为你已损失的体力值)', + zhucheng:'筑城', + zhucheng2:'筑城', + zhucheng_info:'①结束阶段开始时,若没有“筑”,你可以将牌堆顶的X张牌置于你的武将牌上〔称为“筑”〕(X为你已损失的体力值与1中的较大值),否则你可以获取所有“筑”。②当你成为杀的目标时,若有“筑”,你可以令此杀的使用者弃置X张牌(X为“筑”的数量),否则杀对你无效', + duoqi:'夺气', + duoqi_info:'当一名角色于除你之外的角色的出牌阶段内因弃置而失去牌后,你可以移去一张“筑”,并结束此出牌阶段', + + siji:'伺机', + ciqiu:'刺酋', + ciqiu2:'刺酋', + ciqiu3:'刺酋', + diy_liuyan:'刘焉', + juedao:'绝道', + geju:'割据', + shaoying:'烧营', + zonghuo:'纵火', + diychanyuan:'缠怨', + diyguhuo:'蛊惑', + jieyan:'劫焰', + honglian:'红莲', + xiongzi:'雄姿', + luweiyan:'围堰', + guihan:'归汉', + diyduanliang:'断粮', + diyduanliang1:'断粮', + diyduanliang2:'断粮', + diyqiangxi:'强袭', + diykuanggu:'狂骨', + diyzaiqi:'再起', + batu:'霸图', + zaiqix:'再起', + diy_jiaoxia:'皎霞', + yaliang:'雅量', + yaliang_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', + diy_jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', + zaiqix_info:'摸牌阶段,若你已受伤,你可以改为展示牌堆顶的X+1张牌,X为你已损失的体力值,其中每有一张♥牌,你回复1点体力,然后弃掉这些♥牌,将其余的牌收入手牌。', + batu_info:'结束阶段,你可以将手牌数补至X,X为现存的势力数', + diyzaiqi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', + diykuanggu_info:'锁定技,每当你造成一点伤害,你在其攻击范围内,你回复一点体力,否则你摸一张牌', + diyqiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害并弃置其一张牌,每回合限一次。', + diyduanliang_info:'出牌阶段限一次,你可以将一张黑色的基本牌当兵粮寸断对一名角色使用,然后摸一张牌。你的兵粮寸断可以指定距离2以内的角色作为目标', + guihan_info:'限定技,当你进入濒死状态时,可以指定一名男性角色与其各回复一点体力并摸两张牌', + luweiyan_info:'出牌阶段限一次,你可以将一张非基本牌当作水攻使用;结算后你可以视为对其中一个目标使用一张不计入出杀次数的杀', + xiongzi_info:'锁定技,你于摸牌阶段额外摸X+1张牌,X为你装备区牌数的一半,向下取整', + honglian_info:'每当你受到来自其他角色的伤害,可以弃置伤害来源的所有红色牌', + jieyan_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害', + diyguhuo_info:'锁定技,准备阶段,你摸两张牌,然后弃置区域内的两张牌', + diychanyuan_info:'锁定技,杀死你的角色失去一点体力上限', + zonghuo_info:'你可弃置一张牌将你即将造成的伤害变为火焰伤害', + shaoying_info:'每当你造成一次火焰伤害,可指定距离受伤害角色1以内的另一名角色,并展示牌堆顶的一张牌,若此牌为红色,该角色受到一点火焰伤害', + juedao_info:'出牌阶段,你可以弃置一张手牌,横置你的武将牌;锁定技,若你处于连环状态,你进攻距离-1、防御距离+1。', + geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。', + siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。', + ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;若其因此进入濒死状态,你令其死亡,然后你失去“刺酋”。 ', + nsshuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。', + moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。', + xicai_info:'你可以立即获得对你造成伤害的牌', + diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力', + diy_tieba:'吧友设计', + diy_default:'常规', + diy_key:'论外', + diy_yongjian:'用间篇', + diy_yijiang:'设计比赛2020', + }, + }; +}); diff --git a/character/extra.js b/character/extra.js index 4031c0216..7b8d02627 100755 --- a/character/extra.js +++ b/character/extra.js @@ -1398,17 +1398,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, targetInRange:function(card){ if(get.suit(card)=='heart') return true; + }, + cardUsable:function(card){ + if(card.name=='sha'&&get.suit(card)=='heart') return Infinity; } }, audio:2, - trigger:{player:['useCard1','respond']}, - firstDo:true, + trigger:{player:'useCard'}, forced:true, filter:function(event,player){ - return event.card.name=='sha'&&!event.skill&& - event.cards.length==1&&get.suit(event.cards[0])=='heart'; + return event.card.name=='sha'&&get.suit(event.card)=='heart'; + }, + content:function(){ + trigger.directHit.addArray(game.players); }, - content:function(){}, ai:{ effect:{ target:function(card,player,target,current){ @@ -3310,7 +3313,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ longhun_info:'你可以将同花色的X张牌按下列规则使用或打出:红桃当【桃】,方块当具火焰伤害的【杀】,梅花当【闪】,黑桃当【无懈可击】(X为你当前的体力值且至少为1)', juejing_info:'锁定技,摸牌阶段,你摸牌的数量改为你已损失的体力值+2;你的手牌上限+2。', wushen:'武神', - wushen_info:'锁定技,你的红桃手牌和判定牌均视为【杀】;锁定技,你使用红桃【杀】无距离限制。', + wushen_info:'锁定技,你的红桃手牌均视为【杀】;锁定技,你使用红桃【杀】无距离和次数限制且不可被响应。', wuhun:'武魂', wuhun21:'武魂', wuhun22:'武魂', diff --git a/character/mobile.js b/character/mobile.js index 9fb3f481d..4f78ccfad 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -1,5673 +1,5673 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'mobile', - connectBanned:['miheng'], - connect:true, - characterSort:{ - mobile:{ - mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei"], - mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning"], - mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong","xin_yuanshao","re_liushan","xin_xiahoudun","re_sp_zhugeliang","re_heqi","re_guanqiujian","re_pangtong","old_liuzan","xin_chengpu","re_sunjian","re_xusheng"], - mobile_sunben:["re_sunben"], - }, - }, - character:{ - re_xusheng:['male','wu',4,['repojun']], - sp_sufei:['male','qun',4,['zhengjian','gaoyuan']], - yj_zhangliao:['male','qun',4,['weifeng']], - yj_zhanghe:['male','qun',4,['xinzhilve']], - yj_xuhuang:['male','qun',4,['xinxhzhiyan']], - yj_ganning:['male','qun',4,['gnjinfan','gnsheque']], - re_sunjian:['male','wu',4,['gzyinghun','repolu']], - zhengxuan:['male','qun',3,['zhengjing']], - dengzhi:['male','shu',3,['jimeng','shuaiyan']], - xin_chengpu:['male','wu',4,['relihuo','chunlao']], - yangyi:['male','shu',3,['duoduan','gongsun']], - dongcheng:['male','qun',4,['chengzhao']], - re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]], - re_guanqiujian:['male','wei',4,['rezhengrong','rehongju']], - chendeng:['male','qun',3,['zhouxuan','fengji']], - re_heqi:['male','wu',4,['reqizhou','reshanxi']], - yangbiao:['male','qun',3,['zhaohan','rangjie','yizheng']], - re_sp_zhugeliang:["male","shu",3,["bazhen","rehuoji","rekanpo"],[]], - xin_xiahoudun:['male','wei',4,['reganglie','xinqingjian']], - zhangyì:['male','shu',4,['zhiyi']], - jiakui:['male','wei',3,['zhongzuo','wanlan']], - re_jikang:["male","wei",3,["new_qingxian","new_juexiang"]], - old_bulianshi:['female','wu',3,['anxu','zhuiyi']], - miheng:['male','qun',3,['kuangcai','shejian']], - taoqian:['male','qun',3,['zhaohuo','yixiang','yirang']], - old_liuzan:['male','wu',4,['fenyin']],lingcao:['male','wu',4,['dujin']], - sunru:['female','wu',3,['yingjian','shixin']], - lifeng:['male','shu',3,['tunchu','shuliang']], - zhuling:['male','wei',4,['xinzhanyi']], - liuye:['male','wei',3,['polu','choulve']], - zhaotongzhaoguang:["male","shu",4,["yizan_use","xinfu_longyuan"],[]], - majun:["male","wei",3,["xinfu_jingxie1","qiaosi"],[]], - simazhao:["male","wei",3,["xinfu_daigong","xinfu_zhaoxin"],[]], - wangyuanji:["female","wei",3,["xinfu_qianchong","xinfu_shangjian"],[]], - pangdegong:["male","qun",3,["xinfu_pingcai","xinfu_pdgyingshi"],[]], - old_yuanshu:['male','qun',4,['xinyongsi','yjixi']], - - shenpei:["male","qun","2/3",["shouye","liezhi"],[]], - re_wangyun:['male','qun',3,['relianji','remoucheng']], - - re_baosanniang:['female','shu',3,['meiyong','rexushen','rezhennan']], - - hujinding:['female','shu','2/6',['renshi','wuyuan','huaizi']], - - re_zhanggong:['male','wei',3,['reqianxin','xinfu_zhenxing']], - re_xugong:['male','wu',3,['rebiaozhao','yechou']], - re_weiwenzhugezhi:['male','wu',4,['refuhai']], - - xin_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']], - re_liushan:['male','shu',3,['xiangle','refangquan','ruoyu'],['zhu']], - re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']], - }, - characterIntro:{ - zhengxuan:'郑玄(127年-200年),字康成。北海郡高密县(今山东省高密市)人。东汉末年儒家学者、经学大师。郑玄曾入太学攻《京氏易》、《公羊春秋》及《三统历》、《九章算术》,又从张恭祖学《古文尚书》、《周礼》和《左传》等,最后从马融学古文经。游学归里之后,复客耕东莱,聚徒授课,弟子达数千人,家贫好学,终为大儒。党锢之祸起,遭禁锢,杜门注疏,潜心著述。晚年守节不仕,却遭逼迫从军,最终病逝于元城,年七十四。郑玄治学以古文经学为主,兼采今文经学。他遍注儒家经典,以毕生精力整理古代文化遗产,使经学进入了一个“小统一时代”。著有《天文七政论》、《中侯》等书,共百万余言,世称“郑学”,为汉代经学的集大成者。唐贞观年间,列郑玄于二十二“先师”之列,配享孔庙。宋代时被追封为高密伯。后人建有郑公祠以纪念。', - dengzhi:'邓芝(178年-251年),字伯苗。义阳郡新野县(今河南新野)人。东汉名将邓禹之后,三国时期蜀汉重臣。邓芝早年曾被预言能位至大将,后被刘备任为郫令,升迁为广汉太守。因任官公廉且有治绩,被征入朝为尚书。刘备逝世后,奉命出使吴国,成功修复两国关系,并深为吴大帝孙权所赏识。建兴六年(228年),丞相诸葛亮策划北伐,命邓芝与大将赵云佯攻郿城,以吸引魏国曹真军主力。建兴十二年(234年),迁前军师、前将军,领兖州刺史,封阳武亭侯,不久督领江州。延熙六年(243年),迁车骑将军,后授假节。又率军平定涪陵叛乱。延熙十四年(251年),邓芝病逝。邓芝性格正直、简单,不刻意修饰情绪。他为将二十多年,赏罚明断,体恤士卒。身上的衣食取自官府,从未经营过私产,妻儿甚至还有忍饥挨饿之时,死时家中也没有多余财物。', - yangyi:'杨仪(?-235年),字威公,襄阳(今湖北襄阳)人,三国时期蜀汉官员。最初为荆州刺史傅群的主簿,后投奔关羽,任为功曹。关羽遣其至成都,大受刘备赞赏,擢为尚书。因与尚书令刘巴不和,调为弘农太守。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。诸葛亮在生前定蒋琬继己任,杨仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', - dongcheng:'董承(?~200年),字号不详,冀州河间人(今河北献县)人。东汉末年外戚大臣,汉灵帝母亲董太后侄子,汉献帝嫔妃董贵人之父。初从西凉军,为董卓女婿牛辅部曲。护卫汉献帝刘协从长安东归洛阳,拜为卫将军,受封列侯。建安四年(199年),拜车骑将军。自称领受汉献帝衣带诏,联合刘备、种辑、吴子兰、王子服、吴硕等人密谋诛杀曹操。五年正月,图谋泄露,董承诸人及董贵人全部遇害。', - chendeng:'陈登(163—201),字元龙,下邳淮浦(今江苏涟水西)人。东汉末年将领、官员。沛相陈珪之子。为人爽朗,性格沈静,智谋过人,少年时有扶世济民之志,并且博览群书,学识渊博。二十五岁时,举孝廉,任东阳县长。虽然年轻,但他能够体察民情,抚弱育孤,深得百姓敬重。后来,徐州牧陶谦提拔他为典农校尉,主管一州农业生产。他亲自考察徐州的土壤状况,开发水利,发展农田灌溉,使汉末迭遭破坏的徐州农业得到一定程度的恢复,百姓们安居乐业,“秔稻丰积”。建安初奉使赴许,向曹操献灭吕布之策,被授广陵太守。以灭吕布有功,加伏波将军。又迁东城太守。年三十九卒。其子陈肃,魏文帝时追陈登之功,为郎中。', - yangbiao:'杨彪(142年-225年),字文先。弘农郡华阴县(今陕西华阴)人。东汉末年名臣,太尉杨赐之子、名士杨修之父。杨彪少年时受家学熏陶,初举孝廉、茂才。其后征拜为议郎,参与续写《东观汉记》。任京兆尹时,揭发黄门令王甫的贪赃行为,使其被定罪诛杀。累任侍中、五官中郎将、卫尉等职。汉献帝时,遍历三公(司空、司徒、太尉)之职。权臣董卓意图迁都时,他据理力争。献帝东迁时,杨彪尽节护主。曹操挟献帝定都许县后,将杨彪下狱,获释后又任太常。他见汉室衰微,便诈称脚疾,不理世事。曹魏建立后,拒绝出任太尉,改光禄大夫,待以客礼。黄初六年(225年),杨彪去世,年八十四。其著作现仅存《答曹公书》一篇。', - zhangyì:'张翼(?-264年),字伯恭,益州犍为郡武阳县人。三国时期蜀汉将领。历任梓潼、广汉、蜀郡三郡太守,出任庲降都督,后随诸葛亮和姜维北伐,官至左车骑将军,领冀州刺史。初封关内侯,进爵都亭侯。蜀汉灭亡后,魏将钟会密谋造反,成都大乱,张翼亦为乱兵所杀。张翼是蜀汉第三任庲降都督,由于执法严厉,不得南夷欢心。在北伐上,张翼认为国小民疲,不应滥用武力,是蜀汉朝廷当时极少敢当朝和姜维争辩北伐问题的大臣。', - jiakui:'贾逵(174年—228年),本名贾衢,字梁道,河东襄陵人(今山西临汾县)。汉末三国时期魏国名臣,西晋开国功臣贾充父亲。初为并州郡吏,迁渑池县令,拜弘农太守,历仕曹操、曹丕、曹叡三世,是曹魏政权中具有军政才干的人物,终其一生为魏国统一事业作出卓越贡献。担任豫州刺史期间,兴修水利,凿通运河二百余里,时称“贾侯渠”,便利民生。随同曹丕伐吴,进封阳里亭侯,加号建威将军。石亭之战,率军救出曹休。太和二年,去世,赠本官,谥号为肃,《唐会要》将其尊为魏晋八君子之一。', - shenpei:'审配(?-204年),字正南,魏郡阴安(今河北清丰北)人。为人正直, 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。', - hujinding:'胡金定,女,传说中关羽之妻。关索之母,配偶关羽,出处《花关索传》和元代《三国志评话》民间传说人物。', - }, - card:{ - pss_paper:{ - type:'pss', - fullskin:true, - //derivation:'shenpei', - }, - pss_scissor:{ - type:'pss', - fullskin:true, - //derivation:'shenpei', - }, - pss_stone:{ - type:'pss', - fullskin:true, - //derivation:'shenpei', - }, - db_atk1:{ - type:'db_atk', - fullimage:true, - //derivation:'shenpei', - }, - db_atk2:{ - type:'db_atk', - fullimage:true, - //derivation:'shenpei', - }, - db_def1:{ - type:'db_def', - fullimage:true, - //derivation:'shenpei', - }, - db_def2:{ - type:'db_def', - fullimage:true, - //derivation:'shenpei', - }, - ly_piliche:{ - fullskin:true, - vanish:true, - derivation:'liuye', - type:'equip', - subtype:'equip1', - distance:{attackFrom:-8}, - skills:['ly_piliche'], - destroy:'polu' - }, - "wolong_card":{ - type:"takaramono", - fullskin:true, - //derivation:"pangdegong", - }, - "fengchu_card":{ - type:"takaramono", - fullskin:true, - //derivation:"pangdegong", - }, - "xuanjian_card":{ - fullskin:true, - type:"takaramono", - //derivation:"pangdegong", - }, - "shuijing_card":{ - fullskin:true, - type:"takaramono", - //derivation:"pangdegong", - }, - "rewrite_bagua":{ - derivation:"majun", - //cardimage:"bagua", - fullskin:true, - type:"equip", - subtype:"equip2", - ai:{ - basic:{ - equipValue:7.5, - }, - }, - skills:["rw_bagua_skill"], - }, - "rewrite_baiyin":{ - derivation:"majun", - fullskin:true, - //cardimage:"baiyin", - type:"equip", - subtype:"equip2", - filterLose:function(card,player){ - if(player.hasSkillTag('unequip2')) return false; - return true; - }, - loseDelay:false, - onLose:function(){ - player.logSkill('rw_baiyin_skill'); - var next=game.createEvent('rw_baiyin_recover'); - event.next.remove(next); - event.getParent().after.push(next); - next.player=player; - next.setContent(function(){ - player.draw(2); - player.recover(); - }); - }, - skills:["rw_baiyin_skill"], - tag:{ - recover:1, - }, - ai:{ - order:9.5, - equipValue:function (card,player){ - if(player.hp==player.maxHp) return 5; - if(player.countCards('h','rewrite_baiyin')) return 6; - return 0; - }, - basic:{ - equipValue:5, - }, - }, - }, - "rewrite_lanyinjia":{ - derivation:"majun", - //cardimage:"lanyinjia", - fullskin:true, - type:"equip", - subtype:"equip2", - skills:["rw_lanyinjia","lanyinjia2"], - ai:{ - equipValue:6, - basic:{ - equipValue:1, - }, - }, - }, - "rewrite_renwang":{ - derivation:"majun", - //cardimage:"renwang", - fullskin:true, - type:"equip", - subtype:"equip2", - skills:["rw_renwang_skill"], - ai:{ - basic:{ - equipValue:7.5, - }, - }, - }, - "rewrite_tengjia":{ - derivation:"majun", - //cardimage:"tengjia", - fullskin:true, - type:"equip", - subtype:"equip2", - cardnature:"fire", - ai:{ - equipValue:function (card,player){ - if(player.hasSkillTag('maixie')&&player.hp>1) return 0; - if(player.hasSkillTag('noDirectDamage')) return 10; - if(get.damageEffect(player,player,player,'fire')>=0) return 10; - var num=3-game.countPlayer(function(current){ - return get.attitude(current,player)<0; - }); - if(player.hp==1) num+=4; - if(player.hp==2) num+=1; - if(player.hp==3) num--; - if(player.hp>3) num-=4; - return num; - }, - basic:{ - equipValue:3, - }, - }, - skills:["rw_tengjia1","rw_tengjia2","rw_tengjia3","rw_tengjia4"], - }, - "rewrite_zhuge":{ - derivation:"majun", - //cardimage:"zhuge", - distance:{ - attackFrom:-2, - }, - fullskin:true, - type:"equip", - subtype:"equip1", - ai:{ - equipValue:function (card,player){ - if(!game.hasPlayer(function(current){ - return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)>0; - })){ - return 1; - } - if(player.hasSha()&&_status.currentPhase==player){ - if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ - return 10; - } - } - var num=player.countCards('h','sha'); - if(num>1) return 6+num; - return 3+num; - }, - basic:{ - equipValue:5, - }, - tag:{ - valueswap:1, - }, - }, - skills:["rw_zhuge_skill"], - }, - }, - characterFilter:{}, - skill:{ - //苏飞,新贾逵 - tongqu:{ - audio:'zhongzuo', - trigger:{ - global:['gameDrawAfter','damageEnd','phaseDrawBegin2'], - player:['enterGame','phaseUseBegin'], - }, - direct:true, - filter:function(event,player){ - if(event.name=='phaseDraw') return !event.numFixed&&event.player.hasMark('tongqu'); - if(event.name=='damage') return event.player.hasMark('tongqu'); - if(event.name=='phaseUse') return game.hasPlayer(function(current){ - return !current.hasMark('tongqu'); - }); - return !player.hasMark('tongqu'); - }, - content:function(){ - 'step 0' - if(trigger.name=='phaseDraw'){ - player.logSkill('tongqu',trigger.player); - trigger.num++; - trigger.player.addTempSkill('tongqu2','phaseDrawAfter'); - event.finish(); - } - else if(trigger.name=='damage'){ - player.logSkill('tongqu',trigger.player); - trigger.player.removeMark('tongqu',1); - event.finish(); - } - else if(trigger.name=='phaseUse'){ - player.chooseTarget(get.prompt2('tongqu'),function(card,player,target){ - return !target.hasMark('tongqu'); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target) - }); - } - else{ - player.logSkill('tongqu'); - player.addMark('tongqu',1); - event.finish(); - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('tongqu',target); - target.addMark('tongqu',1); - } - }, - marktext:'渠', - intro:{content:'mark'}, - }, - tongqu2:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - silent:true, - filter:function(event,player){ - var bool=game.hasPlayer(function(current){ - return current!=player&¤t.hasMark('tongqu'); - }); - return player.countCards('he',function(card){ - if(bool) return true; - return lib.filter.cardDiscardable(card,player); - })>0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - forced:true, - position:'he', - filterCard:true, - filterTarget:function(card,player,target){ - return player!=target&&target.hasMark('tongqu'); - }, - selectTarget:function(){ - if(ui.selected.cards.length&&!lib.filter.cardDiscardable(ui.selected.cards[0],_status.event.player)) return [1,1]; - return [0,1]; - }, - prompt:'弃置一张牌,或将一张牌交给一名有“渠”的其他角色', - ai1:function(card){ - var player=_status.event.player; - if(get.name(card)=='du') return 20; - if(get.position(card)=='e'&&get.value(card)<=0) return 14; - if(get.position(card)=='h'&&game.hasPlayer(function(current){ - return current!=player&¤t.hasMark('tongqu')&&get.attitude(player,current)>0&¤t.getUseValue(card)>player.getUseValue(card)&¤t.getUseValue(card)>player.getUseValue(card); - })) return 12; - if(game.hasPlayer(function(current){ - return current!=player&¤t.hasMark('tongqu')&&get.attitude(player,current)>0; - })){ - if(card.name=='wuxie') return 11; - if(card.name=='shan'&&player.countCards('h','shan')>1) return 9 - } - return 6/Math.max(1,get.value(card)); - }, - ai2:function(target){ - var player=_status.event.player; - var card=ui.selected.cards[0]; - var att=get.attitude(player,target); - if(card.name=='du') return -6*att; - if(att>0){ - if(get.position(card)=='h'&&target.getUseValue(card)>player.getUseValue(card)) return 4*att; - if(get.value(card,target)>get.value(card,player)) return 2*att; - return 1.2*att; - } - return 0; - }, - }); - 'step 1' - if(result.bool){ - if(result.targets.length) result.targets[0].gain(result.cards,player,'giveAuto'); - else player.discard(result.cards); - } - }, - }, - xinwanlan:{ - audio:'wanlan', - trigger:{global:'damageBegin4'}, - filter:function(event,player){ - return event.player.hp<=event.num&&player.countCards('he',function(card){ - return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic'; - })>=1; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)<4) return false; - if(player.countCards('h',function(card){ - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardSavable',player); - if(mod!='unchanged') return mod; - var savable=get.info(card).savable; - if(typeof savable=='function') savable=savable(card,player,event.player); - return savable; - })>=1+event.num-event.player.hp) return false; - if(event.player==player||event.player==get.zhu(player)) return true; - return !player.hasUnknown(); - }, - content:function(){ - player.discard(player.getCards('he',function(card){ - return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic'; - })); - trigger.cancel(); - }, - }, - zhengjian:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - locked:true, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget('请选择【诤荐】的目标',lib.translate.zhengjian_info).set('ai',function(target){ - if(target.hasSkill('zhengjian')) return 0; - if(player==target) return 0.5; - return get.attitude(_status.event.player,target)*(1+target.countCards('h')); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('zhengjian',target); - target.addSkill('zhengjian_mark'); - } - }, - group:'zhengjian_draw', - }, - zhengjian_draw:{ - audio:'zhengjian', - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event){ - return game.hasPlayer(function(current){ - return current.hasSkill('zhengjian_mark'); - }); - }, - logTarget:function(event){ - return game.filterPlayer(function(current){ - return current.hasSkill('zhengjian_mark'); - }); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current.countMark('zhengjian_mark')>0; - }); - if(list.length){ - event.delay=true; - game.asyncDraw(list,function(target){ - return Math.min(5,target.maxHp,target.countMark('zhengjian_mark')); - }); - } - 'step 1' - game.countPlayer(function(current){ - current.removeSkill('zhengjian_mark'); - }); - if(event.delay) game.delayx(); - }, - }, - zhengjian_mark:{ - trigger:{player:['useCard1','respond']}, - silent:true, - firstDo:true, - onremove:true, - charlotte:true, - content:function(){ - player.addMark('zhengjian_mark',1,false); - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=0; - }, - mark:true, - intro:{ - content:'已使用/打出过#张牌', - }, - }, - gaoyuan:{ - audio:2, - trigger:{target:'useCardToTarget'}, - direct:true, - filter:function(event,player){ - if(event.card.name!='sha') return false; - if(player.countCards('he')==0) return false; - return game.hasPlayer(function(current){ - return current!=event.player&¤t!=player&& - current.hasSkill('zhengjian_mark')&&lib.filter.targetEnabled(event.card,event.player,current); - }); - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var trigger=_status.event; - if(target!=player&&target!=trigger.source){ - if(target.hasSkill('zhengjian_mark')&&lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true; - } - return false; - }, - ai1:function(card){ - return get.unuseful(card)+9; - }, - ai2:function(target){ - if(_status.event.player.countCards('h','shan')){ - return -get.attitude(_status.event.player,target); - } - if(get.attitude(_status.event.player,target)<5){ - return 6-get.attitude(_status.event.player,target); - } - if(_status.event.player.hp==1&&player.countCards('h','shan')==0){ - return 10-get.attitude(_status.event.player,target); - } - if(_status.event.player.hp==2&&player.countCards('h','shan')==0){ - return 8-get.attitude(_status.event.player,target); - } - return -1; - }, - prompt:get.prompt('gaoyuan'), - prompt2:'弃置一张牌,将此【杀】转移给一名有“诤”的角色', - source:trigger.player, - card:trigger.card, - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill(event.name,target); - player.discard(result.cards); - var evt=trigger.getParent(); - evt.triggeredTargets2.remove(player); - evt.targets.remove(player); - evt.targets.push(target); - } - }, - }, - //一 将 成 名 - zhilve:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - 'step 0' - if(!player.canMoveCard()) event._result={index:1}; - else player.chooseControl().set('choiceList',[ - '移动场上的一张牌', - '本回合的摸牌阶段多摸一张牌且第一张杀无距离次数限制', - ]).set('ai',function(){return 1}); - 'step 1' - if(result.index==1){ - player.addTempSkill('zhilve_yingzi'); - if(!player.getHistory('useCard',function(card){ - return card.card.name=='sha'; - }).length) player.addTempSkill('zhilve_xiandeng'); - event.finish(); - } - else player.moveCard(true); - 'step 2' - if(result.position=='e') player.loseHp(); - else player.addTempSkill('zhilve_dis'); - }, - subSkill:{ - dis:{ - mod:{ - maxHandcard:function(player,num){ - return num-1; - }, - }, - }, - yingzi:{ - trigger:{player:'phaseDrawBegin2'}, - popup:false, - forced:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){trigger.num++}, - }, - xiandeng:{ - mod:{ - targetInRange:function(card,player){ - if(card.name=='sha') return true; - }, - }, - trigger:{player:'useCard1'}, - forced:true, - popup:false, - firstDo:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - content:function(){ - player.removeSkill(event.name); - if(trigger.addCount!==false){ - trigger.addCount=false; - var stat=player.getStat('card'); - if(stat&&stat.sha) stat.sha--; - } - }, - }, - }, - }, - xhzhiyan:{ - enable:'phaseUse', - audio:2, - filter:function(event,player){ - return player.countCards('h')!=player.maxHp; - }, - filterCard:true, - selectCard:function(){ - var player=_status.event.player; - var num=Math.max(0,player.countCards('h')-player.maxHp); - return [num,num]; - }, - check:function(card){ - var player=_status.event.player; - if(player.getUseValue(card)<=0&&game.hasPlayer(function(current){ - return current!=player&&get.value(card,current)*get.attitude(player,current)>0; - })) return 1; - return 0; - }, - content:function(){ - 'step 0' - if(!cards.length){ - player.draw(player.maxHp-player.countCards('h')); - player.addTempSkill('zishou2'); - event.finish(); - } - else{ - cards=cards.filterInD('d'); - if(cards.length) player.chooseButton(['是否将其中的一张牌交给一名其他角色?',cards]).set('',function(button){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return current!=player&&get.value(button.link,current)*get.attitude(player,current)>0; - })) return Math.abs(get.value(button.link)); - return 0; - }); - else event.finish(); - } - 'step 1' - if(result.bool){ - event.card=result.links[0]; - player.chooseTarget(true,lib.filter.notMe,'选择一名其他角色获得'+get.translation(event.card)).set('ai',function(target){ - return get.value(_status.event.getParent().card,target)*get.attitude(_status.event.player,target); - }); - } - else event.finish(); - 'step 2' - var target=result.targets[0]; - player.line(target,'green'); - target.gain(card,'gain2','log'); - }, - ai:{ - order:function(obj,player){ - if(player.countCards('h')>player.maxHp) return 10; - return 0.5; - }, - result:{ - player:1, - }, - }, - }, - //水 果 忍 者 - zhengjing_guanju:{audio:true}, - zhengjing:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.hasSkill('zhengjing3'); - }, - content:function(){ - "step 0" - //game.trySkillAudio('zhengjing_guanju',player); - if(_status.connectMode) event.time=lib.configOL.choose_timeout; - var cards=[]; - var names=[]; - while(true){ - var card=get.cardPile(function(carde){ - return carde.name!='du'&&!names.contains(carde.name); - }); - if(card){ - cards.push(card); - names.push(card.name); - if(cards.length==3&&!get.isLuckyStar(player)&&Math.random()<0.33) break; - if(cards.length==4&&!get.isLuckyStar(player)&&Math.random()<0.5) break; - if(cards.length==5) break; - if(cards.length>=6) break; - } - else break; - }; - event.cards=cards; - if(!cards.length){event.finish();return;}; - names.push('du'); - var names2=names.slice(0); - for(var i=0;i<4;i++){ - names=names.concat(names2); - } - names.randomSort(); - event.videoId=lib.status.videoId++; - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var switchToAuto=function(){ - names.remove('du'); - game.pause(); - game.countChoose(); - setTimeout(function(){ - _status.imchoosing=false; - event._result={ - bool:true, - links:names.slice(0), - }; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - game.resume(); - },5000); - }; - var createDialog=function(player,id){ - if(_status.connectMode) lib.configOL.choose_timeout='30'; - if(player==game.me) return; - var str=get.translation(player)+'正在整理经书...
'; - ui.create.dialog(str).videoId=id; - }; - var chooseButton=function(list){ - var event=_status.event; - event.settleed=false; - event.finishedx=[]; - event.map={}; - event.zhengjing=list; - event.zhengjing_nodes=[]; - event.map=[]; - event.dialog=ui.create.dialog('forcebutton','hidden'); - event.dialog.textPrompt=event.dialog.addText('及时点击卡牌,但不要点到毒了!'); - event.switchToAuto=function(){ - event._result={ - bool:true, - links:event.finishedx.slice(0), - }; - event.dialog.close(); - game.resume(); - _status.imchoosing=false; - }; - event.dialog.classList.add('fixed'); - event.dialog.classList.add('scroll1'); - event.dialog.classList.add('scroll2'); - event.dialog.classList.add('fullwidth'); - event.dialog.classList.add('fullheight'); - event.dialog.classList.add('noupdate'); - event.dialog.open(); - event.settle=function(du){ - if(event.settleed) return; - event.settleed=true; - if(du){ - if(lib.config.background_speak) game.playAudio('skill','zhengjing_boom'); - event.dialog.textPrompt.innerHTML='
叫你别点毒你非得点 这下翻车了吧'; - } - else { - if(lib.config.background_speak) game.playAudio('skill','zhengjing_finish'); - event.dialog.textPrompt.innerHTML='
整理经典结束!共整理出'+get.cnNumber(event.finishedx.length)+'份经典'; - } - while(event.zhengjing_nodes.length){ - event.zhengjing_nodes.shift().delete(); - } - setTimeout(function(){ - event.switchToAuto(); - },1000); - }; - - var click=function(){ - var name=this.name; - if(name=='du'){ - event.zhengjing.length=0; - event.settle(true); - } - else{ - if(lib.config.background_speak) game.playAudio('skill','zhengjing_click'); - if(!event.map[name]) event.map[name]=0; - event.map[name]++; - if(event.map[name]>1) event.finishedx.add(name); - } - event.zhengjing_nodes.remove(this); - this.style.transition='all 0.5s'; - this.style.transform='scale(1.2)'; - this.delete(); - }; - var addNode=function(){ - if(event.zhengjing.length){ - var card=ui.create.card(ui.special,'noclick',true); - card.init(['','',event.zhengjing.shift()]); - card.addEventListener(lib.config.touchscreen?'touchend':'click',click); - event.zhengjing_nodes.push(card); - card.style.position='absolute'; - var rand1=Math.round(Math.random()*100); - var rand2=Math.round(Math.random()*100); - var rand3=Math.round(Math.random()*40)-20; - card.style.left='calc('+rand1+'% - '+rand1+'px)'; - card.style.top='calc('+rand2+'% - '+rand2+'px)'; - card.style.transform='scale(0.8) rotate('+rand3+'deg)'; - card.style.opacity=0; - event.dialog.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='scale(1) rotate('+rand3+'deg)'; - } - if(event.zhengjing_nodes.length>(event.zhengjing.length>0?2:0)) event.zhengjing_nodes.shift().delete(); - if(event.zhengjing.length||event.zhengjing_nodes.length) setTimeout(function(){ - addNode(); - },800); - else event.settle(); - }; - - game.pause(); - game.countChoose(); - addNode(); - }; - //event.switchToAuto=switchToAuto; - game.broadcastAll(createDialog,player,event.videoId); - if(event.isMine()){ - chooseButton(names); - } - else if(event.isOnline()){ - event.player.send(chooseButton,names); - event.player.wait(); - game.pause(); - } - else{ - switchToAuto(); - } - "step 1" - game.broadcastAll(function(id,time){ - if(_status.connectMode) lib.configOL.choose_timeout=time; - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - },event.videoId,event.time); - var result=event.result||result; - for(var i=0;i0; - }) - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('jimeng'),function(card,player,target){ - return target!=player&&target.countGainableCards(player,'he')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(player.hp>1&&get.attitude(player,target)<2) return 0; - return get.effect(target,{name:'shunshou'},player,player); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('jimeng',target); - player.gainPlayerCard(target,'he',true); - } - else event.finish(); - 'step 2' - var hs=player.getCards('he'); - if(player.hp>0&&hs.length){ - if(hs.length<=player.hp) event._result={bool:true,cards:hs}; - else player.chooseCard(player.hp,true,'交给'+get.translation(target)+get.cnNumber(player.hp)+'张牌','he',true); - } - else event.finish(); - 'step 3' - target.gain(result.cards,player,'giveAuto'); - }, - }, - shuaiyan:{ - audio:2, - trigger:{player:'phaseDiscardBegin'}, - filter:function(event,player){ - return player.countCards('h')>1; - }, - check:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('he')&&lib.skill.shuaiyan.check2(current,player); - }); - }, - check2:function(target,player){ - if(get.itemtype(player)!='player') player=_status.event.player; - return -get.attitude(player,target)/target.countCards('he'); - }, - content:function(){ - 'step 0' - player.showHandcards(get.translation(player)+'发动了【率言】'); - 'step 1' - var filter=function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }; - if(game.hasPlayer(function(current){ - return filter('我约等于白板',player,current); - })){ - player.chooseTarget(true,filter,'选择一名其他角色,令其交给你一张牌').set('ai',lib.skill.shuaiyan.check2); - } - else event.finish(); - 'step 2' - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); - 'step 3' - player.gain(result.cards,target,'giveAuto') - }, - }, - relihuo:{ - audio:2, - group:['relihuo_baigei','relihuo_damage'], - trigger:{player:'useCard1'}, - filter:function(event,player){ - if(event.card.name=='sha'&&!event.card.nature) return true; - }, - check:function(event,player){ - return false; - }, - content:function(){ - trigger.card.nature='fire'; - trigger.relihuo=true; - }, - }, - relihuo_damage:{ - trigger:{source:'damageBegin1'}, - forced:true, - audio:'relihuo', - filter:function(event,player){ - return event.getParent(2).relihuo==true; - }, - content:function(){ - trigger.num++; - }, - }, - relihuo_baigei:{ - trigger:{player:'useCardAfter'}, - forced:true, - audio:'relihuo', - filter:function(event,player){ - if(event.card.name!='sha'||event.card.nature!='fire') return false; - var num=0; - player.getHistory('sourceDamage',function(evt){ - if(evt.card==event.card) num+=evt.num; - }); - return num>1; - }, - content:function(){ - var num=0; - player.getHistory('sourceDamage',function(evt){ - if(evt.card==trigger.card) num+=evt.num; - }); - player.loseHp(Math.floor(num/2)); - }, - }, - gongsun:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>1; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - prompt:get.prompt2('gongsun'), - selectCard:2, - filterCard:lib.filter.cardDiscardable, - filterTarget:lib.filter.notMe, - position:'he', - ai1:function(){return -1}, - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('gongsun',target); - player.discard(result.cards); - player.addTempSkill('gongsun_shadow',{player:['phaseBegin','die']}); - var list=[]; - for(var i=0;i0) str+='
' - str+=get.translation(shadow[i][0]); - str+=':'; - str+=get.translation(shadow[i][1]); - } - return str; - }, - }, - mod:{ - cardEnabled:function(card,player){ - var list=player.storage.gongsun_shadow; - for(var i=0;i0&&!player.hasSkill('duoduan_im'); - }, - content:function(){ - 'step 0' - player.chooseCard('he',get.prompt2('duoduan')).set('ai',function(card){ - if(_status.event.goon) return 8-get.value(card); - return 0; - }).set('goon',function(){ - if(get.attitude(trigger.player,player)>0) return true; - if(!player.hasShan()) return true; - return event.getRand()<0.5; - }()); - 'step 1' - if(result.bool){ - player.addTempSkill('duoduan_im'); - var card=result.cards[0]; - player.logSkill('duoduan',trigger.player); - player.lose(card,ui.discardPile,'visible'); - player.$throw(card,1000); - game.log(player,'将',card,'置入弃牌堆'); - player.draw(); - } - else event.finish(); - 'step 2' - trigger.player.chooseToDiscard('弃置一张牌令'+get.translation(player)+'不能闪避此【杀】,或点「取消」摸两张牌并令此【杀】对其无效').set('ai',function(card){ - if(_status.event.goon) return 6-get.value(card); - return 0; - }).set('goon',get.attitude(trigger.player,player)<0); - 'step 3' - if(result.bool){ - trigger.directHit.add(player); - } - else{ - trigger.player.draw(2); - trigger.excluded.add(player); - } - }, - }, - duoduan_im:{ - //'im' refers to 'Iwasawa Masami' in 'Angel Beats!' - //Although she disappeared in the Episode 3 of the anime, but her route in the game is really worth to play. - }, - chengzhao:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - var num=0; - player.getHistory('gain',function(evt){ - num+=evt.cards.length; - }); - if(num<2) return false; - return player.countCards('h')>0&&game.hasPlayer(function(current){ - return player!=current&&player.canCompare(current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('chengzhao'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)/target.countCards('h'); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('chengzhao',target); - player.chooseToCompare(target); - } - else event.finish(); - 'step 2' - if(result.bool){ - var card={name:'sha',isCard:true}; - if(player.canUse(card,target,false)) player.useCard(card,target,false).card.chengzhao=true; - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(!arg||!arg.card||arg.card.chengzhao!=true) return false; - }, - }, - }, - rezhengrong:{ - trigger:{player:'useCardAfter'}, - direct:true, - audio:'drlt_zhenrong', - filter:function(event,player){ - if(!event.targets) return false; - if(!event.isPhaseUsing(player)) return false; - var bool=false; - for(var i=0;i0; - }).set('ai',function(target){ - return (1-get.attitude(_status.event.player,target))/target.countCards('he'); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=result.targets[0]; - player.logSkill('rezhengrong',target); - var card=target.getCards('he').randomGet(); - game.log(player,'选择了',card); - target.$give(card,player,false); - target.lose(card,ui.special,'toStorage'); - if(!player.storage.rezhengrong) player.storage.rezhengrong=[]; - player.storage.rezhengrong.push(card); - player.markSkill('rezhengrong'); - game.delayx(); - } - }, - marktext:'荣', - intro:{ - content:'cards', - onunmark:'throw', - }, - }, - rehongju:{ - trigger:{player:'phaseZhunbeiBegin'}, - audio:'drlt_hongju', - forced:true, - unique:true, - juexingji:true, - skillAnimation:true, - animationColor:'thunder', - derivation:'reqingce', - filter:function(event,player){ - return player.storage.rezhengrong&&player.storage.rezhengrong.length>=3&&game.dead.length>0; - }, - content:function(){ - 'step 0' - player.awakenSkill('rehongju'); - player.draw(player.storage.rezhengrong.length); - 'step 1' - if(player.countCards('h')==0) event.goto(3); - else{ - var dialog=['请选择要交换的手牌和「荣」,或点「取消」','
「征荣」牌
',player.storage.rezhengrong,'
手牌区
',player.getCards('h')]; - var next=player.chooseButton(dialog); - next.set('filterButton',function(button){ - var ss=_status.event.player.storage.rezhengrong; - var hs=_status.event.player.getCards('h'); - var sn=0; - var hn=0; - var ub=ui.selected.buttons; - for(var i=0;i=hs.length&&ss.contains(button.link)||hn>=ss.length&&hs.contains(button.link)); - }); - next.set('selectButton',function(){ - if(ui.selected.buttons.length==0) return 2; - var ss=_status.event.player.storage.rezhengrong; - var hs=_status.event.player.getCards('h'); - var sn=0; - var hn=0; - var ub=ui.selected.buttons; - for(var i=0;i0; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('请选择要移去的「荣」',player.storage.rezhengrong,'hidden'); - }, - backup:function(links,player){ - return { - card:links[0], - filterCard:function(){return false}, - selectCard:-1, - filterTarget:function(card,player,target){ - return target.countDiscardableCards(player,'ej')>0; - }, - delay:false, - audio:'drlt_qingce', - content:lib.skill.reqingce.contentx, - ai:{ - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - if(att>0&&(target.countCards('j')>0||target.countCards('e',function(card){ - return get.value(card,target)<0; - }))) return 2; - if(att<0&&target.countCards('e')>0&&!target.hasSkillTag('noe')) return -1; - return 0; - }, - }, - }, - } - }, - prompt:function(links,player){ - return '弃置一名角色装备区或判定区内的一张牌'; - }, - }, - contentx:function(){ - 'step 0' - var card=lib.skill.reqingce_backup.card; - player.$throw(card); - game.cardsDiscard(card); - player.storage.rezhengrong.remove(card); - player[player.storage.rezhengrong.length>0?'markSkill':'unmarkSkill']('rezhengrong'); - 'step 1' - if(target.countDiscardableCards(player,'ej')>0){ - player.discardPlayerCard('ej',true,target); - } - }, - ai:{ - order:8, - result:{ - player:function(player){ - if(game.hasPlayer(function(current){ - var att=get.attitude(player,current); - if((att>0&¤t.countCards('j')>0)||(att<0&¤t.countCards('e')>0)) return true; - return false; - })) return 1; - return 0; - }, - }, - }, - }, - fengji:{ - audio:2, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return typeof player.storage.fengji=='number'&&player.countCards('h')>=player.storage.fengji; - }, - content:function(){ - player.draw(2); - player.addTempSkill('fengji3'); - }, - group:'fengji2', - intro:{ - content:'上回合结束时的手牌数:#', - }, - }, - fengji2:{ - trigger:{player:'phaseEnd'}, - silent:true, - content:function(){ - player.storage.fengji=player.countCards('h'); - if(player.hasSkill('fengji')) player.markSkill('fengji'); - }, - }, - fengji3:{ - mod:{ - maxHandcardBase:function(player,num){ - return player.maxHp; - }, - }, - }, - zhouxuan:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - prompt:get.prompt2('zhouxuan'), - filterCard:lib.filter.cardDiscardable, - filterTarget:lib.filter.notMe, - position:'he', - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0) return Math.max(1,target.hp)*target.countCards('h',function(card){ - return target.getUseValue(card)>0; - }); - return 0; - }, - }); - 'step 1' - if(result.bool){ - player.logSkill('zhouxuan',result.targets[0]); - player.discard(result.cards); - player.addSkill('zhouxuan2'); - result.targets[0].addTempSkill('zhouxuan_ai',{player:'phaseUseAfter'}); - player.storage.zhouxuan2={}; - player.storage.zhouxuan2.player=result.targets[0]; - var list=[]; - var basic=[]; - for(var i=0;i0&&(current.storage.zhouxuan2.isbasic?card.name:get.type(card,'trick'))==current.storage.zhouxuan2.card; - })) return num+10; - } - }, - }, - zhouxuan2:{ - intro:{ - mark:function(player,storage){ - return get.translation(storage.player)+'使用或打出下一张牌时,若此牌为'+get.translation(storage.card)+(storage.isbasic?'':'牌')+',你观看牌堆顶的三张牌并分配给任意角色'; - }, - }, - audio:'zhouxuan', - forced:true, - charlotte:true, - trigger:{global:['useCard','respond']}, - filter:function(event,player){ - if(event.zhouxuanable) return true; - if(player.storage.zhouxuan2){ - var map=player.storage.zhouxuan2; - if(map.player!=event.player) return false; - delete player.storage.zhouxuan2; - player.unmarkSkill('zhouxuan2'); - if(map.card!=(map.isbasic?event.card.name:get.type(event.card,'trick'))) return false; - event.zhouxuanable=true; - return true; - } - return false; - }, - logTarget:'player', - content:function(){ - "step 0" - event.cards=game.cardsGotoOrdering(get.cards(3)).cards; - "step 1" - if(event.cards.length>1){ - player.chooseCardButton('周旋:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ - if(ui.selected.buttons.length==0) return 1; - return 0; - }); - } - else if(event.cards.length==1){ - event._result={links:event.cards.slice(0),bool:true}; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - for(var i=0;i0){ - return att/(1+target.countCards('h')); - } - else{ - return att/100; - } - }).set('enemy',get.value(event.togive[0],player,'raw')<0); - } - "step 3" - if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); - player.line(result.targets[0],'green'); - game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); - event.goto(1); - } - }, - }, - reshanxi:{ - audio:'shanxi', - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.hp>0&&player.countCards('h',function(card){ - if(_status.connectMode) return true; - return get.color(card)=='red'&&get.type(card)=='basic'; - })>0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterCard:function(card){ - return get.color(card)=='red'&&get.type(card)=='basic'&&lib.filter.cardDiscardable.apply(this,arguments); - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }, - prompt:get.prompt('reshanxi'), - prompt2:'弃置一张红色基本牌并选择一名其他角色,将其的至多X张牌置于其武将牌上直到回合结束。(X为你的体力值)', - ai1:function(){return -1}, - }); - 'step 1' - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('reshanxi',event.target); - player.discard(result.cards); - } - else event.finish(); - 'step 2' - var max=Math.min(player.hp,target.countCards('he')); - if(max>0){ - player.choosePlayerCard('he',target,true,[1,max]).set('forceAuto',true).set('prompt','将'+get.translation(target)+'的至多'+get.cnNumber(max)+'张牌置于其武将牌上'); - } - else event.finish(); - 'step 3' - target.addSkill('reshanxi2'); - target.storage.reshanxi2.addArray(result.cards); - target.lose(result.cards,ui.special,'toStorage'); - game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌'); - target.markSkill('reshanxi2'); - }, - }, - reshanxi2:{ - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - trigger:{global:'phaseEnd'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return player.storage.reshanxi2&&player.storage.reshanxi2.length>0; - }, - content:function(){ - game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.reshanxi2,'draw','fromStorage').cards.length)+'张〖闪袭〗牌'); - player.storage.reshanxi2.length=0; - player.removeSkill('reshanxi2'); - }, - intro:{ - onunmark:'throw', - content:'cardCount', - }, - }, - reqizhou:{ - trigger:{player:['equipEnd','loseEnd']}, - forced:true, - popup:false, - derivation:['reyingzi','qixi','rexuanfeng'], - filter:function(event,player){ - if(player.equiping) return false; - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i3) suits.length=3; - if(player.additionalSkills.reqizhou){ - return player.additionalSkills.reqizhou.length!=suits.length; - } - else{ - return suits.length>0; - } - }, - content:function(){ - lib.skill.reqizhou.init(player,'reqizhou'); - }, - init:function(player,skill){ - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i3) suits.length=3; - player.removeAdditionalSkill(skill); - switch(suits.length){ - case 1:player.addAdditionalSkill(skill,['reyingzi']);break; - case 2:player.addAdditionalSkill(skill,['reyingzi','qixi']);break; - case 3:player.addAdditionalSkill(skill,['reyingzi','qixi','rexuanfeng']);break; - } - }, - ai:{ - threaten:1.2 - } - }, - zhaohan:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.phaseNumber<8; - }, - check:function(event,player){ - return player.phaseNumber<3; - }, - content:function(){ - if(player.phaseNumber<5){ - player.gainMaxHp(); - player.recover(); - } - else player.loseMaxHp(); - }, - }, - rangjie:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - 'step 0' - event.count=trigger.num; - 'step 1' - event.count--; - var choiceList=['获得一张指定类型的牌']; - if(player.canMoveCard()) choiceList.push('移动场上的一张牌'); - player.chooseControl('cancel2').set('choiceList',choiceList).set('prompt',get.prompt('rangjie')).set('ai',function(){ - var player=_status.event.player; - if(player.canMoveCard(true)) return 1; - return 0; - }); - 'step 2' - if(result.control=='cancel2') event.finish(); - else{ - player.logSkill('rangjie'); - player.draw(); - if(result.index==0){ - player.chooseControl('basic','trick','equip').set('prompt','选择获得一种类型的牌').set('ai',function(){ - var player=_status.event.player; - if(player.hp<=3&&!player.countCards('h',{name:['shan','tao']})) return 'basic'; - if(player.countCards('he',{type:'equip'})<2) return 'equip'; - return 'trick'; - }); - } - else{ - player.moveCard(true); - event.goto(4); - } - } - 'step 3' - var card=get.cardPile2(function(card){ - return get.type(card,'trick')==result.control; - }); - if(card) player.gain(card,'gain2','log'); - 'step 4' - if(event.count>0) event.goto(1); - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - var num=1; - if(get.attitude(player,target)>0){ - if(player.needsToDiscard()){ - num=0.7; - } - else{ - num=0.5; - } - } - if(target.hp>=4) return [1,num*2]; - if(target.hp==3) return [1,num*1.5]; - if(target.hp==2) return [1,num*0.5]; - } - }, - }, - }, - }, - yizheng:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.hp<=player.hp&&player.canCompare(current); - }); - }, - filterTarget:function(card,player,current){ - return current.hp<=player.hp&&player.canCompare(current); - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - target.skip('phaseDraw'); - target.addTempSkill('yizheng2',{player:'phaseDrawSkipped'}); - } - else player.loseMaxHp(); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.skipList.contains('phaseDraw')||target.hasSkill('pingkou')) return 0; - var hs=player.getCards('h').sort(function(a,b){ - return b.number-a.number; - }); - var ts=target.getCards('h').sort(function(a,b){ - return b.number-a.number; - }); - if(!hs.length||!ts.length) return 0; - if(hs[0].number>ts[0].number) return -1; - return 0; - }, - }, - }, - }, - yizheng2:{ - mark:true, - intro:{content:'跳过下回合的摸牌阶段'}, - }, - rw_zhuge_skill:{ - equipSkill:true, - audio:true, - firstDo:true, - trigger:{player:'useCard1'}, - forced:true, - filter:function(event,player){ - return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase'; - }, - content:function(){ - trigger.audioed=true; - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return Infinity; - } - } - }, - }, - xinqingjian:{ - audio:'qingjian', - trigger:{player:'gainEnd'}, - direct:true, - usable:1, - filter:function(event,player){ - return event.getParent('phaseDraw').player!=player&&player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseCard(get.prompt2('xinqingjian'),'he',[1,player.countCards('he')]).ai=function(){return -1}; - 'step 1' - if(result.bool){ - player.logSkill('xinqingjian'); - player.addSkill('xinqingjian2'); - player.storage.xinqingjian2.addArray(result.cards); - game.log(player,'将'+get.cnNumber(player.lose(result.cards,ui.special,'toStorage').cards.length)+'张牌置于其武将牌上'); - player.markSkill('xinqingjian2'); - } - else player.storage.counttrigger.xinqingjian--; - }, - }, - xinqingjian2:{ - audio:'xinqingjian', - charlotte:true, - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.xinqingjian2&&player.storage.xinqingjian2.length>0; - }, - init:function(player){ - if(!player.storage.xinqingjian2) player.storage.xinqingjian2=[]; - }, - content:function(){ - 'step 0' - player.chooseTarget(true,lib.filter.notMe).set('createDialog',['清俭:选择一名角色获得这些牌'+(player.storage.xinqingjian2.length>1?',然后摸一张牌':''),player.storage.xinqingjian2]); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'thunder'); - if(target.gain(player.storage.xinqingjian2,player,'giveAuto','fromStorage').cards.length>1) player.draw(); - player.storage.xinqingjian2.length=0; - player.removeSkill('xinqingjian2'); - } - }, - intro:{ - onunmark:'throw',mark:function(dialog,content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - dialog.addAuto(content); - } - else{ - return '共有'+get.cnNumber(content.length)+'张牌'; - } - } - }, - content:function(content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - return get.translation(content); - } - return '共有'+get.cnNumber(content.length)+'张牌'; - } - } - }, - }, - zhongzuo:{ - audio:2, - trigger:{global:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.getHistory('damage').length>0||player.getHistory('sourceDamage').length>0; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhongzuo'),'令一名角色摸两张牌。若其已受伤,则你摸一张牌。').set('ai',function(target){ - if(target.hasSkillTag('nogain')&&target!=_status.currentPhase) return target.isDamaged()?0:1; - var att=get.attitude(_status.event.player,target); - if(target.isDamaged()) att=att*1.2; - return att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('zhongzuo',target); - target.draw(2); - if(target.isDamaged()) player.draw(); - } - }, - }, - wanlan:{ - audio:2, - trigger:{global:'dying'}, - check:function(event,player){ - if(get.attitude(player,event.player)<4) return false; - if(player.countCards('h',function(card){ - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardSavable',player); - if(mod!='unchanged') return mod; - var savable=get.info(card).savable; - if(typeof savable=='function') savable=savable(card,player,event.player); - return savable; - })>=1-event.player.hp) return false; - if(event.player==player||event.player==get.zhu(player)) return true; - if(_status.currentPhase&&get.damageEffect(_status.currentPhase,player,player)<0) return false; - return !player.hasUnknown(); - }, - limited:true, - unique:true, - filter:function(event,player){ - return event.player.hp<=0; - }, - skillAnimation:true, - animationColor:'thunder', - logTarget:'player', - content:function(){ - 'step 0' - player.awakenSkill('wanlan'); - var hs=player.getCards('h') - if(hs.length) player.discard(hs); - 'step 1' - var num=1-trigger.player.hp; - if(num) trigger.player.recover(num); - 'step 2' - if(_status.currentPhase&&_status.currentPhase.isAlive()){ - var next=_status.currentPhase.damage(); - event.next.remove(next); - trigger.after.push(next); - } - }, - }, - zhiyi:{ - audio:2, - trigger:{player:['useCard','respond']}, - forced:true, - filter:function(event,player){ - if(get.type(event.card)!='basic') return false; - var history=player.getHistory('useCard',function(evt){ - return get.type(evt.card)=='basic'; - }).concat(player.getHistory('respond',function(evt){ - return get.type(evt.card)=='basic'; - })); - return history.length==1&&history[0]==event; - }, - content:function(){ - 'step 0' - var info=get.info(trigger.card); - if(!info||!info.enable) event._result={index:0}; - else{ - var evt=trigger; - if(evt.respondTo&&evt.getParent('useCard').name=='useCard') evt=evt.getParent('useCard'); - event.evt=evt; - player.chooseControl().set('prompt','执义:请选择一项').set('choiceList',[ - '摸一张牌', - '于'+get.translation(evt.card)+'的使用结算结束之后视为使用一张'+get.translation({name:trigger.card.name,nature:trigger.card.nature,isCard:true}), - ]).set('ai',function(){return _status.event.choice}).set('choice',function(){ - var card={name:trigger.card.name,nature:trigger.card.nature,isCard:true}; - if(card.name=='sha'){ - if(player.getUseValue(card)>0) return 1; - } - else if(card.name=='tao'){ - var hp=player.maxHp-player.hp; - if(trigger.targets.contains(player)) hp--; - return hp>0?1:0; - } - return 0; - }()); - } - 'step 1' - if(result.index==0){ - player.draw(); - } - else{ - var next=player.chooseUseTarget({name:trigger.card.name,nature:trigger.card.nature,isCard:true},false,true); - _status.event.next.remove(next); - event.evt.after.push(next); - next.logSkill='zhiyi'; - } - }, - }, - //表演测试 - qiaosi_map:{charlotte:true}, - qiaosi:{ - audio:'xinfu_qiaosi', - derivation:'qiaosi_map', - enable:'phaseUse', - usable:1, - content:function(){ - "step 0" - event.videoId=lib.status.videoId++; - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var switchToAuto=function(){ - game.pause(); - game.countChoose(); - setTimeout(function(){ - _status.imchoosing=false; - event._result={ - bool:true, - links:['qiaosi_c1','qiaosi_c6'].concat(['qiaosi_c2','qiaosi_c3','qiaosi_c4','qiaosi_c5'].randomGets(1)), - }; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - game.resume(); - },5000); - }; - var createDialog=function(player,id){ - if(player==game.me) return; - var str=get.translation(player)+'正在表演...
'; - for(var i=1;i<7;i++){ - str+=get.translation('qiaosi_c'+i); - if(i%3!=0) str+='  '; - if(i==3) str+='
'; - } - ui.create.dialog(str,'forcebutton').videoId=id; - }; - var chooseButton=function(player){ - var event=_status.event; - player=player||event.player; - event.status={ - qiaosi_c1:0, - qiaosi_c2:0, - qiaosi_c3:0, - qiaosi_c4:0, - qiaosi_c5:0, - qiaosi_c6:0, - } - event.map={ - qiaosi_c1:[10,15], - qiaosi_c2:[20,35], - qiaosi_c3:[40,60], - qiaosi_c4:[40,60], - qiaosi_c5:[20,35], - qiaosi_c6:[10,15], - } - event.finishedx=[]; - event.str='请开始你的表演
qiaosi_c1% qiaosi_c2% qiaosi_c3%
qiaosi_c4%qiaosi_c5% qiaosi_c6%'; - event.dialog=ui.create.dialog(event.str,'forcebutton','hidden'); - event.dialog.addText('
  • 点击下方的按钮,可以增加按钮对应的角色的「表演完成度」。对于不同的角色,点击时增加的完成度不同,最终获得的牌也不同。一次表演最多只能完成3名角色的进度。',false); - event.dialog.open(); - for(var i in event.status){ - event.dialog.content.childNodes[0].innerHTML=event.dialog.content.childNodes[0].innerHTML.replace(i,event.status[i]); - } - for(var i=0;i=100){ - event.status[link]=100; - var str=event.str.slice(0); - for(var i in event.status){ - str=str.replace(i,event.status[i]); - } - event.dialog.content.childNodes[0].innerHTML=str; - event.finishedx.push(link); - if(event.finishedx.length>=3){ - event._result={ - bool:true, - links:event.finishedx.slice(0), - }; - event.dialog.close(); - event.control.close(); - game.resume(); - _status.imchoosing=false; - } - } - else{ - var str=event.str.slice(0); - for(var i in event.status){ - str=str.replace(i,event.status[i]); - } - event.dialog.content.childNodes[0].innerHTML=str; - } - }); - for(var i=0;i2; - })) return 0; - return 1; - }); - "step 3" - if(result.index==0){ - player.chooseCardTarget({ - position:'he', - filterCard:true, - selectCard:event.num, - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - return 1; - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - return att; - }, - prompt:'选择'+get.cnNumber(event.num)+'张牌,交给一名其他角色。', - forced:true, - }); - } - else{ - player.chooseToDiscard(event.num,true,'he'); - event.finish(); - } - "step 4" - if(result.bool){ - var target=result.targets[0]; - player.give(result.cards,target); - } - }, - ai:{ - order:10, - result:{player:1}, - threaten:3.2, - } - }, - refuhai:{ - audio:'xinfu_fuhai', - enable:'phaseUse', - usable:1, - content:function(){ - 'step 0' - event.current=player.next; - event.upper=[]; - event.lower=[]; - event.acted=[]; - event.num=0; - event.stopped=false; - 'step 1' - event.acted.push(event.current); - event.current.chooseControl('潮起','潮落').set('prompt','潮鸣起乎?潮鸣落乎?').ai=function(){ - return Math.random()<0.5?0:1; - }; - 'step 2' - if(!event.chosen) event.chosen=result.control; - if(event.chosen!=result.control) event.stopped=true; - if(!event.stopped) event.num++; - if(result.control=='潮起'){ - event.upper.push(event.current) - } - else event.lower.push(event.current); - event.current=event.current.next; - if(event.current!=player&&!event.acted.contains(event.current)) event.goto(1); - 'step 3' - for(var i=0;i1) player.draw(num); - }, - ai:{ - order:10, - result:{player:1}, - }, - }, - rebiaozhao:{ - audio:'biaozhao', - intro:{ - content:"cards", - }, - trigger:{ - player:"phaseJieshuBegin", - }, - direct:true, - filter:function (event,player){ - return player.countCards('he')>0&&!player.storage.rebiaozhao; - }, - content:function (){ - 'step 0' - player.chooseCard('he',get.prompt2('rebiaozhao')).ai=function(card){ - return 6-get.value(card); - } - 'step 1' - if(result.bool){ - player.addSkill('rebiaozhao2'); - player.addSkill('rebiaozhao3'); - player.logSkill('rebiaozhao'); - player.$give(result.cards,player,false); - player.lose(result.cards,ui.special,'toStorage','visible'); - player.storage.rebiaozhao=result.cards; - player.markSkill('rebiaozhao'); - } - }, - }, - "rebiaozhao2":{ - trigger:{ - global:["loseEnd","cardsDiscardEnd"], - }, - charlotte:true, - forced:true, - audio:"biaozhao", - filter:function (event,player){ - if(!player.storage.rebiaozhao) return false; - var num=get.number(player.storage.rebiaozhao[0]); - for(var i=0;i0) return 0; - if(player.maxHp-player.countCards('h')>1) return 1; - return Math.random()>0.5?0:1; - }); - 'step 2' - if(result.index==0) source.draw(2); - else{ - player.addTempSkill('reqianxin3') - player.addMark('reqianxin3',2,false) - } - 'step 3' - if(player.storage.reqianxin2.length) event.goto(0); - else player.removeSkill('reqianxin2'); - }, - }, - reqianxin3:{ - onremove:true, - mod:{ - maxHandcard:function(player,num){ - return num-player.countMark('reqianxin3'); - }, - }, - }, - renshi:{ - audio:2, - trigger:{player:'damageBegin4'}, - forced:true, - filter:function(event,player){ - return player.isDamaged()&&event.card&&event.card.name=='sha'; - }, - content:function(){ - 'step 0' - trigger.cancel(); - var cards=trigger.cards.filterInD(); - if(cards.length) player.gain(cards,'gain2','log'); - 'step 1' - player.loseMaxHp(); - }, - ai:{ - filterDamage:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.card&&arg.card.name=='sha') return true; - return false; - }, - }, - }, - wuyuan:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - filterCard:{name:'sha'}, - filterTarget:lib.filter.notMe, - check:function(card){ - var player=_status.event.player; - if(get.color(card)=='red'&&game.hasPlayer(function(current){ - return current!=player&¤t.isDamaged()&&get.attitude(player,current)>2; - })) return 2; - if(get.nature(card)) return 1.5; - return 1; - }, - discard:false, - content:function(){ - 'step 0' - target.gain(cards,player,'giveAuto'); - player.recover(); - 'step 1' - var num=1; - if(get.nature(cards[0])) num++; - target.draw(num); - if(get.color(cards[0])=='red') target.recover(); - }, - ai:{ - order:1, - result:{ - player:function(player,target){ - if(player.isDamaged()) return 1; - return 0; - }, - target:function(player,target){ - if(ui.selected.cards.length){ - var num=1; - if(get.nature(ui.selected.cards[0])) num++; - if(target.hasSkillTag('nogain')) num=0; - if(get.color(ui.selected.cards[0])=='red') return num+2 - else return num+1; - } - return 1; - }, - }, - }, - }, - huaizi:{ - mod:{ - maxHandcardBase:function(player,num){ - return player.maxHp; - }, - }, - //audio:2, - //trigger:{player:'phaseDiscardBegin'}, - forced:true, - firstDo:true, - filter:function(event,player){ - return player.isDamaged()&&player.countCards('h')>player.hp; - }, - content:function(){}, - }, - rexushen:{ - derivation:['new_rewusheng','xindangxian'], - audio:'xinfu_xushen', - limited:true, - enable:'phaseUse', - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.sex=='male'; - }) - }, - skillAnimation:true, - animationColor:'fire', - content:function(){ - player.addSkill('rexushen2'); - player.awakenSkill('rexushen'); - player.loseHp(game.countPlayer(function(current){ - return current.sex=='male'; - })); - }, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.hp!=game.countPlayer(function(current){ - return current.sex=='male'; - })) return 0; - return game.hasPlayer(function(current){ - return get.attitude(player,current)>4&¤t.countCards('h','tao') - })?1:0; - }, - }, - }, - }, - rexushen2:{ - charlotte:true, - subSkill:{ - count:{ - trigger:{ - player:"recoverBegin", - }, - forced:true, - silent:true, - popup:false, - filter:function (event,player){ - if(!event.source) return false; - if(!player.isDying()) return false; - var evt=event.getParent('dying').getParent(2); - return evt.name=='rexushen'&&evt.player==player; - }, - content:function (){ - trigger.rexushen=true; - }, - sub:true, - }, - }, - group:["rexushen2_count"], - trigger:{ - player:"recoverAfter", - }, - filter:function (event,player){ - if(player.isDying()) return false; - return event.rexushen==true; - }, - direct:true, - silent:true, - popup:false, - content:function (){ - 'step 0' - player.removeSkill('rexushen2'); - player.chooseBool('是否令'+get.translation(trigger.source)+'获得技能〖武圣〗和〖当先〗').ai=function(){ - return get.attitude(player,trigger.source)>0; - }; - 'step 1' - if(result.bool){ - player.line(trigger.source,'fire'); - trigger.source.addSkillLog('new_rewusheng'); - trigger.source.addSkillLog('xindangxian'); - trigger.source.storage.xinfuli=true; - } - }, - }, - rezhennan:{ - audio:'xinfu_zhennan', - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - return event.player!=player&&event.targets&&event.targets.length&&event.targets.length>event.player.hp; - }, - direct:true, - content:function(){ - 'step 0' - var next=player.chooseToDiscard(get.prompt('rezhennan',trigger.player),'弃置一张牌并对其造成1点伤害','he'); - next.set('logSkill',['rezhennan',trigger.player]); - next.set('ai',function(card){ - var player=_status.event.player; - var target=_status.event.getTrigger().player; - if(get.damageEffect(target,player,player)>0) return 7-get.value(card); - return -1; - }); - 'step 1' - if(result.bool) trigger.player.damage(); - }, - }, - meiyong:{ - inherit:'xinfu_wuniang', - audio:'xinfu_wuniang', - content:function (){ - 'step 0' - player.chooseTarget(get.prompt('meiyong'),'获得一名其他角色的一张牌,然后其摸一张牌。',function(card,player,target){ - if(player==target) return false; - return target.countGainableCards(player,'he')>0; - }).set('ai',function(target){ - return 10-get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('meiyong',target); - player.gainPlayerCard(target,'he',true); - } - else event.finish(); - 'step 2' - target.draw(); - }, - }, - relianji:{ - audio:'wylianji', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.players.length>1; - }, - filterTarget:lib.filter.notMe, - targetprompt:['打人','被打'], - selectTarget:2, - multitarget:true, - content:function(){ - 'step 0' - game.delay(0.5); - if(targets[0].isDisabled(1)) event.goto(2); - 'step 1' - var target=targets[0]; - var equip1=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'; - }); - if(!equip1){ - player.popup('连计失败'); - game.log('牌堆中无装备'); - event.finish(); - return; - } - if(equip1.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ - equip1.remove(); - equip1=game.createCard('qibaodao',equip1.suit,equip1.number); - } - target.$draw(equip1); - target.chooseUseTarget(equip1,'noanimate','nopopup',true); - 'step 2' - game.updateRoundNumber(); - var list=['nanman','wanjian','huogong','juedou','sha']; - var list2=game.players.slice(0); - list2.remove(player); - for(var i=0;i2){ - event.trigger('remoucheng_awaken'); - } - }, - }, - }, - }, - remoucheng:{ - derivation:'rejingong', - trigger:{ - player:'remoucheng_awaken' - }, - forced:true, - audio:'moucheng', - juexingji:true, - skillAnimation:true, - animationColor:'thunder', - content:function(){ - player.awakenSkill('remoucheng'); - player.removeSkill('relianji'); - player.addSkill('rejingong'); - player.gainMaxHp(); - player.recover(); - }, - }, - rejingong:{ - audio:'jingong', - enable:'phaseUse', - delay:0, - usable:1, - content:function(){ - 'step 0' - var list=get.inpile('trick').randomGets(2); - if(Math.random()<0.5){ - list.push('wy_meirenji'); - } - else{ - list.push('wy_xiaolicangdao'); - } - for(var i=0;i0; - })){ - if(name=='wy_meirenji'||name=='wy_xiaolicangdao') return Math.random()+0.5; - return Math.random(); - } - return 0; - }); - 'step 1' - if(result.bool){ - player.chooseUseTarget(result.links[0][2],true); - player.addTempSkill('jingong2'); - } - }, - ai:{ - order:2, - result:{ - player:function(player){ - if((player.hp<=2||player.needsToDiscard())&&!player.getStat('damage')) return 0; - return 1; - } - } - } - }, - shouye:{ - audio:2, - group:'shouye_after', - trigger:{target:"useCardToTarget"}, - filter:function(event,player){ - return event.player!=player&&event.targets.length==1; - }, - check:function(event,player){ - if(event.player==game.me||event.player.isOnline()) return get.attitude(player,event.player)<0; - return get.effect(player,event.card,event.player,player)<0; - }, - usable:1, - logTarget:'player', - content:function(){ - 'step 0' - player.line(trigger.player,'green'); - player.chooseToDuiben(trigger.player); - 'step 1' - if(result.bool){ - trigger.targets.remove(player); - trigger.getParent().triggeredTargets2.remove(player); - trigger.getParent().shouyeer=player; - } - }, - subSkill:{ - after:{ - sub:true, - trigger:{global:'useCardAfter'}, - forced:true, - silent:true, - popup:false, - filter:function(event,player){ - if(event.shouyeer!=player) return false; - if(event.cards){ - for(var i=0;i0; - }).ai=function(target){ - var player=_status.event.player; - return get.effect(target,{name:'guohe'},player,player); - }; - 'step 1' - if(result.bool){ - result.targets.sortBySeat(); - event.targets=result.targets; - player.line(result.targets,'green'); - player.logSkill('liezhi',result.targets); - } - else event.finish(); - 'step 2' - event.current=targets.shift(); - player.discardPlayerCard(event.current,'hej',true) - if(targets.length) event.redo(); - }, - subSkill:{ - disable:{ - sub:true, - trigger:{player:'phaseAfter'}, - forced:true, - silent:true, - popup:false, - charlotte:true, - //filter:function(event){return !event.liezhi}, - content:function(){player.removeSkill('liezhi_disable')}, - }, - damage:{ - trigger:{player:'damage'}, - forced:true, - silent:true, - popup:false, - content:function(){player.addSkill('liezhi_disable')} - }, - }, - }, - xinzhanyi:{ - audio:'zhanyi', - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - check:function(card){ - var player=_status.event.player; - if(player.hp<3) return 0; - var type=get.type(card,'trick'); - if(type=='trick'){ - return 6-get.value(card); - } - else if(type=='equip'){ - if(player.hasSha()&&game.hasPlayer(function(current){ - return (player.canUse('sha',current)&& - get.attitude(player,current)<0&& - get.effect(current,{name:'sha'},player,player)>0) - })){ - return 6-get.value(card); - } - } - return 0; - }, - content:function(){ - player.loseHp(); - switch(get.type(cards[0],'trick',cards[0].original=='h'?player:false)){ - case 'basic':player.addTempSkill('xinzhanyi_basic');break; - case 'equip':player.addTempSkill('xinzhanyi_equip');break; - case 'trick':player.addTempSkill('xinzhanyi_trick');player.draw(3);break; - } - }, - ai:{ - order:9.1, - result:{ - player:1 - } - } - }, - xinzhanyi_basic1:{ - trigger:{player:"useCard"}, - filter:function(event,player){ - return event.skill=='xinzhanyi_basic_backup'&&!player.storage.xinzhanyi_basic1; - }, - forced:true, - silent:true, - popup:false, - content:function(){ - if(!trigger.baseDamage) trigger.baseDamage=1; - trigger.baseDamage++; - player.storage.xinzhanyi_basic1=true; - }, - }, - xinzhanyi_basic:{ - group:['xinzhanyi_basic1'], - onremove:function(p,s){ - delete p.storage[s+1]; - }, - enable:"chooseToUse", - filter:function (event,player){ - if(event.filterCard({name:'sha'},player,event)|| - event.filterCard({name:'jiu'},player,event)|| - event.filterCard({name:'tao'},player,event)){ - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - } - return false; - }, - chooseButton:{ - dialog:function (event,player){ - var list=[]; - if(event.filterCard({name:'sha'},player,event)){ - list.push(['基本','','sha']); - list.push(['基本','','sha','fire']); - list.push(['基本','','sha','thunder']); - } - if(event.filterCard({name:'tao'},player,event)){ - list.push(['基本','','tao']); - } - if(event.filterCard({name:'jiu'},player,event)){ - list.push(['基本','','jiu']); - } - return ui.create.dialog('战意',[list,'vcard'],'hidden'); - }, - check:function (button){ - var player=_status.event.player; - var card={name:button.link[2],nature:button.link[3]}; - if(game.hasPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0; - })){ - switch(button.link[2]){ - case 'tao':return 5; - case 'jiu':{ - if(player.countCards('h',{type:'basic'})>=2) return 3; - }; - case 'sha': - if(button.link[3]=='fire') return 2.95; - else if(button.link[3]=='thunder') return 2.92; - else return 2.9; - } - } - return 0; - }, - backup:function (links,player){ - return { - audio:'zhanyi', - filterCard:function(card,player,target){ - return get.type(card)=='basic'; - }, - check:function(card,player,target){ - return 9-get.value(card); - }, - viewAs:{name:links[0][2],nature:links[0][3]}, - position:'he', - popname:true, - } - }, - prompt:function (links,player){ - return '将一张基本牌当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; - }, - }, - ai:{ - order:function (){ - var player=_status.event.player; - var event=_status.event; - if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.countCards('h',{type:'basic'})>=2){ - return 3.3; - } - return 3.1; - }, - save:true, - respondSha:true, - skillTagFilter:function (player,tag,arg){ - if(player.hasCard(function(card){ - return get.type(card)=='basic'; - },'he')){ - if(tag=='respondSha'){ - if(arg!='use') return false; - } - } - else{ - return false; - } - }, - result:{ - player:1, - }, - }, - }, - xinzhanyi_equip:{ - audio:'zhanyi', - trigger:{player:'useCardToPlayered'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.countCards('he')>0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - 'step 0' - trigger.target.chooseToDiscard('he',true,2); - 'step 1' - if(result.bool&&result.cards&&result.cards.length){ - if(result.cards.length==1){ - event._result={bool:true,links:result.cards.slice(0)}; - } - else player.chooseButton(['选择获得其中的一张牌',result.cards.slice(0)],true).ai=function(button){ - return get.value(button.link); - }; - } - else event.finish(); - 'step 2' - if(result.links) player.gain(result.links,'gain2'); - } - }, - xinzhanyi_trick:{ - mod:{ - wuxieRespondable:function(){ - return false; - } - } - }, - "xinfu_daigong":{ - usable:1, - audio:2, - trigger:{ - player:"damageBegin4", - }, - filter:function (event,player){ - return event.source!=undefined&&player.countCards('h')>0; - }, - content:function (){ - 'step 0' - player.showHandcards(); - 'step 1' - var cards=player.getCards('h'); - var suits=[]; - for(var i=0;i0) return 6.5-get.value(card); - return 0; - }; - 'step 2' - if(result.bool){ - trigger.source.give(result.cards,player,true); - } - else trigger.cancel(); - }, - }, - "xinfu_zhaoxin":{ - group:["zhaoxin_give"], - intro:{ - content:"cards", - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - enable:"phaseUse", - usable:1, - audio:2, - init:function (player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - filter:function (event,player){ - return player.storage.xinfu_zhaoxin.length<3&&player.countCards('h')>0; - }, - visible:true, - filterCard:true, - selectCard:function (){ - var player=_status.event.player; - return [1,3-player.storage.xinfu_zhaoxin.length]; - }, - discard:false, - toStorage:true, - //lose:false, - delay:false, - content:function (){ - 'step 0' - //player.lose(cards,ui.special,'toStorage') - player.$give(cards,player,false); - player.storage.xinfu_zhaoxin=player.storage.xinfu_zhaoxin.concat(cards); - player.markSkill('xinfu_zhaoxin'); - 'step 1' - player.draw(cards.length); - }, - check:function (card){ - return 6-get.value(card); - }, - ai:{ - order:1, - result:{ - player:1, - }, - }, - }, - "zhaoxin_give":{ - trigger:{ - global:"phaseDrawAfter", - }, - filter:function (event,player){ - if(!player.storage.xinfu_zhaoxin||!player.storage.xinfu_zhaoxin.length) return false; - return player==event.player||player.inRange(event.player); - }, - direct:true, - content:function (){ - 'step 0' - player.chooseCardButton(get.prompt('xinfu_zhaoxin',trigger.player),player.storage.xinfu_zhaoxin,function(button){ - return true; - }).set('ai',function(button){ - return 1+Math.random(); - }); - 'step 1' - if(result.bool){ - event.card=result.links[0]; - player.logSkill('xinfu_zhaoxin',target); - player.line(trigger.player,'thunder'); - player.showCards(event.card); - } - else event.finish(); - 'step 2' - trigger.player.chooseBool('是否获得'+get.translation(event.card)+'?').ai=function(){ - return get.attitude(trigger.player,player)>0; - }; - 'step 3' - if(result.bool){ - player.storage.xinfu_zhaoxin.remove(event.card); - player.$give(event.card,trigger.player); - trigger.player.gain(event.card,'fromStorage'); - if(player.storage.xinfu_zhaoxin.length) player.markSkill('xinfu_zhaoxin'); - else player.unmarkSkill('xinfu_zhaoxin'); - player.chooseBool('是否对'+get.translation(trigger.player)+'造成一点伤害?').ai=function(){ - return get.damageEffect(trigger.player,player,player)>0 - }; - } - else{ - trigger.player.chat('拒绝'); - event.finish(); - } - 'step 4' - if(result.bool){ - trigger.player.damage('nocard'); - } - }, - }, - "xinfu_qianchong":{ - audio:3, - mod:{ - targetInRange:function (card,player,target){ - if(player.storage.xinfu_qianchong.contains(get.type(card,'trick'))){ - return true; - } - }, - cardUsable:function (card,player,num){ - if(player.storage.xinfu_qianchong.contains(get.type(card,'trick'))) return Infinity; - }, - }, - group:["xinfu_qianchong_clear","qc_weimu","qc_mingzhe"], - subSkill:{ - clear:{ - sub:true, - forced:true, - silent:true, - popup:false, - trigger:{ - player:"phaseAfter", - }, - content:function (){ - player.storage.xinfu_qianchong=[]; - }, - }, - }, - init:function (event,player){ - event.storage[player]=[]; - }, - trigger:{ - player:"phaseUseBegin", - }, - locked:false, - direct:true, - filter:function (event,player){ - var es=player.getCards('e'); - if(!es.length) return true; - var col=get.color(es[0]); - for(var i=0;i1){ - player.chooseControl(list).set('ai',function(){ - return list[0]; - } - ).set('prompt',get.prompt('xinfu_qianchong')).set('prompt2',get.translation('xinfu_qianchong_info')); - } - else event.finish(); - 'step 1' - if(result.control&&result.control!='cancel2'){ - player.logSkill('xinfu_qianchong'); - player.storage.xinfu_qianchong.add(result.control); - var str=get.translation(result.control)+'牌'; - game.log(player,'声明了','#y'+str); - player.popup(str,'thunder'); - } - }, - }, - "qc_weimu":{ - audio:"xinfu_qianchong", - mod:{ - targetEnabled:function (card,player,target){ - var bool=true; - var es=target.getCards('e'); - if(!es.length) bool=false; - for(var i=0;i0&&num<=player.hp - }, - frequent:true, - content:function (){ - 'step 0' - var num=0; - player.getHistory('lose',function(evt){ - if(evt.cards2) num+=evt.cards2.length; - }); - if(num>0){ - player.draw(num); - } - }, - }, - "rw_bagua_skill":{ - inherit:"bagua_skill", - audio:"bagua_skill", - content:function (){ - "step 0" - player.judge('rewrite_bagua',function(card){return (get.suit(card)!='spade')?1.5:-0.5}); - "step 1" - if(result.judge>0){ - trigger.untrigger(); - trigger.set('responded',true); - trigger.result={bool:true,card:{name:'shan'}} - } - }, - }, - "rw_baiyin_skill":{ - inherit:"baiyin_skill", - audio:"baiyin_skill", - }, - "rw_lanyinjia":{ - inherit:"lanyinjia", - audio:"lanyinjia", - }, - "rw_minguangkai_cancel":{ - inherit:"minguangkai_cancel", - }, - "rw_minguangkai_link":{ - inherit:"minguangkai_link", - trigger:{ - player:"linkBefore", - }, - forced:true, - priority:20, - filter:function (event,player){ - return !player.isLinked(); - }, - content:function (){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function (card,player,target,current){ - if(['tiesuo','lulitongxin'].contains(card.name)){ - return 'zerotarget'; - } - }, - }, - }, - }, - "rw_renwang_skill":{ - inherit:"renwang_skill", - audio:"renwang_skill", - filter:function (event,player){ - if(player.hasSkillTag('unequip2')) return false; - if(event.player.hasSkillTag('unequip',false,{ - name:event.card?event.card.name:null, - target:player, - card:event.card - })) return false; - return (event.card.name=='sha'&&(get.suit(event.card)=='heart'||get.color(event.card)=='black')) - }, - ai:{ - effect:{ - target:function (card,player,target){ - if(target.hasSkillTag('unequip2')) return; - if(player.hasSkillTag('unequip',false,{ - name:card?card.name:null, - target:player, - card:card - })||player.hasSkillTag('unequip_ai',false,{ - name:card?card.name:null, - target:player, - card:card - })) return; - if(card.name=='sha'&&['spade','club','heart'].contains(get.suit(card))) return 'zerotarget'; - }, - }, - }, - }, - "rw_tengjia1":{ - inherit:"tengjia1", - audio:"tengjia1", - }, - "rw_tengjia2":{ - inherit:"tengjia2", - audio:"tengjia1", - }, - "rw_tengjia3":{ - audio:"tengjia1", - inherit:"rw_minguangkai_link", - ai:{ - effect:{ - target:function (card,player,target,current){ - if(['tiesuo','lulitongxin'].contains(card.name)){ - return 'zeroplayertarget'; - } - }, - }, - }, - }, - "rw_tengjia4":{ - inherit:"tengjia3", - audio:"tengjia1", - }, - "xinfu_pingcai":{ - "wolong_card":function (){ - 'step 0' - var ingame=game.hasPlayer(function(current){ - return ['sp_zhugeliang','re_sp_zhugeliang'].contains(current.name)||['sp_zhugeliang','re_sp_zhugeliang'].contains(current.name2); - })?true:false; - var prompt='请选择'; - prompt+=ingame?'至多两名':'一名'; - prompt+='角色,对其造成1点火焰伤害'; - var range=ingame?[1,2]:[1,1] - player.chooseTarget(prompt,range).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player,'fire'); - }); - 'step 1' - if(result.bool&&result.targets.length){ - player.line(result.targets,'fire'); - for(var i=0;i1) continue; - if(target.isEmpty(get.subtype(es[i]))) return true; - } - return false; - } - else{ - if(!event.ingame){ - if(target.getEquip(2)) return true; - return false; - } - return target.countCards('e')>0; - } - }); - next.set('ingame',event.ingame) - next.set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(ui.selected.targets.length==0){ - if(att<0){ - if(game.hasPlayer(function(current){ - if(get.attitude(player,current)>0){ - var es=target.getCards('e'); - for(var i=0;i1) continue; - else if(current.isEmpty(get.subtype(es[i]))) return true; - } - return false; - } - })) return -att; - } - return 0; - } - if(att>0){ - var es=ui.selected.targets[0].getCards('e'); - var i; - for(i=0;i1) continue; - if(target.isEmpty(get.subtype(es[i]))) break; - } - if(i==es.length) return 0; - } - return -att*get.attitude(player,ui.selected.targets[0]); - }); - next.set('multitarget',true); - next.set('targetprompt',['被移走','移动目标']); - next.set('prompt',prompt); - 'step 1' - if(result.bool){ - player.line2(result.targets,'green'); - event.targets=result.targets; - } - else event.finish(); - 'step 2' - game.delay(); - 'step 3' - if(targets.length==2){ - if(!event.ingame){ - event._result={ - bool:true, - links:[targets[0].getEquip(2)], - }; - } - else{ - player.choosePlayerCard('e',true,function(button){ - return get.equipValue(button.link); - },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ - var targets1=_status.event.targets1; - if(['equip3','equip4'].contains(get.subtype(button.link))&&targets1.getEquip('liulongcanjia')) return false; - if(button.link.name=='liulongcanjia'&&targets1.countCards('e',{subtype:['equip3','equip4']})>1) return false; - return !targets1.countCards('e',{subtype:get.subtype(button.link)}); - - }); - } - } - else event.finish(); - 'step 4' - if(result.bool&&result.links.length){ - var link=result.links[0]; - if(get.position(link)=='e') event.targets[1].equip(link); - else if(link.viewAs) event.targets[1].addJudge({name:link.viewAs},[link]); - else event.targets[1].addJudge(link); - event.targets[0].$give(link,event.targets[1],false) - game.delay(); - } - }, - audio:true, - enable:"phaseUse", - usable:1, - content:function (){ - "step 0" - var list=["wolong","fengchu","xuanjian","shuijing"]; - var list2=[]; - for(var i=0;i1; - })) return 1+Math.random(); - else return 1; - } - else if(button.link.name=='wolong_card'){ - if(game.hasPlayer(function(current){ - return get.damageEffect(current,player,player,'fire')>0; - })) return 1.2+Math.random(); - else return 0.5; - } - else return 0.6; - }); - "step 1" - var delay=8400-(get.utc()-event.time); - if(delay>0){ - event.delay2=true; - event.dialog=ui.create.dialog(get.translation(player)+'正在擦拭宝物...'+(_status.connectMode?'':'
    (点击屏幕可跳过等待)')); - event.videoId=lib.status.videoId++; - game.broadcast('createDialog',event.videoId,get.translation(player)+'正在擦拭宝物...'); - game.pause(); - event.pingcai_delayed=true; - setTimeout(function(){ - if(event.pingcai_delayed==true){ - delete event.pingcai_delayed; - game.resume(); - } - },delay); - if(!_status.connectMode){ - event.forceMine=true; - event.custom.replace.window=function(){ - if(event.pingcai_delayed==true){ - delete event.forceMine; - delete event.pingcai_delayed; - game.resume(); - } - } - } - } - event.card=result.links[0]; - "step 2" - if(event.delay2){ - delete event.custom.replace.window; - event.dialog.close(); - game.addVideo('cardDialog',null,event.videoId); - game.broadcast('closeDialog',event.videoId); - } - player.logSkill('pcaudio_'+event.card.name); - player.$throw(event.card); - event.insert(lib.skill.xinfu_pingcai[event.card.name],{ - player:player, - }); - }, - ai:{ - order:7, - result:{ - player:1, - }, - }, - }, - "xinfu_pdgyingshi":{ - mod:{ - targetEnabled:function (card,player,target){ - if(get.type(card)=='delay'){ - return false; - } - }, - }, - trigger:{ - player:['phaseZhunbeiBefore','phaseJieshuBefore'], - }, - forced:true, - audio:2, - group:'xinfu_pdgyingshi2', - priority:15, - content:function(){ - trigger.cancel(); - game.log(player,'跳过了',event.triggername=='phaseZhunbeiBefore'?'准备阶段':'结束阶段'); - }, - }, - xinfu_pdgyingshi2:{ - popup:false, - trigger:{ - player:"phaseJudgeBefore", - }, - forced:true, - priority:15, - content:function (){ - trigger.cancel(); - game.log(player,'跳过了判定阶段'); - }, - }, - "pcaudio_wolong_card":{ - audio:true, - }, - "pcaudio_fengchu_card":{ - audio:true, - }, - "pcaudio_shuijing_card":{ - audio:true, - }, - "pcaudio_xuanjian_card":{ - audio:true, - }, - "yizan_respond_sha":{ - audio:2, - enable:["chooseToRespond"], - filterCard:function (card,player,target){ - if(player.storage.yizan) return get.type(card)=='basic'; - else if(ui.selected.cards.length){ - if(get.type(ui.selected.cards[0])=='basic') return true; - return get.type(card)=='basic'; - } - return true; - }, - selectCard:function (){ - var player=_status.event.player; - if(player.storage.yizan) return 1; - return 2; - }, - position:"he", - viewAs:{ - name:"sha", - }, - complexCard:true, - viewAsFilter:function (player){ - if(!player.storage.yizan){ - if(player.countCards('h')<2) return false; - } - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - }, - prompt:function (){ - var player=_status.event.player; - var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; - return '将'+str+'当做杀打出'; - }, - check:function (card){ - if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; - return 5-get.value(card); - }, - ai:{ - skillTagFilter:function (player){ - if(!player.storage.yizan){ - if(player.countCards('he')<2) return false; - } - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - }, - respondSha:true, - }, - }, - "yizan_use":{ - init:function (player){ - if(!player.storage.yizan_use) player.storage.yizan_use=0; - if(!player.storage.yizan) player.storage.yizan=false; - }, - mark:true, - intro:{ - content:"已发动过#次", - }, - group:["yizan_respond_sha","yizan_respond_shan","yizan_count"], - enable:"chooseToUse", - filter:function (event,player){ - if(!player.storage.yizan&&player.countCards('he')<2) return false; - if(event.filterCard({name:'sha'},player,event)|| - event.filterCard({name:'jiu'},player,event)|| - event.filterCard({name:'tao'},player,event)){ - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - } - return false; - }, - chooseButton:{ - dialog:function (event,player){ - var list=[]; - if(event.filterCard({name:'sha'},player,event)){ - list.push(['基本','','sha']); - list.push(['基本','','sha','fire']); - list.push(['基本','','sha','thunder']); - } - if(event.filterCard({name:'tao'},player,event)){ - list.push(['基本','','tao']); - } - if(event.filterCard({name:'jiu'},player,event)){ - list.push(['基本','','jiu']); - } - return ui.create.dialog('翊赞',[list,'vcard'],'hidden'); - }, - check:function (button){ - var player=_status.event.player; - var card={name:button.link[2],nature:button.link[3]}; - if(game.hasPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0; - })){ - switch(button.link[2]){ - case 'tao':return 5; - case 'jiu':{ - if(player.storage.yizan&&player.countCards('h',{type:'basic'})>2) return 3; - }; - case 'sha': - if(button.link[3]=='fire') return 2.95; - else if(button.link[3]=='thunder') return 2.92; - else return 2.9; - } - } - return 0; - }, - backup:function (links,player){ - return { - filterCard:function(card,player,target){ - if(player.storage.yizan) return get.type(card)=='basic'; - else if(ui.selected.cards.length){ - if(get.type(ui.selected.cards[0])=='basic') return true; - return get.type(card)=='basic'; - } - return true; - }, - complexCard:true, - selectCard:function(){ - var player=_status.event.player; - if(player.storage.yizan) return 1; - return 2; - }, - check:function(card,player,target){ - if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; - else return 6-get.value(card); - }, - viewAs:{name:links[0][2],nature:links[0][3]}, - position:'he', - popname:true, - precontent:function(){ - player.logSkill('yizan_respond_shan'); - }, - } - }, - prompt:function (links,player){ - var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; - return '将'+str+'当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; - }, - }, - ai:{ - order:function (){ - var player=_status.event.player; - var event=_status.event; - if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.storage.yizan&&player.countCards('h',{type:'basic'})>2){ - return 3.3; - } - return 3.1; - }, - save:true, - respondSha:true, - skillTagFilter:function (player,tag,arg){ - if(!player.storage.yizan&&player.countCards('he')<2) return false; - if(player.hasCard(function(card){ - return get.type(card)=='basic'; - },'he')){ - if(tag=='respondSha'){ - if(arg!='use') return false; - } - } - else{ - return false; - } - }, - result:{ - player:1, - }, - }, - }, - "yizan_respond_shan":{ - complexCard:true, - audio:2, - enable:["chooseToUse","chooseToRespond"], - filterCard:function (card,player,target){ - if(player.storage.yizan) return get.type(card)=='basic'; - else if(ui.selected.cards.length){ - if(get.type(ui.selected.cards[0])=='basic') return true; - return get.type(card)=='basic'; - } - return true; - }, - selectCard:function (){ - var player=_status.event.player; - if(player.storage.yizan) return 1; - return 2; - }, - position:"he", - viewAs:{ - name:"shan", - }, - viewAsFilter:function (player){ - if(!player.storage.yizan){ - if(player.countCards('he')<2) return false; - } - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - }, - prompt:function (){ - var player=_status.event.player; - var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; - return '将'+str+'当做闪使用或打出'; - }, - check:function (card){ - if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; - return 5-get.value(card); - }, - ai:{ - respondShan:true, - skillTagFilter:function (player){ - if(!player.storage.yizan){ - if(player.countCards('he')<2) return false; - } - return player.hasCard(function(card){ - return get.type(card)=='basic'; - },'h'); - }, - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.6 - }, - }, - basic:{ - useful:[7,2], - value:[7,2], - }, - }, - }, - "xinfu_longyuan":{ - audio:2, - forced:true, - unique:true, - juexingji:true, - trigger:{ - player:["useCardAfter","respondAfter"], - }, - init:function (player){ - player.storage.xinfu_longyuan=false; - }, - delay:1.2, - skillAnimation:true, - animationColor:'orange', - filter:function (event,player){ - if(player.storage.xinfu_longyuan) return false; - return player.storage.yizan_use>2; - }, - content:function (){ - player.awakenSkill('xinfu_longyuan'); - player.storage.yizan=true; - game.delay(1); - }, - }, - "yizan_count":{ - forced:true, - silent:true, - popup:false, - trigger:{ - player:["respond","useCard1"], - }, - filter:function (event,player){ - if(event.skill!='yizan_respond_sha'&&event.skill!='yizan_respond_shan'&&event.skill!='yizan_use_backup') return false; - return player.storage.yizan_use!=undefined; - }, - content:function (){ - player.storage.yizan_use++; - player.markSkill('yizan_use'); - }, - }, - xinfu_jingxie:{audio:2}, - "xinfu_jingxie1":{ - group:["xinfu_jingxie2"], - position:"he", - audio:'xinfu_jingxie', - enable:"phaseUse", - filter:function(event,player){ - var he=player.getCards('he'); - for(var i=0;i0; - } - return false; - }, - check:function(){ - return 1; - }, - position:"he", - discard:false, - loseTo:'discardPile', - prepare:function(cards,player){ - player.$throw(cards,1000); - game.log(player,'将',cards,'置入了弃牌堆') - }, - content:function (){ - 'step 0' - player.draw(); - 'step 1' - var num=1-player.hp; - if(num) player.recover(num); - }, - ai:{ - order:0.5, - skillTagFilter:function (player){ - if(player.hp>0) return false; - return player.countCards('he',function(card){ - return get.subtype(card)=='equip2'; - })>0; - }, - save:true, - result:{ - player:function (player){ - return 10; - }, - }, - }, - }, - "xinfu_qiaosi":{ - enable:"phaseUse", - usable:1, - content:function (){ - 'step 0' - if(get.isLuckyStar(player)){ - event.num=6; - player.throwDice(6); - } - else player.throwDice(); - 'step 1' - event.cards=get.cards(event.num); - player.showCards(event.cards); - 'step 2' - player.gain(event.cards,'gain2'); - player.chooseControl().set('choiceList',[ - '将'+get.cnNumber(event.num)+'张牌交给一名其他角色', - '弃置'+get.cnNumber(event.num)+'张牌', - ]).set('ai',function(){ - if(game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>2; - })) return 0; - return 1; - }); - 'step 3' - if(result.index==0){ - player.chooseCardTarget({ - position:'he', - filterCard:true, - selectCard:event.num, - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - return 1; - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - return att; - }, - prompt:'请选择要送人的卡牌', - forced:true, - }); - } - else{ - player.chooseToDiscard(event.num,true,'he'); - event.finish(); - } - 'step 4' - if(result.bool){ - var target=result.targets[0]; - player.give(result.cards,target); - } - }, - ai:{ - order:7.5, - result:{ - player:1, - }, - }, - }, - zhaohuo:{ - audio:2, - trigger:{global:'dying'}, - forced:true, - //priority:12, - filter:function(event,player){ - return event.player!=player&&player.maxHp>1; - }, - content:function(){ - 'step 0' - event.num=player.maxHp-1; - player.loseMaxHp(event.num,true); - 'step 1' - player.draw(event.num); - } - }, - yixiang:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - frequent:true, - filter:function(event,player){ - if(event.player.hp<=player.hp) return false; - //if(event.targets.length>1) return false; - var hs=player.getCards('h'); - var names=['sha','shan','tao','jiu','du']; - for(var i=0;iplayer.maxHp; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('yirang'),function(card,player,target){ - return target.maxHp>player.maxHp; - }).set('ai',function(target){ - return (get.attitude(_status.event.player,target)-2)*target.maxHp; - }); - 'step 1' - if(result.bool){ - var cards=player.getCards('he',function(card){ - return get.type(card)!='basic'; - }); - var target=result.targets[0]; - var types=[]; - for(var i=0;i0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - 'step 1' - if(result.bool){ - player.logSkill('shejian',result.targets); - player.discardPlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); - } - }, - }, - shixin:{ - audio:2, - trigger:{player:'damageBegin4'}, - filter:function(event){ - return event.nature=='fire'; - }, - forced:true, - content:function(){ - trigger.cancel(); - }, - ai:{ - nofire:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'fireDamage')) return 'zerotarget'; - } - } - } - }, - fenyin:{ - locked:false, - mod:{ - aiOrder:function(player,card,num){ - if(typeof card=='object'&&player==_status.currentPhase){ - var evt=player.getLastUsed(); - if(evt&&evt.card&&get.color(evt.card)!='none'&&get.color(card)!='none'&&get.color(evt.card)!=get.color(card)){ - return num+10; - } - } - }, - }, - audio:2, - trigger:{player:'useCard'}, - frequent:true, - //usable:3, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - var evt=player.getLastUsed(1); - if(!evt) return false; - var color1=get.color(evt.card); - var color2=get.color(event.card); - return color1&&color2&&color1!='none'&&color2!='none'&&color1!=color2; - }, - content:function(){ - player.draw(); - }, - ai:{ - threaten:3, - }, - }, - dujin:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - frequent:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num+=1+Math.floor(player.countCards('e')/2); - } - }, - yingjian:{ - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - audio:'qingyi', - content:function(){ - player.chooseUseTarget('###是否发动【影箭】?###视为使用一张没有距离限制的【杀】',{name:'sha'},false,'nodistance').logSkill='yingjian'; - }, - ai:{ - threaten:function(player,target){ - return 1.6; - } - } - }, - tunchu:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - check:function(event,player){ - return player.countCards('h')-player.countCards('h',{type:'equip'})<=player.hp; - }, - filter:function(event,player){ - if(event.numFixed||player.storage.tunchu&&player.storage.tunchu.length) return false; - return true; - }, - content:function(){ - trigger.num+=2; - player.addTempSkill('tunchu_choose','phaseDrawAfter'); - }, - init:function(player){ - if(!player.storage.tunchu) player.storage.tunchu=[]; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - group:'tunchu_disable', - subSkill:{ - choose:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - content:function(){ - 'step 0' - player.removeSkill('tunchu_choose'); - var nh=player.countCards('h'); - if(nh){ - player.chooseCard('h',[1,nh],'将任意张手牌置于你的武将牌上').set('ai',function(card){ - var player=_status.event.player; - var count=game.countPlayer(function(current){ - return get.attitude(player,current)>2&¤t.hp-current.countCards('h')>1; - }); - if(ui.selected.cards.length>=count) return -get.value(card); - return 5-get.value(card); - }); - } - else{ - event.finish(); - } - 'step 1' - if(result.bool){ - player.lose(result.cards,ui.special,'toStorage'); - player.storage.tunchu.addArray(result.cards); - player.markSkill('tunchu'); - player.syncStorage('tunchu'); - } - } - }, - disable:{ - mod:{ - cardEnabled:function(card,player){ - if(player.storage.tunchu&&player.storage.tunchu.length&&card.name=='sha'){ - return false; - } - }, - cardUsable:function(card,player){ - if(player.storage.tunchu&&player.storage.tunchu.length&&card.name=='sha'){ - return false; - } - }, - } - } - } - }, - shuliang:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.tunchu&&player.storage.tunchu.length>0&&event.player.countCards('h')0); - player.chooseCardButton(get.prompt('shuliang',trigger.player),player.storage.tunchu).set('ai',function(){ - if(_status.event.goon) return 1; - return 0; - }).set('goon',goon); - 'step 1' - if(result.bool){ - player.logSkill('shuliang',trigger.player); - player.storage.tunchu.remove(result.links[0]); - player.$throw(result.links); - game.cardsDiscard(result.links); - player.syncStorage('tunchu'); - if(player.storage.tunchu.length==0){ - player.unmarkSkill('tunchu'); - } - trigger.player.draw(2); - } - } - }, - choulve:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('he'); - }) - }, - content:function(){ - 'step 0' - var str='令一名其他角色交给你一张牌'; - var history=player.getAllHistory('damage',function(evt){ - return evt.card&&evt.card.name&&lib.card[evt.card.name]; - }) - if(history.length) event.cardname=history[history.length-1].card.name; - if(event.cardname){ - str+='若其如此做,视为你使用【'+get.translation(event.cardname)+'】'; - } - var goon=true; - if(event.cardname){ - goon=game.hasPlayer(function(current){ - return player.canUse(event.cardname,current)&&get.effect(current,{name:event.cardname},player,player)>0; - }); - } - player.chooseTarget(get.prompt('choulve'),str,function(card,player,target){ - return target!=player&&target.countCards('he'); - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - var player=_status.event.player; - if(get.attitude(player,target)>=0&&get.attitude(target,player)>=0){ - return Math.sqrt(target.countCards('he')); - } - return 0; - }).set('goon',goon); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('choulve',target); - target.chooseCard('he','是否交给'+get.translation(player)+'一张牌?', - event.cardname?('若如此做,视为'+get.translation(player)+ - '使用【'+get.translation(event.cardname)+'】'):null).set('ai',function(card){ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('goon',get.attitude(target,player)>1); - event.target=target; - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - event.target.give(result.cards,player); - if(event.cardname){ - player.chooseUseTarget(event.cardname,true,false); - } - } - }, - }, - polu:{ - audio:2, - trigger:{player:['phaseZhunbeiBegin','damageEnd']}, - forced:true, - filter:function(event,player){ - return !player.getEquip('ly_piliche'); - }, - content:function(){ - if(trigger.name=='phaseZhunbei'){ - player.useCard(game.createCard('ly_piliche','diamond',1),player); - } - else{ - player.draw(trigger.num); - } - } - }, - ly_piliche:{ - trigger:{source:'damageSource'}, - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - filter:function(event,player){ - if(event.card&&get.type(event.card)=='delay') return false; - return event.player.isIn()&&(event.player.getEquip(2)||event.player.getEquip(3)); - }, - logTarget:'player', - content:function(){ - var equip2=trigger.player.getEquip(2); - var equip3=trigger.player.getEquip(3); - var cards=[]; - if(equip2) cards.push(equip2); - if(equip3) cards.push(equip3); - if(cards.length){ - trigger.player.discard(cards); - } - } - }, - xinzhilve:{ - enable:'phaseUse', - audio:'zhilve', - usable:1, - chooseButton:{ - dialog:function(event,player){ - var list=[ - '移动场上的一张牌', - '摸一张牌并视为使用一张【杀】', - ]; - var choiceList=ui.create.dialog('知略:失去1点体力并...','forcebutton','hidden'); - for(var i=0;i2&&player.hasValueTarget({name:'sha'})) return 1; - return 0; - }, - }, - }, - }, - xinzhilve_move:{ - audio:'zhilve', - filterCard:function(){return false}, - selectCard:-1, - delay:false, - content:function(){ - 'step 0' - event.forceDie=true; - if(!player.canMoveCard(null,event.nojudge)){ - event.finish(); - return; - } - var next=player.chooseTarget(2,function(card,player,target){ - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - var js=from.getCards('j'); - for(var i=0;i0; - } - }); - next.set('nojudge',event.nojudge||false); - next.set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - var sgnatt=get.sgn(att); - if(ui.selected.targets.length==0){ - if(att>0){ - if(!_status.event.nojudge&&target.countCards('j',function(card){ - return game.hasPlayer(function(current){ - return current.canAddJudge(card)&&get.attitude(player,current)<0; - }) - })) return 14; - if(target.countCards('e',function(card){ - return get.value(card,target)<0&&game.hasPlayer(function(current){ - return current!=target&&get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) - }); - })>0) return 9; - } - else if(att<0){ - if(game.hasPlayer(function(current){ - if(current!=target&&get.attitude(player,current)>0){ - var es=target.getCards('e'); - for(var i=0;i0&¤t.isEmpty(get.subtype(es[i]))&&get.value(es[i],current)>0) return true; - } - } - })){ - return -att; - } - } - return 0; - } - var es=ui.selected.targets[0].getCards('e'); - var i; - var att2=get.sgn(get.attitude(player,ui.selected.targets[0])); - for(i=0;i0&&get.attitude(player,targets1)<0){ - if(get.position(button.link)=='j') return 12; - if(get.value(button.link,targets0)<0) return 10; - return 0; - } - else{ - if(get.position(button.link)=='j') return -10; - return get.equipValue(button.link); - } - },targets[0]).set('nojudge',event.nojudge||false).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ - var targets1=_status.event.targets1; - if(get.position(button.link)=='j'){ - if(_status.event.nojudge) return false; - return targets1.canAddJudge(button.link); - } - else{ - return targets1.isEmpty(get.subtype(button.link)); - } - }); - } - else{ - event.finish(); - } - 'step 4' - if(result.bool&&result.links.length){ - player.loseHp(); - } - 'step 5' - if(result.bool&&result.links.length){ - var link=result.links[0]; - if(get.position(link)=='e'){ - event.targets[1].equip(link); - } - else if(link.viewAs){ - event.targets[1].addJudge({name:link.viewAs},[link]); - } - else{ - event.targets[1].addJudge(link); - } - event.targets[0].$give(link,event.targets[1]) - event.result.card=link; - event.result.position=get.position(link); - game.delay(); - player.addTempSkill('xinzhilve_mark'); - player.addMark('xinzhilve_mark',1,false); - } - }, - }, - xinzhilve_use:{ - audio:'zhilve', - filterCard:function(){return false}, - selectCard:-1, - filterTarget:function(card,player,target){ - return player.canUse({name:'sha',isCard:true},target,false); - }, - content:function(){ - player.loseHp(); - player.draw(); - player.useCard({name:'sha',isCard:true},false,target).forceDie=true; - player.addTempSkill('xinzhilve_mark'); - player.addMark('xinzhilve_mark',1,false); - }, - ai:{ - result:{ - target:function(player,target){ - return get.effect(target,{name:'sha'},player,target); - }, - }, - }, - }, - xinzhilve_mark:{ - intro:{content:'本回合手牌上限+#'}, - onunmark:true, - charlotte:true, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('xinzhilve_mark'); - }, - }, - }, - xinxhzhiyan:{ - audio:'xhzhiyan', - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h')!=player.maxHp&&!player.hasSkill('xinxhzhiyan_'+(player.countCards('h')>player.maxHp)); - }, - filterCard:true, - selectCard:function(){ - var player=_status.event.player; - var num=Math.max(0,player.countCards('h')-player.maxHp); - return [num,num]; - }, - filterTarget:lib.filter.notMe, - selectTarget:function(){ - if(ui.selected.cards.length) return [1,1]; - return [0,0]; - }, - check:function(card){ - var player=_status.event.player; - if(player.getUseValue(card)<=0&&game.hasPlayer(function(current){ - return current!=player&&get.value(card,current)*get.attitude(player,current)>0; - })) return 1; - return 0; - }, - delay:false, - discard:false, - lose:false, - content:function(){ - var bool=(player.countCards('h')>player.maxHp); - player.addTempSkill('xinxhzhiyan_'+bool,'phaseUseEnd'); - if(!bool){ - player.draw(player.maxHp-player.countCards('h')); - } - else{ - target.gain(cards,player,'giveAuto'); - } - }, - ai:{ - order:function(obj,player){ - if(player.countCards('h')>player.maxHp) return 10; - return 0.5; - }, - result:{ - player:function(player,target){ - if(player.countCards('h')player.maxHp) return 1; - return 0; - }, - }, - }, - }, - xinxhzhiyan_true:{}, - xinxhzhiyan_false:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target&&(!get.info(card)||!get.info(card).singleCard||!ui.selected.targets.length)) return false; - }, - }, - mark:true, - intro:{ - content:'不能对其他角色使用牌', - }, - }, - weifeng:{ - audio:2, - trigger:{player:'useCardAfter'}, - forced:true, - filter:function(event,player){ - if(!event.targets||!event.targets.filter(function(target){ - return target!=player&&!target.storage.weifeng2; - }).length) return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=player) return false; - if(!get.tag(event.card,'damage')) return false; - if(!['basic','trick'].contains(get.type(event.card))) return false; - return player.getHistory('useCard',function(ev){ - return ev.getParent('phaseUse')==evt&&get.tag(ev.card,'damage')&&['basic','trick'].contains(get.type(ev.card)); - }).indexOf(event)==0&&game.hasPlayer(function(current){ - return current!=player&&!current.storage.weifeng2&&event.targets.contains(current); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(true,'威风:请选择一个目标,令其获得一个【惧('+get.translation(trigger.card.name)+')】标记',function(card,player,target){ - return player!=target&&!target.storage.weifeng2&&_status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - target.storage.weifeng2=trigger.card.name; - player.line(target,'green'); - game.log(target,'获得了一个','#g【惧('+get.translation(trigger.card.name)+')】','标记') - target.markSkill('weifeng2'); - player.addSkill('weifeng3'); - } - }, - }, - weifeng2:{ - intro:{ - content:'当前“惧”标记名称:$', - onunmark:function(storage,player){ - if(player.storage.weifeng2){ - game.log(player,'移去了一个','#g【惧('+get.translation(player.storage.weifeng2)+')】','标记') - delete player.storage.weifeng2; - } - }, - }, - marktext:'惧', - }, - weifeng3:{ - trigger:{ - global:'damageBegin3', - player:['phaseZhunbeiBegin','dieBegin'], - }, - forced:true, - popup:false, - filter:function(event,player){ - if(event.name!='damage') return true; - return event.player!=player&&typeof event.player.storage.weifeng2=='string'; - }, - content:function(){ - if(trigger.name=='damage'){ - player.logSkill('weifeng',trigger.player); - if(trigger.card&&trigger.card.name==trigger.player.storage.weifeng2) trigger.num++; - else if(trigger.player.countGainableCards(player,'he')>0) player.gainPlayerCard(trigger.player,'he',true); - trigger.player.unmarkSkill('weifeng2'); - } - else{ - game.countPlayer(function(current){ - if(current.storage.weifeng2) current.unmarkSkill('weifeng2'); - }); - player.removeSkill('weifeng3'); - } - }, - }, - gnjinfan:{ - trigger:{player:'phaseDiscardBegin'}, - direct:true, - audio:2, - filter:function(event,player){ - var list=[]; - player.getStorage('gnjinfan').filter(function(card){ - list.add(get.suit(card)); - }); - if(list.length>=lib.suit.length) return false; - return player.countCards('h',function(card){ - return _status.connectMode||!list.contains(get.suit(card)); - })>0; - }, - content:function(){ - 'step 0' - player.chooseCard('h',get.prompt('gnjinfan'),'将任意张手牌当做“铃”置于武将牌上',[1,function(){ - var list=[]; - var list2=[]; - player.getStorage('gnjinfan').filter(function(card){ - list.add(get.suit(card)); - }); - player.getCards('h',function(card){ - list2.add(get.suit(card)); - }); - list2.removeArray(list); - return list2.length; - }()],function(card,player){ - var list=player.getStorage('gnjinfan').concat(ui.selected.cards); - return list.filter(function(cardx){ - return get.suit(card)==get.suit(cardx); - }).length==0; - }).set('ai',function(card){ - var player=_status.event.player; - if(player.hasUseTarget(card)&&!player.hasValueTarget(card)) return 0; - return 1+Math.random(); - }).set('complexCard',true); - 'step 1' - if(result.bool){ - player.logSkill('gnjinfan'); - player.markAuto('gnjinfan',result.cards); - player.lose(result.cards,'toStorage',ui.special,'visible'); - game.log(player,'将',result.cards,'放到了武将牌上'); - } - }, - group:['gnjinfan3','gnjinfan4','gnjinfan6','gnjinfan7'], - marktext:'铃', - intro:{ - content:'cards', - }, - }, - gnjinfan3:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return false; - for(var i=0;i0) return get.order(button.link); - return -1; - }, - backup:function(links,player){ - return { - audio:'gnjinfan', - filterCard:function(){return false}, - selectCard:-1, - viewAs:links[0], - onuse:function(result,player){ - var gnjinfan=player.getStorage('gnjinfan'); - if(gnjinfan){ - player.unmarkAuto('gnjinfan',[result.card]); - } - } - } - }, - prompt:function(links){ - return '选择'+get.translation(links)+'的目标'; - }, - }, - ai:{ - order:function(item,player){ - var event=_status.event; - if(event.type!='phase') return 4; - if(!player) return -1; - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return -1; - var order=0; - for(var i=0;i0){ - var order2=get.order(gnjinfan[i]); - if(order2>order) order=order2 - } - } - return order+0.1; - }, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - } - }, - useful:-1, - value:-1 - } - }, - gnjinfan6:{ - trigger:{global:'cardsGotoOrderingAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - var evt=event.getParent(); - return evt&&evt.player==player&&evt.skill&&evt.skill.indexOf('gnjinfan')==0; - }, - content:function(){ - var suit=get.suit(trigger.cards[0]); - var card=get.cardPile2(function(cardx){ - return get.suit(cardx)==suit; - }); - if(card) player.gain(card,'gain2','log'); - }, - }, - gnjinfan7:{ - filter:function(){return false}, - hiddenCard:function(player,name){ - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return false; - for(var i=0;i0&& - lib.filter.targetEnabled({name:'sha'},player,event.player)&&(player.hasSha()||_status.connectMode&&player.countCards('h')>0); - }, - content:function(){ - player.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'射却:是否对'+get.translation(trigger.player)+'使用一张杀?').set('logSkill','gnsheque').set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',trigger.player).set('oncard',function(card){ - card.gnsheque_tag=true; - }); - }, - ai:{ - unequip:true, - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(tag=='unequip_ai'){ - if(_status.event.getParent().name!='gnsheque') return false; - } - else if(!arg||!arg.card||!arg.card.gnsheque_tag) return false; - }, - }, - }, - }, - translate:{ - old_liuzan:'手杀留赞', - re_sp_zhugeliang:"手杀卧龙", - ly_piliche:'霹雳车', - ly_piliche_info:'当你对其他角色造成伤害后,若造成伤害的牌不为延时锦囊牌,你可以弃置其装备区里的防具牌与+1坐骑牌;当你失去此装备时,销毁之。', - polu:'破橹', - polu_info:'锁定技,回合开始时,若你的装备区里没有【霹雳车】,你使用之;当你受到1点伤害后,若你的装备区里没有【霹雳车】,你摸一张牌。', - choulve:'筹略', - choulve_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌,若其如此做,视为你使用上一张对你过造成伤害且不为延时锦囊牌的牌。', - tunchu:'屯储', - tunchu_info:'摸牌阶段,若你没有「粮」,你可以多摸两张牌。若如此做,摸牌阶段结束时,你可以将任意张手牌置于你的武将上,称为「粮」,只要你的武将牌上有「粮」,你便不能使用【杀】', - shuliang:'输粮', - shuliang_info:'一名角色的结束阶段开始时,若其手牌数少于体力值,你可以移去一张「粮」,然后该角色摸两张牌', - fenyin:'奋音', - yingjian:'影箭', - fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', - yingjian_info:'准备阶段开始时,你可以视为使用一张无距离限制的【杀】。', - dujin:'独进', - dujin_info:'摸牌阶段,你可以多摸X+1张牌。(X为你装备区里牌数的一半且向下取整)', - shixin:'释衅', - shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害。', - zhaohuo:'招祸', - zhaohuo_info:'锁定技,当其他角色进入濒死状态时,你将体力上限调整为1点。若你的体力上限因此减少,则你摸一张牌。(X为你以此法减少的体力上限)', - yixiang:'义襄', - yixiang_info:'每名角色的回合限一次,当你成为一名角色使用牌的目标后,若该角色的体力值大于你的体力值,你可以随机获得牌堆里的一张你没有的基本牌。', - yirang:'揖让', - yirang_info:'出牌阶段开始时,你可以将所有非基本牌交给一名体力上限大于你的其他角色,然后调整体力上限至与该角色相同并回复X点体力(X为你以此法交给其的牌的类别数)。', - kuangcai:'狂才', - kuangcai_info:'出牌阶段开始时,你可以令你此阶段内的主动出牌时间变为5秒。若如此做,你于此阶段内使用牌没距离和次数限制,且每当你于此阶段内使用牌时,你摸一张牌且主动出牌时间-1秒。若主动出牌时间减至0,则你结束出牌阶段。', - shejian:'舌剑', - shejian_info:'弃牌阶段结束时,若你于此阶段弃置的所有牌花色均不相同,则你可以弃置一名其他角色的一张牌。', - "xinfu_daigong":"怠攻", - "xinfu_daigong_info":"每回合限一次。当你受到伤害时,你可以展示所有手牌,然后令伤害来源选择一项:交给你一张与你所有手牌花色均不相同的一张牌,或防止此伤害。", - "xinfu_zhaoxin":"昭心", - "xinfu_zhaoxin_info":"出牌阶段限一次,你可以将任意张手牌置于武将牌上并摸等量的牌,称之为「望」(你至多拥有三张「望」)。你或你攻击范围内的一名其他角色的摸牌阶段结束后,其可以获得一张由你选择的「望」,然后你可以对其造成1点伤害。", - "zhaoxin_give":"昭心", - "zhaoxin_give_info":"", - "xinfu_qianchong":"谦冲", - "xinfu_qianchong_info":"锁定技,若你的装备区内有牌且:均为红色,则你视为拥有技能〖明哲〗。均为黑色,则你视为拥有技能〖帷幕〗。若均不满足,则出牌阶段开始时,你可以选择一种类别的牌,然后你本回合内使用该类别的牌时没有次数和距离限制。", - "qc_weimu":"帷幕", - "qc_weimu_info":"", - "qc_mingzhe":"明哲", - "qc_mingzhe_info":"", - "xinfu_shangjian":"尚俭", - "xinfu_shangjian_info":"一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你可以摸等量的牌。(X为你的体力值)", - "rw_bagua_skill":"先天八卦阵", - "rw_bagua_skill_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", - "rw_baiyin_skill":"照月狮子盔", - "rw_baiyin_skill_info":"锁定技,当你受到大于1的伤害时,你将伤害值改为1;当你失去装备区里的【照月狮子盔】时,你回复1点体力并摸两张牌。", - "rw_lanyinjia":"精银甲", - "rw_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。", - "rw_minguangkai_cancel":"耀光铠", - "rw_minguangkai_cancel_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", - "rw_minguangkai_link":"耀光铠", - "rw_minguangkai_link_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", - "rw_renwang_skill":"仁王金刚盾", - "rw_renwang_skill_info":"黑色【杀】和红桃【杀】对你无效。", - "rw_tengjia1":"桐油百韧甲", - "rw_tengjia1_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", - "rw_tengjia2":"桐油百韧甲", - "rw_tengjia2_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", - "rw_tengjia3":"桐油百韧甲", - "rw_tengjia3_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", - "rw_tengjia4":"桐油百韧甲", - "rewrite_bagua":"先天八卦阵", - "rewrite_bagua_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", - "rewrite_baiyin":"照月狮子盔", - "rewrite_baiyin_info":"锁定技,当你受到大于1的伤害时,你将伤害值改为1;当你失去装备区里的【照月狮子盔】时,你回复1点体力并摸两张牌。", - "rewrite_lanyinjia":"精银甲", - "rewrite_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。", - "rewrite_minguangkai":"耀光铠", - "rewrite_minguangkai_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", - "rewrite_renwang":"仁王金刚盾", - "rewrite_renwang_info":"黑色【杀】和红桃【杀】对你无效。", - "rewrite_tengjia":"桐油百韧甲", - "rewrite_tengjia_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", - "rewrite_zhuge":"元戎精械弩", - "rewrite_zhuge_info":"锁定技,你于出牌阶段内使用【杀】无次数限制。", - rw_zhuge_skill:'诸葛连弩', - rw_zhuge_skill_info:'锁定技,你于出牌阶段内使用【杀】无次数限制。', - takaramono:"宝物", - "wolong_card":"卧龙", - "wolong_card_info":"对一名角色造成1点火焰伤害。若场上有存活的诸葛亮(火),则改为对至多两名角色各造成两点火焰伤害。", - "fengchu_card":"凤雏", - "fengchu_card_info":"横置至多三名角色。若场上有存活的庞统(火),则改为横置至多四名角色。", - "xuanjian_card":"玄剑", - "xuanjian_card_info":"令一名角色摸一张牌并回复1点体力。若场上有存活的徐庶(将/界),则改为令一名角色摸一张牌并回复1点体力,然后你摸一张牌。", - "shuijing_card":"水镜", - "shuijing_card_info":"将一名角色装备区内的防具牌移动到另一名角色对应区域。若场上有存活的司马徽,则改为将1名角色装备区内的1件装备移动到另1角色对应区域。","xinfu_pingcai":"评才", - "xinfu_pingcai_info":"出牌阶段限一次,你可以挑选一个宝物并擦拭掉其上面的灰尘。然后,你可以根据宝物类型执行对应的效果。", - "xinfu_pdgyingshi":"隐世", - "xinfu_pdgyingshi_info":"锁定技,你始终跳过准备阶段,判定阶段,结束阶段。你不能被选择为延时锦囊牌的目标。", - "pcaudio_wolong_card":"卧龙", - "pcaudio_wolong_card_info":"", - "pcaudio_fengchu_card":"凤雏", - "pcaudio_fengchu_card_info":"", - "pcaudio_shuijing_card":"水镜", - "pcaudio_shuijing_card_info":"", - "pcaudio_xuanjian_card":"玄剑", - "pcaudio_xuanjian_card_info":"", - "yizan_respond_sha":"翊赞", - "yizan_respond_sha_info":"", - "yizan_use":"翊赞", - "yizan_use_info":"你可以将两张牌(其中至少一张为基本牌)当做任意基本牌使用或打出。", - "yizan_respond_shan":"翊赞", - "yizan_respond_shan_info":"", - "xinfu_longyuan":"龙渊", - "xinfu_longyuan_info":"觉醒技,当你使用或打出的基本牌结算完成后,若你本局游戏内发动过〖翊赞〗的次数大于等于3,则你将〖翊赞〗描述中的“两张牌”改为“一张牌”。", - "yizan_count":"翊赞", - "yizan_count_info":"", - "xinfu_jingxie1":"精械", - "xinfu_jingxie1_info":"出牌阶段,你可以展示一张未强化过的【诸葛连弩】或标准包/军争包/SP包中的防具牌,然后对其进行强化。当你处于濒死状态时,你可以重铸一张防具牌,然后将体力回复至1点。", - "xinfu_jingxie2":"精械", - "xinfu_jingxie2_info":"", - "xinfu_qiaosi":"巧思", - "xinfu_qiaosi_info":"出牌阶段限一次,你可以投掷一枚六面骰子,展示牌堆顶的X张牌并获得之。然后,你选择一项:1.交给一名其他角色X张牌。2.弃置X张牌。(X为骰子的点数)", - xin_xiahoudun:'手杀夏侯惇', - xinqingjian:'清俭', - xinqingjian2:'清俭', - xinqingjian_info:'每回合限一次。当你不因摸牌阶段的额定摸牌而获得牌时,你可以将任意张牌扣置于武将牌上。回合结束时,你将这些牌交给一名其他角色。若这些牌的数量大于1,你摸一张牌。', - zhangyì:'张翼', - jiakui:'贾逵', - zhiyi:'执义', - zhiyi_info:'锁定技,当你于一回合内使用或打出第一张基本牌时,你选择一项:1.摸一张牌。2.于此牌A(若此牌是因响应牌B而使用或打出的,则改为牌B)的使用或打出流程结算完成后,视为使用一张与此牌名称和属性相同的卡牌。', - zhongzuo:'忠佐', - zhongzuo_info:'一名角色的回合结束时,若你于此回合内造成或受到过伤害,则你可以令一名角色摸两张牌。若该角色已受伤,则你摸一张牌。', - wanlan:'挽澜', - wanlan_info:'限定技,当一名角色进入濒死状态时,你可以弃置所有手牌并令其回复体力至1点,然后对当前回合角色造成1点伤害。', - re_jikang:"手杀嵇康", - old_bulianshi:'手杀步练师', - old_caochun:'旧曹纯', - shenpei:'审配', - re_wangyun:'手杀王允', - relianji:'连计', - relianji_info:'出牌阶段限一次,你可以选择两名其他角色。第一名角色随机使用牌堆中的一张武器牌,然后这名角色视为对另一名角色随机使用一张下列的牌名的牌:【决斗】、【火攻】、【南蛮入侵】、【万箭齐发】或普【杀】。然后若此牌造成伤害,你获得X枚“连计”标记(X为此次扣减的体力值点数)。', - remoucheng:'谋逞', - remoucheng_info:'觉醒技,当一名角色造成伤害后,若你拥有的“连计”标记数大于2,你加1点体力上限,回复1点体力,失去“连计”,获得“矜功”。', - rejingong:'矜功', - rejingong_info:'每回合可以用三个随机锦囊中的一个,三个锦囊中有一个是专属锦囊,本回合未造成伤害会失去1点体力。', - mobile_default:'常规', - mobile_others:'其他', - - pss:'手势', - pss_paper:'布', - pss_scissor:'剪刀', - pss_stone:'石头', - pss_paper_info:'石头剪刀布时的一种手势。克制石头,但被剪刀克制。', - pss_scissor_info:'石头剪刀布时的一种手势。克制布,但被石头克制。', - pss_stone_info:'石头剪刀布时的一种手势。克制剪刀,但被布克制。', - - db_atk:'进攻对策', - db_atk1:'全军出击', - db_atk2:'分兵围城', - - db_def:'防御对策', - db_def1:'奇袭粮道', - db_def2:'开城诱敌', - - shouye:'守邺', - shouye_info:'每回合限一次。当其他角色使用牌指定你为唯一目标时,你可以与其进行【对策】。若你赢,则你取消此牌的目标,且你于此牌结算完成后获得其对应的所有实体牌。', - liezhi:'烈直', - liezhi_info:'准备阶段,你可以依次弃置至多两名角色区域内的各一张牌。若你受到过伤害,则〖烈直〗于你的下个回合无效。', - - xinzhanyi:'战意', - xinzhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作杀、酒或桃使用,且你本回合第一次以此法使用的牌的回复值/伤害值+1;锦囊牌,摸三张牌且你使用的牌不能被【无懈可击】响应;装备牌,你使用【杀】指定目标角色后,其弃置两张牌,然后你获得其中的一张。', - xinzhanyi_basic_backup:'战意', - xinzhanyi_basic:'战意', - xinzhanyi_equip:'战意', - - meiyong:'姝勇', - meiyong_info:'当你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后其摸一张牌。', - rexushen:'许身', - rexushen_info:'限定技,出牌阶段,你可以失去X点体力(X为场上男性角色的数量)。若你以此法进入了濒死状态,则当你因一名角色而脱离此濒死状态后,你可以令其获得技能〖武圣〗和〖当先〗(其以此法获得的〖当先〗结算时视为其发动过〖伏枥〗)。', - rezhennan:'镇南', - rezhennan_info:'当你成为其他角色使用的牌的目标后,若此牌的目标数大于该角色的体力值,则你可以弃置一张牌并对其造成1点伤害。', - - hujinding:'胡金定', - huaizi:'怀子', - huaizi_info:'锁定技,你的手牌上限为你的体力上限。', - renshi:'仁释', - renshi_info:'锁定技,当你受到【杀】的伤害时,若你已受伤,则你防止此伤害并获得此【杀】对应的所有实体牌,然后减1点体力上限。', - wuyuan:'武缘', - wuyuan_info:'出牌阶段限一次,你可将一张【杀】交给一名其他角色,然后你回复1点体力,其摸一张牌。若此【杀】为:红色【杀】,其回复1点体力;属性【杀】,其改为摸两张牌。', - - re_weiwenzhugezhi:'手杀卫温诸葛直', - re_xugong:'手杀许贡', - re_zhanggong:'手杀张恭', - reqianxin:'遣信', - reqianxin_info:'出牌阶段限一次,你可将至多两张手牌随机交给等量的其他角色,称为「信」。这些角色的准备阶段开始时,若其手牌中有「信」,则其选择一项:令你摸两张牌,本回合手牌上限-2。', - rebiaozhao:"表召", - "rebiaozhao_info":"结束阶段,你可以将一张牌置于武将牌上,称为「表」。当有一张与「表」点数相同的牌进入弃牌堆时,你将「表」置入弃牌堆并失去1点体力。准备阶段,若你的武将牌上有「表」,则你移去「表」并选择一名角色,该角色回复1点体力并摸三张牌。", - "rebiaozhao2":"表召", - "rebiaozhao2_info":"", - "rebiaozhao3":"表召", - "rebiaozhao3_info":"", - refuhai:'浮海', - refuhai_info:'出牌阶段限一次,你可令其他角色同时在「潮起」和「潮落」中选择一项,并依次展示这些角色的选项。若从你下家开始选择了相同选项的角色数目大于1,则你摸X张牌(X为连续相同结果的数量)。', - qiaosi:'巧思', - qiaosi_info:'出牌阶段限一次,你可以表演「大键角色图」并根据表演结果获得相应的牌。然后,你选择一项:1.弃置X张牌。2.将X张牌交给一名其他角色。(X为你以此法获得的牌数)', - qiaosi_map:'大键角色图', - qiaosi_map_info:'
  • 星野 梦美:锦囊牌*2
  • 能美 库特莉亚芙卡:装备牌/【杀】/【酒】*1
  • 友利 奈绪:【杀】/【酒】*1
  • 神尾 观铃:【闪】/【桃】*1
  • 伊吹 风子:锦囊牌/【闪】/【桃】*1
  • 仲村 ゆり:装备牌*2
  • Illustration: うら;Twitter:@ura530', - qiaosi_c1:' ', - //星野 梦美 - qiaosi_c2:' ', - //能美 库特莉亚芙卡 - qiaosi_c3:' ', - //友利 奈绪 - qiaosi_c4:' ', - //神尾 观铃 - qiaosi_c5:' ', - //伊吹 风子 - qiaosi_c6:' ', - //仲村 ゆり - mobile_sunben:'那个男人', - //孙笨 - - yangbiao:'杨彪', - zhaohan:'昭汉', - zhaohan_info:'锁定技,你的第1-4个准备阶段开始时,你加1点体力上限并回复1点体力,你的第5-7个准备阶段开始时,你减1点体力上限。', - rangjie:'让节', - rangjie_info:'当你受到1点伤害后,你可以选择一项并摸一张牌:获得牌堆里你选择的类型的一张牌,或移动场上的一张牌。', - yizheng:'义争', - yizheng2:'义争', - yizheng_info:'出牌阶段限一次,你可以和一名体力值不大于你的其他角色拼点。若你赢,其跳过下个摸牌阶段。若你没赢,你减1点体力上限。', - re_heqi:'手杀贺齐', - reqizhou:'绮胄', - reqizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上:〖英姿〗;2种或以上:〖奇袭〗;3种或以上:〖旋风〗。', - reshanxi:'闪袭', - reshanxi2:'闪袭', - reshanxi_info:'出牌阶段开始时,你可以弃置一张红色基本牌并选择一名有牌的其他角色,将其的至多X张牌置于其的武将牌上(X为你的体力值)。回合结束时,该角色获得这些牌。', - chendeng:'陈登', - zhouxuan:'周旋', - zhouxuan2:'周旋', - zhouxuan_info:'结束阶段,你可以弃置一张牌并指定一名角色,然后选择一个基本牌的名称或非基本牌的类型。其使用或打出下一张牌时,若此牌的名称或类型和你选择的相同,则你观看牌堆顶的三张牌,然后将这些牌分配给任意角色。', - fengji:'丰积', - fengji_info:'锁定技,回合结束时,你记录你的手牌数。回合开始时,若你的手牌数不小于你记录的手牌数,则你摸两张牌且本回合手牌上限为体力上限。', - re_guanqiujian:'手杀毌丘俭', - rezhengrong:'征荣', - rehongju:'鸿举', - reqingce:'清侧', - reqingce_backup:'清侧', - rezhengrong_info:'当你于出牌阶段使用的指定了其他角色为目标的牌结算完成后,若此牌是你本局游戏内于出牌阶段使用的指定了其他角色为目标的第偶数张牌,则你可以将一名其他角色角色的随机一张牌置于你的武将牌上,称为「荣」。', - rehongju_info:'觉醒技,准备阶段,若你武将牌上「荣」的数量不小于3且有角色死亡,则你摸等同于「荣」数量的牌。然后可以用任意数量的手牌交换等量的「荣」。你减1点体力上限并获得技能〖清侧〗。', - reqingce_info:'出牌阶段,你可以将一张「荣」置入弃牌堆,然后弃置场上的一张牌。', - re_pangtong:"手杀庞统", - dongcheng:'董承', - chengzhao:'承诏', - chengzhao_info:'一名角色的结束阶段,若你于本回合内获得了两张以上的牌,则你可以与一名其他角色拼点。若你赢,你视为对其使用一张无视防具的【杀】。', - yangyi:'杨仪', - duoduan:'度断', - duoduan_info:'每回合限一次,当你成为【杀】的目标后,你可以重铸一张牌。若如此做,此【杀】的使用者选择一项:摸两张牌令此【杀】无效,或弃置一张牌并令你不能闪避此【杀】。', - gongsun:'共损', - gongsun_info:'出牌阶段开始时,你可以弃置两张牌并指定一名其他角色。你选择一个基本牌或普通锦囊牌的牌名。直到你的下回合开始或你死亡,你与其不能使用或打出或弃置此名称的牌。', - gongsun_shadow:'共损', - xin_chengpu:'手杀程普', - relihuo:'疠火', - relihuo_damage:'疠火', - relihuo_baigei:'疠火', - relihuo_info:'当你使用普【杀】时,你可以将此杀改为火属性。若如此做,当你因执行此【杀】的效果而对横置角色造成伤害时,此伤害+1;当你使用的火【杀】结算完成后,你失去X点体力(X为你因此【杀】造成的伤害总点数的一半且向下取整)', - dengzhi:'邓芝', - jimeng:'急盟', - jimeng_info:'出牌阶段开始时,你可以获得一名其他角色的一张牌,然后交给该角色X张牌(X为你当前体力值)。', - shuaiyan:'率言', - shuaiyan_info:'弃牌阶段开始时,若你的手牌数大于1,则你可以展示所有手牌,然后你令一名其他角色交给你一张牌。', - zhengxuan:'郑玄', - zhengjing:'整经', - zhengjing_info:'出牌阶段,你可以整理卡牌。然后,你将整理出的卡牌置于一名角色的武将牌上。该角色的准备阶段获得这些牌,跳过此回合的判定和摸牌阶段且本回合内不能发动【整经】。', - zhengjing2:'整经', - - mobile_yijiang:'武将设计征集大赛', - yj_zhanghe:'☆张郃', - yj_zhangliao:'☆张辽', - yj_xuhuang:'☆徐晃', - yj_ganning:'☆甘宁', - xhzhiyan:'治严', - xhzhiyan_info:'出牌阶段,若你的手牌数不等于体力上限,则你可以将手牌摸至/弃至手牌上限,然后本回合不能对其他角色使用牌/可以将弃置的一张牌交给一名其他角色。', - zhilve:'知略', - zhilve_info:'锁定技,准备阶段,你选择一项:1.移动场上装备区的一张牌并失去1点体力。2.移动场上判定区的一张牌并令本回合手牌上限-1。3.本回合摸牌阶段多摸一张牌且使用的第一张【杀】无距离限制且不计入次数限制。', - xinzhilve:'知略', - xinzhilve_backup:'知略', - xinzhilve_mark:'知略', - xinzhilve_info:'出牌阶段限一次,你可以失去1点体力并选择一项:1.移动场上的一张牌;2.视为使用一张无距离限制且不计入次数限制的【杀】并摸一张牌。然后你本回合的手牌上限+1。', - xinxhzhiyan:'治严', - xinxhzhiyan_false:'治严', - xinxhzhiyan_info:'出牌阶段每项各限一次,若你的手牌数:大于体力上限,则你可以将X张手牌交给一名其他角色;小于体力上限,则你可以摸X张牌且本阶段内不能再对其他角色使用牌。(X为你的手牌数与体力上限之差的绝对值)', - weifeng:'威风', - weifeng2:'威风', - weifeng3:'威风', - weifeng_info:'锁定技,当你于出牌阶段内使用第一张伤害性基本牌或普通锦囊牌后,你令此牌的一名没有“惧”的其他目标角色获得一枚名称为此牌牌名的“惧”。有“惧”的角色受到伤害时,其移去“惧”,然后若造成伤害的牌名称和“惧”:相同,此伤害+1;不同,你获得该角色的一张牌。准备阶段开始时或你死亡时,你移去场上的所有“惧”。', - gnjinfan:'锦帆', - gnjinfan3:'锦帆', - gnjinfan4:'锦帆', - gnjinfan6:'锦帆', - gnjinfan7:'锦帆', - gnjinfan4_backup:'锦帆', - gnjinfan_info:'弃牌阶段开始时,你可将任意张手牌置于武将牌上,称为“铃”(每种花色的“铃”限一张)。当你需要使用或打出一张手牌时,你可以使用或打出一张“铃”。当有“铃”移动到处理区后,你从牌堆中获得与此次移动到第一张“铃”花色相同的一张牌。', - gnsheque:'射却', - gnsheque_info:'一名其他角色的准备阶段开始时,若其装备区内有牌,则你可以对其使用一张【杀】(无距离关系的限制且无视防具)。', - sp_sufei:'SP苏飞', - zhengjian:'诤荐', - zhengjian_draw:'诤荐', - zhengjian_mark:'诤荐', - zhengjian_info:'锁定技,结束阶段,你令一名角色获得一枚“诤”。回合开始时,你令有“诤”的角色移去“诤”并摸X张牌(X为其最后一次获得“诤”后使用和打出的牌数,且至多不能超过其体力上限或5)。', - gaoyuan:'告援', - gaoyuan_info:'当你成为【杀】的目标时,你可弃置一张牌将此【杀】转移给一名有“诤”且不是此【杀】使用者的其他角色。', - tongqu:'通渠', - tongqu_info:'游戏开始时,你获得一个“渠”。出牌阶段开始时,你可令一名没有“渠”的角色获得一个“渠”。有“渠”的角色摸牌阶段,其多摸一张牌,然后其将一张牌交给一名有“渠”的其他角色或弃置一张牌。有“渠”的角色受到伤害后,其弃置“渠”', - xinwanlan:'挽澜', - xinwanlan_info:'当有角色受到伤害时,若伤害点数大于其体力值,则你可以弃置所有非基本牌(至少两张)并防止此伤害。', - re_xusheng:'手杀徐盛', - } - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'mobile', + connectBanned:['miheng'], + connect:true, + characterSort:{ + mobile:{ + mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei"], + mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning"], + mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong","xin_yuanshao","re_liushan","xin_xiahoudun","re_sp_zhugeliang","re_heqi","re_guanqiujian","re_pangtong","old_liuzan","xin_chengpu","re_sunjian","re_xusheng"], + mobile_sunben:["re_sunben"], + }, + }, + character:{ + re_xusheng:['male','wu',4,['repojun']], + sp_sufei:['male','qun',4,['zhengjian','gaoyuan']], + yj_zhangliao:['male','qun',4,['weifeng']], + yj_zhanghe:['male','qun',4,['xinzhilve']], + yj_xuhuang:['male','qun',4,['xinxhzhiyan']], + yj_ganning:['male','qun',4,['gnjinfan','gnsheque']], + re_sunjian:['male','wu',4,['gzyinghun','repolu']], + zhengxuan:['male','qun',3,['zhengjing']], + dengzhi:['male','shu',3,['jimeng','shuaiyan']], + xin_chengpu:['male','wu',4,['relihuo','chunlao']], + yangyi:['male','shu',3,['duoduan','gongsun']], + dongcheng:['male','qun',4,['chengzhao']], + re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]], + re_guanqiujian:['male','wei',4,['rezhengrong','rehongju']], + chendeng:['male','qun',3,['zhouxuan','fengji']], + re_heqi:['male','wu',4,['reqizhou','reshanxi']], + yangbiao:['male','qun',3,['zhaohan','rangjie','yizheng']], + re_sp_zhugeliang:["male","shu",3,["bazhen","rehuoji","rekanpo"],[]], + xin_xiahoudun:['male','wei',4,['reganglie','xinqingjian']], + zhangyì:['male','shu',4,['zhiyi']], + jiakui:['male','wei',3,['zhongzuo','wanlan']], + re_jikang:["male","wei",3,["new_qingxian","new_juexiang"]], + old_bulianshi:['female','wu',3,['anxu','zhuiyi']], + miheng:['male','qun',3,['kuangcai','shejian']], + taoqian:['male','qun',3,['zhaohuo','yixiang','yirang']], + old_liuzan:['male','wu',4,['fenyin']],lingcao:['male','wu',4,['dujin']], + sunru:['female','wu',3,['yingjian','shixin']], + lifeng:['male','shu',3,['tunchu','shuliang']], + zhuling:['male','wei',4,['xinzhanyi']], + liuye:['male','wei',3,['polu','choulve']], + zhaotongzhaoguang:["male","shu",4,["yizan_use","xinfu_longyuan"],[]], + majun:["male","wei",3,["xinfu_jingxie1","qiaosi"],[]], + simazhao:["male","wei",3,["xinfu_daigong","xinfu_zhaoxin"],[]], + wangyuanji:["female","wei",3,["xinfu_qianchong","xinfu_shangjian"],[]], + pangdegong:["male","qun",3,["xinfu_pingcai","xinfu_pdgyingshi"],[]], + old_yuanshu:['male','qun',4,['xinyongsi','yjixi']], + + shenpei:["male","qun","2/3",["shouye","liezhi"],[]], + re_wangyun:['male','qun',3,['relianji','remoucheng']], + + re_baosanniang:['female','shu',3,['meiyong','rexushen','rezhennan']], + + hujinding:['female','shu','2/6',['renshi','wuyuan','huaizi']], + + re_zhanggong:['male','wei',3,['reqianxin','xinfu_zhenxing']], + re_xugong:['male','wu',3,['rebiaozhao','yechou']], + re_weiwenzhugezhi:['male','wu',4,['refuhai']], + + xin_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']], + re_liushan:['male','shu',3,['xiangle','refangquan','ruoyu'],['zhu']], + re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']], + }, + characterIntro:{ + zhengxuan:'郑玄(127年-200年),字康成。北海郡高密县(今山东省高密市)人。东汉末年儒家学者、经学大师。郑玄曾入太学攻《京氏易》、《公羊春秋》及《三统历》、《九章算术》,又从张恭祖学《古文尚书》、《周礼》和《左传》等,最后从马融学古文经。游学归里之后,复客耕东莱,聚徒授课,弟子达数千人,家贫好学,终为大儒。党锢之祸起,遭禁锢,杜门注疏,潜心著述。晚年守节不仕,却遭逼迫从军,最终病逝于元城,年七十四。郑玄治学以古文经学为主,兼采今文经学。他遍注儒家经典,以毕生精力整理古代文化遗产,使经学进入了一个“小统一时代”。著有《天文七政论》、《中侯》等书,共百万余言,世称“郑学”,为汉代经学的集大成者。唐贞观年间,列郑玄于二十二“先师”之列,配享孔庙。宋代时被追封为高密伯。后人建有郑公祠以纪念。', + dengzhi:'邓芝(178年-251年),字伯苗。义阳郡新野县(今河南新野)人。东汉名将邓禹之后,三国时期蜀汉重臣。邓芝早年曾被预言能位至大将,后被刘备任为郫令,升迁为广汉太守。因任官公廉且有治绩,被征入朝为尚书。刘备逝世后,奉命出使吴国,成功修复两国关系,并深为吴大帝孙权所赏识。建兴六年(228年),丞相诸葛亮策划北伐,命邓芝与大将赵云佯攻郿城,以吸引魏国曹真军主力。建兴十二年(234年),迁前军师、前将军,领兖州刺史,封阳武亭侯,不久督领江州。延熙六年(243年),迁车骑将军,后授假节。又率军平定涪陵叛乱。延熙十四年(251年),邓芝病逝。邓芝性格正直、简单,不刻意修饰情绪。他为将二十多年,赏罚明断,体恤士卒。身上的衣食取自官府,从未经营过私产,妻儿甚至还有忍饥挨饿之时,死时家中也没有多余财物。', + yangyi:'杨仪(?-235年),字威公,襄阳(今湖北襄阳)人,三国时期蜀汉官员。最初为荆州刺史傅群的主簿,后投奔关羽,任为功曹。关羽遣其至成都,大受刘备赞赏,擢为尚书。因与尚书令刘巴不和,调为弘农太守。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。诸葛亮在生前定蒋琬继己任,杨仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', + dongcheng:'董承(?~200年),字号不详,冀州河间人(今河北献县)人。东汉末年外戚大臣,汉灵帝母亲董太后侄子,汉献帝嫔妃董贵人之父。初从西凉军,为董卓女婿牛辅部曲。护卫汉献帝刘协从长安东归洛阳,拜为卫将军,受封列侯。建安四年(199年),拜车骑将军。自称领受汉献帝衣带诏,联合刘备、种辑、吴子兰、王子服、吴硕等人密谋诛杀曹操。五年正月,图谋泄露,董承诸人及董贵人全部遇害。', + chendeng:'陈登(163—201),字元龙,下邳淮浦(今江苏涟水西)人。东汉末年将领、官员。沛相陈珪之子。为人爽朗,性格沈静,智谋过人,少年时有扶世济民之志,并且博览群书,学识渊博。二十五岁时,举孝廉,任东阳县长。虽然年轻,但他能够体察民情,抚弱育孤,深得百姓敬重。后来,徐州牧陶谦提拔他为典农校尉,主管一州农业生产。他亲自考察徐州的土壤状况,开发水利,发展农田灌溉,使汉末迭遭破坏的徐州农业得到一定程度的恢复,百姓们安居乐业,“秔稻丰积”。建安初奉使赴许,向曹操献灭吕布之策,被授广陵太守。以灭吕布有功,加伏波将军。又迁东城太守。年三十九卒。其子陈肃,魏文帝时追陈登之功,为郎中。', + yangbiao:'杨彪(142年-225年),字文先。弘农郡华阴县(今陕西华阴)人。东汉末年名臣,太尉杨赐之子、名士杨修之父。杨彪少年时受家学熏陶,初举孝廉、茂才。其后征拜为议郎,参与续写《东观汉记》。任京兆尹时,揭发黄门令王甫的贪赃行为,使其被定罪诛杀。累任侍中、五官中郎将、卫尉等职。汉献帝时,遍历三公(司空、司徒、太尉)之职。权臣董卓意图迁都时,他据理力争。献帝东迁时,杨彪尽节护主。曹操挟献帝定都许县后,将杨彪下狱,获释后又任太常。他见汉室衰微,便诈称脚疾,不理世事。曹魏建立后,拒绝出任太尉,改光禄大夫,待以客礼。黄初六年(225年),杨彪去世,年八十四。其著作现仅存《答曹公书》一篇。', + zhangyì:'张翼(?-264年),字伯恭,益州犍为郡武阳县人。三国时期蜀汉将领。历任梓潼、广汉、蜀郡三郡太守,出任庲降都督,后随诸葛亮和姜维北伐,官至左车骑将军,领冀州刺史。初封关内侯,进爵都亭侯。蜀汉灭亡后,魏将钟会密谋造反,成都大乱,张翼亦为乱兵所杀。张翼是蜀汉第三任庲降都督,由于执法严厉,不得南夷欢心。在北伐上,张翼认为国小民疲,不应滥用武力,是蜀汉朝廷当时极少敢当朝和姜维争辩北伐问题的大臣。', + jiakui:'贾逵(174年—228年),本名贾衢,字梁道,河东襄陵人(今山西临汾县)。汉末三国时期魏国名臣,西晋开国功臣贾充父亲。初为并州郡吏,迁渑池县令,拜弘农太守,历仕曹操、曹丕、曹叡三世,是曹魏政权中具有军政才干的人物,终其一生为魏国统一事业作出卓越贡献。担任豫州刺史期间,兴修水利,凿通运河二百余里,时称“贾侯渠”,便利民生。随同曹丕伐吴,进封阳里亭侯,加号建威将军。石亭之战,率军救出曹休。太和二年,去世,赠本官,谥号为肃,《唐会要》将其尊为魏晋八君子之一。', + shenpei:'审配(?-204年),字正南,魏郡阴安(今河北清丰北)人。为人正直, 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。', + hujinding:'胡金定,女,传说中关羽之妻。关索之母,配偶关羽,出处《花关索传》和元代《三国志评话》民间传说人物。', + }, + card:{ + pss_paper:{ + type:'pss', + fullskin:true, + //derivation:'shenpei', + }, + pss_scissor:{ + type:'pss', + fullskin:true, + //derivation:'shenpei', + }, + pss_stone:{ + type:'pss', + fullskin:true, + //derivation:'shenpei', + }, + db_atk1:{ + type:'db_atk', + fullimage:true, + //derivation:'shenpei', + }, + db_atk2:{ + type:'db_atk', + fullimage:true, + //derivation:'shenpei', + }, + db_def1:{ + type:'db_def', + fullimage:true, + //derivation:'shenpei', + }, + db_def2:{ + type:'db_def', + fullimage:true, + //derivation:'shenpei', + }, + ly_piliche:{ + fullskin:true, + vanish:true, + derivation:'liuye', + type:'equip', + subtype:'equip1', + distance:{attackFrom:-8}, + skills:['ly_piliche'], + destroy:'polu' + }, + "wolong_card":{ + type:"takaramono", + fullskin:true, + //derivation:"pangdegong", + }, + "fengchu_card":{ + type:"takaramono", + fullskin:true, + //derivation:"pangdegong", + }, + "xuanjian_card":{ + fullskin:true, + type:"takaramono", + //derivation:"pangdegong", + }, + "shuijing_card":{ + fullskin:true, + type:"takaramono", + //derivation:"pangdegong", + }, + "rewrite_bagua":{ + derivation:"majun", + //cardimage:"bagua", + fullskin:true, + type:"equip", + subtype:"equip2", + ai:{ + basic:{ + equipValue:7.5, + }, + }, + skills:["rw_bagua_skill"], + }, + "rewrite_baiyin":{ + derivation:"majun", + fullskin:true, + //cardimage:"baiyin", + type:"equip", + subtype:"equip2", + filterLose:function(card,player){ + if(player.hasSkillTag('unequip2')) return false; + return true; + }, + loseDelay:false, + onLose:function(){ + player.logSkill('rw_baiyin_skill'); + var next=game.createEvent('rw_baiyin_recover'); + event.next.remove(next); + event.getParent().after.push(next); + next.player=player; + next.setContent(function(){ + player.draw(2); + player.recover(); + }); + }, + skills:["rw_baiyin_skill"], + tag:{ + recover:1, + }, + ai:{ + order:9.5, + equipValue:function (card,player){ + if(player.hp==player.maxHp) return 5; + if(player.countCards('h','rewrite_baiyin')) return 6; + return 0; + }, + basic:{ + equipValue:5, + }, + }, + }, + "rewrite_lanyinjia":{ + derivation:"majun", + //cardimage:"lanyinjia", + fullskin:true, + type:"equip", + subtype:"equip2", + skills:["rw_lanyinjia","lanyinjia2"], + ai:{ + equipValue:6, + basic:{ + equipValue:1, + }, + }, + }, + "rewrite_renwang":{ + derivation:"majun", + //cardimage:"renwang", + fullskin:true, + type:"equip", + subtype:"equip2", + skills:["rw_renwang_skill"], + ai:{ + basic:{ + equipValue:7.5, + }, + }, + }, + "rewrite_tengjia":{ + derivation:"majun", + //cardimage:"tengjia", + fullskin:true, + type:"equip", + subtype:"equip2", + cardnature:"fire", + ai:{ + equipValue:function (card,player){ + if(player.hasSkillTag('maixie')&&player.hp>1) return 0; + if(player.hasSkillTag('noDirectDamage')) return 10; + if(get.damageEffect(player,player,player,'fire')>=0) return 10; + var num=3-game.countPlayer(function(current){ + return get.attitude(current,player)<0; + }); + if(player.hp==1) num+=4; + if(player.hp==2) num+=1; + if(player.hp==3) num--; + if(player.hp>3) num-=4; + return num; + }, + basic:{ + equipValue:3, + }, + }, + skills:["rw_tengjia1","rw_tengjia2","rw_tengjia3","rw_tengjia4"], + }, + "rewrite_zhuge":{ + derivation:"majun", + //cardimage:"zhuge", + distance:{ + attackFrom:-2, + }, + fullskin:true, + type:"equip", + subtype:"equip1", + ai:{ + equipValue:function (card,player){ + if(!game.hasPlayer(function(current){ + return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)>0; + })){ + return 1; + } + if(player.hasSha()&&_status.currentPhase==player){ + if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ + return 10; + } + } + var num=player.countCards('h','sha'); + if(num>1) return 6+num; + return 3+num; + }, + basic:{ + equipValue:5, + }, + tag:{ + valueswap:1, + }, + }, + skills:["rw_zhuge_skill"], + }, + }, + characterFilter:{}, + skill:{ + //苏飞,新贾逵 + tongqu:{ + audio:'zhongzuo', + trigger:{ + global:['gameDrawAfter','damageEnd','phaseDrawBegin2'], + player:['enterGame','phaseUseBegin'], + }, + direct:true, + filter:function(event,player){ + if(event.name=='phaseDraw') return !event.numFixed&&event.player.hasMark('tongqu'); + if(event.name=='damage') return event.player.hasMark('tongqu'); + if(event.name=='phaseUse') return game.hasPlayer(function(current){ + return !current.hasMark('tongqu'); + }); + return !player.hasMark('tongqu'); + }, + content:function(){ + 'step 0' + if(trigger.name=='phaseDraw'){ + player.logSkill('tongqu',trigger.player); + trigger.num++; + trigger.player.addTempSkill('tongqu2','phaseDrawAfter'); + event.finish(); + } + else if(trigger.name=='damage'){ + player.logSkill('tongqu',trigger.player); + trigger.player.removeMark('tongqu',1); + event.finish(); + } + else if(trigger.name=='phaseUse'){ + player.chooseTarget(get.prompt2('tongqu'),function(card,player,target){ + return !target.hasMark('tongqu'); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target) + }); + } + else{ + player.logSkill('tongqu'); + player.addMark('tongqu',1); + event.finish(); + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('tongqu',target); + target.addMark('tongqu',1); + } + }, + marktext:'渠', + intro:{content:'mark'}, + }, + tongqu2:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + silent:true, + filter:function(event,player){ + var bool=game.hasPlayer(function(current){ + return current!=player&¤t.hasMark('tongqu'); + }); + return player.countCards('he',function(card){ + if(bool) return true; + return lib.filter.cardDiscardable(card,player); + })>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + forced:true, + position:'he', + filterCard:true, + filterTarget:function(card,player,target){ + return player!=target&&target.hasMark('tongqu'); + }, + selectTarget:function(){ + if(ui.selected.cards.length&&!lib.filter.cardDiscardable(ui.selected.cards[0],_status.event.player)) return [1,1]; + return [0,1]; + }, + prompt:'弃置一张牌,或将一张牌交给一名有“渠”的其他角色', + ai1:function(card){ + var player=_status.event.player; + if(get.name(card)=='du') return 20; + if(get.position(card)=='e'&&get.value(card)<=0) return 14; + if(get.position(card)=='h'&&game.hasPlayer(function(current){ + return current!=player&¤t.hasMark('tongqu')&&get.attitude(player,current)>0&¤t.getUseValue(card)>player.getUseValue(card)&¤t.getUseValue(card)>player.getUseValue(card); + })) return 12; + if(game.hasPlayer(function(current){ + return current!=player&¤t.hasMark('tongqu')&&get.attitude(player,current)>0; + })){ + if(card.name=='wuxie') return 11; + if(card.name=='shan'&&player.countCards('h','shan')>1) return 9 + } + return 6/Math.max(1,get.value(card)); + }, + ai2:function(target){ + var player=_status.event.player; + var card=ui.selected.cards[0]; + var att=get.attitude(player,target); + if(card.name=='du') return -6*att; + if(att>0){ + if(get.position(card)=='h'&&target.getUseValue(card)>player.getUseValue(card)) return 4*att; + if(get.value(card,target)>get.value(card,player)) return 2*att; + return 1.2*att; + } + return 0; + }, + }); + 'step 1' + if(result.bool){ + if(result.targets.length) result.targets[0].gain(result.cards,player,'giveAuto'); + else player.discard(result.cards); + } + }, + }, + xinwanlan:{ + audio:'wanlan', + trigger:{global:'damageBegin4'}, + filter:function(event,player){ + return event.player.hp<=event.num&&player.countCards('he',function(card){ + return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic'; + })>=1; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)<4) return false; + if(player.countCards('h',function(card){ + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardSavable',player); + if(mod!='unchanged') return mod; + var savable=get.info(card).savable; + if(typeof savable=='function') savable=savable(card,player,event.player); + return savable; + })>=1+event.num-event.player.hp) return false; + if(event.player==player||event.player==get.zhu(player)) return true; + return !player.hasUnknown(); + }, + content:function(){ + player.discard(player.getCards('he',function(card){ + return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic'; + })); + trigger.cancel(); + }, + }, + zhengjian:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + locked:true, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget('请选择【诤荐】的目标',lib.translate.zhengjian_info).set('ai',function(target){ + if(target.hasSkill('zhengjian')) return 0; + if(player==target) return 0.5; + return get.attitude(_status.event.player,target)*(1+target.countCards('h')); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('zhengjian',target); + target.addSkill('zhengjian_mark'); + } + }, + group:'zhengjian_draw', + }, + zhengjian_draw:{ + audio:'zhengjian', + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event){ + return game.hasPlayer(function(current){ + return current.hasSkill('zhengjian_mark'); + }); + }, + logTarget:function(event){ + return game.filterPlayer(function(current){ + return current.hasSkill('zhengjian_mark'); + }); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current.countMark('zhengjian_mark')>0; + }); + if(list.length){ + event.delay=true; + game.asyncDraw(list,function(target){ + return Math.min(5,target.maxHp,target.countMark('zhengjian_mark')); + }); + } + 'step 1' + game.countPlayer(function(current){ + current.removeSkill('zhengjian_mark'); + }); + if(event.delay) game.delayx(); + }, + }, + zhengjian_mark:{ + trigger:{player:['useCard1','respond']}, + silent:true, + firstDo:true, + onremove:true, + charlotte:true, + content:function(){ + player.addMark('zhengjian_mark',1,false); + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=0; + }, + mark:true, + intro:{ + content:'已使用/打出过#张牌', + }, + }, + gaoyuan:{ + audio:2, + trigger:{target:'useCardToTarget'}, + direct:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(player.countCards('he')==0) return false; + return game.hasPlayer(function(current){ + return current!=event.player&¤t!=player&& + current.hasSkill('zhengjian_mark')&&lib.filter.targetEnabled(event.card,event.player,current); + }); + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var trigger=_status.event; + if(target!=player&&target!=trigger.source){ + if(target.hasSkill('zhengjian_mark')&&lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true; + } + return false; + }, + ai1:function(card){ + return get.unuseful(card)+9; + }, + ai2:function(target){ + if(_status.event.player.countCards('h','shan')){ + return -get.attitude(_status.event.player,target); + } + if(get.attitude(_status.event.player,target)<5){ + return 6-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==1&&player.countCards('h','shan')==0){ + return 10-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==2&&player.countCards('h','shan')==0){ + return 8-get.attitude(_status.event.player,target); + } + return -1; + }, + prompt:get.prompt('gaoyuan'), + prompt2:'弃置一张牌,将此【杀】转移给一名有“诤”的角色', + source:trigger.player, + card:trigger.card, + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill(event.name,target); + player.discard(result.cards); + var evt=trigger.getParent(); + evt.triggeredTargets2.remove(player); + evt.targets.remove(player); + evt.targets.push(target); + } + }, + }, + //一 将 成 名 + zhilve:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ + 'step 0' + if(!player.canMoveCard()) event._result={index:1}; + else player.chooseControl().set('choiceList',[ + '移动场上的一张牌', + '本回合的摸牌阶段多摸一张牌且第一张杀无距离次数限制', + ]).set('ai',function(){return 1}); + 'step 1' + if(result.index==1){ + player.addTempSkill('zhilve_yingzi'); + if(!player.getHistory('useCard',function(card){ + return card.card.name=='sha'; + }).length) player.addTempSkill('zhilve_xiandeng'); + event.finish(); + } + else player.moveCard(true); + 'step 2' + if(result.position=='e') player.loseHp(); + else player.addTempSkill('zhilve_dis'); + }, + subSkill:{ + dis:{ + mod:{ + maxHandcard:function(player,num){ + return num-1; + }, + }, + }, + yingzi:{ + trigger:{player:'phaseDrawBegin2'}, + popup:false, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){trigger.num++}, + }, + xiandeng:{ + mod:{ + targetInRange:function(card,player){ + if(card.name=='sha') return true; + }, + }, + trigger:{player:'useCard1'}, + forced:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + player.removeSkill(event.name); + if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat('card'); + if(stat&&stat.sha) stat.sha--; + } + }, + }, + }, + }, + xhzhiyan:{ + enable:'phaseUse', + audio:2, + filter:function(event,player){ + return player.countCards('h')!=player.maxHp; + }, + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + var num=Math.max(0,player.countCards('h')-player.maxHp); + return [num,num]; + }, + check:function(card){ + var player=_status.event.player; + if(player.getUseValue(card)<=0&&game.hasPlayer(function(current){ + return current!=player&&get.value(card,current)*get.attitude(player,current)>0; + })) return 1; + return 0; + }, + content:function(){ + 'step 0' + if(!cards.length){ + player.draw(player.maxHp-player.countCards('h')); + player.addTempSkill('zishou2'); + event.finish(); + } + else{ + cards=cards.filterInD('d'); + if(cards.length) player.chooseButton(['是否将其中的一张牌交给一名其他角色?',cards]).set('',function(button){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current!=player&&get.value(button.link,current)*get.attitude(player,current)>0; + })) return Math.abs(get.value(button.link)); + return 0; + }); + else event.finish(); + } + 'step 1' + if(result.bool){ + event.card=result.links[0]; + player.chooseTarget(true,lib.filter.notMe,'选择一名其他角色获得'+get.translation(event.card)).set('ai',function(target){ + return get.value(_status.event.getParent().card,target)*get.attitude(_status.event.player,target); + }); + } + else event.finish(); + 'step 2' + var target=result.targets[0]; + player.line(target,'green'); + target.gain(card,'gain2','log'); + }, + ai:{ + order:function(obj,player){ + if(player.countCards('h')>player.maxHp) return 10; + return 0.5; + }, + result:{ + player:1, + }, + }, + }, + //水 果 忍 者 + zhengjing_guanju:{audio:true}, + zhengjing:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('zhengjing3'); + }, + content:function(){ + "step 0" + //game.trySkillAudio('zhengjing_guanju',player); + if(_status.connectMode) event.time=lib.configOL.choose_timeout; + var cards=[]; + var names=[]; + while(true){ + var card=get.cardPile(function(carde){ + return carde.name!='du'&&!names.contains(carde.name); + }); + if(card){ + cards.push(card); + names.push(card.name); + if(cards.length==3&&!get.isLuckyStar(player)&&Math.random()<0.33) break; + if(cards.length==4&&!get.isLuckyStar(player)&&Math.random()<0.5) break; + if(cards.length==5) break; + if(cards.length>=6) break; + } + else break; + }; + event.cards=cards; + if(!cards.length){event.finish();return;}; + names.push('du'); + var names2=names.slice(0); + for(var i=0;i<4;i++){ + names=names.concat(names2); + } + names.randomSort(); + event.videoId=lib.status.videoId++; + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var switchToAuto=function(){ + names.remove('du'); + game.pause(); + game.countChoose(); + setTimeout(function(){ + _status.imchoosing=false; + event._result={ + bool:true, + links:names.slice(0), + }; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + game.resume(); + },5000); + }; + var createDialog=function(player,id){ + if(_status.connectMode) lib.configOL.choose_timeout='30'; + if(player==game.me) return; + var str=get.translation(player)+'正在整理经书...
    '; + ui.create.dialog(str).videoId=id; + }; + var chooseButton=function(list){ + var event=_status.event; + event.settleed=false; + event.finishedx=[]; + event.map={}; + event.zhengjing=list; + event.zhengjing_nodes=[]; + event.map=[]; + event.dialog=ui.create.dialog('forcebutton','hidden'); + event.dialog.textPrompt=event.dialog.addText('及时点击卡牌,但不要点到毒了!'); + event.switchToAuto=function(){ + event._result={ + bool:true, + links:event.finishedx.slice(0), + }; + event.dialog.close(); + game.resume(); + _status.imchoosing=false; + }; + event.dialog.classList.add('fixed'); + event.dialog.classList.add('scroll1'); + event.dialog.classList.add('scroll2'); + event.dialog.classList.add('fullwidth'); + event.dialog.classList.add('fullheight'); + event.dialog.classList.add('noupdate'); + event.dialog.open(); + event.settle=function(du){ + if(event.settleed) return; + event.settleed=true; + if(du){ + if(lib.config.background_speak) game.playAudio('skill','zhengjing_boom'); + event.dialog.textPrompt.innerHTML='
    叫你别点毒你非得点 这下翻车了吧'; + } + else { + if(lib.config.background_speak) game.playAudio('skill','zhengjing_finish'); + event.dialog.textPrompt.innerHTML='
    整理经典结束!共整理出'+get.cnNumber(event.finishedx.length)+'份经典'; + } + while(event.zhengjing_nodes.length){ + event.zhengjing_nodes.shift().delete(); + } + setTimeout(function(){ + event.switchToAuto(); + },1000); + }; + + var click=function(){ + var name=this.name; + if(name=='du'){ + event.zhengjing.length=0; + event.settle(true); + } + else{ + if(lib.config.background_speak) game.playAudio('skill','zhengjing_click'); + if(!event.map[name]) event.map[name]=0; + event.map[name]++; + if(event.map[name]>1) event.finishedx.add(name); + } + event.zhengjing_nodes.remove(this); + this.style.transition='all 0.5s'; + this.style.transform='scale(1.2)'; + this.delete(); + }; + var addNode=function(){ + if(event.zhengjing.length){ + var card=ui.create.card(ui.special,'noclick',true); + card.init(['','',event.zhengjing.shift()]); + card.addEventListener(lib.config.touchscreen?'touchend':'click',click); + event.zhengjing_nodes.push(card); + card.style.position='absolute'; + var rand1=Math.round(Math.random()*100); + var rand2=Math.round(Math.random()*100); + var rand3=Math.round(Math.random()*40)-20; + card.style.left='calc('+rand1+'% - '+rand1+'px)'; + card.style.top='calc('+rand2+'% - '+rand2+'px)'; + card.style.transform='scale(0.8) rotate('+rand3+'deg)'; + card.style.opacity=0; + event.dialog.appendChild(card); + ui.refresh(card); + card.style.opacity=1; + card.style.transform='scale(1) rotate('+rand3+'deg)'; + } + if(event.zhengjing_nodes.length>(event.zhengjing.length>0?2:0)) event.zhengjing_nodes.shift().delete(); + if(event.zhengjing.length||event.zhengjing_nodes.length) setTimeout(function(){ + addNode(); + },800); + else event.settle(); + }; + + game.pause(); + game.countChoose(); + addNode(); + }; + //event.switchToAuto=switchToAuto; + game.broadcastAll(createDialog,player,event.videoId); + if(event.isMine()){ + chooseButton(names); + } + else if(event.isOnline()){ + event.player.send(chooseButton,names); + event.player.wait(); + game.pause(); + } + else{ + switchToAuto(); + } + "step 1" + game.broadcastAll(function(id,time){ + if(_status.connectMode) lib.configOL.choose_timeout=time; + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + },event.videoId,event.time); + var result=event.result||result; + for(var i=0;i0; + }) + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('jimeng'),function(card,player,target){ + return target!=player&&target.countGainableCards(player,'he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(player.hp>1&&get.attitude(player,target)<2) return 0; + return get.effect(target,{name:'shunshou'},player,player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('jimeng',target); + player.gainPlayerCard(target,'he',true); + } + else event.finish(); + 'step 2' + var hs=player.getCards('he'); + if(player.hp>0&&hs.length){ + if(hs.length<=player.hp) event._result={bool:true,cards:hs}; + else player.chooseCard(player.hp,true,'交给'+get.translation(target)+get.cnNumber(player.hp)+'张牌','he',true); + } + else event.finish(); + 'step 3' + target.gain(result.cards,player,'giveAuto'); + }, + }, + shuaiyan:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + filter:function(event,player){ + return player.countCards('h')>1; + }, + check:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he')&&lib.skill.shuaiyan.check2(current,player); + }); + }, + check2:function(target,player){ + if(get.itemtype(player)!='player') player=_status.event.player; + return -get.attitude(player,target)/target.countCards('he'); + }, + content:function(){ + 'step 0' + player.showHandcards(get.translation(player)+'发动了【率言】'); + 'step 1' + var filter=function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }; + if(game.hasPlayer(function(current){ + return filter('我约等于白板',player,current); + })){ + player.chooseTarget(true,filter,'选择一名其他角色,令其交给你一张牌').set('ai',lib.skill.shuaiyan.check2); + } + else event.finish(); + 'step 2' + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); + 'step 3' + player.gain(result.cards,target,'giveAuto') + }, + }, + relihuo:{ + audio:2, + group:['relihuo_baigei','relihuo_damage'], + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(event.card.name=='sha'&&!event.card.nature) return true; + }, + check:function(event,player){ + return false; + }, + content:function(){ + trigger.card.nature='fire'; + trigger.relihuo=true; + }, + }, + relihuo_damage:{ + trigger:{source:'damageBegin1'}, + forced:true, + audio:'relihuo', + filter:function(event,player){ + return event.getParent(2).relihuo==true; + }, + content:function(){ + trigger.num++; + }, + }, + relihuo_baigei:{ + trigger:{player:'useCardAfter'}, + forced:true, + audio:'relihuo', + filter:function(event,player){ + if(event.card.name!='sha'||event.card.nature!='fire') return false; + var num=0; + player.getHistory('sourceDamage',function(evt){ + if(evt.card==event.card) num+=evt.num; + }); + return num>1; + }, + content:function(){ + var num=0; + player.getHistory('sourceDamage',function(evt){ + if(evt.card==trigger.card) num+=evt.num; + }); + player.loseHp(Math.floor(num/2)); + }, + }, + gongsun:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>1; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt2('gongsun'), + selectCard:2, + filterCard:lib.filter.cardDiscardable, + filterTarget:lib.filter.notMe, + position:'he', + ai1:function(){return -1}, + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('gongsun',target); + player.discard(result.cards); + player.addTempSkill('gongsun_shadow',{player:['phaseBegin','die']}); + var list=[]; + for(var i=0;i0) str+='
    ' + str+=get.translation(shadow[i][0]); + str+=':'; + str+=get.translation(shadow[i][1]); + } + return str; + }, + }, + mod:{ + cardEnabled:function(card,player){ + var list=player.storage.gongsun_shadow; + for(var i=0;i0&&!player.hasSkill('duoduan_im'); + }, + content:function(){ + 'step 0' + player.chooseCard('he',get.prompt2('duoduan')).set('ai',function(card){ + if(_status.event.goon) return 8-get.value(card); + return 0; + }).set('goon',function(){ + if(get.attitude(trigger.player,player)>0) return true; + if(!player.hasShan()) return true; + return event.getRand()<0.5; + }()); + 'step 1' + if(result.bool){ + player.addTempSkill('duoduan_im'); + var card=result.cards[0]; + player.logSkill('duoduan',trigger.player); + player.lose(card,ui.discardPile,'visible'); + player.$throw(card,1000); + game.log(player,'将',card,'置入弃牌堆'); + player.draw(); + } + else event.finish(); + 'step 2' + trigger.player.chooseToDiscard('弃置一张牌令'+get.translation(player)+'不能闪避此【杀】,或点「取消」摸两张牌并令此【杀】对其无效').set('ai',function(card){ + if(_status.event.goon) return 6-get.value(card); + return 0; + }).set('goon',get.attitude(trigger.player,player)<0); + 'step 3' + if(result.bool){ + trigger.directHit.add(player); + } + else{ + trigger.player.draw(2); + trigger.excluded.add(player); + } + }, + }, + duoduan_im:{ + //'im' refers to 'Iwasawa Masami' in 'Angel Beats!' + //Although she disappeared in the Episode 3 of the anime, but her route in the game is really worth to play. + }, + chengzhao:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + var num=0; + player.getHistory('gain',function(evt){ + num+=evt.cards.length; + }); + if(num<2) return false; + return player.countCards('h')>0&&game.hasPlayer(function(current){ + return player!=current&&player.canCompare(current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('chengzhao'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)/target.countCards('h'); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('chengzhao',target); + player.chooseToCompare(target); + } + else event.finish(); + 'step 2' + if(result.bool){ + var card={name:'sha',isCard:true}; + if(player.canUse(card,target,false)) player.useCard(card,target,false).card.chengzhao=true; + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!arg||!arg.card||arg.card.chengzhao!=true) return false; + }, + }, + }, + rezhengrong:{ + trigger:{player:'useCardAfter'}, + direct:true, + audio:'drlt_zhenrong', + filter:function(event,player){ + if(!event.targets) return false; + if(!event.isPhaseUsing(player)) return false; + var bool=false; + for(var i=0;i0; + }).set('ai',function(target){ + return (1-get.attitude(_status.event.player,target))/target.countCards('he'); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=result.targets[0]; + player.logSkill('rezhengrong',target); + var card=target.getCards('he').randomGet(); + game.log(player,'选择了',card); + target.$give(card,player,false); + target.lose(card,ui.special,'toStorage'); + if(!player.storage.rezhengrong) player.storage.rezhengrong=[]; + player.storage.rezhengrong.push(card); + player.markSkill('rezhengrong'); + game.delayx(); + } + }, + marktext:'荣', + intro:{ + content:'cards', + onunmark:'throw', + }, + }, + rehongju:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:'drlt_hongju', + forced:true, + unique:true, + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + derivation:'reqingce', + filter:function(event,player){ + return player.storage.rezhengrong&&player.storage.rezhengrong.length>=3&&game.dead.length>0; + }, + content:function(){ + 'step 0' + player.awakenSkill('rehongju'); + player.draw(player.storage.rezhengrong.length); + 'step 1' + if(player.countCards('h')==0) event.goto(3); + else{ + var dialog=['请选择要交换的手牌和「荣」,或点「取消」','
    「征荣」牌
    ',player.storage.rezhengrong,'
    手牌区
    ',player.getCards('h')]; + var next=player.chooseButton(dialog); + next.set('filterButton',function(button){ + var ss=_status.event.player.storage.rezhengrong; + var hs=_status.event.player.getCards('h'); + var sn=0; + var hn=0; + var ub=ui.selected.buttons; + for(var i=0;i=hs.length&&ss.contains(button.link)||hn>=ss.length&&hs.contains(button.link)); + }); + next.set('selectButton',function(){ + if(ui.selected.buttons.length==0) return 2; + var ss=_status.event.player.storage.rezhengrong; + var hs=_status.event.player.getCards('h'); + var sn=0; + var hn=0; + var ub=ui.selected.buttons; + for(var i=0;i0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('请选择要移去的「荣」',player.storage.rezhengrong,'hidden'); + }, + backup:function(links,player){ + return { + card:links[0], + filterCard:function(){return false}, + selectCard:-1, + filterTarget:function(card,player,target){ + return target.countDiscardableCards(player,'ej')>0; + }, + delay:false, + audio:'drlt_qingce', + content:lib.skill.reqingce.contentx, + ai:{ + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + if(att>0&&(target.countCards('j')>0||target.countCards('e',function(card){ + return get.value(card,target)<0; + }))) return 2; + if(att<0&&target.countCards('e')>0&&!target.hasSkillTag('noe')) return -1; + return 0; + }, + }, + }, + } + }, + prompt:function(links,player){ + return '弃置一名角色装备区或判定区内的一张牌'; + }, + }, + contentx:function(){ + 'step 0' + var card=lib.skill.reqingce_backup.card; + player.$throw(card); + game.cardsDiscard(card); + player.storage.rezhengrong.remove(card); + player[player.storage.rezhengrong.length>0?'markSkill':'unmarkSkill']('rezhengrong'); + 'step 1' + if(target.countDiscardableCards(player,'ej')>0){ + player.discardPlayerCard('ej',true,target); + } + }, + ai:{ + order:8, + result:{ + player:function(player){ + if(game.hasPlayer(function(current){ + var att=get.attitude(player,current); + if((att>0&¤t.countCards('j')>0)||(att<0&¤t.countCards('e')>0)) return true; + return false; + })) return 1; + return 0; + }, + }, + }, + }, + fengji:{ + audio:2, + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return typeof player.storage.fengji=='number'&&player.countCards('h')>=player.storage.fengji; + }, + content:function(){ + player.draw(2); + player.addTempSkill('fengji3'); + }, + group:'fengji2', + intro:{ + content:'上回合结束时的手牌数:#', + }, + }, + fengji2:{ + trigger:{player:'phaseEnd'}, + silent:true, + content:function(){ + player.storage.fengji=player.countCards('h'); + if(player.hasSkill('fengji')) player.markSkill('fengji'); + }, + }, + fengji3:{ + mod:{ + maxHandcardBase:function(player,num){ + return player.maxHp; + }, + }, + }, + zhouxuan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt2('zhouxuan'), + filterCard:lib.filter.cardDiscardable, + filterTarget:lib.filter.notMe, + position:'he', + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0) return Math.max(1,target.hp)*target.countCards('h',function(card){ + return target.getUseValue(card)>0; + }); + return 0; + }, + }); + 'step 1' + if(result.bool){ + player.logSkill('zhouxuan',result.targets[0]); + player.discard(result.cards); + player.addSkill('zhouxuan2'); + result.targets[0].addTempSkill('zhouxuan_ai',{player:'phaseUseAfter'}); + player.storage.zhouxuan2={}; + player.storage.zhouxuan2.player=result.targets[0]; + var list=[]; + var basic=[]; + for(var i=0;i0&&(current.storage.zhouxuan2.isbasic?card.name:get.type(card,'trick'))==current.storage.zhouxuan2.card; + })) return num+10; + } + }, + }, + zhouxuan2:{ + intro:{ + mark:function(player,storage){ + return get.translation(storage.player)+'使用或打出下一张牌时,若此牌为'+get.translation(storage.card)+(storage.isbasic?'':'牌')+',你观看牌堆顶的三张牌并分配给任意角色'; + }, + }, + audio:'zhouxuan', + forced:true, + charlotte:true, + trigger:{global:['useCard','respond']}, + filter:function(event,player){ + if(event.zhouxuanable) return true; + if(player.storage.zhouxuan2){ + var map=player.storage.zhouxuan2; + if(map.player!=event.player) return false; + delete player.storage.zhouxuan2; + player.unmarkSkill('zhouxuan2'); + if(map.card!=(map.isbasic?event.card.name:get.type(event.card,'trick'))) return false; + event.zhouxuanable=true; + return true; + } + return false; + }, + logTarget:'player', + content:function(){ + "step 0" + event.cards=game.cardsGotoOrdering(get.cards(3)).cards; + "step 1" + if(event.cards.length>1){ + player.chooseCardButton('周旋:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0],player,'raw')<0); + } + "step 3" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); + event.goto(1); + } + }, + }, + reshanxi:{ + audio:'shanxi', + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.hp>0&&player.countCards('h',function(card){ + if(_status.connectMode) return true; + return get.color(card)=='red'&&get.type(card)=='basic'; + })>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterCard:function(card){ + return get.color(card)=='red'&&get.type(card)=='basic'&&lib.filter.cardDiscardable.apply(this,arguments); + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }, + prompt:get.prompt('reshanxi'), + prompt2:'弃置一张红色基本牌并选择一名其他角色,将其的至多X张牌置于其武将牌上直到回合结束。(X为你的体力值)', + ai1:function(){return -1}, + }); + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('reshanxi',event.target); + player.discard(result.cards); + } + else event.finish(); + 'step 2' + var max=Math.min(player.hp,target.countCards('he')); + if(max>0){ + player.choosePlayerCard('he',target,true,[1,max]).set('forceAuto',true).set('prompt','将'+get.translation(target)+'的至多'+get.cnNumber(max)+'张牌置于其武将牌上'); + } + else event.finish(); + 'step 3' + target.addSkill('reshanxi2'); + target.storage.reshanxi2.addArray(result.cards); + target.lose(result.cards,ui.special,'toStorage'); + game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌'); + target.markSkill('reshanxi2'); + }, + }, + reshanxi2:{ + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return player.storage.reshanxi2&&player.storage.reshanxi2.length>0; + }, + content:function(){ + game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.reshanxi2,'draw','fromStorage').cards.length)+'张〖闪袭〗牌'); + player.storage.reshanxi2.length=0; + player.removeSkill('reshanxi2'); + }, + intro:{ + onunmark:'throw', + content:'cardCount', + }, + }, + reqizhou:{ + trigger:{player:['equipEnd','loseEnd']}, + forced:true, + popup:false, + derivation:['reyingzi','qixi','rexuanfeng'], + filter:function(event,player){ + if(player.equiping) return false; + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i3) suits.length=3; + if(player.additionalSkills.reqizhou){ + return player.additionalSkills.reqizhou.length!=suits.length; + } + else{ + return suits.length>0; + } + }, + content:function(){ + lib.skill.reqizhou.init(player,'reqizhou'); + }, + init:function(player,skill){ + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i3) suits.length=3; + player.removeAdditionalSkill(skill); + switch(suits.length){ + case 1:player.addAdditionalSkill(skill,['reyingzi']);break; + case 2:player.addAdditionalSkill(skill,['reyingzi','qixi']);break; + case 3:player.addAdditionalSkill(skill,['reyingzi','qixi','rexuanfeng']);break; + } + }, + ai:{ + threaten:1.2 + } + }, + zhaohan:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.phaseNumber<8; + }, + check:function(event,player){ + return player.phaseNumber<3; + }, + content:function(){ + if(player.phaseNumber<5){ + player.gainMaxHp(); + player.recover(); + } + else player.loseMaxHp(); + }, + }, + rangjie:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + 'step 0' + event.count=trigger.num; + 'step 1' + event.count--; + var choiceList=['获得一张指定类型的牌']; + if(player.canMoveCard()) choiceList.push('移动场上的一张牌'); + player.chooseControl('cancel2').set('choiceList',choiceList).set('prompt',get.prompt('rangjie')).set('ai',function(){ + var player=_status.event.player; + if(player.canMoveCard(true)) return 1; + return 0; + }); + 'step 2' + if(result.control=='cancel2') event.finish(); + else{ + player.logSkill('rangjie'); + player.draw(); + if(result.index==0){ + player.chooseControl('basic','trick','equip').set('prompt','选择获得一种类型的牌').set('ai',function(){ + var player=_status.event.player; + if(player.hp<=3&&!player.countCards('h',{name:['shan','tao']})) return 'basic'; + if(player.countCards('he',{type:'equip'})<2) return 'equip'; + return 'trick'; + }); + } + else{ + player.moveCard(true); + event.goto(4); + } + } + 'step 3' + var card=get.cardPile2(function(card){ + return get.type(card,'trick')==result.control; + }); + if(card) player.gain(card,'gain2','log'); + 'step 4' + if(event.count>0) event.goto(1); + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + var num=1; + if(get.attitude(player,target)>0){ + if(player.needsToDiscard()){ + num=0.7; + } + else{ + num=0.5; + } + } + if(target.hp>=4) return [1,num*2]; + if(target.hp==3) return [1,num*1.5]; + if(target.hp==2) return [1,num*0.5]; + } + }, + }, + }, + }, + yizheng:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.hp<=player.hp&&player.canCompare(current); + }); + }, + filterTarget:function(card,player,current){ + return current.hp<=player.hp&&player.canCompare(current); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + target.skip('phaseDraw'); + target.addTempSkill('yizheng2',{player:'phaseDrawSkipped'}); + } + else player.loseMaxHp(); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.skipList.contains('phaseDraw')||target.hasSkill('pingkou')) return 0; + var hs=player.getCards('h').sort(function(a,b){ + return b.number-a.number; + }); + var ts=target.getCards('h').sort(function(a,b){ + return b.number-a.number; + }); + if(!hs.length||!ts.length) return 0; + if(hs[0].number>ts[0].number) return -1; + return 0; + }, + }, + }, + }, + yizheng2:{ + mark:true, + intro:{content:'跳过下回合的摸牌阶段'}, + }, + rw_zhuge_skill:{ + equipSkill:true, + audio:true, + firstDo:true, + trigger:{player:'useCard1'}, + forced:true, + filter:function(event,player){ + return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase'; + }, + content:function(){ + trigger.audioed=true; + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return Infinity; + } + } + }, + }, + xinqingjian:{ + audio:'qingjian', + trigger:{player:'gainEnd'}, + direct:true, + usable:1, + filter:function(event,player){ + return event.getParent('phaseDraw').player!=player&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt2('xinqingjian'),'he',[1,player.countCards('he')]).ai=function(){return -1}; + 'step 1' + if(result.bool){ + player.logSkill('xinqingjian'); + player.addSkill('xinqingjian2'); + player.storage.xinqingjian2.addArray(result.cards); + game.log(player,'将'+get.cnNumber(player.lose(result.cards,ui.special,'toStorage').cards.length)+'张牌置于其武将牌上'); + player.markSkill('xinqingjian2'); + } + else player.storage.counttrigger.xinqingjian--; + }, + }, + xinqingjian2:{ + audio:'xinqingjian', + charlotte:true, + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.xinqingjian2&&player.storage.xinqingjian2.length>0; + }, + init:function(player){ + if(!player.storage.xinqingjian2) player.storage.xinqingjian2=[]; + }, + content:function(){ + 'step 0' + player.chooseTarget(true,lib.filter.notMe).set('createDialog',['清俭:选择一名角色获得这些牌'+(player.storage.xinqingjian2.length>1?',然后摸一张牌':''),player.storage.xinqingjian2]); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'thunder'); + if(target.gain(player.storage.xinqingjian2,player,'giveAuto','fromStorage').cards.length>1) player.draw(); + player.storage.xinqingjian2.length=0; + player.removeSkill('xinqingjian2'); + } + }, + intro:{ + onunmark:'throw',mark:function(dialog,content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + dialog.addAuto(content); + } + else{ + return '共有'+get.cnNumber(content.length)+'张牌'; + } + } + }, + content:function(content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + return get.translation(content); + } + return '共有'+get.cnNumber(content.length)+'张牌'; + } + } + }, + }, + zhongzuo:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.getHistory('damage').length>0||player.getHistory('sourceDamage').length>0; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhongzuo'),'令一名角色摸两张牌。若其已受伤,则你摸一张牌。').set('ai',function(target){ + if(target.hasSkillTag('nogain')&&target!=_status.currentPhase) return target.isDamaged()?0:1; + var att=get.attitude(_status.event.player,target); + if(target.isDamaged()) att=att*1.2; + return att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('zhongzuo',target); + target.draw(2); + if(target.isDamaged()) player.draw(); + } + }, + }, + wanlan:{ + audio:2, + trigger:{global:'dying'}, + check:function(event,player){ + if(get.attitude(player,event.player)<4) return false; + if(player.countCards('h',function(card){ + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardSavable',player); + if(mod!='unchanged') return mod; + var savable=get.info(card).savable; + if(typeof savable=='function') savable=savable(card,player,event.player); + return savable; + })>=1-event.player.hp) return false; + if(event.player==player||event.player==get.zhu(player)) return true; + if(_status.currentPhase&&get.damageEffect(_status.currentPhase,player,player)<0) return false; + return !player.hasUnknown(); + }, + limited:true, + unique:true, + filter:function(event,player){ + return event.player.hp<=0; + }, + skillAnimation:true, + animationColor:'thunder', + logTarget:'player', + content:function(){ + 'step 0' + player.awakenSkill('wanlan'); + var hs=player.getCards('h') + if(hs.length) player.discard(hs); + 'step 1' + var num=1-trigger.player.hp; + if(num) trigger.player.recover(num); + 'step 2' + if(_status.currentPhase&&_status.currentPhase.isAlive()){ + var next=_status.currentPhase.damage(); + event.next.remove(next); + trigger.after.push(next); + } + }, + }, + zhiyi:{ + audio:2, + trigger:{player:['useCard','respond']}, + forced:true, + filter:function(event,player){ + if(get.type(event.card)!='basic') return false; + var history=player.getHistory('useCard',function(evt){ + return get.type(evt.card)=='basic'; + }).concat(player.getHistory('respond',function(evt){ + return get.type(evt.card)=='basic'; + })); + return history.length==1&&history[0]==event; + }, + content:function(){ + 'step 0' + var info=get.info(trigger.card); + if(!info||!info.enable) event._result={index:0}; + else{ + var evt=trigger; + if(evt.respondTo&&evt.getParent('useCard').name=='useCard') evt=evt.getParent('useCard'); + event.evt=evt; + player.chooseControl().set('prompt','执义:请选择一项').set('choiceList',[ + '摸一张牌', + '于'+get.translation(evt.card)+'的使用结算结束之后视为使用一张'+get.translation({name:trigger.card.name,nature:trigger.card.nature,isCard:true}), + ]).set('ai',function(){return _status.event.choice}).set('choice',function(){ + var card={name:trigger.card.name,nature:trigger.card.nature,isCard:true}; + if(card.name=='sha'){ + if(player.getUseValue(card)>0) return 1; + } + else if(card.name=='tao'){ + var hp=player.maxHp-player.hp; + if(trigger.targets.contains(player)) hp--; + return hp>0?1:0; + } + return 0; + }()); + } + 'step 1' + if(result.index==0){ + player.draw(); + } + else{ + var next=player.chooseUseTarget({name:trigger.card.name,nature:trigger.card.nature,isCard:true},false,true); + _status.event.next.remove(next); + event.evt.after.push(next); + next.logSkill='zhiyi'; + } + }, + }, + //表演测试 + qiaosi_map:{charlotte:true}, + qiaosi:{ + audio:'xinfu_qiaosi', + derivation:'qiaosi_map', + enable:'phaseUse', + usable:1, + content:function(){ + "step 0" + event.videoId=lib.status.videoId++; + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var switchToAuto=function(){ + game.pause(); + game.countChoose(); + setTimeout(function(){ + _status.imchoosing=false; + event._result={ + bool:true, + links:['qiaosi_c1','qiaosi_c6'].concat(['qiaosi_c2','qiaosi_c3','qiaosi_c4','qiaosi_c5'].randomGets(1)), + }; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + game.resume(); + },5000); + }; + var createDialog=function(player,id){ + if(player==game.me) return; + var str=get.translation(player)+'正在表演...
    '; + for(var i=1;i<7;i++){ + str+=get.translation('qiaosi_c'+i); + if(i%3!=0) str+='  '; + if(i==3) str+='
    '; + } + ui.create.dialog(str,'forcebutton').videoId=id; + }; + var chooseButton=function(player){ + var event=_status.event; + player=player||event.player; + event.status={ + qiaosi_c1:0, + qiaosi_c2:0, + qiaosi_c3:0, + qiaosi_c4:0, + qiaosi_c5:0, + qiaosi_c6:0, + } + event.map={ + qiaosi_c1:[10,15], + qiaosi_c2:[20,35], + qiaosi_c3:[40,60], + qiaosi_c4:[40,60], + qiaosi_c5:[20,35], + qiaosi_c6:[10,15], + } + event.finishedx=[]; + event.str='请开始你的表演
    qiaosi_c1% qiaosi_c2% qiaosi_c3%
    qiaosi_c4%qiaosi_c5% qiaosi_c6%'; + event.dialog=ui.create.dialog(event.str,'forcebutton','hidden'); + event.dialog.addText('
  • 点击下方的按钮,可以增加按钮对应的角色的「表演完成度」。对于不同的角色,点击时增加的完成度不同,最终获得的牌也不同。一次表演最多只能完成3名角色的进度。',false); + event.dialog.open(); + for(var i in event.status){ + event.dialog.content.childNodes[0].innerHTML=event.dialog.content.childNodes[0].innerHTML.replace(i,event.status[i]); + } + for(var i=0;i=100){ + event.status[link]=100; + var str=event.str.slice(0); + for(var i in event.status){ + str=str.replace(i,event.status[i]); + } + event.dialog.content.childNodes[0].innerHTML=str; + event.finishedx.push(link); + if(event.finishedx.length>=3){ + event._result={ + bool:true, + links:event.finishedx.slice(0), + }; + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + } + } + else{ + var str=event.str.slice(0); + for(var i in event.status){ + str=str.replace(i,event.status[i]); + } + event.dialog.content.childNodes[0].innerHTML=str; + } + }); + for(var i=0;i2; + })) return 0; + return 1; + }); + "step 3" + if(result.index==0){ + player.chooseCardTarget({ + position:'he', + filterCard:true, + selectCard:event.num, + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + return 1; + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + return att; + }, + prompt:'选择'+get.cnNumber(event.num)+'张牌,交给一名其他角色。', + forced:true, + }); + } + else{ + player.chooseToDiscard(event.num,true,'he'); + event.finish(); + } + "step 4" + if(result.bool){ + var target=result.targets[0]; + player.give(result.cards,target); + } + }, + ai:{ + order:10, + result:{player:1}, + threaten:3.2, + } + }, + refuhai:{ + audio:'xinfu_fuhai', + enable:'phaseUse', + usable:1, + content:function(){ + 'step 0' + event.current=player.next; + event.upper=[]; + event.lower=[]; + event.acted=[]; + event.num=0; + event.stopped=false; + 'step 1' + event.acted.push(event.current); + event.current.chooseControl('潮起','潮落').set('prompt','潮鸣起乎?潮鸣落乎?').ai=function(){ + return Math.random()<0.5?0:1; + }; + 'step 2' + if(!event.chosen) event.chosen=result.control; + if(event.chosen!=result.control) event.stopped=true; + if(!event.stopped) event.num++; + if(result.control=='潮起'){ + event.upper.push(event.current) + } + else event.lower.push(event.current); + event.current=event.current.next; + if(event.current!=player&&!event.acted.contains(event.current)) event.goto(1); + 'step 3' + for(var i=0;i1) player.draw(num); + }, + ai:{ + order:10, + result:{player:1}, + }, + }, + rebiaozhao:{ + audio:'biaozhao', + intro:{ + content:"cards", + }, + trigger:{ + player:"phaseJieshuBegin", + }, + direct:true, + filter:function (event,player){ + return player.countCards('he')>0&&!player.storage.rebiaozhao; + }, + content:function (){ + 'step 0' + player.chooseCard('he',get.prompt2('rebiaozhao')).ai=function(card){ + return 6-get.value(card); + } + 'step 1' + if(result.bool){ + player.addSkill('rebiaozhao2'); + player.addSkill('rebiaozhao3'); + player.logSkill('rebiaozhao'); + player.$give(result.cards,player,false); + player.lose(result.cards,ui.special,'toStorage','visible'); + player.storage.rebiaozhao=result.cards; + player.markSkill('rebiaozhao'); + } + }, + }, + "rebiaozhao2":{ + trigger:{ + global:["loseEnd","cardsDiscardEnd"], + }, + charlotte:true, + forced:true, + audio:"biaozhao", + filter:function (event,player){ + if(!player.storage.rebiaozhao) return false; + var num=get.number(player.storage.rebiaozhao[0]); + for(var i=0;i0) return 0; + if(player.maxHp-player.countCards('h')>1) return 1; + return Math.random()>0.5?0:1; + }); + 'step 2' + if(result.index==0) source.draw(2); + else{ + player.addTempSkill('reqianxin3') + player.addMark('reqianxin3',2,false) + } + 'step 3' + if(player.storage.reqianxin2.length) event.goto(0); + else player.removeSkill('reqianxin2'); + }, + }, + reqianxin3:{ + onremove:true, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('reqianxin3'); + }, + }, + }, + renshi:{ + audio:2, + trigger:{player:'damageBegin4'}, + forced:true, + filter:function(event,player){ + return player.isDamaged()&&event.card&&event.card.name=='sha'; + }, + content:function(){ + 'step 0' + trigger.cancel(); + var cards=trigger.cards.filterInD(); + if(cards.length) player.gain(cards,'gain2','log'); + 'step 1' + player.loseMaxHp(); + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.card&&arg.card.name=='sha') return true; + return false; + }, + }, + }, + wuyuan:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + filterCard:{name:'sha'}, + filterTarget:lib.filter.notMe, + check:function(card){ + var player=_status.event.player; + if(get.color(card)=='red'&&game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged()&&get.attitude(player,current)>2; + })) return 2; + if(get.nature(card)) return 1.5; + return 1; + }, + discard:false, + content:function(){ + 'step 0' + target.gain(cards,player,'giveAuto'); + player.recover(); + 'step 1' + var num=1; + if(get.nature(cards[0])) num++; + target.draw(num); + if(get.color(cards[0])=='red') target.recover(); + }, + ai:{ + order:1, + result:{ + player:function(player,target){ + if(player.isDamaged()) return 1; + return 0; + }, + target:function(player,target){ + if(ui.selected.cards.length){ + var num=1; + if(get.nature(ui.selected.cards[0])) num++; + if(target.hasSkillTag('nogain')) num=0; + if(get.color(ui.selected.cards[0])=='red') return num+2 + else return num+1; + } + return 1; + }, + }, + }, + }, + huaizi:{ + mod:{ + maxHandcardBase:function(player,num){ + return player.maxHp; + }, + }, + //audio:2, + //trigger:{player:'phaseDiscardBegin'}, + forced:true, + firstDo:true, + filter:function(event,player){ + return player.isDamaged()&&player.countCards('h')>player.hp; + }, + content:function(){}, + }, + rexushen:{ + derivation:['new_rewusheng','xindangxian'], + audio:'xinfu_xushen', + limited:true, + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.sex=='male'; + }) + }, + skillAnimation:true, + animationColor:'fire', + content:function(){ + player.addSkill('rexushen2'); + player.awakenSkill('rexushen'); + player.loseHp(game.countPlayer(function(current){ + return current.sex=='male'; + })); + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.hp!=game.countPlayer(function(current){ + return current.sex=='male'; + })) return 0; + return game.hasPlayer(function(current){ + return get.attitude(player,current)>4&¤t.countCards('h','tao') + })?1:0; + }, + }, + }, + }, + rexushen2:{ + charlotte:true, + subSkill:{ + count:{ + trigger:{ + player:"recoverBegin", + }, + forced:true, + silent:true, + popup:false, + filter:function (event,player){ + if(!event.source) return false; + if(!player.isDying()) return false; + var evt=event.getParent('dying').getParent(2); + return evt.name=='rexushen'&&evt.player==player; + }, + content:function (){ + trigger.rexushen=true; + }, + sub:true, + }, + }, + group:["rexushen2_count"], + trigger:{ + player:"recoverAfter", + }, + filter:function (event,player){ + if(player.isDying()) return false; + return event.rexushen==true; + }, + direct:true, + silent:true, + popup:false, + content:function (){ + 'step 0' + player.removeSkill('rexushen2'); + player.chooseBool('是否令'+get.translation(trigger.source)+'获得技能〖武圣〗和〖当先〗').ai=function(){ + return get.attitude(player,trigger.source)>0; + }; + 'step 1' + if(result.bool){ + player.line(trigger.source,'fire'); + trigger.source.addSkillLog('new_rewusheng'); + trigger.source.addSkillLog('xindangxian'); + trigger.source.storage.xinfuli=true; + } + }, + }, + rezhennan:{ + audio:'xinfu_zhennan', + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + return event.player!=player&&event.targets&&event.targets.length&&event.targets.length>event.player.hp; + }, + direct:true, + content:function(){ + 'step 0' + var next=player.chooseToDiscard(get.prompt('rezhennan',trigger.player),'弃置一张牌并对其造成1点伤害','he'); + next.set('logSkill',['rezhennan',trigger.player]); + next.set('ai',function(card){ + var player=_status.event.player; + var target=_status.event.getTrigger().player; + if(get.damageEffect(target,player,player)>0) return 7-get.value(card); + return -1; + }); + 'step 1' + if(result.bool) trigger.player.damage(); + }, + }, + meiyong:{ + inherit:'xinfu_wuniang', + audio:'xinfu_wuniang', + content:function (){ + 'step 0' + player.chooseTarget(get.prompt('meiyong'),'获得一名其他角色的一张牌,然后其摸一张牌。',function(card,player,target){ + if(player==target) return false; + return target.countGainableCards(player,'he')>0; + }).set('ai',function(target){ + return 10-get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('meiyong',target); + player.gainPlayerCard(target,'he',true); + } + else event.finish(); + 'step 2' + target.draw(); + }, + }, + relianji:{ + audio:'wylianji', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.players.length>1; + }, + filterTarget:lib.filter.notMe, + targetprompt:['打人','被打'], + selectTarget:2, + multitarget:true, + content:function(){ + 'step 0' + game.delay(0.5); + if(targets[0].isDisabled(1)) event.goto(2); + 'step 1' + var target=targets[0]; + var equip1=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'; + }); + if(!equip1){ + player.popup('连计失败'); + game.log('牌堆中无装备'); + event.finish(); + return; + } + if(equip1.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ + equip1.remove(); + equip1=game.createCard('qibaodao',equip1.suit,equip1.number); + } + target.$draw(equip1); + target.chooseUseTarget(equip1,'noanimate','nopopup',true); + 'step 2' + game.updateRoundNumber(); + var list=['nanman','wanjian','huogong','juedou','sha']; + var list2=game.players.slice(0); + list2.remove(player); + for(var i=0;i2){ + event.trigger('remoucheng_awaken'); + } + }, + }, + }, + }, + remoucheng:{ + derivation:'rejingong', + trigger:{ + player:'remoucheng_awaken' + }, + forced:true, + audio:'moucheng', + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + player.awakenSkill('remoucheng'); + player.removeSkill('relianji'); + player.addSkill('rejingong'); + player.gainMaxHp(); + player.recover(); + }, + }, + rejingong:{ + audio:'jingong', + enable:'phaseUse', + delay:0, + usable:1, + content:function(){ + 'step 0' + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ + list.push('wy_meirenji'); + } + else{ + list.push('wy_xiaolicangdao'); + } + for(var i=0;i0; + })){ + if(name=='wy_meirenji'||name=='wy_xiaolicangdao') return Math.random()+0.5; + return Math.random(); + } + return 0; + }); + 'step 1' + if(result.bool){ + player.chooseUseTarget(result.links[0][2],true); + player.addTempSkill('jingong2'); + } + }, + ai:{ + order:2, + result:{ + player:function(player){ + if((player.hp<=2||player.needsToDiscard())&&!player.getStat('damage')) return 0; + return 1; + } + } + } + }, + shouye:{ + audio:2, + group:'shouye_after', + trigger:{target:"useCardToTarget"}, + filter:function(event,player){ + return event.player!=player&&event.targets.length==1; + }, + check:function(event,player){ + if(event.player==game.me||event.player.isOnline()) return get.attitude(player,event.player)<0; + return get.effect(player,event.card,event.player,player)<0; + }, + usable:1, + logTarget:'player', + content:function(){ + 'step 0' + player.line(trigger.player,'green'); + player.chooseToDuiben(trigger.player); + 'step 1' + if(result.bool){ + trigger.targets.remove(player); + trigger.getParent().triggeredTargets2.remove(player); + trigger.getParent().shouyeer=player; + } + }, + subSkill:{ + after:{ + sub:true, + trigger:{global:'useCardAfter'}, + forced:true, + silent:true, + popup:false, + filter:function(event,player){ + if(event.shouyeer!=player) return false; + if(event.cards){ + for(var i=0;i0; + }).ai=function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe'},player,player); + }; + 'step 1' + if(result.bool){ + result.targets.sortBySeat(); + event.targets=result.targets; + player.line(result.targets,'green'); + player.logSkill('liezhi',result.targets); + } + else event.finish(); + 'step 2' + event.current=targets.shift(); + player.discardPlayerCard(event.current,'hej',true) + if(targets.length) event.redo(); + }, + subSkill:{ + disable:{ + sub:true, + trigger:{player:'phaseAfter'}, + forced:true, + silent:true, + popup:false, + charlotte:true, + //filter:function(event){return !event.liezhi}, + content:function(){player.removeSkill('liezhi_disable')}, + }, + damage:{ + trigger:{player:'damage'}, + forced:true, + silent:true, + popup:false, + content:function(){player.addSkill('liezhi_disable')} + }, + }, + }, + xinzhanyi:{ + audio:'zhanyi', + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + check:function(card){ + var player=_status.event.player; + if(player.hp<3) return 0; + var type=get.type(card,'trick'); + if(type=='trick'){ + return 6-get.value(card); + } + else if(type=='equip'){ + if(player.hasSha()&&game.hasPlayer(function(current){ + return (player.canUse('sha',current)&& + get.attitude(player,current)<0&& + get.effect(current,{name:'sha'},player,player)>0) + })){ + return 6-get.value(card); + } + } + return 0; + }, + content:function(){ + player.loseHp(); + switch(get.type(cards[0],'trick',cards[0].original=='h'?player:false)){ + case 'basic':player.addTempSkill('xinzhanyi_basic');break; + case 'equip':player.addTempSkill('xinzhanyi_equip');break; + case 'trick':player.addTempSkill('xinzhanyi_trick');player.draw(3);break; + } + }, + ai:{ + order:9.1, + result:{ + player:1 + } + } + }, + xinzhanyi_basic1:{ + trigger:{player:"useCard"}, + filter:function(event,player){ + return event.skill=='xinzhanyi_basic_backup'&&!player.storage.xinzhanyi_basic1; + }, + forced:true, + silent:true, + popup:false, + content:function(){ + if(!trigger.baseDamage) trigger.baseDamage=1; + trigger.baseDamage++; + player.storage.xinzhanyi_basic1=true; + }, + }, + xinzhanyi_basic:{ + group:['xinzhanyi_basic1'], + onremove:function(p,s){ + delete p.storage[s+1]; + }, + enable:"chooseToUse", + filter:function (event,player){ + if(event.filterCard({name:'sha'},player,event)|| + event.filterCard({name:'jiu'},player,event)|| + event.filterCard({name:'tao'},player,event)){ + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + } + return false; + }, + chooseButton:{ + dialog:function (event,player){ + var list=[]; + if(event.filterCard({name:'sha'},player,event)){ + list.push(['基本','','sha']); + list.push(['基本','','sha','fire']); + list.push(['基本','','sha','thunder']); + } + if(event.filterCard({name:'tao'},player,event)){ + list.push(['基本','','tao']); + } + if(event.filterCard({name:'jiu'},player,event)){ + list.push(['基本','','jiu']); + } + return ui.create.dialog('战意',[list,'vcard'],'hidden'); + }, + check:function (button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })){ + switch(button.link[2]){ + case 'tao':return 5; + case 'jiu':{ + if(player.countCards('h',{type:'basic'})>=2) return 3; + }; + case 'sha': + if(button.link[3]=='fire') return 2.95; + else if(button.link[3]=='thunder') return 2.92; + else return 2.9; + } + } + return 0; + }, + backup:function (links,player){ + return { + audio:'zhanyi', + filterCard:function(card,player,target){ + return get.type(card)=='basic'; + }, + check:function(card,player,target){ + return 9-get.value(card); + }, + viewAs:{name:links[0][2],nature:links[0][3]}, + position:'he', + popname:true, + } + }, + prompt:function (links,player){ + return '将一张基本牌当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; + }, + }, + ai:{ + order:function (){ + var player=_status.event.player; + var event=_status.event; + if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.countCards('h',{type:'basic'})>=2){ + return 3.3; + } + return 3.1; + }, + save:true, + respondSha:true, + skillTagFilter:function (player,tag,arg){ + if(player.hasCard(function(card){ + return get.type(card)=='basic'; + },'he')){ + if(tag=='respondSha'){ + if(arg!='use') return false; + } + } + else{ + return false; + } + }, + result:{ + player:1, + }, + }, + }, + xinzhanyi_equip:{ + audio:'zhanyi', + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + 'step 0' + trigger.target.chooseToDiscard('he',true,2); + 'step 1' + if(result.bool&&result.cards&&result.cards.length){ + if(result.cards.length==1){ + event._result={bool:true,links:result.cards.slice(0)}; + } + else player.chooseButton(['选择获得其中的一张牌',result.cards.slice(0)],true).ai=function(button){ + return get.value(button.link); + }; + } + else event.finish(); + 'step 2' + if(result.links) player.gain(result.links,'gain2'); + } + }, + xinzhanyi_trick:{ + mod:{ + wuxieRespondable:function(){ + return false; + } + } + }, + "xinfu_daigong":{ + usable:1, + audio:2, + trigger:{ + player:"damageBegin4", + }, + filter:function (event,player){ + return event.source!=undefined&&player.countCards('h')>0; + }, + content:function (){ + 'step 0' + player.showHandcards(); + 'step 1' + var cards=player.getCards('h'); + var suits=[]; + for(var i=0;i0) return 6.5-get.value(card); + return 0; + }; + 'step 2' + if(result.bool){ + trigger.source.give(result.cards,player,true); + } + else trigger.cancel(); + }, + }, + "xinfu_zhaoxin":{ + group:["zhaoxin_give"], + intro:{ + content:"cards", + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + enable:"phaseUse", + usable:1, + audio:2, + init:function (player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + filter:function (event,player){ + return player.storage.xinfu_zhaoxin.length<3&&player.countCards('h')>0; + }, + visible:true, + filterCard:true, + selectCard:function (){ + var player=_status.event.player; + return [1,3-player.storage.xinfu_zhaoxin.length]; + }, + discard:false, + toStorage:true, + //lose:false, + delay:false, + content:function (){ + 'step 0' + //player.lose(cards,ui.special,'toStorage') + player.$give(cards,player,false); + player.storage.xinfu_zhaoxin=player.storage.xinfu_zhaoxin.concat(cards); + player.markSkill('xinfu_zhaoxin'); + 'step 1' + player.draw(cards.length); + }, + check:function (card){ + return 6-get.value(card); + }, + ai:{ + order:1, + result:{ + player:1, + }, + }, + }, + "zhaoxin_give":{ + trigger:{ + global:"phaseDrawAfter", + }, + filter:function (event,player){ + if(!player.storage.xinfu_zhaoxin||!player.storage.xinfu_zhaoxin.length) return false; + return player==event.player||player.inRange(event.player); + }, + direct:true, + content:function (){ + 'step 0' + player.chooseCardButton(get.prompt('xinfu_zhaoxin',trigger.player),player.storage.xinfu_zhaoxin,function(button){ + return true; + }).set('ai',function(button){ + return 1+Math.random(); + }); + 'step 1' + if(result.bool){ + event.card=result.links[0]; + player.logSkill('xinfu_zhaoxin',target); + player.line(trigger.player,'thunder'); + player.showCards(event.card); + } + else event.finish(); + 'step 2' + trigger.player.chooseBool('是否获得'+get.translation(event.card)+'?').ai=function(){ + return get.attitude(trigger.player,player)>0; + }; + 'step 3' + if(result.bool){ + player.storage.xinfu_zhaoxin.remove(event.card); + player.$give(event.card,trigger.player); + trigger.player.gain(event.card,'fromStorage'); + if(player.storage.xinfu_zhaoxin.length) player.markSkill('xinfu_zhaoxin'); + else player.unmarkSkill('xinfu_zhaoxin'); + player.chooseBool('是否对'+get.translation(trigger.player)+'造成一点伤害?').ai=function(){ + return get.damageEffect(trigger.player,player,player)>0 + }; + } + else{ + trigger.player.chat('拒绝'); + event.finish(); + } + 'step 4' + if(result.bool){ + trigger.player.damage('nocard'); + } + }, + }, + "xinfu_qianchong":{ + audio:3, + mod:{ + targetInRange:function (card,player,target){ + if(player.storage.xinfu_qianchong.contains(get.type(card,'trick'))){ + return true; + } + }, + cardUsable:function (card,player,num){ + if(player.storage.xinfu_qianchong.contains(get.type(card,'trick'))) return Infinity; + }, + }, + group:["xinfu_qianchong_clear","qc_weimu","qc_mingzhe"], + subSkill:{ + clear:{ + sub:true, + forced:true, + silent:true, + popup:false, + trigger:{ + player:"phaseAfter", + }, + content:function (){ + player.storage.xinfu_qianchong=[]; + }, + }, + }, + init:function (event,player){ + event.storage[player]=[]; + }, + trigger:{ + player:"phaseUseBegin", + }, + locked:false, + direct:true, + filter:function (event,player){ + var es=player.getCards('e'); + if(!es.length) return true; + var col=get.color(es[0]); + for(var i=0;i1){ + player.chooseControl(list).set('ai',function(){ + return list[0]; + } + ).set('prompt',get.prompt('xinfu_qianchong')).set('prompt2',get.translation('xinfu_qianchong_info')); + } + else event.finish(); + 'step 1' + if(result.control&&result.control!='cancel2'){ + player.logSkill('xinfu_qianchong'); + player.storage.xinfu_qianchong.add(result.control); + var str=get.translation(result.control)+'牌'; + game.log(player,'声明了','#y'+str); + player.popup(str,'thunder'); + } + }, + }, + "qc_weimu":{ + audio:"xinfu_qianchong", + mod:{ + targetEnabled:function (card,player,target){ + var bool=true; + var es=target.getCards('e'); + if(!es.length) bool=false; + for(var i=0;i0&&num<=player.hp + }, + frequent:true, + content:function (){ + 'step 0' + var num=0; + player.getHistory('lose',function(evt){ + if(evt.cards2) num+=evt.cards2.length; + }); + if(num>0){ + player.draw(num); + } + }, + }, + "rw_bagua_skill":{ + inherit:"bagua_skill", + audio:"bagua_skill", + content:function (){ + "step 0" + player.judge('rewrite_bagua',function(card){return (get.suit(card)!='spade')?1.5:-0.5}); + "step 1" + if(result.judge>0){ + trigger.untrigger(); + trigger.set('responded',true); + trigger.result={bool:true,card:{name:'shan'}} + } + }, + }, + "rw_baiyin_skill":{ + inherit:"baiyin_skill", + audio:"baiyin_skill", + }, + "rw_lanyinjia":{ + inherit:"lanyinjia", + audio:"lanyinjia", + }, + "rw_minguangkai_cancel":{ + inherit:"minguangkai_cancel", + }, + "rw_minguangkai_link":{ + inherit:"minguangkai_link", + trigger:{ + player:"linkBefore", + }, + forced:true, + priority:20, + filter:function (event,player){ + return !player.isLinked(); + }, + content:function (){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(['tiesuo','lulitongxin'].contains(card.name)){ + return 'zerotarget'; + } + }, + }, + }, + }, + "rw_renwang_skill":{ + inherit:"renwang_skill", + audio:"renwang_skill", + filter:function (event,player){ + if(player.hasSkillTag('unequip2')) return false; + if(event.player.hasSkillTag('unequip',false,{ + name:event.card?event.card.name:null, + target:player, + card:event.card + })) return false; + return (event.card.name=='sha'&&(get.suit(event.card)=='heart'||get.color(event.card)=='black')) + }, + ai:{ + effect:{ + target:function (card,player,target){ + if(target.hasSkillTag('unequip2')) return; + if(player.hasSkillTag('unequip',false,{ + name:card?card.name:null, + target:player, + card:card + })||player.hasSkillTag('unequip_ai',false,{ + name:card?card.name:null, + target:player, + card:card + })) return; + if(card.name=='sha'&&['spade','club','heart'].contains(get.suit(card))) return 'zerotarget'; + }, + }, + }, + }, + "rw_tengjia1":{ + inherit:"tengjia1", + audio:"tengjia1", + }, + "rw_tengjia2":{ + inherit:"tengjia2", + audio:"tengjia1", + }, + "rw_tengjia3":{ + audio:"tengjia1", + inherit:"rw_minguangkai_link", + ai:{ + effect:{ + target:function (card,player,target,current){ + if(['tiesuo','lulitongxin'].contains(card.name)){ + return 'zeroplayertarget'; + } + }, + }, + }, + }, + "rw_tengjia4":{ + inherit:"tengjia3", + audio:"tengjia1", + }, + "xinfu_pingcai":{ + "wolong_card":function (){ + 'step 0' + var ingame=game.hasPlayer(function(current){ + return ['sp_zhugeliang','re_sp_zhugeliang'].contains(current.name)||['sp_zhugeliang','re_sp_zhugeliang'].contains(current.name2); + })?true:false; + var prompt='请选择'; + prompt+=ingame?'至多两名':'一名'; + prompt+='角色,对其造成1点火焰伤害'; + var range=ingame?[1,2]:[1,1] + player.chooseTarget(prompt,range).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player,'fire'); + }); + 'step 1' + if(result.bool&&result.targets.length){ + player.line(result.targets,'fire'); + for(var i=0;i1) continue; + if(target.isEmpty(get.subtype(es[i]))) return true; + } + return false; + } + else{ + if(!event.ingame){ + if(target.getEquip(2)) return true; + return false; + } + return target.countCards('e')>0; + } + }); + next.set('ingame',event.ingame) + next.set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(ui.selected.targets.length==0){ + if(att<0){ + if(game.hasPlayer(function(current){ + if(get.attitude(player,current)>0){ + var es=target.getCards('e'); + for(var i=0;i1) continue; + else if(current.isEmpty(get.subtype(es[i]))) return true; + } + return false; + } + })) return -att; + } + return 0; + } + if(att>0){ + var es=ui.selected.targets[0].getCards('e'); + var i; + for(i=0;i1) continue; + if(target.isEmpty(get.subtype(es[i]))) break; + } + if(i==es.length) return 0; + } + return -att*get.attitude(player,ui.selected.targets[0]); + }); + next.set('multitarget',true); + next.set('targetprompt',['被移走','移动目标']); + next.set('prompt',prompt); + 'step 1' + if(result.bool){ + player.line2(result.targets,'green'); + event.targets=result.targets; + } + else event.finish(); + 'step 2' + game.delay(); + 'step 3' + if(targets.length==2){ + if(!event.ingame){ + event._result={ + bool:true, + links:[targets[0].getEquip(2)], + }; + } + else{ + player.choosePlayerCard('e',true,function(button){ + return get.equipValue(button.link); + },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ + var targets1=_status.event.targets1; + if(['equip3','equip4'].contains(get.subtype(button.link))&&targets1.getEquip('liulongcanjia')) return false; + if(button.link.name=='liulongcanjia'&&targets1.countCards('e',{subtype:['equip3','equip4']})>1) return false; + return !targets1.countCards('e',{subtype:get.subtype(button.link)}); + + }); + } + } + else event.finish(); + 'step 4' + if(result.bool&&result.links.length){ + var link=result.links[0]; + if(get.position(link)=='e') event.targets[1].equip(link); + else if(link.viewAs) event.targets[1].addJudge({name:link.viewAs},[link]); + else event.targets[1].addJudge(link); + event.targets[0].$give(link,event.targets[1],false) + game.delay(); + } + }, + audio:true, + enable:"phaseUse", + usable:1, + content:function (){ + "step 0" + var list=["wolong","fengchu","xuanjian","shuijing"]; + var list2=[]; + for(var i=0;i1; + })) return 1+Math.random(); + else return 1; + } + else if(button.link.name=='wolong_card'){ + if(game.hasPlayer(function(current){ + return get.damageEffect(current,player,player,'fire')>0; + })) return 1.2+Math.random(); + else return 0.5; + } + else return 0.6; + }); + "step 1" + var delay=8400-(get.utc()-event.time); + if(delay>0){ + event.delay2=true; + event.dialog=ui.create.dialog(get.translation(player)+'正在擦拭宝物...'+(_status.connectMode?'':'
    (点击屏幕可跳过等待)')); + event.videoId=lib.status.videoId++; + game.broadcast('createDialog',event.videoId,get.translation(player)+'正在擦拭宝物...'); + game.pause(); + event.pingcai_delayed=true; + setTimeout(function(){ + if(event.pingcai_delayed==true){ + delete event.pingcai_delayed; + game.resume(); + } + },delay); + if(!_status.connectMode){ + event.forceMine=true; + event.custom.replace.window=function(){ + if(event.pingcai_delayed==true){ + delete event.forceMine; + delete event.pingcai_delayed; + game.resume(); + } + } + } + } + event.card=result.links[0]; + "step 2" + if(event.delay2){ + delete event.custom.replace.window; + event.dialog.close(); + game.addVideo('cardDialog',null,event.videoId); + game.broadcast('closeDialog',event.videoId); + } + player.logSkill('pcaudio_'+event.card.name); + player.$throw(event.card); + event.insert(lib.skill.xinfu_pingcai[event.card.name],{ + player:player, + }); + }, + ai:{ + order:7, + result:{ + player:1, + }, + }, + }, + "xinfu_pdgyingshi":{ + mod:{ + targetEnabled:function (card,player,target){ + if(get.type(card)=='delay'){ + return false; + } + }, + }, + trigger:{ + player:['phaseZhunbeiBefore','phaseJieshuBefore'], + }, + forced:true, + audio:2, + group:'xinfu_pdgyingshi2', + priority:15, + content:function(){ + trigger.cancel(); + game.log(player,'跳过了',event.triggername=='phaseZhunbeiBefore'?'准备阶段':'结束阶段'); + }, + }, + xinfu_pdgyingshi2:{ + popup:false, + trigger:{ + player:"phaseJudgeBefore", + }, + forced:true, + priority:15, + content:function (){ + trigger.cancel(); + game.log(player,'跳过了判定阶段'); + }, + }, + "pcaudio_wolong_card":{ + audio:true, + }, + "pcaudio_fengchu_card":{ + audio:true, + }, + "pcaudio_shuijing_card":{ + audio:true, + }, + "pcaudio_xuanjian_card":{ + audio:true, + }, + "yizan_respond_sha":{ + audio:2, + enable:["chooseToRespond"], + filterCard:function (card,player,target){ + if(player.storage.yizan) return get.type(card)=='basic'; + else if(ui.selected.cards.length){ + if(get.type(ui.selected.cards[0])=='basic') return true; + return get.type(card)=='basic'; + } + return true; + }, + selectCard:function (){ + var player=_status.event.player; + if(player.storage.yizan) return 1; + return 2; + }, + position:"he", + viewAs:{ + name:"sha", + }, + complexCard:true, + viewAsFilter:function (player){ + if(!player.storage.yizan){ + if(player.countCards('h')<2) return false; + } + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + }, + prompt:function (){ + var player=_status.event.player; + var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; + return '将'+str+'当做杀打出'; + }, + check:function (card){ + if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; + return 5-get.value(card); + }, + ai:{ + skillTagFilter:function (player){ + if(!player.storage.yizan){ + if(player.countCards('he')<2) return false; + } + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + }, + respondSha:true, + }, + }, + "yizan_use":{ + init:function (player){ + if(!player.storage.yizan_use) player.storage.yizan_use=0; + if(!player.storage.yizan) player.storage.yizan=false; + }, + mark:true, + intro:{ + content:"已发动过#次", + }, + group:["yizan_respond_sha","yizan_respond_shan","yizan_count"], + enable:"chooseToUse", + filter:function (event,player){ + if(!player.storage.yizan&&player.countCards('he')<2) return false; + if(event.filterCard({name:'sha'},player,event)|| + event.filterCard({name:'jiu'},player,event)|| + event.filterCard({name:'tao'},player,event)){ + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + } + return false; + }, + chooseButton:{ + dialog:function (event,player){ + var list=[]; + if(event.filterCard({name:'sha'},player,event)){ + list.push(['基本','','sha']); + list.push(['基本','','sha','fire']); + list.push(['基本','','sha','thunder']); + } + if(event.filterCard({name:'tao'},player,event)){ + list.push(['基本','','tao']); + } + if(event.filterCard({name:'jiu'},player,event)){ + list.push(['基本','','jiu']); + } + return ui.create.dialog('翊赞',[list,'vcard'],'hidden'); + }, + check:function (button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })){ + switch(button.link[2]){ + case 'tao':return 5; + case 'jiu':{ + if(player.storage.yizan&&player.countCards('h',{type:'basic'})>2) return 3; + }; + case 'sha': + if(button.link[3]=='fire') return 2.95; + else if(button.link[3]=='thunder') return 2.92; + else return 2.9; + } + } + return 0; + }, + backup:function (links,player){ + return { + filterCard:function(card,player,target){ + if(player.storage.yizan) return get.type(card)=='basic'; + else if(ui.selected.cards.length){ + if(get.type(ui.selected.cards[0])=='basic') return true; + return get.type(card)=='basic'; + } + return true; + }, + complexCard:true, + selectCard:function(){ + var player=_status.event.player; + if(player.storage.yizan) return 1; + return 2; + }, + check:function(card,player,target){ + if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; + else return 6-get.value(card); + }, + viewAs:{name:links[0][2],nature:links[0][3]}, + position:'he', + popname:true, + precontent:function(){ + player.logSkill('yizan_respond_shan'); + }, + } + }, + prompt:function (links,player){ + var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; + return '将'+str+'当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; + }, + }, + ai:{ + order:function (){ + var player=_status.event.player; + var event=_status.event; + if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.storage.yizan&&player.countCards('h',{type:'basic'})>2){ + return 3.3; + } + return 3.1; + }, + save:true, + respondSha:true, + skillTagFilter:function (player,tag,arg){ + if(!player.storage.yizan&&player.countCards('he')<2) return false; + if(player.hasCard(function(card){ + return get.type(card)=='basic'; + },'he')){ + if(tag=='respondSha'){ + if(arg!='use') return false; + } + } + else{ + return false; + } + }, + result:{ + player:1, + }, + }, + }, + "yizan_respond_shan":{ + complexCard:true, + audio:2, + enable:["chooseToUse","chooseToRespond"], + filterCard:function (card,player,target){ + if(player.storage.yizan) return get.type(card)=='basic'; + else if(ui.selected.cards.length){ + if(get.type(ui.selected.cards[0])=='basic') return true; + return get.type(card)=='basic'; + } + return true; + }, + selectCard:function (){ + var player=_status.event.player; + if(player.storage.yizan) return 1; + return 2; + }, + position:"he", + viewAs:{ + name:"shan", + }, + viewAsFilter:function (player){ + if(!player.storage.yizan){ + if(player.countCards('he')<2) return false; + } + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + }, + prompt:function (){ + var player=_status.event.player; + var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; + return '将'+str+'当做闪使用或打出'; + }, + check:function (card){ + if(!ui.selected.cards.length&&get.type(card)=='basic') return 6; + return 5-get.value(card); + }, + ai:{ + respondShan:true, + skillTagFilter:function (player){ + if(!player.storage.yizan){ + if(player.countCards('he')<2) return false; + } + return player.hasCard(function(card){ + return get.type(card)=='basic'; + },'h'); + }, + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + }, + }, + basic:{ + useful:[7,2], + value:[7,2], + }, + }, + }, + "xinfu_longyuan":{ + audio:2, + forced:true, + unique:true, + juexingji:true, + trigger:{ + player:["useCardAfter","respondAfter"], + }, + init:function (player){ + player.storage.xinfu_longyuan=false; + }, + delay:1.2, + skillAnimation:true, + animationColor:'orange', + filter:function (event,player){ + if(player.storage.xinfu_longyuan) return false; + return player.storage.yizan_use>2; + }, + content:function (){ + player.awakenSkill('xinfu_longyuan'); + player.storage.yizan=true; + game.delay(1); + }, + }, + "yizan_count":{ + forced:true, + silent:true, + popup:false, + trigger:{ + player:["respond","useCard1"], + }, + filter:function (event,player){ + if(event.skill!='yizan_respond_sha'&&event.skill!='yizan_respond_shan'&&event.skill!='yizan_use_backup') return false; + return player.storage.yizan_use!=undefined; + }, + content:function (){ + player.storage.yizan_use++; + player.markSkill('yizan_use'); + }, + }, + xinfu_jingxie:{audio:2}, + "xinfu_jingxie1":{ + group:["xinfu_jingxie2"], + position:"he", + audio:'xinfu_jingxie', + enable:"phaseUse", + filter:function(event,player){ + var he=player.getCards('he'); + for(var i=0;i0; + } + return false; + }, + check:function(){ + return 1; + }, + position:"he", + discard:false, + loseTo:'discardPile', + prepare:function(cards,player){ + player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆') + }, + content:function (){ + 'step 0' + player.draw(); + 'step 1' + var num=1-player.hp; + if(num) player.recover(num); + }, + ai:{ + order:0.5, + skillTagFilter:function (player){ + if(player.hp>0) return false; + return player.countCards('he',function(card){ + return get.subtype(card)=='equip2'; + })>0; + }, + save:true, + result:{ + player:function (player){ + return 10; + }, + }, + }, + }, + "xinfu_qiaosi":{ + enable:"phaseUse", + usable:1, + content:function (){ + 'step 0' + if(get.isLuckyStar(player)){ + event.num=6; + player.throwDice(6); + } + else player.throwDice(); + 'step 1' + event.cards=get.cards(event.num); + player.showCards(event.cards); + 'step 2' + player.gain(event.cards,'gain2'); + player.chooseControl().set('choiceList',[ + '将'+get.cnNumber(event.num)+'张牌交给一名其他角色', + '弃置'+get.cnNumber(event.num)+'张牌', + ]).set('ai',function(){ + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>2; + })) return 0; + return 1; + }); + 'step 3' + if(result.index==0){ + player.chooseCardTarget({ + position:'he', + filterCard:true, + selectCard:event.num, + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + return 1; + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + return att; + }, + prompt:'请选择要送人的卡牌', + forced:true, + }); + } + else{ + player.chooseToDiscard(event.num,true,'he'); + event.finish(); + } + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.give(result.cards,target); + } + }, + ai:{ + order:7.5, + result:{ + player:1, + }, + }, + }, + zhaohuo:{ + audio:2, + trigger:{global:'dying'}, + forced:true, + //priority:12, + filter:function(event,player){ + return event.player!=player&&player.maxHp>1; + }, + content:function(){ + 'step 0' + event.num=player.maxHp-1; + player.loseMaxHp(event.num,true); + 'step 1' + player.draw(event.num); + } + }, + yixiang:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + frequent:true, + filter:function(event,player){ + if(event.player.hp<=player.hp) return false; + //if(event.targets.length>1) return false; + var hs=player.getCards('h'); + var names=['sha','shan','tao','jiu','du']; + for(var i=0;iplayer.maxHp; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('yirang'),function(card,player,target){ + return target.maxHp>player.maxHp; + }).set('ai',function(target){ + return (get.attitude(_status.event.player,target)-2)*target.maxHp; + }); + 'step 1' + if(result.bool){ + var cards=player.getCards('he',function(card){ + return get.type(card)!='basic'; + }); + var target=result.targets[0]; + var types=[]; + for(var i=0;i0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + 'step 1' + if(result.bool){ + player.logSkill('shejian',result.targets); + player.discardPlayerCard(result.targets[0],'he',true); + } + else{ + event.finish(); + } + }, + }, + shixin:{ + audio:2, + trigger:{player:'damageBegin4'}, + filter:function(event){ + return event.nature=='fire'; + }, + forced:true, + content:function(){ + trigger.cancel(); + }, + ai:{ + nofire:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'fireDamage')) return 'zerotarget'; + } + } + } + }, + fenyin:{ + locked:false, + mod:{ + aiOrder:function(player,card,num){ + if(typeof card=='object'&&player==_status.currentPhase){ + var evt=player.getLastUsed(); + if(evt&&evt.card&&get.color(evt.card)!='none'&&get.color(card)!='none'&&get.color(evt.card)!=get.color(card)){ + return num+10; + } + } + }, + }, + audio:2, + trigger:{player:'useCard'}, + frequent:true, + //usable:3, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + var evt=player.getLastUsed(1); + if(!evt) return false; + var color1=get.color(evt.card); + var color2=get.color(event.card); + return color1&&color2&&color1!='none'&&color2!='none'&&color1!=color2; + }, + content:function(){ + player.draw(); + }, + ai:{ + threaten:3, + }, + }, + dujin:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + frequent:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num+=1+Math.floor(player.countCards('e')/2); + } + }, + yingjian:{ + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + audio:'qingyi', + content:function(){ + player.chooseUseTarget('###是否发动【影箭】?###视为使用一张没有距离限制的【杀】',{name:'sha'},false,'nodistance').logSkill='yingjian'; + }, + ai:{ + threaten:function(player,target){ + return 1.6; + } + } + }, + tunchu:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + check:function(event,player){ + return player.countCards('h')-player.countCards('h',{type:'equip'})<=player.hp; + }, + filter:function(event,player){ + if(event.numFixed||player.storage.tunchu&&player.storage.tunchu.length) return false; + return true; + }, + content:function(){ + trigger.num+=2; + player.addTempSkill('tunchu_choose','phaseDrawAfter'); + }, + init:function(player){ + if(!player.storage.tunchu) player.storage.tunchu=[]; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + group:'tunchu_disable', + subSkill:{ + choose:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + content:function(){ + 'step 0' + player.removeSkill('tunchu_choose'); + var nh=player.countCards('h'); + if(nh){ + player.chooseCard('h',[1,nh],'将任意张手牌置于你的武将牌上').set('ai',function(card){ + var player=_status.event.player; + var count=game.countPlayer(function(current){ + return get.attitude(player,current)>2&¤t.hp-current.countCards('h')>1; + }); + if(ui.selected.cards.length>=count) return -get.value(card); + return 5-get.value(card); + }); + } + else{ + event.finish(); + } + 'step 1' + if(result.bool){ + player.lose(result.cards,ui.special,'toStorage'); + player.storage.tunchu.addArray(result.cards); + player.markSkill('tunchu'); + player.syncStorage('tunchu'); + } + } + }, + disable:{ + mod:{ + cardEnabled:function(card,player){ + if(player.storage.tunchu&&player.storage.tunchu.length&&card.name=='sha'){ + return false; + } + }, + cardUsable:function(card,player){ + if(player.storage.tunchu&&player.storage.tunchu.length&&card.name=='sha'){ + return false; + } + }, + } + } + } + }, + shuliang:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.tunchu&&player.storage.tunchu.length>0&&event.player.countCards('h')0); + player.chooseCardButton(get.prompt('shuliang',trigger.player),player.storage.tunchu).set('ai',function(){ + if(_status.event.goon) return 1; + return 0; + }).set('goon',goon); + 'step 1' + if(result.bool){ + player.logSkill('shuliang',trigger.player); + player.storage.tunchu.remove(result.links[0]); + player.$throw(result.links); + game.cardsDiscard(result.links); + player.syncStorage('tunchu'); + if(player.storage.tunchu.length==0){ + player.unmarkSkill('tunchu'); + } + trigger.player.draw(2); + } + } + }, + choulve:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he'); + }) + }, + content:function(){ + 'step 0' + var str='令一名其他角色交给你一张牌'; + var history=player.getAllHistory('damage',function(evt){ + return evt.card&&evt.card.name&&lib.card[evt.card.name]; + }) + if(history.length) event.cardname=history[history.length-1].card.name; + if(event.cardname){ + str+='若其如此做,视为你使用【'+get.translation(event.cardname)+'】'; + } + var goon=true; + if(event.cardname){ + goon=game.hasPlayer(function(current){ + return player.canUse(event.cardname,current)&&get.effect(current,{name:event.cardname},player,player)>0; + }); + } + player.chooseTarget(get.prompt('choulve'),str,function(card,player,target){ + return target!=player&&target.countCards('he'); + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player; + if(get.attitude(player,target)>=0&&get.attitude(target,player)>=0){ + return Math.sqrt(target.countCards('he')); + } + return 0; + }).set('goon',goon); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('choulve',target); + target.chooseCard('he','是否交给'+get.translation(player)+'一张牌?', + event.cardname?('若如此做,视为'+get.translation(player)+ + '使用【'+get.translation(event.cardname)+'】'):null).set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)>1); + event.target=target; + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + event.target.give(result.cards,player); + if(event.cardname){ + player.chooseUseTarget(event.cardname,true,false); + } + } + }, + }, + polu:{ + audio:2, + trigger:{player:['phaseZhunbeiBegin','damageEnd']}, + forced:true, + filter:function(event,player){ + return !player.getEquip('ly_piliche'); + }, + content:function(){ + if(trigger.name=='phaseZhunbei'){ + player.useCard(game.createCard('ly_piliche','diamond',1),player); + } + else{ + player.draw(trigger.num); + } + } + }, + ly_piliche:{ + trigger:{source:'damageSource'}, + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + filter:function(event,player){ + if(event.card&&get.type(event.card)=='delay') return false; + return event.player.isIn()&&(event.player.getEquip(2)||event.player.getEquip(3)); + }, + logTarget:'player', + content:function(){ + var equip2=trigger.player.getEquip(2); + var equip3=trigger.player.getEquip(3); + var cards=[]; + if(equip2) cards.push(equip2); + if(equip3) cards.push(equip3); + if(cards.length){ + trigger.player.discard(cards); + } + } + }, + xinzhilve:{ + enable:'phaseUse', + audio:'zhilve', + usable:1, + chooseButton:{ + dialog:function(event,player){ + var list=[ + '移动场上的一张牌', + '摸一张牌并视为使用一张【杀】', + ]; + var choiceList=ui.create.dialog('知略:失去1点体力并...','forcebutton','hidden'); + for(var i=0;i2&&player.hasValueTarget({name:'sha'})) return 1; + return 0; + }, + }, + }, + }, + xinzhilve_move:{ + audio:'zhilve', + filterCard:function(){return false}, + selectCard:-1, + delay:false, + content:function(){ + 'step 0' + event.forceDie=true; + if(!player.canMoveCard(null,event.nojudge)){ + event.finish(); + return; + } + var next=player.chooseTarget(2,function(card,player,target){ + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + var js=from.getCards('j'); + for(var i=0;i0; + } + }); + next.set('nojudge',event.nojudge||false); + next.set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + var sgnatt=get.sgn(att); + if(ui.selected.targets.length==0){ + if(att>0){ + if(!_status.event.nojudge&&target.countCards('j',function(card){ + return game.hasPlayer(function(current){ + return current.canAddJudge(card)&&get.attitude(player,current)<0; + }) + })) return 14; + if(target.countCards('e',function(card){ + return get.value(card,target)<0&&game.hasPlayer(function(current){ + return current!=target&&get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) + }); + })>0) return 9; + } + else if(att<0){ + if(game.hasPlayer(function(current){ + if(current!=target&&get.attitude(player,current)>0){ + var es=target.getCards('e'); + for(var i=0;i0&¤t.isEmpty(get.subtype(es[i]))&&get.value(es[i],current)>0) return true; + } + } + })){ + return -att; + } + } + return 0; + } + var es=ui.selected.targets[0].getCards('e'); + var i; + var att2=get.sgn(get.attitude(player,ui.selected.targets[0])); + for(i=0;i0&&get.attitude(player,targets1)<0){ + if(get.position(button.link)=='j') return 12; + if(get.value(button.link,targets0)<0) return 10; + return 0; + } + else{ + if(get.position(button.link)=='j') return -10; + return get.equipValue(button.link); + } + },targets[0]).set('nojudge',event.nojudge||false).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ + var targets1=_status.event.targets1; + if(get.position(button.link)=='j'){ + if(_status.event.nojudge) return false; + return targets1.canAddJudge(button.link); + } + else{ + return targets1.isEmpty(get.subtype(button.link)); + } + }); + } + else{ + event.finish(); + } + 'step 4' + if(result.bool&&result.links.length){ + player.loseHp(); + } + 'step 5' + if(result.bool&&result.links.length){ + var link=result.links[0]; + if(get.position(link)=='e'){ + event.targets[1].equip(link); + } + else if(link.viewAs){ + event.targets[1].addJudge({name:link.viewAs},[link]); + } + else{ + event.targets[1].addJudge(link); + } + event.targets[0].$give(link,event.targets[1]) + event.result.card=link; + event.result.position=get.position(link); + game.delay(); + player.addTempSkill('xinzhilve_mark'); + player.addMark('xinzhilve_mark',1,false); + } + }, + }, + xinzhilve_use:{ + audio:'zhilve', + filterCard:function(){return false}, + selectCard:-1, + filterTarget:function(card,player,target){ + return player.canUse({name:'sha',isCard:true},target,false); + }, + content:function(){ + player.loseHp(); + player.draw(); + player.useCard({name:'sha',isCard:true},false,target).forceDie=true; + player.addTempSkill('xinzhilve_mark'); + player.addMark('xinzhilve_mark',1,false); + }, + ai:{ + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,target); + }, + }, + }, + }, + xinzhilve_mark:{ + intro:{content:'本回合手牌上限+#'}, + onunmark:true, + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('xinzhilve_mark'); + }, + }, + }, + xinxhzhiyan:{ + audio:'xhzhiyan', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')!=player.maxHp&&!player.hasSkill('xinxhzhiyan_'+(player.countCards('h')>player.maxHp)); + }, + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + var num=Math.max(0,player.countCards('h')-player.maxHp); + return [num,num]; + }, + filterTarget:lib.filter.notMe, + selectTarget:function(){ + if(ui.selected.cards.length) return [1,1]; + return [0,0]; + }, + check:function(card){ + var player=_status.event.player; + if(player.getUseValue(card)<=0&&game.hasPlayer(function(current){ + return current!=player&&get.value(card,current)*get.attitude(player,current)>0; + })) return 1; + return 0; + }, + delay:false, + discard:false, + lose:false, + content:function(){ + var bool=(player.countCards('h')>player.maxHp); + player.addTempSkill('xinxhzhiyan_'+bool,'phaseUseEnd'); + if(!bool){ + player.draw(player.maxHp-player.countCards('h')); + } + else{ + target.gain(cards,player,'giveAuto'); + } + }, + ai:{ + order:function(obj,player){ + if(player.countCards('h')>player.maxHp) return 10; + return 0.5; + }, + result:{ + player:function(player,target){ + if(player.countCards('h')player.maxHp) return 1; + return 0; + }, + }, + }, + }, + xinxhzhiyan_true:{}, + xinxhzhiyan_false:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target&&(!get.info(card)||!get.info(card).singleCard||!ui.selected.targets.length)) return false; + }, + }, + mark:true, + intro:{ + content:'不能对其他角色使用牌', + }, + }, + weifeng:{ + audio:2, + trigger:{player:'useCardAfter'}, + forced:true, + filter:function(event,player){ + if(!event.targets||!event.targets.filter(function(target){ + return target!=player&&!target.storage.weifeng2; + }).length) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + if(!get.tag(event.card,'damage')) return false; + if(!['basic','trick'].contains(get.type(event.card))) return false; + return player.getHistory('useCard',function(ev){ + return ev.getParent('phaseUse')==evt&&get.tag(ev.card,'damage')&&['basic','trick'].contains(get.type(ev.card)); + }).indexOf(event)==0&&game.hasPlayer(function(current){ + return current!=player&&!current.storage.weifeng2&&event.targets.contains(current); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(true,'威风:请选择一个目标,令其获得一个【惧('+get.translation(trigger.card.name)+')】标记',function(card,player,target){ + return player!=target&&!target.storage.weifeng2&&_status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + target.storage.weifeng2=trigger.card.name; + player.line(target,'green'); + game.log(target,'获得了一个','#g【惧('+get.translation(trigger.card.name)+')】','标记') + target.markSkill('weifeng2'); + player.addSkill('weifeng3'); + } + }, + }, + weifeng2:{ + intro:{ + content:'当前“惧”标记名称:$', + onunmark:function(storage,player){ + if(player.storage.weifeng2){ + game.log(player,'移去了一个','#g【惧('+get.translation(player.storage.weifeng2)+')】','标记') + delete player.storage.weifeng2; + } + }, + }, + marktext:'惧', + }, + weifeng3:{ + trigger:{ + global:'damageBegin3', + player:['phaseZhunbeiBegin','dieBegin'], + }, + forced:true, + popup:false, + filter:function(event,player){ + if(event.name!='damage') return true; + return event.player!=player&&typeof event.player.storage.weifeng2=='string'; + }, + content:function(){ + if(trigger.name=='damage'){ + player.logSkill('weifeng',trigger.player); + if(trigger.card&&trigger.card.name==trigger.player.storage.weifeng2) trigger.num++; + else if(trigger.player.countGainableCards(player,'he')>0) player.gainPlayerCard(trigger.player,'he',true); + trigger.player.unmarkSkill('weifeng2'); + } + else{ + game.countPlayer(function(current){ + if(current.storage.weifeng2) current.unmarkSkill('weifeng2'); + }); + player.removeSkill('weifeng3'); + } + }, + }, + gnjinfan:{ + trigger:{player:'phaseDiscardBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + var list=[]; + player.getStorage('gnjinfan').filter(function(card){ + list.add(get.suit(card)); + }); + if(list.length>=lib.suit.length) return false; + return player.countCards('h',function(card){ + return _status.connectMode||!list.contains(get.suit(card)); + })>0; + }, + content:function(){ + 'step 0' + player.chooseCard('h',get.prompt('gnjinfan'),'将任意张手牌当做“铃”置于武将牌上',[1,function(){ + var list=[]; + var list2=[]; + player.getStorage('gnjinfan').filter(function(card){ + list.add(get.suit(card)); + }); + player.getCards('h',function(card){ + list2.add(get.suit(card)); + }); + list2.removeArray(list); + return list2.length; + }()],function(card,player){ + var list=player.getStorage('gnjinfan').concat(ui.selected.cards); + return list.filter(function(cardx){ + return get.suit(card)==get.suit(cardx); + }).length==0; + }).set('ai',function(card){ + var player=_status.event.player; + if(player.hasUseTarget(card)&&!player.hasValueTarget(card)) return 0; + return 1+Math.random(); + }).set('complexCard',true); + 'step 1' + if(result.bool){ + player.logSkill('gnjinfan'); + player.markAuto('gnjinfan',result.cards); + player.lose(result.cards,'toStorage',ui.special,'visible'); + game.log(player,'将',result.cards,'放到了武将牌上'); + } + }, + group:['gnjinfan3','gnjinfan4','gnjinfan6','gnjinfan7'], + marktext:'铃', + intro:{ + content:'cards', + }, + }, + gnjinfan3:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + var gnjinfan=player.getStorage('gnjinfan'); + if(!gnjinfan) return false; + for(var i=0;i0) return get.order(button.link); + return -1; + }, + backup:function(links,player){ + return { + audio:'gnjinfan', + filterCard:function(){return false}, + selectCard:-1, + viewAs:links[0], + onuse:function(result,player){ + var gnjinfan=player.getStorage('gnjinfan'); + if(gnjinfan){ + player.unmarkAuto('gnjinfan',[result.card]); + } + } + } + }, + prompt:function(links){ + return '选择'+get.translation(links)+'的目标'; + }, + }, + ai:{ + order:function(item,player){ + var event=_status.event; + if(event.type!='phase') return 4; + if(!player) return -1; + var gnjinfan=player.getStorage('gnjinfan'); + if(!gnjinfan) return -1; + var order=0; + for(var i=0;i0){ + var order2=get.order(gnjinfan[i]); + if(order2>order) order=order2 + } + } + return order+0.1; + }, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + } + }, + useful:-1, + value:-1 + } + }, + gnjinfan6:{ + trigger:{global:'cardsGotoOrderingAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent(); + return evt&&evt.player==player&&evt.skill&&evt.skill.indexOf('gnjinfan')==0; + }, + content:function(){ + var suit=get.suit(trigger.cards[0]); + var card=get.cardPile2(function(cardx){ + return get.suit(cardx)==suit; + }); + if(card) player.gain(card,'gain2','log'); + }, + }, + gnjinfan7:{ + filter:function(){return false}, + hiddenCard:function(player,name){ + var gnjinfan=player.getStorage('gnjinfan'); + if(!gnjinfan) return false; + for(var i=0;i0&& + lib.filter.targetEnabled({name:'sha'},player,event.player)&&(player.hasSha()||_status.connectMode&&player.countCards('h')>0); + }, + content:function(){ + player.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'射却:是否对'+get.translation(trigger.player)+'使用一张杀?').set('logSkill','gnsheque').set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',trigger.player).set('oncard',function(card){ + card.gnsheque_tag=true; + }); + }, + ai:{ + unequip:true, + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(tag=='unequip_ai'){ + if(_status.event.getParent().name!='gnsheque') return false; + } + else if(!arg||!arg.card||!arg.card.gnsheque_tag) return false; + }, + }, + }, + }, + translate:{ + old_liuzan:'手杀留赞', + re_sp_zhugeliang:"手杀卧龙", + ly_piliche:'霹雳车', + ly_piliche_info:'当你对其他角色造成伤害后,若造成伤害的牌不为延时锦囊牌,你可以弃置其装备区里的防具牌与+1坐骑牌;当你失去此装备时,销毁之。', + polu:'破橹', + polu_info:'锁定技,回合开始时,若你的装备区里没有【霹雳车】,你使用之;当你受到1点伤害后,若你的装备区里没有【霹雳车】,你摸一张牌。', + choulve:'筹略', + choulve_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌,若其如此做,视为你使用上一张对你过造成伤害且不为延时锦囊牌的牌。', + tunchu:'屯储', + tunchu_info:'摸牌阶段,若你没有「粮」,你可以多摸两张牌。若如此做,摸牌阶段结束时,你可以将任意张手牌置于你的武将上,称为「粮」,只要你的武将牌上有「粮」,你便不能使用【杀】', + shuliang:'输粮', + shuliang_info:'一名角色的结束阶段开始时,若其手牌数少于体力值,你可以移去一张「粮」,然后该角色摸两张牌', + fenyin:'奋音', + yingjian:'影箭', + fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', + yingjian_info:'准备阶段开始时,你可以视为使用一张无距离限制的【杀】。', + dujin:'独进', + dujin_info:'摸牌阶段,你可以多摸X+1张牌。(X为你装备区里牌数的一半且向下取整)', + shixin:'释衅', + shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害。', + zhaohuo:'招祸', + zhaohuo_info:'锁定技,当其他角色进入濒死状态时,你将体力上限调整为1点。若你的体力上限因此减少,则你摸一张牌。(X为你以此法减少的体力上限)', + yixiang:'义襄', + yixiang_info:'每名角色的回合限一次,当你成为一名角色使用牌的目标后,若该角色的体力值大于你的体力值,你可以随机获得牌堆里的一张你没有的基本牌。', + yirang:'揖让', + yirang_info:'出牌阶段开始时,你可以将所有非基本牌交给一名体力上限大于你的其他角色,然后调整体力上限至与该角色相同并回复X点体力(X为你以此法交给其的牌的类别数)。', + kuangcai:'狂才', + kuangcai_info:'出牌阶段开始时,你可以令你此阶段内的主动出牌时间变为5秒。若如此做,你于此阶段内使用牌没距离和次数限制,且每当你于此阶段内使用牌时,你摸一张牌且主动出牌时间-1秒。若主动出牌时间减至0,则你结束出牌阶段。', + shejian:'舌剑', + shejian_info:'弃牌阶段结束时,若你于此阶段弃置的所有牌花色均不相同,则你可以弃置一名其他角色的一张牌。', + "xinfu_daigong":"怠攻", + "xinfu_daigong_info":"每回合限一次。当你受到伤害时,你可以展示所有手牌,然后令伤害来源选择一项:交给你一张与你所有手牌花色均不相同的一张牌,或防止此伤害。", + "xinfu_zhaoxin":"昭心", + "xinfu_zhaoxin_info":"出牌阶段限一次,你可以将任意张手牌置于武将牌上并摸等量的牌,称之为「望」(你至多拥有三张「望」)。你或你攻击范围内的一名其他角色的摸牌阶段结束后,其可以获得一张由你选择的「望」,然后你可以对其造成1点伤害。", + "zhaoxin_give":"昭心", + "zhaoxin_give_info":"", + "xinfu_qianchong":"谦冲", + "xinfu_qianchong_info":"锁定技,若你的装备区内有牌且:均为红色,则你视为拥有技能〖明哲〗。均为黑色,则你视为拥有技能〖帷幕〗。若均不满足,则出牌阶段开始时,你可以选择一种类别的牌,然后你本回合内使用该类别的牌时没有次数和距离限制。", + "qc_weimu":"帷幕", + "qc_weimu_info":"", + "qc_mingzhe":"明哲", + "qc_mingzhe_info":"", + "xinfu_shangjian":"尚俭", + "xinfu_shangjian_info":"一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你可以摸等量的牌。(X为你的体力值)", + "rw_bagua_skill":"先天八卦阵", + "rw_bagua_skill_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", + "rw_baiyin_skill":"照月狮子盔", + "rw_baiyin_skill_info":"锁定技,当你受到大于1的伤害时,你将伤害值改为1;当你失去装备区里的【照月狮子盔】时,你回复1点体力并摸两张牌。", + "rw_lanyinjia":"精银甲", + "rw_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。", + "rw_minguangkai_cancel":"耀光铠", + "rw_minguangkai_cancel_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", + "rw_minguangkai_link":"耀光铠", + "rw_minguangkai_link_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", + "rw_renwang_skill":"仁王金刚盾", + "rw_renwang_skill_info":"黑色【杀】和红桃【杀】对你无效。", + "rw_tengjia1":"桐油百韧甲", + "rw_tengjia1_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", + "rw_tengjia2":"桐油百韧甲", + "rw_tengjia2_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", + "rw_tengjia3":"桐油百韧甲", + "rw_tengjia3_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", + "rw_tengjia4":"桐油百韧甲", + "rewrite_bagua":"先天八卦阵", + "rewrite_bagua_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", + "rewrite_baiyin":"照月狮子盔", + "rewrite_baiyin_info":"锁定技,当你受到大于1的伤害时,你将伤害值改为1;当你失去装备区里的【照月狮子盔】时,你回复1点体力并摸两张牌。", + "rewrite_lanyinjia":"精银甲", + "rewrite_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。", + "rewrite_minguangkai":"耀光铠", + "rewrite_minguangkai_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。", + "rewrite_renwang":"仁王金刚盾", + "rewrite_renwang_info":"黑色【杀】和红桃【杀】对你无效。", + "rewrite_tengjia":"桐油百韧甲", + "rewrite_tengjia_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时,取消之。", + "rewrite_zhuge":"元戎精械弩", + "rewrite_zhuge_info":"锁定技,你于出牌阶段内使用【杀】无次数限制。", + rw_zhuge_skill:'诸葛连弩', + rw_zhuge_skill_info:'锁定技,你于出牌阶段内使用【杀】无次数限制。', + takaramono:"宝物", + "wolong_card":"卧龙", + "wolong_card_info":"对一名角色造成1点火焰伤害。若场上有存活的诸葛亮(火),则改为对至多两名角色各造成两点火焰伤害。", + "fengchu_card":"凤雏", + "fengchu_card_info":"横置至多三名角色。若场上有存活的庞统(火),则改为横置至多四名角色。", + "xuanjian_card":"玄剑", + "xuanjian_card_info":"令一名角色摸一张牌并回复1点体力。若场上有存活的徐庶(将/界),则改为令一名角色摸一张牌并回复1点体力,然后你摸一张牌。", + "shuijing_card":"水镜", + "shuijing_card_info":"将一名角色装备区内的防具牌移动到另一名角色对应区域。若场上有存活的司马徽,则改为将1名角色装备区内的1件装备移动到另1角色对应区域。","xinfu_pingcai":"评才", + "xinfu_pingcai_info":"出牌阶段限一次,你可以挑选一个宝物并擦拭掉其上面的灰尘。然后,你可以根据宝物类型执行对应的效果。", + "xinfu_pdgyingshi":"隐世", + "xinfu_pdgyingshi_info":"锁定技,你始终跳过准备阶段,判定阶段,结束阶段。你不能被选择为延时锦囊牌的目标。", + "pcaudio_wolong_card":"卧龙", + "pcaudio_wolong_card_info":"", + "pcaudio_fengchu_card":"凤雏", + "pcaudio_fengchu_card_info":"", + "pcaudio_shuijing_card":"水镜", + "pcaudio_shuijing_card_info":"", + "pcaudio_xuanjian_card":"玄剑", + "pcaudio_xuanjian_card_info":"", + "yizan_respond_sha":"翊赞", + "yizan_respond_sha_info":"", + "yizan_use":"翊赞", + "yizan_use_info":"你可以将两张牌(其中至少一张为基本牌)当做任意基本牌使用或打出。", + "yizan_respond_shan":"翊赞", + "yizan_respond_shan_info":"", + "xinfu_longyuan":"龙渊", + "xinfu_longyuan_info":"觉醒技,当你使用或打出的基本牌结算完成后,若你本局游戏内发动过〖翊赞〗的次数大于等于3,则你将〖翊赞〗描述中的“两张牌”改为“一张牌”。", + "yizan_count":"翊赞", + "yizan_count_info":"", + "xinfu_jingxie1":"精械", + "xinfu_jingxie1_info":"出牌阶段,你可以展示一张未强化过的【诸葛连弩】或标准包/军争包/SP包中的防具牌,然后对其进行强化。当你处于濒死状态时,你可以重铸一张防具牌,然后将体力回复至1点。", + "xinfu_jingxie2":"精械", + "xinfu_jingxie2_info":"", + "xinfu_qiaosi":"巧思", + "xinfu_qiaosi_info":"出牌阶段限一次,你可以投掷一枚六面骰子,展示牌堆顶的X张牌并获得之。然后,你选择一项:1.交给一名其他角色X张牌。2.弃置X张牌。(X为骰子的点数)", + xin_xiahoudun:'手杀夏侯惇', + xinqingjian:'清俭', + xinqingjian2:'清俭', + xinqingjian_info:'每回合限一次。当你不因摸牌阶段的额定摸牌而获得牌时,你可以将任意张牌扣置于武将牌上。回合结束时,你将这些牌交给一名其他角色。若这些牌的数量大于1,你摸一张牌。', + zhangyì:'张翼', + jiakui:'贾逵', + zhiyi:'执义', + zhiyi_info:'锁定技,当你于一回合内使用或打出第一张基本牌时,你选择一项:1.摸一张牌。2.于此牌A(若此牌是因响应牌B而使用或打出的,则改为牌B)的使用或打出流程结算完成后,视为使用一张与此牌名称和属性相同的卡牌。', + zhongzuo:'忠佐', + zhongzuo_info:'一名角色的结束阶段开始时,若你于此回合内造成或受到过伤害,则你可以令一名角色摸两张牌。若该角色已受伤,则你摸一张牌。', + wanlan:'挽澜', + wanlan_info:'限定技,当一名角色进入濒死状态时,你可以弃置所有手牌并令其回复体力至1点,然后对当前回合角色造成1点伤害。', + re_jikang:"手杀嵇康", + old_bulianshi:'手杀步练师', + old_caochun:'旧曹纯', + shenpei:'审配', + re_wangyun:'手杀王允', + relianji:'连计', + relianji_info:'出牌阶段限一次,你可以选择两名其他角色。第一名角色随机使用牌堆中的一张武器牌,然后这名角色视为对另一名角色随机使用一张下列的牌名的牌:【决斗】、【火攻】、【南蛮入侵】、【万箭齐发】或普【杀】。然后若此牌造成伤害,你获得X枚“连计”标记(X为此次扣减的体力值点数)。', + remoucheng:'谋逞', + remoucheng_info:'觉醒技,当一名角色造成伤害后,若你拥有的“连计”标记数大于2,你加1点体力上限,回复1点体力,失去“连计”,获得“矜功”。', + rejingong:'矜功', + rejingong_info:'每回合可以用三个随机锦囊中的一个,三个锦囊中有一个是专属锦囊,本回合未造成伤害会失去1点体力。', + mobile_default:'常规', + mobile_others:'其他', + + pss:'手势', + pss_paper:'布', + pss_scissor:'剪刀', + pss_stone:'石头', + pss_paper_info:'石头剪刀布时的一种手势。克制石头,但被剪刀克制。', + pss_scissor_info:'石头剪刀布时的一种手势。克制布,但被石头克制。', + pss_stone_info:'石头剪刀布时的一种手势。克制剪刀,但被布克制。', + + db_atk:'进攻对策', + db_atk1:'全军出击', + db_atk2:'分兵围城', + + db_def:'防御对策', + db_def1:'奇袭粮道', + db_def2:'开城诱敌', + + shouye:'守邺', + shouye_info:'每回合限一次。当其他角色使用牌指定你为唯一目标时,你可以与其进行【对策】。若你赢,则你取消此牌的目标,且你于此牌结算完成后获得其对应的所有实体牌。', + liezhi:'烈直', + liezhi_info:'准备阶段,你可以依次弃置至多两名角色区域内的各一张牌。若你受到过伤害,则〖烈直〗于你的下个回合无效。', + + xinzhanyi:'战意', + xinzhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作杀、酒或桃使用,且你本回合第一次以此法使用的牌的回复值/伤害值+1;锦囊牌,摸三张牌且你使用的牌不能被【无懈可击】响应;装备牌,你使用【杀】指定目标角色后,其弃置两张牌,然后你获得其中的一张。', + xinzhanyi_basic_backup:'战意', + xinzhanyi_basic:'战意', + xinzhanyi_equip:'战意', + + meiyong:'姝勇', + meiyong_info:'当你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后其摸一张牌。', + rexushen:'许身', + rexushen_info:'限定技,出牌阶段,你可以失去X点体力(X为场上男性角色的数量)。若你以此法进入了濒死状态,则当你因一名角色而脱离此濒死状态后,你可以令其获得技能〖武圣〗和〖当先〗(其以此法获得的〖当先〗结算时视为其发动过〖伏枥〗)。', + rezhennan:'镇南', + rezhennan_info:'当你成为其他角色使用的牌的目标后,若此牌的目标数大于该角色的体力值,则你可以弃置一张牌并对其造成1点伤害。', + + hujinding:'胡金定', + huaizi:'怀子', + huaizi_info:'锁定技,你的手牌上限为你的体力上限。', + renshi:'仁释', + renshi_info:'锁定技,当你受到【杀】的伤害时,若你已受伤,则你防止此伤害并获得此【杀】对应的所有实体牌,然后减1点体力上限。', + wuyuan:'武缘', + wuyuan_info:'出牌阶段限一次,你可将一张【杀】交给一名其他角色,然后你回复1点体力,其摸一张牌。若此【杀】为:红色【杀】,其回复1点体力;属性【杀】,其改为摸两张牌。', + + re_weiwenzhugezhi:'手杀卫温诸葛直', + re_xugong:'手杀许贡', + re_zhanggong:'手杀张恭', + reqianxin:'遣信', + reqianxin_info:'出牌阶段限一次,你可将至多两张手牌随机交给等量的其他角色,称为「信」。这些角色的准备阶段开始时,若其手牌中有「信」,则其选择一项:令你摸两张牌,本回合手牌上限-2。', + rebiaozhao:"表召", + "rebiaozhao_info":"结束阶段,你可以将一张牌置于武将牌上,称为「表」。当有一张与「表」点数相同的牌进入弃牌堆时,你将「表」置入弃牌堆并失去1点体力。准备阶段,若你的武将牌上有「表」,则你移去「表」并选择一名角色,该角色回复1点体力并摸三张牌。", + "rebiaozhao2":"表召", + "rebiaozhao2_info":"", + "rebiaozhao3":"表召", + "rebiaozhao3_info":"", + refuhai:'浮海', + refuhai_info:'出牌阶段限一次,你可令其他角色同时在「潮起」和「潮落」中选择一项,并依次展示这些角色的选项。若从你下家开始选择了相同选项的角色数目大于1,则你摸X张牌(X为连续相同结果的数量)。', + qiaosi:'巧思', + qiaosi_info:'出牌阶段限一次,你可以表演「大键角色图」并根据表演结果获得相应的牌。然后,你选择一项:1.弃置X张牌。2.将X张牌交给一名其他角色。(X为你以此法获得的牌数)', + qiaosi_map:'大键角色图', + qiaosi_map_info:'
  • 星野 梦美:锦囊牌*2
  • 能美 库特莉亚芙卡:装备牌/【杀】/【酒】*1
  • 友利 奈绪:【杀】/【酒】*1
  • 神尾 观铃:【闪】/【桃】*1
  • 伊吹 风子:锦囊牌/【闪】/【桃】*1
  • 仲村 ゆり:装备牌*2
  • Illustration: うら;Twitter:@ura530', + qiaosi_c1:' ', + //星野 梦美 + qiaosi_c2:' ', + //能美 库特莉亚芙卡 + qiaosi_c3:' ', + //友利 奈绪 + qiaosi_c4:' ', + //神尾 观铃 + qiaosi_c5:' ', + //伊吹 风子 + qiaosi_c6:' ', + //仲村 ゆり + mobile_sunben:'那个男人', + //孙笨 + + yangbiao:'杨彪', + zhaohan:'昭汉', + zhaohan_info:'锁定技,你的第1-4个准备阶段开始时,你加1点体力上限并回复1点体力,你的第5-7个准备阶段开始时,你减1点体力上限。', + rangjie:'让节', + rangjie_info:'当你受到1点伤害后,你可以选择一项并摸一张牌:获得牌堆里你选择的类型的一张牌,或移动场上的一张牌。', + yizheng:'义争', + yizheng2:'义争', + yizheng_info:'出牌阶段限一次,你可以和一名体力值不大于你的其他角色拼点。若你赢,其跳过下个摸牌阶段。若你没赢,你减1点体力上限。', + re_heqi:'手杀贺齐', + reqizhou:'绮胄', + reqizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上:〖英姿〗;2种或以上:〖奇袭〗;3种或以上:〖旋风〗。', + reshanxi:'闪袭', + reshanxi2:'闪袭', + reshanxi_info:'出牌阶段开始时,你可以弃置一张红色基本牌并选择一名有牌的其他角色,将其的至多X张牌置于其的武将牌上(X为你的体力值)。回合结束时,该角色获得这些牌。', + chendeng:'陈登', + zhouxuan:'周旋', + zhouxuan2:'周旋', + zhouxuan_info:'结束阶段,你可以弃置一张牌并指定一名角色,然后选择一个基本牌的名称或非基本牌的类型。其使用或打出下一张牌时,若此牌的名称或类型和你选择的相同,则你观看牌堆顶的三张牌,然后将这些牌分配给任意角色。', + fengji:'丰积', + fengji_info:'锁定技,回合结束时,你记录你的手牌数。回合开始时,若你的手牌数不小于你记录的手牌数,则你摸两张牌且本回合手牌上限为体力上限。', + re_guanqiujian:'手杀毌丘俭', + rezhengrong:'征荣', + rehongju:'鸿举', + reqingce:'清侧', + reqingce_backup:'清侧', + rezhengrong_info:'当你于出牌阶段使用的指定了其他角色为目标的牌结算完成后,若此牌是你本局游戏内于出牌阶段使用的指定了其他角色为目标的第偶数张牌,则你可以将一名其他角色角色的随机一张牌置于你的武将牌上,称为「荣」。', + rehongju_info:'觉醒技,准备阶段,若你武将牌上「荣」的数量不小于3且有角色死亡,则你摸等同于「荣」数量的牌。然后可以用任意数量的手牌交换等量的「荣」。你减1点体力上限并获得技能〖清侧〗。', + reqingce_info:'出牌阶段,你可以将一张「荣」置入弃牌堆,然后弃置场上的一张牌。', + re_pangtong:"手杀庞统", + dongcheng:'董承', + chengzhao:'承诏', + chengzhao_info:'一名角色的结束阶段,若你于本回合内获得了两张以上的牌,则你可以与一名其他角色拼点。若你赢,你视为对其使用一张无视防具的【杀】。', + yangyi:'杨仪', + duoduan:'度断', + duoduan_info:'每回合限一次,当你成为【杀】的目标后,你可以重铸一张牌。若如此做,此【杀】的使用者选择一项:摸两张牌令此【杀】无效,或弃置一张牌并令你不能闪避此【杀】。', + gongsun:'共损', + gongsun_info:'出牌阶段开始时,你可以弃置两张牌并指定一名其他角色。你选择一个基本牌或普通锦囊牌的牌名。直到你的下回合开始或你死亡,你与其不能使用或打出或弃置此名称的牌。', + gongsun_shadow:'共损', + xin_chengpu:'手杀程普', + relihuo:'疠火', + relihuo_damage:'疠火', + relihuo_baigei:'疠火', + relihuo_info:'当你使用普【杀】时,你可以将此杀改为火属性。若如此做,当你因执行此【杀】的效果而对横置角色造成伤害时,此伤害+1;当你使用的火【杀】结算完成后,你失去X点体力(X为你因此【杀】造成的伤害总点数的一半且向下取整)', + dengzhi:'邓芝', + jimeng:'急盟', + jimeng_info:'出牌阶段开始时,你可以获得一名其他角色的一张牌,然后交给该角色X张牌(X为你当前体力值)。', + shuaiyan:'率言', + shuaiyan_info:'弃牌阶段开始时,若你的手牌数大于1,则你可以展示所有手牌,然后你令一名其他角色交给你一张牌。', + zhengxuan:'郑玄', + zhengjing:'整经', + zhengjing_info:'出牌阶段,你可以整理卡牌。然后,你将整理出的卡牌置于一名角色的武将牌上。该角色的准备阶段获得这些牌,w且 跳过此回合的判定和摸牌阶段。', + zhengjing2:'整经', + + mobile_yijiang:'武将设计征集大赛', + yj_zhanghe:'☆张郃', + yj_zhangliao:'☆张辽', + yj_xuhuang:'☆徐晃', + yj_ganning:'☆甘宁', + xhzhiyan:'治严', + xhzhiyan_info:'出牌阶段,若你的手牌数不等于体力上限,则你可以将手牌摸至/弃至手牌上限,然后本回合不能对其他角色使用牌/可以将弃置的一张牌交给一名其他角色。', + zhilve:'知略', + zhilve_info:'锁定技,准备阶段,你选择一项:1.移动场上装备区的一张牌并失去1点体力。2.移动场上判定区的一张牌并令本回合手牌上限-1。3.本回合摸牌阶段多摸一张牌且使用的第一张【杀】无距离限制且不计入次数限制。', + xinzhilve:'知略', + xinzhilve_backup:'知略', + xinzhilve_mark:'知略', + xinzhilve_info:'出牌阶段限一次,你可以失去1点体力并选择一项:1.移动场上的一张牌;2.视为使用一张无距离限制且不计入次数限制的【杀】并摸一张牌。然后你本回合的手牌上限+1。', + xinxhzhiyan:'治严', + xinxhzhiyan_false:'治严', + xinxhzhiyan_info:'出牌阶段每项各限一次,若你的手牌数:大于体力上限,则你可以将X张手牌交给一名其他角色;小于体力上限,则你可以摸X张牌且本阶段内不能再对其他角色使用牌。(X为你的手牌数与体力上限之差的绝对值)', + weifeng:'威风', + weifeng2:'威风', + weifeng3:'威风', + weifeng_info:'锁定技,当你于出牌阶段内使用第一张伤害性基本牌或普通锦囊牌后,你令此牌的一名没有“惧”的其他目标角色获得一枚名称为此牌牌名的“惧”。有“惧”的角色受到伤害时,其移去“惧”,然后若造成伤害的牌名称和“惧”:相同,此伤害+1;不同,你获得该角色的一张牌。准备阶段开始时或你死亡时,你移去场上的所有“惧”。', + gnjinfan:'锦帆', + gnjinfan3:'锦帆', + gnjinfan4:'锦帆', + gnjinfan6:'锦帆', + gnjinfan7:'锦帆', + gnjinfan4_backup:'锦帆', + gnjinfan_info:'弃牌阶段开始时,你可将任意张手牌置于武将牌上,称为“铃”(每种花色的“铃”限一张)。当你需要使用或打出一张手牌时,你可以使用或打出一张“铃”。当有“铃”移动到处理区后,你从牌堆中获得与此次移动到第一张“铃”花色相同的一张牌。', + gnsheque:'射却', + gnsheque_info:'一名其他角色的准备阶段开始时,若其装备区内有牌,则你可以对其使用一张【杀】(无距离关系的限制且无视防具)。', + sp_sufei:'SP苏飞', + zhengjian:'诤荐', + zhengjian_draw:'诤荐', + zhengjian_mark:'诤荐', + zhengjian_info:'锁定技,结束阶段,你令一名角色获得一枚“诤”。回合开始时,你令有“诤”的角色移去“诤”并摸X张牌(X为其最后一次获得“诤”后使用和打出的牌数,且至多不能超过其体力上限或5)。', + gaoyuan:'告援', + gaoyuan_info:'当你成为【杀】的目标时,你可弃置一张牌将此【杀】转移给一名有“诤”且不是此【杀】使用者的其他角色。', + tongqu:'通渠', + tongqu_info:'游戏开始时,你获得一个“渠”。出牌阶段开始时,你可令一名没有“渠”的角色获得一个“渠”。有“渠”的角色摸牌阶段,其多摸一张牌,然后其将一张牌交给一名有“渠”的其他角色或弃置一张牌。有“渠”的角色受到伤害后,其弃置“渠”', + xinwanlan:'挽澜', + xinwanlan_info:'当有角色受到伤害时,若伤害点数大于其体力值,则你可以弃置所有非基本牌(至少两张)并防止此伤害。', + re_xusheng:'手杀徐盛', + } + }; +}); diff --git a/character/old.js b/character/old.js index 12b67b140..232e5fd57 100755 --- a/character/old.js +++ b/character/old.js @@ -1,934 +1,802 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'old', - characterSort:{ - old:{ - old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde"], - old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong"], - old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"], - old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang"], - old_yijiang3:["liru","old_zhuran","ol_manchong","old_fuhuanghou","old_caochong"], - old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan"], - old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"], - old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"], - old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","ol_maliang","old_wangyun"], - old_mobile:["old_caochun","old_majun","old_jiakui"], - }, - }, - character:{ - old_jiakui:['male','wei',3,['tongqu','xinwanlan']], - pangde:['male','qun',4,['mashu','mengjin']], - ol_huaxiong:["male","qun",6,["new_reyaowu"]], - old_wangyun:['male','qun',4,['wylianji','moucheng']], - xiaoqiao:['female','wu',3,['tianxiang','hongyan']], - weiyan:['male','shu',4,['kuanggu']], - xiahouyuan:['male','wei',4,['shensu']], - ol_maliang:['male','shu',3,['zishu','yingyuan']], - old_huangfusong:['male','qun',4,['fenyue']], - old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]], - old_zhangxingcai:['female','shu',3,['oldshenxian','qiangwu']], - old_fuhuanghou:['female','qun',3,['oldzhuikong','oldqiuyuan']], - old_caochong:['male','wei',3,['oldrenxin','oldchengxiang']], - yuji:['male','qun',3,['old_guhuo'],['forbidai']], - zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']], - old_zhangfei:['male','shu',4,['paoxiao','new_tishen']], - old_zhaoyun:['male','shu',4,['longdan','new_yajiao']], - old_huatuo:['male','qun',3,['jijiu','chulao']], - jsp_caoren:['male','wei',4,['kuiwei','yanzheng']], - old_caochun:['male','wei',4,['shanjia']], - masu:['male','shu',3,['xinzhan','huilei']], - xushu:['male','shu',3,['wuyan','jujian']], - fazheng:['male','shu',3,['enyuan','xuanhuo']], - liru:['male','qun',3,['juece','mieji','fencheng']], - yujin:['male','wei',4,['yizhong']], - xin_yujin:['male','wei',4,['jieyue']], - //lusu:['male','wu',3,['haoshi','dimeng']], - //yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']], - old_zhonghui:['male','wei',3,['zzhenggong','zquanji','zbaijiang']], - old_xusheng:['male','wu',4,['pojun']], - old_zhuran:['male','wu',4,['olddanshou']], - old_lingtong:['male','wu',4,['oldxuanfeng']], - old_madai:['male','shu',4,['mashu','oldqianxi']], - old_caoxiu:['male','wei',4,['taoxi']], - old_wangyi:['female','wei',3,['oldzhenlie','oldmiji']], - old_caozhen:['male','wei',4,['sidi']], - old_quancong:['male','wu',4,['zhenshan']], - old_lingju:['female','qun',3,['jieyuan','fenxin_old']], - old_maliang:['male','shu',3,['xiemu','naman']], - old_chenqun:['male','wei',3,['dingpin','oldfaen']], - old_zhuhuan:['male','wu',4,['youdi']], - old_zhuzhi:['male','wu',4,['anguo']], - - old_machao:['male','qun',4,['zhuiji','oldcihuai']], - old_zhugezhan:["male","shu",3,["old_zuilun","old_fuyin"]], - zhangliang:["male","qun",4,["old_jijun","old_fangtong"]], - old_guanzhang:['male','shu',4,['old_fuhun']], - ol_xinxianying:['female','wei',3,['caishi','zhongjian']], - ol_zhangrang:['male','qun',3,['xintaoluan']], - ol_yujin:['male','wei',4,['rezhenjun']], - ol_guansuo:['male','shu',4,['zhengnan','xiefang']], - ol_manchong:['male','wei',3,['yuce','junxing']], - ol_liuyu:['male','qun',2,['zongzuo','zhige']], - old_guanqiujian:["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]], - }, - characterFilter:{ - old_lingju:function(mode){ - return mode=='identity'; - } - }, - skill:{ - oldshenxian:{ - audio:'shenxian', - inherit:'shenxian', - }, - old_fuhun:{ - audio:'fuhun', - trigger:{player:'phaseDrawBegin1'}, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - 'step 0' - trigger.changeToZero(); - 'step 1' - var cards=get.cards(2); - event.cards=cards; - player.showCards(cards); - 'step 2' - player.gain(cards,'gain2'); - if(get.color(cards[0])!=get.color(cards[1])){ - player.addTempSkill('wusheng'); - player.addTempSkill('paoxiao'); - } - }, - }, - "old_guhuo":{ - group:["old_guhuo_guess","old_guhuo_respond","old_guhuo_wuxie"], - enable:"chooseToUse", - filter:function (event,player){ - if(!player.countCards('h')) return false; - var list=['sha','tao','shan','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; - if(get.mode()=='guozhan'){ - list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']); - } - for(var i=0;i0; - }); - event.guessers.sort(lib.sort.seat); - event.ally=[]; - event.betray=[]; - 'step 1' - if(event.guessers.length==0) event.goto(3); - else{ - event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){ - if(get.attitude(event.guessers[0],player)>0) return '不质疑'; - return Math.random()<0.5?'不质疑':'质疑'; - }); - } - 'step 2' - if(!result.control) result.control='不质疑'; - event.guessers[0].chat(result.control); - game.delay(); - if(result.control=='不质疑'){ - game.log(event.guessers[0],'#g不质疑'); - event.ally.push(event.guessers[0]); - }else{ - game.log(event.guessers[0],'#y质疑'); - event.betray.push(event.guessers[0]); - } - event.guessers.remove(event.guessers[0]); - if(event.guessers.length) event.goto(1); - 'step 3' - player.showCards(trigger.cards); - if(event.betray.length){ - if(trigger.card.name==trigger.cards[0].name){ - if(get.suit(trigger.cards[0])!='heart'){ - game.log(player,'使用的','#y'+get.translation(trigger.card.name),'作废了'); - game.cardsDiscard(trigger.cards); - trigger.cancel(); - } - for(var i=0;i0; - }); - event.guessers.sort(lib.sort.seat); - event.ally=[]; - event.betray=[]; - } - else event.finish(); - 'step 2' - if(event.guessers.length==0) event.goto(4); - else{ - event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){ - if(get.attitude(event.guessers[0],player)>0) return '不质疑'; - return Math.random()<0.5?'不质疑':'质疑'; - }); - } - 'step 3' - if(!result.control) result.control='不质疑'; - event.guessers[0].chat(result.control); - game.delay(); - if(result.control=='不质疑'){ - game.log(event.guessers[0],'#g不质疑'); - event.ally.push(event.guessers[0]); - }else{ - game.log(event.guessers[0],'#y质疑'); - event.betray.push(event.guessers[0]); - } - event.guessers.remove(event.guessers[0]); - if(event.guessers.length) event.goto(2); - 'step 4' - var bool=true; - player.showCards(event.card); - if(event.betray.length){ - if(event.name==event.card.name){ - if(get.suit(event.card)!='heart'){ - game.log(player,'使用的','#y'+get.translation(event.name),'作废了'); - game.cardsDiscard(event.card); - bool=false; - } - for(var i=0;i0; - }, - viewAs:{ - name:"wuxie", - }, - check:function(card){ - if(card.name=='wuxie') return 1000; - return 0; - }, - prompt:"将一张手牌当无懈可击使用", - threaten:1.2, - }, - old_zuilun:{ - audio:'xinfu_zuilun', - subSkill:{ - e:{}, - h:{}, - }, - enable:"phaseUse", - usable:2, - filterTarget:function (card,player,target){ - if(player==target) return false; - var pos='he'; - if(player.hasSkill('old_zuilun_h')) pos='e'; - if(player.hasSkill('old_zuilun_e')) pos='h'; - return target.countGainableCards(player,pos)>0; - }, - content:function (){ - 'step 0' - var pos='he'; - if(player.hasSkill('old_zuilun_h')) pos='e'; - if(player.hasSkill('old_zuilun_e')) pos='h'; - player.gainPlayerCard(target,pos,true); - 'step 1' - if(result.bool&&result.cards&&result.cards.length){ - target.draw(); - var pos=result.cards[0].original; - if(pos=='h'||pos=='e') player.addTempSkill('old_zuilun_'+pos,'phaseUseAfter'); - } - }, - ai:{ - order:7, - result:{ - target:-1, - }, - }, - }, - old_fuyin:{ - mod:{ - targetEnabled:function(card,player,target){ - if((card.name=='juedou'||card.name=='sha'||card.name=='huogong')&&player!=target&&player.countCards('h')>=target.countCards('h')&&target.isEmpty(2)) return false; - }, - }, - }, - "old_jijun":{ - marktext:"方", - audio:"xinfu_jijun", - intro:{ - content:"cards", - }, - enable:"phaseUse", - filterCard:true, - selectCard:[1,Infinity], - filter:function (event,player){ - return player.countCards('h')>0; - }, - check:function (card){ - var player=_status.event.player; - if(player.storage.old_jijun&&(36-player.storage.old_jijun.length)<=player.countCards('h')) return 1; - return 5-get.value(card); - }, - discard:false, - lose:false, - content:function (){ - player.lose(cards,ui.special,'toStorage'); - player.$give(cards,player); - if(!player.storage.old_jijun) player.storage.old_jijun=[]; - player.storage.old_jijun.addArray(cards); - player.markSkill('old_jijun'); - }, - ai:{order:1,result:{player:1}}, - }, - "old_fangtong":{ - trigger:{ - player:"phaseJieshuBegin", - }, - audio:"xinfu_fangtong", - forced:true, - skillAnimation:true, - animationColor:'metal', - filter:function (event,player){ - return (player.storage.old_jijun&&player.storage.old_jijun.length>35); - }, - content:function (){ - var bool=false; - if(player==game.me) bool=true; - else switch(get.mode()){ - case 'identity':{ - game.showIdentity(); - var id1=player.identity; - var id2=game.me.identity; - if(['zhu','zhong','mingzhong'].contains(id1)){ - if(['zhu','zhong','mingzhong'].contains(id2)) bool=true; - break; - } - else if(id1=='fan'){ - if(id2=='fan') bool=true; - break; - } - break; - } - case 'guozhan':{ - if(game.me.isFriendOf(player)) bool=true; - break; - } - case 'versus':{ - if(player.side==game.me.side) bool=true; - break; - } - case 'boss':{ - if(player.side==game.me.side) bool=true; - break; - } - default:{} - } - game.over(bool); - }, - }, - - oldanxu:{ - enable:'phaseUse', - usable:1, - multitarget:true, - audio:2, - filterTarget:function(card,player,target){ - if(player==target) return false; - var num=target.countCards('h'); - if(ui.selected.targets.length){ - return numplayers[i].countCards('h')) return true; - } - return false; - }, - selectTarget:2, - content:function(){ - 'step 0' - var gainner,giver; - if(targets[0].countCards('h')0) return -1; - var players=game.filterPlayer(); - for(var i=0;i=0&&num20; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - expose:0.2 - } - }, - zhenshan:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'},player,event)&&!event.filterCard({name:'sha'},player,event)) return false; - if(player.hasSkill('zhenshan2')) return false; - var nh=player.countCards('h'); - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')0; - })){ - if(card.name=='sha'){ - if(card.nature=='fire') return 2.95; - else if(card.nature=='fire') return 2.92; - else return 2.9; - } - else if(card.name=='tao'||card.name=='shan'){ - return 4; - } - } - return 0; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - viewAs:{name:links[0][2],nature:links[0][3],isCard:true}, - selectCard:-1, - popname:true, - log:false, - precontent:function(){ - 'step 0' - player.chooseTarget('选择交换手牌的目标',function(card,player,target){ - return target.countCards('h')0&¤t.countCards('h')player.hp){ - var cards=get.cards(player.maxHp-player.hp); - event.cards=cards; - var dialog=ui.create.dialog('选择获得卡牌的目标',cards,'hidden'); - dialog.classList.add('noselect'); - player.chooseTarget(true,dialog).ai=function(target){ - return get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); - } - } - else{ - event.finish(); - } - 'step 2' - player.line(result.targets); - result.targets[0].gain(event.cards,'draw'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0]; - if(target.hasFriend()){ - if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1]; - } - } - }, - threaten:function(player,target){ - if(target.hp==1) return 3; - if(target.hp==2) return 2; - return 1; - }, - } - }, - oldqianxi:{ - trigger:{source:'damageBegin2'}, - check:function(event,player){ - var att=get.attitude(player,event.player); - if(event.player.hp==event.player.maxHp) return att<0; - if(event.player.hp==event.player.maxHp-1&& - (event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0; - return att>0; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.judge(function(card){ - return get.suit(card)!='heart'?1:-1; - }); - 'step 1' - if(result.bool){ - trigger.cancel(); - trigger.player.loseMaxHp(true); - } - } - }, - oldxuanfeng:{ - audio:'xuanfeng', - trigger:{player:'loseAfter'}, - direct:true, - filter:function(event,player){ - return event.es&&event.es.length>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('oldxuanfeng'),function(card,player,target){ - if(target==player) return false; - return get.distance(player,target)<=1||player.canUse('sha',target,false); - }).set('ai',function(target){ - if(get.distance(player,target)<=1){ - return get.damageEffect(target,player,player)*2; - } - else{ - return get.effect(target,{name:'sha'},player,player); - } - }); - "step 1" - if(result.bool){ - player.logSkill('oldxuanfeng',result.targets); - var target=result.targets[0]; - var distance=get.distance(player,target); - if(distance<=1&&player.canUse('sha',target,false)){ - player.chooseControl('出杀','造成伤害').ai=function(){ - return '造成伤害'; - } - event.target=target; - } - else if(distance<=1){ - target.damage(); - event.finish(); - } - else{ - player.useCard({name:'sha',isCard:true},target,false).animate=false; - game.delay(); - event.finish(); - } - } - else{ - event.finish(); - } - "step 2" - var target=event.target; - if(result.control=='出杀'){ - player.useCard({name:'sha',isCard:true},target,false).animate=false; - game.delay(); - } - else{ - target.damage(); - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip') return [1,3]; - } - }, - reverseEquip:true, - noe:true - } - }, - }, - translate:{ - old_jiakui:'旧贾逵', - old_zhangxingcai:'旧张星彩', - old_majun:'骰子马钧', - old_yuanshu:'手杀袁术', - old_xusheng:'旧徐盛', - old_lingtong:'旧凌统', - old_zhuran:'旧朱然', - old_madai:'旧马岱', - old_caoxiu:'旧曹休', - old_wangyi:'旧王异', - old_caozhen:'旧曹真', - old_quancong:'旧全琮', - old_lingju:'旧灵雎', - old_maliang:'旧马良', - old_chenqun:'旧陈群', - old_zhuhuan:'旧朱桓', - old_zhuzhi:'旧朱治', - old_machao:'☆SP马超', - old_zhugezhan:"旧诸葛瞻", - zhangliang:'SP张梁', - yuji:'旧于吉', - old_guanzhang:'旧关兴张苞', - old_zhangfei:'OL张飞', - old_huatuo:'OL华佗', - jsp_caoren:'☆SP曹仁', - ol_xinxianying:'OL辛宪英', - ol_zhangrang:'旧张让', - ol_yujin:'镇军于禁', - ol_liaohua:'OL廖化', - ol_zhuran:'OL朱然', - ol_guansuo:'OL关索', - ol_manchong:'OL满宠', - ol_guohuai:'OL郭淮', - old_fuhuanghou:'旧伏皇后', - old_caochong:'旧曹冲', - old_guanqiujian:'旧毌丘俭', - old_huangfusong:'旧皇甫嵩', - ol_maliang:'旧马良', - ol_liuyu:'OL刘虞', - old_wangyun:'旧王允', - old_zhaoyun:'旧赵云', - ol_huaxiong:'旧华雄', - - old_fuhun:'父魂', - old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。', - "old_guhuo":"蛊惑", - "old_guhuo_info":"你可以说出任何一种基本牌或普通锦囊牌,并正面朝下使用或打出一张手牌。体力值不为0的其他角色依次选择是否质疑。若无角色质疑,则该牌按你所述之牌结算。若有角色质疑则亮出验明:若为真,质疑者各失去1点体力;若为假,质疑者各摸一张牌。无论真假,弃置被质疑的牌。仅当被质疑的牌为红桃花色且为真时,该牌仍然可以进行结算。", - "old_guhuo_guess":"蛊惑", - "old_guhuo_wuxie":"蛊惑", - "old_jijun":"集军", - "old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)", - "old_fangtong":"方统", - "old_fangtong_info":"锁定技,结束阶段,若你的“方”的数目大于等于36,则你所在的游戏阵营直接取得游戏胜利。", - old_zuilun:"罪论", - old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。", - old_fuyin:"父荫", - old_fuyin_info:"锁定技,若你的装备区内没有防具牌,手牌数大于或等于你的其他角色不能使用【杀】、【决斗】或【火攻】指定你为目标", - oldanxu:'安恤', - oldanxu_info:'出牌阶段限一次,你可以选择手牌数不相等的两名其他角色,令其中手牌少的角色获得手牌多的角色的一张手牌并展示之,然后若此牌不为黑桃,你摸一张牌。', - oldfaen:'法恩', - oldfaen_info:'当一名角色翻面或横置后,你可以令其摸一张牌。', - zhenshan:'振赡', - zhenshan_use:'振赡', - zhenshan_use_backup:'振赡', - zhenshan_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌', - zhenshan_use_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌', - oldzhenlie:'贞烈', - oldzhenlie_info:'在你的判定牌生效前,你可以亮出牌堆顶的一张牌代替之', - oldmiji:'秘计', - oldmiji_info:'准备/结束阶段开始时,若你已受伤,你可以判定,若判定结果为黑色,你观看牌堆顶的X张牌(X为你已损失的体力值),然后将这些牌交给一名角色', - oldqianxi:'潜袭', - oldqianxi_info:'当你使用【杀】对距离为1的目标角色造成伤害时,你可以进行一次判定,若判定结果不为红桃,你防止此伤害,令其减1点体力上限', - oldxuanfeng:'旋风', - oldxuanfeng_info:'每当你失去一次装备区里的牌时,你可以执行下列两项中的一项:1.视为对任意一名其他角色使用一张【杀】(此【杀】不计入每回合的使用限制);2.对与你距离1以内的一名其他角色造成一点伤害', - - old_shenhua:'神话再临', - old_refresh:'界限突破', - old_yijiang1:'一将成名2011', - old_yijiang2:'一将成名2012', - old_yijiang3:'一将成名2013', - old_yijiang4:'一将成名2014', - old_yijiang5:'一将成名2015', - old_yijiang67:'原创设计', - old_sp:'SP', - old_mobile:'移动版', - } - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'old', + characterSort:{ + old:{ + old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde"], + old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong"], + old_yijiang1:["masu","xushu","yujin","xin_yujin","old_xusheng","old_lingtong"], + old_yijiang2:["old_zhonghui"], + old_yijiang3:["liru","old_zhuran","ol_manchong","old_fuhuanghou","old_caochong"], + old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan"], + old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"], + old_yijiang67:["ol_zhangrang","ol_liuyu"], + old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","ol_maliang","old_wangyun"], + old_mobile:["old_caochun","old_majun","old_jiakui"], + }, + }, + character:{ + old_jiakui:['male','wei',3,['tongqu','xinwanlan']], + pangde:['male','qun',4,['mashu','mengjin']], + ol_huaxiong:["male","qun",6,["new_reyaowu"]], + old_wangyun:['male','qun',4,['wylianji','moucheng']], + xiaoqiao:['female','wu',3,['tianxiang','hongyan']], + weiyan:['male','shu',4,['kuanggu']], + xiahouyuan:['male','wei',4,['shensu']], + ol_maliang:['male','shu',3,['zishu','yingyuan']], + old_huangfusong:['male','qun',4,['fenyue']], + old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]], + old_zhangxingcai:['female','shu',3,['oldshenxian','qiangwu']], + old_fuhuanghou:['female','qun',3,['oldzhuikong','oldqiuyuan']], + old_caochong:['male','wei',3,['oldrenxin','oldchengxiang']], + yuji:['male','qun',3,['old_guhuo'],['forbidai']], + zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']], + old_zhangfei:['male','shu',4,['paoxiao','new_tishen']], + old_zhaoyun:['male','shu',4,['longdan','new_yajiao']], + old_huatuo:['male','qun',3,['jijiu','chulao']], + jsp_caoren:['male','wei',4,['kuiwei','yanzheng']], + old_caochun:['male','wei',4,['shanjia']], + masu:['male','shu',3,['xinzhan','huilei']], + xushu:['male','shu',3,['wuyan','jujian']], + liru:['male','qun',3,['juece','mieji','fencheng']], + yujin:['male','wei',4,['yizhong']], + xin_yujin:['male','wei',4,['jieyue']], + //lusu:['male','wu',3,['haoshi','dimeng']], + //yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']], + old_zhonghui:['male','wei',3,['zzhenggong','zquanji','zbaijiang']], + old_xusheng:['male','wu',4,['pojun']], + old_zhuran:['male','wu',4,['olddanshou']], + old_lingtong:['male','wu',4,['oldxuanfeng']], + old_caoxiu:['male','wei',4,['taoxi']], + old_caozhen:['male','wei',4,['sidi']], + old_quancong:['male','wu',4,['zhenshan']], + old_lingju:['female','qun',3,['jieyuan','fenxin_old']], + old_maliang:['male','shu',3,['xiemu','naman']], + old_chenqun:['male','wei',3,['dingpin','oldfaen']], + old_zhuhuan:['male','wu',4,['youdi']], + old_zhuzhi:['male','wu',4,['anguo']], + + old_machao:['male','qun',4,['zhuiji','oldcihuai']], + old_zhugezhan:["male","shu",3,["old_zuilun","old_fuyin"]], + zhangliang:["male","qun",4,["old_jijun","old_fangtong"]], + ol_zhangrang:['male','qun',3,['xintaoluan']], + ol_guansuo:['male','shu',4,['zhengnan','xiefang']], + ol_manchong:['male','wei',3,['yuce','junxing']], + ol_liuyu:['male','qun',2,['zongzuo','zhige']], + old_guanqiujian:["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]], + }, + characterFilter:{ + old_lingju:function(mode){ + return mode=='identity'; + } + }, + skill:{ + oldshenxian:{ + audio:'shenxian', + inherit:'shenxian', + }, + "old_guhuo":{ + group:["old_guhuo_guess","old_guhuo_respond","old_guhuo_wuxie"], + enable:"chooseToUse", + filter:function (event,player){ + if(!player.countCards('h')) return false; + var list=['sha','tao','shan','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; + if(get.mode()=='guozhan'){ + list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']); + } + for(var i=0;i0; + }); + event.guessers.sort(lib.sort.seat); + event.ally=[]; + event.betray=[]; + 'step 1' + if(event.guessers.length==0) event.goto(3); + else{ + event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){ + if(get.attitude(event.guessers[0],player)>0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 2' + if(!result.control) result.control='不质疑'; + event.guessers[0].chat(result.control); + game.delay(); + if(result.control=='不质疑'){ + game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + if(event.guessers.length) event.goto(1); + 'step 3' + player.showCards(trigger.cards); + if(event.betray.length){ + if(trigger.card.name==trigger.cards[0].name){ + if(get.suit(trigger.cards[0])!='heart'){ + game.log(player,'使用的','#y'+get.translation(trigger.card.name),'作废了'); + game.cardsDiscard(trigger.cards); + trigger.cancel(); + } + for(var i=0;i0; + }); + event.guessers.sort(lib.sort.seat); + event.ally=[]; + event.betray=[]; + } + else event.finish(); + 'step 2' + if(event.guessers.length==0) event.goto(4); + else{ + event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){ + if(get.attitude(event.guessers[0],player)>0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 3' + if(!result.control) result.control='不质疑'; + event.guessers[0].chat(result.control); + game.delay(); + if(result.control=='不质疑'){ + game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + if(event.guessers.length) event.goto(2); + 'step 4' + var bool=true; + player.showCards(event.card); + if(event.betray.length){ + if(event.name==event.card.name){ + if(get.suit(event.card)!='heart'){ + game.log(player,'使用的','#y'+get.translation(event.name),'作废了'); + game.cardsDiscard(event.card); + bool=false; + } + for(var i=0;i0; + }, + viewAs:{ + name:"wuxie", + }, + check:function(card){ + if(card.name=='wuxie') return 1000; + return 0; + }, + prompt:"将一张手牌当无懈可击使用", + threaten:1.2, + }, + old_zuilun:{ + audio:'xinfu_zuilun', + subSkill:{ + e:{}, + h:{}, + }, + enable:"phaseUse", + usable:2, + filterTarget:function (card,player,target){ + if(player==target) return false; + var pos='he'; + if(player.hasSkill('old_zuilun_h')) pos='e'; + if(player.hasSkill('old_zuilun_e')) pos='h'; + return target.countGainableCards(player,pos)>0; + }, + content:function (){ + 'step 0' + var pos='he'; + if(player.hasSkill('old_zuilun_h')) pos='e'; + if(player.hasSkill('old_zuilun_e')) pos='h'; + player.gainPlayerCard(target,pos,true); + 'step 1' + if(result.bool&&result.cards&&result.cards.length){ + target.draw(); + var pos=result.cards[0].original; + if(pos=='h'||pos=='e') player.addTempSkill('old_zuilun_'+pos,'phaseUseAfter'); + } + }, + ai:{ + order:7, + result:{ + target:-1, + }, + }, + }, + old_fuyin:{ + mod:{ + targetEnabled:function(card,player,target){ + if((card.name=='juedou'||card.name=='sha'||card.name=='huogong')&&player!=target&&player.countCards('h')>=target.countCards('h')&&target.isEmpty(2)) return false; + }, + }, + }, + "old_jijun":{ + marktext:"方", + audio:"xinfu_jijun", + intro:{ + content:"cards", + }, + enable:"phaseUse", + filterCard:true, + selectCard:[1,Infinity], + filter:function (event,player){ + return player.countCards('h')>0; + }, + check:function (card){ + var player=_status.event.player; + if(player.storage.old_jijun&&(36-player.storage.old_jijun.length)<=player.countCards('h')) return 1; + return 5-get.value(card); + }, + discard:false, + lose:false, + content:function (){ + player.lose(cards,ui.special,'toStorage'); + player.$give(cards,player); + if(!player.storage.old_jijun) player.storage.old_jijun=[]; + player.storage.old_jijun.addArray(cards); + player.markSkill('old_jijun'); + }, + ai:{order:1,result:{player:1}}, + }, + "old_fangtong":{ + trigger:{ + player:"phaseJieshuBegin", + }, + audio:"xinfu_fangtong", + forced:true, + skillAnimation:true, + animationColor:'metal', + filter:function (event,player){ + return (player.storage.old_jijun&&player.storage.old_jijun.length>35); + }, + content:function (){ + var bool=false; + if(player==game.me) bool=true; + else switch(get.mode()){ + case 'identity':{ + game.showIdentity(); + var id1=player.identity; + var id2=game.me.identity; + if(['zhu','zhong','mingzhong'].contains(id1)){ + if(['zhu','zhong','mingzhong'].contains(id2)) bool=true; + break; + } + else if(id1=='fan'){ + if(id2=='fan') bool=true; + break; + } + break; + } + case 'guozhan':{ + if(game.me.isFriendOf(player)) bool=true; + break; + } + case 'versus':{ + if(player.side==game.me.side) bool=true; + break; + } + case 'boss':{ + if(player.side==game.me.side) bool=true; + break; + } + default:{} + } + game.over(bool); + }, + }, + + oldanxu:{ + enable:'phaseUse', + usable:1, + multitarget:true, + audio:2, + filterTarget:function(card,player,target){ + if(player==target) return false; + var num=target.countCards('h'); + if(ui.selected.targets.length){ + return numplayers[i].countCards('h')) return true; + } + return false; + }, + selectTarget:2, + content:function(){ + 'step 0' + var gainner,giver; + if(targets[0].countCards('h')0) return -1; + var players=game.filterPlayer(); + for(var i=0;i=0&&num20; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + expose:0.2 + } + }, + zhenshan:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'},player,event)&&!event.filterCard({name:'sha'},player,event)) return false; + if(player.hasSkill('zhenshan2')) return false; + var nh=player.countCards('h'); + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')0; + })){ + if(card.name=='sha'){ + if(card.nature=='fire') return 2.95; + else if(card.nature=='fire') return 2.92; + else return 2.9; + } + else if(card.name=='tao'||card.name=='shan'){ + return 4; + } + } + return 0; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + viewAs:{name:links[0][2],nature:links[0][3],isCard:true}, + selectCard:-1, + popname:true, + log:false, + precontent:function(){ + 'step 0' + player.chooseTarget('选择交换手牌的目标',function(card,player,target){ + return target.countCards('h')0&¤t.countCards('h')0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('oldxuanfeng'),function(card,player,target){ + if(target==player) return false; + return get.distance(player,target)<=1||player.canUse('sha',target,false); + }).set('ai',function(target){ + if(get.distance(player,target)<=1){ + return get.damageEffect(target,player,player)*2; + } + else{ + return get.effect(target,{name:'sha'},player,player); + } + }); + "step 1" + if(result.bool){ + player.logSkill('oldxuanfeng',result.targets); + var target=result.targets[0]; + var distance=get.distance(player,target); + if(distance<=1&&player.canUse('sha',target,false)){ + player.chooseControl('出杀','造成伤害').ai=function(){ + return '造成伤害'; + } + event.target=target; + } + else if(distance<=1){ + target.damage(); + event.finish(); + } + else{ + player.useCard({name:'sha',isCard:true},target,false).animate=false; + game.delay(); + event.finish(); + } + } + else{ + event.finish(); + } + "step 2" + var target=event.target; + if(result.control=='出杀'){ + player.useCard({name:'sha',isCard:true},target,false).animate=false; + game.delay(); + } + else{ + target.damage(); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip') return [1,3]; + } + }, + reverseEquip:true, + noe:true + } + }, + }, + translate:{ + old_jiakui:'旧贾逵', + old_zhangxingcai:'旧张星彩', + old_majun:'骰子马钧', + old_yuanshu:'手杀袁术', + old_xusheng:'旧徐盛', + old_lingtong:'旧凌统', + old_zhuran:'旧朱然', + old_caoxiu:'旧曹休', + old_caozhen:'旧曹真', + old_quancong:'旧全琮', + old_lingju:'旧灵雎', + old_maliang:'旧马良', + old_chenqun:'旧陈群', + old_zhuhuan:'旧朱桓', + old_zhuzhi:'旧朱治', + old_machao:'☆SP马超', + old_zhugezhan:"旧诸葛瞻", + zhangliang:'SP张梁', + yuji:'旧于吉', + old_zhangfei:'OL张飞', + old_huatuo:'OL华佗', + jsp_caoren:'☆SP曹仁', + ol_zhangrang:'旧张让', + ol_liaohua:'OL廖化', + ol_zhuran:'OL朱然', + ol_guansuo:'OL关索', + ol_manchong:'OL满宠', + ol_guohuai:'OL郭淮', + old_fuhuanghou:'旧伏皇后', + old_caochong:'旧曹冲', + old_guanqiujian:'旧毌丘俭', + old_huangfusong:'旧皇甫嵩', + ol_maliang:'旧马良', + ol_liuyu:'OL刘虞', + old_wangyun:'旧王允', + old_zhaoyun:'旧赵云', + ol_huaxiong:'旧华雄', + + "old_guhuo":"蛊惑", + "old_guhuo_info":"你可以说出任何一种基本牌或普通锦囊牌,并正面朝下使用或打出一张手牌。体力值不为0的其他角色依次选择是否质疑。若无角色质疑,则该牌按你所述之牌结算。若有角色质疑则亮出验明:若为真,质疑者各失去1点体力;若为假,质疑者各摸一张牌。无论真假,弃置被质疑的牌。仅当被质疑的牌为红桃花色且为真时,该牌仍然可以进行结算。", + "old_guhuo_guess":"蛊惑", + "old_guhuo_wuxie":"蛊惑", + "old_jijun":"集军", + "old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)", + "old_fangtong":"方统", + "old_fangtong_info":"锁定技,结束阶段,若你的“方”的数目大于等于36,则你所在的游戏阵营直接取得游戏胜利。", + old_zuilun:"罪论", + old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。", + old_fuyin:"父荫", + old_fuyin_info:"锁定技,若你的装备区内没有防具牌,手牌数大于或等于你的其他角色不能使用【杀】、【决斗】或【火攻】指定你为目标", + oldanxu:'安恤', + oldanxu_info:'出牌阶段限一次,你可以选择手牌数不相等的两名其他角色,令其中手牌少的角色获得手牌多的角色的一张手牌并展示之,然后若此牌不为黑桃,你摸一张牌。', + oldfaen:'法恩', + oldfaen_info:'当一名角色翻面或横置后,你可以令其摸一张牌。', + zhenshan:'振赡', + zhenshan_use:'振赡', + zhenshan_use_backup:'振赡', + zhenshan_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌', + zhenshan_use_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌', + oldxuanfeng:'旋风', + oldxuanfeng_info:'每当你失去一次装备区里的牌时,你可以执行下列两项中的一项:1.视为对任意一名其他角色使用一张【杀】(此【杀】不计入每回合的使用限制);2.对与你距离1以内的一名其他角色造成一点伤害', + + old_shenhua:'神话再临', + old_refresh:'界限突破', + old_yijiang1:'一将成名2011', + old_yijiang2:'一将成名2012', + old_yijiang3:'一将成名2013', + old_yijiang4:'一将成名2014', + old_yijiang5:'一将成名2015', + old_yijiang67:'原创设计', + old_sp:'SP', + old_mobile:'移动版', + } + }; +}); diff --git a/character/refresh.js b/character/refresh.js index 4d7abb773..1ece5156d 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -1,7070 +1,7087 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'refresh', - characterSort:{ - refresh:{ - refresh_standard:["re_caocao","re_simayi","re_guojia","re_lidian","re_zhangliao","re_xuzhu","re_xiahoudun","re_zhangfei","re_zhaoyun","re_guanyu","re_machao","re_xushu","re_zhouyu","re_lvmeng","re_ganning","re_luxun","re_daqiao","re_huanggai","re_lvbu","re_gongsunzan","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong"], - refresh_feng:['caoren','ol_xiahouyuan','re_huangzhong','ol_weiyan','ol_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji'], - refresh_huo:["ol_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","ol_pangtong","ol_yuanshao","ol_pangde","re_taishici"], - refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','ol_sunjian','re_caopi','re_xuhuang'], - refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce'], - refresh_yijiang:['re_wuguotai','re_gaoshun','re_zhangyi','re_caozhi','re_zhuran','re_wuyi','re_liaohua','re_guohuai','re_zhuran','re_chengpu','re_caozhang','re_quancong','yujin_yujin','re_lingtong','re_handang','re_zhonghui','re_sunluban','re_masu','re_jianyong','xin_xusheng'], - }, - }, - connect:true, - character:{ - xin_xusheng:['male','wu',4,['decadepojun']], - re_taishici:['male','wu',4,['tianyi','hanzhan']], - re_masu:['male','shu',3,['resanyao','rezhiman']], - re_sunluban:['female','wu',3,['rechanhui','rejiaojin']],re_zhonghui:['male','wei',4,['requanji','zili']], - re_handang:['male','wu',4,['regongji','jiefan']], - re_lingtong:['male','wu',4,['rexuanfeng']], - yujin_yujin:['male','wei',4,['rejieyue']], - re_caozhang:['male','wei',4,['new_jiangchi']], - re_chengpu:['male','wu',4,['lihuo','rechunlao']], - re_quancong:['male','wu',4,['xinyaoming']], - re_liaohua:['male','shu',4,['xindangxian','xinfuli']], - re_guohuai:['male','wei',4,['xinjingce']], - re_wuyi:['male','shu',4,['xinbenxi']], - re_zhuran:['male','wu',4,['xindanshou']], - re_caozhi:['male','wei',3,['reluoying','rejiushi','chengzhang']], - ol_pangtong:['male','shu',3,['xinlianhuan','olniepan'],[]], - re_zhangyi:['male','shu',4,['rewurong','shizhi']], - re_wuguotai:['female','wu',3,['reganlu','buyi']], - re_gaoshun:['male','qun',4,['rexianzhen','rejinjiu']], - re_caocao:['male','wei',4,['new_rejianxiong','hujia'],['zhu']], - re_simayi:['male','wei',3,['refankui','reguicai']], - re_guojia:['male','wei',3,['tiandu','new_reyiji']], - re_lidian:['male','wei',3,['xunxun','wangxi']], - re_zhangliao:['male','wei',4,['new_retuxi']], - re_xuzhu:['male','wei',4,['new_reluoyi']], - re_xiahoudun:['male','wei',4,['reganglie','new_qingjian']], - re_zhangfei:['male','shu',4,['olpaoxiao','oltishen']], - re_zhaoyun:['male','shu',4,['ollongdan','olyajiao']], - re_guanyu:['male','shu',4,['new_rewusheng','new_yijue']], - re_machao:['male','shu',4,['mashu','retieji']], - re_xushu:['male','shu',4,['zhuhai','qianxin']], - re_zhouyu:['male','wu',3,['reyingzi','refanjian']], - re_lvmeng:['male','wu',4,['keji','qinxue','botu']], - re_ganning:['male','wu',4,['qixi','fenwei']], - re_luxun:['male','wu',3,['reqianxun','relianying']], - re_daqiao:['female','wu',3,['reguose','liuli']], - re_huanggai:['male','wu',4,['rekurou','zhaxiang']], - re_lvbu:['male','qun',5,['wushuang','new_liyu']], - re_gongsunzan:['male','qun',4,['qiaomeng','reyicong']], - re_huatuo:['male','qun',3,['jijiu','new_reqingnang']], - re_liubei:['male','shu',4,['rerende','jijiang'],['zhu']], - re_diaochan:['female','qun',3,['lijian','rebiyue']], - re_huangyueying:['female','shu',3,['rejizhi','reqicai']], - re_sunquan:['male','wu',4,['rezhiheng','rejiuyuan'],['zhu']], - re_sunshangxiang:['female','wu',3,['xiaoji','rejieyin']], - re_zhenji:['female','wei',3,['reluoshen','reqingguo']], - re_zhugeliang:['male','shu',3,['reguanxing','kongcheng']], - re_huaxiong:["male","qun",6,["reyaowu"]], - - re_zhangjiao:['male','qun',3,['xinleiji','xinguidao','huangtian'],['zhu']], - xin_yuji:['male','qun',3,['reguhuo']], - re_zuoci:['male','qun',3,['rehuashen','rexinsheng']], - - ol_xiahouyuan:['male','wei',4,['xinshensu','shebian']], - caoren:['male','wei',4,['xinjushou','xinjiewei']], - re_huangzhong:['male','shu',4,['xinliegong']], - ol_weiyan:['male','shu',4,['xinkuanggu','reqimou']], - ol_xiaoqiao:['female','wu',3,['retianxiang','rehongyan']], - zhoutai:['male','wu',4,['buqu','fenji']], - ol_pangde:['male','qun',4,['mashu','rejianchu']], - re_xuhuang:['male','wei',4,['duanliang','jiezi']], - ol_sp_zhugeliang:["male","shu",3,["bazhen","rehuoji","rekanpo","cangzhuo"],[]], - re_xunyu:["male","wei",3,["quhu","rejieming"],[]], - re_dianwei:["male","wei",4,["reqiangxi"],[]], - re_yanwen:["male","qun",4,["reshuangxiong"],[]], - ol_yuanshao:['male','qun',4,['olluanji','olxueyi'],['zhu']], - re_zhurong:['female','shu',4,['juxiang','relieren']], - re_menghuo:['male','shu',4,['huoshou','rezaiqi']], - re_dongzhuo:['male','qun',8,['rejiuchi','roulin','benghuai','baonue'],['zhu']], - ol_sunjian:['male','wu',4,['gzyinghun','wulie']], - re_caopi:['male','wei',3,['rexingshang','refangzhu','songwei'],['zhu']], - re_dengai:['male','wei',4,['retuntian','zaoxian']], - re_jiangwei:['male','shu',4,['retiaoxin','zhiji']], - re_caiwenji:['female','qun',3,['rebeige','duanchang']], - ol_liushan:['male','shu',3,['xiangle','olfangquan','olruoyu'],['zhu']], - re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], - - re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']], - re_jianyong:['male','shu',3,['reqiaoshui','jyzongshi']], - }, - characterIntro:{ - re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', - re_lidian:'字曼成,曹操麾下将领。李典深明大义,不与人争功,崇尚学习与高贵儒雅,尊重博学之士,在军中被称为长者。李典有长者之风,官至破虏将军,三十六岁去世。魏文帝曹丕继位后追谥号为愍侯。', - sunben:' ', - }, - characterFilter:{ - re_zuoci:function(mode){ - return mode!='guozhan'; - } - }, - perfectPair:{ - sunben:['zhouyu','taishici','daqiao'], - }, - skill:{ - decadepojun:{ - shaRelated:true, - audio:2, - trigger:{player:'useCardToPlayered'}, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.hp>0&&event.target.countCards('he')>0; - }, - content:function(){ - 'step 0' - var next=player.choosePlayerCard(trigger.target,'he',[1,Math.min(trigger.target.hp,trigger.target.countCards('he'))],get.prompt('decadepojun',trigger.target)); - next.set('ai',function(button){ - if(!_status.event.goon) return 0; - var val=get.value(button.link); - if(button.link==_status.event.target.getEquip(2)) return 2*(val+3); - return val; - }); - next.set('goon',get.attitude(player,trigger.target)<=0); - next.set('forceAuto',true); - 'step 1' - if(result.bool){ - event.cards=result.cards; - var target=trigger.target; - player.logSkill('decadepojun',trigger.target); - target.addSkill('decadepojun2'); - target.markAuto('decadepojun2',result.cards); - target.lose(result.cards,ui.special,'toStorage'); - game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌');; - } - else event.finish(); - 'step 2' - var discard=false,draw=false; - for(var i of cards){ - var type=get.type2(i); - if(type=='equip') discard=true; - if(type=='trick') draw=true; - } - if(discard){ - event.equip=true; - player.chooseButton(['选择一张牌置入弃牌堆',cards],true).set('ai',function(button){ - return get.value(button.link,_status.event.getTrigger().target); - }); - } - if(draw) event.draw=true; - 'step 3' - if(event.equip&&result.links&&result.links.length){ - trigger.target.unmarkAuto('decadepojun2',result.links); - trigger.target.$throw(result.links,1000); - game.log(player,'将',result.links,'置入了弃牌堆'); - game.cardsDiscard(result.links); - if(!event.draw) game.delayx(); - } - if(event.draw) player.draw(); - }, - ai:{ - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; - return false; - } - }, - }, - decadepojun2:{ - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - trigger:{global:'phaseEnd'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return player.storage.decadepojun2&&player.storage.decadepojun2.length>0; - }, - content:function(){ - game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.decadepojun2,'draw','fromStorage').cards.length)+'张〖破军〗牌'); - player.storage.decadepojun2.length=0; - player.removeSkill('decadepojun2'); - }, - intro:{ - onunmark:'throw', - content:'cardCount', - }, - }, - hanzhan:{ - audio:2, - trigger:{ - global:'chooseToCompareBegin', - }, - filter:function(event,player){ - if(player==event.player) return true; - if(event.targets) return event.targets.contains(player); - return player==event.target; - }, - logTarget:function(event,player){ - if(player!=event.player) return event.player; - return event.targets||event.target; - }, - check:function(trigger,player){ - var num=0; - var targets=player==trigger.player?(trigger.targets?trigger.targets.slice(0):[trigger.target]):[trigger.player]; - while(targets.length){ - var target=targets.shift(); - if(target.getCards('h').length>1) num-=get.attitude(player,target); - } - return num>0; - }, - content:function(){ - var targets=player==trigger.player?(trigger.targets?trigger.targets.slice(0):[trigger.target]):[trigger.player]; - if(!trigger.fixedResult) trigger.fixedResult={}; - while(targets.length){ - var target=targets.shift(); - var hs=target.getCards('h'); - if(hs.length) trigger.fixedResult[target.playerid]=hs.randomGet(); - } - }, - }, - rejianchu:{ - shaRelated:true, - audio:2, - audioname:['re_pangde'], - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.countDiscardableCards(player,'he')>0; - }, - direct:true, - content:function(){ - 'step 0' - player.discardPlayerCard(trigger.target,get.prompt('rejianchu',trigger.target)).set('ai',function(button){ - if(!_status.event.att) return 0; - if(get.position(button.link)=='e'){ - if(get.subtype(button.link)=='equip2') return 2*get.value(button.link); - return get.value(button.link); - } - return 1; - }).set('logSkill',['rejianchu',trigger.target]).set('att',get.attitude(player,trigger.target)<=0); - 'step 1' - if(result.bool&&result.links&&result.links.length){ - if(get.type(result.links[0],null,result.links[0].original=='h'?player:false)!='basic'){ - trigger.getParent().directHit.add(trigger.target); - player.addTempSkill('rejianchu2'); - player.addMark('rejianchu2',1,false); - } - else if(trigger.cards){ - var list=[]; - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseTarget([1,player.hp],get.prompt2('wulie'),lib.filter.notMe).set('ai',function(){return 0}); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(); - player.logSkill('wulie',targets); - player.awakenSkill('wulie'); - player.loseHp(targets.length); - while(targets.length){ - targets[0].addSkill('wulie2'); - targets.shift().addMark('wulie2'); - } - } - }, - }, - wulie2:{ - marktext:'烈', - intro:{name2:'烈',content:'mark'}, - trigger:{player:'damageBegin3'}, - forced:true, - content:function(){ - trigger.cancel(); - player.removeMark('wulie2',1); - if(!player.storage.wulie2) player.removeSkill('wulie2'); - }, - }, - regongji:{ - mod:{ - attackFrom:function(player){ - if(player.getEquip(3)||player.getEquip(4)||player.getEquip(6)) return -Infinity - }, - }, - enable:'phaseUse', - usable:1, - position:'he', - filter:function(event,player){ - return player.countCards('he',function(card){ - return lib.skill.regongji.filterCard(card,player); - })>0; - }, - filterCard:function(card,player){ - return get.type(card,player)!='basic'; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countDiscardableCards(player,'he')>0; - }, - check:function(card){ - return 4.5-get.value(card); - }, - content:function(){ - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - var nh=target.countCards('h'); - if(att>0){ - if(target.getEquip('baiyin')&&target.isDamaged()&& - get.recoverEffect(target,player,player)>0){ - if(target.hp==1&&!target.hujia) return 1.6; - if(target.hp==2) return 0.01; - return 0; - } - } - var es=target.getCards('e'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name!='tengjia'&&get.value(es[0])<=0); - var noh=(nh==0||target.hasSkillTag('noh')); - if(noh&&(noe||noe2)) return 0; - if(att<=0&&!target.countCards('he')) return 1.5; - return -1.5; - }, - }, - tag:{ - loseCard:1, - discard:1 - }, - }, - }, - requanji:{ - audio:2, - trigger:{player:['damageEnd','phaseUseEnd']}, - frequent:true, - locked:false, - notemp:true, - init:function(player){ - if(!player.storage.quanji) player.storage.quanji=[]; - }, - filter:function(event,player){ - if(event.name=='phaseUse') return player.countCards('h')>player.hp; - return event.num>0; - }, - content:function(){ - "step 0" - event.count=trigger.num||1; - "step 1" - event.count--; - player.draw(); - "step 2" - if(player.countCards('h')){ - player.chooseCard('将一张手牌置于武将牌上作为“权”',true); - } - else{ - event.goto(4); - } - "step 3" - if(result.cards&&result.cards.length){ - player.lose(result.cards,ui.special,'toStorage'); - player.storage.quanji=player.storage.quanji.concat(result.cards); - player.syncStorage('quanji'); - player.markSkill('quanji'); - game.log(player,'将',result.cards,'置于武将牌上作为“权”'); - } - "step 4" - if(event.count>0){ - player.chooseBool(get.prompt2('requanji')).set('frequentSkill','requanji'); - } - else event.finish(); - "step 5" - if(result.bool){ - player.logSkill('requanji'); - event.goto(1); - } - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.quanji.length; - } - }, - ai:{ - maixie:true, - maixie_hp:true, - threaten:0.8, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; - if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - ollongdan:{ - audio:'longdan_sha', - audioname:['re_zhaoyun'], - enable:['chooseToUse','chooseToRespond'], - prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出', - viewAs:function(cards,player){ - var name=false; - switch(get.name(cards[0],player)){ - case 'sha':name='shan';break; - case 'shan':name='sha';break; - case 'tao':name='jiu';break; - case 'jiu':name='tao';break; - } - if(name) return {name:name}; - return null; - }, - check:function(card){ - var player=_status.event.player; - if(_status.event.type=='phase'){ - var max=0; - var name2; - var list=['sha','tao','jiu']; - var map={sha:'shan',tao:'jiu',jiu:'tao'} - for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ - var temp=get.order({name:name}); - if(temp>max){ - max=temp; - name2=map[name]; - } - } - } - if(name2==get.name(card,player)) return 1; - return 0; - } - return 1; - }, - filterCard:function(card,player,event){ - event=event||_status.event; - var filter=event._backup.filterCard; - var name=get.name(card,player); - if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true; - if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true; - if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true; - if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true; - return false; - }, - filter:function(event,player){ - var filter=event.filterCard; - if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; - if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; - if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; - if(filter({name:'jiu'},player,event)&&player.countCards('h','tao')) return true; - return false; - }, - ai:{ - respondSha:true, - respondShan:true, - save:true, - skillTagFilter:function(player,tag){ - var name; - switch(tag){ - case 'respondSha':name='shan';break; - case 'respondShan':name='sha';break; - case 'save':name='jiu';break; - } - if(!player.countCards('h',name)) return false; - }, - order:function(item,player){ - if(player&&_status.event.type=='phase'){ - var max=0; - var list=['sha','tao','jiu']; - var map={sha:'shan',tao:'jiu',jiu:'tao'} - for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ - var temp=get.order({name:name}); - if(temp>max) max=temp; - } - } - if(max>0) max+=0.3; - return max; - } - return 4; - }, - }, - }, - olyajiao:{ - audio:'reyajiao', - trigger:{player:'loseAfter'}, - frequent:true, - filter:function(event,player){ - return player!=_status.currentPhase&&event.hs&&event.hs.length>0&&['useCard','respond'].contains(event.getParent().name); - }, - content:function(){ - "step 0" - event.card=get.cards()[0]; - game.cardsGotoOrdering(event.card); - event.videoId=lib.status.videoId++; - var judgestr=get.translation(player)+'发动了【涯角】'; - game.addVideo('judge1',player,[get.cardInfo(event.card),judgestr,event.videoId]); - game.broadcastAll(function(player,card,str,id,cardid){ - var event; - if(game.online){ - event={}; - } - else{ - event=_status.event; - } - if(game.chess){ - event.node=card.copy('thrown','center',ui.arena).animate('start'); - } - else{ - event.node=player.$throwordered(card.copy(),true); - } - if(lib.cardOL) lib.cardOL[cardid]=event.node; - event.node.cardid=cardid; - event.node.classList.add('thrownhighlight'); - ui.arena.classList.add('thrownhighlight'); - event.dialog=ui.create.dialog(str); - event.dialog.classList.add('center'); - event.dialog.videoId=id; - },player,event.card,judgestr,event.videoId,get.id()); - - game.log(player,'展示了',event.card); - game.delay(2); - if(get.type(event.card,'trick')==get.type(trigger.getParent().card,'trick')){ - player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du){ - if(target.hasSkillTag('nodu')) return 0; - return -att; - } - if(att>0){ - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }).set('du',event.card.name=='du'); - } - else{ - event.disbool=true; - player.chooseTarget('是否弃置攻击范围内包含你的一名角色区域内的一张牌?',function(card,player,target){ - return target.inRange(player)&&target.countDiscardableCards(player,'hej')>0; - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'guohe'},player,player); - }); - } - "step 1" - if(event.disbool){ - if(result.bool){ - player.line(result.targets[0],'green'); - player.discardPlayerCard(result.targets[0],'hej',true); - } - event.dialog.close(); - game.addVideo('judge2',null,event.videoId); - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(id,card){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - if(card.clone){ - card.clone.delete(); - } - ui.arena.classList.remove('thrownhighlight'); - },event.videoId,event.card); - ui.arena.classList.remove('thrownhighlight'); - } - else if(result.targets){ - event.dialog.close(); - game.addVideo('judge2',null,event.videoId); - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'log'); - event.node.moveDelete(result.targets[0]); - game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); - ui.arena.classList.remove('thrownhighlight'); - game.broadcast(function(card,target,id){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.moveDelete(target); - } - },event.card,result.targets[0],event.videoId); - } - else{ - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(id){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - if(card.clone){ - card.clone.delete(); - } - ui.arena.classList.remove('thrownhighlight'); - },event.videoId,event.card); - event.dialog.close(); - game.addVideo('judge2',null,event.videoId); - ui.arena.classList.remove('thrownhighlight'); - } - }, - ai:{ - effect:{ - target:function(card,player){ - if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; - } - } - } - }, - olpaoxiao:{ - audio:"paoxiao", - audioname:['re_zhangfei','guanzhang','xiahouba'], - trigger:{player:'shaMiss'}, - forced:true, - content:function(){ - player.addTempSkill('olpaoxiao2'); - player.addMark('olpaoxiao2',1,false); - }, - mod:{ - cardUsable:function (card,player,num){ - if(card.name=='sha') return Infinity; - }, - }, - }, - olpaoxiao2:{ - trigger:{source:'damageBegin1'}, - forced:true, - audio:'paoxiao', - audioname:['re_zhangfei','guanzhang','xiahouba'], - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0; - }, - onremove:true, - content:function(){ - trigger.num+=player.countMark('olpaoxiao2'); - player.removeSkill('olpaoxiao2'); - }, - intro:{content:'本回合内下一次使用【杀】造成伤害时令伤害值+#'}, - }, - oltishen:{ - audio:'retishen', - unique:true, - mark:true, - skillAnimation:true, - animationColor:'soil', - limited:true, - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - if(player.storage.oltishen) return false; - return player.isDamaged(); - }, - check:function(event,player){ - if(player.hp<=2||player.getDamagedHp()>2) return true; - if(player.getDamagedHp()<=1) return false; - return player.getDamagedHp()0; - })) return false; - if(event.name=='phaseDiscard'){ - var cards=[]; - player.getHistory('lose',function(evt){ - if(evt&&evt.getParent('phaseDiscard')==event&&evt.hs) cards.addArray(evt.hs); - }); - return cards.length>1; - } - else return event.es&&event.es.length>0; - }, - content:function(){ - 'step 0' - var list=['弃置至多两名其他角色的合计两张牌']; - if(lib.skill.rexuanfeng.canMoveCard(player)) list.push('将一名其他角色装备区内的一张牌移动到另一名角色的装备区内'); - player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('rexuanfeng')).set('ai',function(){ - if(lib.skill.rexuanfeng.canMoveCard(player,true)) return 1; - return 0; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('rexuanfeng'); - if(result.index==1) event.goto(5); - else event.count=2; - } - else event.finish(); - 'step 2' - player.chooseTarget('弃置一名其他角色的一张牌',function(card,player,target){ - if(player==target) return false; - return target.countDiscardableCards(player,'he'); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - 'step 3' - if(result.bool){ - player.line(result.targets[0],'green'); - player.discardPlayerCard(result.targets[0],'he',true); - event.count--; - } - else event.finish(); - 'step 4' - if(event.count) event.goto(2); - else event.finish(); - 'step 5' - var next=player.chooseTarget(2,function(card,player,target){ - if(player==target) return false; - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - if(target.isMin()) return false; - var es=from.getCards('e'); - for(var i=0;i0; - } - }); - next.set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - var sgnatt=get.sgn(att); - if(ui.selected.targets.length==0){ - if(att>0){ - if(target.countCards('e',function(card){ - return get.value(card,target)<0&&game.hasPlayer(function(current){ - return current!=player&¤t!=target&&get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) - }); - })>0) return 9; - } - else if(att<0){ - if(game.hasPlayer(function(current){ - if(current!=target&¤t!=player&&get.attitude(player,current)>0){ - var es=target.getCards('e'); - for(var i=0;i0&¤t.isEmpty(get.subtype(es[i]))&&get.value(es[i],current)>0) return true; - } - } - })){ - return -att; - } - } - return 0; - } - var es=ui.selected.targets[0].getCards('e'); - var i; - var att2=get.sgn(get.attitude(player,ui.selected.targets[0])); - for(i=0;iget.attitude(player,targets1)){ - if(get.value(button.link,targets0)<0) return 10; - return 0; - } - else{ - return get.equipValue(button.link); - } - },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ - var targets1=_status.event.targets1; - return targets1.isEmpty(get.subtype(button.link)); - }); - } - else{ - event.finish(); - } - 'step 9' - if(result.bool&&result.links.length){ - var link=result.links[0]; - event.targets[1].equip(link); - event.targets[0].$give(link,event.targets[1]) - game.delay(); - event.result={bool:true}; - } - }, - canMoveCard:function(player,withatt){ - return game.hasPlayer(function(current){ - if(player==current) return false; - var att=get.sgn(get.attitude(player,current)); - if(!withatt||att!=0){ - var es=current.getCards('e'); - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - prompt:get.prompt2('rejieyue'), - filterCard:true, - position:'he', - filterTarget:lib.filter.notMe, - ai1:function(card){ - var player=_status.event.player; - if(get.name(card)=='du') return 20; - if(get.position(card)=='e'&&get.value(card)<=0) return 14; - if(get.position(card)=='h'&&game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0&¤t.getUseValue(card)>player.getUseValue(card)&¤t.getUseValue(card)>player.getUseValue(card); - })) return 12; - if(game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0; - })){ - if(card.name=='wuxie') return 11; - if(card.name=='shan'&&player.countCards('h','shan')>1) return 9 - } - return 6/Math.max(1,get.value(card)); - }, - ai2:function(target){ - var player=_status.event.player; - var card=ui.selected.cards[0]; - var att=get.attitude(player,target); - if(card.name=='du') return -6*att; - if(att>0){ - if(get.position(card)=='h'&&target.getUseValue(card)>player.getUseValue(card)) return 4*att; - if(get.value(card,target)>get.value(card,player)) return 2*att; - return 1.2*att; - } - return -att*Math.min(4,target.countCards('he'))/4; - }, - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('rejieyue',target); - target.gain(result.cards,player,'giveAuto'); - } - else event.finish(); - 'step 2' - var num=0; - if(target.countCards('h')) num++; - if(target.countCards('e')) num++; - if(num>0){ - var next=target.chooseCard('he',num,'选择保留每个区域的各一张牌,然后弃置其余的牌。或点取消,令'+get.translation(player)+'摸三张牌',function(card){ - for(var i=0;i=0); - next.set('maxNum',num); - next.set('ai',function(card){ - if(_status.event.goon) return -1; - var num=_status.event.maxNum; - if(ui.selected.cards.length>=num-1){ - var val=get.value(player.getCards('he',function(cardx){ - return cardx!=card&&!ui.selected.cards.contains(cardx); - })); - if(val>=14) return 0; - } - return get.value(card); - }); - } - else event._result={bool:false}; - 'step 3' - if(!result.bool) player.draw(3); - else { - var cards=target.getCards('he'); - cards.removeArray(result.cards); - if(cards.length) target.discard(cards); - } - }, - ai:{ - threaten:1.3, - expose:0.2, - }, - }, - rechunlao:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0&&(_status.connectMode||player.countCards('h','sha')>0)&&!player.storage.rechunlao.length; - }, - init:function(player){ - if(!player.storage.rechunlao) player.storage.rechunlao=[]; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - content:function(){ - 'step 0' - player.chooseCard([1,Math.max(1,player.countCards('h','sha'))],get.prompt('rechunlao'),{name:'sha'}).set('ai',function(){ - return 1; - }); - 'step 1' - if(result.bool){ - player.logSkill('rechunlao'); - player.storage.rechunlao=player.storage.rechunlao.concat(result.cards); - player.syncStorage('rechunlao'); - player.markSkill('rechunlao'); - player.lose(result.cards,ui.special,'toStorage'); - player.$give(result.cards,player,false); - } - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(_status.currentPhase!=player) return; - if(card.name=='sha'&&!player.needsToDiscard()&& - !player.storage.rechunlao.length&&target.hp>1){ - return 'zeroplayertarget'; - } - } - }, - threaten:1.4 - }, - group:'rechunlao2' - }, - rechunlao2:{ - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&event.dying&&event.dying.hp<=0&&player.storage.rechunlao.length>0; - }, - filterTarget:function(card,player,target){ - return target==_status.event.dying; - }, - direct:true, - delay:false, - selectTarget:-1, - content:function(){ - "step 0" - player.chooseCardButton(get.translation('rechunlao'),player.storage.rechunlao,true); - "step 1" - if(result.bool){ - player.logSkill('rechunlao'); - player.$throw(result.links); - player.storage.rechunlao.remove(result.links[0]); - game.cardsDiscard(result.links[0]); - player.syncStorage('rechunlao') - event.type='dying'; - target.useCard({name:'jiu',isCard:true},target); - if(!player.storage.rechunlao.length){ - player.unmarkSkill('rechunlao'); - } - else{ - player.markSkill('rechunlao'); - } - var nature=get.nature(result.links[0]); - if(nature=='fire') player.recover(); - if(nature=='thunder') player.draw(2); - } - }, - ai:{ - order:6, - skillTagFilter:function(player){ - return player.storage.rechunlao.length>0; - }, - save:true, - result:{ - target:3 - }, - threaten:1.6 - }, - }, - reluoying:{ - audio:2, - group:['reluoying_discard','reluoying_judge'], - subfrequent:['judge'], - subSkill:{ - discard:{ - audio:'reluoying', - trigger:{global:'loseAfter'}, - filter:function(event,player){ - if(event.type!='discard') return false; - if(event.player==player) return false; - for(var i=0;i=7) return true; - player.getAllHistory('damage',function(evt){ - num+=evt.num; - }); - return num>7; - }, - content:function(){ - player.markSkill('rejiushi_mark'); - player.awakenSkill('chengzhang'); - player.storage.chengzhang=true; - player.recover(); - player.draw(); - }, - }, - rejiushi:{ - audio:2, - group:['rejiushi1','rejiushi2','rejiushi3','rejiushi_gain'], - subfrequent:['gain'], - subSkill:{ - gain:{ - audio:'rejiushi', - trigger:{player:'turnOverAfter'}, - frequent:true, - filter:function(event,player){ - return player.storage.chengzhang==true; - }, - prompt:'是否发动【酒诗】,获得牌堆中的一张锦囊牌?', - content:function(){ - var card=get.cardPile2(function(card){ - return get.type2(card)=='trick'; - }); - if(card) player.gain(card,'gain2','log'); - }, - }, - }, - }, - rejiushi1:{ - audio:'rejiushi', - enable:'chooseToUse', - filter:function(event,player){ - if(player.classList.contains('turnedover')) return false; - return event.filterCard({name:'jiu',isCard:true},player,event); - }, - content:function(){ - if(_status.event.getParent(2).type=='dying'){ - event.dying=player; - event.type='dying'; - } - player.turnOver(); - player.useCard({name:'jiu',isCard:true},player); - }, - ai:{ - save:true, - skillTagFilter:function(player){ - return player.hp<=0&&!player.isTurnedOver(); - }, - order:5, - result:{ - player:function(player){ - if(_status.event.parent.name=='phaseUse'){ - if(player.countCards('h','jiu')>0) return 0; - if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; - if(!player.countCards('h','sha')) return 0; - var targets=[]; - var target; - var players=game.filterPlayer(); - for(var i=0;inum){ - target=targets[i]; - num=num2; - } - } - if(num<=0) return 0; - var e2=target.getEquip(2); - if(e2){ - if(e2.name=='tengjia'){ - if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; - } - if(e2.name=='renwang'){ - if(!player.countCards('h',{name:'sha',color:'red'})) return 0; - } - if(e2.name=='baiyin') return 0; - } - if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; - return target.countCards('h')>3?0:1; - } - if(player==_status.event.dying||player.isTurnedOver()) return 3; - } - }, - effect:{ - target:function(card,player,target){ - if(card.name=='guiyoujie') return [0,0.5]; - if(target.isTurnedOver()){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(target.hp==1) return; - return [1,target.countCards('h')/2]; - } - } - } - } - }, - }, - rejiushi2:{ - trigger:{player:'damageBegin3'}, - silent:true, - firstDo:true, - filter:function(event,player){ - return player.classList.contains('turnedover'); - }, - content:function(){ - trigger.rejiushi=true; - } - }, - rejiushi3:{ - audio:'rejiushi', - trigger:{player:'damageEnd'}, - check:function(event,player){ - return player.isTurnedOver(); - }, - filter:function(event,player){ - if(event.rejiushi){ - return true; - } - return false; - }, - prompt:function(event,player){ - var str='是否发动【酒诗】,将武将牌翻面'; - if(!player.storage.chengzhang) str+=',并获得牌堆中的一张锦囊牌'; - str+='?' - return str; - }, - content:function(){ - delete trigger.rejiushi; - player.turnOver(); - if(!player.storage.chengzhang){ - var card=get.cardPile2(function(card){ - return get.type2(card)=='trick'; - }); - if(card) player.gain(card,'gain2','log'); - } - } - }, - rejiushi_mark:{ - mark:true, - marktext:'改', - intro:{ - content:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面。当你翻面时,你获得牌堆中的一张随机锦囊。', - }, - }, - rehongyan:{ - audio:2, - mod:{ - suit:function(card,suit){ - if(suit=='spade') return 'heart'; - } - }, - trigger:{player:'loseEnd'}, - filter:function(event,player){ - if(player==_status.currentPhase||!event.visible||player.hp<=player.countCards('h')) return false; - for(var i=0;i=4&&shas.length>=3){ - num=3; - } - else if(player.hp>=3&&shas.length>=2){ - num=2; - } - else{ - num=1 - } - var map={}; - var list=[]; - for(var i=1;i<=player.hp;i++){ - var cn=get.cnNumber(i,true); - map[cn]=i; - list.push(cn); - } - event.map=map; - player.awakenSkill('reqimou'); - player.storage.reqimou=true; - player.chooseControl(list,function(){ - return get.cnNumber(_status.event.goon,true); - }).set('prompt','失去任意点体力').set('goon',num); - 'step 1' - var num=event.map[result.control]||1; - player.storage.reqimou2=num; - player.loseHp(num); - player.draw(num); - player.addTempSkill('reqimou2'); - }, - ai:{ - order:2, - result:{ - player:function(player){ - if(player.hp==1) return 0; - var shas=player.getCards('h','sha'); - if(!shas.length) return 0; - var card=shas[0]; - if(!lib.filter.cardEnabled(card,player)) return 0; - if(lib.filter.cardUsable(card,player)) return 0; - var mindist; - if(player.hp>=4&&shas.length>=3){ - mindist=4; - } - else if(player.hp>=3&&shas.length>=2){ - mindist=3; - } - else{ - mindist=2; - } - if(game.hasPlayer(function(current){ - return (current.hp<=mindist-1&& - get.distance(player,current,'attack')<=mindist&& - player.canUse(card,current,false)&& - get.effect(current,card,player,player)>0); - })){ - return 1; - } - return 0; - } - } - } - }, - reqimou2:{ - onremove:true, - mod:{ - cardUsable:function(card,player,num){ - if(typeof player.storage.reqimou2=='number'&&card.name=='sha'){ - return num+player.storage.reqimou2; - } - }, - globalFrom:function(from,to,distance){ - if(typeof from.storage.reqimou2=='number'){ - return distance-from.storage.reqimou2; - } - } - } - }, - olniepan:{ - audio:2, - unique:true, - enable:'chooseToUse', - mark:true, - skillAnimation:true, - animationStr:'涅盘', - limited:true, - animationColor:'orange', - init:function(player){ - player.storage.olniepan=false; - }, - filter:function(event,player){ - if(player.storage.olniepan) return false; - if(event.type=='dying'){ - if(player!=event.dying) return false; - return true; - } - return false; - }, - content:function(){ - 'step 0' - player.awakenSkill('olniepan'); - player.storage.olniepan=true; - player.discard(player.getCards('hej')); - 'step 1' - player.link(false); - 'step 2' - player.turnOver(false); - 'step 3' - player.draw(3); - 'step 4' - if(player.hp<3){ - player.recover(3-player.hp); - } - 'step 5' - player.chooseControl('bazhen','rehuoji','rekanpo').set('prompt','选择获得一个技能').ai=function(){ - return ['rehuoji','bazhen'].randomGet(); - }; - 'step 6' - player.addSkillLog(result.control); - }, - ai:{ - order:1, - skillTagFilter:function(player){ - if(player.storage.olniepan) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:function(player){ - if(player.hp<=0) return 10; - if(player.hp<=2&&player.countCards('he')<=1) return 10; - return 0; - } - }, - threaten:function(player,target){ - if(!target.storage.olniepan) return 0.6; - } - }, - intro:{ - content:'limited' - } - }, - rewurong:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - "step 1" - var sendback=function(){ - if(_status.event!=event){ - return function(){ - event.resultOL=_status.event.resultOL; - }; - } - }; - if(player.isOnline()){ - player.wait(sendback); - event.ol=true; - player.send(function(){ - game.me.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - game.resume(); - }); - } - else{ - event.localPlayer=true; - player.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - } - if(target.isOnline()){ - target.wait(sendback); - event.ol=true; - target.send(function(){ - var rand=Math.random()<0.4; - game.me.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - game.resume(); - }); - } - else{ - event.localTarget=true; - } - "step 2" - if(event.localPlayer){ - event.card1=result.cards[0]; - } - if(event.localTarget){ - var rand=Math.random()<0.4; - target.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - } - "step 3" - if(event.localTarget){ - event.card2=result.cards[0]; - } - if(!event.resultOL&&event.ol){ - game.pause(); - } - "step 4" - try{ - if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; - if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; - if(!event.card1||!event.card2){ - throw('err'); - } - } - catch(e){ - console.log(e); - event.finish(); - return; - } - if(event.card2.number>=10||event.card2.number<=4){ - if(target.countCards('h')>2){ - event.addToAI=true; - } - } - game.broadcastAll(function(card1,card2){ - card1.classList.remove('glow'); - card2.classList.remove('glow'); - },event.card1,event.card2); - "step 5" - game.broadcastAll(function(){ - ui.arena.classList.add('thrownhighlight'); - }); - game.addVideo('thrownhighlight1'); - player.$compare(event.card1,target,event.card2); - game.delay(4); - "step 6" - game.log(player,'展示了',event.card1); - game.log(target,'展示了',event.card2); - var name1=get.name(event.card1); - var name2=get.name(event.card2); - if(name1=='sha'&&name2!='shan'){ - //player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - target.damage('nocard'); - } - else if(name1!='sha'&&name2=='shan'){ - //player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - player.gainPlayerCard(target,true,'he'); - } - else{ - player.$gain2(event.card1); - target.$gain2(event.card2); - } - game.broadcastAll(function(){ - ui.arena.classList.remove('thrownhighlight'); - }); - game.addVideo('thrownhighlight2'); - }, - ai:{ - order:6, - result:{ - target:-1, - } - } - }, - cangzhuo:{ - trigger:{player:'phaseDiscardBegin'}, - frequent:true, - audio:2, - filter:function(event,player){ - return player.getHistory('useCard',function(card){ - return get.type(card.card,'trick')=='trick'; - }).length==0; - }, - content:function(){ - player.addTempSkill('cangzhuo2'); - }, - }, - cangzhuo2:{ - mod:{ - ignoredHandcard:function(card,player){ - if(get.type(card,'trick')=='trick'){ - return true; - } - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&get.type(card,'trick')=='trick') return false; - } - }, - }, - shebian:{ - trigger:{player:'turnOverEnd'}, - check:function(event,player){ - return player.canMoveCard(true,true); - }, - filter:function(event,player){ - return player.canMoveCard(null,true); - }, - content:function(){ - player.moveCard().nojudge=true; - }, - }, - rexianzhen:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.player&&get.name(result.player.name,player)=='sha') player.addTempSkill('rexianzhen4'); - if(result.bool){ - player.storage[event.name]=target; - player.addTempSkill(event.name+2); - } - else{ - player.addTempSkill(event.name+3); - } - }, - ai:{ - order:function(name,player){ - var cards=player.getCards('h'); - if(player.countCards('h','sha')==0){ - return 1; - } - for(var i=0;i11&&get.value(cards[i])<7){ - return 9; - } - } - return get.order({name:'sha'})-1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')>0) return 0; - var num=player.countCards('h'); - if(num>player.hp) return 0; - if(num==1) return -2; - if(num==2) return -1; - return -0.7; - }, - target:function(player,target){ - var num=target.countCards('h'); - if(num==1) return -1; - if(num==2) return -0.7; - return -0.5 - }, - }, - threaten:1.3 - } - }, - rexianzhen2:{ - charlotte:true, - mod:{ - targetInRange:function(card,player,target){ - if(target==player.storage.rexianzhen) return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha'&&typeof num=='number') return num+100; - }, - playerEnabled:function(card,player,target){ - if(card.name=='sha'&&player.storage.rexianzhen!=target&&!ui.selected.targets.contains(player.storage.rexianzhen)){ - var num=player.getCardUsable(card)-100; - if(num<=0) return false; - } - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(arg.target!=player.storage.rexianzhen) return false; - }, - } - }, - rexianzhen3:{ - charlotte:true, - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - rexianzhen4:{ - mod:{ - ignoredHandcard:function(card,player){ - if(get.name(card)=='sha'){ - return true; - } - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&get.name(card)=='sha'){ - return false; - } - }, - }, - }, - rejinjiu:{ - mod:{ - cardname:function(card,player){ - if(card.name=='jiu') return 'sha'; - }, - }, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h','jiu')) return false; - }, - respondSha:true, - }, - audio:2, - trigger:{player:['useCard1','respond']}, - firstDo:true, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&!event.skill&& - event.cards.length==1&&event.cards[0].name=='jiu'; - }, - content:function(){}, - group:'rejinjiu2', - global:'rejinjiu3', - }, - rejinjiu3:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('rejinjiu')) return false; - }, - cardSavable:function(card,player){ - if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('rejinjiu')) return false; - }, - }, - }, - rejinjiu2:{ - audio:'rejinjiu', - forced:true, - trigger:{player:'damageBegin3'}, - filter:function(event,player){ - return event.getParent(2).jiu==true; - }, - content:function(){ - trigger.num-=trigger.getParent(2).jiu_add; - }, - ai:{ - filterDamage:true, - skillTagFilter:function(player,tag,arg){ - return arg&&arg.jiu==true; - }, - }, - }, - repojun:{ - shaRelated:true, - audio:2, - trigger:{player:'useCardToPlayered'}, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.hp>0&&event.target.countCards('he')>0; - }, - content:function(){ - 'step 0' - var next=player.choosePlayerCard(trigger.target,'he',[1,Math.min(trigger.target.hp,trigger.target.countCards('he'))],get.prompt('repojun',trigger.target)); - next.set('ai',function(button){ - if(!_status.event.goon) return 0; - var val=get.value(button.link); - if(button.link==_status.event.target.getEquip(2)) return 2*(val+3); - return val; - }); - next.set('goon',get.attitude(player,trigger.target)<=0); - next.set('forceAuto',true); - 'step 1' - if(result.bool){ - var target=trigger.target; - player.logSkill('repojun',trigger.target); - target.addSkill('repojun2'); - target.storage.repojun2.addArray(result.cards); - target.lose(result.cards,ui.special,'toStorage'); - game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌'); - target.markSkill('repojun2'); - } - }, - ai:{ - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; - return false; - } - }, - group:'repojun3', - }, - repojun3:{ - audio:'repojun', - trigger:{source:'damageBegin1'}, - forced:true, - locked:false, - logTarget:'player', - filter:function(event,player){ - var target=event.player; - return event.getParent().name=='sha'&&player.countCards('h')>=target.countCards('h')&&player.countCards('e')>=target.countCards('e'); - }, - content:function(){ - trigger.num++; - }, - }, - repojun2:{ - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - trigger:{global:'phaseEnd'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return player.storage.repojun2&&player.storage.repojun2.length>0; - }, - content:function(){ - game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.repojun2,'draw','fromStorage').cards.length)+'张〖破军〗牌'); - player.storage.repojun2.length=0; - player.removeSkill('repojun2'); - }, - intro:{ - onunmark:'throw', - content:'cardCount', - }, - }, - reganlu:{ - enable:'phaseUse', - usable:1, - audio:2, - selectTarget:2, - delay:0, - filterTarget:function(card,player,target){ - if(target.isMin()) return false; - if(ui.selected.targets.length==0) return true; - if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; - return target==player||ui.selected.targets[0]==player||Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; - }, - multitarget:true, - multiline:true, - content:function(){ - targets[0].swapEquip(targets[1]); - }, - ai:{ - order:10, - threaten:function(player,target){ - return 0.8*Math.max(1+target.maxHp-target.hp); - }, - result:{ - target:function(player,target){ - var list1=[]; - var list2=[]; - var num=player.maxHp-player.hp; - var players=game.filterPlayer(); - for(var i=0;i0) list1.push(players[i]); - else if(get.attitude(player,players[i])<0) list2.push(players[i]); - } - list1.sort(function(a,b){ - return a.countCards('e')-b.countCards('e'); - }); - list2.sort(function(a,b){ - return b.countCards('e')-a.countCards('e'); - }); - var delta; - for(var i=0;i0&&!player.hasSkill('olfangquan3'); - }, - direct:true, - content:function(){ - "step 0" - var fang=player.countMark('olfangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1; - player.chooseBool(get.prompt2('olfangquan')).set('ai',function(){ - if(!_status.event.fang) return false; - return game.hasPlayer(function(target){ - if(target.hasJudge('lebu')||target==player) return false; - if(get.attitude(player,target)>4){ - return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0); - } - return false; - }); - }).set('fang',fang); - "step 1" - if(result.bool){ - player.logSkill('olfangquan'); - trigger.cancel(); - player.addTempSkill('olfangquan2'); - player.addMark('olfangquan2',1,false); - } - } - }, - olfangquan2:{ - trigger:{player:'phaseDiscardBegin'}, - forced:true, - popup:false, - audio:false, - onremove:true, - content:function(){ - "step 0" - event.count=player.countMark(event.name); - player.removeMark(event.name,event.count,false); - "step 1" - event.count--; - player.chooseToDiscard('是否弃置一张牌并令一名其他角色进行一个额外回合?').set('logSkill','olfangquan').ai=function(card){ - return 20-get.value(card); - }; - "step 2" - if(result.bool){ - player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){ - if(target.hasJudge('lebu')) return -1; - if(get.attitude(player,target)>4){ - return get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1); - } - return -1; - }; - } - else event.finish(); - "step 3" - var target=result.targets[0]; - player.line(target,'fire'); - target.markSkillCharacter('olfangquan',player,'放权','进行一个额外回合'); - target.insertPhase(); - target.addSkill('olfangquan3'); - if(event.count>0) event.goto(1); - } - }, - olfangquan3:{ - trigger:{player:['phaseAfter','phaseCancelled']}, - forced:true, - popup:false, - audio:false, - content:function(){ - player.unmarkSkill('olfangquan'); - player.removeSkill('olfangquan3'); - } - }, - olluanji:{ - inherit:'luanji', - audioname:['shen_caopi'], - audio:2, - line:false, - group:'olluanji_remove', - check:function(card){ - return 7-get.value(card); - }, - }, - olluanji_remove:{ - trigger:{player:'useCard2'}, - direct:true, - filter:function(event,player){ - return event.card.name=='wanjian'&&event.targets.length>0; - }, - line:false, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('olluanji'),'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){ - return _status.event.targets.contains(target) - }).set('targets',trigger.targets).set('ai',function(target){ - var player=_status.event.player; - return -get.effect(target,_status.event.getTrigger().card,player,player) - }); - 'step 1' - if(result.bool){ - player.logSkill('olluanji',result.targets); - trigger.targets.remove(result.targets[0]); - } - }, - }, - olxueyi:{ - audio:2, - trigger:{global:'phaseBefore'}, - forced:true, - zhuSkill:true, - unique:true, - filter:function(event,player){ - return !player.storage.olxueyi_inited&&player.hasZhuSkill('olxueyi'); - }, - content:function(){ - player.storage.olxueyi_inited=true; - var num=game.countPlayer(function(current){ - return current.group=='qun'; - }) - if(num) player.addMark('olxueyi',num) - }, - marktext:'裔', - intro:{ - name2:'裔', - content:'mark', - }, - mod:{ - maxHandcard:function(player,num){ - if(player.hasZhuSkill('olxueyi')) return num+2*player.countMark('olxueyi'); - }, - }, - group:'olxueyi_draw', - }, - olxueyi_draw:{ - audio:'olxueyi', - trigger:{player:'phaseBegin'}, - prompt2:'弃置一枚「裔」标记,然后摸一张牌', - check:function(event,player){ - return !player.hasJudge('lebu')&&player.getUseValue('wanjian')>0; - }, - filter:function(event,player){ - return player.hasZhuSkill('olxueyi')&&player.hasMark('olxueyi'); - }, - content:function(){ - player.removeMark('olxueyi',1); - player.draw(); - }, - }, - olhunzi:{ - audio:2, - inherit:'hunzi', - content:function(){ - player.loseMaxHp(); - player.recover(); - player.addSkill('reyingzi'); - player.addSkill('gzyinghun'); - game.log(player,'获得了技能','#g【英姿】','和','#g【英魂】'); - player.awakenSkill(event.name); - player.storage[event.name]=true; - } - }, - olzhiba:{ - audio:2, - unique:true, - zhuSkill:true, - global:'olzhiba2', - }, - olzhiba2:{ - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.hasZhuSkill('olzhiba')&&!player.hasSkill('olzhiba3')&&target.group=='wu'){ - if(player.countCards('h',function(card){ - var val=get.value(card); - if(val<0) return true; - if(val<=5){ - return card.number>=12; - } - if(val<=6){ - return card.number>=13; - } - return false; - })>0) return -1; - return 0; - } - else{ - if(player.countCards('h','du')&&get.attitude(player,target)<0) return -1; - if(player.countCards('h')<=player.hp) return 0; - var maxnum=0; - var cards2=target.getCards('h'); - for(var i=0;imaxnum){ - maxnum=cards2[i].number; - } - } - if(maxnum>10) maxnum=10; - if(maxnum<5&&cards2.length>1) maxnum=5; - var cards=player.getCards('h'); - for(var i=0;i0||target.countCards('h',function(card){ - var val=get.value(card); - if(val<0) return true; - if(val<=5){ - return card.number>=12; - } - if(val<=6){ - return card.number>=13; - } - return false; - })>0)).set('ai',function(){return _status.event.choice}); - } - else event._result={bool:true}; - 'step 3' - if(result.bool) event.getParent().zhiba_target=target; - else{ - game.log(target,'拒绝了',player,'的拼点请求'); - target.chat('拒绝'); - } - }, - content:function(){ - 'step 0' - event.source=event.getParent().zhiba_target; - if(!event.source){ - event.finish(); - } - 'step 1' - player.chooseToCompare(target).set('small',target==source&&get.attitude(player,target)>0); - 'step 2' - if(player==source&&result.bool||target==source&&!result.bool){ - event.cards=[result.player,result.target].filterInD('d'); - if(!event.cards.length) event.finish(); - else source.chooseControl('ok','cancel2').set('dialog',['是否获得拼点牌?',event.cards]).set('ai',function(){ - if(get.value(event.cards,source,'raw')<=0) return false; - return true; - }); - } - else event.finish(); - 'step 3' - if(result.control!='cancel2') source.gain(event.cards,'gain2','log'); - }, - }, - olzhiba3:{}, - rehuashen:{ - //mode:['identity','single','doudizhu'], - audio:2, - unique:true, - direct:true, - content:function(){ - "step 0" - _status.noclearcountdown=true; - event.videoId=lib.status.videoId++; - var cards=player.storage.rehuashen.character.slice(0); - if(player.isOnline2()){ - player.send(function(cards,id){ - var dialog=ui.create.dialog('是否发动【化身】?',[cards,'character']); - dialog.videoId=id; - },cards,event.videoId); - } - event.dialog=ui.create.dialog(get.prompt('rehuashen'),[cards,'character']); - event.dialog.videoId=event.videoId; - if(!event.isMine()){ - event.dialog.style.display='none'; - } - if(event.triggername=='rehuashen') event._result={control:'更换技能'}; - else player.chooseControl('弃置化身','更换技能','cancel2'); - "step 1" - event.control=result.control; - if(event.control=='cancel2'){ - if(player.isOnline2()){ - player.send('closeDialog',event.videoId); - } - delete _status.noclearcountdown; - if(!_status.noclearcountdown){ - game.stopCountChoose(); - } - event.dialog.close(); - event.finish();return; - } - if(!event.logged){player.logSkill('rehuashen');event.logged=true} - var next=player.chooseButton(true).set('dialog',event.videoId); - if(event.control=='弃置化身'){ - next.set('selectButton',[1,2]); - next.set('filterButton',function(button){ - return button.link!=_status.event.current; - }); - next.set('current',player.storage.rehuashen.current); - } - var prompt=event.control=='弃置化身'?'选择弃置至多两张化身':'选择要切换的化身'; - var func=function(id,prompt){ - var dialog=get.idDialog(id); - if(dialog){ - dialog.content.childNodes[0].innerHTML=prompt; - } - } - if(player.isOnline2()){ - player.send(func,event.videoId,prompt); - } - else if(event.isMine()){ - func(event.videoId,prompt); - } - "step 2" - if(result.bool&&event.control!='弃置化身'){ - event.card=result.links[0]; - var func=function(card,id){ - var dialog=get.idDialog(id); - if(dialog){ - for(var i=0;i0; - }, - banned:['lisu','sp_xiahoudun','xushao'], - addHuashen:function(player){ - if(!player.storage.rehuashen) return; - if(!_status.characterlist){ - if(_status.connectMode) var list=get.charactersOL(); - else{ - var list=[]; - for(var i in lib.character){ - if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue; - list.push(i); - } - } - game.countPlayer2(function(current){ - list.remove(current.name); - list.remove(current.name1); - list.remove(current.name2); - if(current.storage.rehuashen&¤t.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character) - }); - _status.characterlist=list; - } - _status.characterlist.randomSort(); - var bool=false; - for(var i=0;i<_status.characterlist.length;i++){ - var name=_status.characterlist[i]; - if(name.indexOf('zuoci')!=-1||name.indexOf('key')==0||lib.skill.rehuashen.banned.contains(name)||player.storage.rehuashen.character.contains(name)) continue; - var skills=lib.character[name][3]; - for(var j=0;j0) return '不质疑'; - return Math.random()<0.5?'不质疑':'质疑'; - }); - } - 'step 2' - if(!result.control) result.control='不质疑'; - //event.guessers[0].chat(result.control); - //game.delay(); - if(result.control=='不质疑'){ - //game.log(event.guessers[0],'#g不质疑'); - event.ally.push(event.guessers[0]); - }else{ - //game.log(event.guessers[0],'#y质疑'); - event.betray.push(event.guessers[0]); - } - event.guessers.remove(event.guessers[0]); - if(event.guessers.length) event.goto(1); - 'step 3' - for(var i=0;i0) return '不质疑'; - return Math.random()<0.5?'不质疑':'质疑'; - }); - } - 'step 3' - if(!result.control) result.control='不质疑'; - //event.guessers[0].chat(result.control); - //game.delay(); - if(result.control=='不质疑'){ - //game.log(event.guessers[0],'#g不质疑'); - event.ally.push(event.guessers[0]); - }else{ - //game.log(event.guessers[0],'#y质疑'); - event.betray.push(event.guessers[0]); - } - event.guessers.remove(event.guessers[0]); - if(event.guessers.length) event.goto(2); - 'step 4' - for(var i=0;i0; - }, - viewAs:{ - name:"wuxie", - }, - check:function(card){ - if(card.name=='wuxie') return 1000; - return 0; - }, - prompt:"将一张手牌当无懈可击使用", - threaten:1.2, - }, - reguhuo_phase:{}, - rechanyuan:{ - //charlotte:true, - firstDo:true, - trigger:{ - player:["phaseBefore","changeHp"], - }, - priority:99, - forced:true, - popup:false, - unique:true, - content:function (){ - if(player.hp<=1){ - var skills=player.getSkills(true,false); - for(var i=0;i1&&card.number<10) return 5; - return 4; - } - if(suit=='club') return 2; - return 0; - }, - content:function(){ - player.judge(lib.skill.xinleiji.judgeCheck); - }, - ai:{ - useShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')){ - var hastarget=game.hasPlayer(function(current){ - return get.attitude(target,current)<0; - }); - var be=target.countCards('e',{color:'black'}); - if(target.countCards('h','shan')&&be){ - if(!target.hasSkill('xinguidao')) return 0; - return [0,hastarget?target.countCards('he')/2:0]; - } - if(target.countCards('h','shan')&&target.countCards('h')>2){ - if(!target.hasSkill('xinguidao')) return 0; - return [0,hastarget?target.countCards('h')/4:0]; - } - if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ - return [0,0]; - } - if(target.countCards('h')==0){ - return [1.5,0]; - } - if(target.countCards('h')==1&&!be){ - return [1.2,0]; - } - if(!target.hasSkill('xinguidao')) return [1,0.05]; - return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; - } - } - } - } - }, - xinleiji_misa:{ - audio:'xinleiji', - trigger:{player:'judgeAfter'}, - direct:true, - filter:function(event,player){ - return event.judgestr!='暴虐'&&event.judgestr!='助祭'&&['spade','club'].contains(event.result.suit); - }, - content:function(){ - 'step 0' - event.num=1+['club','spade'].indexOf(trigger.result.suit); - event.logged=false; - if(event.num==1&&player.isDamaged()){ - event.logged=true; - player.logSkill('xinleiji'); - player.recover(); - } - player.chooseTarget('雷击:是否对一名角色造成'+event.num+'点雷电伤害?',lib.filter.notMe).ai=function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player,'thunder'); - }; - 'step 1' - if(result.bool&&result.targets&&result.targets.length){ - if(!event.logged) player.logSkill('xinleiji',result.targets); - else player.line(result.targets,'thunder'); - result.targets[0].damage(event.num,'thunder'); - } - }, - }, - xinguidao:{ - audio:2, - trigger:{global:'judge'}, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; - }, - direct:true, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('xinguidao'),'he',function(card){ - if(get.color(card)!='black') return false; - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0){ - if(trigger.player!=player) return 0; - if(game.hasPlayer(function(current){ - return get.attitude(player,current)<0; - })){ - var checkx=lib.skill.xinleiji.judgeCheck(card,true)-lib.skill.xinleiji.judgeCheck(judging); - if(checkx>0) return checkx; - } - return 0; - }; - if(attitude>0){ - return result; - } - else{ - return -result; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight','xinguidao','noOrdering'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.$gain2(trigger.player.judging[0]); - player.gain(trigger.player.judging[0]); - var card=result.cards[0]; - if(get.suit(card)=='spade'&&card.number>1&&card.number<10) player.draw('nodelay'); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - } - "step 3" - game.delay(2); - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1 - } - } - }, - reqingguo:{ - audio:2, - enable:['chooseToRespond','chooseToUse'], - filterCard:function(card){ - return get.color(card)=='black'; - }, - position:'he', - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - prompt:'将一张黑色牌当闪打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.6 - } - } - } - }, - reqiangxi:{ - subSkill:{ - off:{ - sub:true, - }, - }, - audio:2, - enable:"phaseUse", - filterCard:function (card){ - return get.subtype(card)=='equip1'; - }, - selectCard:function (){ - return [0,1]; - }, - filterTarget:function (card,player,target){ - if(player==target) return false; - if(target.hasSkill('reqiangxi_off')) return false; - return player.inRange(target); - }, - content:function (){ - "step 0" - if(cards.length==0){ - player.loseHp(); - } - "step 1" - target.addTempSkill('reqiangxi_off'); - target.damage('nocard'); - }, - check:function (card){ - return 10-get.value(card); - }, - position:"he", - ai:{ - order:8.5, - result:{ - target:function (player,target){ - if(!player.countCards('he',{type:'equip'})){ - if(player.hp<2) return 0; - if(target.hp>=player.hp) return 0; - } - return get.damageEffect(target,player); - }, - }, - }, - threaten:1.5, - }, - rehuoji:{ - position:"he", - audio:2, - audioname:['ol_sp_zhugeliang','ol_pangtong'], - enable:"chooseToUse", - filterCard:function (card){ - return get.color(card)=='red'; - }, - viewAs:{ - name:"huogong", - nature:"fire", - }, - viewAsFilter:function (player){ - if(!player.countCards('he',{color:'red'})) return false; - }, - prompt:"将一张红色牌当火攻使用", - check:function (card){ - var player=_status.currentPhase; - if(player.countCards('h')>player.hp){ - return 6-get.value(card); - } - return 4-get.value(card) - }, - }, - rekanpo:{ - audio:2, - audioname:['ol_sp_zhugeliang','ol_pangtong'], - position:"he", - enable:"chooseToUse", - filterCard:function (card){ - return get.color(card)=='black'; - }, - viewAsFilter:function (player){ - return player.countCards('he',{color:'black'})>0; - }, - viewAs:{ - name:"wuxie", - }, - prompt:"将一张黑色手牌当无懈可击使用", - check:function (card){return 8-get.value(card)}, - }, - rejieming:{ - audio:2, - trigger:{ - player:"damageEnd", - }, - direct:true, - content:function (){ - "step 0" - event.count=trigger.num; - "step 1" - player.chooseTarget(get.prompt('rejieming'),'令一名角色摸两张牌。然后若其手牌数少于体力上限,你摸一张牌').set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>2){ - if((target.maxHp-target.countCards('h'))>2) return 2*att; - return att; - } - return att/3; - }); - "step 2" - if(result.bool){ - event.current=result.targets[0]; - player.logSkill('rejieming',event.current); - player.line(event.current,'thunder'); - event.current.draw(2); - event.count--; - } - else event.finish(); - "step 3" - if(event.current.countCards('h')0) event.goto(1); - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'damage')&&target.hp>1){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - var max=0; - var players=game.filterPlayer(); - for(var i=0;i0){ - max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); - } - } - switch(max){ - case 0:return 2; - case 1:return 1.5; - case 2:return [1,2]; - default:return [0,max]; - } - } - if((card.name=='tao'||card.name=='caoyao')&& - target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; - }, - }, - }, - }, - reshuangxiong:{ - trigger:{ - player:"phaseDrawBegin1", - }, - group:"reshuangxiong2", - audio:"shuangxiong", - audioname:['re_yanwen'], - check:function (event,player){ - if(player.countCards('h')>player.hp) return true; - if(player.countCards('h')>3) return true; - return false; - }, - filter:function(event,player){ - return !event.numFixed; - }, - content:function (){ - "step 0" - trigger.changeToZero(); - event.cards=get.cards(2); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards){ - var str; - if(player==game.me&&!_status.auto){ - str='【双雄】选择获得其中一张牌'; - } - else{ - str='双雄'; - } - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards); - event.time=get.utc(); - game.addVideo('showCards',player,['双雄',get.cardsInfo(event.cards)]); - game.addVideo('delay',null,2); - "step 1" - var next=player.chooseButton([1,1],true); - next.set('dialog',event.videoId); - next.set('ai',function(button){ - var player=_status.event.player; - var color=get.color(button.link); - var value=get.value(button.link,player); - if(player.countCards('h',{color:color})>player.countCards('h',['red','black'].remove(color)[0])) value+=5; - return value; - }); - "step 2" - if(result.bool&&result.links){ - var cards2=[]; - for(var i=0;i0){ - game.delay(0,time); - } - "step 3" - game.broadcastAll('closeDialog',event.videoId); - var card2=event.card2; - player.gain(card2,'gain2'); - player.addTempSkill('shuangxiong2'); - player.storage.shuangxiong=get.color(card2); - }, - }, - "reshuangxiong2":{ - trigger:{ - player:"damageEnd", - }, - direct:true, - filter:function (event,player){ - var evt=event.getParent(); - return (evt&&evt.name=='juedou'&&evt[player==evt.player?'targetCards':'playerCards'].length)>0; - }, - content:function (){ - "step 0" - var evt=trigger.getParent(); - var cards=evt[player==evt.player?'targetCards':'playerCards'].slice(0); - for(var i=0;i0&&['useCard','respond'].contains(event.getParent().name); - }, - content:function (){ - "step 0" - event.card=get.cards(); - player.showCards(event.card); - event.same=false; - if(get.type(event.card[0],'trick')==get.type(trigger.getParent().card,'trick')) event.same=true; - player.chooseTarget('选择获得此牌的角色',true).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du){ - if(target.hasSkillTag('nodu')) return 0; - return -att; - } - if(!_status.event.same) att+=target==_status.event.player?1:0; - if(att>0){ - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }).set('du',event.card.name=='du').set('same',event.same); - "step 1" - if(result.targets){ - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'gain2'); - if(!event.same) player.chooseToDiscard(true,'he'); - } - }, - ai:{ - effect:{ - target:function (card,player){ - if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; - }, - }, - }, - }, - "new_liyu":{ - audio:"liyu", - trigger:{ - source:"damageSource", - }, - filter:function (event,player){ - if(event._notrigger.contains(event.player)) return false; - return event.card&&event.card.name=='sha'&&event.player!=player&&event.player.isAlive()&&event.player.countGainableCards(player,'hej')>0; - }, - direct:true, - content:function (){ - 'step 0' - player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(card){ - var player=_status.event.player; - var evt=_status.event.target; - if(get.attitude(player,evt)>0&&get.position(card)=='j') return 4+get.value(card); - if(get.type(card)=='equip'){ - if(get.attitude(player,evt)>0&&game.hasPlayer(function(current){ - return (player.canUse({name:'juedou'},current)&¤t!=evt.target&&get.effect(current,{name:'juedou'},player,player)>2); - })){ - return 5; - } - else if(game.hasPlayer(function(current){ - return (player.canUse({name:'juedou'},current)&¤t!=evt&¤t!=player&&get.effect(current,{name:'juedou'},player,player)<0); - })){ - return 1; - } - else return 4; - }; - return 3; - }).set('logSkill',['new_liyu',trigger.player]); - 'step 1' - if(result.bool){ - if(get.type(result.cards[0])!='equip'){ - trigger.player.draw(); - event.finish(); - } - else{ - if(!game.hasPlayer(function(current){ - return current!=player&¤t!=trigger.player&&player.canUse('juedou',current); - })){ - event.finish(); - return; - } - trigger.player.chooseTarget(true,function(card,player,target){ - var evt=_status.event.getParent(); - return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; - },'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){ - var evt=_status.event.getParent(); - return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; - }); - } - } - else event.finish(); - 'step 2' - if(result.targets){ - player.useCard({name:'juedou',isCard:true},result.targets[0],'noai'); - } - }, - ai:{ - halfneg:true, - }, - }, - "new_retuxi":{ - audio:"retuxi", - trigger:{ - player:"phaseDrawBegin2", - }, - direct:true, - //priority:-10, - filter:function (event){ - return event.num>0&&!event.numFixed; - }, - content:function (){ - "step 0" - var num=get.copy(trigger.num); - if(get.mode()=='guozhan'&&num>2) num=2; - player.chooseTarget(get.prompt('new_retuxi'),'获得至多'+get.translation(num)+'名角色的各一张手牌,然后少摸等量的牌',[1,num],function(card,player,target){ - return target.countCards('h')>0&&player!=target; - },function(target){ - var att=get.attitude(_status.event.player,target); - if(target.hasSkill('tuntian')) return att/10; - return 1-att; - }); - "step 1" - if(result.bool){ - result.targets.sortBySeat(); - player.logSkill('new_retuxi',result.targets); - player.gainMultiple(result.targets); - trigger.num-=result.targets.length; - } - else{ - event.finish(); - } - "step 2" - if(trigger.num<=0) game.delay(); - }, - ai:{ - threaten:1.6, - expose:0.2, - }, - }, - "new_reyiji":{ - audio:"reyiji", - trigger:{ - player:"damageEnd", - }, - frequent:true, - filter:function (event){ - return (event.num>0) - }, - content:function (){ - "step 0" - event.count=1; - "step 1" - player.draw(2); - event.given=0; - "step 2" - player.chooseCardTarget({ - filterCard:true, - selectCard:[1,2-event.given], - filterTarget:function(card,player,target){ - return player!=target&&target!=event.temp; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player,'giveAuto'); - event.given+=result.cards.length; - if(event.given<2){ - event.temp=result.targets[0]; - event.goto(2); - } - else if(event.count0){ - if(player.needsToDiscard()){ - num=0.7; - } - else{ - num=0.5; - } - } - if(player.hp>=4) return [1,num*2]; - if(target.hp==3) return [1,num*1.5]; - if(target.hp==2) return [1,num*0.5]; - } - }, - }, - threaten:0.6, - }, - }, - "new_rejianxiong":{ - audio:"rejianxiong", - audioname:['shen_caopi'], - trigger:{ - player:"damageEnd", - }, - content:function (){ - "step 0" - if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ - player.gain(trigger.cards,"gain2"); - } - player.draw('nodelay'); - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - if(get.tag(card,'damage')&&player!=target) return [1,0.6]; - }, - }, - }, - }, - "new_reluoyi":{ - audio:"reluoyi", - trigger:{ - player:"phaseDrawBegin1", - }, - forced:true, - locked:false, - filter:function(event,player){ - return !event.numFixed; - }, - content:function (){ - "step 0" - var cards=get.cards(3); - game.cardsGotoOrdering(cards); - player.showCards(cards,'裸衣'); - var cardsx=[]; - for(var i=0;i=trigger.num; - }; - "step 1" - if(result.bool){ - if(cards.length) player.gain(cards,'gain2'); - //game.cardsDiscard(cards2); - player.addTempSkill('reluoyi2',{player:'phaseBefore'}); - trigger.changeToZero(); - } - //else game.cardsDiscard(cards); - }, - }, - "new_rewusheng":{ - mod:{ - targetInRange:function (card){ - if(get.suit(card)=='diamond'&&(_status.event.skill=='new_rewusheng'||card.name=='sha')) return true; - }, - }, - audio:"wusheng", - audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], - enable:["chooseToRespond","chooseToUse"], - filterCard:function (card,player){ - if(get.zhu(player,'shouyue')) return true; - return get.color(card)=='red'; - }, - position:"he", - viewAs:{ - name:"sha", - }, - viewAsFilter:function (player){ - if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; - } - else{ - if(!player.countCards('he',{color:'red'})) return false; - } - }, - prompt:"将一张红色牌当杀使用或打出", - check:function (card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function (player){ - if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; - } - else{ - if(!player.countCards('he',{color:'red'})) return false; - } - }, - respondSha:true, - basic:{ - useful:[5,1], - value:[5,1], - }, - order:function (){ - if(_status.event.player.hasSkillTag('presha',true,null,true)) return 10; - return 3; - }, - result:{ - target:function (player,target){ - if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){ - if(get.attitude(player,target)>0){ - return -6; - } - else{ - return -3; - } - } - return -1.5; - }, - }, - tag:{ - respond:1, - respondShan:1, - damage:function (card){ - if(card.nature=='poison') return; - return 1; - }, - natureDamage:function (card){ - if(card.nature) return 1; - }, - fireDamage:function (card,nature){ - if(card.nature=='fire') return 1; - }, - thunderDamage:function (card,nature){ - if(card.nature=='thunder') return 1; - }, - poisonDamage:function (card,nature){ - if(card.nature=='poison') return 1; - }, - }, - }, - }, - "new_yijue":{ - audio:"yijue", - enable:"phaseUse", - usable:1, - position:"he", - filterTarget:function (card,player,target){ - return player!=target&&target.countCards('h'); - }, - filterCard:true, - check:function (card){ - return 8-get.value(card); - }, - content:function (){ - "step 0" - target.chooseCard(true).ai=function(card){ - var player=_status.event.player; - if((player.hasShan()||player.hp<3)&&get.color(card)=='black') return 0.5; - return Math.max(1,20-get.value(card)); - }; - "step 1" - target.showCards(result.cards); - event.card2=result.cards[0]; - if(get.color(event.card2)=='black'){ - if(!target.hasSkill('fengyin')){ - target.addTempSkill('fengyin'); - } - target.addTempSkill('new_yijue2'); - event.finish(); - } - else{ - player.gain(event.card2,target,'give','bySelf'); - if(target.hp0; - }; - } - } - "step 2" - if(result.bool){ - target.recover(); - } - }, - ai:{ - result:{ - target:function (player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ - return 1; - } - if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ - return -2; - } - return -0.5; - }, - }, - order:9, - }, - }, - "new_yijue2":{ - trigger:{ - player:"damageBegin1", - }, - filter:function (event){ - return event.source&&event.source.hasSkill('new_yijue')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='heart'&&event.notLink(); - }, - silent:true, - popup:false, - forced:true, - content:function (){ - trigger.num++; - }, - mark:true, - mod:{ - cardEnabled2:function (card){ - if(get.position(card)=='h') return false; - }, - }, - intro:{ - content:"不能使用或打出手牌", - }, - }, - "new_repaoxiao":{ - audio:"paoxiao", - inherit:"paoxiao", - mod:{ - targetInRange:function (card,player){ - if(card.name=='sha'&&get.cardCount({name:'sha'},player)>0) return true; - }, - cardUsable:function (card,player,num){ - if(card.name=='sha') return Infinity; - }, - }, - ai:{ - unequip:true, - skillTagFilter:function (player,tag,arg){ - if(!get.zhu(player,'shouyue')) return false; - if(arg&&arg.name=='sha') return true; - return false; - }, - }, - }, - "new_tishen":{ - trigger:{ - player:"phaseUseEnd", - }, - check:function (event,player){ - var num=0; - var he=player.getCards('he'); - for(var i=0;i0 - }, - content:function (){ - "step 0" - player.chooseCardTarget({ - position:'he', - filterCard:true, - selectCard:[1,Infinity], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(get.attitude(_status.event.player,_status.currentPhase)<0&&_status.currentPhase.needsToDiscard()&&card.name!='du') return -1; - for(var i=0;i_status.event.player.countCards('h')) return 0; - return att-4; - }, - prompt:get.prompt2('new_qingjian'), - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - var cards=result.cards; - var type=[]; - for(var i=0;i0&&get.attitude(player,current)>2); - })>1&&get.color(card)=='black'&&player.countCards('h',{color:'red'})>0) return 3-get.value(card); - return 9-get.value(card); - }, - filter:function (event,player){ - return !player.hasSkill('new_reqingnang_off2'); - }, - filterTarget:function (card,player,target){ - if(target.hp>=target.maxHp||target.hasSkill('new_reqingnang_off')) return false; - return true; - }, - content:function (){ - target.addTempSkill('new_reqingnang_off'); - if(get.color(cards[0])=='black') player.addTempSkill('new_reqingnang_off2'); - target.recover(); - }, - ai:{ - order:9, - result:{ - target:function (player,target){ - if(target.hp==1) return 5; - if(player==target&&player.countCards('h')>player.hp) return 5; - return 2; - }, - }, - threaten:2, - }, - }, - reyaowu:{ - trigger:{player:'damageBegin3'}, - audio:'new_reyaowu', - forced:true, - filter:function(event){ - return event.card&&(get.color(event.card)!='red'||event.source&&event.source.isAlive()); - }, - content:function(){ - trigger[get.color(trigger.card)!='red'?'player':'source'].draw(); - }, - }, - "new_reyaowu":{ - trigger:{ - player:"damageBegin3", - }, - //priority:1, - audio:2, - filter:function (event){ - return event.card&&event.card.name=='sha'&&(get.color(event.card)!='red'||event.source&&event.source.isAlive()); - }, - forced:true, - check:function (event){ - if(event.card&&(event.card.name=='sha')){ - return get.color(event.card)=='black'; - } - }, - content:function (){ - if(get.color(trigger.card)!='red') player.draw(); - else trigger.source.chooseDrawRecover(true); - }, - ai:{ - effect:{ - target:function (card,player,target,current){ - if(card.name=='sha'&&(get.color(card)=='red')&&get.attitude(player,target)<=0){ - return [1,0.8,1,0]; - } - if(card.name=='sha'&&(get.color(card)=='black')){ - return [1,0.4]; - } - }, - }, - }, - }, - - reguanxing:{ - audio:'guanxing', - audioname:['jiangwei','re_jiangwei','re_zhugeliang','gexuan'], - trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, - frequent:true, - filter:function(event,player,name){ - if(name=='phaseJieshuBegin'){ - return player.hasSkill('reguanxing_on'); - } - return true; - }, - content:function(){ - "step 0" - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var num=game.countPlayer()<4?3:5; - var cards=get.cards(num); - event.cards=cards; - var switchToAuto=function(){ - _status.imchoosing=false; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - var top=[]; - var judges=player.getCards('j'); - var stopped=false; - if(!player.hasWuxie()){ - for(var i=0;i0){ - event.cards.push(result.card); - player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','reluoshen'); - } - else{ - for(var i=0;i0; - }, - check:function(card){ - var player=_status.event.player; - if(get.position(card)=='e'){ - var subtype=get.subtype(card); - if(!game.hasPlayer(function(current){ - return current!=player&¤t.hp!=player.hp&&get.attitude(player,current)>0&&!current.countCards('e',{subtype:subtype}); - })){ - return 0; - } - if(player.countCards('h',{subtype:subtype})) return 20-get.value(card); - return 10-get.value(card); - } - else{ - if(player.countCards('e')) return 0; - if(player.countCards('h',{type:'equip'})) return 0; - return 8-get.value(card); - } - }, - filterTarget:function(card,player,target){ - if(target.sex!='male') return false; - var card=ui.selected.cards[0]; - if(!card) return false; - if(get.position(card)=='e'&&!target.isEmpty(get.subtype(card))) return false; - return true; - }, - discard:false, - delay:false, - lose:false, - content:function(){ - 'step 0' - if(get.position(cards[0])=='e') event._result={index:0}; - else if(get.type(cards[0])!='equip'||!target.isEmpty(get.subtype(cards[0]))) event._result={index:1}; - else player.chooseControl().set('choiceList',[ - '将'+get.translation(cards[0])+'置入'+get.translation(target)+'的装备区', - '弃置'+get.translation(cards[0]), - ]).ai=function(){return 1}; - 'step 1' - if(result.index==0){ - player.$give(cards,target,false); - target.equip(cards[0]); - } - else{ - player.discard(cards); - } - 'step 2' - if(player.hp>target.hp){ - player.draw(); - if(target.isDamaged()) target.recover(); - } - else if(player.hptarget.hp){ - if(target.isHealthy()){ - if(!player.needsToDiscard(1)||goon()) return 0.1; - return 0; - } - return 1; - } - return 0; - } - } - } - }, - rejiuyuan:{ - global:'rejiuyuan2', - audio:2, - zhuSkill:true, - }, - rejiuyuan2:{ - audio:'jiuyuan', - forceaudio:true, - trigger:{player:'useCardToPlayer'}, - filter:function(event,player){ - if(event.card.name!='tao') return false; - if(player.group!='wu') return false; - if(event.target!=player) return false; - return game.hasPlayer(function(target){ - return player!=target&&!event.targets.contains(target)&&target.isDamaged()&&target.hp2||!player.countCards('h',function(card){ - return get.value(card)>=8; - }))){ - return 1; - } - return 6-get.value(card) - }, - content:function(){ - 'step 0' - player.discard(cards); - event.num=1; - var hs=player.getCards('h'); - if(!hs.length) event.num=0; - for(var i=0;i=Math.max(2,player.countCards('h')-player.hp)) return 0; - if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - 'step 0' - var evt=_status.event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'&&!evt.rerende){ - var next=game.createEvent('rerende_clear'); - _status.event.next.remove(next); - evt.after.push(next); - evt.rerende=true; - next.player=player; - next.setContent(lib.skill.rerende1.content); - } - if(!Array.isArray(player.storage.rerende2)){ - player.storage.rerende2=[]; - } - player.storage.rerende2.push(target); - target.gain(cards,player,'giveAuto'); - if(typeof player.storage.rerende!='number'){ - player.storage.rerende=0; - } - if(player.storage.rerende>=0){ - player.storage.rerende+=cards.length; - if(player.storage.rerende>=2){ - var list=[]; - if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ - return player.canUse('sha',current); - })){ - list.push(['基本','','sha']); - list.push(['基本','','sha','fire']); - list.push(['基本','','sha','thunder']); - } - if(lib.filter.cardUsable({name:'tao'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ - return player.canUse('tao',current); - })){ - list.push(['基本','','tao']); - } - if(lib.filter.cardUsable({name:'jiu'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ - return player.canUse('jiu',current); - })){ - list.push(['基本','','jiu']); - } - if(list.length){ - player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){ - var player=_status.event.player; - var card={name:button.link[2],nature:button.link[3]}; - if(card.name=='tao'){ - if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){ - return 5; - } - return 1; - } - if(card.name=='sha'){ - if(game.hasPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0 - })){ - if(card.nature=='fire') return 2.95; - if(card.nature=='thunder') return 2.92; - return 2.9; - } - return 0; - } - if(card.name=='jiu'){ - return 0.5; - } - return 0; - }); - } - else{ - event.finish(); - } - player.storage.rerende=-1; - } - else{ - event.finish(); - } - } - else{ - event.finish(); - } - 'step 1' - if(result&&result.bool&&result.links[0]){ - var card={name:result.links[0][2],nature:result.links[0][3]}; - player.chooseUseTarget(card,true); - } - }, - ai:{ - order:function(skill,player){ - if(player.hp1){ - return 10; - } - return 4; - }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return -10; - } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); - } - }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - if(game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0; - })){ - return 0; - } - } - } - } - }, - threaten:0.8 - } - }, - rerende1:{ - trigger:{player:'phaseUseBegin'}, - silent:true, - content:function(){ - player.storage.rerende=0; - player.storage.rerende2=[]; - } - }, - liyu:{ - audio:2, - trigger:{source:'damageSource'}, - forced:true, - filter:function(event,player){ - if(event._notrigger.contains(event.player)) return false; - return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countGainableCards(player,'he')>0; - }, - check:function(){ - return false; - }, - content:function(){ - 'step 0' - trigger.player.chooseTarget(function(card,player,target){ - var evt=_status.event.getParent(); - return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; - },get.prompt('liyu')).set('ai',function(target){ - var evt=_status.event.getParent(); - return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; - }); - 'step 1' - if(result.bool){ - player.gainPlayerCard(trigger.player,'he',true); - event.target=result.targets[0]; - trigger.player.line(player,'green'); - } - else{ - event.finish(); - } - 'step 2' - if(event.target){ - player.useCard({name:'juedou',isCard:true},event.target,'noai'); - } - }, - ai:{ - halfneg:true - } - }, - /*reqicai:{ - trigger:{player:'equipEnd'}, - frequent:true, - content:function(){ - player.draw(); - }, - mod:{ - targetInRange:function(card,player,target,now){ - var type=get.type(card); - if(type=='trick'||type=='delay') return true; - } - }, - },*/ - retuxi:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - direct:true, - filter:function(event){ - return event.num>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('retuxi'),[1,trigger.num],function(card,player,target){ - return target.countCards('h')>0&&player!=target&&target.countCards('h')>=player.countCards('h'); - },function(target){ - var att=get.attitude(_status.event.player,target); - if(target.hasSkill('tuntian')) return att/10; - return 1-att; - }); - "step 1" - if(result.bool){ - player.logSkill('retuxi',result.targets); - player.gainMultiple(result.targets); - trigger.num-=result.targets.length; - } - else{ - event.finish(); - } - "step 2" - if(trigger.num<=0) game.delay(); - }, - ai:{ - threaten:1.6, - expose:0.2 - } - }, - reguicai:{ - audio:2, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he',function(card){ - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'reguicai','highlight','noOrdering'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1, - } - } - }, - refankui:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return (event.source&&event.source.countGainableCards(player,'he')&&event.num>0&&event.source!=player); - }, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - event.count--; - player.gainPlayerCard(get.prompt('refankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['refankui',trigger.source]); - "step 2" - if(result.bool&&event.count>0&&trigger.source.countGainableCards(player,'he')>0) event.goto(1); - }, - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.countCards('he')>1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; - if(get.attitude(target,player)<0) return [1,1]; - } - } - } - } - }, - reluoyi:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - check:function(event,player){ - if(player.countCards('h','sha')) return true; - return Math.random()<0.5; - }, - content:function(){ - "step 0" - player.addTempSkill('reluoyi2',{player:'phaseBefore'}); - trigger.cancel(null,null,'notrigger'); - "step 1" - event.cards=get.cards(3); - player.showCards(event.cards,'裸衣'); - "step 2" - for(var i=0;i0); - }, - check:function(event,player){ - return (get.attitude(player,event.source)<=0); - }, - logTarget:'source', - content:function(){ - "step 0" - event.num=trigger.num; - "step 1" - player.judge(function(card){ - if(get.color(card)=='red') return 1; - return 0; - }); - "step 2" - if(result.color=='black'){ - if(trigger.source.countCards('he')){ - player.discardPlayerCard(trigger.source,'he',true); - } - } - else if(trigger.source.isIn()){ - trigger.source.damage(); - } - event.num--; - if(event.num>0){ - player.chooseBool(get.prompt2('reganglie')); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - player.logSkill('reganglie',trigger.source); - event.goto(1); - } - }, - ai:{ - maixie_defend:true, - expose:0.4 - } - }, - qinxue:{ - skillAnimation:true, - animationColor:'wood', - audio:2, - unique:true, - juexingji:true, - derivation:'gongxin', - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - if(player.storage.qinxue) return false; - if(player.countCards('h')>=player.hp+3) return true; - if(player.countCards('h')>=player.hp+2&&game.players.length+game.dead.length>=7) return true; - return false; - }, - content:function(){ - player.storage.qinxue=true; - player.loseMaxHp(); - player.addSkill('gongxin'); - player.awakenSkill('qinxue'); - } - }, - qingjian:{ - audio:2, - unique:true, - trigger:{player:'gainAfter'}, - direct:true, - usable:4, - filter:function(event,player){ - if(event.parent.parent.name=='phaseDraw') return false; - return event.cards&&event.cards.length>0 - }, - content:function(){ - "step 0" - event.cards=trigger.cards.slice(0); - "step 1" - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:[1,event.cards.length], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - if(target.countCards('h')>_status.event.player.countCards('h')) return 0; - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 2" - if(result.bool){ - player.storage.qingjian++; - player.logSkill('qingjian',result.targets); - result.targets[0].gain(result.cards,player,'give'); - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:true, - check:function(card){ - return 8-get.value(card); - }, - discard:false, - lose:false, - delay:false, - content:function(){ - "step 0" - target.storage.refanjian=cards[0]; - target.gain(cards[0],player,'give'); - "step 1" - target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){ - var cards=player.getCards('he',{suit:get.suit(player.storage.refanjian)}); - if(cards.length==1) return 0; - if(cards.length>=2){ - for(var i=0;i=8) return 1; - } - if(cards.length>2&&player.hp>2) return 1; - if(cards.length>3) return 1; - return 0; - } - "step 2" - if(result.control=='refanjian_card'){ - target.showHandcards(); - } - else{ - target.loseHp(); - event.finish(); - } - "step 3" - target.discard(target.getCards('he',{suit:get.suit(target.storage.refanjian)})) - delete target.storage.refanjian; - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return -target.countCards('he')-(player.countCards('h','du')?1:0); - } - }, - threaten:2, - } - }, - reqianxun:{ - init:function(player){ - if(!player.storage.reqianxun2) player.storage.reqianxun2=[]; - }, - audio:2, - trigger:{target:'useCardToBegin',player:'judgeBefore'}, - filter:function(event,player){ - if(player.countCards('h')==0) return false; - if(event.parent.name=='phaseJudge'){ - if(lib.skill.reqianxun.trigger.player=='judgeBefore'){ - return true; - } - return event.result&&event.result.judge!=0; - } - if(event.name=='judge') return false; - if(event.targets&&event.targets.length>1) return false; - if(event.card&&get.type(event.card)=='trick'&&event.player!=player) return true; - }, - content:function(){ - player.storage.reqianxun2=player.storage.reqianxun2.concat(player.getCards('h')); - game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); - player.lose(player.getCards('h'),ui.special,'toStorage'); - player.addSkill('reqianxun2'); - }, - ai:{ - effect:function(card,player,target){ - if(!target.hasFriend()) return; - if(player==target) return; - var type=get.type(card); - var nh=target.countCards(); - if(type=='trick'){ - if(!get.tag(card,'multitarget')||get.info(card).singleCard){ - if(get.tag(card,'damage')){ - if(nh<3||target.hp<=2) return 0.8; - } - return [1,nh]; - } - } - else if(type=='delay'){ - return [0.5,0.5]; - } - }, - } - }, - reqianxun2:{ - trigger:{global:'phaseEnd'}, - forced:true, - audio:false, - content:function(){ - player.gain(player.storage.reqianxun2,'fromStorage','draw'); - player.storage.reqianxun2.length=0; - player.removeSkill('reqianxun2'); - game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); - }, - mark:true, - intro:{ - content:'cardCount', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - player.storage.reqianxun2.length=0; - } - }, - } - }, - relianying:{ - audio:2, - trigger:{player:'loseAfter'}, - direct:true, - filter:function(event,player){ - if(player.countCards('h')) return false; - return event.hs&&event.hs.length; - }, - content:function(){ - "step 0" - var num=trigger.hs.length; - player.chooseTarget('选择发动连营的目标',[1,num]).ai=function(target){ - var player=_status.event.player; - if(player==target) return get.attitude(player,target)+10; - return get.attitude(player,target); - } - "step 1" - if(result.bool){ - player.logSkill('relianying',result.targets); - game.asyncDraw(result.targets); - } - else event.finish(); - "step 2" - game.delay(); - }, - ai:{ - threaten:0.8, - effect:{ - target:function(card){ - if(card.name=='guohe'||card.name=='liuxinghuoyu') return 0.5; - } - }, - noh:true, - } - }, - retishen:{ - audio:2, - unique:true, - mark:true, - skillAnimation:true, - animationColor:'soil', - limited:true, - trigger:{player:'phaseZhunbeiBegin'}, - init:function(player){ - player.storage.retishen=false; - }, - filter:function(event,player){ - if(player.storage.retishen) return false; - if(typeof player.storage.retishen2=='number'){ - return player.hp0){ - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }).set('du',event.card.name=='du'); - } - else{ - player.chooseBool('是否弃置'+get.translation(event.card)+'?'); - event.disbool=true; - } - game.delay(2); - "step 1" - if(event.disbool){ - if(!result.bool){ - game.log(player,'展示了',event.card); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - } - else{ - game.log(player,'展示并弃掉了',event.card); - event.card.discard(); - } - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(card){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.delete(); - } - },event.card); - } - else if(result.targets){ - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'log'); - event.node.moveDelete(result.targets[0]); - game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); - game.broadcast(function(card,target){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.moveDelete(target); - } - },event.card,result.targets[0]); - } - else{ - game.log(player,'展示并弃掉了',event.card); - event.card.discard(); - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(card){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.delete(); - } - },event.card); - } - game.addVideo('thrownhighlight2'); - ui.arena.classList.remove('thrownhighlight'); - }, - ai:{ - effect:{ - target:function(card,player){ - if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; - } - } - } - }, - rejianxiong:{ - audio:2, - audioname:['shen_caopi'], - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0],true)=='o'; - }, - content:function(){ - player.gain(trigger.cards); - player.$gain2(trigger.cards); - player.draw(); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - if(get.tag(card,'damage')) return [1,0.55]; - } - } - } - }, - rejianxiong_old:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - "step 0" - if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ - player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){ - var trigger=_status.event.getTrigger(); - if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0; - return 1; - }; - } - else{ - player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong')); - } - "step 1" - if(result.control=='rejianxiong_napai'){ - player.logSkill('rejianxiong'); - player.gain(trigger.cards); - player.$gain2(trigger.cards); - } - else if(result.control=='rejianxiong_mopai'){ - player.logSkill('rejianxiong'); - player.draw(); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - if(get.tag(card,'damage')&&player!=target) return [1,0.6]; - } - } - } - }, - reyiji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - filter:function(event){ - return (event.num>0) - }, - content:function(){ - "step 0" - event.num=1; - event.count=1; - "step 1" - player.gain(get.cards(2)); - player.$draw(2); - "step 2" - player.chooseCardTarget({ - filterCard:true, - selectCard:[1,2], - filterTarget:function(card,player,target){ - return player!=target&&target!=event.temp; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - player.lose(result.cards,ui.special,'toStorage'); - if(result.targets[0].hasSkill('reyiji2')){ - result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards); - } - else{ - result.targets[0].addSkill('reyiji2'); - result.targets[0].storage.reyiji2=result.cards; - } - player.$give(result.cards.length,result.targets[0],false); - player.line(result.targets,'green'); - game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']); - if(num==1){ - event.temp=result.targets[0]; - event.num++; - event.goto(2); - } - else if(event.count0){ - if(player.needsToDiscard()){ - num=0.7; - } - else{ - num=0.5; - } - } - if(player.hp>=4) return [1,num*2]; - if(target.hp==3) return [1,num*1.5]; - if(target.hp==2) return [1,num*0.5]; - } - } - }, - threaten:0.6 - } - }, - reyiji2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - mark:true, - popup:'遗计拿牌', - audio:false, - content:function(){ - player.$draw(player.storage.reyiji2.length); - player.gain(player.storage.reyiji2,'fromStorage'); - delete player.storage.reyiji2; - player.removeSkill('reyiji2'); - game.delay(); - }, - intro:{ - content:'cardCount' - } - }, - yijue:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target).set('small',true); - "step 1" - if(result.bool){ - if(!target.hasSkill('fengyin')){ - target.addTempSkill('fengyin'); - } - target.addTempSkill('yijue2'); - event.finish(); - } - else if(target.hp0; - }; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - target.recover(); - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; - } - } - if(!bool) return 0; - if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ - return 1; - } - if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ - return -2; - } - return -0.5; - } - }, - order:9, - } - }, - yijue2:{ - mark:true, - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; - } - }, - intro:{ - content:'不能使用或打出卡牌' - } - }, - retieji:{ - 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=get.suit(result.card); - 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); - } - } - }, - reyicong:{ - trigger:{ - player:["changeHp"], - }, - audio:2, - forced:true, - filter:function(event,player){ - return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num); - }, - content:function (){}, - mod:{ - globalFrom:function(from,to,current){ - if(from.hp>2) return current-1; - }, - globalTo:function(from,to,current){ - if(to.hp<=2) return current+1; - }, - }, - ai:{ - threaten:0.8 - } - }, - qiaomeng:{ - audio:2, - trigger:{source:'damageSource'}, - direct:true, - filter:function(event){ - if(event._notrigger.contains(event.player)) return false; - return event.card&&event.card.name=='sha'&&event.cards&& - get.color(event.cards)=='black'&&event.player.countCards('e'); - }, - content:function(){ - "step 0" - player.choosePlayerCard('e',trigger.player); - "step 1" - if(result.bool){ - player.logSkill('qiaomeng'); - trigger.player.discard(result.links[0]); - event.card=result.links[0]; - } - else{ - event.finish(); - } - "step 2" - if(get.position(card)=='d'){ - if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){ - player.gain(card,trigger.player); - player.$gain2(card); - } - } - } - }, - rekurou:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:true, - check:function(card){ - return 8-get.value(card); - }, - position:'he', - content:function(){ - player.loseHp(); - }, - ai:{ - order:8, - result:{ - player:function(player){ - if(player.hp<=2) return player.countCards('h')==0?1:0; - if(player.countCards('h',{name:'sha',color:'red'})) return 1; - return player.countCards('h')<=player.hp?1:0; - } - }, - effect:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,1]; - return 1.2; - } - if(get.tag(card,'loseHp')){ - if(player.hp<=1) return; - return [0,0]; - } - } - } - }, - zhaxiang:{ - trigger:{player:'loseHpEnd'}, - forced:true, - audio:2, - content:function(){ - var num=trigger.num; - player.draw(3*num); - if(_status.currentPhase==player){ - if(!player.storage.zhaxiang2) player.storage.zhaxiang2=0; - player.storage.zhaxiang2+=num; - player.addTempSkill('zhaxiang2',{player:'phaseAfter'}); - } - else{ - game.trySkillAudio('zhaxiang',player); - } - }, - ai:{ - maihp:true - } - }, - zhaxiang2:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha'&&get.color(card)=='red') return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.storage.zhaxiang2; - } - }, - onremove:true, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'; - }, - content:function(){ - trigger.directHit.addArray(game.players); - } - }, - zhuhai:{ - trigger:{global:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return event.player.isAlive()&&event.player.getStat('damage')&& - lib.filter.targetEnabled({name:'sha'},player,event.player)&&(player.hasSha()||_status.connectMode&&player.countCards('h')>0); - }, - content:function(){ - player.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?').set('logSkill','zhuhai').set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',trigger.player); - } - }, - qianxin:{ - skillAnimation:true, - animationColor:'orange', - audio:2, - unique:true, - juexingji:true, - trigger:{source:'damageSource'}, - forced:true, - derivation:'jianyan', - filter:function(event,player){ - return player.hp2) return 'trick'; - return 'red'; - }); - "step 1" - event.card=get.cardPile(function(card){ - if(get.color(card)==result.control) return true; - if(get.type(card,'trick')==result.control) return true; - return false; - },'cardPile'); - if(!event.card){ - event.finish(); - return; - } - player.showCards([event.card]); - "step 2" - player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){ - return target.sex=='male'; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.neg) return -att; - return att; - }).set('neg',get.value(event.card,player,'raw')<0); - "step 3" - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'gain2'); - - }, - ai:{ - order:9, - result:{ - player:function(player){ - if(game.hasPlayer(function(current){ - return current.sex=='male'&&get.attitude(player,current)>0; - })) return 2; - return 0; - }, - }, - threaten:1.2 - } - }, - reguose:{ - audio:2, - enable:'phaseUse', - usable:1, - discard:false, - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - prepare:'throw', - position:'he', - filterCard:{suit:'diamond'}, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.hasJudge('lebu')) return true; - return lib.filter.targetEnabled({name:'lebu'},player,target); - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - if(target.hasJudge('lebu')){ - target.discard(target.getJudge('lebu')); - } - else{ - var next=player.useCard({name:'lebu'},target,cards); - next.animate=false; - next.audio=false; - } - player.draw(); - }, - ai:{ - result:{ - target:function(player,target){ - if(target.hasJudge('lebu')) return -get.effect(target,{name:'lebu'},player,target); - return get.effect(target,{name:'lebu'},player,target); - } - }, - order:9, - } - }, - fenwei:{ - skillAnimation:true, - animationColor:'wood', - audio:2, - audioname:['heqi'], - unique:true, - mark:true, - limited:true, - trigger:{global:'useCardToPlayered'}, - //priority:5, - filter:function(event,player){ - if(event.getParent().triggeredTargets3.length>1) return false; - if(get.type(event.card)!='trick') return false; - if(get.info(event.card).multitarget) return false; - if(event.targets.length<2) return false; - if(player.storage.fenwei) return false; - return true; - }, - init:function(player){ - player.storage.fenwei=false; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('fenwei'), - [1,trigger.targets.length],function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1&&!trigger.excluded.contains(target)){ - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - } - return -1; - }).set('targets',trigger.targets); - "step 1" - if(result.bool){ - player.awakenSkill('fenwei'); - player.logSkill('fenwei',result.targets); - player.storage.fenwei=true; - trigger.getParent().excluded.addArray(result.targets); - game.delay(); - } - }, - intro:{ - content:'limited' - } - }, - chulao:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.group=='unknown') return false; - for(var i=0;i0; - }, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - position:'he', - selectTarget:[1,Infinity], - check:function(card){ - if(get.suit(card)=='spade') return 8-get.value(card); - return 5-get.value(card); - }, - content:function(){ - "step 0" - if(num==0&&get.suit(cards[0])=='spade') player.draw(); - player.choosePlayerCard(targets[num],'he',true); - "step 1" - if(result.bool){ - if(result.links.length) targets[num].discard(result.links[0]); - if(get.suit(result.links[0])=='spade') targets[num].draw(); - } - }, - ai:{ - result:{ - target:-1 - }, - threaten:1.2, - order:3 - } - }, - xunxun:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - //check:function(event,player){ - // return !player.hasSkill('reyiji2'); - //}, - content:function(){ - "step 0" - event.cards=get.cards(4); - player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶',true).set('ai',ai.get.buttonValue); - "step 1" - if(result.bool){ - var choice=[]; - for(var i=0;i-3; - return get.attitude(player,event.player)>-3; - }, - logTarget:function(event,player){ - if(event.player==player) return event.source; - return event.player; - }, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - game.asyncDraw([trigger.player,trigger.source]); - event.count--; - "step 2" - game.delay(); - "step 3" - if(event.count){ - player.chooseBool(get.prompt2('wangxi',lib.skill.wangxi.logTarget(trigger,player))) - } - else event.finish(); - "step 4" - if(result.bool){ - player.logSkill('wangxi',lib.skill.wangxi.logTarget(trigger,player)); - event.goto(1); - } - }, - ai:{ - maixie:true, - maixie_hp:true - } - }, - refangquan:{ - audio:2, - trigger:{player:'phaseUseBefore'}, - filter:function(event,player){ - return player.countCards('h')>0&&!player.hasSkill('fangquan3'); - }, - direct:true, - content:function(){ - "step 0" - var fang=player.countMark('fangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1; - player.chooseBool(get.prompt2('refangquan')).set('ai',function(){ - if(!_status.event.fang) return false; - return game.hasPlayer(function(target){ - if(target.hasJudge('lebu')||target==player) return false; - if(get.attitude(player,target)>4){ - return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0); - } - return false; - }); - }).set('fang',fang); - "step 1" - if(result.bool){ - player.logSkill('refangquan'); - trigger.cancel(); - player.addTempSkill('fangquan2','phaseAfter'); - player.addMark('fangquan2',1,false); - player.addTempSkill('refangquan2'); - //player.storage.fangquan=result.targets[0]; - } - } - }, - refangquan2:{ - mod:{ - maxHandcardBase:function(player,num){ - return player.maxHp; - }, - }, - }, - rehunzi:{ - inherit:'hunzi', - filter:function(event,player){ - return player.hp<=2&&!player.storage.rehunzi; - }, - ai:{ - threaten:function(player,target){ - if(target.hp<=2) return 2; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(!target.hasFriend()) return; - if(get.tag(card,'damage')==1&&target.hp==3&&!target.isTurnedOver()&& - _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; - } - } - } - }, - rezhijian:{ - inherit:'zhijian', - group:['rezhijian_use'], - subfrequent:['use'], - subSkill:{ - use:{ - audio:'rezhijian', - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - return get.type(event.card)=='equip'; - }, - prompt:'是否发动【直谏】摸一张牌?', - content:function(){ - player.draw('nodelay'); - }, - }, - }, - }, - retuntian:{ - audio:2, - trigger:{player:'loseEnd'}, - frequent:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - for(var i=0;i0){ - player.discardPlayerCard(target,'he',true); - } - else{ - event.finish(); - } - }, - ai:{ - order:4, - expose:0.2, - result:{ - target:-1, - player:function(player,target){ - if(!target.canUse('sha',player)) return 0; - if(target.countCards('h')==0) return 0; - if(target.countCards('h')==1) return -0.1; - if(player.hp<=2) return -2; - if(player.countCards('h','shan')==0) return -1; - return -0.5; - } - }, - threaten:1.1 - } - }, - rebeige:{ - audio:'beige', - audioname:['re_caiwenji'], - trigger:{global:'damageEnd'}, - filter:function(event,player){ - return (event.card&&event.card.name=='sha'&&event.source&& - event.player.classList.contains('dead')==false&&player.countCards('he')); - }, - direct:true, - checkx:function(event,player){ - var att1=get.attitude(player,event.player); - var att2=get.attitude(player,event.source); - return att1>0&&att2<=0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he',get.prompt2('rebeige',trigger.player)); - var check=lib.skill.beige.checkx(trigger,player); - next.set('ai',function(card){ - if(_status.event.goon) return 8-get.value(card); - return 0; - }); - next.set('logSkill','beige'); - next.set('goon',check); - "step 1" - if(result.bool){ - trigger.player.judge(); - } - else{ - event.finish(); - } - "step 2" - switch(result.suit){ - case 'heart':trigger.player.recover(trigger.num);break; - case 'diamond':trigger.player.draw(3);break; - case 'club':trigger.source.chooseToDiscard('he',2,true);break; - case 'spade':trigger.source.turnOver();break; - } - }, - ai:{ - expose:0.3 - } - }, - rexingshang:{ - audio:2, - trigger:{global:'die'}, - filter:function(event,player){ - return player.isDamaged()||event.player.countCards('he')>0; - }, - direct:true, - content:function(){ - "step 0" - var choice=[]; - if(player.isDamaged()) choice.push('回复体力'); - if(trigger.player.countCards('he')) choice.push('获得牌'); - choice.push('cancel2'); - player.chooseControl(choice).set('prompt',get.prompt2('rexingshang')).set('ai',function(){ - if(choice.length==2) return 0; - if(get.value(trigger.player.getCards('he'))>8) return 1; - return 0; - }); - "step 1" - if(result.control!='cancel2'){ - player.logSkill(event.name,trigger.player); - if(result.control=='获得牌'){ - event.togain=trigger.player.getCards('he'); - player.gain(event.togain,trigger.player,'giveAuto'); - } - else player.recover(); - } - }, - }, - refangzhu:{ - audio:2, - trigger:{ - player:"damageEnd", - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget(get.prompt2('refangzhu'),function(card,player,target){ - return player!=target - }).ai=function(target){ - if(target.hasSkillTag('noturn')) return 0; - var player=_status.event.player; - if(get.attitude(_status.event.player,target)==0) return 0; - if(get.attitude(_status.event.player,target)>0){ - if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); - if(player.getDamagedHp()<3) return -1; - return 100-target.countCards('h'); - } - else{ - if(target.classList.contains('turnedover')) return -1; - if(player.getDamagedHp()>=3) return -1; - return 1+target.countCards('h'); - } - } - "step 1" - if(result.bool){ - player.logSkill('refangzhu',result.targets); - event.target=result.targets[0] - event.target.chooseToDiscard('he',player.getDamagedHp()).set('ai',function(card){ - var player=_status.event.player; - if(player.isTurnedOver()||_status.event.getTrigger().player.getDamagedHp()>2) return -1; - return (player.hp*player.hp)-get.value(card); - }).set('prompt','弃置'+get.cnNumber(player.getDamagedHp())+'张牌并失去一点体力;或选择不弃置,将武将牌翻面并摸'+get.cnNumber(player.getDamagedHp())+'张牌。'); - } - else event.finish(); - "step 2" - if(result.bool){ - event.target.loseHp(); - } - else{ - event.target.draw(player.getDamagedHp()); - event.target.turnOver(); - } - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(target.hp<=1) return; - if(!target.hasFriend()) return; - var hastarget=false; - var turnfriend=false; - var players=game.filterPlayer(); - for(var i=0;i0&&players[i].isTurnedOver()){ - hastarget=true; - turnfriend=true; - } - } - if(get.attitude(player,target)>0&&!hastarget) return; - if(turnfriend||target.hp==target.maxHp) return [0.5,1]; - if(target.hp>1) return [1,0.5]; - } - }, - }, - }, - }, - repolu:{ - audio:1, - trigger:{ - source:'dieAfter', - player:'die', - }, - forceDie:true, - filter:function(event,player,name){ - return name=='die'||player.isAlive(); - }, - direct:true, - content:function(){ - 'step 0' - if(!player.storage.repolu) player.storage.repolu=0; - event.num=player.storage.repolu+1; - player.chooseTarget([1,Infinity],get.prompt('repolu'),'令任意名角色摸'+get.cnNumber(event.num)+'张牌').set('forceDie',true).ai=function(target){ - return get.attitude(_status.event.player,target); - }; - 'step 1' - if(result.bool){ - player.storage.repolu++; - result.targets.sortBySeat(); - player.logSkill('repolu',result.targets); - game.asyncDraw(result.targets,num); - } - else event.finish(); - 'step 2' - game.delay(); - }, - }, - rejiuchi:{ - group:['jiuchi'], - audioname:['re_dongzhuo'], - trigger:{source:'damage'}, - forced:true, - popup:false, - locked:false, - audio:'jiuchi', - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.getParent(2).jiu==true&&!player.hasSkill('rejiuchi_air'); - }, - content:function(){ - player.logSkill('jiuchi'); - player.addTempSkill('rejiuchi_air'); - }, - subSkill:{ - air:{ - sub:true, - init:function(player,skill){ - player.disableSkill(skill,'benghuai'); - }, - onremove:function(player,skill){ - player.enableSkill(skill); - }, - }, - }, - }, - relieren:{ - shaRelated:true, - audio:2, - audioname:['boss_lvbu3'], - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'&&player.canCompare(event.target); - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - //priority:5, - content:function(){ - "step 0" - player.chooseToCompare(trigger.target); - "step 1" - if(result.bool){ - if(trigger.target.countGainableCards(player,'he')) player.gainPlayerCard(trigger.target,true,'he'); - } - else{ - var card1=result.player; - var card2=result.target; - if(get.position(card1)=='d') trigger.target.gain(card1,'gain2'); - if(get.position(card2)=='d') player.gain(card2,'gain2'); - } - } - }, - rezaiqi:{ - count:function(){ - var num=0; - game.countPlayer2(function(current){ - current.getHistory('lose',function(evt){ - if(evt.position==ui.discardPile){ - for(var i=0;i0; - }, - trigger:{ - player:'phaseDiscardEnd' - }, - content:function(){ - 'step 0' - player.chooseTarget([1,lib.skill.rezaiqi.count()],get.prompt2('rezaiqi')).ai=function(target){ - return get.attitude(_status.event.player,target); - }; - 'step 1' - if(result.bool){ - var targets=result.targets; - targets.sortBySeat(); - player.line(targets,'fire'); - player.logSkill('rezaiqi',targets); - event.targets=targets; - } - else event.finish(); - 'step 2' - event.current=targets.shift(); - if(player.isHealthy()) event._result={index:0}; - else event.current.chooseControl().set('choiceList',[ - '摸一张牌', - '令'+get.translation(player)+'回复一点体力', - ]).set('ai',function(){ - if(get.attitude(event.current,player)>0) return 1; - return 0; - }); - 'step 3' - if(result.index==1){ - event.current.line(player); - player.recover(); - } - else event.current.draw(); - game.delay(); - if(targets.length) event.goto(2); - }, - group:'rezaiqi_count', - }, - rezaiqi_count:{ - trigger:{ - global:["loseEnd","cardsDiscardEnd"], - player:'phaseAfter', - }, - silent:true, - forced:true, - popup:false, - filter:function (event,player,name){ - if(name=='phaseAfter') return true; - if(_status.currentPhase!=player) return false; - var evt=event.getParent(); - if(evt&&evt.name=='useCard'&&evt.card&&['equip','delay'].contains(get.type(evt.card))) return false; - var cards=event.cards; - for(var i=0;i②当你不因〖暴虐〗或〖助祭〗而进行的判定的判定牌生效后,若结果为:黑桃,你可对一名其他角色造成2点雷电伤害;梅花:你回复1点体力并可对一名其他其他角色造成1点雷电伤害。', - xinguidao_info:'一名角色的判定牌生效前,你可以打出一张黑色牌作为判定牌并获得原判定牌。若你以此法打出的牌为黑桃2-9,则你摸一张牌。', - reqiangxi:"强袭", - "reqiangxi_info":"出牌阶段对每名其他角色限一次,你可以选择一项:1. 失去一点体力并对你攻击范围内的一名其他角色造成一点伤害;2. 弃置一张武器牌并对你攻击范围内的一名其他角色造成一点伤害。", - rehuoji:"火计", - "rehuoji_info":"出牌阶段,你可一张红色牌当作【火攻】使用。", - rekanpo:"看破", - "rekanpo_info":"你可以将一张黑色牌当作【无懈可击】使用。", - rejieming:"节命", - "rejieming_info":"当你受到1点伤害后,你可以令一名角色摸两张牌。然后若其手牌数小于体力上限,则你摸一张牌。", - reshuangxiong:"双雄", - "reshuangxiong_info":"摸牌阶段,你可以放弃摸牌。若如此做,你展示牌堆顶的两张牌并选择获得其中的一张。然后,你本回合内可以将与此牌颜色不同的一张手牌当做【决斗】使用。当你受到【决斗】造成的伤害时,你可以获得对方于此决斗中打出的所有【杀】", - "reshuangxiong2":"双雄", - "reshuangxiong2_info":"", - - reguanxing:'观星', - reguanxing_info:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,若你将〖观星〗的牌都放在了牌堆底,则你可以在结束阶段再次发动〖观星〗。', - reluoshen:'洛神', - reluoshen_info:'准备阶段,你可以进行判定,若结果为黑色则获得此判定牌,且可重复此流程直到出现红色的判定结果。你通过〖洛神〗获得的牌,不计入当前回合的手牌上限', - reluoshen_info_guozhan:'准备阶段,你可以进行判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌。你通过〖洛神〗获得的牌,不计入当前回合的手牌上限。(结果为黑色的判定牌于此过程中不会进入弃牌堆)', - rejieyin:'结姻', - rejieyin_info:'出牌阶段限一次,你可以选择一名男性角色并弃置一张手牌或将装备区内的一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力。', - rebiyue:'闭月', - rebiyue_info:'结束阶段,你可以摸一张牌,若你没有手牌,则改为摸两张牌。', - rejizhi:'集智', - rejizhi_info:'当你使用锦囊牌时,你可以摸一张牌。若此牌为基本牌,则你可以弃置之,然后令本回合手牌上限+1。', - reqicai:'奇才', - reqicai_info:'锁定技,你使用锦囊牌无距离限制,你装备区内的防具牌和宝物牌不能被其他角色弃置。', - rezhiheng:'制衡', - rezhiheng_info:'出牌阶段限一次,你可以弃置任意张牌并摸等量的牌,若你在发动〖制衡〗时弃置了所有手牌,则你多摸一张牌。', - rejiuyuan:'救援', - rejiuyuan_info:'主公技,其他吴势力角色对自己使用【桃】时,若其体力值大于你,则其可以选择令你回复1点体力,然后其摸1张牌。', - - "new_yajiao":"涯角", - "new_yajiao_info":"每当你于回合外使用或打出牌时,你可以亮出牌堆顶的一张牌,并将其交给一名角色。若此牌与你此次使用或打出的牌类别不同,则你弃置一张牌。", - "new_liyu":"利驭", - "new_liyu_info":"当你使用【杀】对一名其他角色造成伤害后,你可以获得其一张牌。若此牌不为装备牌,则其摸一张牌。若此牌为装备牌,则视为你对其选择的另一名角色使用一张【决斗】。", - "new_retuxi":"突袭", - "new_retuxi_info":"摸牌阶段摸牌时,你可以少摸任意张牌,然后获得等量的角色的各一张手牌。", - "new_retuxi_info_guozhan":"摸牌阶段摸牌时,你可以少摸至多两张牌,然后获得等量的角色的各一张手牌。", - "new_reyiji":"遗计", - "new_reyiji_info":"当你受到1点伤害后,你可以摸两张牌,然后可以将至多两张手牌交给其他角色。", - "new_rejianxiong":"奸雄", - "new_rejianxiong_info":"当你受到伤害后,你可以获得对你造成伤害的牌并摸一张牌。", - "new_reluoyi":"裸衣", - "new_reluoyi_info":"摸牌阶段开始时,你展示牌堆顶的三张牌。然后,你可以放弃摸牌。若如此做,你获得其中的基本牌、武器牌和【决斗】,且直到你的下回合开始,你使用的【杀】或【决斗】造成伤害时,此伤害+1。否则,你将这些牌置入弃牌堆。", - "new_rewusheng":"武圣", - "new_rewusheng_info":"你可以将一张红色牌当做【杀】使用或打出。你使用的方片杀没有距离限制。", - "new_yijue":"义绝", - "new_yijue_info":"出牌阶段限一次,你可以弃置一张牌并令一名有手牌的其他角色展示一张手牌。若此牌为黑色,则该角色不能使用或打出牌,非锁定技失效且受到来自你的红桃【杀】的伤害+1直到回合结束。若此牌为红色,则你可以获得此牌,并可以令其回复一点体力。", - "new_yijue2":"义绝", - "new_yijue2_info":"", - "new_repaoxiao":"咆哮", - "new_repaoxiao_info":"锁定技,出牌阶段,你使用【杀】没有数量限制。若你于此出牌阶段内使用过【杀】,则你本回合内使用【杀】没有距离限制。", - "new_tishen":"替身", - "new_tishen_info":"出牌阶段结束时,你可以弃置你所有的锦囊牌与坐骑牌。若如此做,直到你的下个回合开始,你获得所有以你为目标且未对你造成伤害的【杀】。", - "new_tishen2":"替身", - "new_tishen2_info":"", - "new_qingjian":"清俭", - "new_qingjian_info":"当你于摸牌阶段外获得牌时,你可以展示任意张牌并交给一名其他角色。然后,当前回合角色本回合的手牌上限+X(X为你给出的牌中包含的类别数)。每回合限一次。", - "qingjian_add":"清俭", - "qingjian_add_info":"", - "new_reqingnang":"青囊", - "new_reqingnang_info":"出牌阶段,你可以弃置一张手牌,令一名本回合内未成为过〖青囊〗的目标的角色回复一点体力。若你弃置的是黑色牌,则你本回合内不能再发动〖青囊〗。", - "new_reyaowu":"耀武", - "new_reyaowu_info":"锁定技,当一名角色使用【杀】对你造成伤害时,若此杀为红色,该角色回复1点体力或摸一张牌。否则则你摸一张牌。", - reyaowu:'耀武', - reyaowu_info:'锁定技,当你受到牌造成的伤害时,若此牌为红色,则伤害来源摸一张牌;否则你摸一张牌。', - reqingguo:'倾国', - reqingguo_info:'你可以将一张黑色牌当做【闪】使用或打出。', - - qinxue:'勤学', - retuxi:'突袭', - reluoyi:'裸衣', - reluoyi2:'裸衣', - reganglie:'刚烈', - qingjian:'清俭', - reyingzi:'英姿', - refanjian:'反间', - refanjian_card:'弃牌', - refanjian_hp:'流失体力', - reqianxun:'谦逊', - reqianxun2:'谦逊', - relianying:'连营', - retishen:'替身', - retishen2:'替身', - reyajiao:'涯角', - rejianxiong:'奸雄', - rejianxiong_mopai:'摸牌', - rejianxiong_napai:'拿牌', - reyiji:'遗计', - reyiji2:'遗计', - yijue:'义绝', - yijue2:'义绝', - retieji:'铁骑', - refankui:'反馈', - reyicong:'义从', - qiaomeng:'趫猛', - rekurou:'苦肉', - zhaxiang:'诈降', - zhaxiang2:'诈降', - zhuhai:'诛害', - qianxin:'潜心', - jianyan:'荐言', - reguicai:'鬼才', - xunxun:'恂恂', - wangxi:'忘隙', - reguose:'国色', - fenwei:'奋威', - chulao:'除疠', - liyu:'利驭', - rerende:'仁德', - rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', - liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】', - xunxun_info:'摸牌阶段,你可以观看牌堆顶的四张牌,然后将其中的两张牌置于牌堆顶,并将其余的牌以任意顺序置于牌堆底。', - wangxi_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', - reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。', - fenwei_info:'限定技,当一名角色使用的锦囊牌指定了至少两名角色为目标时,你可以令此牌对其中任意名角色无效。', - chulao_info:'出牌阶段限一次,若你有牌,你可以选择任意名势力各不相同的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。', - reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之', - zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。', - qianxin_info:'觉醒技,当你造成一次伤害后,若你已受伤,你须减1点体力上限,并获得技能“荐言”。', - jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,并亮出牌库中第一张符合你声明的牌,然后你令一名男性角色获得此牌', - rekurou_info:'出牌阶段限一次,你可以弃置一张牌,然后失去1点体力。', - zhaxiang_info:'锁定技 每当你失去1点体力后,你摸三张牌。然后若此时是你的出牌阶段,则直到回合结束,你使用红色【杀】无距离限制且不能被【闪】响应,你可以额外使用一张【杀】。', - qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。', - reyicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', - refankui_info:'每当你受到1点伤害后,你可以获得伤害来源的一张牌。', - retieji_info:'当你使用【杀】指定一名角色为目标后,你可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。', - yijue_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,则直到回合结束,该角色不能使用或打出手牌且其非锁定技失效,若你没赢,你可令该角色回复一点体力。', - reyiji_info:'每当你受到1点伤害后,你可以摸两张牌。然后你可以在至多两名角色的武将牌旁边分别扣置至多两张手牌,这些角色的下个摸牌阶段开始时,该角色获得其武将牌旁的这些牌。', - rejianxiong_info:'每当你受到伤害后,你可以获得对你造成伤害的牌,然后摸一张牌。', - reyajiao_info:'每当你于回合外使用或打出一张手牌时,你可以亮出牌堆顶的一张牌,若此牌与你此次使用或打出的牌类别相同,你可以将之交给任意一名角色;若不同则你可以将之置入弃牌堆。', - retishen_info:'限定技,准备阶段开始时,你可以将体力回复至等同于你上回合结束时的体力值,然后你每以此法回复1点体力,便摸一张牌。', - reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的普通锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。', - relianying_info:'当你失去最后的手牌时,你可以令至多X名角色各摸一张牌(X为你此次失去的手牌数)。', - reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限为你的体力上限。', - refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或失去一点体力。', - qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色,每回合最多发动四次', - qinxue_info:'觉醒技,准备阶段开始时,若你的手牌数比体力值多3(人数不少于7时改为2)或更多,你须减一点体力上限并获得技能【攻心】', - retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。', - reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。', - reganglie_info:'每当你受到1点伤害后,可进行一次判定,若结果为红色,你对伤害来源造成1点伤害,若结果为黑色,你弃置其一张牌。', - botu:'博图', - botu_info:'回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。', - - xin_yuji:'界于吉', - re_zuoci:'界左慈', - "reguhuo":"蛊惑", - "reguhuo_info":"每名角色的回合限一次,你可以扣置一张手牌当一张基本牌或普通锦囊牌使用或打出。其他角色依次选择是否质疑。然后,你展示此牌。若有质疑的角色:若此牌为假,则此牌作废,且所有质疑者各摸一张牌;为真,则所有质疑角色须弃置一张牌或失去1点体力,并获得技能〖缠怨〗。", - "reguhuo_guess":"蛊惑", - "reguhuo_guess_info":"", - rechanyuan:"缠怨", - "rechanyuan_info":"锁定技,你不能质疑于吉,只要你的体力值不大于1,你失去你的武将技能。", - "reguhuo_respond":"蛊惑", - "reguhuo_respond_info":"", - "reguhuo_wuxie":"蛊惑", - "reguhuo_wuxie_info":"", - "reguhuo_phase":"蛊惑", - "reguhuo_phase_info":"", - rehuashen:'化身', - rehuashen_info:'游戏开始后,你随机获得三张未加入游戏的武将牌,选一张置于你面前并声明该武将牌的一项技能,你拥有该技能且同时将性别和势力属性变成与该武将相同直到该化身被替换。你的每个准备阶段和结束后,你可以选择一项:①弃置至多两张未展示的化身牌并重新获得等量化身牌;②更换所展示的化身牌或技能。(你不可声明限定技、觉醒技或主公技)。', - rexinsheng:'新生', - rexinsheng_info:'当你受到1点伤害后,你可以获得一张新的化身牌。', - re_zhurong:'界祝融', - re_menghuo:'界孟获', - re_dongzhuo:'界董卓', - re_sunjian:'手杀孙坚', - re_caopi:'界曹丕', - rejiuchi:'酒池', - rejiuchi_info:'你可以将一张黑桃手牌当做【酒】使用。锁定技,当你于回合内使用带有【酒】效果的【杀】造成伤害时,你令你的【崩坏】失效直到回合结束。', - repolu:'破虏', - repolu_info:'当你杀死一名角色/死亡时,你可以令任意名角色摸X+1张牌。(X为你此前发动过【破虏】的次数)', - rexingshang:'行殇', - rexingshang_info:'当其他角色死亡后,你可以选择一项:回复1点体力,或获得其所有牌。', - refangzhu:'放逐', - refangzhu_info:'当你受到伤害后,你可以令一名其他角色选择一项:摸X张牌并将武将牌翻面,或弃置X张牌并失去1点体力。(X为你已损失的体力值)', - relieren:'烈刃', - relieren_info:'当你使用【杀】指定目标后,你可以和目标角色进行拼点。若你赢,你获得其一张牌。若你没赢,你获得对方的拼点牌,其获得你的拼点牌。', - rezaiqi:'再起', - rezaiqi_info:'弃牌阶段结束时,你可以令至多X名角色选择一项:1.摸一张牌,2.令你回复1点体力(X为本回合进入弃牌堆的红色牌数)', - re_dengai:'界邓艾', - re_jiangwei:'界姜维', - re_caiwenji:'界蔡文姬', - re_baosanniang:'手杀鲍三娘', - retuntian:'屯田', - retiaoxin:'挑衅', - rebeige:'悲歌', - retuntian_info:'当你于回合外失去牌时,你可以进行一次判定。若判定结果为♥,你获得此判定牌。否则你将此牌置于你的武将牌上,称之为【田】。锁定技,你计算与其他角色的距离时-X(X为你武将牌上【田】的数目)', - retiaoxin_info:'出牌阶段限一次,你可以指定一名有牌的其他角色,该角色需对你使用一张【杀】,否则你弃置其一张牌。', - rebeige_info:'当有角色受到【杀】造成的伤害后,你可以弃一张牌,并令其进行一次判定,若判定结果为:♥该角色回复X点体力(X为伤害点数);♦︎该角色摸三张牌;♣伤害来源弃两张牌;♠伤害来源将其武将牌翻面', - re_liushan:'手杀刘禅', - re_sunben:'界孙笨', - re_zhangzhang:'界张昭张纮', - rehunzi:'魂姿', - rehunzi_info:'觉醒技,准备阶段,若你的体力值不大于2,你减1点体力上限,并获得技能〖英姿〗和〖英魂〗。', - rezhijian_info:'出牌阶段,你可以将手牌中的一张装备牌置于一名其他角色装备区里(不得替换原装备),然后摸一张牌。当你使用装备牌时,你可以摸一张牌。', - refangquan:'放权', - refangquan_info:'你可跳过你的出牌阶段,若如此做,你本回合的手牌上限为你的体力上限,且回合结束时,你可以弃置一张手牌并令一名其他角色进行一个额外的回合。', - re_wuguotai:'界吴国太', - re_gaoshun:'界高顺', - reganlu:'甘露', - reganlu_info:'出牌阶段限一次,你可以选择装备区牌数之差的绝对值不小于X的两名角色或包含你在内的两名角色,然后交换这两名角色装备区内的牌。(X为你已损失的体力值)', - repojun:'破军', - repojun2:'破军', - repojun3:'破军', - repojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上(X为其体力值),然后其于当前回合结束时获得这些牌。当你因执行【杀】的效果而对一名角色造成伤害时,若该角色的手牌数和装备区内的牌数均不大于你,则此伤害+1。', - rexianzhen:'陷阵', - rexianzhen_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你本回合内对其使用牌没有次数和距离限制。若你没赢,你本回合内不能使用【杀】。若你以此法失去的拼点牌为【杀】,则你的【杀】不计入本回合的手牌上限。', - rejinjiu:'禁酒', - rejinjiu_info:'锁定技,你的【酒】均视为【杀】。其他角色不能于你的回合内使用【酒】。当你受到酒【杀】的伤害时,你令此伤害-X(X为影响过此【杀】的伤害值的【酒】的数量)', - rejinjiu2:'禁酒', - rejinjiu3:'禁酒', - ol_xiahouyuan:'界夏侯渊', - shebian:'设变', - shebian_info:'当你的武将牌翻面后,你可以移动场上的一张装备牌。', - cangzhuo:'藏拙', - cangzhuo_info:'弃牌阶段开始时,若你本回合内没有使用过锦囊牌,则你的锦囊牌不计入手牌上限。', - re_zhangyi:'界张嶷', - rewurong:'怃戎', - rewurong_info:'出牌阶段限一次,你可以令一名其他角色与你同时展示一张手牌:若你展示的是【杀】且该角色展示的不是【闪】,则你对其造成1点伤害;若你展示的不是【杀】且该角色展示的是【闪】,则你获得其一张牌', - ol_pangtong:'界庞统', - olniepan:'涅槃', - olniepan_info:'限定技,当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。然后你选择获得以下技能中的一个:〖八阵〗/〖火计〗/〖看破〗', - ol_weiyan:'界魏延', - reqimou:'奇谋', - reqimou_info:'限定技,出牌阶段,你可以失去任意点体力并摸等量的牌,然后直到回合结束,你计算与其他角色的距离时-X,且你可以多使用X张【杀】(X为你失去的体力值)', - ol_xiaoqiao:'界小乔', - rehongyan:'红颜', - rehongyan_info:'锁定技,你区域内的黑桃牌和黑桃判定牌均视为红桃。当你于回合外正面朝上失去红桃牌后,若你的手牌数小于体力值,你摸一张牌。', - re_caozhi:'界曹植', - reluoying:'落英', - reluoying_discard:'落英', - reluoying_judge:'落英', - reluoying_info:'当其他角色的梅花牌因弃置或判定而进入弃牌堆时,你可以获得之。', - rejiushi:'酒诗', - rejiushi_info:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面并获得牌堆中的一张随机锦囊。', - rejiushi1:'酒诗', - rejiushi3:'酒诗', - rejiushi_mark:'酒诗·改', - rejiushi_mark_info:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面。当你翻面时,你获得牌堆中的一张随机锦囊。', - chengzhang:'成章', - chengzhang_info:'觉醒技,准备阶段开始时,若你造成伤害与受到伤害值之和累计7点或以上,则你回复1点体力并摸1张牌,然后改写〖酒诗〗。', - re_wuyi:'界吴懿', - re_zhuran:'界朱然', - re_quancong:'界全琮', - re_liaohua:'界廖化', - re_guohuai:'界郭淮', - re_chengpu:'界程普', - rechunlao:'醇醪', - rechunlao2:'醇醪', - rechunlao_info:'结束阶段开始时,若你没有“醇”,你可以将至少一张【杀】置于你的武将牌上,称为“醇”。当一名角色处于濒死状态时,你可以移去一张“醇”,视为该角色使用一张【酒】,然后若此“醇”的属性为:火,你回复1点体力、雷,你摸两张牌。', - re_caozhang:'界曹彰', - yujin_yujin:'界于禁', - rejieyue:'节钺', - rejieyue_info:'结束阶段开始时,你可以将一张牌交给一名其他角色。然后其选择一项:令你摸三张牌:或其保留一张手牌和装备区的牌,然后弃置其余的牌。', - re_lingtong:'界凌统', - rexuanfeng:'旋风', - rexuanfeng_info:'当你失去装备区内的牌时,或于弃牌阶段弃置了两张或更多的手牌后,你可以依次弃置一至两名其他角色的共计两张牌,或将一名其他角色装备区内的一张牌移动到另一名其他角色的装备区内。', - olpaoxiao:'咆哮', - olpaoxiao2:'咆哮', - olpaoxiao_info:'①锁定技,你使用【杀】无次数限制。②锁定技,当你使用的【杀】被【闪】抵消时,你获得一枚“咆”(→)当你因【杀】造成伤害时,你弃置所有“咆”并令伤害值+X(X为“咆”数)。回合结束后,你弃置所有“咆”。', - oltishen:'替身', - oltishen_info:'限定技,准备阶段,你可以将体力回复至上限,然后摸X张牌(X为你回复的体力值)。', - ollongdan:'龙胆', - ollongdan_info:'你可以将一张【杀】当做【闪】、【闪】当做【杀】、【酒】当做【桃】、【桃】当做【酒】使用或打出。', - olyajiao:'涯角', - olyajiao_info:'当你于回合外因使用或打出而失去手牌后,你可以展示牌堆顶的一张牌。若这两张牌的类别相同,你可以将展示的牌交给一名角色;若类别不同,你可弃置攻击范围内包含你的角色区域里的一张牌。', - re_zhonghui:'界钟会', - re_handang:'界韩当', - requanji:'权计', - requanji_info:'出牌阶段结束时,若你的手牌数大于体力值,或当你受到1点伤害后,你可以摸一张牌,然后将一张手牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', - regongji:'弓骑', - regongji_info:'出牌阶段限一次,你可以弃置一张非基本牌,然后弃置一名其他角色的一张牌。锁定技,当你的装备区内有坐骑牌时,你的攻击范围无限。', - ol_sunjian:'界孙坚', - wulie:'武烈', - wulie2:'武烈', - wulie_info:'限定技,结束阶段,你可以失去任意点体力并指定等量的角色。这些角色各获得一枚「烈」。有「烈」的角色受到伤害时,其移去一枚「烈」,然后防止此伤害。', - re_sunluban:'界孙鲁班', - re_masu:'界马谡', - ol_pangde:'界庞德', - rejianchu:'鞬出', - rejianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌不为基本牌,此【杀】不可被【闪】响应且你本回合使用【杀】的次数上限+1,为基本牌,该角色获得此【杀】', - re_taishici:'界太史慈', - hanzhan:'酣战', - hanzhan_info:'当你发起拼点时,或成为拼点的目标时,你可以令对方选择拼点牌的方式改为随机选择一张手牌。', - re_jianyong:'界简雍', - xin_xusheng:'界徐盛', - decadepojun:'破军', - decadepojun2:'破军', - decadepojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上。若这些牌中:有装备牌,你将这些牌中的一张置于弃牌堆;有锦囊牌,你摸一张牌。其于回合结束时获得其武将牌上的这些牌。', - - refresh_standard:'界限突破·标', - refresh_feng:'界限突破·风', - refresh_huo:'界限突破·火', - refresh_lin:'界限突破·林', - refresh_shan:'界限突破·山', - refresh_yijiang:'界限突破·将', - }, - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'refresh', + characterSort:{ + refresh:{ + refresh_standard:["re_caocao","re_simayi","re_guojia","re_lidian","re_zhangliao","re_xuzhu","re_xiahoudun","re_zhangfei","re_zhaoyun","re_guanyu","re_machao","re_xushu","re_zhouyu","re_lvmeng","re_ganning","re_luxun","re_daqiao","re_huanggai","re_lvbu","re_gongsunzan","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong"], + refresh_feng:['caoren','ol_xiahouyuan','re_huangzhong','ol_weiyan','ol_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji'], + refresh_huo:["ol_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","ol_pangtong","ol_yuanshao","ol_pangde","re_taishici"], + refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','ol_sunjian','re_caopi','re_xuhuang'], + refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce'], + refresh_yijiang1:['re_wuguotai','re_gaoshun','re_caozhi','yujin_yujin','re_lingtong','re_masu','xin_xusheng','xin_fazheng'], + refresh_yijiang2:['old_madai','wangyi','guanzhang','re_handang','re_zhonghui','re_liaohua','re_chengpu','re_caozhang'], + refresh_yijiang3:['re_jianyong','re_guohuai','re_zhuran'], + refresh_yijiang4:['re_sunluban','re_wuyi'], + refresh_yijiang5:['re_zhangyi','re_quancong'], + }, + }, + connect:true, + character:{ + xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo'],['die_audio']], + wangyi:['female','wei',3,['zhenlie','miji']], + old_madai:['male','shu',4,['mashu','qianxi']], + guanzhang:['male','shu',4,['fuhun']], + xin_xusheng:['male','wu',4,['decadepojun']], + re_taishici:['male','wu',4,['tianyi','hanzhan']], + re_masu:['male','shu',3,['resanyao','rezhiman']], + re_sunluban:['female','wu',3,['rechanhui','rejiaojin']],re_zhonghui:['male','wei',4,['requanji','zili']], + re_handang:['male','wu',4,['regongji','jiefan']], + re_lingtong:['male','wu',4,['rexuanfeng']], + yujin_yujin:['male','wei',4,['rejieyue']], + re_caozhang:['male','wei',4,['new_jiangchi']], + re_chengpu:['male','wu',4,['lihuo','rechunlao']], + re_quancong:['male','wu',4,['xinyaoming']], + re_liaohua:['male','shu',4,['xindangxian','xinfuli']], + re_guohuai:['male','wei',4,['xinjingce']], + re_wuyi:['male','shu',4,['xinbenxi']], + re_zhuran:['male','wu',4,['xindanshou']], + re_caozhi:['male','wei',3,['reluoying','rejiushi','chengzhang']], + ol_pangtong:['male','shu',3,['xinlianhuan','olniepan'],[]], + re_zhangyi:['male','shu',4,['rewurong','shizhi']], + re_wuguotai:['female','wu',3,['reganlu','buyi']], + re_gaoshun:['male','qun',4,['rexianzhen','rejinjiu']], + re_caocao:['male','wei',4,['new_rejianxiong','hujia'],['zhu']], + re_simayi:['male','wei',3,['refankui','reguicai']], + re_guojia:['male','wei',3,['tiandu','new_reyiji']], + re_lidian:['male','wei',3,['xunxun','wangxi']], + re_zhangliao:['male','wei',4,['new_retuxi']], + re_xuzhu:['male','wei',4,['new_reluoyi']], + re_xiahoudun:['male','wei',4,['reganglie','new_qingjian']], + re_zhangfei:['male','shu',4,['olpaoxiao','oltishen']], + re_zhaoyun:['male','shu',4,['ollongdan','olyajiao']], + re_guanyu:['male','shu',4,['new_rewusheng','new_yijue']], + re_machao:['male','shu',4,['mashu','retieji']], + re_xushu:['male','shu',4,['zhuhai','qianxin']], + re_zhouyu:['male','wu',3,['reyingzi','refanjian']], + re_lvmeng:['male','wu',4,['keji','qinxue','botu']], + re_ganning:['male','wu',4,['qixi','fenwei']], + re_luxun:['male','wu',3,['reqianxun','relianying']], + re_daqiao:['female','wu',3,['reguose','liuli']], + re_huanggai:['male','wu',4,['rekurou','zhaxiang']], + re_lvbu:['male','qun',5,['wushuang','new_liyu']], + re_gongsunzan:['male','qun',4,['qiaomeng','reyicong']], + re_huatuo:['male','qun',3,['jijiu','new_reqingnang']], + re_liubei:['male','shu',4,['rerende','jijiang'],['zhu']], + re_diaochan:['female','qun',3,['lijian','rebiyue']], + re_huangyueying:['female','shu',3,['rejizhi','reqicai']], + re_sunquan:['male','wu',4,['rezhiheng','rejiuyuan'],['zhu']], + re_sunshangxiang:['female','wu',3,['xiaoji','rejieyin']], + re_zhenji:['female','wei',3,['reluoshen','reqingguo']], + re_zhugeliang:['male','shu',3,['reguanxing','kongcheng']], + re_huaxiong:["male","qun",6,["reyaowu"]], + + re_zhangjiao:['male','qun',3,['xinleiji','xinguidao','huangtian'],['zhu']], + xin_yuji:['male','qun',3,['reguhuo']], + re_zuoci:['male','qun',3,['rehuashen','rexinsheng']], + + ol_xiahouyuan:['male','wei',4,['xinshensu','shebian']], + caoren:['male','wei',4,['xinjushou','xinjiewei']], + re_huangzhong:['male','shu',4,['xinliegong']], + ol_weiyan:['male','shu',4,['xinkuanggu','reqimou']], + ol_xiaoqiao:['female','wu',3,['retianxiang','rehongyan']], + zhoutai:['male','wu',4,['buqu','fenji']], + ol_pangde:['male','qun',4,['mashu','rejianchu']], + re_xuhuang:['male','wei',4,['duanliang','jiezi']], + ol_sp_zhugeliang:["male","shu",3,["bazhen","rehuoji","rekanpo","cangzhuo"],[]], + re_xunyu:["male","wei",3,["quhu","rejieming"],[]], + re_dianwei:["male","wei",4,["reqiangxi"],[]], + re_yanwen:["male","qun",4,["reshuangxiong"],[]], + ol_yuanshao:['male','qun',4,['olluanji','olxueyi'],['zhu']], + re_zhurong:['female','shu',4,['juxiang','relieren']], + re_menghuo:['male','shu',4,['huoshou','rezaiqi']], + re_dongzhuo:['male','qun',8,['rejiuchi','roulin','benghuai','baonue'],['zhu']], + ol_sunjian:['male','wu',4,['gzyinghun','wulie']], + re_caopi:['male','wei',3,['rexingshang','refangzhu','songwei'],['zhu']], + re_dengai:['male','wei',4,['retuntian','zaoxian']], + re_jiangwei:['male','shu',4,['retiaoxin','zhiji']], + re_caiwenji:['female','qun',3,['rebeige','duanchang']], + ol_liushan:['male','shu',3,['xiangle','olfangquan','olruoyu'],['zhu']], + re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], + + re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']], + re_jianyong:['male','shu',3,['reqiaoshui','jyzongshi']], + }, + characterIntro:{ + re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', + re_lidian:'字曼成,曹操麾下将领。李典深明大义,不与人争功,崇尚学习与高贵儒雅,尊重博学之士,在军中被称为长者。李典有长者之风,官至破虏将军,三十六岁去世。魏文帝曹丕继位后追谥号为愍侯。', + sunben:' ', + }, + characterFilter:{ + re_zuoci:function(mode){ + return mode!='guozhan'; + } + }, + perfectPair:{ + sunben:['zhouyu','taishici','daqiao'], + }, + skill:{ + decadepojun:{ + shaRelated:true, + audio:2, + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.hp>0&&event.target.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.choosePlayerCard(trigger.target,'he',[1,Math.min(trigger.target.hp,trigger.target.countCards('he'))],get.prompt('decadepojun',trigger.target)); + next.set('ai',function(button){ + if(!_status.event.goon) return 0; + var val=get.value(button.link); + if(button.link==_status.event.target.getEquip(2)) return 2*(val+3); + return val; + }); + next.set('goon',get.attitude(player,trigger.target)<=0); + next.set('forceAuto',true); + 'step 1' + if(result.bool){ + event.cards=result.cards; + var target=trigger.target; + player.logSkill('decadepojun',trigger.target); + target.addSkill('decadepojun2'); + target.markAuto('decadepojun2',result.cards); + target.lose(result.cards,ui.special,'toStorage'); + game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌');; + } + else event.finish(); + 'step 2' + var discard=false,draw=false; + for(var i of cards){ + var type=get.type2(i); + if(type=='equip') discard=true; + if(type=='trick') draw=true; + } + if(discard){ + event.equip=true; + player.chooseButton(['选择一张牌置入弃牌堆',cards],true).set('ai',function(button){ + return get.value(button.link,_status.event.getTrigger().target); + }); + } + if(draw) event.draw=true; + 'step 3' + if(event.equip&&result.links&&result.links.length){ + trigger.target.unmarkAuto('decadepojun2',result.links); + trigger.target.$throw(result.links,1000); + game.log(player,'将',result.links,'置入了弃牌堆'); + game.cardsDiscard(result.links); + if(!event.draw) game.delayx(); + } + if(event.draw) player.draw(); + }, + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; + return false; + } + }, + }, + decadepojun2:{ + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return player.storage.decadepojun2&&player.storage.decadepojun2.length>0; + }, + content:function(){ + game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.decadepojun2,'draw','fromStorage').cards.length)+'张〖破军〗牌'); + player.storage.decadepojun2.length=0; + player.removeSkill('decadepojun2'); + }, + intro:{ + onunmark:'throw', + content:'cardCount', + }, + }, + hanzhan:{ + audio:2, + trigger:{ + global:'chooseToCompareBegin', + }, + filter:function(event,player){ + if(player==event.player) return true; + if(event.targets) return event.targets.contains(player); + return player==event.target; + }, + logTarget:function(event,player){ + if(player!=event.player) return event.player; + return event.targets||event.target; + }, + check:function(trigger,player){ + var num=0; + var targets=player==trigger.player?(trigger.targets?trigger.targets.slice(0):[trigger.target]):[trigger.player]; + while(targets.length){ + var target=targets.shift(); + if(target.getCards('h').length>1) num-=get.attitude(player,target); + } + return num>0; + }, + content:function(){ + var targets=player==trigger.player?(trigger.targets?trigger.targets.slice(0):[trigger.target]):[trigger.player]; + if(!trigger.fixedResult) trigger.fixedResult={}; + while(targets.length){ + var target=targets.shift(); + var hs=target.getCards('h'); + if(hs.length) trigger.fixedResult[target.playerid]=hs.randomGet(); + } + }, + }, + rejianchu:{ + shaRelated:true, + audio:2, + audioname:['re_pangde'], + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countDiscardableCards(player,'he')>0; + }, + direct:true, + content:function(){ + 'step 0' + player.discardPlayerCard(trigger.target,get.prompt('rejianchu',trigger.target)).set('ai',function(button){ + if(!_status.event.att) return 0; + if(get.position(button.link)=='e'){ + if(get.subtype(button.link)=='equip2') return 2*get.value(button.link); + return get.value(button.link); + } + return 1; + }).set('logSkill',['rejianchu',trigger.target]).set('att',get.attitude(player,trigger.target)<=0); + 'step 1' + if(result.bool&&result.links&&result.links.length){ + if(get.type(result.links[0],null,result.links[0].original=='h'?player:false)!='basic'){ + trigger.getParent().directHit.add(trigger.target); + player.addTempSkill('rejianchu2'); + player.addMark('rejianchu2',1,false); + } + else if(trigger.cards){ + var list=[]; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.hp],get.prompt2('wulie'),lib.filter.notMe).set('ai',function(){return 0}); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.logSkill('wulie',targets); + player.awakenSkill('wulie'); + player.loseHp(targets.length); + while(targets.length){ + targets[0].addSkill('wulie2'); + targets.shift().addMark('wulie2'); + } + } + }, + }, + wulie2:{ + marktext:'烈', + intro:{name2:'烈',content:'mark'}, + trigger:{player:'damageBegin3'}, + forced:true, + content:function(){ + trigger.cancel(); + player.removeMark('wulie2',1); + if(!player.storage.wulie2) player.removeSkill('wulie2'); + }, + }, + regongji:{ + mod:{ + attackFrom:function(player){ + if(player.getEquip(3)||player.getEquip(4)||player.getEquip(6)) return -Infinity + }, + }, + enable:'phaseUse', + usable:1, + position:'he', + filter:function(event,player){ + return player.countCards('he',function(card){ + return lib.skill.regongji.filterCard(card,player); + })>0; + }, + filterCard:function(card,player){ + return get.type(card,player)!='basic'; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countDiscardableCards(player,'he')>0; + }, + check:function(card){ + return 4.5-get.value(card); + }, + content:function(){ + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + var nh=target.countCards('h'); + if(att>0){ + if(target.getEquip('baiyin')&&target.isDamaged()&& + get.recoverEffect(target,player,player)>0){ + if(target.hp==1&&!target.hujia) return 1.6; + if(target.hp==2) return 0.01; + return 0; + } + } + var es=target.getCards('e'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name!='tengjia'&&get.value(es[0])<=0); + var noh=(nh==0||target.hasSkillTag('noh')); + if(noh&&(noe||noe2)) return 0; + if(att<=0&&!target.countCards('he')) return 1.5; + return -1.5; + }, + }, + tag:{ + loseCard:1, + discard:1 + }, + }, + }, + requanji:{ + audio:2, + trigger:{player:['damageEnd','phaseUseEnd']}, + frequent:true, + locked:false, + notemp:true, + init:function(player){ + if(!player.storage.quanji) player.storage.quanji=[]; + }, + filter:function(event,player){ + if(event.name=='phaseUse') return player.countCards('h')>player.hp; + return event.num>0; + }, + content:function(){ + "step 0" + event.count=trigger.num||1; + "step 1" + event.count--; + player.draw(); + "step 2" + if(player.countCards('h')){ + player.chooseCard('将一张手牌置于武将牌上作为“权”',true); + } + else{ + event.goto(4); + } + "step 3" + if(result.cards&&result.cards.length){ + player.lose(result.cards,ui.special,'toStorage'); + player.storage.quanji=player.storage.quanji.concat(result.cards); + player.syncStorage('quanji'); + player.markSkill('quanji'); + game.log(player,'将',result.cards,'置于武将牌上作为“权”'); + } + "step 4" + if(event.count>0){ + player.chooseBool(get.prompt2('requanji')).set('frequentSkill','requanji'); + } + else event.finish(); + "step 5" + if(result.bool){ + player.logSkill('requanji'); + event.goto(1); + } + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.quanji.length; + } + }, + ai:{ + maixie:true, + maixie_hp:true, + threaten:0.8, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; + if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + ollongdan:{ + audio:'longdan_sha', + audioname:['re_zhaoyun'], + enable:['chooseToUse','chooseToRespond'], + prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出', + viewAs:function(cards,player){ + var name=false; + switch(get.name(cards[0],player)){ + case 'sha':name='shan';break; + case 'shan':name='sha';break; + case 'tao':name='jiu';break; + case 'jiu':name='tao';break; + } + if(name) return {name:name}; + return null; + }, + check:function(card){ + var player=_status.event.player; + if(_status.event.type=='phase'){ + var max=0; + var name2; + var list=['sha','tao','jiu']; + var map={sha:'shan',tao:'jiu',jiu:'tao'} + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.name(card,player)) return 1; + return 0; + } + return 1; + }, + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.name(card,player); + if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true; + if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true; + if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true; + if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true; + return false; + }, + filter:function(event,player){ + var filter=event.filterCard; + if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; + if(filter({name:'jiu'},player,event)&&player.countCards('h','tao')) return true; + return false; + }, + ai:{ + respondSha:true, + respondShan:true, + save:true, + skillTagFilter:function(player,tag){ + var name; + switch(tag){ + case 'respondSha':name='shan';break; + case 'respondShan':name='sha';break; + case 'save':name='jiu';break; + } + if(!player.countCards('h',name)) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao','jiu']; + var map={sha:'shan',tao:'jiu',jiu:'tao'} + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max) max=temp; + } + } + if(max>0) max+=0.3; + return max; + } + return 4; + }, + }, + }, + olyajiao:{ + audio:'reyajiao', + trigger:{player:'loseAfter'}, + frequent:true, + filter:function(event,player){ + return player!=_status.currentPhase&&event.hs&&event.hs.length>0&&['useCard','respond'].contains(event.getParent().name); + }, + content:function(){ + "step 0" + event.card=get.cards()[0]; + game.cardsGotoOrdering(event.card); + event.videoId=lib.status.videoId++; + var judgestr=get.translation(player)+'发动了【涯角】'; + game.addVideo('judge1',player,[get.cardInfo(event.card),judgestr,event.videoId]); + game.broadcastAll(function(player,card,str,id,cardid){ + var event; + if(game.online){ + event={}; + } + else{ + event=_status.event; + } + if(game.chess){ + event.node=card.copy('thrown','center',ui.arena).animate('start'); + } + else{ + event.node=player.$throwordered(card.copy(),true); + } + if(lib.cardOL) lib.cardOL[cardid]=event.node; + event.node.cardid=cardid; + event.node.classList.add('thrownhighlight'); + ui.arena.classList.add('thrownhighlight'); + event.dialog=ui.create.dialog(str); + event.dialog.classList.add('center'); + event.dialog.videoId=id; + },player,event.card,judgestr,event.videoId,get.id()); + + game.log(player,'展示了',event.card); + game.delay(2); + if(get.type(event.card,'trick')==get.type(trigger.getParent().card,'trick')){ + player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0; + return -att; + } + if(att>0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du'); + } + else{ + event.disbool=true; + player.chooseTarget('是否弃置攻击范围内包含你的一名角色区域内的一张牌?',function(card,player,target){ + return target.inRange(player)&&target.countDiscardableCards(player,'hej')>0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe'},player,player); + }); + } + "step 1" + if(event.disbool){ + if(result.bool){ + player.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],'hej',true); + } + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(id,card){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + if(card.clone){ + card.clone.delete(); + } + ui.arena.classList.remove('thrownhighlight'); + },event.videoId,event.card); + ui.arena.classList.remove('thrownhighlight'); + } + else if(result.targets){ + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'log'); + event.node.moveDelete(result.targets[0]); + game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); + ui.arena.classList.remove('thrownhighlight'); + game.broadcast(function(card,target,id){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.moveDelete(target); + } + },event.card,result.targets[0],event.videoId); + } + else{ + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(id){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + if(card.clone){ + card.clone.delete(); + } + ui.arena.classList.remove('thrownhighlight'); + },event.videoId,event.card); + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + ui.arena.classList.remove('thrownhighlight'); + } + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; + } + } + } + }, + olpaoxiao:{ + audio:"paoxiao", + audioname:['re_zhangfei','guanzhang','xiahouba'], + trigger:{player:'shaMiss'}, + forced:true, + content:function(){ + player.addTempSkill('olpaoxiao2'); + player.addMark('olpaoxiao2',1,false); + }, + mod:{ + cardUsable:function (card,player,num){ + if(card.name=='sha') return Infinity; + }, + }, + }, + olpaoxiao2:{ + trigger:{source:'damageBegin1'}, + forced:true, + audio:'paoxiao', + audioname:['re_zhangfei','guanzhang','xiahouba'], + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0; + }, + onremove:true, + content:function(){ + trigger.num+=player.countMark('olpaoxiao2'); + player.removeSkill('olpaoxiao2'); + }, + intro:{content:'本回合内下一次使用【杀】造成伤害时令伤害值+#'}, + }, + oltishen:{ + audio:'retishen', + unique:true, + mark:true, + skillAnimation:true, + animationColor:'soil', + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(player.storage.oltishen) return false; + return player.isDamaged(); + }, + check:function(event,player){ + if(player.hp<=2||player.getDamagedHp()>2) return true; + if(player.getDamagedHp()<=1) return false; + return player.getDamagedHp()0; + })) return false; + if(event.name=='phaseDiscard'){ + var cards=[]; + player.getHistory('lose',function(evt){ + if(evt&&evt.getParent('phaseDiscard')==event&&evt.hs) cards.addArray(evt.hs); + }); + return cards.length>1; + } + else return event.es&&event.es.length>0; + }, + content:function(){ + 'step 0' + var list=['弃置至多两名其他角色的合计两张牌']; + if(lib.skill.rexuanfeng.canMoveCard(player)) list.push('将一名其他角色装备区内的一张牌移动到另一名角色的装备区内'); + player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('rexuanfeng')).set('ai',function(){ + if(lib.skill.rexuanfeng.canMoveCard(player,true)) return 1; + return 0; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('rexuanfeng'); + if(result.index==1) event.goto(5); + else event.count=2; + } + else event.finish(); + 'step 2' + player.chooseTarget('弃置一名其他角色的一张牌',function(card,player,target){ + if(player==target) return false; + return target.countDiscardableCards(player,'he'); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + 'step 3' + if(result.bool){ + player.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],'he',true); + event.count--; + } + else event.finish(); + 'step 4' + if(event.count) event.goto(2); + else event.finish(); + 'step 5' + var next=player.chooseTarget(2,function(card,player,target){ + if(player==target) return false; + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + if(target.isMin()) return false; + var es=from.getCards('e'); + for(var i=0;i0; + } + }); + next.set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + var sgnatt=get.sgn(att); + if(ui.selected.targets.length==0){ + if(att>0){ + if(target.countCards('e',function(card){ + return get.value(card,target)<0&&game.hasPlayer(function(current){ + return current!=player&¤t!=target&&get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) + }); + })>0) return 9; + } + else if(att<0){ + if(game.hasPlayer(function(current){ + if(current!=target&¤t!=player&&get.attitude(player,current)>0){ + var es=target.getCards('e'); + for(var i=0;i0&¤t.isEmpty(get.subtype(es[i]))&&get.value(es[i],current)>0) return true; + } + } + })){ + return -att; + } + } + return 0; + } + var es=ui.selected.targets[0].getCards('e'); + var i; + var att2=get.sgn(get.attitude(player,ui.selected.targets[0])); + for(i=0;iget.attitude(player,targets1)){ + if(get.value(button.link,targets0)<0) return 10; + return 0; + } + else{ + return get.equipValue(button.link); + } + },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ + var targets1=_status.event.targets1; + return targets1.isEmpty(get.subtype(button.link)); + }); + } + else{ + event.finish(); + } + 'step 9' + if(result.bool&&result.links.length){ + var link=result.links[0]; + event.targets[1].equip(link); + event.targets[0].$give(link,event.targets[1]) + game.delay(); + event.result={bool:true}; + } + }, + canMoveCard:function(player,withatt){ + return game.hasPlayer(function(current){ + if(player==current) return false; + var att=get.sgn(get.attitude(player,current)); + if(!withatt||att!=0){ + var es=current.getCards('e'); + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt2('rejieyue'), + filterCard:true, + position:'he', + filterTarget:lib.filter.notMe, + ai1:function(card){ + var player=_status.event.player; + if(get.name(card)=='du') return 20; + if(get.position(card)=='e'&&get.value(card)<=0) return 14; + if(get.position(card)=='h'&&game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0&¤t.getUseValue(card)>player.getUseValue(card)&¤t.getUseValue(card)>player.getUseValue(card); + })) return 12; + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })){ + if(card.name=='wuxie') return 11; + if(card.name=='shan'&&player.countCards('h','shan')>1) return 9 + } + return 6/Math.max(1,get.value(card)); + }, + ai2:function(target){ + var player=_status.event.player; + var card=ui.selected.cards[0]; + var att=get.attitude(player,target); + if(card.name=='du') return -6*att; + if(att>0){ + if(get.position(card)=='h'&&target.getUseValue(card)>player.getUseValue(card)) return 4*att; + if(get.value(card,target)>get.value(card,player)) return 2*att; + return 1.2*att; + } + return -att*Math.min(4,target.countCards('he'))/4; + }, + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('rejieyue',target); + target.gain(result.cards,player,'giveAuto'); + } + else event.finish(); + 'step 2' + var num=0; + if(target.countCards('h')) num++; + if(target.countCards('e')) num++; + if(num>0){ + var next=target.chooseCard('he',num,'选择保留每个区域的各一张牌,然后弃置其余的牌。或点取消,令'+get.translation(player)+'摸三张牌',function(card){ + for(var i=0;i=0); + next.set('maxNum',num); + next.set('ai',function(card){ + if(_status.event.goon) return -1; + var num=_status.event.maxNum; + if(ui.selected.cards.length>=num-1){ + var val=get.value(player.getCards('he',function(cardx){ + return cardx!=card&&!ui.selected.cards.contains(cardx); + })); + if(val>=14) return 0; + } + return get.value(card); + }); + } + else event._result={bool:false}; + 'step 3' + if(!result.bool) player.draw(3); + else { + var cards=target.getCards('he'); + cards.removeArray(result.cards); + if(cards.length) target.discard(cards); + } + }, + ai:{ + threaten:1.3, + expose:0.2, + }, + }, + rechunlao:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0&&(_status.connectMode||player.countCards('h','sha')>0)&&!player.storage.rechunlao.length; + }, + init:function(player){ + if(!player.storage.rechunlao) player.storage.rechunlao=[]; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + content:function(){ + 'step 0' + player.chooseCard([1,Math.max(1,player.countCards('h','sha'))],get.prompt('rechunlao'),{name:'sha'}).set('ai',function(){ + return 1; + }); + 'step 1' + if(result.bool){ + player.logSkill('rechunlao'); + player.storage.rechunlao=player.storage.rechunlao.concat(result.cards); + player.syncStorage('rechunlao'); + player.markSkill('rechunlao'); + player.lose(result.cards,ui.special,'toStorage'); + player.$give(result.cards,player,false); + } + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(_status.currentPhase!=player) return; + if(card.name=='sha'&&!player.needsToDiscard()&& + !player.storage.rechunlao.length&&target.hp>1){ + return 'zeroplayertarget'; + } + } + }, + threaten:1.4 + }, + group:'rechunlao2' + }, + rechunlao2:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&event.dying&&event.dying.hp<=0&&player.storage.rechunlao.length>0; + }, + filterTarget:function(card,player,target){ + return target==_status.event.dying; + }, + direct:true, + delay:false, + selectTarget:-1, + content:function(){ + "step 0" + player.chooseCardButton(get.translation('rechunlao'),player.storage.rechunlao,true); + "step 1" + if(result.bool){ + player.logSkill('rechunlao'); + player.$throw(result.links); + player.storage.rechunlao.remove(result.links[0]); + game.cardsDiscard(result.links[0]); + player.syncStorage('rechunlao') + event.type='dying'; + target.useCard({name:'jiu',isCard:true},target); + if(!player.storage.rechunlao.length){ + player.unmarkSkill('rechunlao'); + } + else{ + player.markSkill('rechunlao'); + } + var nature=get.nature(result.links[0]); + if(nature=='fire') player.recover(); + if(nature=='thunder') player.draw(2); + } + }, + ai:{ + order:6, + skillTagFilter:function(player){ + return player.storage.rechunlao.length>0; + }, + save:true, + result:{ + target:3 + }, + threaten:1.6 + }, + }, + reluoying:{ + audio:2, + group:['reluoying_discard','reluoying_judge'], + subfrequent:['judge'], + subSkill:{ + discard:{ + audio:'reluoying', + trigger:{global:'loseAfter'}, + filter:function(event,player){ + if(event.type!='discard') return false; + if(event.player==player) return false; + for(var i=0;i=7) return true; + player.getAllHistory('damage',function(evt){ + num+=evt.num; + }); + return num>7; + }, + content:function(){ + player.markSkill('rejiushi_mark'); + player.awakenSkill('chengzhang'); + player.storage.chengzhang=true; + player.recover(); + player.draw(); + }, + }, + rejiushi:{ + audio:2, + group:['rejiushi1','rejiushi2','rejiushi3','rejiushi_gain'], + subfrequent:['gain'], + subSkill:{ + gain:{ + audio:'rejiushi', + trigger:{player:'turnOverAfter'}, + frequent:true, + filter:function(event,player){ + return player.storage.chengzhang==true; + }, + prompt:'是否发动【酒诗】,获得牌堆中的一张锦囊牌?', + content:function(){ + var card=get.cardPile2(function(card){ + return get.type2(card)=='trick'; + }); + if(card) player.gain(card,'gain2','log'); + }, + }, + }, + }, + rejiushi1:{ + audio:'rejiushi', + enable:'chooseToUse', + filter:function(event,player){ + if(player.classList.contains('turnedover')) return false; + return event.filterCard({name:'jiu',isCard:true},player,event); + }, + content:function(){ + if(_status.event.getParent(2).type=='dying'){ + event.dying=player; + event.type='dying'; + } + player.turnOver(); + player.useCard({name:'jiu',isCard:true},player); + }, + ai:{ + save:true, + skillTagFilter:function(player){ + return player.hp<=0&&!player.isTurnedOver(); + }, + order:5, + result:{ + player:function(player){ + if(_status.event.parent.name=='phaseUse'){ + if(player.countCards('h','jiu')>0) return 0; + if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; + if(!player.countCards('h','sha')) return 0; + var targets=[]; + var target; + var players=game.filterPlayer(); + for(var i=0;inum){ + target=targets[i]; + num=num2; + } + } + if(num<=0) return 0; + var e2=target.getEquip(2); + if(e2){ + if(e2.name=='tengjia'){ + if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; + } + if(e2.name=='renwang'){ + if(!player.countCards('h',{name:'sha',color:'red'})) return 0; + } + if(e2.name=='baiyin') return 0; + } + if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; + return target.countCards('h')>3?0:1; + } + if(player==_status.event.dying||player.isTurnedOver()) return 3; + } + }, + effect:{ + target:function(card,player,target){ + if(card.name=='guiyoujie') return [0,0.5]; + if(target.isTurnedOver()){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(target.hp==1) return; + return [1,target.countCards('h')/2]; + } + } + } + } + }, + }, + rejiushi2:{ + trigger:{player:'damageBegin3'}, + silent:true, + firstDo:true, + filter:function(event,player){ + return player.classList.contains('turnedover'); + }, + content:function(){ + trigger.rejiushi=true; + } + }, + rejiushi3:{ + audio:'rejiushi', + trigger:{player:'damageEnd'}, + check:function(event,player){ + return player.isTurnedOver(); + }, + filter:function(event,player){ + if(event.rejiushi){ + return true; + } + return false; + }, + prompt:function(event,player){ + var str='是否发动【酒诗】,将武将牌翻面'; + if(!player.storage.chengzhang) str+=',并获得牌堆中的一张锦囊牌'; + str+='?' + return str; + }, + content:function(){ + delete trigger.rejiushi; + player.turnOver(); + if(!player.storage.chengzhang){ + var card=get.cardPile2(function(card){ + return get.type2(card)=='trick'; + }); + if(card) player.gain(card,'gain2','log'); + } + } + }, + rejiushi_mark:{ + mark:true, + marktext:'改', + intro:{ + content:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面。当你翻面时,你获得牌堆中的一张随机锦囊。', + }, + }, + rehongyan:{ + audio:2, + mod:{ + suit:function(card,suit){ + if(suit=='spade') return 'heart'; + } + }, + trigger:{player:'loseEnd'}, + filter:function(event,player){ + if(player==_status.currentPhase||!event.visible||player.hp<=player.countCards('h')) return false; + for(var i=0;i=4&&shas.length>=3){ + num=3; + } + else if(player.hp>=3&&shas.length>=2){ + num=2; + } + else{ + num=1 + } + var map={}; + var list=[]; + for(var i=1;i<=player.hp;i++){ + var cn=get.cnNumber(i,true); + map[cn]=i; + list.push(cn); + } + event.map=map; + player.awakenSkill('reqimou'); + player.storage.reqimou=true; + player.chooseControl(list,function(){ + return get.cnNumber(_status.event.goon,true); + }).set('prompt','失去任意点体力').set('goon',num); + 'step 1' + var num=event.map[result.control]||1; + player.storage.reqimou2=num; + player.loseHp(num); + player.draw(num); + player.addTempSkill('reqimou2'); + }, + ai:{ + order:2, + result:{ + player:function(player){ + if(player.hp==1) return 0; + var shas=player.getCards('h','sha'); + if(!shas.length) return 0; + var card=shas[0]; + if(!lib.filter.cardEnabled(card,player)) return 0; + if(lib.filter.cardUsable(card,player)) return 0; + var mindist; + if(player.hp>=4&&shas.length>=3){ + mindist=4; + } + else if(player.hp>=3&&shas.length>=2){ + mindist=3; + } + else{ + mindist=2; + } + if(game.hasPlayer(function(current){ + return (current.hp<=mindist-1&& + get.distance(player,current,'attack')<=mindist&& + player.canUse(card,current,false)&& + get.effect(current,card,player,player)>0); + })){ + return 1; + } + return 0; + } + } + } + }, + reqimou2:{ + onremove:true, + mod:{ + cardUsable:function(card,player,num){ + if(typeof player.storage.reqimou2=='number'&&card.name=='sha'){ + return num+player.storage.reqimou2; + } + }, + globalFrom:function(from,to,distance){ + if(typeof from.storage.reqimou2=='number'){ + return distance-from.storage.reqimou2; + } + } + } + }, + olniepan:{ + audio:2, + unique:true, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationStr:'涅盘', + limited:true, + animationColor:'orange', + init:function(player){ + player.storage.olniepan=false; + }, + filter:function(event,player){ + if(player.storage.olniepan) return false; + if(event.type=='dying'){ + if(player!=event.dying) return false; + return true; + } + return false; + }, + content:function(){ + 'step 0' + player.awakenSkill('olniepan'); + player.storage.olniepan=true; + player.discard(player.getCards('hej')); + 'step 1' + player.link(false); + 'step 2' + player.turnOver(false); + 'step 3' + player.draw(3); + 'step 4' + if(player.hp<3){ + player.recover(3-player.hp); + } + 'step 5' + player.chooseControl('bazhen','rehuoji','rekanpo').set('prompt','选择获得一个技能').ai=function(){ + return ['rehuoji','bazhen'].randomGet(); + }; + 'step 6' + player.addSkillLog(result.control); + }, + ai:{ + order:1, + skillTagFilter:function(player){ + if(player.storage.olniepan) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:function(player){ + if(player.hp<=0) return 10; + if(player.hp<=2&&player.countCards('he')<=1) return 10; + return 0; + } + }, + threaten:function(player,target){ + if(!target.storage.olniepan) return 0.6; + } + }, + intro:{ + content:'limited' + } + }, + rewurong:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + "step 1" + var sendback=function(){ + if(_status.event!=event){ + return function(){ + event.resultOL=_status.event.resultOL; + }; + } + }; + if(player.isOnline()){ + player.wait(sendback); + event.ol=true; + player.send(function(){ + game.me.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + game.resume(); + }); + } + else{ + event.localPlayer=true; + player.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + } + if(target.isOnline()){ + target.wait(sendback); + event.ol=true; + target.send(function(){ + var rand=Math.random()<0.4; + game.me.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + game.resume(); + }); + } + else{ + event.localTarget=true; + } + "step 2" + if(event.localPlayer){ + event.card1=result.cards[0]; + } + if(event.localTarget){ + var rand=Math.random()<0.4; + target.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + } + "step 3" + if(event.localTarget){ + event.card2=result.cards[0]; + } + if(!event.resultOL&&event.ol){ + game.pause(); + } + "step 4" + try{ + if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; + if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; + if(!event.card1||!event.card2){ + throw('err'); + } + } + catch(e){ + console.log(e); + event.finish(); + return; + } + if(event.card2.number>=10||event.card2.number<=4){ + if(target.countCards('h')>2){ + event.addToAI=true; + } + } + game.broadcastAll(function(card1,card2){ + card1.classList.remove('glow'); + card2.classList.remove('glow'); + },event.card1,event.card2); + "step 5" + game.broadcastAll(function(){ + ui.arena.classList.add('thrownhighlight'); + }); + game.addVideo('thrownhighlight1'); + player.$compare(event.card1,target,event.card2); + game.delay(4); + "step 6" + game.log(player,'展示了',event.card1); + game.log(target,'展示了',event.card2); + var name1=get.name(event.card1); + var name2=get.name(event.card2); + if(name1=='sha'&&name2!='shan'){ + //player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + target.damage('nocard'); + } + else if(name1!='sha'&&name2=='shan'){ + //player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + player.gainPlayerCard(target,true,'he'); + } + else{ + player.$gain2(event.card1); + target.$gain2(event.card2); + } + game.broadcastAll(function(){ + ui.arena.classList.remove('thrownhighlight'); + }); + game.addVideo('thrownhighlight2'); + }, + ai:{ + order:6, + result:{ + target:-1, + } + } + }, + cangzhuo:{ + trigger:{player:'phaseDiscardBegin'}, + frequent:true, + audio:2, + filter:function(event,player){ + return player.getHistory('useCard',function(card){ + return get.type(card.card,'trick')=='trick'; + }).length==0; + }, + content:function(){ + player.addTempSkill('cangzhuo2'); + }, + }, + cangzhuo2:{ + mod:{ + ignoredHandcard:function(card,player){ + if(get.type(card,'trick')=='trick'){ + return true; + } + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&get.type(card,'trick')=='trick') return false; + } + }, + }, + shebian:{ + trigger:{player:'turnOverEnd'}, + check:function(event,player){ + return player.canMoveCard(true,true); + }, + filter:function(event,player){ + return player.canMoveCard(null,true); + }, + content:function(){ + player.moveCard().nojudge=true; + }, + }, + rexianzhen:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.player&&get.name(result.player.name,player)=='sha') player.addTempSkill('rexianzhen4'); + if(result.bool){ + player.storage[event.name]=target; + player.addTempSkill(event.name+2); + } + else{ + player.addTempSkill(event.name+3); + } + }, + ai:{ + order:function(name,player){ + var cards=player.getCards('h'); + if(player.countCards('h','sha')==0){ + return 1; + } + for(var i=0;i11&&get.value(cards[i])<7){ + return 9; + } + } + return get.order({name:'sha'})-1; + }, + result:{ + player:function(player){ + if(player.countCards('h','sha')>0) return 0; + var num=player.countCards('h'); + if(num>player.hp) return 0; + if(num==1) return -2; + if(num==2) return -1; + return -0.7; + }, + target:function(player,target){ + var num=target.countCards('h'); + if(num==1) return -1; + if(num==2) return -0.7; + return -0.5 + }, + }, + threaten:1.3 + } + }, + rexianzhen2:{ + charlotte:true, + mod:{ + targetInRange:function(card,player,target){ + if(target==player.storage.rexianzhen) return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha'&&typeof num=='number') return num+100; + }, + playerEnabled:function(card,player,target){ + if(card.name=='sha'&&player.storage.rexianzhen!=target&&!ui.selected.targets.contains(player.storage.rexianzhen)){ + var num=player.getCardUsable(card)-100; + if(num<=0) return false; + } + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(arg.target!=player.storage.rexianzhen) return false; + }, + } + }, + rexianzhen3:{ + charlotte:true, + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + rexianzhen4:{ + mod:{ + ignoredHandcard:function(card,player){ + if(get.name(card)=='sha'){ + return true; + } + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&get.name(card)=='sha'){ + return false; + } + }, + }, + }, + rejinjiu:{ + mod:{ + cardname:function(card,player){ + if(card.name=='jiu') return 'sha'; + }, + }, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h','jiu')) return false; + }, + respondSha:true, + }, + audio:2, + trigger:{player:['useCard1','respond']}, + firstDo:true, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.skill&& + event.cards.length==1&&event.cards[0].name=='jiu'; + }, + content:function(){}, + group:'rejinjiu2', + global:'rejinjiu3', + }, + rejinjiu3:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('rejinjiu')) return false; + }, + cardSavable:function(card,player){ + if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('rejinjiu')) return false; + }, + }, + }, + rejinjiu2:{ + audio:'rejinjiu', + forced:true, + trigger:{player:'damageBegin3'}, + filter:function(event,player){ + return event.getParent(2).jiu==true; + }, + content:function(){ + trigger.num-=trigger.getParent(2).jiu_add; + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.jiu==true; + }, + }, + }, + repojun:{ + shaRelated:true, + audio:2, + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.hp>0&&event.target.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.choosePlayerCard(trigger.target,'he',[1,Math.min(trigger.target.hp,trigger.target.countCards('he'))],get.prompt('repojun',trigger.target)); + next.set('ai',function(button){ + if(!_status.event.goon) return 0; + var val=get.value(button.link); + if(button.link==_status.event.target.getEquip(2)) return 2*(val+3); + return val; + }); + next.set('goon',get.attitude(player,trigger.target)<=0); + next.set('forceAuto',true); + 'step 1' + if(result.bool){ + var target=trigger.target; + player.logSkill('repojun',trigger.target); + target.addSkill('repojun2'); + target.storage.repojun2.addArray(result.cards); + target.lose(result.cards,ui.special,'toStorage'); + game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌'); + target.markSkill('repojun2'); + } + }, + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; + return false; + } + }, + group:'repojun3', + }, + repojun3:{ + audio:'repojun', + trigger:{source:'damageBegin1'}, + forced:true, + locked:false, + logTarget:'player', + filter:function(event,player){ + var target=event.player; + return event.getParent().name=='sha'&&player.countCards('h')>=target.countCards('h')&&player.countCards('e')>=target.countCards('e'); + }, + content:function(){ + trigger.num++; + }, + }, + repojun2:{ + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return player.storage.repojun2&&player.storage.repojun2.length>0; + }, + content:function(){ + game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.repojun2,'draw','fromStorage').cards.length)+'张〖破军〗牌'); + player.storage.repojun2.length=0; + player.removeSkill('repojun2'); + }, + intro:{ + onunmark:'throw', + content:'cardCount', + }, + }, + reganlu:{ + enable:'phaseUse', + usable:1, + audio:2, + selectTarget:2, + delay:0, + filterTarget:function(card,player,target){ + if(target.isMin()) return false; + if(ui.selected.targets.length==0) return true; + if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; + return target==player||ui.selected.targets[0]==player||Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; + }, + multitarget:true, + multiline:true, + content:function(){ + targets[0].swapEquip(targets[1]); + }, + ai:{ + order:10, + threaten:function(player,target){ + return 0.8*Math.max(1+target.maxHp-target.hp); + }, + result:{ + target:function(player,target){ + var list1=[]; + var list2=[]; + var num=player.maxHp-player.hp; + var players=game.filterPlayer(); + for(var i=0;i0) list1.push(players[i]); + else if(get.attitude(player,players[i])<0) list2.push(players[i]); + } + list1.sort(function(a,b){ + return a.countCards('e')-b.countCards('e'); + }); + list2.sort(function(a,b){ + return b.countCards('e')-a.countCards('e'); + }); + var delta; + for(var i=0;i0&&!player.hasSkill('olfangquan3'); + }, + direct:true, + content:function(){ + "step 0" + var fang=player.countMark('olfangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1; + player.chooseBool(get.prompt2('olfangquan')).set('ai',function(){ + if(!_status.event.fang) return false; + return game.hasPlayer(function(target){ + if(target.hasJudge('lebu')||target==player) return false; + if(get.attitude(player,target)>4){ + return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0); + } + return false; + }); + }).set('fang',fang); + "step 1" + if(result.bool){ + player.logSkill('olfangquan'); + trigger.cancel(); + player.addTempSkill('olfangquan2'); + player.addMark('olfangquan2',1,false); + } + } + }, + olfangquan2:{ + trigger:{player:'phaseDiscardBegin'}, + forced:true, + popup:false, + audio:false, + onremove:true, + content:function(){ + "step 0" + event.count=player.countMark(event.name); + player.removeMark(event.name,event.count,false); + "step 1" + event.count--; + player.chooseToDiscard('是否弃置一张牌并令一名其他角色进行一个额外回合?').set('logSkill','olfangquan').ai=function(card){ + return 20-get.value(card); + }; + "step 2" + if(result.bool){ + player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){ + if(target.hasJudge('lebu')) return -1; + if(get.attitude(player,target)>4){ + return get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1); + } + return -1; + }; + } + else event.finish(); + "step 3" + var target=result.targets[0]; + player.line(target,'fire'); + target.markSkillCharacter('olfangquan',player,'放权','进行一个额外回合'); + target.insertPhase(); + target.addSkill('olfangquan3'); + if(event.count>0) event.goto(1); + } + }, + olfangquan3:{ + trigger:{player:['phaseAfter','phaseCancelled']}, + forced:true, + popup:false, + audio:false, + content:function(){ + player.unmarkSkill('olfangquan'); + player.removeSkill('olfangquan3'); + } + }, + olluanji:{ + inherit:'luanji', + audioname:['shen_caopi'], + audio:2, + line:false, + group:'olluanji_remove', + check:function(card){ + return 7-get.value(card); + }, + }, + olluanji_remove:{ + trigger:{player:'useCard2'}, + direct:true, + filter:function(event,player){ + return event.card.name=='wanjian'&&event.targets.length>0; + }, + line:false, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('olluanji'),'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){ + return _status.event.targets.contains(target) + }).set('targets',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return -get.effect(target,_status.event.getTrigger().card,player,player) + }); + 'step 1' + if(result.bool){ + player.logSkill('olluanji',result.targets); + trigger.targets.remove(result.targets[0]); + } + }, + }, + olxueyi:{ + audio:2, + trigger:{global:'phaseBefore'}, + forced:true, + zhuSkill:true, + unique:true, + filter:function(event,player){ + return !player.storage.olxueyi_inited&&player.hasZhuSkill('olxueyi'); + }, + content:function(){ + player.storage.olxueyi_inited=true; + var num=game.countPlayer(function(current){ + return current.group=='qun'; + }) + if(num) player.addMark('olxueyi',num) + }, + marktext:'裔', + intro:{ + name2:'裔', + content:'mark', + }, + mod:{ + maxHandcard:function(player,num){ + if(player.hasZhuSkill('olxueyi')) return num+2*player.countMark('olxueyi'); + }, + }, + group:'olxueyi_draw', + }, + olxueyi_draw:{ + audio:'olxueyi', + trigger:{player:'phaseBegin'}, + prompt2:'弃置一枚「裔」标记,然后摸一张牌', + check:function(event,player){ + return !player.hasJudge('lebu')&&player.getUseValue('wanjian')>0; + }, + filter:function(event,player){ + return player.hasZhuSkill('olxueyi')&&player.hasMark('olxueyi'); + }, + content:function(){ + player.removeMark('olxueyi',1); + player.draw(); + }, + }, + olhunzi:{ + audio:2, + inherit:'hunzi', + content:function(){ + player.loseMaxHp(); + player.recover(); + player.addSkill('reyingzi'); + player.addSkill('gzyinghun'); + game.log(player,'获得了技能','#g【英姿】','和','#g【英魂】'); + player.awakenSkill(event.name); + player.storage[event.name]=true; + } + }, + olzhiba:{ + audio:2, + unique:true, + zhuSkill:true, + global:'olzhiba2', + }, + olzhiba2:{ + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.hasZhuSkill('olzhiba')&&!player.hasSkill('olzhiba3')&&target.group=='wu'){ + if(player.countCards('h',function(card){ + var val=get.value(card); + if(val<0) return true; + if(val<=5){ + return card.number>=12; + } + if(val<=6){ + return card.number>=13; + } + return false; + })>0) return -1; + return 0; + } + else{ + if(player.countCards('h','du')&&get.attitude(player,target)<0) return -1; + if(player.countCards('h')<=player.hp) return 0; + var maxnum=0; + var cards2=target.getCards('h'); + for(var i=0;imaxnum){ + maxnum=cards2[i].number; + } + } + if(maxnum>10) maxnum=10; + if(maxnum<5&&cards2.length>1) maxnum=5; + var cards=player.getCards('h'); + for(var i=0;i0||target.countCards('h',function(card){ + var val=get.value(card); + if(val<0) return true; + if(val<=5){ + return card.number>=12; + } + if(val<=6){ + return card.number>=13; + } + return false; + })>0)).set('ai',function(){return _status.event.choice}); + } + else event._result={bool:true}; + 'step 3' + if(result.bool) event.getParent().zhiba_target=target; + else{ + game.log(target,'拒绝了',player,'的拼点请求'); + target.chat('拒绝'); + } + }, + content:function(){ + 'step 0' + event.source=event.getParent().zhiba_target; + if(!event.source){ + event.finish(); + } + 'step 1' + player.chooseToCompare(target).set('small',target==source&&get.attitude(player,target)>0); + 'step 2' + if(player==source&&result.bool||target==source&&!result.bool){ + event.cards=[result.player,result.target].filterInD('d'); + if(!event.cards.length) event.finish(); + else source.chooseControl('ok','cancel2').set('dialog',['是否获得拼点牌?',event.cards]).set('ai',function(){ + if(get.value(event.cards,source,'raw')<=0) return false; + return true; + }); + } + else event.finish(); + 'step 3' + if(result.control!='cancel2') source.gain(event.cards,'gain2','log'); + }, + }, + olzhiba3:{}, + rehuashen:{ + //mode:['identity','single','doudizhu'], + audio:2, + unique:true, + direct:true, + content:function(){ + "step 0" + _status.noclearcountdown=true; + event.videoId=lib.status.videoId++; + var cards=player.storage.rehuashen.character.slice(0); + if(player.isOnline2()){ + player.send(function(cards,id){ + var dialog=ui.create.dialog('是否发动【化身】?',[cards,'character']); + dialog.videoId=id; + },cards,event.videoId); + } + event.dialog=ui.create.dialog(get.prompt('rehuashen'),[cards,'character']); + event.dialog.videoId=event.videoId; + if(!event.isMine()){ + event.dialog.style.display='none'; + } + if(event.triggername=='rehuashen') event._result={control:'更换技能'}; + else player.chooseControl('弃置化身','更换技能','cancel2'); + "step 1" + event.control=result.control; + if(event.control=='cancel2'){ + if(player.isOnline2()){ + player.send('closeDialog',event.videoId); + } + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + event.dialog.close(); + event.finish();return; + } + if(!event.logged){player.logSkill('rehuashen');event.logged=true} + var next=player.chooseButton(true).set('dialog',event.videoId); + if(event.control=='弃置化身'){ + next.set('selectButton',[1,2]); + next.set('filterButton',function(button){ + return button.link!=_status.event.current; + }); + next.set('current',player.storage.rehuashen.current); + } + var prompt=event.control=='弃置化身'?'选择弃置至多两张化身':'选择要切换的化身'; + var func=function(id,prompt){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.content.childNodes[0].innerHTML=prompt; + } + } + if(player.isOnline2()){ + player.send(func,event.videoId,prompt); + } + else if(event.isMine()){ + func(event.videoId,prompt); + } + "step 2" + if(result.bool&&event.control!='弃置化身'){ + event.card=result.links[0]; + var func=function(card,id){ + var dialog=get.idDialog(id); + if(dialog){ + for(var i=0;i0; + }, + banned:['lisu','sp_xiahoudun','xushao'], + addHuashen:function(player){ + if(!player.storage.rehuashen) return; + if(!_status.characterlist){ + if(_status.connectMode) var list=get.charactersOL(); + else{ + var list=[]; + for(var i in lib.character){ + if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue; + list.push(i); + } + } + game.countPlayer2(function(current){ + list.remove(current.name); + list.remove(current.name1); + list.remove(current.name2); + if(current.storage.rehuashen&¤t.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character) + }); + _status.characterlist=list; + } + _status.characterlist.randomSort(); + var bool=false; + for(var i=0;i<_status.characterlist.length;i++){ + var name=_status.characterlist[i]; + if(name.indexOf('zuoci')!=-1||name.indexOf('key')==0||lib.skill.rehuashen.banned.contains(name)||player.storage.rehuashen.character.contains(name)) continue; + var skills=lib.character[name][3]; + for(var j=0;j0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 2' + if(!result.control) result.control='不质疑'; + //event.guessers[0].chat(result.control); + //game.delay(); + if(result.control=='不质疑'){ + //game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + //game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + if(event.guessers.length) event.goto(1); + 'step 3' + for(var i=0;i0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 3' + if(!result.control) result.control='不质疑'; + //event.guessers[0].chat(result.control); + //game.delay(); + if(result.control=='不质疑'){ + //game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + //game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + if(event.guessers.length) event.goto(2); + 'step 4' + for(var i=0;i0; + }, + viewAs:{ + name:"wuxie", + }, + check:function(card){ + if(card.name=='wuxie') return 1000; + return 0; + }, + prompt:"将一张手牌当无懈可击使用", + threaten:1.2, + }, + reguhuo_phase:{}, + rechanyuan:{ + //charlotte:true, + firstDo:true, + trigger:{ + player:["phaseBefore","changeHp"], + }, + priority:99, + forced:true, + popup:false, + unique:true, + content:function (){ + if(player.hp<=1){ + var skills=player.getSkills(true,false); + for(var i=0;i1&&card.number<10) return 5; + return 4; + } + if(suit=='club') return 2; + return 0; + }, + content:function(){ + player.judge(lib.skill.xinleiji.judgeCheck); + }, + ai:{ + useShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')){ + var hastarget=game.hasPlayer(function(current){ + return get.attitude(target,current)<0; + }); + var be=target.countCards('e',{color:'black'}); + if(target.countCards('h','shan')&&be){ + if(!target.hasSkill('xinguidao')) return 0; + return [0,hastarget?target.countCards('he')/2:0]; + } + if(target.countCards('h','shan')&&target.countCards('h')>2){ + if(!target.hasSkill('xinguidao')) return 0; + return [0,hastarget?target.countCards('h')/4:0]; + } + if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ + return [0,0]; + } + if(target.countCards('h')==0){ + return [1.5,0]; + } + if(target.countCards('h')==1&&!be){ + return [1.2,0]; + } + if(!target.hasSkill('xinguidao')) return [1,0.05]; + return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; + } + } + } + } + }, + xinleiji_misa:{ + audio:'xinleiji', + trigger:{player:'judgeAfter'}, + direct:true, + filter:function(event,player){ + return event.judgestr!='暴虐'&&event.judgestr!='助祭'&&['spade','club'].contains(event.result.suit); + }, + content:function(){ + 'step 0' + event.num=1+['club','spade'].indexOf(trigger.result.suit); + event.logged=false; + if(event.num==1&&player.isDamaged()){ + event.logged=true; + player.logSkill('xinleiji'); + player.recover(); + } + player.chooseTarget('雷击:是否对一名角色造成'+event.num+'点雷电伤害?',lib.filter.notMe).ai=function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player,'thunder'); + }; + 'step 1' + if(result.bool&&result.targets&&result.targets.length){ + if(!event.logged) player.logSkill('xinleiji',result.targets); + else player.line(result.targets,'thunder'); + result.targets[0].damage(event.num,'thunder'); + } + }, + }, + xinguidao:{ + audio:2, + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0; + }, + direct:true, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('xinguidao'),'he',function(card){ + if(get.color(card)!='black') return false; + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0){ + if(trigger.player!=player) return 0; + if(game.hasPlayer(function(current){ + return get.attitude(player,current)<0; + })){ + var checkx=lib.skill.xinleiji.judgeCheck(card,true)-lib.skill.xinleiji.judgeCheck(judging); + if(checkx>0) return checkx; + } + return 0; + }; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight','xinguidao','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + var card=result.cards[0]; + if(get.suit(card)=='spade'&&card.number>1&&card.number<10) player.draw('nodelay'); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1 + } + } + }, + reqingguo:{ + audio:2, + enable:['chooseToRespond','chooseToUse'], + filterCard:function(card){ + return get.color(card)=='black'; + }, + position:'he', + viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + prompt:'将一张黑色牌当闪打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + } + } + } + }, + reqiangxi:{ + subSkill:{ + off:{ + sub:true, + }, + }, + audio:2, + enable:"phaseUse", + filterCard:function (card){ + return get.subtype(card)=='equip1'; + }, + selectCard:function (){ + return [0,1]; + }, + filterTarget:function (card,player,target){ + if(player==target) return false; + if(target.hasSkill('reqiangxi_off')) return false; + return player.inRange(target); + }, + content:function (){ + "step 0" + if(cards.length==0){ + player.loseHp(); + } + "step 1" + target.addTempSkill('reqiangxi_off'); + target.damage('nocard'); + }, + check:function (card){ + return 10-get.value(card); + }, + position:"he", + ai:{ + order:8.5, + result:{ + target:function (player,target){ + if(!player.countCards('he',{type:'equip'})){ + if(player.hp<2) return 0; + if(target.hp>=player.hp) return 0; + } + return get.damageEffect(target,player); + }, + }, + }, + threaten:1.5, + }, + rehuoji:{ + position:"he", + audio:2, + audioname:['ol_sp_zhugeliang','ol_pangtong'], + enable:"chooseToUse", + filterCard:function (card){ + return get.color(card)=='red'; + }, + viewAs:{ + name:"huogong", + nature:"fire", + }, + viewAsFilter:function (player){ + if(!player.countCards('he',{color:'red'})) return false; + }, + prompt:"将一张红色牌当火攻使用", + check:function (card){ + var player=_status.currentPhase; + if(player.countCards('h')>player.hp){ + return 6-get.value(card); + } + return 4-get.value(card) + }, + }, + rekanpo:{ + audio:2, + audioname:['ol_sp_zhugeliang','ol_pangtong'], + position:"he", + enable:"chooseToUse", + filterCard:function (card){ + return get.color(card)=='black'; + }, + viewAsFilter:function (player){ + return player.countCards('he',{color:'black'})>0; + }, + viewAs:{ + name:"wuxie", + }, + prompt:"将一张黑色手牌当无懈可击使用", + check:function (card){return 8-get.value(card)}, + }, + rejieming:{ + audio:2, + trigger:{ + player:"damageEnd", + }, + direct:true, + content:function (){ + "step 0" + event.count=trigger.num; + "step 1" + player.chooseTarget(get.prompt('rejieming'),'令一名角色摸两张牌。然后若其手牌数少于体力上限,你摸一张牌').set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>2){ + if((target.maxHp-target.countCards('h'))>2) return 2*att; + return att; + } + return att/3; + }); + "step 2" + if(result.bool){ + event.current=result.targets[0]; + player.logSkill('rejieming',event.current); + player.line(event.current,'thunder'); + event.current.draw(2); + event.count--; + } + else event.finish(); + "step 3" + if(event.current.countCards('h')0) event.goto(1); + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'damage')&&target.hp>1){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + var max=0; + var players=game.filterPlayer(); + for(var i=0;i0){ + max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); + } + } + switch(max){ + case 0:return 2; + case 1:return 1.5; + case 2:return [1,2]; + default:return [0,max]; + } + } + if((card.name=='tao'||card.name=='caoyao')&& + target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; + }, + }, + }, + }, + reshuangxiong:{ + trigger:{ + player:"phaseDrawBegin1", + }, + group:"reshuangxiong2", + audio:"shuangxiong", + audioname:['re_yanwen'], + check:function (event,player){ + if(player.countCards('h')>player.hp) return true; + if(player.countCards('h')>3) return true; + return false; + }, + filter:function(event,player){ + return !event.numFixed; + }, + content:function (){ + "step 0" + trigger.changeToZero(); + event.cards=get.cards(2); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto){ + str='【双雄】选择获得其中一张牌'; + } + else{ + str='双雄'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['双雄',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([1,1],true); + next.set('dialog',event.videoId); + next.set('ai',function(button){ + var player=_status.event.player; + var color=get.color(button.link); + var value=get.value(button.link,player); + if(player.countCards('h',{color:color})>player.countCards('h',['red','black'].remove(color)[0])) value+=5; + return value; + }); + "step 2" + if(result.bool&&result.links){ + var cards2=[]; + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var card2=event.card2; + player.gain(card2,'gain2'); + player.addTempSkill('shuangxiong2'); + player.storage.shuangxiong=get.color(card2); + }, + }, + "reshuangxiong2":{ + trigger:{ + player:"damageEnd", + }, + direct:true, + filter:function (event,player){ + var evt=event.getParent(); + return (evt&&evt.name=='juedou'&&evt[player==evt.player?'targetCards':'playerCards'].length)>0; + }, + content:function (){ + "step 0" + var evt=trigger.getParent(); + var cards=evt[player==evt.player?'targetCards':'playerCards'].slice(0); + for(var i=0;i0&&['useCard','respond'].contains(event.getParent().name); + }, + content:function (){ + "step 0" + event.card=get.cards(); + player.showCards(event.card); + event.same=false; + if(get.type(event.card[0],'trick')==get.type(trigger.getParent().card,'trick')) event.same=true; + player.chooseTarget('选择获得此牌的角色',true).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0; + return -att; + } + if(!_status.event.same) att+=target==_status.event.player?1:0; + if(att>0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du').set('same',event.same); + "step 1" + if(result.targets){ + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'gain2'); + if(!event.same) player.chooseToDiscard(true,'he'); + } + }, + ai:{ + effect:{ + target:function (card,player){ + if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; + }, + }, + }, + }, + "new_liyu":{ + audio:"liyu", + trigger:{ + source:"damageSource", + }, + filter:function (event,player){ + if(event._notrigger.contains(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.player!=player&&event.player.isAlive()&&event.player.countGainableCards(player,'hej')>0; + }, + direct:true, + content:function (){ + 'step 0' + player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(card){ + var player=_status.event.player; + var evt=_status.event.target; + if(get.attitude(player,evt)>0&&get.position(card)=='j') return 4+get.value(card); + if(get.type(card)=='equip'){ + if(get.attitude(player,evt)>0&&game.hasPlayer(function(current){ + return (player.canUse({name:'juedou'},current)&¤t!=evt.target&&get.effect(current,{name:'juedou'},player,player)>2); + })){ + return 5; + } + else if(game.hasPlayer(function(current){ + return (player.canUse({name:'juedou'},current)&¤t!=evt&¤t!=player&&get.effect(current,{name:'juedou'},player,player)<0); + })){ + return 1; + } + else return 4; + }; + return 3; + }).set('logSkill',['new_liyu',trigger.player]); + 'step 1' + if(result.bool){ + if(get.type(result.cards[0])!='equip'){ + trigger.player.draw(); + event.finish(); + } + else{ + if(!game.hasPlayer(function(current){ + return current!=player&¤t!=trigger.player&&player.canUse('juedou',current); + })){ + event.finish(); + return; + } + trigger.player.chooseTarget(true,function(card,player,target){ + var evt=_status.event.getParent(); + return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; + },'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){ + var evt=_status.event.getParent(); + return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; + }); + } + } + else event.finish(); + 'step 2' + if(result.targets){ + player.useCard({name:'juedou',isCard:true},result.targets[0],'noai'); + } + }, + ai:{ + halfneg:true, + }, + }, + "new_retuxi":{ + audio:"retuxi", + trigger:{ + player:"phaseDrawBegin2", + }, + direct:true, + //priority:-10, + filter:function (event){ + return event.num>0&&!event.numFixed; + }, + content:function (){ + "step 0" + var num=get.copy(trigger.num); + if(get.mode()=='guozhan'&&num>2) num=2; + player.chooseTarget(get.prompt('new_retuxi'),'获得至多'+get.translation(num)+'名角色的各一张手牌,然后少摸等量的牌',[1,num],function(card,player,target){ + return target.countCards('h')>0&&player!=target; + },function(target){ + var att=get.attitude(_status.event.player,target); + if(target.hasSkill('tuntian')) return att/10; + return 1-att; + }); + "step 1" + if(result.bool){ + result.targets.sortBySeat(); + player.logSkill('new_retuxi',result.targets); + player.gainMultiple(result.targets); + trigger.num-=result.targets.length; + } + else{ + event.finish(); + } + "step 2" + if(trigger.num<=0) game.delay(); + }, + ai:{ + threaten:1.6, + expose:0.2, + }, + }, + "new_reyiji":{ + audio:"reyiji", + trigger:{ + player:"damageEnd", + }, + frequent:true, + filter:function (event){ + return (event.num>0) + }, + content:function (){ + "step 0" + event.count=1; + "step 1" + player.draw(2); + event.given=0; + "step 2" + player.chooseCardTarget({ + filterCard:true, + selectCard:[1,2-event.given], + filterTarget:function(card,player,target){ + return player!=target&&target!=event.temp; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; + } + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(result.cards,player,'giveAuto'); + event.given+=result.cards.length; + if(event.given<2){ + event.temp=result.targets[0]; + event.goto(2); + } + else if(event.count0){ + if(player.needsToDiscard()){ + num=0.7; + } + else{ + num=0.5; + } + } + if(player.hp>=4) return [1,num*2]; + if(target.hp==3) return [1,num*1.5]; + if(target.hp==2) return [1,num*0.5]; + } + }, + }, + threaten:0.6, + }, + }, + "new_rejianxiong":{ + audio:"rejianxiong", + audioname:['shen_caopi'], + trigger:{ + player:"damageEnd", + }, + content:function (){ + "step 0" + if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ + player.gain(trigger.cards,"gain2"); + } + player.draw('nodelay'); + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')&&player!=target) return [1,0.6]; + }, + }, + }, + }, + "new_reluoyi":{ + audio:"reluoyi", + trigger:{ + player:"phaseDrawBegin1", + }, + forced:true, + locked:false, + filter:function(event,player){ + return !event.numFixed; + }, + content:function (){ + "step 0" + var cards=get.cards(3); + game.cardsGotoOrdering(cards); + player.showCards(cards,'裸衣'); + var cardsx=[]; + for(var i=0;i=trigger.num; + }; + "step 1" + if(result.bool){ + if(cards.length) player.gain(cards,'gain2'); + //game.cardsDiscard(cards2); + player.addTempSkill('reluoyi2',{player:'phaseBefore'}); + trigger.changeToZero(); + } + //else game.cardsDiscard(cards); + }, + }, + "new_rewusheng":{ + mod:{ + targetInRange:function (card){ + if(get.suit(card)=='diamond'&&(_status.event.skill=='new_rewusheng'||card.name=='sha')) return true; + }, + }, + audio:"wusheng", + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], + enable:["chooseToRespond","chooseToUse"], + filterCard:function (card,player){ + if(get.zhu(player,'shouyue')) return true; + return get.color(card)=='red'; + }, + position:"he", + viewAs:{ + name:"sha", + }, + viewAsFilter:function (player){ + if(get.zhu(player,'shouyue')){ + if(!player.countCards('he')) return false; + } + else{ + if(!player.countCards('he',{color:'red'})) return false; + } + }, + prompt:"将一张红色牌当杀使用或打出", + check:function (card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function (player){ + if(get.zhu(player,'shouyue')){ + if(!player.countCards('he')) return false; + } + else{ + if(!player.countCards('he',{color:'red'})) return false; + } + }, + respondSha:true, + basic:{ + useful:[5,1], + value:[5,1], + }, + order:function (){ + if(_status.event.player.hasSkillTag('presha',true,null,true)) return 10; + return 3; + }, + result:{ + target:function (player,target){ + if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){ + if(get.attitude(player,target)>0){ + return -6; + } + else{ + return -3; + } + } + return -1.5; + }, + }, + tag:{ + respond:1, + respondShan:1, + damage:function (card){ + if(card.nature=='poison') return; + return 1; + }, + natureDamage:function (card){ + if(card.nature) return 1; + }, + fireDamage:function (card,nature){ + if(card.nature=='fire') return 1; + }, + thunderDamage:function (card,nature){ + if(card.nature=='thunder') return 1; + }, + poisonDamage:function (card,nature){ + if(card.nature=='poison') return 1; + }, + }, + }, + }, + "new_yijue":{ + audio:"yijue", + enable:"phaseUse", + usable:1, + position:"he", + filterTarget:function (card,player,target){ + return player!=target&&target.countCards('h'); + }, + filterCard:true, + check:function (card){ + return 8-get.value(card); + }, + content:function (){ + "step 0" + target.chooseCard(true).ai=function(card){ + var player=_status.event.player; + if((player.hasShan()||player.hp<3)&&get.color(card)=='black') return 0.5; + return Math.max(1,20-get.value(card)); + }; + "step 1" + target.showCards(result.cards); + event.card2=result.cards[0]; + if(get.color(event.card2)=='black'){ + if(!target.hasSkill('fengyin')){ + target.addTempSkill('fengyin'); + } + target.addTempSkill('new_yijue2'); + event.finish(); + } + else{ + player.gain(event.card2,target,'give','bySelf'); + if(target.hp0; + }; + } + } + "step 2" + if(result.bool){ + target.recover(); + } + }, + ai:{ + result:{ + target:function (player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ + return 1; + } + if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ + return -2; + } + return -0.5; + }, + }, + order:9, + }, + }, + "new_yijue2":{ + trigger:{ + player:"damageBegin1", + }, + filter:function (event){ + return event.source&&event.source.hasSkill('new_yijue')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='heart'&&event.notLink(); + }, + silent:true, + popup:false, + forced:true, + content:function (){ + trigger.num++; + }, + mark:true, + mod:{ + cardEnabled2:function (card){ + if(get.position(card)=='h') return false; + }, + }, + intro:{ + content:"不能使用或打出手牌", + }, + }, + "new_repaoxiao":{ + audio:"paoxiao", + inherit:"paoxiao", + mod:{ + targetInRange:function (card,player){ + if(card.name=='sha'&&get.cardCount({name:'sha'},player)>0) return true; + }, + cardUsable:function (card,player,num){ + if(card.name=='sha') return Infinity; + }, + }, + ai:{ + unequip:true, + skillTagFilter:function (player,tag,arg){ + if(!get.zhu(player,'shouyue')) return false; + if(arg&&arg.name=='sha') return true; + return false; + }, + }, + }, + "new_tishen":{ + trigger:{ + player:"phaseUseEnd", + }, + check:function (event,player){ + var num=0; + var he=player.getCards('he'); + for(var i=0;i0 + }, + content:function (){ + "step 0" + player.chooseCardTarget({ + position:'he', + filterCard:true, + selectCard:[1,Infinity], + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(get.attitude(_status.event.player,_status.currentPhase)<0&&_status.currentPhase.needsToDiscard()&&card.name!='du') return -1; + for(var i=0;i_status.event.player.countCards('h')) return 0; + return att-4; + }, + prompt:get.prompt2('new_qingjian'), + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + var cards=result.cards; + var type=[]; + for(var i=0;i0&&get.attitude(player,current)>2); + })>1&&get.color(card)=='black'&&player.countCards('h',{color:'red'})>0) return 3-get.value(card); + return 9-get.value(card); + }, + filter:function (event,player){ + return !player.hasSkill('new_reqingnang_off2'); + }, + filterTarget:function (card,player,target){ + if(target.hp>=target.maxHp||target.hasSkill('new_reqingnang_off')) return false; + return true; + }, + content:function (){ + target.addTempSkill('new_reqingnang_off'); + if(get.color(cards[0])=='black') player.addTempSkill('new_reqingnang_off2'); + target.recover(); + }, + ai:{ + order:9, + result:{ + target:function (player,target){ + if(target.hp==1) return 5; + if(player==target&&player.countCards('h')>player.hp) return 5; + return 2; + }, + }, + threaten:2, + }, + }, + reyaowu:{ + trigger:{player:'damageBegin3'}, + audio:'new_reyaowu', + forced:true, + filter:function(event){ + return event.card&&(get.color(event.card)!='red'||event.source&&event.source.isAlive()); + }, + content:function(){ + trigger[get.color(trigger.card)!='red'?'player':'source'].draw(); + }, + }, + "new_reyaowu":{ + trigger:{ + player:"damageBegin3", + }, + //priority:1, + audio:2, + filter:function (event){ + return event.card&&event.card.name=='sha'&&(get.color(event.card)!='red'||event.source&&event.source.isAlive()); + }, + forced:true, + check:function (event){ + if(event.card&&(event.card.name=='sha')){ + return get.color(event.card)=='black'; + } + }, + content:function (){ + if(get.color(trigger.card)!='red') player.draw(); + else trigger.source.chooseDrawRecover(true); + }, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(card.name=='sha'&&(get.color(card)=='red')&&get.attitude(player,target)<=0){ + return [1,0.8,1,0]; + } + if(card.name=='sha'&&(get.color(card)=='black')){ + return [1,0.4]; + } + }, + }, + }, + }, + + reguanxing:{ + audio:'guanxing', + audioname:['jiangwei','re_jiangwei','re_zhugeliang','gexuan'], + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + frequent:true, + filter:function(event,player,name){ + if(name=='phaseJieshuBegin'){ + return player.hasSkill('reguanxing_on'); + } + return true; + }, + content:function(){ + "step 0" + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var num=game.countPlayer()<4?3:5; + var cards=get.cards(num); + event.cards=cards; + var switchToAuto=function(){ + _status.imchoosing=false; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + var top=[]; + var judges=player.getCards('j'); + var stopped=false; + if(!player.hasWuxie()){ + for(var i=0;i0){ + event.cards.push(result.card); + player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','reluoshen'); + } + else{ + for(var i=0;i0; + }, + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='e'){ + var subtype=get.subtype(card); + if(!game.hasPlayer(function(current){ + return current!=player&¤t.hp!=player.hp&&get.attitude(player,current)>0&&!current.countCards('e',{subtype:subtype}); + })){ + return 0; + } + if(player.countCards('h',{subtype:subtype})) return 20-get.value(card); + return 10-get.value(card); + } + else{ + if(player.countCards('e')) return 0; + if(player.countCards('h',{type:'equip'})) return 0; + return 8-get.value(card); + } + }, + filterTarget:function(card,player,target){ + if(target.sex!='male') return false; + var card=ui.selected.cards[0]; + if(!card) return false; + if(get.position(card)=='e'&&!target.isEmpty(get.subtype(card))) return false; + return true; + }, + discard:false, + delay:false, + lose:false, + content:function(){ + 'step 0' + if(get.position(cards[0])=='e') event._result={index:0}; + else if(get.type(cards[0])!='equip'||!target.isEmpty(get.subtype(cards[0]))) event._result={index:1}; + else player.chooseControl().set('choiceList',[ + '将'+get.translation(cards[0])+'置入'+get.translation(target)+'的装备区', + '弃置'+get.translation(cards[0]), + ]).ai=function(){return 1}; + 'step 1' + if(result.index==0){ + player.$give(cards,target,false); + target.equip(cards[0]); + } + else{ + player.discard(cards); + } + 'step 2' + if(player.hp>target.hp){ + player.draw(); + if(target.isDamaged()) target.recover(); + } + else if(player.hptarget.hp){ + if(target.isHealthy()){ + if(!player.needsToDiscard(1)||goon()) return 0.1; + return 0; + } + return 1; + } + return 0; + } + } + } + }, + rejiuyuan:{ + global:'rejiuyuan2', + audio:2, + zhuSkill:true, + }, + rejiuyuan2:{ + audio:'jiuyuan', + forceaudio:true, + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + if(event.card.name!='tao') return false; + if(player.group!='wu') return false; + if(event.target!=player) return false; + return game.hasPlayer(function(target){ + return player!=target&&!event.targets.contains(target)&&target.isDamaged()&&target.hp2||!player.countCards('h',function(card){ + return get.value(card)>=8; + }))){ + return 1; + } + return 6-get.value(card) + }, + content:function(){ + 'step 0' + player.discard(cards); + event.num=1; + var hs=player.getCards('h'); + if(!hs.length) event.num=0; + for(var i=0;i=Math.max(2,player.countCards('h')-player.hp)) return 0; + if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); + } + } + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); + return -1; + } + return 10-get.value(card); + }, + content:function(){ + 'step 0' + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'&&!evt.rerende){ + var next=game.createEvent('rerende_clear'); + _status.event.next.remove(next); + evt.after.push(next); + evt.rerende=true; + next.player=player; + next.setContent(lib.skill.rerende1.content); + } + if(!Array.isArray(player.storage.rerende2)){ + player.storage.rerende2=[]; + } + player.storage.rerende2.push(target); + target.gain(cards,player,'giveAuto'); + if(typeof player.storage.rerende!='number'){ + player.storage.rerende=0; + } + if(player.storage.rerende>=0){ + player.storage.rerende+=cards.length; + if(player.storage.rerende>=2){ + var list=[]; + if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ + return player.canUse('sha',current); + })){ + list.push(['基本','','sha']); + list.push(['基本','','sha','fire']); + list.push(['基本','','sha','thunder']); + } + if(lib.filter.cardUsable({name:'tao'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ + return player.canUse('tao',current); + })){ + list.push(['基本','','tao']); + } + if(lib.filter.cardUsable({name:'jiu'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){ + return player.canUse('jiu',current); + })){ + list.push(['基本','','jiu']); + } + if(list.length){ + player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(card.name=='tao'){ + if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){ + return 5; + } + return 1; + } + if(card.name=='sha'){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0 + })){ + if(card.nature=='fire') return 2.95; + if(card.nature=='thunder') return 2.92; + return 2.9; + } + return 0; + } + if(card.name=='jiu'){ + return 0.5; + } + return 0; + }); + } + else{ + event.finish(); + } + player.storage.rerende=-1; + } + else{ + event.finish(); + } + } + else{ + event.finish(); + } + 'step 1' + if(result&&result.bool&&result.links[0]){ + var card={name:result.links[0][2],nature:result.links[0][3]}; + player.chooseUseTarget(card,true); + } + }, + ai:{ + order:function(skill,player){ + if(player.hp1){ + return 10; + } + return 4; + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })){ + return 0; + } + } + } + } + }, + threaten:0.8 + } + }, + rerende1:{ + trigger:{player:'phaseUseBegin'}, + silent:true, + content:function(){ + player.storage.rerende=0; + player.storage.rerende2=[]; + } + }, + liyu:{ + audio:2, + trigger:{source:'damageSource'}, + forced:true, + filter:function(event,player){ + if(event._notrigger.contains(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countGainableCards(player,'he')>0; + }, + check:function(){ + return false; + }, + content:function(){ + 'step 0' + trigger.player.chooseTarget(function(card,player,target){ + var evt=_status.event.getParent(); + return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; + },get.prompt('liyu')).set('ai',function(target){ + var evt=_status.event.getParent(); + return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; + }); + 'step 1' + if(result.bool){ + player.gainPlayerCard(trigger.player,'he',true); + event.target=result.targets[0]; + trigger.player.line(player,'green'); + } + else{ + event.finish(); + } + 'step 2' + if(event.target){ + player.useCard({name:'juedou',isCard:true},event.target,'noai'); + } + }, + ai:{ + halfneg:true + } + }, + /*reqicai:{ + trigger:{player:'equipEnd'}, + frequent:true, + content:function(){ + player.draw(); + }, + mod:{ + targetInRange:function(card,player,target,now){ + var type=get.type(card); + if(type=='trick'||type=='delay') return true; + } + }, + },*/ + retuxi:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + direct:true, + filter:function(event){ + return event.num>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('retuxi'),[1,trigger.num],function(card,player,target){ + return target.countCards('h')>0&&player!=target&&target.countCards('h')>=player.countCards('h'); + },function(target){ + var att=get.attitude(_status.event.player,target); + if(target.hasSkill('tuntian')) return att/10; + return 1-att; + }); + "step 1" + if(result.bool){ + player.logSkill('retuxi',result.targets); + player.gainMultiple(result.targets); + trigger.num-=result.targets.length; + } + else{ + event.finish(); + } + "step 2" + if(trigger.num<=0) game.delay(); + }, + ai:{ + threaten:1.6, + expose:0.2 + } + }, + reguicai:{ + audio:2, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he',function(card){ + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'reguicai','highlight','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + } + } + }, + refankui:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return (event.source&&event.source.countGainableCards(player,'he')&&event.num>0&&event.source!=player); + }, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + event.count--; + player.gainPlayerCard(get.prompt('refankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['refankui',trigger.source]); + "step 2" + if(result.bool&&event.count>0&&trigger.source.countGainableCards(player,'he')>0) event.goto(1); + }, + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.countCards('he')>1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; + if(get.attitude(target,player)<0) return [1,1]; + } + } + } + } + }, + reluoyi:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + check:function(event,player){ + if(player.countCards('h','sha')) return true; + return Math.random()<0.5; + }, + content:function(){ + "step 0" + player.addTempSkill('reluoyi2',{player:'phaseBefore'}); + trigger.cancel(null,null,'notrigger'); + "step 1" + event.cards=get.cards(3); + player.showCards(event.cards,'裸衣'); + "step 2" + for(var i=0;i0); + }, + check:function(event,player){ + return (get.attitude(player,event.source)<=0); + }, + logTarget:'source', + content:function(){ + "step 0" + event.num=trigger.num; + "step 1" + player.judge(function(card){ + if(get.color(card)=='red') return 1; + return 0; + }); + "step 2" + if(result.color=='black'){ + if(trigger.source.countCards('he')){ + player.discardPlayerCard(trigger.source,'he',true); + } + } + else if(trigger.source.isIn()){ + trigger.source.damage(); + } + event.num--; + if(event.num>0){ + player.chooseBool(get.prompt2('reganglie')); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + player.logSkill('reganglie',trigger.source); + event.goto(1); + } + }, + ai:{ + maixie_defend:true, + expose:0.4 + } + }, + qinxue:{ + skillAnimation:true, + animationColor:'wood', + audio:2, + unique:true, + juexingji:true, + derivation:'gongxin', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + if(player.storage.qinxue) return false; + if(player.countCards('h')>=player.hp+3) return true; + if(player.countCards('h')>=player.hp+2&&game.players.length+game.dead.length>=7) return true; + return false; + }, + content:function(){ + player.storage.qinxue=true; + player.loseMaxHp(); + player.addSkill('gongxin'); + player.awakenSkill('qinxue'); + } + }, + qingjian:{ + audio:2, + unique:true, + trigger:{player:'gainAfter'}, + direct:true, + usable:4, + filter:function(event,player){ + if(event.parent.parent.name=='phaseDraw') return false; + return event.cards&&event.cards.length>0 + }, + content:function(){ + "step 0" + event.cards=trigger.cards.slice(0); + "step 1" + player.chooseCardTarget({ + filterCard:function(card){ + return _status.event.getParent().cards.contains(card); + }, + selectCard:[1,event.cards.length], + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; + } + if(target.countCards('h')>_status.event.player.countCards('h')) return 0; + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 2" + if(result.bool){ + player.storage.qingjian++; + player.logSkill('qingjian',result.targets); + result.targets[0].gain(result.cards,player,'give'); + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:true, + check:function(card){ + return 8-get.value(card); + }, + discard:false, + lose:false, + delay:false, + content:function(){ + "step 0" + target.storage.refanjian=cards[0]; + target.gain(cards[0],player,'give'); + "step 1" + target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){ + var cards=player.getCards('he',{suit:get.suit(player.storage.refanjian)}); + if(cards.length==1) return 0; + if(cards.length>=2){ + for(var i=0;i=8) return 1; + } + if(cards.length>2&&player.hp>2) return 1; + if(cards.length>3) return 1; + return 0; + } + "step 2" + if(result.control=='refanjian_card'){ + target.showHandcards(); + } + else{ + target.loseHp(); + event.finish(); + } + "step 3" + target.discard(target.getCards('he',{suit:get.suit(target.storage.refanjian)})) + delete target.storage.refanjian; + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return -target.countCards('he')-(player.countCards('h','du')?1:0); + } + }, + threaten:2, + } + }, + reqianxun:{ + init:function(player){ + if(!player.storage.reqianxun2) player.storage.reqianxun2=[]; + }, + audio:2, + trigger:{target:'useCardToBegin',player:'judgeBefore'}, + filter:function(event,player){ + if(player.countCards('h')==0) return false; + if(event.parent.name=='phaseJudge'){ + if(lib.skill.reqianxun.trigger.player=='judgeBefore'){ + return true; + } + return event.result&&event.result.judge!=0; + } + if(event.name=='judge') return false; + if(event.targets&&event.targets.length>1) return false; + if(event.card&&get.type(event.card)=='trick'&&event.player!=player) return true; + }, + content:function(){ + player.storage.reqianxun2=player.storage.reqianxun2.concat(player.getCards('h')); + game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); + player.lose(player.getCards('h'),ui.special,'toStorage'); + player.addSkill('reqianxun2'); + }, + ai:{ + effect:function(card,player,target){ + if(!target.hasFriend()) return; + if(player==target) return; + var type=get.type(card); + var nh=target.countCards(); + if(type=='trick'){ + if(!get.tag(card,'multitarget')||get.info(card).singleCard){ + if(get.tag(card,'damage')){ + if(nh<3||target.hp<=2) return 0.8; + } + return [1,nh]; + } + } + else if(type=='delay'){ + return [0.5,0.5]; + } + }, + } + }, + reqianxun2:{ + trigger:{global:'phaseEnd'}, + forced:true, + audio:false, + content:function(){ + player.gain(player.storage.reqianxun2,'fromStorage','draw'); + player.storage.reqianxun2.length=0; + player.removeSkill('reqianxun2'); + game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); + }, + mark:true, + intro:{ + content:'cardCount', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + player.storage.reqianxun2.length=0; + } + }, + } + }, + relianying:{ + audio:2, + trigger:{player:'loseAfter'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + return event.hs&&event.hs.length; + }, + content:function(){ + "step 0" + var num=trigger.hs.length; + player.chooseTarget('选择发动连营的目标',[1,num]).ai=function(target){ + var player=_status.event.player; + if(player==target) return get.attitude(player,target)+10; + return get.attitude(player,target); + } + "step 1" + if(result.bool){ + player.logSkill('relianying',result.targets); + game.asyncDraw(result.targets); + } + else event.finish(); + "step 2" + game.delay(); + }, + ai:{ + threaten:0.8, + effect:{ + target:function(card){ + if(card.name=='guohe'||card.name=='liuxinghuoyu') return 0.5; + } + }, + noh:true, + } + }, + retishen:{ + audio:2, + unique:true, + mark:true, + skillAnimation:true, + animationColor:'soil', + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + init:function(player){ + player.storage.retishen=false; + }, + filter:function(event,player){ + if(player.storage.retishen) return false; + if(typeof player.storage.retishen2=='number'){ + return player.hp0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du'); + } + else{ + player.chooseBool('是否弃置'+get.translation(event.card)+'?'); + event.disbool=true; + } + game.delay(2); + "step 1" + if(event.disbool){ + if(!result.bool){ + game.log(player,'展示了',event.card); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + } + else{ + game.log(player,'展示并弃掉了',event.card); + event.card.discard(); + } + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); + } + else if(result.targets){ + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'log'); + event.node.moveDelete(result.targets[0]); + game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); + game.broadcast(function(card,target){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.moveDelete(target); + } + },event.card,result.targets[0]); + } + else{ + game.log(player,'展示并弃掉了',event.card); + event.card.discard(); + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); + } + game.addVideo('thrownhighlight2'); + ui.arena.classList.remove('thrownhighlight'); + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; + } + } + } + }, + rejianxiong:{ + audio:2, + audioname:['shen_caopi'], + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0],true)=='o'; + }, + content:function(){ + player.gain(trigger.cards); + player.$gain2(trigger.cards); + player.draw(); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')) return [1,0.55]; + } + } + } + }, + rejianxiong_old:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + "step 0" + if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ + player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){ + var trigger=_status.event.getTrigger(); + if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0; + return 1; + }; + } + else{ + player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong')); + } + "step 1" + if(result.control=='rejianxiong_napai'){ + player.logSkill('rejianxiong'); + player.gain(trigger.cards); + player.$gain2(trigger.cards); + } + else if(result.control=='rejianxiong_mopai'){ + player.logSkill('rejianxiong'); + player.draw(); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')&&player!=target) return [1,0.6]; + } + } + } + }, + reyiji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + filter:function(event){ + return (event.num>0) + }, + content:function(){ + "step 0" + event.num=1; + event.count=1; + "step 1" + player.gain(get.cards(2)); + player.$draw(2); + "step 2" + player.chooseCardTarget({ + filterCard:true, + selectCard:[1,2], + filterTarget:function(card,player,target){ + return player!=target&&target!=event.temp; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; + } + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + player.lose(result.cards,ui.special,'toStorage'); + if(result.targets[0].hasSkill('reyiji2')){ + result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards); + } + else{ + result.targets[0].addSkill('reyiji2'); + result.targets[0].storage.reyiji2=result.cards; + } + player.$give(result.cards.length,result.targets[0],false); + player.line(result.targets,'green'); + game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']); + if(num==1){ + event.temp=result.targets[0]; + event.num++; + event.goto(2); + } + else if(event.count0){ + if(player.needsToDiscard()){ + num=0.7; + } + else{ + num=0.5; + } + } + if(player.hp>=4) return [1,num*2]; + if(target.hp==3) return [1,num*1.5]; + if(target.hp==2) return [1,num*0.5]; + } + } + }, + threaten:0.6 + } + }, + reyiji2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + mark:true, + popup:'遗计拿牌', + audio:false, + content:function(){ + player.$draw(player.storage.reyiji2.length); + player.gain(player.storage.reyiji2,'fromStorage'); + delete player.storage.reyiji2; + player.removeSkill('reyiji2'); + game.delay(); + }, + intro:{ + content:'cardCount' + } + }, + yijue:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target).set('small',true); + "step 1" + if(result.bool){ + if(!target.hasSkill('fengyin')){ + target.addTempSkill('fengyin'); + } + target.addTempSkill('yijue2'); + event.finish(); + } + else if(target.hp0; + }; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + target.recover(); + } + }, + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ + return 1; + } + if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ + return -2; + } + return -0.5; + } + }, + order:9, + } + }, + yijue2:{ + mark:true, + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } + }, + intro:{ + content:'不能使用或打出卡牌' + } + }, + retieji:{ + 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=get.suit(result.card); + 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); + } + } + }, + reyicong:{ + trigger:{ + player:["changeHp"], + }, + audio:2, + forced:true, + filter:function(event,player){ + return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num); + }, + content:function (){}, + mod:{ + globalFrom:function(from,to,current){ + if(from.hp>2) return current-1; + }, + globalTo:function(from,to,current){ + if(to.hp<=2) return current+1; + }, + }, + ai:{ + threaten:0.8 + } + }, + qiaomeng:{ + audio:2, + trigger:{source:'damageSource'}, + direct:true, + filter:function(event){ + if(event._notrigger.contains(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.cards&& + get.color(event.cards)=='black'&&event.player.countCards('e'); + }, + content:function(){ + "step 0" + player.choosePlayerCard('e',trigger.player); + "step 1" + if(result.bool){ + player.logSkill('qiaomeng'); + trigger.player.discard(result.links[0]); + event.card=result.links[0]; + } + else{ + event.finish(); + } + "step 2" + if(get.position(card)=='d'){ + if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){ + player.gain(card,trigger.player); + player.$gain2(card); + } + } + } + }, + rekurou:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + check:function(card){ + return 8-get.value(card); + }, + position:'he', + content:function(){ + player.loseHp(); + }, + ai:{ + order:8, + result:{ + player:function(player){ + if(player.hp<=2) return player.countCards('h')==0?1:0; + if(player.countCards('h',{name:'sha',color:'red'})) return 1; + return player.countCards('h')<=player.hp?1:0; + } + }, + effect:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,1]; + return 1.2; + } + if(get.tag(card,'loseHp')){ + if(player.hp<=1) return; + return [0,0]; + } + } + } + }, + zhaxiang:{ + trigger:{player:'loseHpEnd'}, + forced:true, + audio:2, + content:function(){ + var num=trigger.num; + player.draw(3*num); + if(_status.currentPhase==player){ + if(!player.storage.zhaxiang2) player.storage.zhaxiang2=0; + player.storage.zhaxiang2+=num; + player.addTempSkill('zhaxiang2',{player:'phaseAfter'}); + } + else{ + game.trySkillAudio('zhaxiang',player); + } + }, + ai:{ + maihp:true + } + }, + zhaxiang2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha'&&get.color(card)=='red') return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.storage.zhaxiang2; + } + }, + onremove:true, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'; + }, + content:function(){ + trigger.directHit.addArray(game.players); + } + }, + zhuhai:{ + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return event.player.isAlive()&&event.player.getStat('damage')&& + lib.filter.targetEnabled({name:'sha'},player,event.player)&&(player.hasSha()||_status.connectMode&&player.countCards('h')>0); + }, + content:function(){ + player.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?').set('logSkill','zhuhai').set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',trigger.player); + } + }, + qianxin:{ + skillAnimation:true, + animationColor:'orange', + audio:2, + unique:true, + juexingji:true, + trigger:{source:'damageSource'}, + forced:true, + derivation:'jianyan', + filter:function(event,player){ + return player.hp2) return 'trick'; + return 'red'; + }); + "step 1" + event.card=get.cardPile(function(card){ + if(get.color(card)==result.control) return true; + if(get.type(card,'trick')==result.control) return true; + return false; + },'cardPile'); + if(!event.card){ + event.finish(); + return; + } + player.showCards([event.card]); + "step 2" + player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){ + return target.sex=='male'; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.neg) return -att; + return att; + }).set('neg',get.value(event.card,player,'raw')<0); + "step 3" + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'gain2'); + + }, + ai:{ + order:9, + result:{ + player:function(player){ + if(game.hasPlayer(function(current){ + return current.sex=='male'&&get.attitude(player,current)>0; + })) return 2; + return 0; + }, + }, + threaten:1.2 + } + }, + reguose:{ + audio:2, + enable:'phaseUse', + usable:1, + discard:false, + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + prepare:'throw', + position:'he', + filterCard:{suit:'diamond'}, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(target.hasJudge('lebu')) return true; + return lib.filter.targetEnabled({name:'lebu'},player,target); + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + if(target.hasJudge('lebu')){ + target.discard(target.getJudge('lebu')); + } + else{ + var next=player.useCard({name:'lebu'},target,cards); + next.animate=false; + next.audio=false; + } + player.draw(); + }, + ai:{ + result:{ + target:function(player,target){ + if(target.hasJudge('lebu')) return -get.effect(target,{name:'lebu'},player,target); + return get.effect(target,{name:'lebu'},player,target); + } + }, + order:9, + } + }, + fenwei:{ + skillAnimation:true, + animationColor:'wood', + audio:2, + audioname:['heqi'], + unique:true, + mark:true, + limited:true, + trigger:{global:'useCardToPlayered'}, + //priority:5, + filter:function(event,player){ + if(event.getParent().triggeredTargets3.length>1) return false; + if(get.type(event.card)!='trick') return false; + if(get.info(event.card).multitarget) return false; + if(event.targets.length<2) return false; + if(player.storage.fenwei) return false; + return true; + }, + init:function(player){ + player.storage.fenwei=false; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('fenwei'), + [1,trigger.targets.length],function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1&&!trigger.excluded.contains(target)){ + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + } + return -1; + }).set('targets',trigger.targets); + "step 1" + if(result.bool){ + player.awakenSkill('fenwei'); + player.logSkill('fenwei',result.targets); + player.storage.fenwei=true; + trigger.getParent().excluded.addArray(result.targets); + game.delay(); + } + }, + intro:{ + content:'limited' + } + }, + chulao:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(target.group=='unknown') return false; + for(var i=0;i0; + }, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + position:'he', + selectTarget:[1,Infinity], + check:function(card){ + if(get.suit(card)=='spade') return 8-get.value(card); + return 5-get.value(card); + }, + content:function(){ + "step 0" + if(num==0&&get.suit(cards[0])=='spade') player.draw(); + player.choosePlayerCard(targets[num],'he',true); + "step 1" + if(result.bool){ + if(result.links.length) targets[num].discard(result.links[0]); + if(get.suit(result.links[0])=='spade') targets[num].draw(); + } + }, + ai:{ + result:{ + target:-1 + }, + threaten:1.2, + order:3 + } + }, + xunxun:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + //check:function(event,player){ + // return !player.hasSkill('reyiji2'); + //}, + content:function(){ + "step 0" + event.cards=get.cards(4); + player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶',true).set('ai',ai.get.buttonValue); + "step 1" + if(result.bool){ + var choice=[]; + for(var i=0;i-3; + return get.attitude(player,event.player)>-3; + }, + logTarget:function(event,player){ + if(event.player==player) return event.source; + return event.player; + }, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + game.asyncDraw([trigger.player,trigger.source]); + event.count--; + "step 2" + game.delay(); + "step 3" + if(event.count){ + player.chooseBool(get.prompt2('wangxi',lib.skill.wangxi.logTarget(trigger,player))) + } + else event.finish(); + "step 4" + if(result.bool){ + player.logSkill('wangxi',lib.skill.wangxi.logTarget(trigger,player)); + event.goto(1); + } + }, + ai:{ + maixie:true, + maixie_hp:true + } + }, + refangquan:{ + audio:2, + trigger:{player:'phaseUseBefore'}, + filter:function(event,player){ + return player.countCards('h')>0&&!player.hasSkill('fangquan3'); + }, + direct:true, + content:function(){ + "step 0" + var fang=player.countMark('fangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1; + player.chooseBool(get.prompt2('refangquan')).set('ai',function(){ + if(!_status.event.fang) return false; + return game.hasPlayer(function(target){ + if(target.hasJudge('lebu')||target==player) return false; + if(get.attitude(player,target)>4){ + return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0); + } + return false; + }); + }).set('fang',fang); + "step 1" + if(result.bool){ + player.logSkill('refangquan'); + trigger.cancel(); + player.addTempSkill('fangquan2','phaseAfter'); + player.addMark('fangquan2',1,false); + player.addTempSkill('refangquan2'); + //player.storage.fangquan=result.targets[0]; + } + } + }, + refangquan2:{ + mod:{ + maxHandcardBase:function(player,num){ + return player.maxHp; + }, + }, + }, + rehunzi:{ + inherit:'hunzi', + filter:function(event,player){ + return player.hp<=2&&!player.storage.rehunzi; + }, + ai:{ + threaten:function(player,target){ + if(target.hp<=2) return 2; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(!target.hasFriend()) return; + if(get.tag(card,'damage')==1&&target.hp==3&&!target.isTurnedOver()&& + _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; + } + } + } + }, + rezhijian:{ + inherit:'zhijian', + group:['rezhijian_use'], + subfrequent:['use'], + subSkill:{ + use:{ + audio:'rezhijian', + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + return get.type(event.card)=='equip'; + }, + prompt:'是否发动【直谏】摸一张牌?', + content:function(){ + player.draw('nodelay'); + }, + }, + }, + }, + retuntian:{ + audio:2, + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + for(var i=0;i0){ + player.discardPlayerCard(target,'he',true); + } + else{ + event.finish(); + } + }, + ai:{ + order:4, + expose:0.2, + result:{ + target:-1, + player:function(player,target){ + if(!target.canUse('sha',player)) return 0; + if(target.countCards('h')==0) return 0; + if(target.countCards('h')==1) return -0.1; + if(player.hp<=2) return -2; + if(player.countCards('h','shan')==0) return -1; + return -0.5; + } + }, + threaten:1.1 + } + }, + rebeige:{ + audio:'beige', + audioname:['re_caiwenji'], + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return (event.card&&event.card.name=='sha'&&event.source&& + event.player.classList.contains('dead')==false&&player.countCards('he')); + }, + direct:true, + checkx:function(event,player){ + var att1=get.attitude(player,event.player); + var att2=get.attitude(player,event.source); + return att1>0&&att2<=0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt2('rebeige',trigger.player)); + var check=lib.skill.beige.checkx(trigger,player); + next.set('ai',function(card){ + if(_status.event.goon) return 8-get.value(card); + return 0; + }); + next.set('logSkill','beige'); + next.set('goon',check); + "step 1" + if(result.bool){ + trigger.player.judge(); + } + else{ + event.finish(); + } + "step 2" + switch(result.suit){ + case 'heart':trigger.player.recover(trigger.num);break; + case 'diamond':trigger.player.draw(3);break; + case 'club':trigger.source.chooseToDiscard('he',2,true);break; + case 'spade':trigger.source.turnOver();break; + } + }, + ai:{ + expose:0.3 + } + }, + rexingshang:{ + audio:2, + trigger:{global:'die'}, + filter:function(event,player){ + return player.isDamaged()||event.player.countCards('he')>0; + }, + direct:true, + content:function(){ + "step 0" + var choice=[]; + if(player.isDamaged()) choice.push('回复体力'); + if(trigger.player.countCards('he')) choice.push('获得牌'); + choice.push('cancel2'); + player.chooseControl(choice).set('prompt',get.prompt2('rexingshang')).set('ai',function(){ + if(choice.length==2) return 0; + if(get.value(trigger.player.getCards('he'))>8) return 1; + return 0; + }); + "step 1" + if(result.control!='cancel2'){ + player.logSkill(event.name,trigger.player); + if(result.control=='获得牌'){ + event.togain=trigger.player.getCards('he'); + player.gain(event.togain,trigger.player,'giveAuto'); + } + else player.recover(); + } + }, + }, + refangzhu:{ + audio:2, + trigger:{ + player:"damageEnd", + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget(get.prompt2('refangzhu'),function(card,player,target){ + return player!=target + }).ai=function(target){ + if(target.hasSkillTag('noturn')) return 0; + var player=_status.event.player; + if(get.attitude(_status.event.player,target)==0) return 0; + if(get.attitude(_status.event.player,target)>0){ + if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); + if(player.getDamagedHp()<3) return -1; + return 100-target.countCards('h'); + } + else{ + if(target.classList.contains('turnedover')) return -1; + if(player.getDamagedHp()>=3) return -1; + return 1+target.countCards('h'); + } + } + "step 1" + if(result.bool){ + player.logSkill('refangzhu',result.targets); + event.target=result.targets[0]; + if(player.isHealthy()) event._result={bool:false}; + else event.target.chooseToDiscard('he',player.getDamagedHp()).set('ai',function(card){ + var player=_status.event.player; + if(player.isTurnedOver()||_status.event.getTrigger().player.getDamagedHp()>2) return -1; + return (player.hp*player.hp)-get.value(card); + }).set('prompt','弃置'+get.cnNumber(player.getDamagedHp())+'张牌并失去一点体力;或选择不弃置,将武将牌翻面并摸'+get.cnNumber(player.getDamagedHp())+'张牌。'); + } + else event.finish(); + "step 2" + if(result.bool){ + event.target.loseHp(); + } + else{ + if(player.isDamaged()) event.target.draw(player.getDamagedHp()); + event.target.turnOver(); + } + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(target.hp<=1) return; + if(!target.hasFriend()) return; + var hastarget=false; + var turnfriend=false; + var players=game.filterPlayer(); + for(var i=0;i0&&players[i].isTurnedOver()){ + hastarget=true; + turnfriend=true; + } + } + if(get.attitude(player,target)>0&&!hastarget) return; + if(turnfriend||target.hp==target.maxHp) return [0.5,1]; + if(target.hp>1) return [1,0.5]; + } + }, + }, + }, + }, + repolu:{ + audio:1, + trigger:{ + source:'dieAfter', + player:'die', + }, + forceDie:true, + filter:function(event,player,name){ + return name=='die'||player.isAlive(); + }, + direct:true, + content:function(){ + 'step 0' + if(!player.storage.repolu) player.storage.repolu=0; + event.num=player.storage.repolu+1; + player.chooseTarget([1,Infinity],get.prompt('repolu'),'令任意名角色摸'+get.cnNumber(event.num)+'张牌').set('forceDie',true).ai=function(target){ + return get.attitude(_status.event.player,target); + }; + 'step 1' + if(result.bool){ + player.storage.repolu++; + result.targets.sortBySeat(); + player.logSkill('repolu',result.targets); + game.asyncDraw(result.targets,num); + } + else event.finish(); + 'step 2' + game.delay(); + }, + }, + rejiuchi:{ + group:['jiuchi'], + audioname:['re_dongzhuo'], + trigger:{source:'damage'}, + forced:true, + popup:false, + locked:false, + audio:'jiuchi', + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent(2).jiu==true&&!player.hasSkill('rejiuchi_air'); + }, + content:function(){ + player.logSkill('jiuchi'); + player.addTempSkill('rejiuchi_air'); + }, + subSkill:{ + air:{ + sub:true, + init:function(player,skill){ + player.disableSkill(skill,'benghuai'); + }, + onremove:function(player,skill){ + player.enableSkill(skill); + }, + }, + }, + }, + relieren:{ + shaRelated:true, + audio:2, + audioname:['boss_lvbu3'], + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&player.canCompare(event.target); + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + //priority:5, + content:function(){ + "step 0" + player.chooseToCompare(trigger.target); + "step 1" + if(result.bool){ + if(trigger.target.countGainableCards(player,'he')) player.gainPlayerCard(trigger.target,true,'he'); + } + else{ + var card1=result.player; + var card2=result.target; + if(get.position(card1)=='d') trigger.target.gain(card1,'gain2'); + if(get.position(card2)=='d') player.gain(card2,'gain2'); + } + } + }, + rezaiqi:{ + count:function(){ + var num=0; + game.countPlayer2(function(current){ + current.getHistory('lose',function(evt){ + if(evt.position==ui.discardPile){ + for(var i=0;i0; + }, + trigger:{ + player:'phaseDiscardEnd' + }, + content:function(){ + 'step 0' + player.chooseTarget([1,lib.skill.rezaiqi.count()],get.prompt2('rezaiqi')).ai=function(target){ + return get.attitude(_status.event.player,target); + }; + 'step 1' + if(result.bool){ + var targets=result.targets; + targets.sortBySeat(); + player.line(targets,'fire'); + player.logSkill('rezaiqi',targets); + event.targets=targets; + } + else event.finish(); + 'step 2' + event.current=targets.shift(); + if(player.isHealthy()) event._result={index:0}; + else event.current.chooseControl().set('choiceList',[ + '摸一张牌', + '令'+get.translation(player)+'回复一点体力', + ]).set('ai',function(){ + if(get.attitude(event.current,player)>0) return 1; + return 0; + }); + 'step 3' + if(result.index==1){ + event.current.line(player); + player.recover(); + } + else event.current.draw(); + game.delay(); + if(targets.length) event.goto(2); + }, + group:'rezaiqi_count', + }, + rezaiqi_count:{ + trigger:{ + global:["loseEnd","cardsDiscardEnd"], + player:'phaseAfter', + }, + silent:true, + forced:true, + popup:false, + filter:function (event,player,name){ + if(name=='phaseAfter') return true; + if(_status.currentPhase!=player) return false; + var evt=event.getParent(); + if(evt&&evt.name=='useCard'&&evt.card&&['equip','delay'].contains(get.type(evt.card))) return false; + var cards=event.cards; + for(var i=0;i②当你不因〖暴虐〗或〖助祭〗而进行的判定的判定牌生效后,若结果为:黑桃,你可对一名其他角色造成2点雷电伤害;梅花:你回复1点体力并可对一名其他其他角色造成1点雷电伤害。', + xinguidao_info:'一名角色的判定牌生效前,你可以打出一张黑色牌作为判定牌并获得原判定牌。若你以此法打出的牌为黑桃2-9,则你摸一张牌。', + reqiangxi:"强袭", + "reqiangxi_info":"出牌阶段对每名其他角色限一次,你可以选择一项:1. 失去一点体力并对你攻击范围内的一名其他角色造成一点伤害;2. 弃置一张武器牌并对你攻击范围内的一名其他角色造成一点伤害。", + rehuoji:"火计", + "rehuoji_info":"出牌阶段,你可一张红色牌当作【火攻】使用。", + rekanpo:"看破", + "rekanpo_info":"你可以将一张黑色牌当作【无懈可击】使用。", + rejieming:"节命", + "rejieming_info":"当你受到1点伤害后,你可以令一名角色摸两张牌。然后若其手牌数小于体力上限,则你摸一张牌。", + reshuangxiong:"双雄", + "reshuangxiong_info":"摸牌阶段,你可以放弃摸牌。若如此做,你展示牌堆顶的两张牌并选择获得其中的一张。然后,你本回合内可以将与此牌颜色不同的一张手牌当做【决斗】使用。当你受到【决斗】造成的伤害时,你可以获得对方于此决斗中打出的所有【杀】", + "reshuangxiong2":"双雄", + "reshuangxiong2_info":"", + + reguanxing:'观星', + reguanxing_info:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,若你将〖观星〗的牌都放在了牌堆底,则你可以在结束阶段再次发动〖观星〗。', + reluoshen:'洛神', + reluoshen_info:'准备阶段,你可以进行判定,若结果为黑色则获得此判定牌,且可重复此流程直到出现红色的判定结果。你通过〖洛神〗获得的牌,不计入当前回合的手牌上限', + reluoshen_info_guozhan:'准备阶段,你可以进行判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌。你通过〖洛神〗获得的牌,不计入当前回合的手牌上限。(结果为黑色的判定牌于此过程中不会进入弃牌堆)', + rejieyin:'结姻', + rejieyin_info:'出牌阶段限一次,你可以选择一名男性角色并弃置一张手牌或将装备区内的一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力。', + rebiyue:'闭月', + rebiyue_info:'结束阶段,你可以摸一张牌,若你没有手牌,则改为摸两张牌。', + rejizhi:'集智', + rejizhi_info:'当你使用锦囊牌时,你可以摸一张牌。若此牌为基本牌,则你可以弃置之,然后令本回合手牌上限+1。', + reqicai:'奇才', + reqicai_info:'锁定技,你使用锦囊牌无距离限制,你装备区内的防具牌和宝物牌不能被其他角色弃置。', + rezhiheng:'制衡', + rezhiheng_info:'出牌阶段限一次,你可以弃置任意张牌并摸等量的牌,若你在发动〖制衡〗时弃置了所有手牌,则你多摸一张牌。', + rejiuyuan:'救援', + rejiuyuan_info:'主公技,其他吴势力角色对自己使用【桃】时,若其体力值大于你,则其可以选择令你回复1点体力,然后其摸1张牌。', + + "new_yajiao":"涯角", + "new_yajiao_info":"每当你于回合外使用或打出牌时,你可以亮出牌堆顶的一张牌,并将其交给一名角色。若此牌与你此次使用或打出的牌类别不同,则你弃置一张牌。", + "new_liyu":"利驭", + "new_liyu_info":"当你使用【杀】对一名其他角色造成伤害后,你可以获得其一张牌。若此牌不为装备牌,则其摸一张牌。若此牌为装备牌,则视为你对其选择的另一名角色使用一张【决斗】。", + "new_retuxi":"突袭", + "new_retuxi_info":"摸牌阶段摸牌时,你可以少摸任意张牌,然后获得等量的角色的各一张手牌。", + "new_retuxi_info_guozhan":"摸牌阶段摸牌时,你可以少摸至多两张牌,然后获得等量的角色的各一张手牌。", + "new_reyiji":"遗计", + "new_reyiji_info":"当你受到1点伤害后,你可以摸两张牌,然后可以将至多两张手牌交给其他角色。", + "new_rejianxiong":"奸雄", + "new_rejianxiong_info":"当你受到伤害后,你可以获得对你造成伤害的牌并摸一张牌。", + "new_reluoyi":"裸衣", + "new_reluoyi_info":"摸牌阶段开始时,你展示牌堆顶的三张牌。然后,你可以放弃摸牌。若如此做,你获得其中的基本牌、武器牌和【决斗】,且直到你的下回合开始,你使用的【杀】或【决斗】造成伤害时,此伤害+1。否则,你将这些牌置入弃牌堆。", + "new_rewusheng":"武圣", + "new_rewusheng_info":"你可以将一张红色牌当做【杀】使用或打出。你使用的方片杀没有距离限制。", + "new_yijue":"义绝", + "new_yijue_info":"出牌阶段限一次,你可以弃置一张牌并令一名有手牌的其他角色展示一张手牌。若此牌为黑色,则该角色不能使用或打出牌,非锁定技失效且受到来自你的红桃【杀】的伤害+1直到回合结束。若此牌为红色,则你可以获得此牌,并可以令其回复一点体力。", + "new_yijue2":"义绝", + "new_yijue2_info":"", + "new_repaoxiao":"咆哮", + "new_repaoxiao_info":"锁定技,出牌阶段,你使用【杀】没有数量限制。若你于此出牌阶段内使用过【杀】,则你本回合内使用【杀】没有距离限制。", + "new_tishen":"替身", + "new_tishen_info":"出牌阶段结束时,你可以弃置你所有的锦囊牌与坐骑牌。若如此做,直到你的下个回合开始,你获得所有以你为目标且未对你造成伤害的【杀】。", + "new_tishen2":"替身", + "new_tishen2_info":"", + "new_qingjian":"清俭", + "new_qingjian_info":"当你于摸牌阶段外获得牌时,你可以展示任意张牌并交给一名其他角色。然后,当前回合角色本回合的手牌上限+X(X为你给出的牌中包含的类别数)。每回合限一次。", + "qingjian_add":"清俭", + "qingjian_add_info":"", + "new_reqingnang":"青囊", + "new_reqingnang_info":"出牌阶段,你可以弃置一张手牌,令一名本回合内未成为过〖青囊〗的目标的角色回复一点体力。若你弃置的是黑色牌,则你本回合内不能再发动〖青囊〗。", + "new_reyaowu":"耀武", + "new_reyaowu_info":"锁定技,当一名角色使用【杀】对你造成伤害时,若此杀为红色,该角色回复1点体力或摸一张牌。否则则你摸一张牌。", + reyaowu:'耀武', + reyaowu_info:'锁定技,当你受到牌造成的伤害时,若此牌为红色,则伤害来源摸一张牌;否则你摸一张牌。', + reqingguo:'倾国', + reqingguo_info:'你可以将一张黑色牌当做【闪】使用或打出。', + + qinxue:'勤学', + retuxi:'突袭', + reluoyi:'裸衣', + reluoyi2:'裸衣', + reganglie:'刚烈', + qingjian:'清俭', + reyingzi:'英姿', + refanjian:'反间', + refanjian_card:'弃牌', + refanjian_hp:'流失体力', + reqianxun:'谦逊', + reqianxun2:'谦逊', + relianying:'连营', + retishen:'替身', + retishen2:'替身', + reyajiao:'涯角', + rejianxiong:'奸雄', + rejianxiong_mopai:'摸牌', + rejianxiong_napai:'拿牌', + reyiji:'遗计', + reyiji2:'遗计', + yijue:'义绝', + yijue2:'义绝', + retieji:'铁骑', + refankui:'反馈', + reyicong:'义从', + qiaomeng:'趫猛', + rekurou:'苦肉', + zhaxiang:'诈降', + zhaxiang2:'诈降', + zhuhai:'诛害', + qianxin:'潜心', + jianyan:'荐言', + reguicai:'鬼才', + xunxun:'恂恂', + wangxi:'忘隙', + reguose:'国色', + fenwei:'奋威', + chulao:'除疠', + liyu:'利驭', + rerende:'仁德', + rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', + liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】', + xunxun_info:'摸牌阶段,你可以观看牌堆顶的四张牌,然后将其中的两张牌置于牌堆顶,并将其余的牌以任意顺序置于牌堆底。', + wangxi_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', + reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。', + fenwei_info:'限定技,当一名角色使用的锦囊牌指定了至少两名角色为目标时,你可以令此牌对其中任意名角色无效。', + chulao_info:'出牌阶段限一次,若你有牌,你可以选择任意名势力各不相同的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。', + reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之', + zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。', + qianxin_info:'觉醒技,当你造成一次伤害后,若你已受伤,你须减1点体力上限,并获得技能“荐言”。', + jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,并亮出牌库中第一张符合你声明的牌,然后你令一名男性角色获得此牌', + rekurou_info:'出牌阶段限一次,你可以弃置一张牌,然后失去1点体力。', + zhaxiang_info:'锁定技 每当你失去1点体力后,你摸三张牌。然后若此时是你的出牌阶段,则直到回合结束,你使用红色【杀】无距离限制且不能被【闪】响应,你可以额外使用一张【杀】。', + qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。', + reyicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', + refankui_info:'每当你受到1点伤害后,你可以获得伤害来源的一张牌。', + retieji_info:'当你使用【杀】指定一名角色为目标后,你可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。', + yijue_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,则直到回合结束,该角色不能使用或打出手牌且其非锁定技失效,若你没赢,你可令该角色回复一点体力。', + reyiji_info:'每当你受到1点伤害后,你可以摸两张牌。然后你可以在至多两名角色的武将牌旁边分别扣置至多两张手牌,这些角色的下个摸牌阶段开始时,该角色获得其武将牌旁的这些牌。', + rejianxiong_info:'每当你受到伤害后,你可以获得对你造成伤害的牌,然后摸一张牌。', + reyajiao_info:'每当你于回合外使用或打出一张手牌时,你可以亮出牌堆顶的一张牌,若此牌与你此次使用或打出的牌类别相同,你可以将之交给任意一名角色;若不同则你可以将之置入弃牌堆。', + retishen_info:'限定技,准备阶段开始时,你可以将体力回复至等同于你上回合结束时的体力值,然后你每以此法回复1点体力,便摸一张牌。', + reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的普通锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。', + relianying_info:'当你失去最后的手牌时,你可以令至多X名角色各摸一张牌(X为你此次失去的手牌数)。', + reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限为你的体力上限。', + refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或失去一点体力。', + qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色,每回合最多发动四次', + qinxue_info:'觉醒技,准备阶段开始时,若你的手牌数比体力值多3(人数不少于7时改为2)或更多,你须减一点体力上限并获得技能【攻心】', + retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。', + reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。', + reganglie_info:'每当你受到1点伤害后,可进行一次判定,若结果为红色,你对伤害来源造成1点伤害,若结果为黑色,你弃置其一张牌。', + botu:'博图', + botu_info:'回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。', + + xin_yuji:'界于吉', + re_zuoci:'界左慈', + "reguhuo":"蛊惑", + "reguhuo_info":"每名角色的回合限一次,你可以扣置一张手牌当一张基本牌或普通锦囊牌使用或打出。其他角色依次选择是否质疑。然后,你展示此牌。若有质疑的角色:若此牌为假,则此牌作废,且所有质疑者各摸一张牌;为真,则所有质疑角色须弃置一张牌或失去1点体力,并获得技能〖缠怨〗。", + "reguhuo_guess":"蛊惑", + "reguhuo_guess_info":"", + rechanyuan:"缠怨", + "rechanyuan_info":"锁定技,你不能质疑于吉,只要你的体力值不大于1,你失去你的武将技能。", + "reguhuo_respond":"蛊惑", + "reguhuo_respond_info":"", + "reguhuo_wuxie":"蛊惑", + "reguhuo_wuxie_info":"", + "reguhuo_phase":"蛊惑", + "reguhuo_phase_info":"", + rehuashen:'化身', + rehuashen_info:'游戏开始后,你随机获得三张未加入游戏的武将牌,选一张置于你面前并声明该武将牌的一项技能,你拥有该技能且同时将性别和势力属性变成与该武将相同直到该化身被替换。你的每个准备阶段和结束后,你可以选择一项:①弃置至多两张未展示的化身牌并重新获得等量化身牌;②更换所展示的化身牌或技能。(你不可声明限定技、觉醒技或主公技)。', + rexinsheng:'新生', + rexinsheng_info:'当你受到1点伤害后,你可以获得一张新的化身牌。', + re_zhurong:'界祝融', + re_menghuo:'界孟获', + re_dongzhuo:'界董卓', + re_sunjian:'手杀孙坚', + re_caopi:'界曹丕', + rejiuchi:'酒池', + rejiuchi_info:'你可以将一张黑桃手牌当做【酒】使用。锁定技,当你于回合内使用带有【酒】效果的【杀】造成伤害时,你令你的【崩坏】失效直到回合结束。', + repolu:'破虏', + repolu_info:'当你杀死一名角色/死亡时,你可以令任意名角色摸X+1张牌。(X为你此前发动过【破虏】的次数)', + rexingshang:'行殇', + rexingshang_info:'当其他角色死亡后,你可以选择一项:回复1点体力,或获得其所有牌。', + refangzhu:'放逐', + refangzhu_info:'当你受到伤害后,你可以令一名其他角色选择一项:摸X张牌并将武将牌翻面,或弃置X张牌并失去1点体力。(X为你已损失的体力值)', + relieren:'烈刃', + relieren_info:'当你使用【杀】指定目标后,你可以和目标角色进行拼点。若你赢,你获得其一张牌。若你没赢,你获得对方的拼点牌,其获得你的拼点牌。', + rezaiqi:'再起', + rezaiqi_info:'弃牌阶段结束时,你可以令至多X名角色选择一项:1.摸一张牌,2.令你回复1点体力(X为本回合进入弃牌堆的红色牌数)', + re_dengai:'界邓艾', + re_jiangwei:'界姜维', + re_caiwenji:'界蔡文姬', + re_baosanniang:'手杀鲍三娘', + retuntian:'屯田', + retiaoxin:'挑衅', + rebeige:'悲歌', + retuntian_info:'当你于回合外失去牌时,你可以进行一次判定。若判定结果为♥,你获得此判定牌。否则你将此牌置于你的武将牌上,称之为【田】。锁定技,你计算与其他角色的距离时-X(X为你武将牌上【田】的数目)', + retiaoxin_info:'出牌阶段限一次,你可以指定一名有牌的其他角色,该角色需对你使用一张【杀】,否则你弃置其一张牌。', + rebeige_info:'当有角色受到【杀】造成的伤害后,你可以弃一张牌,并令其进行一次判定,若判定结果为:♥该角色回复X点体力(X为伤害点数);♦︎该角色摸三张牌;♣伤害来源弃两张牌;♠伤害来源将其武将牌翻面', + re_liushan:'手杀刘禅', + re_sunben:'界孙笨', + re_zhangzhang:'界张昭张纮', + rehunzi:'魂姿', + rehunzi_info:'觉醒技,准备阶段,若你的体力值不大于2,你减1点体力上限,并获得技能〖英姿〗和〖英魂〗。', + rezhijian_info:'出牌阶段,你可以将手牌中的一张装备牌置于一名其他角色装备区里(不得替换原装备),然后摸一张牌。当你使用装备牌时,你可以摸一张牌。', + refangquan:'放权', + refangquan_info:'你可跳过你的出牌阶段,若如此做,你本回合的手牌上限为你的体力上限,且回合结束时,你可以弃置一张手牌并令一名其他角色进行一个额外的回合。', + re_wuguotai:'界吴国太', + re_gaoshun:'界高顺', + reganlu:'甘露', + reganlu_info:'出牌阶段限一次,你可以选择装备区牌数之差的绝对值不小于X的两名角色或包含你在内的两名角色,然后交换这两名角色装备区内的牌。(X为你已损失的体力值)', + repojun:'破军', + repojun2:'破军', + repojun3:'破军', + repojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上(X为其体力值),然后其于当前回合结束时获得这些牌。当你因执行【杀】的效果而对一名角色造成伤害时,若该角色的手牌数和装备区内的牌数均不大于你,则此伤害+1。', + rexianzhen:'陷阵', + rexianzhen_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你本回合内对其使用牌没有次数和距离限制。若你没赢,你本回合内不能使用【杀】。若你以此法失去的拼点牌为【杀】,则你的【杀】不计入本回合的手牌上限。', + rejinjiu:'禁酒', + rejinjiu_info:'锁定技,你的【酒】均视为【杀】。其他角色不能于你的回合内使用【酒】。当你受到酒【杀】的伤害时,你令此伤害-X(X为影响过此【杀】的伤害值的【酒】的数量)', + rejinjiu2:'禁酒', + rejinjiu3:'禁酒', + ol_xiahouyuan:'界夏侯渊', + shebian:'设变', + shebian_info:'当你的武将牌翻面后,你可以移动场上的一张装备牌。', + cangzhuo:'藏拙', + cangzhuo_info:'弃牌阶段开始时,若你本回合内没有使用过锦囊牌,则你的锦囊牌不计入手牌上限。', + re_zhangyi:'界张嶷', + rewurong:'怃戎', + rewurong_info:'出牌阶段限一次,你可以令一名其他角色与你同时展示一张手牌:若你展示的是【杀】且该角色展示的不是【闪】,则你对其造成1点伤害;若你展示的不是【杀】且该角色展示的是【闪】,则你获得其一张牌', + ol_pangtong:'界庞统', + olniepan:'涅槃', + olniepan_info:'限定技,当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。然后你选择获得以下技能中的一个:〖八阵〗/〖火计〗/〖看破〗', + ol_weiyan:'界魏延', + reqimou:'奇谋', + reqimou_info:'限定技,出牌阶段,你可以失去任意点体力并摸等量的牌,然后直到回合结束,你计算与其他角色的距离时-X,且你可以多使用X张【杀】(X为你失去的体力值)', + ol_xiaoqiao:'界小乔', + rehongyan:'红颜', + rehongyan_info:'锁定技,你区域内的黑桃牌和黑桃判定牌均视为红桃。当你于回合外正面朝上失去红桃牌后,若你的手牌数小于体力值,你摸一张牌。', + re_caozhi:'界曹植', + reluoying:'落英', + reluoying_discard:'落英', + reluoying_judge:'落英', + reluoying_info:'当其他角色的梅花牌因弃置或判定而进入弃牌堆时,你可以获得之。', + rejiushi:'酒诗', + rejiushi_info:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面并获得牌堆中的一张随机锦囊。', + rejiushi1:'酒诗', + rejiushi3:'酒诗', + rejiushi_mark:'酒诗·改', + rejiushi_mark_info:'当你需要使用【酒】时,若你的武将牌正面向上,你可以翻面,视为使用一张【酒】。当你受到伤害后,若你的武将牌背面向上,你可以翻面。当你翻面时,你获得牌堆中的一张随机锦囊。', + chengzhang:'成章', + chengzhang_info:'觉醒技,准备阶段开始时,若你造成伤害与受到伤害值之和累计7点或以上,则你回复1点体力并摸1张牌,然后改写〖酒诗〗。', + re_wuyi:'界吴懿', + re_zhuran:'界朱然', + re_quancong:'界全琮', + re_liaohua:'界廖化', + re_guohuai:'界郭淮', + re_chengpu:'界程普', + rechunlao:'醇醪', + rechunlao2:'醇醪', + rechunlao_info:'结束阶段开始时,若你没有“醇”,你可以将至少一张【杀】置于你的武将牌上,称为“醇”。当一名角色处于濒死状态时,你可以移去一张“醇”,视为该角色使用一张【酒】,然后若此“醇”的属性为:火,你回复1点体力、雷,你摸两张牌。', + re_caozhang:'界曹彰', + yujin_yujin:'界于禁', + rejieyue:'节钺', + rejieyue_info:'结束阶段开始时,你可以将一张牌交给一名其他角色。然后其选择一项:令你摸三张牌:或其保留一张手牌和装备区的牌,然后弃置其余的牌。', + re_lingtong:'界凌统', + rexuanfeng:'旋风', + rexuanfeng_info:'当你失去装备区内的牌时,或于弃牌阶段弃置了两张或更多的手牌后,你可以依次弃置一至两名其他角色的共计两张牌,或将一名其他角色装备区内的一张牌移动到另一名其他角色的装备区内。', + olpaoxiao:'咆哮', + olpaoxiao2:'咆哮', + olpaoxiao_info:'①锁定技,你使用【杀】无次数限制。②锁定技,当你使用的【杀】被【闪】抵消时,你获得一枚“咆”(→)当你因【杀】造成伤害时,你弃置所有“咆”并令伤害值+X(X为“咆”数)。回合结束后,你弃置所有“咆”。', + oltishen:'替身', + oltishen_info:'限定技,准备阶段,你可以将体力回复至上限,然后摸X张牌(X为你回复的体力值)。', + ollongdan:'龙胆', + ollongdan_info:'你可以将一张【杀】当做【闪】、【闪】当做【杀】、【酒】当做【桃】、【桃】当做【酒】使用或打出。', + olyajiao:'涯角', + olyajiao_info:'当你于回合外因使用或打出而失去手牌后,你可以展示牌堆顶的一张牌。若这两张牌的类别相同,你可以将展示的牌交给一名角色;若类别不同,你可弃置攻击范围内包含你的角色区域里的一张牌。', + re_zhonghui:'界钟会', + re_handang:'界韩当', + requanji:'权计', + requanji_info:'出牌阶段结束时,若你的手牌数大于体力值,或当你受到1点伤害后,你可以摸一张牌,然后将一张手牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', + regongji:'弓骑', + regongji_info:'出牌阶段限一次,你可以弃置一张非基本牌,然后弃置一名其他角色的一张牌。锁定技,当你的装备区内有坐骑牌时,你的攻击范围无限。', + ol_sunjian:'界孙坚', + wulie:'武烈', + wulie2:'武烈', + wulie_info:'限定技,结束阶段,你可以失去任意点体力并指定等量的角色。这些角色各获得一枚「烈」。有「烈」的角色受到伤害时,其移去一枚「烈」,然后防止此伤害。', + re_sunluban:'界孙鲁班', + re_masu:'界马谡', + ol_pangde:'界庞德', + rejianchu:'鞬出', + rejianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌不为基本牌,此【杀】不可被【闪】响应且你本回合使用【杀】的次数上限+1,为基本牌,该角色获得此【杀】', + re_taishici:'界太史慈', + hanzhan:'酣战', + hanzhan_info:'当你发起拼点时,或成为拼点的目标时,你可以令对方选择拼点牌的方式改为随机选择一张手牌。', + re_jianyong:'界简雍', + xin_xusheng:'界徐盛', + decadepojun:'破军', + decadepojun2:'破军', + decadepojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上(X为其体力值)。若这些牌中:有装备牌,你将这些牌中的一张置于弃牌堆;有锦囊牌,你摸一张牌。其于回合结束时获得其武将牌上的这些牌。', + old_madai:'界马岱', + wangyi:'界王异', + guanzhang:'界关兴张苞', + xin_fazheng:'界法正', + + refresh_standard:'界限突破·标', + refresh_feng:'界限突破·风', + refresh_huo:'界限突破·火', + refresh_lin:'界限突破·林', + refresh_shan:'界限突破·山', + refresh_yijiang1:'界限突破·将1', + refresh_yijiang2:'界限突破·将2', + refresh_yijiang3:'界限突破·将3', + refresh_yijiang4:'界限突破·将4', + refresh_yijiang5:'界限突破·将5', + }, + }; +}); diff --git a/character/shenhua.js b/character/shenhua.js index b1d5075c8..0ab91fc92 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -633,6 +633,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'linkBegin' }, forced:true, + filter:function(event,player){ + return !player.isLinked(); + }, content:function(){ trigger.cancel(); }, @@ -1588,7 +1591,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function (event,player){ return (player.getHistory('useCard',function(evt){ return evt.getParent('phaseUse')==event; - }).length=Math.max(Math.abs(current.hp-player.hp),1); + num>=Math.max(Math.abs(current.hp-player.hp),1); })&&player.storage.nzry_zhenliang!=true; }, filterTarget:function(card,player,target){ - return player.storage.nzry_mingren!=undefined&& - target!=player&& + return target!=player&& player.inRange(target)&& player.countCards('he',{color:get.color(player.storage.nzry_mingren[0])})>=Math.max(Math.abs(target.hp-player.hp),1); }, diff --git a/character/sp.js b/character/sp.js index 4e8f7272b..9d623e4ee 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1,14977 +1,14976 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'sp', - connect:true, - characterSort:{ - sp:{ - sp_default:["caoying","simahui","yangxiu","chenlin","caohong","xiahouba","yuanshu","sp_diaochan","sp_zhaoyun","liuxie","zhugejin","zhugeke","guanyinping","simalang","zhangxingcai","fuwan","sp_sunshangxiang","caoang","sp_caoren","zhangbao","maliang","zhugedan","sp_jiangwei","sp_machao","sunhao","shixie","mayunlu","zhanglu","wutugu","sp_caiwenji","zhugeguo","lingju","jsp_guanyu","jsp_huangyueying","sunluyu","zumao","wenpin","daxiaoqiao","tadun","yanbaihu","chengyu","wanglang","sp_pangde","sp_jiaxu","litong","mizhu","buzhi","caochun","dongbai","zhaoxiang","mazhong","dongyun","kanze","heqi","wangyun","sunqian","xizhicai","quyi","luzhi","xujing","yuantanyuanshang","sunshao","zhangling",'guansuo','baosanniang','ol_zhangchangpu'], - sp_zhongdan:["cuiyan","huangfusong"], - sp_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei"], - sp_sticker:['sp_gongsunzan','sp_simazhao','sp_wangyuanji','sp_xinxianying','sp_liuxie'], - sp_guozhan:["zangba","shamoke","ganfuren","yuejin","hetaihou","dingfeng","panfeng","jianggan"], - sp_guozhan2:["mifuren","mateng","tianfeng","chendong","sp_dongzhuo","jiangfei","jiangqing","kongrong","bianfuren","liqueguosi","lvfan","cuimao","jiling","zhangren","zoushi"], - sp_single:["hejin","hansui","niujin"], - sp_others:["hanba","caiyang"], - }, - }, - characterFilter:{}, - character:{ - ol_zhangchangpu:['female','wei',3,['yanjiao','olxingshen']], - zhangling:['male','qun',4,['zlhuji','zlshoufu'],['unseen']], - caiyang:['male','qun',1,['yinka'],['forbidai','unseen']], - panfeng:['male','qun',4,['kuangfu']], - sunshao:['male','wu',3,['bizheng','yidian']], - sp_gongsunzan:['male','qun',4,['spyicong','sptuji']], - sp_simazhao:['male','wei',3,['spzhaoxin','splanggu']], - sp_wangyuanji:['female','wei',3,['spfuluan','spshude']], - sp_xinxianying:['female','wei',3,['spmingjian','spyinzhi']], - sp_liuxie:['male','qun',3,['sphuangen','sphantong']], - - huangfusong:['male','qun',4,['xinfenyue']], - yuantanyuanshang:['male','qun',4,['neifa']], - xujing:['male','shu',3,['yuxu','xjshijian']], - - hejin:['male','qun',4,['mouzhu','yanhuo']], - hansui:['male','qun',4,['mashu','niluan']], - niujin:['male','wei',4,['cuorui','liewei']], - jianggan:["male","wei",3,["weicheng","daoshu"]], - - caoying:["female","wei",4,["xinfu_lingren","xinfu_fujian"],[]], - simahui:["male","qun",3,["xinfu_jianjie","xinfu_chenghao","xinfu_yinshi"],[]], - baosanniang:["female","shu",3,["xinfu_wuniang","xinfu_xushen"],[]], - - sp_xiahoushi:["female","shu",3,["xinfu_yanyu","xinfu_xiaode"],[]], - - - yangxiu:['male','wei',3,['jilei','danlao']], - chenlin:['male','wei',3,['bifa','songci']], - caohong:['male','wei',4,['yuanhu']], - xiahouba:['male','shu',4,['baobian']], - yuanshu:['male','qun',4,['yongsi','weidi']], - sp_diaochan:['female','qun',3,['lihun','rebiyue']], - sp_zhaoyun:['male','qun',3,['ollongdan','chongzhen']], - jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren']], - liuxie:['male','qun',3,['tianming','mizhao']], - zhugejin:['male','wu',3,['hongyuan','huanshi','mingzhe']], - zhugeke:['male','wu',3,['aocai','duwu']], - guanyinping:['female','shu',3,['huxiao','xueji','wuji']], - simalang:['male','wei',3,['junbing','quji']], - zhangxingcai:['female','shu',3,['shenxian','qiangwu']], - fuwan:['male','qun',4,['moukui']], - sp_sunshangxiang:['female','shu',3,['liangzhu','fanxiang']], - caoang:['male','wei',4,['kaikang']], - sp_caoren:['male','wei',4,['weikui','lizhan']], - zhangbao:['male','qun',3,['rezhoufu','reyingbing']], - huangjinleishi:['female','qun',3,['fulu','fuji']], - maliang:['male','shu',3,['zishu','xinyingyuan']], - sp_pangtong:['male','qun',3,['xinmanjuan','zuixiang']], - zhugedan:['male','wei',4,['gongao','juyi']], - sp_jiangwei:['male','wei',4,['kunfen','fengliang']], - sp_machao:['male','qun',4,['zhuiji','ol_shichou']], - sunhao:['male','wu',5,['recanshi','rechouhai','guiming'],['zhu']], - shixie:['male','qun',3,['rebiluan','relixia']], - mayunlu:['female','shu',4,['fengpo','mashu']], - zhanglu:['male','qun',3,['yishe','bushi','midao']], - wutugu:['male','qun',15,['ranshang','hanyong']], - sp_caiwenji:['female','wei',3,['chenqing','mozhi']], - zhugeguo:['female','shu',3,['yuhua','qirang']], - - lingju:['female','qun',3,['jieyuan','fenxin']], - - cuiyan:['male','wei',3,['yawang','xunzhi']], - sp_zhangfei:['male','shu',4,['jie','dahe']], - jsp_guanyu:['male','wei',4,['new_rewusheng','danji']], - jsp_huangyueying:['female','qun',3,['jiqiao','linglong']], - sunluyu:['female','wu',3,['new_meibu','new_mumu']], - hanba:['female','qun',4,['fentian','zhiri']], - zumao:['male','wu',4,['yinbing','juedi']], - wenpin:['male','wei',4,['zhenwei']], - daxiaoqiao:['female','wu',3,['new_xingwu','new_luoyan']], - sp_daqiao:['female','wu',3,['yanxiao','anxian']], - sp_ganning:['male','qun',4,['yinling','junwei']], - sp_xiahoudun:['male','wei',4,['fenyong','xuehen'],['die_audio']], - sp_lvmeng:['male','wu',3,['tanhu','mouduan']], - - guansuo:['male','shu',4,['xinzhengnan','xiefang']], - tadun:['male','qun',4,['luanzhan']], - yanbaihu:['male','qun',4,['zhidao','jili']], - chengyu:['male','wei',3,['shefu','benyu']], - - wanglang:['male','wei',3,['gushe','jici']], - sp_pangde:['male','wei',4,['mashu','juesi']], - sp_jiaxu:['male','wei',3,['zhenlue','jianshu','yongdi']], - - litong:['male','wei',4,['tuifeng']], - mizhu:['male','shu',3,['ziyuan','jugu']], - buzhi:['male','wu',3,['hongde','dingpan']], - - sp_liubei:['male','shu',4,['zhaolie','shichou'],['zhu']], - caochun:['male','wei',4,['xinshanjia']], - - dongbai:['female','qun',3,['lianzhu','xiehui']], - - zhaoxiang:['female','shu',4,['refanghun','refuhan']], - mazhong:['male','shu',4,['fuman']], - dongyun:['male','shu',3,['bingzheng','sheyan']], - kanze:['male','wu',3,['xiashu','kuanshi']], - heqi:['male','wu',4,['qizhou','shanxi']], - - ganfuren:['female','shu',3,['shushen','shenzhi']], - mifuren:['female','shu',3,['guixiu','cunsi']], - mateng:['male','qun',4,['xiongyi','mashu']], - tianfeng:['male','qun',3,['sijian','suishi']], - yuejin:['male','wei',4,['xiaoguo']], - chendong:['male','wu',4,['duanxie','fenming']], - sp_dongzhuo:['male','qun',5,['hengzheng']], - jiangfei:['male','shu',3,['shengxi','shoucheng']], - jiangqing:['male','wu',4,['shangyi','zniaoxiang']], - hetaihou:['female','qun',3,['zhendu','qiluan']], - kongrong:['male','qun',3,['lirang','mingshi']], - dingfeng:['male','wu',4,['fenxun','duanbing']], - bianfuren:['female','wei',3,['wanwei','yuejian']], - shamoke:['male','shu',4,['gzjili']], - liqueguosi:['male','qun',4,['xiongsuan']], - lvfan:['male','wu',3,['diaodu','diancai']], - cuimao:['male','wei',3,['zhengbi','fengying']], - - jiling:['male','qun',4,['shuangren']], - zangba:['male','wei',4,['rehengjiang']], - zhangren:['male','qun',4,['chuanxin','zfengshi']], - zoushi:['female','qun',3,['zhuoshui','zqingcheng']], - - wangyun:['male','qun',4,['xinlianji','xinmoucheng']], - sunqian:['male','shu',3,['qianya','shuimeng']], - xizhicai:['male','wei',3,['tiandu','xianfu','chouce']], - quyi:['male','qun',4,['fuqi','jiaozi']], - - luzhi:['male','wei',3,['qingzhongx','weijing']], - - //kaisa:["male","western",4,["zhengfu"]], - }, - characterIntro:{ - zhangling:'张道陵(34年2月22日—156年),字辅汉,原名陵,道教正一道实际创立者,汉朝东汉时期丰邑(今江苏徐州丰县)人。太上老君降临蜀地,“授以三天正法,命为天师”,张道陵整合当时的:黄老派、方仙道、文始派等先秦修道团体,创立道教称正一盟威之道。后世尊称为“老祖天师”、“正一真人”、“三天扶教大法师”、高明上帝、张天师。著作《老子想尔注》,弟子有3000多人,设立24治,奠基天师道。张道陵、葛玄、许逊、萨守坚合称四大天师。张道陵创建道教的背景:当时在巴蜀一带,原有巴人信奉原始巫教,大规模的淫祀而害民。而这些祀奉鬼妖(学名为:妖邪)的法教巫师聚众敛财,无恶不作。张天师携王长、赵升二位弟子和黄帝九鼎丹经,来到北邙山修行,平定了那些祸害百姓的巫妖之教。川渝一带流传的张天师以太上老君剑印符箓大破鬼兵的故事就是以此为原型的。', - caiyang:'蔡阳(?-201年),又作蔡扬,东汉丞相曹操部下武将,汝南太守。于建安六年(201)奉曹操之命攻击与刘备联合的汝南贼龚都等人,兵败被刘备所杀。明代小说《三国演义》改编为“云长擂鼓斩蔡阳”。', - pujing:'湖北省当阳境内有一座山,名叫玉泉山。东汉建安末年,山上住着一个老和尚,法名普净,普净原来是沂水关镇国寺方丈,后因云游天下,来到此处,风这地方山明水秀,就于山中结草为庵,每天坐禅参道,身边只有一个小和尚,外出化一些斋饭,供养师父。在《三国演义》中,当关羽通过汜水关时,正是由于普净提醒,关羽才揭穿了卞喜的阴谋,并杀死了卞喜。关羽死后,其怨魂亦在普净的指点下醒悟,放下了心中的仇恨,专心致力于造福一方百姓。', - huban:'为《三国演义》所杜撰的人物,正史无记载,荥阳太守王植麾下从事、桓帝时议郎胡华之子。关羽过五关斩六将时其中一关就是王植所镇守,胡班奉命放火夜袭关公,因敬服公之气概,并得其父托公所带家书,班看毕,叹曰:“险些误杀忠良!”故将之放走。胡班到荆州来投降关公,公念其旧日相救之情,甚爱之;令随费诗入川,见汉中王受爵。费诗辞别关公,带了胡班,自回蜀中去了。', - chunyuqiong:'淳于琼(?-200年),字仲简,颍川(治今河南禹州)人。东汉时期官吏,于汉灵帝中平五年(188)被任命为西园八校尉之一的右校尉,与蹇硕、袁绍、鲍鸿、曹操、赵融、冯芳、夏牟同列。为袁绍大将,与张郃、高览等人齐名。在官渡之战时镇守乌巢,遭到曹操的偷袭而惨败,自己也被曹操处斩。', - lvkuanglvxiang:'吕旷(生卒年不详),与吕翔同是袁绍属下,袁绍去世后,为袁尚守东平,后来投降曹操,并被封为列侯。在《三国演义》中,在曹操准备往南准备攻击前,两人跟著大将曹仁和将军李典准备要攻击刘备。但吕旷被赵云刺下马身亡,而吕翔也死于张飞矛下,可以算是出师未捷身先死', - caobuxing:'曹不兴,亦名弗兴,三国时著名画家。孙吴吴兴(今浙江湖州)人,生卒年不详。他在黄武年间(222—229年)享有很大的声誉。被称为“佛画之祖”。与东晋顾恺之、南朝宋陆探微、南朝梁张僧繇并称“六朝四大家”。又与赵达的算术、严武的弈棋、皇象的草书等号称“吴中八绝”。曹不兴善画龙、虎、马及人物,有“落墨为蝇”等传奇故事,其佛画成就对后世影响很大,相传其所画龙头令谢赫叹服不已。画迹今已不存,据《贞观公私画史》载,作品有《青溪龙》、《赤盘龙》、《南海监牧进十种马图》、《夷事夷兽样》、《桃源图》等,惜早已散佚。 但之后的著名画家卫协直接师承其法。', - gaolan:'高览,生卒年不详,一名高奂,本属袁绍部将,后官渡之战淳于琼被曹操击破,与张郃一同投降曹操,被封为偏将军,东莱侯。《三国演义》里,曾与许褚、徐晃大战不分胜负。201年刘备败走荆州时,高览奉命追杀,三合斩刘辟,而后被冲阵而来的赵云刺死。', - xunchen:'荀谌,字友若,荀彧之兄(一说荀彧之弟),荀绲之子,颍川人。曾任军阀袁绍的幕僚。帮助袁绍游说韩馥,夺取了冀州。', - sunshao:'孙邵(163年-225年),字长绪,青州北海国人(今山东潍坊市昌乐县西)。原为北海相孔融的功曹,被孔融称赞为可任朝廷要职的人才,后随刘繇到达江东,继而辅佐孙权。孙权称吴王后,孙邵成为吴国首任丞相,数年后病逝。由于孙邵和当时吴国史官的关系并不是很好,因此在史书中并没有详细的记载。', - yuantanyuanshang:'袁谭、袁尚分别是袁绍的长子和第三子。袁绍坐拥青州、冀州、幽州、并州,本是北方最强诸侯,却于官渡大败,惭恨而终。虽然袁绍生前偏爱小儿子袁尚,却并未在继承人上有明确表态,这也导致本应以嫡长子身份继承的袁谭因郭图、审配伪立遗令未能如愿。曹操击败袁绍后,进而渡过黄河追击袁家残余势力,袁谭告急,但袁尚仅给他少量兵力。曹操得郭嘉之计退兵坐观其变,恰使两人此前的种种矛盾彻底爆发,袁谭不敌便引狼入室,派辛毗作为使者向曹操求援,让袁尚不得不北逃投奔乌桓。但袁谭也在之后背叛曹操兵败被杀。没多久,乌桓也被平定,袁熙、袁尚二人投奔公孙康后被斩首送还曹操。', - xujing:'许靖(?—222年),字文休。汝南郡平舆县(今河南省平舆县)人。汉末至三国蜀汉时期重臣、名士、评论家。许靖因与从弟许邵俱以品评人物而闻名于世。后被刘翊推举为孝廉,任尚书郎。曾先后投奔孔伷、陈祎、许贡、王朗等人,于孙策攻王朗前与家属俱避难交州,受到交趾太守士燮礼待。其后受益州牧刘璋邀请,相继为巴郡、广汉、蜀郡太守。于刘备包围成都时欲越墙叛逃,为刘璋所获。刘备定蜀后欲将其弃用,在法正的建议下方以其为左将军长史。建安二十三年(218年),刘备称汉中王,任命许靖为汉中王傅。章武元年(221年),刘备称帝,任命许靖为司徒,位列三公。章武二年(222年),去世。有文集二卷。', - hejin:'何进(?~189年),字遂高,南阳郡宛县(今河南南阳市宛城区)人。东汉时期外戚大臣,灵思皇后之兄。初以妹妹有宠,拜为郎中,出任虎贲中郎将、颍川太守,迁侍中、将作大匠、河南尹。黄巾起义时,拜为大将军,总镇京师,发现并镇压马元义的密谋,封为慎侯。为张大威望,在京师讲武结营,置西园八校尉。汉灵帝驾崩后,粉碎了中常侍蹇硕拥立皇子刘协的图谋,听从袁绍之言,博征智谋之士,内借元舅之资,外据辅政之权,独揽朝中大权。中平六年(189),不纳陈琳和曹操劝谏,阴结军阀董卓,联合袁绍谋诛宦竖。事情败露后,为中常侍张让等人损害,其后代是魏晋高门士族南阳何氏。', - hansui:'韩遂(?-215年),字文约。凉州金城郡人。东汉末年军阀、将领,汉末群雄之一。原名韩约,后改名遂。韩遂最初闻名于西州,被羌胡叛军劫持并推举为首领,以诛宦官为名举兵造反,聚众十万,先后败皇甫嵩、张温、董卓、孙坚等名将,使得天下骚动。后受朝廷招安,拥兵割据一方长达三十余年。韩遂曾与马腾结为异姓兄弟,后二人关系破裂。袁绍、曹操相争之际,马腾、韩遂被钟繇说服,依附于曹操。马腾入京后,留其子马超统领部队。马超推举韩遂为都督起兵反叛曹操,为曹操所败,韩遂逃奔凉州,后又为夏侯渊所败,病死(一说被杀),享年七十余岁。', - niujin:'牛金(生卒年不详),初为曹仁部曲将,周瑜军数万人来攻,前锋数千人始至,曹仁登城望,乃募得三百人,遣牛金迎战。但对方兵力较多,牛金遂被围困。曹仁亲自杀入阵中救出牛金。司马懿使牛金轻骑饵诱蜀军,刚交战诸葛亮就退兵,追至祁山。蜀将马岱入寇,司马懿遣将军牛金击退,斩千余级。公孙渊反,司马懿帅牛金、胡遵等步骑四万发自洛阳,后平定辽东。牛金官至后将军。', - jianggan:"蒋干,字子翼,汉末三国时期的人物,九江(治今安徽寿县)人。历史上的蒋干是当时的名士、辩论家。而罗贯中在历史小说《三国演义》中则将蒋干刻画成了被周瑜所愚弄的小丑形象。", - huangjinleishi:"黄巾军中负责施法的女祭司二人组。", - - caoying:"曹婴是在电影《三国志之见龙卸甲》中登场的虚拟人物,由李美琪饰演。曹婴是曹操的孙女,弓马娴熟,文武双全,深得曹操的用兵之道及心术。于凤鸣山一战中担任魏军大都督阻止诸葛亮北伐并因罗平安的告密而全歼关兴、张苞、赵云率领的蜀军部队。", - simahui:"司马徽(约145—208年),字德操,颍川阳翟(今河南禹州)人。东汉末年名士,精通道学、奇门、兵法、经学。有“水镜先生”之称。 司马徽为人清雅,学识广博,有知人之明,并向刘备推荐了诸葛亮、庞统等人,受到世人的敬重。", - baosanniang:"鲍三娘是中国民间传说中的人物,事迹多见于《花关索传》。相传她是鲍家庄鲍员外的小女儿。后来与关索成亲,关羽自传授其武艺,因此也造就了鲍三娘的文武双全。荆州失守之后鲍三娘就跟随关索一同投奔蜀汉,并随诸葛亮征讨南蛮。平定了南蛮之后,夫妻二人就此一直替诸葛亮镇守着南中,他们也的确留下了许多脍炙人口的行侠仗义故事,在民间广为流传。", - - pangdegong:"庞德公,字尚长,荆州襄阳人,东汉末年名士、隐士。 庞德公与当时徐庶、司马徽、诸葛亮、庞统等人交往密切。庞德公曾称诸葛亮为\"卧龙\",庞统为\"凤雏\",司马徽为\"水镜\",被誉为知人。对诸葛亮、庞统等人早年影响较大,并得到诸葛亮的敬重。庞德公最后隐居于鹿门山,采药而终。", - zhaotongzhaoguang:"赵统,赵云长子,生卒年不详。常山真定(今为河北正定)人,陈寿在正史《三国志》中记载赵云去世后,赵统袭爵永昌亭侯,官至蜀汉虎贲中郎督,加行领军。赵广(?—263年),三国时期蜀汉牙门将,赵云的次子,赵统之弟。随姜维前往沓中,官拜牙门将。曹魏司马氏派五路大军伐蜀时,随大将军姜维与魏兵战于疆川口,姜维败绩还守剑阁,赵广于沓中战死。", - majun:"马钧,字德衡,扶风(今陕西扶风)人,生活在汉朝末期,是中国古代科技史上最负盛名的机械发明家之一。马钧年幼时家境贫寒,自己又有口吃的毛病,所以不擅言谈却精于巧思,后来在魏国担任给事中的官职。马钧最突出的表现有还原指南车;改进当时操作笨重的织绫机;发明一种由低处向高地引水的龙骨水车;制作出一种轮转式发石机,能连续发射石块,远至数百步;把木制原动轮装于木偶下面,叫做“水转百戏”。此后,马钧还改制了诸葛连弩,对科学发展和技术进步做出了贡献。", - simazhao:"司马昭(211年—265年9月6日),字子上(小说《三国演义》为子尚),河内温县(今属河南)人。三国时期曹魏权臣,西晋王朝的奠基人之一。为晋宣帝司马懿与宣穆皇后张春华次子、晋景帝司马师之弟、晋武帝司马炎之父。 司马昭早年随父抗击蜀汉,多有战功。累官洛阳典农中郎将,封新城乡侯。正元二年(255年),继兄司马师为大将军,专揽国政。甘露五年(260年),魏帝曹髦被弑杀,司马昭立曹奂为帝。景元四年(263年),分兵遣钟会、邓艾、诸葛绪三路灭亡蜀汉,受封晋公。次年,进爵晋王。 咸熙二年(265年),司马昭病逝,年五十四,葬于崇阳陵。数月后,其子司马炎代魏称帝,建立晋朝,追尊司马昭为文帝,庙号太祖。", - wangyuanji:"王元姬(217年—268年4月20日),东海郯县(今山东郯城西北)人。三国时期曹魏经学家王朗之孙女、王肃之女,晋文帝司马昭妻子,晋武帝司马炎与齐王司马攸的生母。 王元姬幼时便通《诗经》、《论语》,嫁司马昭后竭尽妇道、谦虚谨慎。其人颇有远见,曾预言钟会谋反之事。泰始元年(265年),司马炎建立西晋,尊王元姬为皇太后,宫号曰崇化宫。王元姬身处太后之位,提倡节俭,身体力行,作为众妃子的表率。在其治理之下,后宫井井有条,众人和睦相处。 泰始四年(268年),王元姬崩逝,终年五十二岁。谥号文明皇后,与司马昭合葬于崇阳陵。", - - liuye:'刘晔(?-234年),字子扬,淮南成德人,是光武帝刘秀之子阜陵王刘延的后代,三国时期魏国著名的战略家。刘晔年少知名,人称有佐世之才,是曹操手下举足轻重的谋士,他屡献妙计,对天下形势的发展往往一语中的。刘晔历仕数朝,是曹魏的三朝元老。', - luzhi:'鲁芝(190年—273年),字世英。扶风郡郿县(今陕西眉县)人。魏晋时期名臣。官至光禄大夫,位特进,封阴平侯。泰始九年(273年)卒,时年八十四。谥号“贞”。', - xizhicai:'戏志才(生卒年不详),或志才为字,名不详(一说名忠),东汉颍川郡(今河南禹州)人。经张邈推荐,成为曹操手下谋士。为人多谋略,曹操十分器重,不幸早卒。三国演义中并无此人,三国志中只有寥寥数语。由荀彧推荐给曹操,被称为有“负俗之讥”。死后,荀彧又举荐了郭嘉。
    陈寿《三国志》记载:太祖与荀彧书曰:自志才亡后,莫可与计事者。汝、颍固多奇士,谁可以继之?彧荐嘉。', - sunqian:'孙乾(?—约215年),字公祐。北海郡(治今山东昌乐西)人。东汉末年刘备的幕僚。最初被大儒郑玄推荐于州里。刘备领徐州,以孙乾为从事。自徐州跟随刘备,多次作为刘备的使臣。刘备定益州后,拜孙乾为秉忠将军,其待遇仅次于麋竺,与简雍相同。不久后便病逝。', - miheng:'祢衡(173年-198年),字正平,平原郡(今山东德州临邑德平镇)人。个性恃才傲物.和孔融交好。孔融著有《荐祢衡表》,向曹操推荐祢衡,但是祢衡称病不肯去,曹操封他为鼓手,想要羞辱祢衡,却反而被祢衡裸身击鼓而羞辱。后来祢衡骂曹操,曹操就把他遣送给刘表,祢衡对刘表也很轻慢,刘表又把他送去给江夏太守黄祖,最后因为和黄祖言语冲突而被杀,时年二十六岁。黄祖对杀害祢衡一事感到十分后悔,便将其加以厚葬。', - quyi:'麴义(又作曲义、鞠义),生卒年不详,是东汉末年军阀袁绍部下的将领,能征善战,屡建战功,早年在凉州,精通羌人战法,率领着袁绍的精锐部队。后来由于自恃功高而骄纵不轨,被袁绍所杀。', - taoqian:'陶谦(132年-194年),字恭祖。丹阳郡(治今安徽宣城)人。汉末群雄之一。陶谦最初为诸生,在州郡任职,被举茂才,历任舒、卢二县令、幽州刺史、议郎,性格刚直,有大志。后随左车骑将军皇甫嵩对抗北宫伯玉,任扬武校尉,之后又随张温征韩遂、边章。中平五年(188年),徐州黄巾起,陶谦被朝廷任为徐州刺史,击破徐州黄巾,并推行屯田,恢复生产。尔后听从王朗、赵昱建议遣使进京朝贡,获拜安东将军、徐州牧,封溧阳侯。晚年因战事上为曹操大败,徐州大半几乎遭兵祸所害,以致过度忧劳而逝,终年六十三岁。', - wangyun:'王允(137~192年),字子师,太原郡祁县(今山西祁县)人。东汉末年时期大臣。出身太原王氏,世代官宦。举孝廉出身,司徒高第征为侍御史。出任豫州刺史,勤政爱民。斗争中常侍张让失败后,去官隐居。中平六年,大将军何进掌权之后,辟为从事中郎,迁河南尹。董卓拥立汉献帝即位后,代替杨彪,拜太仆、尚书令、司徒,密谋刺死董卓,联合吕布共同执政,日益骄傲自满。初平三年(192年),董卓余党李傕、郭汜、樊稠等攻破长安。王允兵败处死,时年五十六岁。', - bianfuren:'武宣皇后卞氏(159年12月30日-230年7月9日),琅邪开阳(今山东临沂)人,魏武帝曹操的正妻(继室),魏文帝曹丕、任城威王曹彰、陈思王曹植、萧怀王曹熊的母亲。原本是倡家,即汉代专门从事音乐歌舞的乐人家庭,后来与曹操成婚,建安初年,原配丁夫人被废,卞夫人成为曹操的正妻。曹丕继位后尊其为皇太后,曹叡继位后尊其为太皇太后。卞后在太和四年去世,与魏武帝曹操合葬高陵。', - shamoke:'沙摩柯(?-222年),东汉末三国时期五溪蛮首领。汉章武元年(221年)初,为报关羽被东吴杀害之仇,刘备亲自领兵攻孙权,以金锦爵赏诱沙摩柯助战。章武二年(222年),吴大都督陆逊以火攻破刘备,率诸军齐击,汉军四十多个营寨被攻破,沙摩柯在大乱中匹马奔逃,被乱军杀死。', - lvfan:'吕范(?-228年),字子衡。汝南郡细阳县(今安徽太和)人。汉末至三国时期吴国重臣。吕范年轻为汝南县吏,后避难寿春,结识孙策。此后随孙策、孙权征伐四方,对稳固孙氏在江东的统治做出了杰出的贡献,孙权将其比之于东汉开国元勋吴汉。吴国建立后,吕范累官至前将军、假节、扬州牧,封南昌侯。黄武七年(228年),吕范被拜为大司马,未得授官,便已病逝。孙权悲痛不已,遣使赠其大司马印绶。孙权还都建业后,以太牢礼祭祀吕范。', - liqueguosi:"请分别参考武将【李傕】和【郭汜】各自的介绍。", - cuimao:"关于【崔琰】的内容,请查看武将【崔琰】的介绍。
    毛玠(?—216年),字孝先,陈留平丘(今河南封丘)人。东汉末年大臣。年少时为县吏,以清廉公正著称。因战乱而打算到荆州避乱,但中途知道刘表政令不严明,因而改往鲁阳。后来投靠曹操,提出“奉天子以令不臣,脩耕植,畜军资”的战略规划,得到曹操的欣赏。
    毛玠与崔琰主持选举,所举用的都是清廉正直之士。而毛玠为人廉洁,激起天下廉洁之风,一改朝中奢华风气。曹操大为赞赏,曹丕也亲自去拜访他。
    曹操获封魏公后,毛玠改任尚书仆射,再典选举。又密谏曹操应该立嫡长子曹丕为魏国太子。崔琰被杀后,毛玠十分不快。后来有人诬告毛玠,曹操大怒,将毛玠收于狱中。及后在桓阶、和洽营救下,只被免职,不久逝世于家中。曹操在他死后赐他棺材和钱帛。", - - huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。', - zangba:'其父臧戒,有二子臧艾与臧舜。年少时曾召集数人将获罪的父亲救出,此后四处流亡。后来成为陶谦麾下的骑都尉,负责募兵抵抗黄巾军。与孙观、尹礼等人拥兵驻屯于开阳,自成一股独立势力,后跟随吕布。吕布战败后,投降了曹操。后与袁绍、孙权等的战役里战功赫赫,官至镇东将军。', - zhangren:'刘璋的属下,以忠勇著称。刘备入蜀时,张任曾劝刘璋提防刘备,但刘璋没有听从。魏延舞剑想趁机除掉刘璋时,张任出面对舞,解救刘璋。后在刘备进攻时于落凤坡射死了庞统。', - jiling:'东汉末年袁术帐下将领,勇猛非常,曾奉命率军攻打小沛的刘备,在吕布辕门射戟的调停下撤兵。', - zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。', - ganfuren:'刘备起兵后,于沛城娶甘氏为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。', - jiangfei:'蒋琬,蜀四英之一。初随刘备入蜀,诸葛亮卒后封大将军,辅佐刘禅,主持朝政,统兵御魏。采取闭关息民政策,国力大增。官至大司马,安阳亭侯,谥号恭侯。费祎,蜀国著名政治家和武将,官至大将军。在一次回途的筵会中,被降将郭修刺杀而亡,谥号敬侯。', - mifuren:'刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。', - chendong:'陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严白虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。', - jiangqing:'擅长弓术。与周泰原为活跃于长江一带的江贼,孙策脱离袁术下江东自立门户时,和周泰一起率众投靠。 孙策攻刘繇,并引出城中麾下的陈横、薛礼、张英三名将领,陈横后被蒋钦一箭射杀,后与韩当等将乘舟过江,乱箭射杀敌军。曾在赤壁之战与周泰,还有擅使长枪的韩当率领水军在三江口踏江破敌。', - kongrong:'字文举,鲁国人,东汉文学家,“建安七子”之首。献帝即位后任北军中侯、虎贲中郎将、北海相,时称孔北海后因触怒曹操,为曹操所杀。能诗善文。', - mateng:'字寿成,扶风茂陵人,东汉末年征西将军,割据西凉一带的军阀,伏波将军马援的后代,官至卫尉,封爵槐里乡侯。因其子马超谋反,而被杀,夷灭三族。', - tianfeng:'字元皓。东汉末年大军阀袁绍部下重要谋士。为人刚直不阿,曾多次向袁绍进言而不被采纳。后因谏阻袁绍征伐曹操而被袁绍下令监禁,并于官渡之战后,被袁绍杀害。', - caochun:'字子和,沛国谯(今安徽亳州)人。东汉末年曹操麾下将领,曹仁之弟。曹纯是曹操部下精锐部队“虎豹骑”的统领者之一,因在平定北方的战役中颇有功绩,被加封为高陵亭侯。死后谥曰威侯。曹纯擅战,甚得人心,为人重纲纪,不失理智,好学问,敬爱学士,闻名天下。', - hanba:'中国古代神话传说中引起旱灾的怪物。《诗·大雅·云汉》:“旱魃为虐,如惔如焚。”', - cuiyan:'字季珪,清河东武城(今河北省清河县)人。东汉末年名士,司空崔林的从兄,曹操帐下谋士。崔琰相貌俊美,很有威望,曹操对他也很敬畏。建安二十一年(216年),崔琰在给杨训的书信中写道“时乎时乎,会当有变时”,曹操认为此句有不逊之意,因而将崔琰下狱,不久崔琰即被曹操赐死。', - lifeng:'南阳(治今河南南阳)人,三国时期蜀汉大臣李严之子。230年,李严迁为骠骑将军,率军前往汉中,诸葛亮上表推举李丰为江州都督督军,以代替李严管理后方事务。李严去世后,李丰在蜀汉官至朱提太守。', - sunru:'孙茹,孙坚之妹,其名载于《江浙通志》中。儿子徐琨亦为孙吴早期名将,当初母子二人随军跟从孙策渡长江时,因为暂时没足够的船,孙策感到苦恼打算暂时驻军江边。孙茹夫人献计以芦苇为筏,孙策大喜。吴军遂以神不知鬼不觉的速度过长江击破刘繇部将张英,立下平江东第一功。', - lingcao:'东汉末年将领,吴郡余杭(今浙江余杭)人,凌统之父。早年跟随孙策转战江东。孙权统军后,凌操随其征伐黄祖,被甘宁射杀。《吴书》载:甘宁以善射,将兵在后,射杀校尉凌操', - zhugeguo:'诸葛果,为《历代神仙通鉴》中诸葛亮女儿的名字,《历代神仙通鉴》记录从上古到明代的神仙历史,因此诸葛果不见于任何史书。成都西南有朝真观,即乘烟观。相传,诸葛果在这里修行后成仙升天。', - zhuling:'朱灵(生卒年不详),字文博,冀州清河国人,三国时期曹魏名将。官至后将军,封为高唐侯,谥号威侯。初为袁绍部将,后归顺曹操,随曹操征伐四方,屡建战功。', - re_yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', - fuwan:'伏完(?-209),琅邪东武(今属山东)人,东汉末大臣,汉献帝伏皇后之父。历官辅国将军、中散大夫、屯骑校尉。', - liuxie:'字伯和,又字合。汉族,祖籍沛县,生于洛阳。汉灵帝第三子,被董卓迎立为帝。董卓被王允和吕布诛杀后,董卓部将李傕等攻入长安,再次挟持了他,后来逃出长安。公元196年,曹操控制了刘协,并迁都许昌,“挟天子以令诸侯”。公元220年,曹操病死,刘协被曹丕控制,随后被迫禅让于曹丕。', - yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', - gongsunzan:'字伯珪,汉族,号“白马义从”。辽西令支人。东汉末年献帝年间占据幽州一带的军阀,汉末群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', - caohong:'字子廉,沛国谯(今安徽亳县)人,曹操从弟,曾献马并救护曹操。后多随军征伐,平兖州、征刘表、讨祝臂。曹丕即位时封曹洪为骠骑将军。曹叡即位,拜曹洪为后将军,更封乐城侯,后复拜为骠骑将军。曹洪逝世,追谥曰恭侯。', - guanyinping:'河东解县(今山西运城)人,美髯公关羽之女。因在关羽的四个子女中排行第三,故又被称作“关三小姐”、“关氏三姐”或“关羽三小姐”。传说她是赵云的弟子、并随同诸葛亮平定南蛮。', - xiahouba:'夏侯渊次子。本为曹魏武将,后因司马懿诛曹爽一族,夏侯霸身为曹氏宗室而心怀不安,遂投降蜀汉。后随蜀将姜维北伐,官至车骑将军。', - daxiaoqiao:'大乔,庐江皖县人,为乔公长女,孙策之妻,容貌国色流离。小乔为大乔之妹,周瑜之妻,资貌绝伦。两人合称“二乔”。', - yuejin:'字文谦,魏“五子良将”之一。容貌短小,以胆烈跟从曹操,南征北讨,战功无数。从击袁绍于官渡,奋勇力战,斩袁绍部将淳于琼。又从击袁绍子谭、尚于黎阳,斩其大将严敬。从平荆州,留屯襄阳,进击关羽、苏非等人,击退其众,南郡诸郡的山谷蛮夷都前往乐进处投降。后来从曹操征孙权,假进节。曹操回师后,留乐进与张辽、李典屯于合肥。又以乐进数有军功,迁右将军。建安二十三年逝世,谥曰威侯。', - caoang:'字子修,曹操的长子,由于性情谦和且聪慧所以深得曹操喜爱。曹操征讨张绣时,羞辱张绣之婶邹氏,被张绣突然袭击。曹昂为保护曹操撤退,与典韦一起战死在宛城。', - zhugejin:'字子瑜,吴国大臣,诸葛亮之兄,诸葛恪之父。经鲁肃推荐,为东吴效力。胸怀宽广,温厚诚信,得到孙权的深深信赖,努力缓和蜀汉与东吴的关系。建安二十五年(220年)吕蒙病逝,诸葛瑾代吕蒙领南郡太守,驻守公安。孙权称帝后,诸葛瑾官至大将军,领豫州牧。', - zhangxingcai:'蜀名将张飞与夏侯氏所生之女,刘禅的妻子,史上称为“敬哀皇后”。', - zumao:'字大荣,吴郡富春人,使用双刀。孙坚在汜水关被华雄击败,祖茂为保护主公而主动提出与孙坚交换头盔,孙坚因此得脱。祖茂将孙坚的赤帻挂在柱子上,准备以此引诱华雄,趁机偷袭,却反被华雄所杀。', - dingfeng:'吴国将领。年少时以骁勇为小将,经常奋勇杀敌,屡立功勋,此后又于东兴之战中“雪中奋短兵”,大破侵犯东吴的魏军。吴景帝孙休在位时,丁奉设计除掉了东吴的权臣孙綝,被拜为大将军,后为右大司马、左军师。', - panfeng:'冀州牧韩馥部下的上将。当十八路诸侯讨伐董卓之时,他奉韩馥之命前往汜水关前挑战董卓部下大将华雄,不敌被斩。', - maliang:'字季常,因眉毛中有白毛,人称白眉马良,马谡的兄长。马良在兄弟五人中名声最佳,因此有“马氏五常,白眉最良”的说法。', - zhugedan:'字公休,曹魏后期的重要将领,诸葛亮的族弟。曾与司马师一同平定毌丘俭、文钦的叛乱。之后因与被诛的夏侯玄、邓飏交厚,且见到王淩、毌丘俭等人的覆灭而心不自安,于甘露二年起兵,并得到东吴的支援,但于次年被镇压,被大将军司马胡奋所斩。', - hetaihou:'大将军何进的妹妹,汉灵帝刘宏第二任皇后,汉少帝刘辩的生母。何氏出身于屠户家庭,后选入掖庭,得到汉灵帝临幸,生下皇子刘辩,并受封贵人。光和三年(180年),立为皇后。中平六年(189年),汉灵帝去世,刘辩继位,尊何氏为皇太后。董卓进京,废黜刘辩,不久毒杀刘辩及何氏。', - sunluyu:'又名小虎,孙权与步练师之女。吴后期,孙鲁班诬陷孙鲁育参与谋反,于是孙峻杀害了孙鲁育。', - wenpin:'本为刘表大将,刘表死后,跟随刘琮投降曹操。后曹操令其镇守江夏,多次阻止了关羽和孙权的进攻,为曹操倚为屏障的大将之一。', - zhanglu:'汉宁太守,继父祖之后传播五斗米教。刘璋杀张鲁之母,二人因此结仇,多次交战。刘备攻益州时,刘璋向张鲁求援。张鲁派马超前往,但马超投降刘备。张鲁后见曹操自封魏王,想要自立为汉宁王,为谋士阎圃劝免。后曹操讨汉中,张鲁败,众人劝其烧粮仓,张鲁认为这是国家之物,未听从,为曹操所称赞。后投降曹操,任镇南将军。', - mayunlu:'马腾之女,马超之妹,赵云之妻。父亲令其自幼习武,枪术非凡,寻常男子也是难以匹敌。', - tadun:'东汉末年辽西乌桓(亦称乌丸)的首领,乌桓大人丘力居的从子,总摄三王部。曾出兵协助袁绍,击破公孙瓒。此后受袁绍假传朝廷诏命,与三王难楼、苏仆延、乌延等人同受单于称号及印绶。后难楼、苏仆延率其部众奉立楼班为单于,蹋顿于是退位为王。袁绍死后,收到被曹操击败的袁尚的求助,纠集逃亡至乌桓的幽州、冀州官吏百姓,企图夺回河北。东汉建安十二年,曹操亲征乌桓。八月,乌桓、袁氏部队于柳城白狼山为曹军所败,蹋顿在此战中被曹操的先锋张辽所斩杀。 ', - yanbaihu:'吴郡乌程县人,原名“严虎”,别号“白虎”,东汉末年盘据吴郡一带山贼出身的地方豪帅。献帝初拥兵万人自固。孙策受袁术使渡江,攻破白虎等。白虎奔余杭,投靠许昭。建安二年,再度被孙策击败,至此不知亡佚何处。', - simalang:'字伯达,“司马八达”之一。曹操任司空后,司马朗被辟为司空属官,又历任成皋令、堂阳长、元城令、丞相主簿、兖州刺史等职,所在皆有政绩,深受百姓爱戴。后司马朗与夏侯惇、臧霸等征讨吴国,到达居巢。军队中流行瘟疫,司马朗亲自去视察,派送医药,因此染病去世。', - wangji:'字伯舆,东莱曲城人。三国时期魏国将领。王基文武兼备,才高于世,德溥于时,深得司马懿、司马师、司马昭的器重,尤其在南征毋丘俭,文钦之乱,东征诸葛诞之叛大规模军事活动中,王基与司马师、司马昭结下了深厚的军友情谊。魏景元二年王基去世,追赠司空,谥号为景侯。', - buzhi:'吴重臣,最初避难江东,于孙权统事后,被召为主记。后游历吴地,又任海盐县长,还任东曹掾,出领鄱阳太守。建安十五年,转交州刺史、立武中郎将,率军接管往交州,追拜使持节、征南中郎将。次年,以平定交州功,加平戎将军,封广信侯。后迁右将军、左护军,改封临湘侯。孙权称帝后,拜骠骑将军,领冀州牧,后因冀州分与蜀汉而解牧职。又都督西陵。赤乌九年,代陆逊为丞相。', - litong:'字文达,小字万亿。江夏平春(今河南信阳)人,汝南太守。早年以游侠闻名于江汝,在率众补充曹操兵源有功拜为阳安都尉,其间不因私而忘公,不因其妻子的求请而过问执法者。后来在曹操讨伐马超时出阵挑战,死于马超枪下。', - mizhu:'原为徐州富商,后被徐州牧陶谦辟为别驾从事。陶谦病死后,奉其遗命迎接刘备。与其弟麋芳拒绝曹操的任命而跟随刘备,在刘备最潦倒之时给予刘备很大的帮助,使他重新振作。214年(建安十九年),刘备入主益州后,拜麋竺为安汉将军,地位在诸葛亮之上,为刘备手下众臣之最。吕蒙袭取荆州,麋芳举城投降,导致关羽兵败身亡,麋竺面缚请罪,刘备劝慰麋竺,对他待遇如初。', - dongbai:'东汉末年县君,陇西临洮(今甘肃省岷县)人,董卓之孙女。董卓当权时,遍封其宗族,其中孙女董白尚未及笄,被封为渭阳君。', - zhaoxiang:'赵云与马云騄之女,赵统赵广之妹,关平之妻。', - heqi:'早年在平定山越的战争中立有大功,又讨平叛乱无数,身经百战,所向披靡,深受孙权器重。后来在与魏国的多次边境争斗中也屡立战功,官至后将军,并领徐州牧。', - dongyun:'大汉重臣,掌军中郎将董和之子。东汉末年,其父董和事刘璋为益州太守,刘备立太子时,允被选为洗马,后为黄门侍郎,延熙六年(公元243年)加辅国将军,延熙七年(公元244年)以侍中守尚书令,任大将军费祎的副手。', - mazhong:'本名狐笃,字德信,巴西阆中人,初次出场时随丞相诸葛亮南征孟获,诸葛亮遣马忠与赵云两路夹攻,大败蛮将阿会喃。孟获派弟孟优赴汉军处假投降,欲内应外合,诸葛亮将计就计,埋伏擒获孟获和诸洞酋长,马忠亦于此战立下战功。后诸葛亮北伐时亦数次出阵,立下汗马功劳。', - kanze:'孙权谋士,在孙权广纳贤才之时与严畯等来到江东,甚为孙权礼遇。第一个识破周瑜打黄盖是苦肉计,后欣然向曹操献诈降书,被曹操识破后面不改色,哈哈大笑,一番妙言让曹操相信了诈降书,是苦肉计中的关键人物。后劝孙权不要设局请关羽。在刘备御驾亲征东吴时,向孙权举荐陆逊为都督,间接上挽救了东吴的命运。', - lingju:'相传为吕布与貂蝉的女儿,被汉献帝掳走并训练为死士,被秘密送入宫中接近曹操,成为其“忘年红颜知己”。外表是柔弱的女子,实际上身怀致命的杀人绝技,等待时机给予曹操致命一击。', - yangxiu:'字德祖,今陕西华阴人,是东汉末年的文学家。杨修学问渊博,极聪慧,任丞相府主簿。史载,“是时,军国多事,修总知外内,事皆称意”。', - chenlin:'陈琳(?-217年),字孔璋,广陵射阳(今江苏宝应)人。东汉末年著名文学家,“建安七子”之一。', - zhugeke:'字元逊,琅邪阳都(今山东沂南)人。三国时期吴臣,蜀丞相诸葛亮之侄,吴大将军诸葛瑾长子,从小就以神童著称,深受孙权赏识。', - zhangbao:'东汉末年黄巾起义的首领之一,张角之弟,张梁之兄。中平元年(184)随兄张角起义,号称“地公将军”。', - chengyu:'字仲德,本名程立,因梦中於泰山捧日,更名程昱。荀彧投曹操时向其举荐程昱。他参与了攻打吕布、袁绍、刘备、孙权的大部份战事,一直出谋献策,表现出众。', - sunhao:'孙权之孙,孙和之子,东吴的末代君主。在位初期虽施行过明政,但不久即沉溺酒色,专于杀戮,变得昏庸暴虐,嗜用挖眼、剥皮等酷刑。280年,吴国被西晋所灭,孙皓投降西晋,被封为归命侯。', - wutugu:'南蛮乌戈国主,身长丈二(约合现在2.77米),不食五谷,以生蛇恶兽为饭。身有鳞甲,刀箭不能侵。兀突骨乘骑巨象,头戴日月狼须帽,身披金珠缨络,两肋下露出生鳞甲,眼目中微有光芒。', - shixie:'割据交州(今越南)一带的军阀,年少时师事刘陶,经逐渐升迁任交趾太守。后被朝廷加职绥南中郎将,迁安远将军,封龙度亭侯。在步骘接管交州时积极配合,归附孙权,被孙权加为左将军;此后又因诱降益州豪族雍闿而迁任卫将军,进封龙编侯。任交趾太守四十年。', - guansuo:'关羽的三子。自荆州失陷后,逃难在鲍家庄养病,伤势痊愈之后入蜀,逢丞相诸葛亮南征,拜之为前部先锋,一同南征。', - wanglang:'字景兴,汉末三国经学家,曹魏初期重臣。曾任会稽太守举兵抵抗孙策,后为曹操所征,被拜为谏议大夫等职。曹丕建立魏国后任命为司空。小说《三国演义》中他在阵前与诸葛亮饶舌比拼,最终被诸葛亮言词所驳倒,一时气愤坠马身亡。', - zhangliang:'东汉末年黄巾起义首领之一,张角的三弟。中平元年(184)随兄起义,号称“人公将军”。遭到朝廷所派左中郎将皇甫嵩进攻时,他率军在广宗(今河北威县)进行反击。后因警戒疏忽,遭到汉军夜袭,兵败身亡。', - }, - characterTitle:{}, - perfectPair:{ - yuejin:['re_lidian'], - zhugejin:['zhugeke'], - guanyinping:['guanyu'], - zhangxingcai:['liushan'], - fuwan:['fuhuanghou'], - sunshangxiang:['liubei'], - caoang:['caocao'], - zhangbao:['zhangliang','zhangjiao'], - zhangliang:['zhangjiao'], - maliang:['masu'], - lingcao:['lingtong'], - lingju:['diaochan','lvbu'], - jiangqing:['zhoutai'], - dingfeng:['xusheng'], - caohong:['caoren'], - daxiaoqiao:['zhouyu','sunce'], - cuiyan:['caocao'], - guansuo:['guanyu'], - mateng:['machao','madai','mayunlu'], - chengpu:['zhouyu'], - hanba:['swd_muyun'], - dongbai:['dongzhuo'], - cuimao:['caopi'], - simazhao:['wangyuanji'], - }, - card:{ - wy_meirenji:{ - fullskin:true, - vanish:true, - derivation:'wangyun', - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target.countCards('h')&&target!=player&&target.sex=='male'; - }, - content:function(){ - 'step 0' - event.list=game.filterPlayer(function(current){ - return current!=player&¤t!=target&¤t.sex=='female'; - }).sortBySeat(); - 'step 1' - if(target.countCards('h')&&event.list.length){ - event.current=event.list.shift(); - event.current.gainPlayerCard(target,true); - target.line2([event.current,player]); - } - else{ - event.goto(4); - } - 'step 2' - event.current.chooseCard('h',true,'将一张手牌交给'+get.translation(player)); - 'step 3' - if(result.bool){ - event.current.give(result.cards,player); - } - event.goto(1); - 'step 4' - var n1=target.countCards('h'); - var n2=player.countCards('h'); - if(n1>n2){ - target.damage(player); - player.line(target); - } - else if(n1=3) return 0; - if(!target.hasSkillTag('maixie_hp')){ - return -3; - } - return -1; - } - if(num==2) return 0; - return -2+num+(Math.pow(target.hp,0.2)-1); - } - } - } - }, - }, - skill:{ - olxingshen:{ - trigger:{player:'damageEnd'}, - frequent:true, - audio:'xingshen', - content:function(){ - 'step 0' - var next=player.draw(); - if(get.isLuckyStar(player)||Math.random()<0.5) next.num=2; - player.storage.olxingshen=player.getDamagedHp(); - player[player.storage.olxingshen?'markSkill':'unmarkSkill']('olxingshen'); - }, - intro:{ - content:'下一次发动〖严教〗时多展示X张牌', - }, - }, - //张道陵 - zlhuji:{ - mod:{ - globalFrom:function(player,target,distance){ - return distance-1; - }, - }, - trigger:{player:'damageEnd'}, - forced:true, - content:function(){ - 'step 0' - var func=function(result){ - if(get.color(result)=='red') return 1; - return 0; - }; - if(get.itemtype(trigger.source)!='player'||!player.canUse('sha',trigger.source,false)) func=function(result){ - return 0; - }; - else if(get.effect(trigger.source,{name:'sha'},player,player)<0) func=function(result){ - if(get.color(result)=='red') return -1; - return 0; - }; - player.judge(func); - 'step 1' - if(result.bool&&get.itemtype(trigger.source)=='player'&&player.canUse('sha',trigger.source,false)){ - player.useCard({name:'sha',isCard:true},trigger.source,false); - } - }, - }, - zlshoufu:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&!target.getStorage('zlshoufu2').length; - }, - filterCard:true, - position:'he', - discard:false, - toStorage:true, - prepare:'give', - content:function(){ - target.addSkill('zlshoufu2'); - target.storage.zlshoufu2_markcount=0; - target.markAuto('zlshoufu2',cards); - player.draw(); - }, - }, - zlshoufu2:{ - marktext:'箓', - intro:{ - content:'cards', - onunmark:'throw', - }, - charlotte:true, - mod:{ - cardEnabled:function(card,player){ - if(player.getStorage('zlshoufu2').filter(function(magic){ - return get.type2(magic)==get.type(card); - }).length) return false; - }, - cardRespondable:function(card,player){ - if(player.getStorage('zlshoufu2').filter(function(magic){ - return get.type2(magic)==get.type(card); - }).length) return false; - }, - cardSavable:function(card,player){ - if(player.getStorage('zlshoufu2').filter(function(magic){ - return get.type2(magic)==get.type(card); - }).length) return false; - }, - }, - trigger:{ - player:['damageEnd','loseAfter'], - }, - forced:true, - filter:function(event,player){ - var storage=player.getStorage('zlshoufu2'); - if(!storage.length) return false; - if(event.name=='damage') return true; - if(event.type!='discard'||event.getParent('phaseDiscard').player!=player) return false; - for(var i of event.cards2){ - if(storage.filter(function(magic){ - return get.type2(magic)==get.type2(i,event.hs.contains(i)?player:false); - }).length) return true; - } - return false; - }, - content:function(){ - if(trigger.name=='lose'){ - for(var i of trigger.cards2){ - if(player.getStorage('zlshoufu2').filter(function(magic){ - return get.type2(magic)==get.type(i,trigger.hs.contains(i)?player:false); - }).length) player.storage.zlshoufu2_markcount++; - } - } - if(trigger.name=='damage'||player.storage.zlshoufu2_markcount>=2) player.unmarkSkill('zlshoufu2'); - else player.markSkill('zlshoufu2'); - }, - }, - //蔡阳 - yinka:{ - trigger:{player:['drawBegin','judgeBegin']}, - direct:true, - filter:function(){ - return ui.cardPile.childNodes.length>0; - }, - content:function(){ - 'step 0' - player.chooseButton(['印卡:请选择要置于牌堆'+(trigger.bottom?'底':'顶')+'的牌(先选择的在上)',Array.from(ui.cardPile.childNodes)],[1,trigger.num||1]); - 'step 1' - if(result.bool){ - while(result.links.length){ - if(trigger.bottom){ - var card=result.links.shift(); - ui.cardPile.removeChild(card); - ui.cardPile.appendChild(card); - } - else{ - var card=result.links.pop(); - ui.cardPile.removeChild(card); - ui.cardPile.insertBefore(card,ui.cardPile.firstChild) - } - } - } - }, - ai:{isLuckyStar:true}, - }, - //新王允 - xinlianji:{ - enable:'phaseUse', - audio:'wylianji', - usable:1, - check:function(card){ - return 5-get.value(card); - }, - filterTarget:function(card,player,target){ - if(ui.selected.targets.length) return true; - return target!=player; - }, - filterCard:true, - selectTarget:2, - multitarget:true, - targetprompt:['打人','被打'], - content:function(){ - 'step 0' - player.addMark('xinlianji',1,false); - var card=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'&&targets[0].hasUseTarget(card); - }); - if(card){ - if(card.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ - card.remove(); - card=game.createCard('qibaodao',card.suit,card.number); - } - targets[0].chooseUseTarget(card,true,'nopopup','noanimate'); - } - else{ - player.chat('没有装备牌了吗'); - game.log('但是牌堆里已经没有装备牌了!'); - } - 'step 1' - game.updateRoundNumber(); - targets[0].chooseToUse('对'+get.translation(targets[1])+'使用一张杀,或将装备区里的武器牌交给一名其他角色', - {name:'sha'}).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.filterTarget.apply(this,arguments); - }).set('sourcex',targets[1]).set('addCount',false); - 'step 2' - var card=targets[0].getEquip(1); - if(!result.bool&&card){ - event.card=card; - player.chooseTarget(true,'将'+get.translation(card)+'交给一名其他角色').set('ai',function(target){ - var card=_status.event.getParent().card; - return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card)); - }); - } - else event.finish(); - 'step 3' - result.targets[0].gain(card,targets[0],'give'); - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(ui.selected.targets.length){ - var pretarget=ui.selected.targets[0]; - if(pretarget.hasSha()&&pretarget.canUse({name:'sha'},target)) return get.effect(target,{name:'sha'},pretarget,target); - return Math.random(); - } - if(!target.getEquip(1)){ - if(game.hasPlayer(function(current){ - return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; - })) return 3; - return -3; - } - if(!game.hasPlayer(function(current){ - return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; - })) return -6; - return 4-get.value(target.getEquip(1)); - }, - }, - }, - }, - xinmoucheng:{ - trigger:{player:'phaseZhunbeiBegin'}, - audio:'moucheng', - forced:true, - juexingji:true, - skillAnimation:true, - animationColor:'gray', - derivation:'xinjingong', - unique:true, - filter:function(event,player){ - return player.countMark('xinlianji')>2; - }, - content:function(){ - player.awakenSkill('xinmoucheng'); - player.addSkill('xinjingong'); - player.removeSkill('xinlianji'); - }, - }, - xinjingong:{ - audio:'jingong', - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',function(card){ - return card.name=='sha'||get.type(card)=='equip'; - }); - }, - delay:false, - usable:1, - content:function(){ - 'step 0' - var list=get.inpile('trick').randomGets(2); - if(Math.random()<0.5){ - list.push('wy_meirenji'); - } - else{ - list.push('wy_xiaolicangdao'); - } - for(var i=0;iplayer.maxHp) return 0; - var att=get.attitude(player,target); - if(att<=0||target.hasSkillTag('nogain')) return 0; - if(target.maxHp-target.countCards('h')>=2) return att; - return att/2; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('bizheng',target); - target.draw(2); - } - else event.finish(); - 'step 2' - if(player.countCards('h')>player.maxHp) player.chooseToDiscard(2,'he',true); - 'step 3' - if(target.countCards('h')>target.maxHp) target.chooseToDiscard(2,'he',true); - }, - ai:{ - expose:0.25, - }, - }, - yidian:{ - trigger:{player:'useCard2'}, - filter:function(event,player){ - var info=get.info(event.card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - for(var i=0;i0){ - player.chooseTarget('令一名角色获得'+get.translation(trigger.source)+'的一张手牌',function(card,player,target){ - var source=_status.event.source; - return target!=source&&source.countGainableCards(target,'h')>0; - }).set('source',trigger.source); - } - else event.goto(4); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line([trigger.source,target],'green'); - target.gainPlayerCard(trigger.source,'h',true); - if(event.count2) event.goto(2) - } - 'step 4' - if(cards.length) player.gain(cards,'gain2','log'); - 'step 5' - if(event.count>0){ - player.chooseBool(get.prompt2('spyinzhi')).set('frequentSkill','spyinzhi'); - } - else event.finish(); - 'step 6' - if(result.bool){ - player.logSkill('spyinzhi'); - event.goto(1); - }; - }, - }, - spmingjian:{ - trigger:{global:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - var next=player.chooseCard(get.prompt2('spmingjian',trigger.player),'he'); - next.set('ai',function(card){ - var target=_status.event.getTrigger().player; - var player=_status.event.player; - if(get.attitude(player,target)>0&&target.countCards('j')>0) return 5-get.value(card); - return -1; - }); - next.set('filterCard',function(card,player){ - if(get.position(card)=='e') return lib.filter.cardDiscardable.apply(this,arguments); - return true; - }); - //next.set('logSkill',['spmingjian',trigger.player]); - 'step 1' - if(result.bool){ - player.logSkill('spmingjian',trigger.player); - var card=result.cards[0]; - event.card=card; - if(get.position(card)=='e') event._result={index:0}; - else if(!lib.filter.cardDiscardable(card,player,event)) event._result={index:1}; - else{ - var name=get.translation(trigger.player); - player.chooseControl().set('choiceList',[ - '令'+name+'跳过本回合的判定阶段', - '令'+name+'于本回合的判定中不触发「判定结果生效前」的时机', - ]).set('ai',function(){return 0}); - } - } - else event.finish(); - 'step 2' - if(result.index==0){ - player.discard(card); - trigger.player.skip('phaseJudge'); - } - else{ - player.lose(card,ui.special,'toStorage'); - trigger.player.addSkill('spmingjian_charlotte'); - trigger.player.storage.spmingjian_charlotte.add(card); - trigger.player.markSkill('spmingjian_charlotte'); - } - }, - ai:{ - expose:0.25, - }, - }, - spmingjian_charlotte:{ - trigger:{player:['judgeBefore','phaseAfter']}, - forced:true, - firstDo:true, - silent:true, - popup:false, - charlotte:true, - content:function(){ - if(trigger.name=='phase') player.removeSkill(event.name); - else trigger.noJudgeTrigger=true; - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - marktext:'鉴', - intro:{ - name:'明鉴', - content:'cards', - onunmark:'throw', - }, - }, - spshude:{ - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - filter:function(event,player){ - return player.countCards('h')2; - return get.suit(card)==get.suit(ui.selected.cards[0]); - }, - content:function(){ - target.turnOver(); - player.addTempSkill('spfuluan2'); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.isTurnedOver()) return 2; - return -1; - }, - }, - }, - }, - spfuluan2:{ - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - }, - }, - }, - spzhaoxin:{ - trigger:{player:'phaseDrawEnd'}, - check:function(event,player){ - return player.getUseValue({name:'sha',isCard:true})>0; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.showHandcards(); - 'step 1' - player.chooseUseTarget('sha',false); - }, - }, - splanggu:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return get.itemtype(event.source)=='player'; - }, - logTarget:'source', - content:function(){ - 'step 0' - player.judge(); - 'step 1' - if(trigger.source.countCards('h')>0){ - var next=player.discardPlayerCard(trigger.source,'h',[1,Infinity]); - next.set('suit',result.suit); - next.set('filterButton',function(button){ - return get.suit(button.link)==_status.event.suit; - }); - next.set('visible',true); - } - }, - group:'splanggu_rewrite', - }, - splanggu_rewrite:{ - trigger:{player:'judge'}, - filter:function (event,player){ - return player.countCards('h')>0&&event.getParent().name=='splanggu'; - }, - direct:true, - content:function (){ - "step 0" - player.chooseCard('狼顾的判定结果为'+ - get.translation(trigger.player.judging[0])+',是否打出一张手牌进行代替?','h',function(card){ - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - return -1; - }); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight','splanggu','noOrdering'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - }, - sphantong:{ - trigger:{player:'loseEnd'}, - frequent:true, - filter:function(event,player){ - return event.type=='discard'&&event.getParent(3).name=='phaseDiscard'&&event.cards.filterInD('d').length>0; - }, - content:function(){ - if(!player.storage.sphantong) player.storage.sphantong=[]; - var cards=trigger.cards.filterInD('d'); - player.storage.sphantong.addArray(cards); - player.$gain2(cards); - game.log(player,'将',cards,'置于武将牌上'); - player.markSkill('sphantong'); - }, - group:['sphantong_gain'], - derivation:['hujia','jijiang','jiuyuan','xueyi'], - marktext:'诏', - intro:{ - content:'cards', - onunmark:'throw', - }, - }, - sphantong_gain:{ - trigger:{global:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.sphantong&&player.storage.sphantong.length>0; - }, - content:function(){ - 'step 0' - player.chooseButton([get.prompt('sphantong'),player.storage.sphantong],function(button){return -1}); - 'step 1' - if(result.bool){ - player.logSkill('sphantong'); - var card=result.links[0]; - player.$throw(card); - game.log(player,'将',card,'置入了弃牌堆'); - player.storage.sphantong.remove(card); - player[player.storage.sphantong.length>0?'markSkill':'unmarkSkill']('sphantong'); - game.cardsDiscard(card); - var list=['hujia','jijiang','jiuyuan','xueyi']; - for(var i=0;i0) player.chooseControl(list).set('prompt','选择获得以下技能中的一个'); - else event.finish(); - } - else event.finish(); - 'step 2' - var skill=result.control; - player.addTempSkill(skill); - if(!player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong=[]; - player.storage.zhuSkill_sphantong.add(skill); - player.popup(skill,'wood'); - game.log(player,'获得了技能','#g【'+get.translation(skill)+'】'); - var next=game.createEvent('sphantong_clear',false); - event.next.remove(next); - trigger.after.push(next); - next.player=player; - next.skill=skill; - next.setContent(function(){ - if(player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong.remove(event.skill); - }) - }, - }, - sphuangen:{ - trigger:{global:'useCardToPlayered'}, - filter:function(event,player){ - if(!event.isFirstTarget) return false; - if(get.type(event.card)!='trick') return false; - if(get.info(event.card).multitarget) return false; - if(event.targets.length<2) return false; - return player.hp>0; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('sphuangen'), - [1,Math.min(player.hp,trigger.targets.length)],function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - }).set('targets',trigger.targets); - "step 1" - if(result.bool){ - player.logSkill('sphuangen',result.targets); - trigger.excluded.addArray(result.targets); - player.draw(); - } - }, - }, - spyicong:{ - trigger:{player:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseCard('he',[1,player.countCards('he')],get.prompt2('spyicong')).set('ai',function(card){ - if(card.name=='du') return 10; - if(ui.selected.cards.length) return -1; - return 4-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('spyicong'); - if(!player.storage.spyicong) player.storage.spyicong=[]; - player.storage.spyicong.addArray(result.cards); - player.$giveAuto(result.cards.length,player,false); - game.log(player,'扣置了'+get.cnNumber(player.lose(result.cards,'toStorage',ui.special).cards.length)+'张【扈】'); - player.markSkill('spyicong'); - } - }, - mod:{ - globalTo:function(from,to,num){ - if(to.storage.spyicong&&to.storage.spyicong.length) return num+to.storage.spyicong.length; - }, - }, - marktext:'扈', - intro:{ - name:'义从', - content:'cardCount', - onunmark:'throw', - }, - }, - sptuji:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.spyicong&&player.storage.spyicong.length>0; - }, - content:function(){ - var num=player.storage.spyicong.length; - player.addMark('sptuji2',num,false); - player.addTempSkill('sptuji2'); - player.unmarkSkill('spyicong'); - if(num<=1) player.draw(); - }, - }, - sptuji2:{ - onremove:true, - charlotte:true, - mod:{ - globalFrom:function(from,to,num){ - return num-from.countMark('sptuji2'); - }, - }, - marktext:'突', - intro:{ - name:'突骑', - content:'至其他角色的距离-#', - }, - }, - //二袁 - neifa:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - content:function(){ - 'step 0' - _status.noclearcountdown=true; - if(game.hasPlayer(function(current){ - return current.countGainableCards(player,'ej')>0; - })){ - player.chooseControl('cancel2').set('choiceList',[ - '摸两张牌,然后弃置一张牌', - '获得场上的一张牌,然后弃置一张牌', - ]).set('prompt',get.prompt('neifa')).set('ai',function(){ - if(game.hasPlayer(function(current){ - var att=get.attitude(player,current); - if(att==0) return false; - if(att<0) return current.countCards('e',function(card){ - return get.value(card)>0; - })>0; - return current.countCards('ej',function(card){ - return get.position(card)=='j'||get.value(card)<=0; - })>0; - })) return 1; - return 0; - }); - } - else{ - player.chooseControl('ok','cancel2').set('prompt',get.prompt2('neifa')); - } - 'step 1' - if(result.control=='cancel2'){ - delete _status.noclearcountdown; - if(!_status.noclearcountdown){ - game.stopCountChoose(); - } - event.finish(); - return; - } - else if(result.index==1){ - player.chooseTarget('请选择一名角色,获得其装备区或判定区内的一张牌',true,function(card,player,target){ - return target.countGainableCards(player,'ej')>0; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att>0&&target.countCards('ej',function(card){ - return get.position(card)=='j'||get.value(card,target)<=0; - })) return 2*att; - else if(att<0&&target.countCards('e',function(card){ - return get.value(card)>0; - })) return -att; - return -1; - }); - } - else{ - delete _status.noclearcountdown; - if(!_status.noclearcountdown){ - game.stopCountChoose(); - } - player.logSkill('neifa'); - player.draw(2); - event.goto(3) - } - 'step 2' - delete _status.noclearcountdown; - if(!_status.noclearcountdown){ - game.stopCountChoose(); - } - if(result.bool){ - var target=result.targets[0]; - player.logSkill('neifa',target); - player.gainPlayerCard(target,'ej',true); - } - 'step 3' - player.chooseToDiscard(true,'he'); - 'step 4' - if(result.bool&&result.cards&&result.cards.length){ - var name=get.type(result.cards[0])=='basic'?'neifa_basic':'neifa_nobasic'; - player.addTempSkill(name); - var num=Math.min(5,player.countCards('h',function(cardx){ - return (name=='neifa_basic')!=(get.type(cardx,player)=='basic') - })); - player.addMark(name,num,false); - } - }, - ai:{ - threaten:3, - }, - }, - neifa_basic:{ - mark:true, - marktext:'伐', - onremove:true, - intro:{ - name:'内伐 - 基本牌', - content:'本回合内不能使用锦囊牌和装备牌,且使用【杀】选择目标时可以多选择1个目标,且使用【杀】的目标次数上限+#。', - }, - mod:{ - cardEnabled:function(card,player){ - if(['trick','equip'].contains(get.type(card,'trick'))) return false; - }, - cardSavable:function(card,player){ - if(['trick','equip'].contains(get.type(card,'trick'))) return false; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return num+player.countMark('neifa_basic'); - } - }, - }, - trigger:{player:'useCard2'}, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&player.canUse(event.card,current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('neifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ - return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); - }).set('sourcex',trigger.targets).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,_status.event.card,player,player); - }).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!_status.connectMode) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('neifa',event.targets); - trigger.targets.addArray(event.targets); - }, - }, - neifa_nobasic:{ - trigger:{player:'useCard2'}, - direct:true, - mark:true, - marktext:'伐', - onremove:true, - mod:{ - cardEnabled:function(card,player){ - if(get.type(card)=='basic') return false; - }, - cardSavable:function(card,player){ - if(get.type(card)=='basic') return false; - }, - }, - intro:{ - name:'内伐 - 非基本牌', - content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择1个目标,且本回合的出牌阶段内前两次使用装备牌时摸#张牌。' - }, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - if(event.targets&&event.targets.length>0) return true; - var info=get.info(event.card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' - player.chooseTarget(get.prompt('neifa'),function(card,player,target){ - var player=_status.event.player; - if(_status.event.targets.contains(target)) return true; - return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target); - }).set('prompt2',prompt2).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1); - }).set('targets',trigger.targets).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets){ - player.logSkill('neifa',event.targets); - if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets); - else trigger.targets.addArray(event.targets); - } - }, - group:'neifa_use', - ai:{ - reverseOrder:true, - skillTagFilter:function(player){ - if(player.storage.counttrigger&&player.storage.counttrigger.neifa_use>=2) return false; - }, - effect:{ - target:function(card,player,target){ - if((!player.storage.counttrigger||!player.storage.counttrigger.neifa_use||player.storage.counttrigger.neifa_use<2)&&player==target&&get.type(card)=='equip') return [1,3]; - }, - }, - }, - }, - neifa_use:{ - audio:'neifa', - usable:2, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return get.type(event.card)=='equip'&&player.countMark('neifa_nobasic')>0; - }, - content:function(){ - player.draw(player.countMark('neifa_nobasic')); - }, - }, - //许靖 - yuxu:{ - audio:2, - trigger:{player:'useCardEnd'}, - filter:function(event,player){ - if(event!=player.getLastUsed()) return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=player) return false; - var history=player.getHistory('useCard',function(evtt){ - return evtt.getParent('phaseUse')==evt; - }); - var index=history.indexOf(event); - if(index==0) return true; - return history[index-1].yuxu!=true&&player.countCards('he')>0; - }, - content:function(){ - trigger.yuxu=true; - player.addTempSkill('yuxu2'); - player.draw(); - }, - }, - yuxu2:{ - trigger:{player:'useCardEnd'}, - direct:true, - charlotte:true, - locked:true, - filter:function(event,player){ - if(event!=player.getLastUsed()) return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=player) return false; - var history=player.getHistory('useCard',function(evtt){ - return evtt.getParent('phaseUse')==evt; - }); - var index=history.indexOf(event); - if(index<1) return false; - return history[index-1].yuxu==true&&player.countCards('he')>0; - }, - content:function(){ - player.chooseToDiscard('he',true); - }, - }, - xjshijian:{ - audio:2, - trigger:{global:'useCardAfter'}, - direct:true, - filter:function(event,player){ - if(event.player==player) return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=event.player) return false; - return event.player.getHistory('useCard',function(evtt){ - return evtt.getParent('phaseUse')==evt; - }).indexOf(event)==1&&player.countCards('he')>0; - }, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he',get.prompt('xjshijian',trigger.player),'弃置一张牌并令其获得技能〖誉虚〗至回合结束'); - next.set('logSkill',['xjshijian',trigger.player]); - next.set('check',get.attitude(player,trigger.player)>0&&trigger.player.countCards('h')>2); - next.ai=function(card){ - if(_status.event.check) return 5-get.value(card); - return -1; - }; - 'step 1' - if(result.bool) trigger.player.addTempSkill('yuxu'); - }, - ai:{ - expose:0.25, - }, - }, - //新1v1 - yanhuo:{ - audio:2, - trigger:{player:'die'}, - forceDie:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - direct:true, - skillAnimation:true, - animationColor:'thunder', - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('yanhuo'),function(card,player,target){ - return target!=player&&target.countDiscardableCards(player,'he')>0 - }).set('forceDie',true).ai=function(target){ - return -target.countCards('he')*get.attitude(player,target); - }; - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('yanhuo',target); - event.count=player.countCards('he'); - } - else event.finish() - 'step 2' - if(target.countDiscardableCards(player,'he')){ - player.line(target); - player.discardPlayerCard(target,'he',true).set('forceDie',true); - event.count--; - if(event.count) event.redo(); - } - }, - }, - mouzhu:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - content:function(){ - 'step 0' - target.chooseCard('he','交给'+get.translation(player)+'一张牌',true); - 'step 1' - player.gain(result.cards,target,'giveAuto'); - 'step 2' - if(player.countCards('h')<=target.countCards('h')){ - event.finish(); - return; - } - var list=[]; - if(target.canUse('sha',player,false)) list.push('sha'); - if(target.canUse('juedou',player,false)) list.push('juedou'); - if(!list.length) event.finish(); - else if(list.length==1) event._result={control:list[0]}; - else target.chooseControl(list).set('prompt','对'+get.translation(player)+'使用一张【杀】或【决斗】。').ai=function(){ - return get.effect(player,{name:'sha'},target,target)>=get.effect(player,{name:'juedou'},target,target)?'sha':'juedou'; - }; - 'step 3' - target.useCard({name:result.control,isCard:true},player); - }, - ai:{ - order:7, - result:{ - target:-1.2, - player:function(player,target){ - if(target.countCards('h')-player.countCards('h')>1) return 1; - if(get.damageEffect(target,player,player,player)>0) return 1; - if(player.hp>3||player.countCards('h','sha')&&player.countCards('h','shan')) return 0; - if(player.hp>2) return -1.1; - return -2; - }, - }, - }, - }, - niluan:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - return event.player!=player&&(event.player.hp>player.hp||event.player.countUsed('sha')) - }, - direct:true, - content:function(){ - var next=player.chooseToUse(); - next.logSkill='niluan'; - next.set('openskilldialog',get.prompt2('niluan')); - next.set('norestore',true); - next.set('_backupevent','niluanx'); - next.backup('niluanx'); - }, - }, - niluanx:{ - viewAs:{name:'sha'}, - filterCard:{color:'black'}, - position:'he', - check:function(card){return 5-get.value(card)}, - }, - cuorui:{ - audio:2, - trigger:{ - global:'gameDrawAfter', - player:'enterGame', - }, - forced:true, - filter:function(event,player){ - return player.maxHp>0&&!get.is.single(); - }, - content:function(){ - player.draw(Math.min(5,player.maxHp),false); - }, - group:'cuorui_nojudge', - subSkill:{ - nojudge:{ - trigger:{ - player:'phaseJudgeBefore', - }, - forced:true, - audio:'cuorui', - filter:function(event,player){ - return !player.storage.cuorui&&(get.is.single()||player.countCards('j')); - }, - content:function(){ - player.storage.cuorui=true; - trigger.cancel(); - game.log(player,'跳过了','#g判定阶段'); - }, - }, - }, - }, - liewei:{ - audio:2, - trigger:{source:'dieAfter'}, - frequent:true, - content:function(){ - player.draw(3); - }, - }, - //蒋干 - weicheng:{ - audio:2, - trigger:{global:'gainAfter'}, - //forced:true, - frequent:true, - filter:function(event,player){ - if(event.source==player&&event.player!=player&&player.hp>player.countCards('h')){ - return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; - } - return false; - }, - content:function(){ - player.draw(); - }, - }, - daoshu:{ - audio:2, - enable:'phaseUse', - filterTarget:function(c,p,t){ - return t!=p&&t.countGainableCards(p,'h')>0; - }, - filter:function(e,p){ - return !p.hasSkill('daoshu_used') - }, - content:function(){ - 'step 0' - player.chooseControl(lib.suit).set('prompt','请选择一个花色').ai=function(){return lib.suit.randomGet()}; - 'step 1' - event.suit=result.control; - player.popup(event.suit+2); - game.log(player,'选择了',event.suit+2); - player.gainPlayerCard(target,true,'h','visibleMove'); - 'step 2' - if(result.bool){ - var suit2=get.suit(result.cards[0]); - if(suit2==event.suit){ - target.damage(); - event.finish(); - } - else{ - player.addTempSkill('daoshu_used','phaseUseEnd'); - if(player.countCards('h',function(card){return get.suit(card)!=suit2})==0){ - player.showHandcards(); - event.finish(); - } - else player.chooseCard('h',true,function(card){ - return get.suit(card)!=_status.event.suit2 - },'交给'+get.translation(target)+'一张不为'+get.translation(suit2)+'花色的牌').set('suit2',suit2); - } - } - else event.finish(); - 'step 3' - player.give(result.cards,target,true); - }, - ai:{ - order:1, - result:{ - target:-1, - }, - }, - subSkill:{ - used:{sub:true}, - }, - }, - //统率三军诸葛瑾和文聘 - "zhenwei_three":{ - global:"zhenwei_three_others", - subSkill:{ - others:{ - mod:{ - globalTo:function (from,to,distance){ - if(from.side!=to.side&&game.hasPlayer(function(current){ - return current!=to&¤t.side==to.side&¤t.hasSkill('zhenwei_three'); - }))return distance+1; - }, - }, - sub:true, - }, - }, - }, - "huanshi_three":{ - audio:"huanshi", - trigger:{ - global:"judge", - }, - filter:function (event,player){ - return player.countCards('he')>0&&player.side==event.player.side; - }, - direct:true, - content:function (){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he',function(card){ - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight','huanshi_three','noOrdering'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1, - }, - }, - }, - //英文版特典武将凯撒 - zhengfu:{ - 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", - line:false, - content:function (){ - 'step 0' - player.line(trigger.target,{color:[220, 90, 139]}); - player.chooseControl(['basic','trick','equip']).set('ai',function(){ - var player=_status.event.target; - if(!player.countCards('h','sha')&&player.countCards('h','shan')) return 'trick'; - return 'basic'; - }).set('prompt','请选择一种牌的类别').set('target',trigger.target); - 'step 1' - trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){ - return get.type(card,'trick')==result.control; - }).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',trigger.target.countCards('h','shan')) - 'step 2' - if(result.bool){ - var cards=result.cards; - player.gain(cards,trigger.target,'giveAuto'); - } - else trigger.getParent().directHit.add(trigger.target); - game.delay(); - }, - }, - //变权移植 - wanwei:{ - trigger:{target:['rewriteGainResult','rewriteDiscardResult']}, - direct:true, - filter:function(event,player){ - return event.player!=player; - }, - audio:2, - content:function(){ - 'step 0' - var prompt='即将失去'+get.translation(trigger.result.cards)+',是否发动【挽危】?'; - var next=player.choosePlayerCard(player,prompt,trigger.position); - next.set('ai',function(button){ - return 20-get.value(button.link); - }); - next.filterButton=trigger.filterButton; - next.selectButton=trigger.result.cards.length; - 'step 1' - if(result.bool){ - player.logSkill('wanwei'); - trigger.result.cards=result.links.slice(0); - trigger.result.links=result.links.slice(0); - trigger.cards=result.links.slice(0); - trigger.untrigger(); - } - } - }, - yuejian:{ - trigger:{global:'phaseDiscardBegin'}, - audio:2, - filter:function(event,player){ - return event.player.countUsed()0&&event.player.needsToDiscard(); - }, - subSkill:{ - num:{ - mod:{ - maxHandcard:function(player,num){ - return num+player.maxHp; - } - } - }, - } - }, - gzjili:{ - mod:{ - aiOrder:function(player,card,num){ - if(player.isPhaseUsing()&&get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')){ - var range0=player.getAttackRange(); - var range=0; - var info=get.info(card); - if(info&&info.distance&&info.distance.attackFrom){ - range-=info.distance.attackFrom; - } - if(player.getEquip(1)){ - var num=0; - var info=get.info(player.getEquip(1)); - if(info&&info.distance&&info.distance.attackFrom){ - num-=info.distance.attackFrom; - } - range0-=num; - } - range0+=range; - if(range0==(player.getHistory('useCard').length+player.getHistory('respond').length+2)&&player.countCards('h',function(cardx){ - return get.subtype(cardx)!='equip1'&&player.getUseValue(cardx)>0; - })) return num+10; - } - }, - }, - trigger:{player:['useCard','respond']}, - frequent:true, - locked:false, - filter:function(event,player){ - return player.getHistory('useCard').length+player.getHistory('respond').length==player.getAttackRange(); - }, - audio:2, - content:function(){ - player.draw(player.getAttackRange()); - }, - ai:{ - threaten:1.8, - effect:{ - target:function(card,player,target,current){ - if(player!=target||!player.isPhaseUsing()) return; - if(get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')){ - var range0=player.getAttackRange(); - var range=0; - var info=get.info(card); - if(info&&info.distance&&info.distance.attackFrom){ - range-=info.distance.attackFrom; - } - if(player.getEquip(1)){ - var num=0; - var info=get.info(player.getEquip(1)); - if(info&&info.distance&&info.distance.attackFrom){ - num-=info.distance.attackFrom; - } - range0-=num; - } - range0+=range; - var delta=range0-(player.getHistory('useCard').length+player.getHistory('respond').length); - if(delta<0) return; - var num=player.countCards('h',function(card){ - return (get.cardtag(card,'gifts')||get.subtype(card)!='equip1')&&player.getUseValue(card)>0; - }); - if(delta==2&&num>0) return [1,3]; - if(num>=delta) return 'zeroplayertarget'; - } - }, - }, - } - }, - xiongsuan:{ - limited:true, - enable:'phaseUse', - filterCard:true, - filter:function(event,player){ - return player.countCards('h'); - }, - check:function(card){ - return 7-get.value(card); - }, - filterTarget:true, - content:function(){ - 'step 0' - player.awakenSkill('xiongsuan'); - target.damage('nocard'); - 'step 1' - player.draw(3); - var list=[]; - var skills=target.getOriginalSkills(); - for(var i=0;i1){ - player.chooseControl(list).set('prompt','选择一个限定技在回合结束后重置之'); - } - else{ - event.finish(); - } - 'step 2' - target.storage.xiongsuan_restore=result.control; - target.addTempSkill('xiongsuan_restore','phaseZhunbeiBegin'); - }, - subSkill:{ - restore:{ - trigger:{global:'phaseAfter'}, - silent:true, - content:function(){ - player.restoreSkill(player.storage.xiongsuan_restore); - } - } - }, - ai:{ - order:4, - damage:true, - result:{ - target:function(player,target){ - if(target.hp>1){ - var skills=target.getOriginalSkills(); - for(var i=0;i=0) return 10; - if(target.hp>=4) return 5; - if(target.hp==3){ - if(player.countCards('h')<=2&&game.hasPlayer(function(current){ - return current.hp<=1&&get.attitude(player,current)<0; - })){ - return 3; - } - } - return 0; - } - } - } - }, - diancai:{ - audio:2, - trigger:{global:'phaseUseEnd'}, - filter:function(event,player){ - if(_status.currentPhase==player) return false; - var num=0; - player.getHistory('lose',function(evt){ - if(evt.cards2&&evt.getParent('phaseUse')==event) num+=evt.cards2.length; - }); - return num>=player.hp; - }, - content:function(){ - 'step 0' - var num=player.maxHp-player.countCards('h'); - if(num>0){ - player.draw(num); - } - }, - }, - diaodu:{ - audio:2, - group:"diaodu_use", - subfrequent:['use'], - subSkill:{ - use:{ - trigger:{ - player:"useCard", - }, - audio:"diaodu", - frequent:true, - prompt:'是否发动【调度】摸一张牌?', - filter:function (event,player){ - return get.type(event.card)=='equip' - }, - content:function (){ - player.draw('nodelay'); - }, - ai:{ - reverseEquip:true, - effect:{ - target:function (card,player,target,current){ - if(player==target&&get.type(card)=='equip') return [1,3]; - }, - }, - }, - }, - }, - trigger:{ - player:"phaseUseBegin", - }, - filter:function (event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countGainableCards(player,'e')>0; - }); - }, - direct:true, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt2('diaodu'),function(card,player,current){ - return current!=player&¤t.countGainableCards(player,'e')>0; - }).ai=function(target){ - var num=get.attitude(_status.event.player,target); - if(target.isDamaged()&&target.getEquip('baiyin')&&num>0) return 2*num - return -num; - }; - 'step 1' - if(result.bool){ - event.target1=result.targets[0]; - player.logSkill('diaodu',event.target1); - player.line(event.target1,'diaodu'); - player.gainPlayerCard(event.target1,'e',true); - } - else event.finish(); - 'step 2' - if(result.bool){ - event.card=result.cards[0]; - player.chooseTarget('是否将'+get.translation(event.card)+'交给一名其他角色?',function(card,player,current){ - return current!=player&¤t!=event.target1; - }); - } - else event.finish(); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.gain(card,player,'give'); - } - }, - }, - zhengbi:{ - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - //if(event.player!=player) return false; - return game.hasPlayer(function(current){return current!=player&¤t.isHealthy()})||player.countCards('h',{type:'basic'}); - }, - content:function(){ - 'step 0' - var choices=[]; - if(game.hasPlayer(function(current){return current.isHealthy()})) choices.push('选择一名未受伤的角色'); - if(player.countCards('h',{type:'basic'})) choices.push('交给一名角色一张基本牌'); - player.chooseControl(choices,ui.create.dialog('征辟

    选择一项
    ','hidden')).set('ai',function(){ - if(choices.length>1){ - return 1; - } - return 0; - }); - 'step 1' - if(result.control=='选择一名未受伤的角色') player.chooseTarget('征辟

    选择一名未受伤的角色,你对其使用牌没有次数和距离限制直到回合结束
    ',function(card,player,target){ - return target!=player&&target.isHealthy(); - },true); - else player.chooseCardTarget({ - prompt:'征辟

    交给一名其他角色一张基本牌,然后该角色交给你一张非基本牌或两张基本牌
    ', - position:'h', - filterCard:function(card){return get.type(card)=='basic'}, - filterTarget:function(card,player,target){ - return target!=player; - }, - ai1:function(card){return 7-get.value(card)}, - //ai2:function(card,player,target){} - }).set('forced',true); - 'step 2' - event.target=result.targets[0]; - player.line(result.targets,'green'); - if(result.cards.length){ - event.cards=result.cards; - result.targets[0].gain(result.cards,player,'give'); - } - else{ - player.storage.zhengbi_eff1=result.targets[0]; - player.addTempSkill('zhengbi_eff1'); - event.finish(); - } - 'step 3' - var choices=[]; - if(target.countCards('he',{type:['trick','delay','equip']})) choices.push('一张非基本牌'); - if(target.countCards('h',{type:'basic'})>1) choices.push('两张基本牌'); - if(choices.length) target.chooseControl(choices,ui.create.dialog('征辟

    交给'+get.translation(player)+'
    ')).set('ai',function(event,player){ - if(choices.length>1){ - if(player.countCards('he',{type:['trick','delay','equip']},function(card){return get.value(card)<7})) return 0; - return 1; - } - return 0; - }); - else{ - if(target.countCards('h')){ - var cards=target.getCards('h'); - player.gain(cards,target,'giveAuto'); - event.finish(); - } - else event.finish(); - } - 'step 4' - var check=(result.control=='一张非基本牌'); - target.chooseCard('he',(check?1:2),{type:(check?['trick','delay','equip']:'basic')},true); - 'step 5' - if(result.cards){ - player.gain(result.cards,target,'giveAuto'); - } - }, - subSkill:{ - eff1:{ - sub:true, - mod:{ - targetInRange:function (card,player,target){ - if(target==player.storage.zhengbi_eff1) return true; - }, - cardUsable:function (card,player,num){ - if(typeof num=='number'&&player.storage.zhengbi_eff1&&player.storage.zhengbi_eff1.isAlive()) return num+100; - }, - playerEnabled:function (card,player,target){ - if(player.storage.zhengbi_eff1.isAlive()&&player.storage.zhengbi_eff1&&target!=player.storage.zhengbi_eff1){ - var num=player.getCardUsable(card)-100; - if(num<=0) return false; - } - }, - }, - onremove:true, - }, - eff2:{sub:true}, - } - }, - fengying:{ - limited:true, - enable:'phaseUse', - position:'h', - filterCard:true, - selectCard:-1, - filter:function(event,player){ - return !player.storage.fengying&&player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - discard:false, - lose:false, - content:function(){ - 'step 0' - player.awakenSkill('fengying'); - player.storage.fengying=true; - player.insertPhase(); - var evt=_status.event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - 'step 1' - var cards=player.getCards('h'); - player.discard(cards); - player.chooseTarget('请选择至多'+cards.length+'名角色,令这些角色将手牌摸至手牌上限。',[1,cards.length],function(card,player,target){ - return target.countCards('h')2){ - return Math.min(5,target.maxHp)-target.countCards('h'); - } - return att/3; - }); - 'step 2' - if(result.bool){ - var list=result.targets; - list.sort(lib.sort.seat); - player.line(list,'thunder'); - game.asyncDraw(list,function(current){ - return current.maxHp-current.countCards('h'); - }); - } - }, - skillAnimation:'epic', - animationColor:'gray', - ai:{ - order:0.1, - result:{ - player:0, - } - }, - }, - //新服曹笨 - xinshanjia:{ - group:["xinshanjia_count"], - locked:false, - mod:{ - aiValue:function(player,card,num){ - if((player.storage.xinshanjia||0)<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')){ - if(get.position(card)=='e') return num/player.hp; - return num*player.hp; - } - }, - }, - subSkill:{ - count:{ - forced:true, - silent:true, - popup:false, - trigger:{ - player:"loseEnd", - }, - filter:function(event,player){ - return event.es.length>0; - }, - content:function (){ - lib.skill.xinshanjia.sync(player); - }, - }, - }, - audio:"shanjia", - trigger:{ - player:"phaseUseBegin", - }, - intro:{ - content:"本局游戏内已失去过#张装备区内的牌", - }, - frequent:true, - sync:function(player){ - var history=player.actionHistory; - var num=0; - for(var i=0;i0) player.markSkill('xinshanjia'); - }, - content:function (){ - 'step 0' - player.draw(3); - 'step 1' - lib.skill.xinshanjia.sync(player); - var num=3-player.storage.xinshanjia; - if(num>0){ - player.chooseToDiscard('he',true,num).ai=get.disvalue; - } - 'step 2' - var bool=true; - if(result.cards){ - for(var i=0;i2) return false; - }, - effect:{ - target:function(card,player,target){ - if(player.storage.xinshanjia<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; - }, - }, - }, - }, - //OL马超 - ol_shichou:{ - audio:2, - trigger:{ - player:'useCard2', - }, - direct:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha';//&&player.isDamaged(); - }, - content:function(){ - 'step 0' - var num=Math.max(1,player.getDamagedHp()); - player.chooseTarget('是否发动【誓仇】,令至多'+num+'名其他角色也成为此【杀】的目标?',[1,num],function(card,player,target){ - return target!=player&&!trigger.targets.contains(target)&&player.canUse({name:'sha'},target); - }).ai=function(target){ - return get.effect(target,{name:'sha'},_status.event.player); - }; - 'step 1' - if(result.bool&&result.targets&&result.targets.length){ - var targets=result.targets; - player.logSkill('ol_shichou',targets); - player.line(targets,trigger.card.nature); - trigger.targets.addArray(targets); - } - }, - }, - //新大小乔 - "new_xingwu":{ - audio:"xingwu", - trigger:{ - player:"phaseDiscardBegin", - }, - direct:true, - intro:{ - content:"cards", - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - init:function (player){ - if(!player.storage.new_xingwu) player.storage.new_xingwu=[]; - }, - content:function (){ - 'step 0' - player.chooseCard(get.prompt2('new_xingwu')).set('ai',function(card){ - var player=_status.event.player; - for(var i=0;i0&& - get.attitude(player,current)<0) - })) return 0; - } - return 7-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('new_xingwu'); - if(player.storage.new_xingwu.length<2){ - player.$give(result.cards,player,false); - } - player.lose(result.cards,ui.special,'toStorage'); - player.storage.new_xingwu=player.storage.new_xingwu.concat(result.cards); - player.markSkill('new_xingwu'); - player.syncStorage('new_xingwu'); - } - else{ - event.finish(); - } - 'step 2' - var suitlist=[]; - for(var i=0;i0) return -1; - return get.damageEffect(target,player,player)*target.sex=='male'?2:1+target.countCards('e')/2; - }); - } - 'step 4' - if(result.bool){ - var target=result.targets[0]; - var num=target.sex=="male"?2:1; - target.damage(num); - event.target=target; - player.line(target,'green'); - } - else{ - event.finish(); - } - 'step 5' - if(event.target&&event.target.isAlive()){ - var es=event.target.getCards('e'); - if(es.length){ - event.target.discard(es); - } - } - }, - ai:{ - threaten:1.5, - }, - }, - "new_luoyan":{ - group:["new_luoyan_tianxiang","new_luoyan_liuli"], - }, - "new_luoyan_tianxiang":{ - inherit:"retianxiang", - filter:function (event,player){ - if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; - if(player.hasSkill('retianxiang')||player.hasSkill('tianxiang')) return false; - return lib.skill.retianxiang.filter(event,player); - }, - audio:"tianxiang", - }, - "new_luoyan_liuli":{ - inherit:"liuli", - filter:function (event,player){ - if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; - if(player.hasSkill('liuli')) return false; - return lib.skill.liuli.filter(event,player); - }, - audio:"liuli", - }, - //新孙鲁育 - "new_meibu":{ - audio:"meibu", - trigger:{ - global:"phaseUseBegin", - }, - filter:function (event,player){ - return event.player!=player&&event.player.isAlive()&&event.player.inRange(player); - }, - direct:true, - derivation:["new_zhixi"], - checkx:function (event,player){ - if(get.attitude(player,event.player)>=0) return false; - var e2=player.getEquip(2); - if(e2){ - if(e2.name=='tengjia') return true; - if(e2.name=='bagua') return true; - } - return event.player.countCards('h')>event.player.hp; - }, - content:function (){ - "step 0" - var check=lib.skill.new_meibu.checkx(trigger,player); - player.chooseToDiscard(get.prompt2('new_meibu',trigger.player),'he').set('ai',function(card){ - if(_status.event.check) return 6-get.value(card); - return 0; - }).set('check',check).set('logSkill','new_meibu'); - "step 1" - if(result.bool){ - var target=trigger.player; - var card=result.cards[0]; - player.line(target,'green'); - target.addTempSkill('new_zhixi','phaseUseEnd'); - if(card.name!='sha'&&get.type(card)!='trick'&&get.color(card)!='black'){ - target.addTempSkill('new_meibu_range','phaseUseEnd'); - target.storage.meibu=player; - } - target.markSkillCharacter('new_meibu',player,'魅步','锁定技,出牌阶段,你至多可使用X张牌,你使用了锦囊牌后不能再使用牌(X为你的体力值)。'); - } - }, - ai:{ - expose:0.2, - }, - subSkill:{ - range:{ - mod:{ - globalFrom:function (from,to,num){ - if(to==from.storage.meibu){ - return -Infinity; - } - }, - }, - sub:true, - }, - }, - }, - "new_mumu":{ - audio:"mumu", - trigger:{ - player:"phaseUseBegin", - }, - direct:true, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt('new_mumu'),'弃置一名角色装备区内的一张牌,或者获得一名角色装备区内的防具牌',function(card,player,target){ - if(target==player) return target.getEquip(2)!=undefined; - return target.countCards('e')>0; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target) - if(target.getEquip(2)&&player.isEmpty(2)){ - return -2*att; - } - return -att; - }); - 'step 1' - if(result.bool&&result.targets&&result.targets.length){ - event.target=result.targets[0]; - player.logSkill('new_mumu',event.target); - player.line(event.target,'green'); - var e=event.target.getEquip(2); - event.e=e; - if(target==player) event.choice='获得一张防具牌'; - else if(e){ - player.chooseControl('弃置一张装备牌','获得一张防具牌').set('ai',function(){ - if(_status.event.player.getEquip(2)){ - return '弃置一张装备牌'; - } - return '获得一张防具牌'; - }); - } - else{ - event.choice='弃置一张装备牌'; - } - }else event.finish(); - 'step 2' - var choice=event.choice||result.control; - if(choice=='弃置一张装备牌'){ - player.discardPlayerCard(event.target,'e',true); - } - else{ - if(event.e){ - player.gain(event.e,event.target,'give'); - player.addTempSkill('new_mumu2') - } - } - }, - }, - "new_zhixi":{ - mod:{ - cardEnabled:function(card,player){ - if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; - }, - cardUsable:function(card,player){ - if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; - }, - cardRespondable:function(card,player){ - if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; - }, - }, - trigger:{ - player:"useCard1", - }, - forced:true, - popup:false, - onremove:true, - firstDo:true, - onremove:function(player){ - player.unmarkSkill('new_meibu'); - delete player.storage.new_zhixi; - delete player.storage.new_zhixi2; - }, - content:function(){ - player.addMark('new_zhixi',1,false); - if(get.type2(trigger.card)=='trick') player.storage.new_zhixi2=true; - }, - ai:{presha:true,pretao:true,nokeep:true}, - }, - "new_mumu2":{ - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - }, - }, - }, - qingzhong:{ - audio:2, - }, - qingzhongx:{ - audio:'weijing', - trigger:{player:'phaseUseBegin'}, - check:function(event,player){ - if(game.hasPlayer(function(current){ - return current!=player&¤t.isMinHandcard()&&get.attitude(player,current)>0; - })){ - return true; - } - if(player.countCards('h')<=2) return true; - // if(player.countCards('h')<=3&&!player.countCards('h','shan')) return true; - //if(player.countCards('h',{type:'basic'})<=1) return true; - return false; - }, - content:function(){ - player.draw(2); - player.addTempSkill('qingzhongx_give'); - }, - subSkill:{ - give:{ - trigger:{player:'phaseUseEnd'}, - filter:function(event,player){ - return !player.isMinHandcard(true); - }, - audio:'weijing', - forced:true, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current.isMinHandcard(); - }); - if(list.length==1){ - if(list[0]!=player){ - player.line(list[0],'green'); - player.swapHandcards(list[0]); - } - event.finish(); - } - else{ - player.chooseTarget(true,'清忠:选择一名手牌最少的角色与其交换手牌',function(card,player,target){ - return target.isMinHandcard(); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - if(target!=player){ - player.line(target,'green'); - player.swapHandcards(target); - } - } - } - } - } - }, - weijing:{ - audio:2, - group:['weijing_sha','weijing_shan'], - subSkill:{ - sha:{ - audio:'qingzhong', - enable:'chooseToUse', - viewAs:{name:'sha',isCard:true}, - filterCard:function(){return false}, - viewAsFilter:function(player){ - if(player.hasSkill('weijing_disable')) return false; - }, - selectCard:-1, - mark:false, - precontent:function(){ - player.addTempSkill('weijing_disable','roundStart'); - }, - prompt:'视为使用一张杀', - ai:{ - order:function(){ - var player=_status.event.player; - if(!player.hasShan()&&!game.hasPlayer(function(current){ - return player.canUse('sha',current)&¤t.hp==1&&get.effect(current,{name:'sha'},player,player)>0; - })){ - return 0; - } - return 2.95; - }, - skillTagFilter:function(player,tag,arg){ - if(player.hasSkill('weijing_disable')) return false; - if(arg!='use') return false; - }, - respondSha:true, - } - }, - shan:{ - audio:'qingzhong', - enable:'chooseToUse', - viewAs:{name:'shan',isCard:true}, - mark:false, - filterCard:function(){return false}, - viewAsFilter:function(player){ - if(player.hasSkill('weijing_disable')) return false; - return true; - }, - onuse:function(event,player){ - player.addTempSkill('weijing_disable','roundStart'); - }, - selectCard:-1, - prompt:'视为使用一张闪', - ai:{ - order:function(){ - var player=_status.event.player; - if(player.hasSkill('qingzhongx_give')) return 2.95; - return 3.15; - }, - skillTagFilter:function(player){ - if(player.hasSkill('weijing_disable')) return false; - }, - respondShan:true, - } - }, - disable:{ - mark:true, - intro:{ - content:'本轮已发动' - } - } - } - }, - zishu:{ - audio:2, - locked:true, - subSkill:{ - discard:{ - trigger:{global:'phaseEnd'}, - audio:"zishu", - forced:true, - filter:function(event,player){ - if(_status.currentPhase!=player){ - var he=player.getCards('h'); - var bool=false; - player.getHistory('gain',function(evt){ - if(!bool&&evt&&evt.cards){ - for(var i=0;i0) return false; - return event.cards.filterInD().length>0 - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('yingyuan'),'将'+get.translation(trigger.cards)+'交给一名其他角色',function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - if(target.hasJudge('lebu')) return 0; - var att=get.attitude(_status.event.player,target); - if(att<3) return 0; - if(target.hasSha()&&_status.event.sha){ - att/=5; - } - if(event.wuxie&&target.needsToDiscard(1)){ - att/=5; - } - return att/(1+get.distance(player,target,'absolute')); - }).set('sha',trigger.cards[0].name=='sha').set('wuxie',trigger.cards[0].name=='wuxie'); - 'step 1' - if(result.bool){ - player.logSkill('yingyuan',result.targets[0]); - result.targets[0].gain(trigger.cards.filterInD(),'gain2'); - player.getHistory('custom').push({yingyuan_name:trigger.card.name}); - } - }, - }, - shuimeng:{ - audio:true, - trigger:{player:'phaseUseAfter'}, - direct:true, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('shuimeng'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - return -get.attitude(_status.event.player,target); - }).set('goon',player.needsToDiscard()||player.hasCard(function(card){ - var val=get.value(card); - if(val<0) return true; - if(val<=5){ - return card.number>=11; - } - if(val<=6){ - return card.number>=12; - } - return false; - })); - 'step 1' - if(result.bool){ - player.logSkill('shuimeng',result.targets); - event.target=result.targets[0]; - player.chooseToCompare(event.target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.chooseUseTarget({name:'wuzhong',isCard:true},true); - } - else{ - event.target.useCard({name:'guohe',isCard:true},player); - } - } - }, - qianya:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - direct:true, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'&&player.countCards('h'); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - player.chooseCardTarget({ - filterCard:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - selectCard:[1,nh], - ai1:function(card){ - var player=_status.event.player; - var cardname=_status.event.cardname; - if(_status.event.du) return -get.value(card,player,'raw'); - else if(_status.event.shuimeng){ - if(cardname=='wuzhong'){ - if(player.needsToDiscard(2-ui.selected.cards.length)){ - return 10-get.value(card,player,'raw'); - } - } - else if(cardname=='guohe'){ - if(player.needsToDiscard(-1-ui.selected.cards.length)){ - return 10-get.value(card,player,'raw'); - } - } - return 0; - } - else if(cardname=='lebu'){ - if(player.needsToDiscard(1-ui.selected.cards.length)){ - return 8-get.value(card,player,'raw'); - } - else{ - if(!ui.selected.cards.length){ - return 6-get.value(card,player,'raw'); - } - return 0; - } - } - else if(cardname=='shunshou'){ - if(_status.event.nh<=2) return get.value(card,player,'raw'); - } - else if(cardname=='huogong'){ - if(player.hp==1) return get.value(card,player,'raw'); - } - if(ui.selected.cards.length) return 0; - return 7-get.value(card,player,'raw'); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - var nh2=target.countCards('h'); - var num=Math.sqrt(1+nh2); - var cardname=_status.event.cardname; - if(_status.event.du) return 0.5-att; - else if(_status.event.shuimeng){ - return att/num; - } - else if(cardname=='lebu'){ - return att/num; - } - else if(cardname=='shunshou'){ - if(_status.event.nh<=2) return att/num; - } - else if(cardname=='huogong'){ - if(_status.event.player.hp==1) return att/num; - } - if(_status.event.nh>nh2+1){ - return att/num; - } - return 0; - }, - du:player.hasCard(function(card){ - return get.value(card,player,'raw')<0; - }), - shuimeng:trigger.getParent(2).name=='shuimeng', - nh:nh, - cardname:trigger.card.name, - prompt:get.prompt2('qianya') - }); - 'step 1' - if(result.bool){ - player.logSkill('qianya',result.targets); - player.give(result.cards,result.targets[0]); - } - } - }, - xianfu:{ - trigger:{ - global:'gameDrawAfter', - player:'enterGame', - }, - forced:true, - filter:function(){ - return game.players.length>1; - }, - audio:6, - content:function(){ - 'step 0' - player.chooseTarget('请选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){ - return target!=player&&(!player.storage.xianfu2||!player.storage.xianfu2.contains(target)); - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0) return att+1; - if(att==0) return Math.random(); - return att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - if(!player.storage.xianfu2) player.storage.xianfu2=[]; - player.storage.xianfu2.push(target); - player.addSkill('xianfu2'); - } - } - }, - xianfu_mark:{ - marktext:'辅', - intro:{ - name:'先辅', - content:'当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力' - }, - }, - xianfu2:{ - audio:'xianfu', - charlotte:true, - trigger:{global:['damageEnd','recoverEnd']}, - forced:true, - filter:function(event,player){ - if(event.player.isDead()||!player.storage.xianfu2||!player.storage.xianfu2.contains(event.player)||event.num<=0) return false; - if(event.name=='damage') return true; - return player.isDamaged(); - }, - logTarget:'player', - content:function(){ - 'step 0' - var target=trigger.player; - if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[]; - target.storage.xianfu_mark.add(player); - target.storage.xianfu_mark.sortBySeat(); - target.markSkill('xianfu_mark'); - game.delayx(); - 'step 1' - player[trigger.name](trigger.num,'nosource'); - }, - onremove:function(player){ - if(!player.storage.xianfu2) return; - game.countPlayer(function(current){ - if(player.storage.xianfu2.contains(current)&¤t.storage.xianfu_mark){ - current.storage.xianfu_mark.remove(player); - if(!current.storage.xianfu_mark.length) current.unmarkSkill('xianfu_mark'); - else current.markSkill('xianfu_mark'); - } - }); - delete player.storage.xianfu2; - }, - group:'xianfu3', - }, - xianfu3:{ - trigger:{global:'dieBegin'}, - silent:true, - filter:function(event,player){ - return event.player==player||player.storage.xianfu2&&player.storage.xianfu2.contains(player); - }, - content:function(){ - if(player==event.player) lib.skill.xianfu2.onremove(player); - else player.storage.xianfu2.remove(event.player); - } - }, - chouce:{ - trigger:{player:'damageEnd'}, - content:function(){ - 'step 0' - event.num=trigger.num; - 'step 1' - player.judge(); - 'step 2' - event.color=result.color; - if(event.color=='black'){ - player.chooseTarget('弃置一名角色区域内的一张牌',function(card,player,target){ - return target.countCards('hej'); - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<0){ - att=-Math.sqrt(-att); - } - else{ - att=Math.sqrt(att); - } - return att*lib.card.guohe.ai.result.target(player,target); - }) - } - else{ - var next=player.chooseTarget('令一名角色摸一张牌'); - if(player.storage.xianfu2&&player.storage.xianfu2.length){ - next.set('prompt2','(若目标为'+get.translation(player.storage.xianfu2)+'则改为摸两张牌)'); - } - next.set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); - if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)) return att*2; - return att; - }) - } - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - if(event.color=='black'){ - player.discardPlayerCard(target,'hej',true); - } - else{ - if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)){ - if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[]; - target.storage.xianfu_mark.add(player); - target.storage.xianfu_mark.sortBySeat(); - target.markSkill('xianfu_mark'); - target.draw(2); - } - else{ - target.draw(); - } - } - } - 'step 4' - if(--event.num>0){ - player.chooseBool(get.prompt2('chouce')); - } - else{ - event.finish(); - } - 'step 5' - if(result.bool){ - player.logSkill('chouce'); - event.goto(1); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==3) return [1,get.tag(card,'damage')*1]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - fuqi:{ - audio:2, - forced:true, - trigger:{ - player:"useCard", - }, - filter:function(event,player){ - return event.card&&(get.type(event.card)=='trick'||get.type(event.card)=='basic'&&!['shan','tao','jiu','du'].contains(event.card.name))&&game.hasPlayer(function(current){ - return current!=player&&get.distance(current,player)<=1; - }); - }, - content:function(){ - trigger.directHit.addArray(game.filterPlayer(function(current){ - return current!=player&&get.distance(current,player)<=1; - })); - }, - }, - wylianji:{ - enable:'phaseUse', - audio:2, - usable:1, - filter:function(event,player){ - return player.hasCard(lib.skill.wylianji.filterCard); - }, - check:function(card){ - if(card.name=='sha') return 1; - else{ - if(get.tag(card,'damage')){ - if(get.tag(card,'multineg')) return 5; - return 2; - } - } - return 0; - }, - filterCard:function(card){ - return get.name(card)=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'&&!get.info(card).multitarget)&&get.info(card).enable; - }, - filterTarget:function(card,player,target){ - return target!=player&&!target.isMin()&& - (player.canUse(card,target,false)||game.hasPlayer(function(current){ - return current!=player&&target.canUse(card,current); - })); - }, - discard:false, - lose:true, - delay:false, - content:function(){ - 'step 0' - player.showCards(get.translation(player)+'对'+get.translation(target)+'发动了【连计】',cards); - 'step 1' - var equip1=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'; - }); - if(!equip1){ - player.popup('连计失败'); - game.log('牌堆中无装备'); - event.finish(); - return; - } - if(equip1.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ - equip1.remove(); - equip1=game.createCard2('qibaodao',equip1.suit,equip1.number); - } - target.$draw(equip1); - target.chooseUseTarget(true,equip1,'noanimate','nopopup'); - game.delay(); - 'step 2' - game.updateRoundNumber(); - var card=cards[0]; - var bool1=game.hasPlayer(function(current){ - return current!=player&&target.canUse(card,current); - }); - var bool2=player.canUse(card,target,false); - if(bool1&&bool2){ - target.chooseControl(function(){ - return 0; - }).set('choiceList',[ - '对除'+get.translation(player)+'以外的角色使用'+get.translation(cards)+',并将装备区里的武器牌交给该牌的一个目标角色', - '视为'+get.translation(player)+'对你使用'+get.translation(cards)+',并将装备区内的武器牌交给'+get.translation(player) - ]); - } - else if(bool1){ - event.directindex=0; - } - else if(bool2){ - event.directindex=1; - } - else{ - event.finish(); - } - 'step 3' - var card=cards[0]; - if(result&&typeof event.directindex!='number'){ - event.directindex=result.index; - } - if(event.directindex==1){ - event.insert(lib.skill.wylianji.content_use,{ - player:player, - target:target, - card:card - }) - } - else{ - event.insert(lib.skill.wylianji.content_give,{ - player:target, - card:card, - targets:game.filterPlayer(function(current){ - return current!=player; - }) - }); - } - }, - content_use:function(){ - 'step 0' - player.useCard(card,target); - 'step 1' - if(!get.owner(card)){ - target.gain(card,'gain2'); - } - 'step 2' - var equip1=target.getEquip(1); - if(equip1){ - game.delay(); - target.give(equip1,player); - target.line(player); - } - }, - content_give:function(){ - 'step 0' - var select=get.select(get.info(card).selectTarget); - if(select[1]==-1){ - for(var i=0;i1){ - player.chooseTarget(true,'将'+get.translation(equip1)+'交给一名角色',function(card,player,target){ - return _status.event.list.contains(target); - }).set('ai',function(target){ - return get.attitude(player,target); - }).set('list',_status.event.list); - event.equip1=equip1; - } - else{ - if(event.list.length==1){ - player.give(equip1,event.list[0]); - player.line(event.list); - } - event.finish(); - } - } - else{ - event.finish(); - } - 'step 3' - if(result.bool&&result.targets.length&&event.equip1){ - player.give(event.equip1,result.targets[0]); - player.line(result.targets); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(ui.selected.cards.length){ - var card=ui.selected.cards[0]; - var bool=(card.name!='sha'); - if(game.hasPlayer(function(current){ - return target.canUse(card,current,bool)&&get.effect(current,card,target,player)>0; - })){ - var num=1; - if(target.getEquip(1)){ - num=0.6; - } - if(target.hasSkillTag('noe')) 2*num; - return num; - } - } - return 0; - } - } - } - }, - moucheng:{ - audio:2, - derivation:['jingong','wy_meirenji','wy_xiaolicangdao'], - trigger:{global:'damageEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.source!=player&&event.getParent(2).name=='useCard'&&event.getParent(3).name=='wylianjiInserted'; - }, - init:function(player){ - player.storage.moucheng=0; - }, - intro:{ - content:'已造成#点伤害' - }, - unique:true, - juexingji:true, - content:function(){ - player.storage.moucheng+=trigger.num; - if(player.hasSkill('moucheng')){ - player.markSkill('moucheng'); - player.syncStorage('moucheng'); - } - if(player.storage.moucheng>=3){ - event.trigger('mouchengAwaken'); - } - }, - group:'moucheng_awaken', - subSkill:{ - awaken:{ - trigger:{player:'mouchengAwaken'}, - forced:true, - skillAnimation:true, - animationColor:'gray', - content:function(){ - player.awakenSkill('moucheng'); - player.removeSkill('wylianji'); - player.addSkill('jingong'); - } - } - } - }, - jingong:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',function(card){ - return card.name=='sha'||get.type(card)=='equip'; - }); - }, - delay:false, - usable:1, - content:function(){ - 'step 0' - var list=get.inpile('trick').randomGets(2); - if(Math.random()<0.5){ - list.push('wy_meirenji'); - } - else{ - list.push('wy_xiaolicangdao'); - } - for(var i=0;i=num) return false; - return player.countCards('h')>0; - }, - filterTarget:function(event,player,target){ - return player.canCompare(target); - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(!result.bool) event.finish(); - event.num=result.num1; - 'step 2' - if(num<=5&&target.countGainableCards(player,'he')>0) player.gainPlayerCard(target,'he',true); - 'step 3' - if(num<=9){ - var card=get.cardPile2(function(x){ - return x.name=='sha'; - }); - if(card) player.gain(card,'gain2'); - } - 'step 4' - if(num<=13){ - var card={name:'sha',nature:'thunder'}; - if(player.canUse(card,target,false)) player.useCard(card,target,false); - } - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - var sort=function(a,b){ - return b.number-a.number; - }; - var ps=player.getCards('h').sort(sort); - var ts=target.getCards('h').sort(sort); - if(ps[0].number>ts[0].number){ - var effect=get.effect(target,{name:'sha',nature:'thunder'},player,player) - if(ps[0].number<6&&target.countCards('he')>1) effect-=2; - if(ps[0].number<10) effect-=1; - return effect; - } - return ps.length>=ts.length?-0.5:0; - }, - }, - }, - }, - fenyue:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - if(!player.countCards('h')) return false; - var num; - if(get.mode()=='identity'){ - num=game.countPlayer(function(current){ - return current.identity=='zhong'||current.identity=='mingzhong'; - }); - } - else{ - num=1; - } - if(player.getStat().skill.fenyue>=num) return false; - return true; - }, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - ai:{ - order:2.8, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<0&&player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - })){ - return get.effect(target,{name:'sha'},player,target); - } - else{ - return 0; - } - } - } - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - player.chooseControl(function(){ - return 1; - }).set('choiceList',[ - '令'+get.translation(target)+'不能使用或打出手牌直到回合结束', - '视为对'+get.translation(target)+'使用一张杀(不计入次数限制)' - ]); - } - else{ - var evt=_status.event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - event.finish(); - } - 'step 2' - if(result.control=='选项一'){ - target.addTempSkill('fenyue2'); - } - else{ - player.useCard({name:'sha',isCard:true},target,false); - } - } - }, - fenyue2:{ - mark:true, - mod:{ - cardEnabled2:function (card){ - if(get.position(card)=='h') return false; - }, - }, - intro:{ - content:'不能使用或打出手牌' - } - }, - - huoshui:{ - audio:2, - enable:'phaseUse', - unique:true, - forceunique:true, - filter:function(event,player){ - if(player.name1=='gz_zoushi') return player.isUnseen(0); - return player.isUnseen(1); - }, - content:function(){ - if(player.name1=='gz_zoushi') player.showCharacter(0); - else player.showCharacter(1); - }, - global:'huoshui_mingzhi' - }, - huoshui_mingzhi:{ - ai:{ - nomingzhi:true, - skillTagFilter:function(player){ - if(_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('huoshui')){ - return true; - } - return false; - } - } - }, - qingcheng:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',{type:'equip'})&&game.hasPlayer(function(current){ - return current!=player&&!current.isUnseen(2); - }); - }, - filterCard:{type:'equip'}, - position:'he', - filterTarget:function(card,player,target){ - return !target.isUnseen(2); - }, - check:function(card){ - return 6-get.value(card,_status.event.player); - }, - content:function(){ - 'step 0' - if(get.is.jun(target)){ - event._result={control:'副将'}; - } - else{ - var choice='主将'; - var skills=lib.character[target.name2][3]; - for(var i=0;i=0) return 0; - if(player.hasCard(function(card){ - return get.tag(card,'damage')&&player.canUse(card,target,true,true); - })){ - if(target.maxHp>3) return -0.5; - return -1; - } - return 0; - } - } - } - }, - qingcheng_ai:{ - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'damage')) return 2; - } - } - } - }, - zhuoshui:{ - audio:'huoshui', - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - game.countPlayer(function(current){ - if(current!=player&&!current.hasSkill('fengyin')){ - player.line(current,'green'); - current.addTempSkill('fengyin'); - } - }); - } - }, - zqingcheng:{ - audio:'qingcheng', - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - filterCard:{type:'equip'}, - position:'he', - filterTarget:function(card,player,target){ - return target!=player; - }, - check:function(card){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return get.attitude(player,current)>2&¤t.isTurnedOver(); - })){ - return 10-get.value(card,player); - } - return 6-get.value(card,player); - }, - content:function(){ - 'step 0' - target.turnOver(); - 'step 1' - target.draw(2); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noturn')) return 0; - if(target.isTurnedOver()) return 2; - return -0.5; - } - } - } - }, - zfengshi:{ - audio:2, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.countCards('e'); - }, - logTarget:'target', - check:function(event,player){ - if(event.target.hasSkillTag('noe')) return false; - return get.attitude(player,event.target)<0; - }, - content:function(){ - trigger.target.chooseToDiscard('e',true); - } - }, - chuanxin:{ - audio:2, - trigger:{source:'damageBegin2'}, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - if(!_status.event.getParent('phaseUse')) return false; - if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.getParent().name==event.card.name){ - if(get.mode()=='guozhan'){ - return (event.player.identity!='qun'||player.identity=='ye')&& - !event.player.isUnseen()&&event.player.hasViceCharacter(); - } - else{ - var info=lib.character[event.player.name]; - if(!info) return false; - var skills=event.player.getSkills(); - for(var i=0;i=2) return 1; - return 0; - }).set('choiceList',['弃置装备区内的所有牌并失去一点体力',get.mode()=='guozhan'?'移除副将牌':'随机移除武将牌上的一个技能']); - } - else{ - event._result={index:1}; - } - 'step 1' - if(result.index==1){ - if(get.mode()!='guozhan'){ - var info=lib.character[trigger.player.name]; - var skills=trigger.player.getSkills(); - var list=[]; - for(var i=0;i0; - }, - logTarget:function(){ - return _status.currentPhase; - }, - content:function(){ - var source=_status.currentPhase; - if(source.hasSkill('hengjiang2')){ - source.storage.hengjiang2+=trigger.num; - source.storage.hengjiang3.add(player); - source.updateMarks(); - } - else{ - source.storage.hengjiang3=[player]; - source.storage.hengjiang2=trigger.num; - source.addTempSkill('hengjiang2'); - } - }, - ai:{ - maixie_defend:true, - } - }, - hengjiang2:{ - mark:true, - charlotte:true, - intro:{ - content:'手牌上限-#' - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.storage.hengjiang2; - } - }, - onremove:function(player){ - delete player.storage.hengjiang2; - delete player.storage.hengjiang3; - }, - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - if(event.cards&&event.cards.length) return false; - var players=player.storage.hengjiang3; - for(var i=0;i0; - }, - logTarget:function(){ - return _status.currentPhase; - }, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - event.count--; - var source=_status.currentPhase; - if(source.hasSkill('rehengjiang2')){ - source.storage.rehengjiang2++; - source.storage.rehengjiang3.push(player); - source.storage.rehengjiang3.sortBySeat(source); - source.updateMarks(); - } - else{ - source.storage.rehengjiang3=[player]; - source.storage.rehengjiang2=1; - source.addTempSkill('rehengjiang2'); - } - "step 2" - if(event.count){ - player.chooseBool(get.prompt2('rehengjiang',_status.currentPhase)).set('ai',function(){ - return lib.skill.rehengjiang.check(_status.event.getTrigger(),_status.event.player); - }) - } - else event.finish(); - "step 3" - if(result.bool){ - player.logSkill('rehengjiang',_status.currentPhase); - event.goto(1); - } - }, - ai:{ - maixie_defend:true, - } - }, - rehengjiang2:{ - mark:true, - charlotte:true, - intro:{ - content:'手牌上限-#' - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.storage.rehengjiang2; - } - }, - onremove:function(player){ - delete player.storage.rehengjiang2; - delete player.storage.rehengjiang3; - }, - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - if(event.cards&&event.cards.length) return false; - var players=player.storage.rehengjiang3; - for(var i=0;i1){ - goon=player.hasCard(function(card){ - return card.number>10&&get.value(card)<=5; - }); - } - else{ - goon=player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - }); - } - player.chooseTarget(get.prompt2('shuangren'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - var player=_status.event.player; - if(_status.event.goon&&get.attitude(player,target)<0){ - return get.effect(target,{name:'sha'},player,player); - } - return 0; - }).set('goon',goon); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('shuangren',target); - player.chooseToCompare(target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - var target=event.target; - if(target.identity!='ye'&&target.identity!='unknown'&&game.hasPlayer(function(current){ - if(!player.canUse('sha',current,false)) return false; - if(target==current) return false; - if(get.mode()=='guozhan'){ - return target.identity==current.identity; - } - return true; - })){ - var str='对一名'; - if(get.mode()=='guozhan'){ - str+=get.translation(target.identity)+'势力的'; - } - player.chooseTarget(str+'角色使用一张杀',true,function(card,player,target){ - if(!player.canUse('sha',target,false)) return false; - if(get.mode()=='guozhan'){ - return target.identity==_status.event.identity; - } - return true; - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }).set('identity',target.identity); - } - else{ - player.useCard({name:'sha',isCard:true},target,false); - event.finish(); - } - } - else{ - trigger.cancel(); - event.finish(); - } - 'step 3' - if(result.bool&&result.targets&&result.targets.length){ - player.useCard({name:'sha',isCard:true},result.targets[0],false); - } - } - }, - kuanshi:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('kuanshi')).set('ai',function(target){ - if(get.attitude(_status.event.player,target)>0){ - return 1/Math.sqrt(target.hp+1); - } - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('kuanshi'); - target.storage.kuanshi2=player; - target.addSkill('kuanshi2'); - } - } - }, - kuanshi2:{ - /*mark:'character', - intro:{ - content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' - },*/ - trigger:{player:'damageBegin4'}, - forced:true, - filter:function(event,player){ - return event.num>1; - }, - //priority:-11, - content:function(){ - trigger.cancel(); - player.storage.kuanshi2.skip('phaseDraw'); - player.removeSkill('kuanshi2'); - }, - group:'kuanshi2_remove', - onremove:true, - subSkill:{ - remove:{ - trigger:{global:['phaseZhunbeiBegin','dieAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.kuanshi2; - }, - content:function(){ - player.removeSkill('kuanshi2'); - } - } - } - }, - xiashu:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - var maxval=0; - var hs=player.getCards('h'); - for(var i=0;i0) return 0.1; - if(maxval>=8) return 0; - if(att==0) return 0.2; - if(dh>=3) return dh; - if(dh==2){ - if(maxval<=7) return dh; - } - if(maxval<=6) return dh; - return 0; - - }).set('maxval',maxval); - 'step 1' - if(result.bool){ - player.logSkill('xiashu',result.targets); - event.target=result.targets[0]; - var hs=player.getCards('h'); - event.target.gain(hs,player,'giveAuto'); - } - else{ - event.finish(); - } - 'step 2' - var hs=event.target.getCards('h'); - if(!hs.length){ - event.finish(); - return; - } - hs.sort(function(a,b){ - return get.value(b,player,'raw')-get.value(a,player,'raw'); - }); - event.target.chooseCard([1,hs.length],'展示至少一张手牌',true).set('ai',function(card){ - var rand=_status.event.rand; - var list=_status.event.list; - if(_status.event.att){ - if(ui.selected.cards.length>=Math.ceil(list.length/2)) return 0; - var value=get.value(card); - if(_status.event.getParent().player.isHealthy()){ - value+=(get.tag(card,'damage')?1.5:0)+(get.tag(card,'draw')?2:0); - } - return value; - } - if(ui.selected.cards.length>=Math.floor(list.length/2)) return 0; - return (list.indexOf(card)%2==rand)?1:0; - }).set('rand',(Math.random()<0.6)?1:0).set('list',hs).set('att',get.attitude(event.target,player)>0); - 'step 3' - event.target.showCards(result.cards); - event.cards1=result.cards; - event.cards2=event.target.getCards('h',function(card){ - return !event.cards1.contains(card); - }); - 'step 4' - var choice; - var num1=event.cards1.length; - var num2=event.cards2.length; - if(get.attitude(event.target,player)>0&&num1>=num2){ - choice=0; - } - else if(num1==num2){ - choice=(Math.random()<0.45)?0:1; - } - else if(num1>num2){ - if(num1-num2==1){ - choice=(Math.random()<0.6)?0:1; - } - else{ - choice=0; - } - } - else{ - if(num2-num1==1){ - choice=(Math.random()<0.6)?1:0; - } - else{ - choice=1; - } - } - player.chooseControl(function(event,player){ - return _status.event.choice; - }).set('choiceList',['获得'+get.translation(event.target)+'展示的牌', - '获得'+get.translation(event.target)+'未展示的牌']).set('choice',choice); - 'step 5' - if(result.index==0){ - player.gain(event.cards1,target,'give'); - } - else{ - player.gain(event.cards2,target,'giveAuto'); - } - }, - ai:{ - expose:0.1 - } - }, - sheyan:{ - audio:2, - trigger:{target:'useCardToTarget'}, - filter:function(event,player){ - if(!event.targets||!event.targets.contains(player)) return false; - var info=get.info(event.card); - if(info.type!='trick') return false; - if(info.multitarget) return false; - if(event.targets.length>1) return true; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,event.player,current); - }); - }, - direct:true, - content:function(){ - 'step 0' - var bool1=(trigger.targets.length>1); - var bool2=game.hasPlayer(function(current){ - return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); - }); - if(bool1&&bool2){ - player.chooseControlList(get.prompt('sheyan'),['为'+get.translation(trigger.card)+'增加一个目标','为'+get.translation(trigger.card)+'减少一个目标'],function(event,player){ - if(_status.event.add) return 0; - return 1; - }).set('add',get.effect(player,trigger.card,trigger.player,player)>=0); - } - else if(bool2){ - event.type='add'; - event.goto(2); - event.unchosen=true; - } - else{ - event.type='remove'; - event.goto(2); - event.unchosen=true; - } - 'step 1' - if(result.control=='cancel2'){ - event.finish(); - } - else if(result.index==1){ - event.type='remove'; - } - else{ - event.type='add'; - } - 'step 2' - if(event.type=='add'){ - player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ - var trigger=_status.event.getTrigger(); - return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - return get.effect(target,trigger.card,trigger.player,_status.event.player); - }); - } - else{ - player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - }).set('targets',trigger.targets); - } - 'step 3' - if(result.bool){ - if(!event.isMine()) game.delayx(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 4' - player.logSkill('sheyan',event.target); - if(event.type=='add'){ - trigger.targets.push(event.target); - } - else{ - trigger.getParent().excluded.add(event.target); - } - }, - ai:{ - expose:0.2 - } - }, - bingzheng:{ - audio:2, - trigger:{player:'phaseUseEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('bingzheng'),function(card,player,target){ - return target.countCards('h')!=target.hp; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - var nh=target.countCards('h'); - if(att>0){ - if(nh==target.hp-1){ - if(player==target) return att+1; - return att+2; - } - if(player==target&&player.needsToDiscard()) return att/3; - return att; - } - else{ - if(nh==target.hp+1) return -att; - if(nh==0) return 0; - return -att/2; - } - }); - 'step 1' - if(result.bool){ - player.logSkill('bingzheng',result.targets); - event.target=result.targets[0]; - if(event.target.countCards('h')){ - player.chooseControl(function(event,player){ - var target=event.target; - if(get.attitude(player,target)<0) return 1; - return 0; - }).set('choiceList',['令'+get.translation(event.target)+'摸一张牌', - '令'+get.translation(event.target)+'弃置一张手牌']); - } - else{ - event.directfalse=true; - } - } - else{ - event.finish(); - } - 'step 2' - if(event.directfalse||result.index==0){ - event.target.draw(); - } - else{ - event.target.chooseToDiscard('h',true); - } - 'step 3' - if(event.target.countCards('h')==event.target.hp){ - player.draw(); - if(event.target==player){ - event.finish(); - return; - } - var next=player.chooseCard('是否交给'+get.translation(event.target)+'一张牌?','he'); - next.set('ai',function(card){ - if(get.position(card)!='h') return 0; - if(_status.event.shan&&card.name=='shan'){ - return 11; - } - if(_status.event.goon){ - return 10-get.value(card); - } - return -get.value(card,_status.event.player,'raw'); - }); - if(get.attitude(player,event.target)>1&& - player.countCards('h','shan')>1&&player.countCards('h')>event.target.countCards('h')){ - next.set('shan',true); - } - if(get.attitude(player,event.target)>0&&player.needsToDiscard()){ - next.set('goon',true); - } - } - else{ - event.finish(); - } - 'step 4' - if(result.bool){ - event.target.gain(result.cards,player,'giveAuto'); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - fuman:{ - audio:2, - enable:'phaseUse', - filterTarget:function(card,player,target){ - return !target.hasSkill('fuman2')&&target!=player; - }, - filter:function(event,player){ - return player.countCards('h','sha'); - }, - discard:false, - lose:false, - delay:false, - filterCard:{name:'sha'}, - content:function(){ - target.gain(cards,player,'giveAuto'); - target.storage.fuman3=cards[0]; - target.storage.fuman2=player; - target.addTempSkill('fuman2',{player:'phaseAfter'}); - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(!target.hasSha()) return 1.2; - return 1; - } - } - } - }, - fuman2:{ - mod:{ - aiOrder:function(player,card,num){ - if(card==player.storage.fuman3&&player.storage.fuman2.isIn()) return num+get.sgn(get.attitude(player,player.storage.fuman2)); - }, - }, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return event.cards.contains(player.storage.fuman3)&&player.storage.fuman2.isIn(); - }, - mark:true, - intro:{ - content:'下个回合结束之前使用“抚蛮”牌时,令$一张牌' - }, - content:function(){ - 'step 0' - game.delayx(); - 'step 1' - player.line(player.storage.fuman2,'green'); - player.storage.fuman2.draw(); - }, - onremove:function(player){ - delete player.storage.fuman2; - delete player.storage.fuman3; - }, - }, - qizhou:{ - trigger:{player:['phaseBefore','equipEnd','loseEnd']}, - forced:true, - popup:false, - derivation:['mashu','reyingzi','duanbing','fenwei'], - filter:function(event,player){ - if(player.equiping) return false; - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i0; - } - }, - content:function(){ - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i0; - } - if(player.hasSha()&&geteff(target)){ - var num=game.countPlayer(function(current){ - return current!=player&&get.distance(player,current)<=1&&geteff(current); - }); - if(num==0){ - if(game.hasPlayer(function(current){ - return player.canUse('sha',current)&&geteff(current)&¤t!=target; - })){ - return 1; - } - } - else if(num==1){ - return 1; - } - } - return 0; - } - } - } - }, - fenxun2:{ - mark:'character', - onremove:true, - intro:{ - content:'到$的距离视为1' - }, - mod:{ - globalFrom:function(from,to){ - if(to==from.storage.fenxun2){ - return -Infinity; - } - } - } - }, - duanbing:{ - audio:2, - audioname:['heqi'], - trigger:{player:'useCard2'}, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse(event.card,current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('duanbing'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ - return !_status.event.sourcex.contains(target)&&get.distance(player,target)<=1&&player.canUse(_status.event.card,target); - }).set('sourcex',trigger.targets).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,_status.event.card,player,player); - }).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!_status.connectMode) game.delayx(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('duanbing',event.target); - trigger.targets.push(event.target); - }, - ai:{ - effect:{ - player:function(card,player,target,current,isLink){ - if(!isLink&&card.name=='sha'){ - if(player._duanbingtmp) return; - player._duanbingtmp=true; - if(get.effect(target,card,player,player)<=0){ - delete player._duanbingtmp; - return; - } - if(game.hasPlayer(function(current){ - return current!=target&&get.distance(player,current)<=1&& - player.canUse(card,current)&&get.effect(current,card,player,player)>0; - })){ - delete player._duanbingtmp; - return [1,1]; - } - delete player._duanbingtmp; - } - } - } - } - }, - fuhan:{ - audio:2, - trigger:{player:'phaseBegin'}, - unique:true, - limited:true, - skillAnimation:true, - animationColor:'orange', - forceunique:true, - //filter:function(event,player){ - // return player.storage.fanghun2>0; - //}, - prompt:function(event,player){ - var num=Math.max(2,player.storage.fanghun2||0); - num=Math.min(num,8); - return get.prompt('fuhan')+'(体力上限:'+num+')'; - }, - check:function(event,player){ - var num=Math.max(2,player.storage.fanghun2||0); - if(num==1) return false; - if(player.hp<=1) return true; - if(num==2) return false; - if(num==3) return player.hp<3&&player.isMinHp(); - return true; - }, - content:function(){ - 'step 0' - if(player.storage.fanghun) player.draw(player.storage.fanghun); - player.removeMark('fanghun',player.storage.fanghun); - event.num=Math.max(2,player.storage.fanghun2||0); - var list; - if(_status.characterlist){ - list=[]; - for(var i=0;i<_status.characterlist.length;i++){ - var name=_status.characterlist[i]; - if(lib.character[name][1]=='shu') list.push(name); - } - } - else if(_status.connectMode){ - list=get.charactersOL(function(i){ - return lib.character[i][1]!='shu'; - }); - } - else{ - list=get.gainableCharacters(function(info){ - return info[1]=='shu'; - }); - } - var players=game.players.concat(game.dead); - for(var i=0;i0) player.gainMaxHp(num); - else player.loseMaxHp(-num); - player.recover(); - } - }, - refuhan:{ - audio:'fuhan', - trigger:{player:'phaseBegin'}, - unique:true, - limited:true, - skillAnimation:true, - animationColor:'orange', - forceunique:true, - filter:function(event,player){ - return player.countMark('fanghun')>0; - }, - content:function(){ - 'step 0' - if(player.storage.fanghun) player.draw(player.storage.fanghun); - player.removeMark('fanghun',player.storage.fanghun); - var list; - if(_status.characterlist){ - list=[]; - for(var i=0;i<_status.characterlist.length;i++){ - var name=_status.characterlist[i]; - if(lib.character[name][1]=='shu') list.push(name); - } - } - else if(_status.connectMode){ - list=get.charactersOL(function(i){ - return lib.character[i][1]!='shu'; - }); - } - else{ - list=get.gainableCharacters(function(info){ - return info[1]=='shu'; - }); - } - var players=game.players.concat(game.dead); - for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ - var temp=get.order({name:name}); - if(temp>max){ - max=temp; - name2=map[name]; - } - } - } - if(name2==get.name(card,player)) return 1; - return 0; - } - return 1; - }, - filterCard:function(card,player,event){ - event=event||_status.event; - var filter=event._backup.filterCard; - var name=get.name(card,player); - if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true; - if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true; - if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true; - if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true; - return false; - }, - filter:function(event,player){ - if(!player.storage.fanghun||player.storage.fanghun<0) return false; - var filter=event.filterCard; - if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; - if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; - if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; - if(filter({name:'jiu'},player, event)&&player.countCards('h','tao')) return true; - return false; - }, - onrespond:function(){return this.onuse.apply(this,arguments)}, - onuse:function(result,player){ - player.removeMark('fanghun',1); - }, - ai:{ - respondSha:true, - respondShan:true, - save:true, - skillTagFilter:function(player,tag){ - if(!player.storage.fanghun||player.storage.fanghun<0) return false; - var name; - switch(tag){ - case 'respondSha':name='shan';break; - case 'respondShan':name='sha';break; - case 'save':name='jiu';break; - } - if(!player.countCards('h',name)) return false; - }, - order:function(item,player){ - if(player&&_status.event.type=='phase'){ - var max=0; - var list=['sha','tao','jiu']; - var map={sha:'shan',tao:'jiu',jiu:'tao'} - for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ - var temp=get.order({name:name}); - if(temp>max) max=temp; - } - } - if(max>0) max+=0.3; - return max; - } - return 4; - }, - }, - }, - } - }, - yjixi:{ - init:function(player){ - player.storage.yjixi=0; - }, - derivation:'wangzun', - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.yjixi>=3; - }, - skillAnimation:true, - animationColor:'gray', - unique:true, - juexingji:true, - content:function(){ - 'step 0' - player.awakenSkill('yjixi'); - player.gainMaxHp(); - player.recover(); - 'step 1' - var str='摸两张牌'; - var mode=get.mode(); - var choice='选项一'; - if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ - var list=[]; - var zhu=get.zhu(player); - if(zhu&&zhu!=player&&zhu.skills){ - for(var i=0;i=6) return 0; - return 20-num; - } - else{ - if(_status.event.player.needsToDiscard()){ - return 7-num; - } - } - return 0; - }, - discard:false, - lose:false, - delay:false, - content:function(){ - 'step 0' - target.gain(cards,player,'giveAuto'); - if(get.color(cards[0])=='black'){ - target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('goon',get.attitude(target,player)<0); - } - else{ - event.finish(); - } - 'step 1' - if(!result.bool){ - player.draw(2); - } - }, - ai:{ - order:8, - expose:0.2, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ - if(target.countCards('h')0) player.markSkill('shanjia'); - }, - audio:2, - intro:{ - content:function(storage){ - if(storage==0) return '未使用过装备牌'; - return '已使用过'+storage+'张装备牌'; - } - }, - group:'shanjia2', - trigger:{player:'phaseUseBegin'}, - frequent:true, - filter:function(event,player){ - lib.skill.shanjia.sync(player); - return player.storage.shanjia>0; - }, - content:function(){ - 'step 0' - lib.skill.shanjia.sync(player); - player.draw(Math.min(7,player.storage.shanjia)); - 'step 1' - player.chooseToDiscard('he',Math.min(7,player.storage.shanjia),true); - 'step 2' - var useCard=false; - if(result.bool&&result.cards){ - for(var i=0;i0) - })){ - return 6-get.value(card); - } - } - return 0; - }, - content:function(){ - player.loseHp(); - switch(get.type(cards[0],'trick')){ - case 'basic':player.addTempSkill('zhanyi_basic');break; - case 'equip':player.addTempSkill('zhanyi_equip');break; - case 'trick':player.addTempSkill('zhanyi_trick');player.draw(2);break; - } - }, - ai:{ - order:9.1, - result:{ - player:1 - } - } - }, - zhanyi_basic:{ - group:['zhanyi_basic_sha','zhanyi_basic_jiu','zhanyi_basic_tao'] - }, - zhanyi_basic_tao:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'tao'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当桃使用', - check:function(card){ - return 8-get.value(card); - }, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - save:true, - } - }, - zhanyi_basic_sha:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当杀使用', - check:function(card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - respondSha:true, - } - }, - zhanyi_basic_jiu:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'jiu'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当酒使用', - check:function(card){ - if(_status.event.type=='dying') return 1; - return 4-get.value(card); - }, - ai:{ - skillTagFilter:function(player){ - return player.countCards('h',{type:'basic'})>0&&player.hp<=0; - }, - save:true, - } - }, - zhanyi_equip:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.target.countCards('he')>0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - trigger.target.chooseToDiscard('he',true,2); - } - }, - zhanyi_trick:{ - mod:{ - targetInRange:function(){ - return true; - } - } - }, - shichou:{ - //audio:1, - skillAnimation:true, - animationColor:'orange', - unique:true, - limited:true, - mark:false, - trigger:{player:'phaseZhunbeiBegin'}, - zhuSkill:true, - direct:true, - filter:function(event,player){ - if(!player.hasZhuSkill('shichou'))return false; - if(player.countCards('he')<2) return false; - return !player.storage.shichou; - }, - init:function(player){ - if(player.hasZhuSkill('shichou')){ - player.markSkill('shichou'); - player.storage.shichou=false; - } - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - prompt:get.prompt2('shichou'), - selectCard:2, - filterTarget:function(card,player,target){ - return target.group=='shu'&&target!=player; - }, - filterCard:true, - position:'he', - ai1:function(card){ - return 7-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player; - if(player.hasUnknown()) return 0; - var att=get.attitude(player,target); - if(att<=0){ - if(target.hp==1) return (10-att)/2; - return 10-att; - } - else{ - if(target.hp==1) return 0; - return (10-att)/4; - } - }, - }); - "step 1" - if(!result.bool) return; - var target=result.targets[0]; - var cards=result.cards; - player.storage.shichou=true; - player.logSkill('shichou',target); - player.awakenSkill('shichou'); - target.gain(cards,player,'giveAuto'); - player.storage.shichou_target=target; - player.addSkill('shichou2'); - target.markSkillCharacter('shichou',player,'誓仇','代替'+get.translation(player)+'承受伤害直到首次进入濒死状态'); - }, - intro:{ - content:'limited' - }, - }, - shichou2:{ - group:'shichou3', - trigger:{player:'damageBegin3'}, - forced:true, - popup:false, - content:function(){ - trigger.player=player.storage.shichou_target; - trigger.shichou4=true; - trigger.player.addSkill('shichou4'); - player.logSkill('shichou2',player.storage.shichou_target); - game.delay(0.5); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(get.attitude(player,target)>0) return [0,0]; - var eff=get.damageEffect(target.storage.shichou_target,player,target); - if(eff>0){ - return [0,1]; - } - else if(eff<0){ - return [0,-2]; - } - else{ - return [0,0]; - } - } - } - } - } - }, - shichou3:{ - trigger:{global:['dying','dieBegin']}, - forced:true, - popup:false, - //priority:10, - filter:function(event,player){ - return event.player==player.storage.shichou_target; - }, - content:function(){ - trigger.player.unmarkSkill('shichou'); - delete player.storage.shichou_target; - player.removeSkill('shichou2'); - } - }, - shichou4:{ - trigger:{player:['damageAfter','damageCancelled']}, - forced:true, - popup:false, - audio:false, - content:function(){ - if(!trigger.shichou4) return; - if(event.triggername=='damageAfter'&&trigger.num){ - player.draw(trigger.num); - } - player.removeSkill('shichou4'); - } - }, - zhaolie:{ - trigger:{player:'phaseDrawBegin2'}, - direct:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('zhaolie'),function(card,player,target){ - return target!=player&&player.inRange(target); - }).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0) return 0; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - trigger.num--; - player.storage.zhaolie=result.targets[0]; - player.logSkill('zhaolie',result.targets); - player.addTempSkill('zhaolie2','phaseDrawAfter'); - } - } - }, - zhaolie2:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - content:function(){ - 'step 0' - event.cards=get.cards(3); - player.showCards(event.cards); - 'step 1' - event.basic=[]; - event.nonbasic=[]; - event.todis=[]; - for(var i=0;i1?0:7-get.value(card); - case 2:return 8-get.value(card); - case 3:return 10-get.value(card); - default:return 0; - } - }).set('num',num); - } - 'step 2' - var num=event.nonbasic.length; - var undone=false; - if(num==0){ - if(event.basic.length){ - result.targets[0].gain(event.basic,'gain2','log'); - } - } - else{ - if(result.bool){ - if(event.basic.length){ - player.gain(event.basic,'gain2','log'); - } - } - else{ - player.storage.zhaolie.damage(num); - if(event.basic.length){ - undone=true; - } - } - } - if(!undone){ - delete player.storage.zhaolie; - event.finish(); - } - 'step 3' - if(player.storage.zhaolie.isAlive()){ - player.storage.zhaolie.gain(event.basic,'gain2','log'); - } - else{ - game.cardsDiscard(event.basic); - } - delete player.storage.zhaolie; - } - }, - dingpan:{ - enable:'phaseUse', - filter:function(event,player){ - var num; - var mode=get.mode(); - if(mode=='identity'){ - if(_status.mode=='purple') num=player.getEnemies().length; - else num=get.population('fan'); - } - else if(mode=='versus'){ - num=player.getEnemies().length; - } - else{ - num=1; - } - if((player.getStat().skill.dingpan||0)>=num) return false; - return true; - }, - filterTarget:function(card,player,target){ - return target.countCards('e')>0; - }, - content:function(){ - 'step 0' - target.draw(); - 'step 1' - var goon=get.damageEffect(target,player,target)>=0; - if(!goon&&target.hp>=4&&get.attitude(player,target)<0){ - var es=target.getCards('e'); - for(var i=0;i=8){ - goon=true;break; - } - } - } - target.chooseControl(function(){ - if(_status.event.goon) return '选项二'; - return '选项一'; - }).set('goon',goon).set('prompt','定叛').set('choiceList',['令'+get.translation(player)+'弃置你装备区里的一张牌','获得你装备区内的所有牌并受到一点伤害']); - 'step 2' - if(result.control=='选项一'){ - player.discardPlayerCard(target,true,'e'); - event.finish(); - } - else{ - target.gain(target.getCards('e'),'gain2'); - } - 'step 3' - game.delay(0.5); - target.damage(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(get.damageEffect(target,player,target)>=0) return 2; - var att=get.attitude(player,target); - if(att==0) return 0; - var es=target.getCards('e'); - if(att>0&&(target.countCards('h')>2||target.needsToDiscard(1))) return 0; - if(es.length==1&&att>0) return 0; - for(var i=0;i0){ - return 1; - } - } - else if(val>=7){ - if(att<0){ - return -1; - } - } - } - return 0; - } - } - } - }, - hongde:{ - audio:2, - trigger:{player:['gainAfter','loseAfter']}, - direct:true, - filter:function(event,player){ - if(event.name=='lose'&&event.type=='gain'&&event.getParent().player==player) return false; - if(event.name=='gain') return event.cards&&event.cards.length>1; - return event.cards2&&event.cards2.length>1; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('hongde'),'令一名其他角色摸一张牌',function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return get.attitude(player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('hongde',result.targets); - result.targets[0].draw(); - } - } - }, - ziyuan:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:function(card){ - var num=0; - for(var i=0;i0); - })){ - return 10; - } - return 1; - }, - result:{ - player:function(player,target){ - if(get.attitude(player,target)<0) return -1; - var eff=get.recoverEffect(target,player,player); - if(eff<0) return 0; - if(eff>0){ - if(target.hp==1) return 3; - return 2; - } - if(player.needsToDiscard()) return 1; - return 0; - } - }, - threaten:1.3 - } - }, - jugu:{ - audio:2, - mod:{ - maxHandcard:function(player,num){ - return num+player.maxHp; - } - }, - trigger:{global:'gameDrawAfter',player:'enterGame'}, - forced:true, - content:function(){ - player.draw(player.maxHp); - } - }, - tuifeng:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - notemp:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - init:function(player){ - if(!player.storage.tuifeng) player.storage.tuifeng=[]; - }, - content:function(){ - 'step 0' - player.chooseCard(get.prompt2('tuifeng'),'he',[1,trigger.num]).set('ai',function(card){ - if(card.name=='du') return 20; - return 7-get.useful(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('tuifeng'); - player.lose(result.cards,ui.special,'toStorage'); - player.$give(result.cards,player,false); - for(var i=0;i0; - }, - content:function(){ - player.draw(2*player.storage.tuifeng.length); - player.addTempSkill('tuifeng3'); - player.storage.tuifeng3=player.storage.tuifeng.length; - player.unmarkSkill('tuifeng'); - } - }, - tuifeng3:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3; - } - }, - onremove:true - }, - weidi:{ - trigger:{global:['gameStart','zhuUpdate']}, - forced:true, - audio:2, - filter:function(event,player){ - var mode=get.mode(); - return (mode=='identity'||(mode=='versus'&&_status.mode=='four')); - }, - content:function(){ - var list=[]; - var zhu=get.zhu(player); - if(zhu&&zhu!=player&&zhu.skills){ - for(var i=0;i0; - }, - init:function(player){ - player.storage.jianshu=false; - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(ui.selected.targets.length){ - return ui.selected.targets[0]!=target&&!ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h') - &&!target.hasSkillTag('noCompareTarget'); - } - return true; - }, - filterCard:{color:'black'}, - mark:true, - discard:false, - lose:false, - delay:false, - check:function(card){ - if(_status.event.player.hp==1) return 8-get.value(card); - return 6-get.value(card); - }, - selectTarget:2, - multitarget:true, - content:function(){ - 'step 0' - player.awakenSkill('jianshu'); - player.storage.jianshu=true; - targets[0].gain(cards,player,'give'); - 'step 1' - targets[0].chooseToCompare(targets[1]); - 'step 2' - if(result.bool){ - targets[0].chooseToDiscard('he',2,true); - targets[1].loseHp(); - } - else if(result.tie){ - targets[0].loseHp() - targets[1].loseHp() - } - else{ - targets[1].chooseToDiscard('he',2,true); - targets[0].loseHp(); - } - }, - intro:{ - content:'limited' - }, - ai:{ - expose:0.4, - order:4, - result:{ - target:function(player,target){ - if(player.hasUnknown()) return 0; - if(ui.selected.targets.length) return -1; - return -0.5; - } - } - } - }, - yongdi:{ - audio:2, - unique:true, - limited:true, - trigger:{player:'phaseZhunbeiBegin'}, - animationColor:'thunder', - skillAnimation:'legend', - filter:function(event,player){ - return !player.storage.yongdi; - }, - init:function(player){ - player.storage.yongdi=false; - }, - mark:true, - intro:{ - content:'limited' - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('yongdi'),function(card,player,target){ - return (target.sex=='male'||target.name=='key_yuri')&&target!=player; - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<=1) return 0; - var mode=get.mode(); - if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ - if(target.name&&lib.character[target.name]){ - for(var i=0;i0; - }, - multitarget:true, - multiline:true, - content:function(){ - player.chooseToCompare(targets).callback=lib.skill.gushe.callback; - }, - intro:{ - name:'饶舌', - content:'mark' - }, - chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚颜无耻之人!'], - callback:function(){ - 'step 0' - if(event.num1<=event.num2){ - target.chat(lib.skill.gushe.chat[player.countMark('gushe')]); - game.delay(); - player.addMark('gushe',1); - if(player.countMark('gushe')>=7){ - player.die(); - } - } - 'step 1' - if(event.num1>=event.num2){ - target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ - if(_status.event.goon) return 6-get.value(card); - return 0; - }).set('goon',get.attitude(target,player)<0); - } - else event.goto(3); - 'step 2' - if(!result.bool){ - player.draw(); - } - 'step 3' - if(event.num1<=event.num2){ - player.chooseToDiscard('he','弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); - } - else event.finish(); - 'step 4' - if(!result.bool) player.draw(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - var num=ui.selected.targets.length+1; - if(num>3) num=3; - var hs=player.getCards('h'); - for(var i=0;i5&&player.countMark('gushe')+num<=6) return -1; - } - } - } - return 0; - }, - } - } - }, - jici:{ - audio:2, - trigger:{player:'compare'}, - filter:function(event,player){ - return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.countMark('gushe'); - }, - content:function(){ - if(trigger.num10; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - filterCard:{name:'sha'}, - content:function(){ - 'step 0' - target.chooseToDiscard('he',true); - 'step 1' - if(target.hp>=player.hp&&result.bool&&result.cards[0].name!='sha'){ - player.useCard({name:'juedou',isCard:true},target); - } - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(get.effect(target,{name:'juedou'},player,player)<=0){ - return 0; - } - if(target.hpplayer.hp) return -0.1; - return 0; - } - var hs1=target.getCards('h','sha'); - var hs2=player.getCards('h','sha'); - if(hs1.length>hs2.length){ - return 0; - } - var hsx=target.getCards('h'); - if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){ - return 0; - } - if(hsx.length>3&&hs2.length<=1){ - return 0; - } - if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ - return 0; - } - return -1; - } - } - } - }, - shefu:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - init:function(player){ - if(!player.storage.shefu) player.storage.shefu=[]; - if(!player.storage.shefu2) player.storage.shefu2=[]; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - player.storage.shefu2=[]; - }, - mark:function(dialog,content,player){ - if(content&&content.length){ - dialog.addAuto(content); - if(player.isUnderControl(true)){ - var str=''; - for(var i=0;i'+str+'') - } - } - }, - }, - content:function(){ - 'step 0' - var list1=[],list2=[],list3=[]; - for(var i=0;i=5) return false; - if(nh2>nh2&&event.source.isDead()) return false; - return true; - }, - direct:true, - content:function(){ - "step 0" - var num1=player.countCards('h'); - var num2=trigger.source.countCards('h'); - if(num1>num2){ - var next=player.chooseToDiscard([num2+1,num1],'贲育:是否弃置至少'+(num2+1)+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); - next.logSkill=['benyu',trigger.source]; - next.set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - if(ui.selected.cards.length>=_status.event.num){ - return -1; - } - if(get.damageEffect(trigger.source,player,player)>0&&_status.event.num<=2){ - return 8-get.value(card); - } - return -1; - }); - next.set('num',num2+1); - } - else{ - event.draw=true; - event.num=Math.min(num2,5)-num1; - player.chooseBool(get.prompt2('benyu')); - } - "step 1" - if(result.bool){ - if(event.draw){ - player.logSkill('benyu',trigger.source); - player.draw(event.num); - } - else{ - trigger.source.damage(player); - } - } - }, - }, - jili:{ - audio:2, - trigger:{ - global:'useCardToTarget' - }, - forced:true, - check:function(event,player){ - return get.effect(player,event.card,event.player,player)>0; - }, - filter:function(event,player){ - if(get.color(event.card)!='red') return false; - if(!event.targets) return false; - if(event.player==player) return false; - if(event.targets.contains(player)) return false; - if(get.info(event.card).multitarget) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - if(lib.filter.targetEnabled2(event.card,event.player,player)){ - for(var i=0;i0&&event.player!=player&&!player.hasSkill('zhidao2'); - }, - forced:true, - content:function(){ - var num=0; - if(trigger.player.countCards('h')) num++; - if(trigger.player.countCards('e')) num++; - if(trigger.player.countCards('j')) num++; - if(num){ - player.gainPlayerCard(trigger.player,num,'hej',true).set('filterButton',function(button){ - for(var i=0;i0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('qizhi'),'弃置一名角色的一张牌,然后其摸一张牌',function(card,player,target){ - return !_status.event.targets.contains(target)&&target.countCards('he')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(target==player) return 2; - if(get.attitude(player,target)<=0){ - return 1 - } - return 0.5; - }).set('targets',trigger.targets); - 'step 1' - if(result.bool){ - player.getHistory('custom').push({qizhi:true}); - if(!event.isMine()&&!_status.connectMode) game.delay(); - player.logSkill('qizhi',result.targets); - player.discardPlayerCard(result.targets[0],true,'he'); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - event.target.draw(); - }, - }, - jinqu:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - check:function(event,player){ - return player.getHistory('custom',function(evt){ - return evt.qizhi==true; - }).length>=player.countCards('h'); - }, - prompt:function(event,player){ - var num=player.getHistory('custom',function(evt){ - return evt.qizhi==true; - }).length; - return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(num)+'张?'; - }, - content:function(){ - 'step 0' - player.draw(2); - 'step 1' - var dh=player.countCards('h')-player.getHistory('custom',function(evt){ - return evt.qizhi==true; - }).length; - if(dh>0){ - player.chooseToDiscard(dh,true); - } - } - }, - mouduan:{ - audio:1, - init2:function(player){ - game.broadcastAll(function(player){ - player._mouduan_mark=player.mark('武',{ - content:'拥有技能【激昂】、【谦逊】' - }); - },player); - player.addAdditionalSkill('mouduan',['jiang','qianxun']); - }, - onremove:function(player){ - game.broadcastAll(function(player){ - if(player._mouduan_mark){ - player._mouduan_mark.delete(); - delete player._mouduan_mark; - } - },player); - player.removeAdditionalSkill('mouduan'); - }, - trigger:{player:'loseEnd'}, - forced:true, - filter:function(event,player){ - return player._mouduan_mark&&player._mouduan_mark.name=='武'&&player.countCards('h')<=2; - }, - content:function(){ - game.broadcastAll(function(player){ - if(!player._mouduan_mark) return; - player._mouduan_mark.name='文'; - player._mouduan_mark.skill='文'; - player._mouduan_mark.firstChild.innerHTML='文'; - player._mouduan_mark.info.content='拥有技能【英姿】、【克己】'; - },player); - player.addAdditionalSkill('mouduan',['yingzi','keji']); - }, - group:'mouduan2' - }, - mouduan2:{ - audio:1, - trigger:{global:'phaseZhunbeiBegin'}, - //priority:5, - filter:function(event,player){ - return player._mouduan_mark&&player._mouduan_mark.name=='文'&&player.countCards('h')>2; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard('he','谋断:是否弃置一张牌将标记变为“武”?').ai=function(){ - return -1; - } - 'step 1' - if(result.bool&&player.countCards('h')>2){ - game.broadcastAll(function(player){ - if(!player._mouduan_mark) return; - player._mouduan_mark.name='武'; - player._mouduan_mark.skill='武'; - player._mouduan_mark.firstChild.innerHTML='武'; - player._mouduan_mark.info.content='拥有技能【激昂】、【谦逊】'; - },player); - player.addAdditionalSkill('mouduan',['jiang','qianxun']); - } - } - }, - tanhu:{ - audio:1, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - target.addTempSkill('tanhu2'); - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; - } - } - if(!bool) return 0; - return -1; - } - }, - order:9, - }, - group:'tanhu3' - }, - tanhu2:{ - mark:true, - intro:{ - content:'已成为探虎目标' - } - }, - tanhu3:{ - mod:{ - globalFrom:function(from,to){ - if(to.hasSkill('tanhu2')) return -Infinity; - }, - wuxieRespondable:function(card,player,target){ - if(target&&target.hasSkill('tanhu2')) return false; - } - } - }, - jiaozi:{ - audio:2, - trigger:{player:'damageBegin3',source:'damageBegin1'}, - forced:true, - filter:function(event,player){ - return player.isMaxHandcard(true); - }, - content:function(){ - trigger.num++; - }, - ai:{presha:true}, - }, - jiqiao:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - 'step 0' - player.chooseToDiscard(get.prompt2('jiqiao'),[1,player.countCards('he',{type:'equip'})],'he',function(card){ - return get.type(card)=='equip'; - }).set('ai',function(card){ - if(card.name=='bagua') return 10; - return 7-get.value(card); - }).logSkill='jiqiao'; - 'step 1' - if(result.bool){ - event.cards=get.cards(2*result.cards.length); - player.showCards(event.cards); - } - else{ - event.finish(); - } - 'step 2' - var gained=[]; - var tothrow=[]; - for(var i=0;i=2&&he<=3){ - return '弃牌'; - } - if(player.maxHp-player.hp>=3&&he<=5){ - return '弃牌'; - } - if(player.maxHp-player.hp>3){ - return '弃牌'; - } - return '出杀'; - } - return '出杀'; - }).set('prompt','弃置'+get.translation(trigger.player)+get.cnNumber(player.maxHp-player.hp)+'张牌,或对任意一名角色使用一张杀'); - 'step 1' - if(result.control=='弃牌'){ - player.line(trigger.player,'green'); - if(player.hp1) return false; - if(!event.target) return false; - if(event.target.hp>=player.hp) return false; - - var card=event.card; - if(card.name=='sha') return true; - if(get.color(card)=='black'&&get.type(card,'trick')=='trick') return true; - return false; - }, - content:function(){ - "step 0" - var save=false; - if(get.attitude(player,trigger.target)>2){ - if(trigger.card.name=='sha'){ - if(player.countCards('h','shan')||player.getEquip(2)|| - trigger.target.hp==1||player.hp>trigger.target.hp+1){ - if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')0; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target).set('preserve','win'); - 'step 1' - if(result.bool&&result.target){ - event.type=true; - event.card=result.target; - player.chooseTarget('将'+get.translation(result.target)+'交给一名角色',function(card,player,target){ - return target.hp<=player.hp; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du) return -att; - return att; - }).set('du',event.card.name=='du'); - target.addTempSkill('dahe2'); - } - else{ - event.type=false; - if(player.countCards('h')){ - player.showHandcards(); - player.chooseToDiscard('h',true); - } - } - 'step 2' - if(event.type){ - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'gain2'); - } - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; - } - } - if(!bool) return 0; - if(player.canUse('sha',target)&&(player.countCards('h','sha'))){ - return -2; - } - return -0.5; - } - }, - order:9, - } - }, - dahe2:{ - mark:true, - intro:{ - content:'非红桃闪无效' - }, - mod:{ - cardRespondable:function(card,player){ - if(card.name=='shan'&&get.suit(card)!='heart') return false; - }, - cardEnabled:function(card,player){ - if(card.name=='shan'&&get.suit(card)!='heart') return false; - }, - } - }, - xunzhi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - init:function(player){ - player.storage.xunzhi=0; - }, - filter:function(event,player){ - var previous=player.getPrevious(); - var next=player.getNext(); - if(previous&&next){ - return player.hp!=previous.hp&&player.hp!=next.hp; - } - return false; - }, - check:function(event,player){ - return player.hp>=3&&player.countCards('h')>player.hp+1+player.storage.xunzhi; - }, - content:function(){ - player.loseHp(); - player.storage.xunzhi+=2; - }, - mark:true, - intro:{ - content:function(storage,player){ - return '手牌上限+'+player.storage.xunzhi; - } - }, - mod:{ - maxHandcard:function(player,num){ - if(typeof player.storage.xunzhi=='number'){ - return num+player.storage.xunzhi; - } - } - } - }, - yawang:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - forced:true, - filter:function(event,player){ - return !event.numFixed; - }, - check:function(event,player){ - var num=game.countPlayer(function(target){ - return target.hp==player.hp; - }); - if(!player.hasSkill('xunzhi2')){ - var nh=player.countCards('h'); - if(nh>5) return false; - if(num==3&&nh>3) return false; - } - return num>=3; - }, - content:function(){ - trigger.changeToZero(); - var num=game.countPlayer(function(target){ - return target.hp==player.hp; - }); - if(num){ - player.draw(num); - } - player.storage.yawang=num; - player.addTempSkill('yawang2'); - } - }, - yawang2:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.currentPhase!=player) return; - if(player.countUsed()>=player.storage.yawang) return false; - } - } - }, - junwei:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.yinling&&player.storage.yinling.length>=3; - }, - content:function(){ - 'step 0' - if(player.storage.yinling.length>3){ - player.chooseButton(3,[get.prompt('junwei'),'hidden',player.storage.yinling]).set('ai',function(button){ - return 1; - }); - } - else{ - player.chooseBool().set('createDialog',[get.prompt('junwei'),'hidden',player.storage.yinling]).set('dialogselectx',true).set('choice',true); - event.cards=player.storage.yinling.slice(0); - } - 'step 1' - if(result.bool){ - player.logSkill('junwei'); - var cards=event.cards||result.links; - for(var i=0;i1) return 1; - if(_status.event.player.hp>=3) return 0; - return 1; - }).set('nshan',nshan); - } - } - else{ - event.finish(); - } - 'step 3' - if(!event.directfalse&&result.bool) game.delay(); - ui.clear(); - 'step 4' - if(!event.directfalse&&result.bool){ - event.cards=result.cards; - event.target.$throw(result.cards); - player.chooseTarget('将'+get.translation(event.cards)+'交给一名角色',true,function(card,player,target){ - return target!=_status.event.getParent().target; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target)/(target.countCards('h','shan')+1); - }); - } - else{ - event.target.loseHp(); - delete event.cards; - } - 'step 5' - if(event.cards){ - player.line(result.targets,'green'); - result.targets[0].gain(event.cards,'gain2'); - game.log(player,'将',event.cards,'交给',result.targets[0]); - event.finish(); - } - else{ - if(event.target.countCards('e')){ - player.choosePlayerCard('e','将'+get.translation(event.target)+'的一张装备牌移出游戏',true,event.target); - } - else{ - event.finish(); - } - } - 'step 6' - if(result.bool){ - var card=result.links[0]; - if(event.target.storage.junwei2){ - event.target.storage.junwei2.push(card); - event.target.markSkill('junwei2'); - } - else{ - event.target.storage.junwei2=[card]; - } - event.target.lose(card,ui.special,'toStorage'); - event.target.addSkill('junwei2'); - event.target.syncStorage('junwei2'); - } - } - }, - junwei2:{ - mark:true, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - content:function(){ - 'step 0' - if(player.storage.junwei2.length){ - var card=player.storage.junwei2.shift(); - player.equip(card); - event.redo(); - } - 'step 1' - player.removeSkill('junwei2'); - delete player.storage.junwei2; - } - }, - yinling:{ - enable:'phaseUse', - filterCard:{color:'black'}, - position:'he', - intro:{ - content:'cards', - onunmark:'throw' - }, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0&&player.storage.yinling.length<4; - }, - filterTarget:function(card,player,target){ - return target.countCards('he')>0&&target!=player; - }, - init:function(player){ - player.storage.yinling=[]; - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - 'step 0' - player.choosePlayerCard('hej',target,true); - 'step 1' - if(result.bool&&result.links&&result.links.length){ - target.$give(result.links,player,false); - target.lose(result.links,ui.special,'toStorage'); - player.storage.yinling.push(result.links[0]); - player.markSkill('yinling'); - player.syncStorage('yinling'); - } - }, - ai:{ - order:10.1, - expose:0.1, - result:{ - target:function(player,target){ - if(target.hasSkill('tuntian')) return 0; - var es=target.getCards('e'); - var nh=target.countCards('h'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ - return -1.5; - } - return 2; - } - return -1.5; - }, - }, - } - }, - yanxiao:{ - audio:2, - enable:'phaseUse', - filterCard:{suit:'diamond'}, - filterTarget:true, - check:function(card){ - return 7-get.value(card); - }, - position:'he', - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - discard:false, - //lose:false, - visible:true, - toStorage:true, - prepare:'give', - content:function(){ - //player.lose(cards,ui.special,'toStorage','visible'); - if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ - target.storage.yanxiao2.push(cards[0]); - target.syncStorage('yanxiao2'); - target.markSkill('yanxiao2'); - } - else{ - target.storage.yanxiao2=cards.slice(0); - target.syncStorage('yanxiao2'); - target.addSkill('yanxiao2'); - } - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.storage.yanxiao2&&target.storage.yanxiao2.length) return 0; - if(target.countCards('j')) return 1; - return 0; - } - } - } - }, - yanxiao2:{ - audio:'yanxiao', - mark:true, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - trigger:{player:'phaseJudgeBegin'}, - forced:true, - content:function(){ - var cards=player.storage.yanxiao2.concat(player.getCards('j')); - player.gain(cards,'gain2','log','fromStorage'); - delete player.storage.yanxiao2; - player.removeSkill('yanxiao2'); - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)=='delay') return [0,0.1]; - } - } - } - }, - anxian:{ - audio:2, - group:['anxian_source','anxian_target'], - subSkill:{ - source:{ - audio:"anxian", - trigger:{source:'damageBegin2'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'; - }, - check:function(event,player){ - if(get.damageEffect(event.player,player,player)<=0) return true; - return false; - }, - content:function(){ - 'step 0' - if(trigger.player.countCards('h')){ - trigger.player.chooseToDiscard(true); - } - 'step 1' - player.draw(); - trigger.cancel(); - } - }, - target:{ - audio:"anxian", - trigger:{target:'useCardToTargeted'}, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&player.countCards('h'); - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt2('anxian')); - next.set('ai',function(card){ - var player=_status.event.player; - var trigger=_status.event.getTrigger(); - if(get.attitude(player,trigger.player)>0){ - return 9-get.value(card); - } - if(player.countCards('h',{name:'shan'})) return -1; - return 7-get.value(card); - }); - next.logSkill='anxian'; - "step 1" - if(result.bool){ - trigger.player.draw(); - trigger.getParent().excluded.push(player); - } - }, - } - } - }, - luoyan_tianxiang:{ - inherit:'tianxiang', - filter:function(event,player){ - if(!player.storage.xingwu||!player.storage.xingwu.length) return false; - if(player.hasSkill('tianxiang')) return false; - return lib.skill.tianxiang.filter(event,player); - }, - }, - luoyan_liuli:{ - inherit:'liuli', - filter:function(event,player){ - if(!player.storage.xingwu||!player.storage.xingwu.length) return false; - if(player.hasSkill('liuli')) return false; - return lib.skill.liuli.filter(event,player); - }, - }, - luoyan:{ - group:['luoyan_tianxiang','luoyan_liuli'], - }, - xingwu:{ - audio:2, - group:['xingwu_color','xingwu_color2'], - subSkill:{ - color:{ - trigger:{player:'phaseZhunbeiBegin'}, - silent:true, - content:function(){ - player.storage.xingwu_color=['black','red']; - } - }, - color2:{ - trigger:{player:'useCard'}, - silent:true, - filter:function(event,player){ - return Array.isArray(player.storage.xingwu_color)&&_status.currentPhase==player; - }, - content:function(){ - player.storage.xingwu_color.remove(get.color(trigger.card)); - } - } - }, - trigger:{player:'phaseDiscardBegin'}, - direct:true, - filter:function(event,player){ - if(!player.storage.xingwu_color) return false; - var length=player.storage.xingwu_color.length; - if(length==0) return false; - var hs=player.getCards('h'); - if(hs.length==0) return false; - if(length==2) return true; - var color=player.storage.xingwu_color[0]; - for(var i=0;i0&& - get.attitude(player,current)<0) - })) return 0; - } - return 7-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('xingwu'); - if(player.storage.xingwu.length<2){ - player.$give(result.cards,player); - } - player.lose(result.cards,ui.special); - player.storage.xingwu=player.storage.xingwu.concat(result.cards); - player.markSkill('xingwu'); - player.syncStorage('xingwu'); - } - else{ - event.finish(); - } - 'step 2' - if(player.storage.xingwu.length==3){ - player.$throw(player.storage.xingwu); - while(player.storage.xingwu.length){ - player.storage.xingwu.shift().discard(); - } - player.unmarkSkill('xingwu'); - player.chooseTarget(function(card,player,target){ - return target!=player&&target.sex=='male'; - },'对一名男性角色造成两点伤害并弃置其装备区内的牌').set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0) return -1; - return get.damageEffect(target,player,player)+target.countCards('e')/2; - }); - } - else{ - event.finish(); - } - 'step 3' - if(result.bool){ - var target=result.targets[0]; - target.damage(2); - event.target=target; - player.line(target,'green'); - } - else{ - event.finish(); - } - 'step 4' - if(event.target&&event.target.isAlive()){ - var es=event.target.getCards('e'); - if(es.length){ - event.target.discard(es); - } - } - }, - ai:{ - threaten:1.5 - } - }, - yinbing:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - init:function(player){ - if(!player.storage.yinbing) player.storage.yinbing=[]; - }, - filter:function(event,player){ - return player.countCards('he',{type:'basic'})0&& - (event.card.name=='sha'||event.card.name=='juedou'); - }, - content:function(){ - 'step 0' - player.chooseCardButton('移去一张引兵牌',true,player.storage.yinbing); - 'step 1' - var card=result.links[0]; - player.storage.yinbing.remove(card); - game.cardsDiscard(card); - player.$throw(card); - game.log(player,'将',card,'置入弃牌堆'); - player.syncStorage('yinbing'); - if(player.storage.yinbing.length==0){ - player.unmarkSkill('yinbing'); - } - } - } - }, - group:'yinbing_discard' - }, - juedi:{ - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - return player.storage.yinbing&&player.storage.yinbing.length>0; - }, - forced:true, - audio:2, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('juedi'),true,function(card,player,target){ - return player.hp>=target.hp; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<2) return att-10; - var num=att/10; - if(target==player){ - num+=player.maxHp-player.countCards('h')+0.5; - } - else{ - num+=_status.event.n2*2; - if(target.isDamaged()){ - if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=2; - } - else{ - num+=0.5; - } - } - } - if(target.hasJudge('lebu')){ - num/=2; - } - return num; - }).set('n2',player.storage.yinbing.length); - 'step 1' - if(result.bool){ - player.line(result.targets[0],'green'); - if(result.targets[0]==player){ - player.$throw(player.storage.yinbing,1000); - var num=player.maxHp-player.countCards('h'); - if(num>0) player.draw(num); - game.cardsDiscard(player.storage.yinbing); - player.storage.yinbing=[]; - player.syncStorage('yinbing'); - player.unmarkSkill('yinbing'); - } - else{ - var target=result.targets[0]; - target.recover(); - target.gain(player.storage.yinbing.slice(0),'gain2','log','fromStorage'); - target.draw(player.storage.yinbing.length); - player.storage.yinbing.length=0; - } - player.syncStorage('yinbing'); - player.unmarkSkill('yinbing'); - } - } - }, - meibu:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return event.player!=player&&get.distance(event.player,player,'attack')>1; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - var e2=player.getEquip(2); - if(e2){ - if(e2.name=='tengjia') return true; - if(e2.name=='bagua') return true; - } - return player.countCards('h','shan')>0; - }, - content:function(){ - var target=trigger.player; - target.addTempSkill('meibu_viewas'); - target.addTempSkill('meibu_range'); - target.storage.meibu=player; - target.markSkillCharacter('meibu',player,'魅步','锦囊牌均视为杀且'+get.translation(player)+'视为在攻击范围内'); - }, - ai:{ - expose:0.2 - }, - subSkill:{ - range:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&target==player.storage.meibu){ - return true; - } - } - }, - onremove:function(player){ - game.broadcast(function(player){ - if(player.marks.meibu){ - player.marks.meibu.delete(); - delete player.marks.meibu; - } - },player); - if(player.marks.meibu){ - player.marks.meibu.delete(); - delete player.marks.meibu; - game.addVideo('unmark',player,'meibu'); - } - }, - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='meibu_viewas' - }, - content:function(){ - player.removeSkill('meibu_viewas'); - game.broadcastAll(function(player){ - if(player.marks.meibu&&player.marks.meibu.info){ - player.marks.meibu.info.content=player.marks.meibu.info.content.slice(8); - } - },player); - } - }, - viewas:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardUsable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardRespondable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardSavable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - }, - enable:['chooseToUse','chooseToRespond'], - filterCard:function(card){ - return get.type(card,'trick')=='trick'; - }, - viewAs:{name:'sha'}, - check:function(){return 1}, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.8 - } - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - } - } - }, - mumu:{ - enable:'phaseUse', - usable:1, - filterCard:function(card,player,target){ - return card.name=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'); - }, - check:function(card){ - return 7-get.value(card); - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - return target.getEquip(1)||target.getEquip(2); - }, - content:function(){ - 'step 0' - var e1=target.getEquip(1); - var e2=target.getEquip(2); - event.e1=e1; - event.e2=e2; - if(e1&&e2){ - player.chooseControl('武器牌','防具牌').set('ai',function(){ - if(_status.event.player.getEquip(2)){ - return '武器牌'; - } - return '防具牌'; - }); - } - else if(e1){ - event.choice='武器牌'; - } - else{ - event.choice='防具牌'; - } - 'step 1' - var choice=event.choice||result.control; - if(choice=='武器牌'){ - if(event.e1){ - target.discard(event.e1); - } - player.draw(); - } - else{ - if(event.e2){ - player.equip(event.e2); - target.$give(event.e2,player); - } - } - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.getEquip(2)&&!player.getEquip(2)){ - return -2; - } - return -1; - } - } - } - }, - fentian:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - if(player.countCards('h')>=player.hp) return false; - return game.hasPlayer(function(current){ - return player!=current&&player.inRange(current)&¤t.countCards('he'); - }); - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage.fentian=[]; - }, - content:function(){ - 'step 0' - player.chooseTarget('焚天:选择一名攻击范围内的角色,将其一张牌置于你的武将牌上',true,function(card,player,target){ - return player!=target&&player.inRange(target)&&target.countCards('he')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target) - }); - 'step 1' - if(result.bool){ - player.logSkill('fentian',result.targets); - event.target=result.targets[0]; - player.choosePlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - event.target.$give(result.links,player,false); - event.target.lose(result.links,ui.special,'toStorage'); - player.storage.fentian=player.storage.fentian.concat(result.links); - player.syncStorage('fentian'); - player.markSkill('fentian'); - } - 'step 3' - game.delayx(); - }, - mod:{ - attackFrom:function(from,to,distance){ - return distance-from.storage.fentian.length; - } - } - }, - zhiri:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - unique:true, - juexingji:true, - audio:2, - skillAnimation:true, - animationColor:'fire', - derivation:'xintan', - filter:function(event,player){ - return player.storage.fentian&&player.storage.fentian.length>=3&&!player.storage.zhiri; - }, - content:function(){ - player.loseMaxHp(); - player.addSkill('xintan'); - player.storage.zhiri=true; - player.awakenSkill('zhiri'); - } - }, - xintan:{ - enable:'phaseUse', - usable:1, - audio:2, - unique:true, - filter:function(event,player){ - return player.storage.fentian&&player.storage.fentian.length>=2; - }, - filterTarget:true, - prompt:'移去两张“焚”并令一名角色失去一点体力', - content:function(){ - 'step 0' - player.chooseCardButton(2,'移去两张“焚”并令'+get.translation(target)+'失去一点体力',player.storage.fentian,true); - 'step 1' - if(result.bool){ - player.$throw(result.links); - for(var i=0;iplayer.hp; - }, - content:function(){ - player.storage.danji=true; - player.loseMaxHp(); - player.addSkill('mashu'); - player.addSkill('nuzhan'); - player.awakenSkill('danji'); - } - }, - nuzhan:{ - audio:2, - popup:false, - silent:true, - firstDo:true, - trigger:{player:'useCard1'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.addCount!==false&&event.cards&& - event.cards.length==1&&get.type(event.cards[0],'trick')=='trick'; - }, - forced:true, - content:function(){ - trigger.addCount=false; - if(player.stat[player.stat.length-1].card.sha>0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - group:'nuzhan2' - }, - nuzhan2:{ - audio:'nuzhan', - trigger:{player:'useCard1'}, - forced:true, - popup:false, - silent:true, - firstDo:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.cards&& - event.cards.length==1&&get.type(event.cards[0])=='equip'; - }, - content:function(){ - trigger.baseDamage++; - } - }, - jieyuan:{ - group:['jieyuan_more','jieyuan_less'], - subSkill:{ - more:{ - audio:true, - trigger:{source:'damageBegin1'}, - direct:true, - filter:function(event,player){ - if(!player.hasSkill('fenxin_nei')){ - if(!player.countCards('h',{color:'black'})) return false; - } - return (event.player.hp>=player.hp||player.hasSkill('fenxin_fan'))&&player!=event.player; - }, - content:function(){ - 'step 0' - var goon=(get.attitude(player,trigger.player)<0); - var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player)); - if(!player.hasSkill('fenxin_nei')){ - next.set('filterCard',function(card){ - return get.color(card)=='black'; - }); - next.set('prompt2','弃置一张黑色手牌令伤害+1'); - } - else{ - next.set('prompt2','弃置一张手牌令伤害+1'); - } - next.set('ai',function(card){ - if(_status.event.goon){ - return 8-get.value(card); - } - return 0; - }); - next.set('goon',goon); - next.logSkill=['jieyuan_more',trigger.player]; - 'step 1' - if(result.bool){ - trigger.num++; - } - } - }, - less:{ - audio:true, - trigger:{player:'damageBegin2'}, - filter:function(event,player){ - if(!player.hasSkill('fenxin_nei')){ - if(!player.countCards('h',{color:'red'})) return false; - } - return event.source&&(event.source.hp>=player.hp||player.hasSkill('fenxin_zhong'))&&player!=event.source; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('jieyuan')); - if(!player.hasSkill('fenxin_nei')){ - next.set('filterCard',function(card){ - return get.color(card)=='red'; - }); - next.set('prompt2','弃置一张红色手牌令伤害-1'); - } - else{ - next.set('prompt2','弃置一张手牌令伤害-1'); - } - next.set('ai',function(card){ - var player=_status.event.player; - if(player.hp==1||_status.event.getTrigger().num>1){ - return 9-get.value(card); - } - if(player.hp==2){ - return 8-get.value(card); - } - return 7-get.value(card); - }); - next.logSkill='jieyuan_less'; - "step 1" - if(result.bool){ - trigger.num--; - } - } - } - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - fenxin:{ - mode:['identity'], - available:function(mode){ - if(mode=='identity'&&_status.mode=='purple') return false; - }, - trigger:{global:'dieAfter'}, - filter:function(event,player){ - return ['fan','zhong','nei'].contains(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity); - }, - forced:true, - content:function(){ - player.addSkill('fenxin_'+trigger.player.identity); - player.markSkill('fenxin'); - }, - intro:{ - mark:function(dialog,content,player){ - if(player.hasSkill('fenxin_zhong')){ - dialog.addText('你发动“竭缘”减少伤害无体力值限制'); - } - if(player.hasSkill('fenxin_fan')){ - dialog.addText('你发动“竭缘”增加伤害无体力值限制'); - } - if(player.hasSkill('fenxin_nei')){ - dialog.addText('将“竭缘”中的黑色手牌和红色手牌改为一张牌'); - } - } - }, - subSkill:{ - fan:{}, - zhong:{}, - nei:{} - }, - ai:{ - combo:'jieyuan' - } - }, - fenxin_old:{ - mode:['identity'], - trigger:{source:'dieBegin'}, - init:function(player){ - player.storage.fenxin=false; - }, - intro:{ - content:'limited' - }, - skillAnimation:'epic', - animationColor:'fire', - unique:true, - limited:true, - audio:2, - mark:true, - filter:function(event,player){ - if(player.storage.fenxin) return false; - return event.player.identity!='zhu'&&player.identity!='zhu'&& - player.identity!='mingzhong'&&event.player.identity!='mingzhong'; - }, - check:function(event,player){ - if(player.identity==event.player.identity) return Math.random()<0.5; - var stat=get.situation(); - switch(player.identity){ - case 'fan': - if(stat<0) return false; - if(stat==0) return Math.random()<0.6; - return true; - case 'zhong': - if(stat>0) return false; - if(stat==0) return Math.random()<0.6; - return true; - case 'nei': - if(event.player.identity=='fan'&&stat<0) return true; - if(event.player.identity=='zhong'&&stat>0) return true; - if(stat==0) return Math.random()<0.7; - return false; - } - }, - prompt:function(event,player){ - return '焚心:是否与'+get.translation(event.player)+'交换身份?'; - }, - content:function(){ - game.broadcastAll(function(player,target,shown){ - var identity=player.identity; - player.identity=target.identity; - if(shown||player==game.me){ - player.setIdentity(); - } - target.identity=identity; - },player,trigger.player,trigger.player.identityShown); - player.line(trigger.player,'green'); - player.storage.fenxin=true; - player.awakenSkill('fenxin_old'); - } - }, - xisheng:{ - enable:'chooseToUse', - usable:1, - viewAs:{name:'tao'}, - viewAsFilter:function(player){ - return player!=_status.currentPhase&&player.countCards('he')>1; - }, - selectCard:2, - filterCard:true, - position:'he', - ai:{ - save:true, - skillTagFilter:function(){ - return lib.skill.xisheng.viewAsFilter.apply(this,arguments) - }, - }, - }, - shulv:{ - inherit:'zhiheng', - prompt:'弃置一张牌并摸一张牌', - selectCard:1, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - }, - xiandeng:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - }, - targetInRange:function(card,player){ - if(card.name=='sha'&&player.countUsed('sha',true)==0) return true; - }, - }, - }, - qingyi:{ - audio:2, - trigger:{player:'phaseJudgeBefore'}, - direct:true, - content:function(){ - "step 0" - var check= player.countCards('h')>2; - player.chooseTarget(get.prompt("qingyi"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target,false); - }).set('check',check).set('ai',function(target){ - if(!_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }); - "step 1" - if(result.bool){ - player.logSkill('qingyi',result.targets); - player.useCard({name:'sha',isCard:true},result.targets[0],false); - trigger.cancel(); - player.skip('phaseDraw'); - } - }, - }, - qingyi1:{ - audio:true, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - content:function(){ - "step 0" - player.addSkill('qingyi3'); - var check= player.countCards('h')>2; - player.chooseTarget(get.prompt2('qingyi'),function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target); - }).ai=function(target){ - if(!check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - } - "step 1" - if(result.bool){ - player.logSkill('qingyi1',result.targets); - player.useCard({name:'sha',isCard:true},result.targets[0],false); - player.skip('phaseJudge'); - player.skip('phaseDraw'); - } - player.removeSkill('qingyi3'); - } - }, - qingyi2:{ - audio:true, - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - "step 0" - player.addSkill('qingyi3'); - var check=player.countCards('h')<=player.hp; - player.chooseCardTarget({ - prompt:get.prompt2('qingyi'), - filterCard:function(card,player){ - return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player); - }, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target); - }, - ai1:function(card){ - if(!_status.event.check) return 0; - return 6-get.value(card); - }, - ai2:function(target){ - if(!_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }, - check:check - }); - "step 1" - if(result.bool){ - player.logSkill('qingyi2',result.targets); - player.discard(result.cards[0]); - player.useCard({name:'sha',isCard:true},result.targets[0]); - trigger.cancel(); - } - player.removeSkill('qingyi3'); - } - }, - qingyi3:{ - mod:{ - targetInRange:function(card,player,target,now){ - return true; - } - }, - }, - qirang:{ - audio:2, - trigger:{player:'equipEnd'}, - frequent:true, - content:function(){ - player.gain(get.cardPile(function(card){ - return get.type(card,'trick')=='trick'; - }),'gain2'); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; - } - }, - threaten:1.3 - } - }, - yuhua:{ - trigger:{player:'phaseDiscardBegin'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.parent.name=='phaseDiscard'&&player.countCards('h',{type:'basic'})0){ - var att1=get.attitude(target,player); - var att2=get.attitude(target,trigger.player); - var att3=get.attitude(player,target); - if(att3<0) return 0; - return att1/2+att2+att3; - } - else{ - return 0; - // return get.attitude(player,target); - } - }); - 'step 1' - if(result.bool){ - player.addTempSkill('chenqing2','roundStart'); - event.target=result.targets[0]; - event.target.draw(4); - player.logSkill('chenqing',event.target); - } - else{ - event.finish(); - } - 'step 2' - var target=event.target; - var tosave=trigger.player; - var att=get.attitude(target,tosave); - var hastao=target.countCards('h','tao'); - target.chooseToDiscard(4,true,'he').set('ai',function(card){ - var hastao=_status.event.hastao; - var att=_status.event.att; - if(!hastao&&att>0){ - var suit=get.suit(card); - for(var i=0;i0&&player.countCards('h')>0; - }, - content:function(){ - "step 0" - event.count=2; - event.history=player.getHistory('useCard',function(evt){ - return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card)); - }) - "step 1" - event._result={}; - if(event.count&&event.history.length&&player.countCards('h')){ - event.count--; - var card=event.history.shift().card; - card={name:card.name,nature:card.nature}; - if(card.name!='jiu'&&lib.filter.cardEnabled(card)){ - if(game.hasPlayer(function(current){ - return player.canUse(card,current); - })){ - lib.skill.mozhix.viewAs=card; - var next=player.chooseToUse(); - if(next.isOnline()){ - player.send(function(card){ - lib.skill.mozhix.viewAs=card; - },card) - } - next.logSkill='mozhi'; - next.set('openskilldialog','默识:将一张手牌当'+get.translation(card)+'使用'); - next.set('norestore',true); - next.set('_backupevent','mozhix'); - next.backup('mozhix'); - } - } - } - "step 2" - if(result&&result.bool) event.goto(1); - }, - }, - mozhix:{ - filterCard:function(card){ - return get.itemtype(card)=='card'; - }, - selectCard:1, - popname:true, - }, - chenqing2:{}, - ranshang:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.nature=='fire'; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - player.addMark('ranshang',trigger.num); - }, - intro:{ - name2:'燃', - content:'mark' - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'){ - if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; - } - if(get.tag(card,'fireDamage')&¤t<0) return 2; - } - } - }, - group:'ranshang2' - }, - ranshang2:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return player.countMark('ranshang')>0; - }, - content:function(){ - player.loseHp(player.countMark('ranshang')); - } - }, - hanyong:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return game.roundNumber>player.hp&&event.card&& - (event.card.name=='nanman'||event.card.name=='wanjian'); - }, - content:function(){ - trigger.baseDamage++; - }, - }, - hanyong3:{ - audio:false, - trigger:{source:'damageBegin1'}, - forced:true, - onremove:true, - filter:function(event,player){ - return event.card==player.storage.hanyong3; - }, - content:function(){ - trigger.num++; - } - }, - yishe:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - init:function(player){ - if(!player.storage.yishe) player.storage.yishe=[]; - }, - filter:function(event,player){ - return !player.storage.yishe||!player.storage.yishe.length; - }, - intro:{ - content:'cards' - }, - content:function(){ - 'step 0' - player.draw(2); - player.chooseCard(2,'he',true,'选择两张牌作为“米”'); - 'step 1' - player.storage.yishe=result.cards; - player.lose(result.cards,ui.special,'toStorage'); - player.syncStorage('yishe'); - player.markSkill('yishe'); - } - }, - bushi:{ - audio:2, - trigger:{player:'damageEnd',source:'damageEnd'}, - filter:function(event,player){ - if(event._notrigger.contains(event.player)) return false; - return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); - }, - direct:true, - content:function(){ - 'step 0' - event.count=trigger.num; - 'step 1' - trigger.player.chooseCardButton('选择获得一张“米”',player.storage.yishe); - 'step 2' - if(result.bool){ - event.count--; - player.logSkill('bushi'); - trigger.player.gain(result.links[0],'draw2','log','fromStorage'); - player.storage.yishe.remove(result.links[0]); - player.syncStorage('yishe'); - if(player.storage.yishe.length==0){ - player.recover(); - player.unmarkSkill('yishe'); - } - else{ - player.markSkill('yishe'); - if(event.count>0) event.goto(1); - } - } - } - }, - midao:{ - audio:2, - //unique:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); - }, - content:function(){ - "step 0" - var list=player.storage.yishe; - player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ - ','+get.prompt('midao'),list,'hidden'],function(button){ - var card=button.link; - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - return result*attitude; - }).set('judging',trigger.player.judging[0]).set('filterButton',function(button){ - var player=_status.event.player; - var card=button.link; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }); - "step 1" - if(result.bool){ - event.forceDie=true; - player.respond(result.links,'midao','highlight','noOrdering'); - result.cards=result.links; - var card=result.cards[0]; - event.card=card; - player.storage.yishe.remove(card); - if(player.storage.yishe.length==0){ - player.unmarkSkill('yishe'); - if(player.hasSkill('yishe')){ - player.logSkill('yishe'); - player.recover(); - } - } - else player.markSkill('yishe'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',card); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:0.6 - } - } - }, - fengpo:{ - shaRelated:true, - audio:2, - trigger:{ - player:'useCardToPlayered', - }, - filter:function(event,player){ - if(event.targets.length!=1||!['sha','juedou'].contains(event.card.name)) return false; - var evt2=event.getParent('phaseUse'); - if(evt2.player!=player) return false; - return player.getHistory('useCard',function(evt){ - return ['sha','juedou'].contains(evt.card.name)&&evt.getParent('phaseUse')==evt2; - }).indexOf(event.getParent())==0; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt2('fengpo')); - 'step 1' - if(result.control&&result.control!='cancel2'){ - player.logSkill('fengpo',trigger.target); - var nd=trigger.target.countCards('h',{suit:'diamond'}); - if(result.control=='draw_card'){ - player.draw(nd); - } - else{ - var trigger2=trigger.getParent(); - if(typeof trigger2.baseDamage!='number'){ - trigger2.baseDamage=1; - } - trigger2.baseDamage+=nd; - } - } - } - }, - fengpo2:{ - trigger:{source:'damageBegin1'}, - filter:function(event){ - return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); - }, - forced:true, - audio:false, - content:function(){ - if(typeof player.storage.fengpo=='number'){ - trigger.num+=player.storage.fengpo; - } - } - }, - fengpo3:{}, - biluan:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - mark:true, - //unique:true, - intro:{ - content:function(storage){ - if(storage>0){ - return '其他角色计算与你的距离时+'+storage; - } - else if(storage<0){ - return '其他角色计算与你的距离时'+storage; - } - else{ - return '无距离变化'; - } - } - }, - init:function(player){ - if(typeof player.storage.biluan!='number') player.storage.biluan=0; - }, - check:function(event,player){ - if(player.countCards('h')>player.hp) return true; - if(player.hasJudge('lebu')) return true; - var ng=[]; - var players=game.filterPlayer(); - for(var i=0;i1){ - nai++; - } - } - } - return nai>=2; - }, - filter:function(event,player){ - return !event.numFixed&&game.hasPlayer(function(current){ - return current!=player&&get.distance(current,player)<=1; - }); - }, - content:function(){ - var ng=[]; - var players=game.filterPlayer(); - for(var i=0;i1; - }, - forced:true, - content:function(){ - 'step 0' - player.chooseTarget(function(card,player,target){ - return target==player||target==_status.event.source; - },true,'礼下:选择一个目标摸一张牌').set('ai',function(target){ - return player==target?1:0; - }).set('source',trigger.player); - 'step 1' - if(result.targets.length){ - result.targets[0].draw(); - player.line(result.targets[0],'green'); - } - player.storage.biluan--; - player.markSkill('biluan'); - game.addVideo('storage',player,['biluan',player.storage.biluan]); - } - }, - rebiluan2:{ - mark:true, - charlotte:true, - intro:{ - content:function(storage){ - if(storage>0){ - return '其他角色计算与你的距离时+'+storage; - } - else if(storage<0){ - return '其他角色计算与你的距离时'+storage; - } - else{ - return '无距离变化'; - } - } - }, - init:function(player){ - if(typeof player.storage.rebiluan2!='number') player.storage.rebiluan2=0; - }, - mod:{ - globalTo:function(from,to,distance){ - if(typeof to.storage.rebiluan2=='number'){ - return distance+to.storage.rebiluan2; - } - } - } - }, - rebiluan:{ - audio:'biluan', - trigger:{player:'phaseJieshuBegin'}, - checkx:function(player){ - var ng=game.countGroup(); - if(ng<2) return false; - var nai=0; - for(var i=0;i1){ - nai++; - } - } - } - return nai>=2; - }, - filter:function(event,player){ - return player.countCards('he')&&game.hasPlayer(function(current){ - return current!=player&&get.distance(current,player)<=1; - }); - }, - direct:true, - content:function(){ - "step 0" - player.chooseToDiscard('he',get.prompt2('rebiluan')).set('logSkill','rebiluan').set('check',lib.skill.rebiluan.checkx(player)).set('ai',function(card){ - if(_status.event.check) return 6-get.value(card); - return 0; - }); - "step 1" - if(result.bool){ - player.addSkill('rebiluan2'); - var ng=game.countGroup(); - player.$damagepop(ng,'unknownx'); - player.storage.rebiluan2+=ng; - player.markSkill('rebiluan2'); - game.addVideo('storage',player,['rebiluan2',player.storage.rebiluan2]); - } - }, - }, - relixia:{ - audio:'lixia', - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - return event.player.isAlive()&&event.player!=player&&!player.inRangeOf(event.player); - }, - forced:true, - content:function(){ - 'step 0' - if(trigger.player.isDead()){ - event._result={bool:true,links:[0]}; - return; - } - event.videoId=lib.status.videoId++; - var func=function(card,id,bool){ - var list=[ - '令自己摸一张牌', - '令XXX摸两张牌', - '令XXX回复1点体力', - ]; - var choiceList=ui.create.dialog('【礼下】:请选择一至两项','forcebutton'); - choiceList.videoId=id; - for(var i=0;i0&&get.attitude(player,event.player)<0; - }, - prompt:function(event){ - return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,'+get.prompt('fuji'); - }, - logTarget:'source', - content:function(){ - trigger.source.judge().callback=lib.skill.fuji.callback; - }, - callback:function(){ - var evt=event.getParent(2); - if(event.judgeResult.color=='black'){ - //game.cardsDiscard(card); - evt._trigger.num++; - } - else{ - evt._trigger.source.gain(card,'gain2'); - } - }, - }, - fulu:{ - trigger:{player:'useCard1'}, - filter:function(event,player){ - if(event.card.name=='sha'&&!event.card.nature) return true; - }, - audio:true, - check:function(event,player){ - var eff=0; - for(var i=0;i=0; - }, - content:function(){ - trigger.card.nature='thunder'; - if(get.itemtype(trigger.card)=='card'){ - var next=game.createEvent('fulu_clear'); - next.card=trigger.card; - event.next.remove(next); - trigger.after.push(next); - next.setContent(function(){ - delete card.nature; - }); - } - } - }, - guiming:{ - unique:true, - zhuSkill:true, - }, - canshi:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - check:function(event,player){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; - return current.isDamaged(); - }); - return num>3; - }, - prompt:function(event,player){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; - }, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.changeToZero(); - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - if(num>0){ - player.draw(num); - } - player.addTempSkill('canshi2'); - } - }, - canshi2:{ - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - var type=get.type(event.card,'trick'); - return type=='basic'||type=='trick'; - }, - autodelay:true, - content:function(){ - player.chooseToDiscard(true,'he'); - } - }, - chouhai:{ - audio:2, - trigger:{player:'damageBegin3'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return player.countCards('h')==0; - }, - content:function(){ - trigger.num++; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')&&target.countCards('h')==0) return [1,-2]; - } - } - } - }, - recanshi:{ - audio:'canshi', - trigger:{player:'phaseDrawBegin2'}, - check:function(event,player){ - if(player.skipList.contains('phaseUse')||!player.countCards('h',function(card){ - return get.type(card,'trick')=='trick'&&player.hasUseTarget(card); - })) return true; - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; - return current.isDamaged(); - }); - return num>1; - }, - prompt:function(event,player){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - return '残蚀:是否多摸'+get.cnNumber(num)+'张牌?'; - }, - filter:function(event,player){ - return !event.numFixed&&game.hasPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - }, - content:function(){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - if(num>0){ - trigger.num+=num; - } - player.addTempSkill('recanshi2'); - } - }, - recanshi2:{ - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - if(event.card.name=='sha') return true; - var type=get.type(event.card,'trick'); - return type=='trick'; - }, - autodelay:true, - content:function(){ - player.chooseToDiscard(true,'he'); - } - }, - rechouhai:{ - audio:'chouhai', - trigger:{player:'damageBegin3'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.countCards('h')==0; - }, - content:function(){ - trigger.num++; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&target.countCards('h')==0) return [1,-2]; - } - } - } - }, - kunfen:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - "step 0" - if(player.storage.kunfen|| - (get.mode()=='guozhan'&&player.hiddenSkills.contains('kunfen'))){ - if(!player.storage.kunfen){ - event.skillHidden=true; - } - player.chooseBool(get.prompt2('kunfen')).set('ai',function(){ - var player=_status.event.player; - if(player.hp>3) return true; - if(player.hp==3&&player.countCards('h')<3) return true; - if(player.hp==2&&player.countCards('h')==0) return true; - return false; - }); - } - else{ - event.forced=true; - } - "step 1" - if(event.forced||result.bool){ - player.logSkill('kunfen'); - player.loseHp(); - } - else{ - event.finish(); - } - "step 2" - player.draw(2); - }, - ai:{ - threaten:1.5 - } - }, - fengliang:{ - skillAnimation:true, - animationColor:'thunder', - unique:true, - juexingji:true, - audio:2, - derivation:'retiaoxin', - trigger:{player:'dying'}, - //priority:10, - forced:true, - filter:function(event,player){ - return !player.storage.kunfen; - }, - content:function(){ - "step 0" - player.loseMaxHp(); - "step 1" - if(player.hp<2){ - player.recover(2-player.hp); - } - "step 2" - player.addSkill('retiaoxin'); - player.storage.kunfen=true; - player.awakenSkill('fengliang'); - }, - }, - zhuiji:{ - mod:{ - globalFrom:function(from,to){ - if(from.hp>=to.hp) return -Infinity; - } - } - }, - oldcihuai:{ - audio:'cihuai', - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - check:function(event,player){ - return !player.countCards('h','sha'); - }, - content:function(){ - player.showHandcards(); - if(!player.countCards('h','sha')) player.addTempSkill('oldcihuai2'); - }, - }, - oldcihuai2:{ - group:'oldcihuai3', - prompt:'视为使用一张杀', - enable:'chooseToUse', - viewAs:{name:'sha',isCard:true}, - filterCard:function(){return false}, - selectCard:-1, - ai:{ - presha:true, - respondSha:true, - }, - }, - oldcihuai3:{ - trigger:{ - player:['gainEnd','loseEnd'], - global:'die', - }, - silent:true, - firstDo:true, - filter:function(event,player){ - if(event.name=='lose') return event.hs.length>0; - return true; - }, - content:function(){ - player.removeSkill('oldcihuai2'); - }, - }, - cihuai:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h','sha')==0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('cihuai'),function(card,player,target){ - return player.canUse({name:'sha',isCard:true},target); - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha',isCard:true},player,player); - }); - "step 1" - if(result.bool){ - player.logSkill('cihuai'); - player.showHandcards(); - player.useCard({name:'sha',isCard:true},result.targets); - } - }, - ai:{ - expose:0.2, - } - }, - jilei:{ - trigger:{player:'damageEnd'}, - //priority:9, - audio:2, - direct:true, - filter:function(event){ - return event&&event.source; - }, - content:function(){ - 'step 0' - player.chooseControl('basic','trick','equip','cancel2',function(){ - var source=_status.event.source; - if(get.attitude(_status.event.player,source)>0) return 'cancel2'; - if(!source.storage.jilei2||!source.storage.jilei2.contains('basic')) return 'basic'; - if(_status.currentPhase!=source) return 'trick'; - if(lib.filter.cardUsable({name:'sha'},source)&&source.countCards('h')>=2) return 'basic'; - return 'trick'; - }).set('prompt',get.prompt2('jilei',trigger.source)).set('source',trigger.source); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('jilei',trigger.source); - player.popup(get.translation(result.control)+'牌'); - trigger.source.addTempSkill('jilei2',{player:'phaseBegin'}); - trigger.source.storage.jilei2.add(result.control); - trigger.source.updateMarks('jilei2'); - } - }, - ai:{ - maixie_defend:true, - threaten:0.7 - } - }, - jilei2:{ - unique:true, - charlotte:true, - intro:{ - content:function(storage){ - return '不能使用、打出或弃置'+get.translation(storage)+'牌'; - } - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - mark:true, - onremove:true, - mod:{ - cardDiscardable:function(card,player){ - if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; - }, - cardEnabled:function(card,player){ - if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; - }, - cardUsable:function(card,player){ - if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; - }, - cardRespondable:function(card,player){ - if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; - }, - cardSavable:function(card,player){ - if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; - }, - }, - }, - danlao:{ - audio:2, - filter:function(event,player){ - return (event.card.name=='sha'||get.type(event.card)=='trick')&&event.targets&&event.targets.length>1; - }, - check:function(event,player){ - return event.getParent().excluded.contains(player)||get.tag(event.card,'multineg')||get.effect(player,event.card,event.player,player)<=0; - }, - trigger:{target:'useCardToTargeted'}, - content:function(){ - trigger.getParent().excluded.add(player); - player.draw(); - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)!='trick') return; - if(card.name=='tiesuo') return [0,0]; - if(card.name=='yihuajiemu') return [0,1]; - if(get.tag(card,'multineg')) return [0,2]; - } - } - } - }, - taichen:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canUse('sha',target); - }, - content:function(){ - "step 0" - player.loseHp(); - "step 1" - player.useCard({name:'sha',isCard:true},target,false); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.hp>2&&player.hp>target.hp&&target.countCards('he')<4){ - return get.effect(target,{name:'sha'},player,target); - } - return 0; - } - } - } - }, - xinmanjuan:{ - audio:'manjuan', - forced:true, - priority:15, - trigger:{player:'gainAfter'}, - filter:function(event,player){ - return event.type!='xinmanjuan'; - }, - content:function(){ - "step 0" - player.lose(trigger.cards,ui.discardPile,'visible'); - player.$throw(trigger.cards,1000); - game.log(player,'将',trigger.cards,'置入了弃牌堆') - "step 1" - event.cards=trigger.cards.slice(0); - if(_status.currentPhase!=player) event.finish(); - "step 2" - event.card=event.cards.shift(); - event.togain=[]; - var number=get.number(event.card); - for(var i=0;imaxval){ - maxval=tempval; - } - } - maxval+=cards.length-1; - var next=player.chooseToDiscard('he',{suit:suits}); - next.set('ai',function(card){ - return _status.event.maxval-get.value(card); - }); - next.set('maxval',maxval); - next.set('dialog',[get.prompt(event.name),'hidden',cards]) - next.logSkill=event.name; - event.cards=cards; - } - "step 2" - if(result.bool){ - player.gain(event.cards,'gain2','log'); - } - }, - ai:{ - threaten:1.3 - } - }, - zuixiang:{ - skillAnimation:true, - animationColor:'gray', - audio:true, - unique:true, - mark:true, - trigger:{player:'phaseZhunbeiBegin'}, - //priority:10, - filter:function(event,player){ - if(player.storage.zuixiang) return false; - return true; - }, - check:function(event,player){ - return player.countCards('h')0; - }, - filterCard:{name:'sha'}, - check:function(card){return 6-get.value(card)}, - content:function(){ - 'step 0' - var list=lib.group.slice(0); - list.remove('shen'); - if(player.storage.xiemu2) list.removeArray(player.storage.xiemu2); - var list2=list.slice(0); - list2.sort(function(a,b){ - return lib.skill.xiemu.count(b)-lib.skill.xiemu.count(a); - }); - player.chooseControl(list).set('prompt','请选择一个势力').ai=function(){return list2[0]}; - 'step 1' - player.popup(result.control+2,get.groupnature(result.control)); - game.log(player,'选择了','#g'+get.translation(result.control+2)); - player.addTempSkill('xiemu2',{player:'phaseBegin'}); - player.storage.xiemu2.add(result.control); - player.updateMarks('xiemu2'); - }, - ai:{ - order:1, - result:{player:1}, - }, - count:function(group){ - var player=_status.event.player; - return game.countPlayer(function(current){ - return current!=player&¤t.group==group&&get.attitude(current,player)<0; - }); - }, - }, - xiemu2:{ - onremove:true, - mark:true, - forced:true, - audio:'xiemu', - intro:{ - content:function(storage){ - return '已指定'+get.translation(storage)+'势力'; - }, - }, - trigger:{ - target:'useCardToTargeted' - }, - init:function(player){ - if(!player.storage.xiemu2) player.storage.xiemu2=[]; - }, - filter:function(event,player){ - if(!player.storage.xiemu2) return false; - if(get.color(event.card)!='black') return false; - if(!event.player) return false; - if(event.player==player||!player.storage.xiemu2.contains(event.player.group)) return false; - return true; - }, - content:function(){ - player.draw(2); - }, - }, - oldxiemu:{ - audio:'xiemu', - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - if(get.color(event.card)!='black') return false; - if(!event.player) return false; - if(event.player==player) return false; - if(get.mode()!='guozhan') return false; - return player.countCards('h','sha')>0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}); - next.set('ai',function(card){ - return 9-get.value(card); - }); - next.logSkill='xiemu'; - "step 1" - if(result.bool){ - player.draw(2); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.color(card)=='black'&&target.countCards('h')>0){ - return [1,0.5]; - } - } - } - } - }, - spmengjin:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - return event.target.countCards('he')>0; - }, - direct:true, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.target); - player.choosePlayerCard(get.prompt('spmengjin',trigger.target),'he',trigger.target).ai=function(button){ - var val=get.buttonValue(button); - if(att>0) return -val; - return val; - }; - "step 1" - if(result.bool){ - trigger.target.discard(result.links); - player.logSkill('spmengjin',trigger.target); - trigger.target.addTempSkill('mengjin2','shaAfter'); - } - }, - ai:{ - expose:0.2 - } - }, - fenxun_old:{ - audio:2, - trigger:{player:'shaBefore'}, - direct:true, - filter:function(event,player){ - return event.targets.length==1; - }, - position:'he', - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var trigger=_status.event.getTrigger(); - return lib.filter.targetEnabled(trigger.card,player,target)&&target!=trigger.targets[0]; - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }, - prompt:get.prompt2('fenxun') - }); - "step 1" - if(result.bool){ - player.discard(result.cards); - trigger.targets.push(result.targets[0]); - player.logSkill('fenxun',result.targets); - } - } - }, - rezhoufu:{ - audio:'zhoufu', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - filterTarget:function(card,player,target){ - return target!=player&&!target.getStorage('rezhoufu2').length; - }, - check:function(card){ - return 6-get.value(card) - }, - position:'he', - discard:false, - toStorage:true, - prepare:'give', - content:function(){ - if(!target.storage.rezhoufu2_markcount) target.storage.rezhoufu2_markcount=0; - target.markAuto('rezhoufu2',cards); - }, - ai:{ - order:1, - result:{ - target:-1, - }, - }, - group:['rezhoufu_judge','rezhoufu_losehp'], - subSkill:{ - judge:{ - audio:'zhoufu', - trigger:{global:'judgeBefore'}, - forced:true, - filter:function(event,player){ - return !event.directresult&&event.player.getStorage('rezhoufu2').length; - }, - logTarget:'player', - content:function(){ - var cards=[trigger.player.getStorage('rezhoufu2')[0]]; - trigger.directresult=cards[0]; - trigger.player.unmarkAuto('rezhoufu2',cards); - }, - }, - losehp:{ - audio:'zhoufu', - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return event.player.hasSkill('rezhoufu3')&&event.player.isAlive(); - }, - logTarget:'player', - content:function(){ - trigger.player.loseHp(); - }, - }, - }, - }, - rezhoufu2:{ - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length==0; - } - player.addTempSkill('rezhoufu3'); - delete player.storage.rezhoufu2_markcount; - }, - }, - }, - rezhoufu3:{}, - reyingbing:{ - audio:'yingbin', - trigger:{global:'useCard'}, - forced:true, - filter:function(event,player){ - var cards=event.player.getStorage('rezhoufu2'); - return cards.length&&get.color(cards[0])==get.color(event.card); - }, - logTarget:'player', - content:function(){ - 'step 0' - player.draw(); - 'step 1' - trigger.player.storage.rezhoufu2_markcount++; - if(trigger.player.storage.rezhoufu2_markcount>=2){ - var cards=trigger.player.getStorage('rezhoufu2'); - trigger.player.$throw(cards); - game.delayx(); - player.gain(cards,'gain2','log'); - cards.length=0; - trigger.player.unmarkSkill('rezhoufu2'); - } - else trigger.player.markSkill('rezhoufu2'); - }, - }, - zhoufu:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:true, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('zhoufu2'); - }, - prepare:'throw', - discard:false, - //lose:false, - visible:true, - toStorage:true, - content:function(){ - //player.lose(cards,ui.special,'toStorage'); - target.$gain2(cards); - target.storage.zhoufu2=cards[0]; - target.addSkill('zhoufu2'); - target.storage.zhoufu3=player; - //ui.special.appendChild(cards[0]); - target.syncStorage('zhoufu2'); - }, - check:function(card){ - return 6-get.value(card) - }, - ai:{ - expose:0.1, - order:1, - result:{ - target:-1 - } - } - }, - zhoufu2:{ - trigger:{player:'judgeBefore'}, - forced:true, - //priority:10, - mark:'card', - filter:function(event){ - return !event.directresult; - }, - content:function(){ - "step 0" - trigger.directresult=player.storage.zhoufu2; - delete player.storage.zhoufu2; - player.removeSkill('zhoufu2'); - delete player.storage.zhoufu2_markcount; - if(player.storage.zhoufu3.isIn()){ - player.storage.zhoufu3.line(player,'green'); - } - "step 1" - player.addTempSkill('zhoufu3'); - }, - intro:{ - content:'card', - onunmark:function(storage,player){ - if(storage){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - } - delete player.storage.zhoufu2; - }, - } - }, - zhoufu3:{ - trigger:{global:'phaseEnd'}, - silent:true, - content:function(){ - if(player.storage.zhoufu3.isIn()){ - player.storage.zhoufu3.logSkill('zhoufu',player); - player.loseHp(); - } - delete player.storage.zhoufu3; - }, - onremove:true - }, - yingbin:{ - audio:2, - trigger:{global:'useCard'}, - filter:function(event,player){ - return event.player.hasSkill('zhoufu2')&&event.player.storage.zhoufu3==player&& - get.suit(event.player.storage.zhoufu2)==get.suit(event.card); - }, - forced:true, - autodelay:true, - content:function(){ - player.draw(); - if(trigger.player.storage.zhoufu2_markcount==1){ - trigger.player.removeSkill('zhoufu2'); - delete trigger.player.storage.zhoufu2; - delete trigger.player.storage.zhoufu2_markcount; - delete trigger.player.storage.zhoufu3; - } - else{ - trigger.player.storage.zhoufu2_markcount=1; - trigger.player.updateMarks(); - } - } - }, - kuiwei:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - check:function(event,player){ - if(player.isTurnedOver()) return true; - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - return num>1; - }, - content:function(){ - "step 0" - player.turnOver(); - "step 1" - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - player.draw(2+num); - player.addSkill('kuiwei2'); - }, - ai:{ - effect:{ - target:function(card){ - if(card.name=='guiyoujie') return [0,2]; - } - } - } - }, - kuiwei2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - audio:false, - content:function(){ - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - if(num>=player.countCards('he')){ - player.discard(player.getCards('he')); - } - else if(num){ - player.chooseToDiscard('he',num,true); - } - player.removeSkill('kuiwei2'); - } - }, - yanzheng:{ - enable:'chooseToUse', - audio:2, - filter:function(event,player){ - return player.hp0; - }, - viewAsFilter:function(player){ - return player.hp0; - }, - filterCard:true, - position:'e', - viewAs:{name:'wuxie'}, - prompt:'将一张装备区内的牌当无懈可击使用', - check:function(card){return 8-get.equipValue(card)}, - threaten:1.2 - }, - tongji:{ - global:'tongji_disable', - audio:2, - trigger:{global:"useCard1"}, - forced:true, - filter:function (event,player){ - return event.targets.contains(player)&&player!=event.player&&event.card.name=='sha'&&player.hp=0; - }, - content:function(){ - "step 0" - player.draw(); - if(trigger.target!=player){ - player.chooseCard(true,'he','交给'+get.translation(trigger.target)+'一张牌').set('ai',function(card){ - if(get.position(card)=='e') return -1; - if(card.name=='shan') return 1; - if(get.type(card)=='equip') return 0.5; - return 0; - }); - } - else{ - event.finish(); - } - "step 1" - trigger.target.gain(result.cards,player,'give'); - game.delay(); - event.card=result.cards[0]; - "step 2" - if(trigger.target.getCards('h').contains(card)&&get.type(card)=='equip'){ - trigger.target.chooseUseTarget(card); - } - }, - ai:{ - threaten:1.1 - } - }, - liangzhu:{ - audio:2, - trigger:{global:'recoverAfter'}, - direct:true, - filter:function(event,player){ - return event.player.isPhaseUsing(); - }, - content:function(){ - 'step 0' - if(player==trigger.player){ - player.chooseControl('摸一张','摸两张','cancel2',function(){ - return '摸两张'; - }).set('prompt',get.prompt2('liangzhu')); - event.single=true; - } - else{ - player.chooseTarget(get.prompt2('liangzhu'),function(card,player,target){ - return target==_status.event.player||target==_status.event.target; - }).set('target',trigger.player).set('ai',function(target){ - var player=_status.event.player; - if(player==target) return 1; - return get.attitude(player,target)-1.5; - }); - } - 'step 1' - if(event.single){ - if(result.control!='cancel2'){ - player.logSkill('liangzhu',player); - if(result.control=='摸一张'){ - player.draw(); - } - else{ - player.draw(2); - if(!player.storage.liangzhu) player.storage.liangzhu=[]; - player.storage.liangzhu.add(player); - } - } - } - else if(result.bool){ - var target=result.targets[0]; - player.logSkill('liangzhu',target); - if(target==player){ - target.draw(); - } - else{ - target.draw(2); - if(target.storage.liangzhu){ - target.storage.liangzhu.add(player); - } - else{ - target.storage.liangzhu=[player]; - } - } - } - }, - ai:{ - expose:0.1 - } - }, - fanxiang:{ - skillAnimation:true, - animationColor:'fire', - audio:2, - unique:true, - juexingji:true, - forceunique:true, - derivation:'xiaoji', - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - if(player.storage.fanxiang) return false; - return game.hasPlayer(function(current){ - return current.storage.liangzhu&¤t.storage.liangzhu.contains(player)&¤t.isDamaged(); - }); - }, - forced:true, - content:function(){ - player.storage.fanxiang=true; - player.gainMaxHp(); - player.recover(); - player.removeSkill('liangzhu'); - player.addSkill('xiaoji'); - player.awakenSkill('fanxiang'); - }, - }, - mingshi:{ - audio:2, - trigger:{player:'damageBegin3'}, - direct:true, - filter:function(event,player){ - return event.source&&event.source.hp>player.hp; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt2('mingshi'),{color:'black'}); - next.set('ai',function(card){ - return 9-get.value(card); - }); - next.set('logSkill','mingshi'); - "step 1" - if(result.bool){ - trigger.num--; - } - }, - ai:{ - threaten:0.8 - } - }, - lirang:{ - audio:2, - trigger:{player:'loseAfter'}, - filter:function(event,player){ - if(event.type!='discard') return false; - for(var i=0;i1; - }); - } - player.chooseCardButton(get.prompt('lirang'),event.cards,[1,event.cards.length]).set('ai',function(button){ - if(!_status.event.goon||ui.selected.buttons.length) return 0; - if(button.link.name=='du') return 2; - return 1; - }).set('goon',goon); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - event.togive=result.links.slice(0); - player.chooseTarget('将'+get.translation(result.links)+'交给一名角色',true,function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.enemy){ - return -att; - } - else{ - if(att>2) return att/Math.sqrt(1+target.countCards('h')); - return att/Math.sqrt(1+target.countCards('h'))/5; - } - }).set('enemy',get.value(event.togive[0],player,'raw')<0); - } - else{ - //game.cardsDiscard(event.cards); - event.finish(); - } - "step 3" - if(result.bool){ - if(!event.logged){ - player.logSkill('lirang',result.targets); - event.logged=true; - } - else player.line(result.targets,'green'); - for(var i=0;i0; - }, - content:function(){ - trigger.target.discardPlayerCard(player,true); - } - }, - shenxian:{ - audio:2, - trigger:{global:'loseAfter'}, - filter:function(event,player){ - if(event.type!='discard'||event.player==player||_status.currentPhase==player) return false; - if(player.hasSkill('shenxian2')) return false; - for(var i=0;iplayer.storage.qiangwu) return num+2; - }, - targetInRange:function(card,player){ - if(_status.currentPhase==player&&card.name=='sha'&&card.numberplayer.storage.qiangwu) return Infinity; - } - }, - trigger:{player:'useCard1'}, - filter:function(event,player){ - if(_status.currentPhase==player&&event.card.name=='sha'&& - event.card.number>player.storage.qiangwu&&event.addCount!==false) return true; - return false; - }, - forced:true, - popup:false, - firstDo:true, - content:function(){ - trigger.addCount=false; - if(player.stat[player.stat.length-1].card.sha>0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - }, - zhendu:{ - audio:2, - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return /*(get.mode()!='guozhan'||event.player!=player)&&*/player.countCards('h')>0; - }, - direct:true, - content:function(){ - "step 0" - var nono=(Math.abs(get.attitude(player,trigger.player))<3); - if(player==trigger.player||get.damageEffect(trigger.player,player,player)<=0){ - nono=true - } - else if(trigger.player.hp>2){ - nono=true; - } - else if(trigger.player.hp>1&&player.countCards('h')<3){ - nono=true; - } - else if(trigger.player.canUse('sha',player)&&!player.countCards('h','shan')&&trigger.player.countCards('h')>=3){ - nono=true; - } - var next=player.chooseToDiscard(get.prompt2('zhendu',trigger.player)); - next.set('ai',function(card){ - if(_status.event.nono) return -1; - return 7-get.useful(card); - }); - next.set('logSkill',['zhendu',trigger.player]); - next.set('nono',nono); - "step 1" - if(result.bool){ - trigger.player.chooseUseTarget({name:'jiu'},true,'noTargetDelay','nodelayx'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool&&trigger.player!=player) trigger.player.damage(); - }, - ai:{ - threaten:2, - expose:0.3 - } - }, - qiluan:{ - audio:'qiluan2', - //group:'qiluan_draw', - //subfrequent:['draw'], - trigger:{global:'phaseEnd'}, - frequent:true, - filter:function(event,player){ - return game.hasPlayer2(function(current){ - return current.getStat('kill')>0 - }); - }, - prompt:function(event,player){ - var num=game.countPlayer2(function(current){ - return (current.getStat('kill')||0)*(current==player?3:1); - }); - return get.prompt('qiluan')+'(可摸'+get.cnNumber(num)+'张牌)'; - }, - content:function(){ - //if(get.mode()=='guozhan'){ - // player.draw(3); - //} - //else{ - player.draw(game.countPlayer2(function(current){ - return (current.getStat('kill')||0)*(current==player?3:1); - })); - //} - }, - subSkill:{ - draw:{ - trigger:{global:'dieAfter'}, - frequent:true, - filter:function(event,player){ - return /*get.mode()!='guozhan'&&*/player!=event.source; - }, - content:function(){player.draw()}, - }, - }, - }, - qiluan2:{ - audio:2, - }, - zniaoxiang:{ - shaRelated:true, - audio:2, - trigger:{player:'useCardToPlayered'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&!event.getParent().directHit.contains(event.target); - }, - //priority:-1, - logTarget:'target', - content:function(){ - var id=trigger.target.playerid; - var map=trigger.getParent().customArgs; - if(!map[id]) map[id]={}; - if(typeof map[id].shanRequired=='number'){ - map[id].shanRequired++; - } - else{ - map[id].shanRequired=2; - } - } - }, - shangyi:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - content:function(){ - "step 0" - player.chooseCardButton(target,target.getCards('h')).set('filterButton',function(button){ - return get.color(button.link)=='black'; - }); - "step 1" - if(result.bool){ - target.discard(result.links[0]); - } - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - return -target.countCards('h'); - } - }, - threaten:1.1 - }, - }, - shengxi:{ - trigger:{player:'phaseDiscardBegin'}, - frequent:true, - filter:function(event,player){ - return !player.getStat('damage'); - }, - content:function(){ - player.draw(2); - }, - audio:2, - audioname:['liushan'] - }, - shoucheng:{ - trigger:{global:'loseAfter'}, - audio:2, - check:function(event,player){ - return get.attitude(player,event.player)>0; - }, - filter:function(event,player){ - if(event.player==player||event.player.isDead()||event.player.countCards('h')) return false; - if(_status.currentPhase==event.player) return false; - return event.hs&&event.hs.length>0; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - threaten:1.3, - expose:0.2, - noh:true, - } - }, - hengzheng:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - filter:function(event,player){ - return !event.numFixed&&(player.hp==1||player.countCards('h')==0); - }, - check:function(event,player){ - var num=game.countPlayer(function(current){ - if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ - return true; - } - if(current.countCards('j')&¤t!=player&&get.attitude(player,current)>0){ - return true; - } - }); - return num>=2; - }, - content:function(){ - "step 0" - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(lib.sort.seat); - event.targets=targets; - event.num=0; - trigger.changeToZero(); - player.line(targets,'green'); - "step 1" - if(num【勇决】
    每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
    '); - "step 1" - player.turnOver(); - }, - intro:{ - content:'limited' - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(target.isMin()) return 0; - if(player.hp>1){ - if(game.phaseNumber2) return 0; - if(get.attitude(player,target)<5) return 0; - } - if(get.attitude(player,target)<5) return 0; - if(target.hp==1&&target.maxHp>2) return 0.2; - if(target==game.me) return 1.2; - return 1; - } - }, - expose:0.5, - threaten:1.5 - } - }, - fenming:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - check:function(event,player){ - var num=game.countPlayer(function(current){ - if(current.isLinked()&¤t.countCards('he')){ - return get.attitude(player,current); - } - }); - return num<0; - }, - filter:function(event,player){ - return player.isLinked(); - }, - content:function(){ - "step 0" - event.targets=game.filterPlayer(function(current){ - if(current.isLinked()&¤t.countCards('he')){ - return true; - } - }); - event.num=0; - event.targets.sort(lib.sort.seat); - "step 1" - if(event.num=0); - trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){ - if(_status.event.nono){ - return 0; - } - if(_status.event.player.hp==1) return 10-get.value(card); - return 9-get.value(card); - }).set('nono',nono); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.draw(); - } - else{ - trigger.player.damage(); - } - }, - ai:{ - expose:0.3, - threaten:1.3 - } - }, - suishi:{ - audio:2, - trigger:{global:'dying'}, - forced:true, - popup:false, - //priority:12, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source!=event.player; - }, - content:function(){ - 'step 0' - var str; - if(trigger.parent.source==player){ - str='随势:是否摸一张牌?'; - } - else{ - str='随势:是否令'+get.translation(player)+'摸一张牌?' - } - trigger.parent.source.chooseBool(str).set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)>0; - }).set('target',player); - 'step 1' - if(result.bool){ - player.logSkill('suishi'); - trigger.parent.source.line(player,'green'); - player.draw(); - } - }, - group:'suishi2' - }, - suishi2:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.player!=player&&event.source&&event.source!=player&&event.source!=event.player; - }, - content:function(){ - 'step 0' - var str; - if(trigger.source==player){ - str='随势:是否流失一点体力?'; - } - else{ - str='随势:是否令'+get.translation(player)+'流失一点体力?' - } - trigger.source.chooseBool(str).set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)<0; - }).set('target',player); - 'step 1' - if(result.bool){ - player.logSkill('suishi'); - trigger.source.line(player,'green'); - player.loseHp(); - } - }, - }, - sijian:{ - trigger:{player:'loseAfter'}, - direct:true, - audio:2, - filter:function(event,player){ - if(player.countCards('h')) return false; - return event.hs&&event.hs.length>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('sijian'),'弃置一名其他角色的一张牌',function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - player.logSkill('sijian',result.targets); - event.target=result.targets[0]; - player.discardPlayerCard(event.target,true); - } - else{ - event.finish(); - } - }, - ai:{ - expose:0.2, - } - }, - quji:{ - audio:2, - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - selectCard:function(){ - var player=_status.event.player; - return player.getDamagedHp(); - }, - filterTarget:function(card,player,target){ - return target.hp-1; - if(num==2) return att>0; - return att>1; - } - return false; - }, - content:function(){ - "step 0" - event.target=player; - event.player=trigger.player; - event.player.chooseBool('是否对'+get.translation(event.target)+'发动【郡兵】?',event.player==event.target?'摸一张牌':'摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌').set('choice',lib.skill.junbing.checkx(event.target,event.player)); - "step 1" - if(!result.bool){event.finish();return} - target.logSkill('junbing',player); - if(player==target) event.finish(); - player.draw(); - "step 2" - var cards=player.getCards('h'); - target.gain(cards,player,'giveAuto'); - event.num=cards.length; - game.delay(); - "step 3" - target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num); - game.delay(0.2); - "step 4" - player.gain(result.cards,target,'giveAuto'); - game.delay(); - }, - audio:2, - }, - xiongyi:{ - skillAnimation:true, - animationColor:'gray', - unique:true, - enable:'phaseUse', - audio:2, - limited:true, - filterTarget:function(card,player,target){ - if(get.mode()=='guozhan'){ - if(player==target) return true; - if(player.identity=='ye') return false; - if(player.identity=='unknown'){ - if(_status.yeidentity.contains(player._group)){ - return false; - } - else if(get.zhu(player)||get.population(player._group)+1<=get.population()/2){ - return player._group==target.identity; - } - else{ - return false; - } - } - return player.identity==target.identity; - } - else{ - return true; - } - }, - multitarget:true, - multiline:true, - selectTarget:function(){ - if(get.mode()=='guozhan') return -1; - return [1,3]; - }, - content:function(){ - "step 0" - player.awakenSkill('xiongyi'); - game.asyncDraw(targets,3); - "step 1" - if(player.isDamaged()){ - if(get.mode()=='guozhan'){ - if(player.isMinor(true)){ - player.recover(); - } - } - else if(targets.length<=2){ - player.recover(); - } - } - }, - ai:{ - order:1, - result:{ - target:function(player){ - var num=player.countCards('h'); - if(player.hp==1) return 1; - if(player.hp==2&&num<=2) return 1; - if(player.hp==3&&num<=1) return 1; - if(game.phaseNumber1){ - event.num--; - event.goto(1); - } - } - }, - ai:{ - threaten:0.8, - expose:0.1 - } - }, - shushen:{ - audio:2, - trigger:{player:'recoverAfter'}, - direct:true, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - player.chooseTarget(get.prompt('shushen'),'令一名其他角色选择摸两张牌或回复1点体力',function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - "step 2" - if(result.bool){ - event.count--; - player.logSkill('shushen',result.targets); - result.targets[0].chooseDrawRecover(2,true); - if(event.count) event.goto(1); - } - }, - ai:{ - threaten:0.8, - expose:0.1 - } - }, - shenzhi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - check:function(event,player){ - if(player.hp>2) return false; - var cards=player.getCards('h'); - if(cards.length3) return false; - for(var i=0;i7||get.tag(cards[i],'recover')>=1) return false; - } - return true; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var cards=player.getCards('h'); - event.bool=cards.length>=player.hp; - player.discard(cards); - "step 1" - if(event.bool){ - player.recover(); - } - } - }, - wuji:{ - skillAnimation:true, - animationColor:'orange', - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - unique:true, - juexingji:true, - filter:function(event,player){ - return player.getStat('damage')>=3&&!player.storage.wuji; - }, - content:function(){ - "step 0" - player.removeSkill('huxiao'); - player.gainMaxHp(); - "step 1" - player.recover(); - player.awakenSkill('wuji'); - player.storage.wuji=true; - - var card=get.cardPile('qinglong','field'); - if(card){ - player.gain(card,'gain2','log'); - } - } - }, - xueji_old:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.hp0; - }, - filterTarget:function(card,player,target){ - return player!=target&&get.distance(player,target,'attack')<=1; - }, - selectTarget:function(){ - return [1,_status.event.player.maxHp-_status.event.player.hp]; - }, - position:'he', - filterCard:function(card){ - return get.color(card)=='red'; - }, - check:function(card){ - return 8-get.useful(card); - }, - content:function(){ - "step 0" - target.damage(); - "step 1" - target.draw(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - } - }, - threaten:function(player,target){ - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp&&target.hasFriend()) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - xueji:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - filterTarget:true, - selectTarget:function(){ - var player=_status.event.player - return [1,Math.max(1,player.getDamagedHp())]; - }, - position:'he', - filterCard:{color:'red'}, - check:function(card){ - return 8-get.value(card); - }, - multitarget:true, - multiline:true, - line:'fire', - content:function(){ - 'step 0' - event.delay=false; - for(var i=0;ii) cards.push(ui.cardPile.childNodes[i]); - } - player.chooseCardButton('傲才:选择一张卡牌打出',cards).set('filterButton',function(button){ - return get.type(button.link)=='basic'&&_status.event.getTrigger().filterCard(button.link); - }); - "step 1" - if(result.bool){ - game.log(player,'傲才发动成功'); - trigger.untrigger(); - trigger.responded=true; - result.links[0].remove(); - trigger.result={bool:true,card:result.links[0]} - } - }, - ai:{ - effect:{ - target:function(card,player,target,effect){ - if(get.tag(card,'respondShan')) return 0.7; - if(get.tag(card,'respondSha')) return 0.7; - } - } - }, - group:'aocai2', - }, - aocai2:{ - enable:'chooseToUse', - filter:function(event,player){ - return _status.currentPhase!==player&&event.type!='wuxie'&&event.type!='trickuse'; - }, - onChooseToUse:function(event){ - if(!game.online){ - var cards=[]; - if(ui.cardPile.childNodes.length<2){ - var discardcards=get.cards(2); - game.cardsDiscard(discardcards); - } - for(var i=0;i<2;i++){ - if(ui.cardPile.childNodes.length>i) cards.push(ui.cardPile.childNodes[i]); - } - event.set('aocaicards',cards); - } - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('傲才:选择一张卡牌使用',event.aocaicards); - }, - filter:function(button,player){ - var evt=_status.event.getParent(); - if(evt&&evt.filterCard){ - return get.type(button.link)=='basic'&&evt.filterCard(button.link,player,evt); - } - return false; - }, - check:function(button){ - return 1; - }, - backup:function(links,player){ - return { - audio:'aocai', - filterCard:function(){return false}, - selectCard:-1, - viewAs:links[0], - } - }, - prompt:function(links,player){ - return '选择'+get.translation(links)+'的目标'; - } - }, - ai:{ - order:11, - respondShan:true, - respondSha:true, - save:true, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - } - } - } - }, - hongyuan:{ - trigger:{player:'phaseDrawBegin2'}, - direct:true, - audio:2, - filter:function(event,player){ - return !event.numFixed&&event.num>0; - }, - content:function(){ - "step 0" - var check; - if(player.countCards('h')==0){ - check=false; - } - else{ - check=(game.countPlayer(function(current){ - return player!=current&&get.attitude(player,current)>1; - })>=2); - } - if(get.is.versus()){ - event.versus=true; - player.chooseBool(get.prompt2('hongyuan')).ai=function(){ - return game.countPlayer(function(current){ - return player.side==current.side; - })>2; - }; - } - else{ - player.chooseTarget(get.prompt2('hongyuan'),[1,2],function(card,player,target){ - return player!=target; - },function(target){ - if(!_status.event.check) return 0; - return get.attitude(_status.event.player,target); - }).set('check',check); - } - "step 1" - if(result.bool){ - var targets; - if(event.versus){ - targets=game.filterPlayer(function(current){ - return current!=player&¤t.side==player.side; - }); - } - else{ - targets=result.targets; - } - player.logSkill('hongyuan',targets); - game.asyncDraw(targets); - trigger.num--; - } - }, - }, - huanshi:{ - audio:2, - trigger:{global:'judge'}, - filter:function(event,player){ - return player.countCards('he')>0; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)<=0) return false; - var cards=player.getCards('he'); - var judge=event.judge(event.player.judging[0]); - for(var i=0;ijudge) return true; - if(_status.currentPhase!=player&&judge2==judge&&get.color(cards[i])=='red'&&get.useful(cards[i])<5) return true; - } - return false; - }, - content:function(){ - "step 0" - var target=trigger.player; - var judge=trigger.judge(target.judging[0]); - var attitude=get.attitude(target,player); - target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){ - var card=button.link; - var judge=_status.event.judge; - var attitude=_status.event.attitude; - var result=trigger.judge(card)-judge; - var player=_status.event.player; - if(result>0){ - return 20+result; - } - if(result==0){ - if(_status.currentPhase==player) return 0; - if(attitude>=0){ - return get.color(card)=='red'?7:0-get.value(card); - } - else{ - return get.color(card)=='black'?10:0+get.value(card); - } - } - if(attitude>=0){ - return get.color(card)=='red'?0:-10+result; - } - else{ - return get.color(card)=='black'?0:-10+result; - } - }).set('filterButton',function(button){ - var player=_status.event.target; - var card=button.link; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('judge',judge).set('attitude',attitude); - "step 1" - if(result.bool){ - event.card=result.links[0]; - player.respond(event.card,'highlight').nopopup=true; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=event.card; - trigger.orderingCards.add(event.card); - game.log(trigger.player,'的判定牌改为',event.card); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1, - } - } - }, - mingzhe:{ - audio:2, - trigger:{player:['useCard','respond','loseAfter']}, - frequent:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(event.name!='lose') return get.color(event.card)=='red'; - if(event.type!='discard') return false; - if(event.cards2){ - for(var i=0;i2) return current-1; - }, - globalTo:function(from,to,current){ - if(to.hp<=2) return current+1; - }, - }, - ai:{ - threaten:0.8 - } - }, - yongsi:{ - group:['yongsi1','yongsi2'], - ai:{ - threaten:2.2 - } - }, - yongsi1:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - forced:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num+=game.countGroup(); - } - }, - yongsi2:{ - audio:2, - trigger:{player:'phaseDiscardBegin'}, - forced:true, - content:function(){ - player.chooseToDiscard(game.countGroup(),'he',true); - } - }, - bifa:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var players=game.filterPlayer(); - for(var i=0;itarget.hp){ - target.chooseToDiscard(2,'he',true); - } - else{ - target.draw(2); - } - if(!player.storage.songci) player.storage.songci=[]; - player.storage.songci.push(target); - player.storage.songci.sortBySeat(); - player.markSkill('songci'); - }, - intro:{ - content:'已对$发动过〖颂词〗' - }, - ai:{ - order:7, - threaten:1.5, - expose:0.2, - result:{ - target:function(player,target){ - if(target.countCards('h')target.hp){ - return -1; - } - } - } - } - }, - baobian:{ - audio:2, - trigger:{player:['phaseBefore','changeHp']}, - forced:true, - popup:false, - init:function(player){ - if(game.online) return; - player.removeAdditionalSkill('baobian'); - var list=[]; - if(player.hp<=3){ - //if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); - list.push('retiaoxin'); - } - if(player.hp<=2){ - list.push('olpaoxiao'); - } - if(player.hp<=1){ - list.push('xinshensu'); - } - if(list.length){ - player.addAdditionalSkill('baobian',list); - } - }, - derivation:['retiaoxin','olpaoxiao','xinshensu'], - content:function(){ - player.removeAdditionalSkill('baobian'); - var list=[]; - if(player.hp<=3){ - if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); - list.push('retiaoxin'); - } - if(player.hp<=2){ - list.push('olpaoxiao'); - } - if(player.hp<=1){ - list.push('xinshensu'); - } - if(list.length){ - player.addAdditionalSkill('baobian',list); - } - }, - ai:{ - maixie:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(!target.hasFriend()) return; - if(target.hp>=4) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - chongzhen:{ - group:['chongzhen1','chongzhen2'], - audio:'chongzhen1', - ai:{ - combo:'ollongdan', - mingzhi:false, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ - if(get.attitude(target,player)<=0){ - if(current>0) return; - if(target.countCards('h')==0) return 1.6; - if(target.countCards('h')==1) return 1.2; - if(target.countCards('h')==2) return [0.8,0.2,0,-0.2]; - return [0.4,0.7,0,-0.7]; - } - } - }, - }, - } - }, - chongzhen1:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - if((event.card.name!='sha'&&event.card.name!='shan')||(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& - event.skill!='fanghun_shan'&&event.skill!='fanghun_sha'&&event.skill!='ollongdan')) return false; - var target=lib.skill.chongzhen1.logTarget(event,player); - return target&&target.countGainableCards(player,'h')>0; - }, - logTarget:function(event,player){ - if(event.card.name=='sha') return event.targets[0]; - return event.respondTo[0]; - }, - prompt2:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', - content:function(){ - var target=lib.skill.chongzhen1.logTarget(trigger,player); - player.gainPlayerCard(target,'h',true); - } - }, - chongzhen2:{ - audio:2, - trigger:{player:'respond'}, - filter:function(event,player){ - if(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& - event.skill!='fanghun_shan'&&event.skill!='fanghun_sha'&&event.skill!='ollongdan') return false; - return event.source&&event.source.countGainableCards(player,'h')>0; - }, - logTarget:'source', - prompt2:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', - content:function(){ - player.gainPlayerCard(trigger.source,'h',true); - } - }, - lihun:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.sex=='male'; - }, - filterCard:true, - position:'he', - content:function(){ - player.gain(target.getCards('h'),target,'giveAuto'); - player.turnOver(); - player.addSkill('lihun2'); - player.storage.lihun=target; - }, - check:function(card){return 8-get.value(card)}, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.classList.contains('turnedover')) return 10; - return 0; - }, - target:function(player,target){ - if(target.countCards('h')>target.hp) return target.hp-target.countCards('h'); - return 0; - } - }, - threaten:1.5, - effect:{ - target:function(card){ - if(card.name=='guiyoujie') return [0,2]; - } - } - }, - }, - lihun2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - audio:false, - content:function(){ - "step 0" - var cards=player.getCards('he'); - player.removeSkill('lihun2'); - if(player.storage.lihun.classList.contains('dead')||player.storage.lihun.hp<=0||cards.length==0){ - event.finish(); - } - else{ - if(cards.length0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - filterTarget:function(card,player,target){ - return target.isEmpty(get.subtype(card)); - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)-3; - }, - prompt:get.prompt2('yuanhu') - }); - "step 1" - if(result.bool){ - player.logSkill('yuanhu',result.targets); - var thisTarget=result.targets[0]; - var thisCard=result.cards[0]; - thisTarget.equip(thisCard); - event.target=thisTarget; - if(thisTarget!=player){ - player.$give(thisCard,thisTarget,false); - } - switch(get.subtype(thisCard)){ - case 'equip1':{ - if(!game.hasPlayer(function(current){ - return get.distance(thisTarget,current)<=1; - })){ - event.finish(); - return; - } - game.delay(); - player.chooseTarget(true,function(card,player,target){ - return get.distance(_status.event.thisTarget,target)<=1&&target.countCards('hej'); - }).set('ai',function(target){ - var attitude=get.attitude(_status.event.player,target); - if(attitude>0&&target.countCards('j')){ - return attitude*1.5; - } - return -attitude; - }).set('thisTarget',thisTarget); - return; - } - case 'equip2':{ - thisTarget.draw();event.finish(); - return; - } - case 'equip5':{ - event.finish(); - return; - } - default:{ - thisTarget.recover(); - event.finish(); - return; - } - } - } - else{ - event.finish(); - } - "step 2" - if(result.targets.length){ - player.discardPlayerCard(true,result.targets[0],'hej'); - } - }, - }, - tianming:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - check:function(event,player){ - var cards=player.getCards('h'); - if(cards.length<=2){ - for(var i=0;iplayers[1].hp&&players[0]!=player){ - players[0].chooseBool(get.prompt2('tianming')); - event.player=players[0]; - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - player.chooseToDiscard(2,true,'he'); - player.draw(2); - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha') return [1,0.5]; - } - } - } - }, - mizhao:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - selectCard:-1, - filterTarget:function(card,player,target){ - return player!=target; - }, - discard:false, - lose:false, - delay:false, - ai:{ - order:1, - result:{ - player:0, - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - if(player.countCards('h')>1){ - return 1; - } - var players=game.filterPlayer(); - for(var i=0;i0){ - return eff-10; - } - return eff; - }).set('target1',event.target1); - "step 2" - if(result.targets.length){ - event.target2=result.targets[0]; - event.target1.line(event.target2); - event.target1.chooseToCompare(event.target2); - } - else{ - event.finish(); - } - "step 3" - if(!result.tie){ - if(result.bool&&event.target1.canUse({name:'sha',isCard:true},event.target2,false)){ - event.target1.useCard({name:'sha',isCard:true},event.target2); - } - else if(event.target2.canUse({name:'sha',isCard:true},event.target1,false)){ - event.target2.useCard({name:'sha',isCard:true},event.target1); - } - } - } - }, - gongao:{ - audio:2, - trigger:{global:'dieAfter'}, - forced:true, - content:function(){ - player.gainMaxHp(); - player.recover(); - }, - ai:{ - threaten:1.5 - } - }, - juyi:{ - skillAnimation:true, - animationColor:'thunder', - audio:true, - derivation:['benghuai','weizhong'], - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - return player.maxHp>game.players.length&&player.hp0){ - player.draw(num); - } - player.addSkill('benghuai'); - player.addSkill('weizhong'); - player.storage.juyi=true; - player.awakenSkill('juyi'); - } - }, - weizhong:{ - audio:true, - trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']}, - forced:true, - content:function(){ - player.draw(); - } - }, - chixin:{ - group:['chixin1','chixin2'], - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return num+20; - } - }, - }, - trigger:{player:'shaBefore'}, - forced:true, - popup:false, - check:function(event,player){ - return player.countCards('h','sha')>0; - }, - filter:function(event,player){ - return _status.currentPhase==player; - }, - content:function(){ - var target=trigger.target; - if(target.hasSkill('chixin3')){ - target.storage.chixin++; - } - else{ - target.storage.chixin=1; - target.addTempSkill('chixin3','phaseUseEnd'); - } - } - }, - chixin1:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:{suit:'diamond'}, - position:'he', - viewAs:{name:'sha'}, - prompt:'将一张♦牌当杀使用或打出', - check:function(card){return 5-get.value(card)}, - ai:{ - respondSha:true, - } - }, - chixin2:{ - enable:['chooseToUse','chooseToRespond'], - filterCard:{suit:'diamond'}, - viewAs:{name:'shan'}, - position:'he', - prompt:'将一张♦牌当闪使用或打出', - check:function(card){return 5-get.value(card)}, - ai:{ - respondShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.8 - } - }, - } - }, - chixin3:{ - mod:{ - targetEnabled:function(card,player,target){ - if(card.name!='sha') return; - if(player==_status.currentPhase&&player.hasSkill('chixin')){ - var num=player.getCardUsable(card,true)-20; - var players=game.filterPlayer(); - for(var i=0;i1; - } - } - } - }, - suiren:{ - trigger:{player:'phaseZhunbeiBegin'}, - skillAnimation:true, - animationColor:'gray', - filter:function(event,player){ - return !player.storage.suiren; - }, - intro:{ - content:'limited', - }, - mark:true, - direct:true, - unique:true, - limited:true, - content:function(){ - "step 0" - var check=(player.hp==1||(player.hp==2&&player.countCards('h')<=1)); - player.chooseTarget(get.prompt2('suiren')).set('ai',function(target){ - if(!_status.event.check) return 0; - return get.attitude(_status.event.player,target); - }).set('check',check); - "step 1" - if(result.bool){ - player.storage.suiren=true; - player.awakenSkill('suiren'); - player.logSkill('suiren',result.targets); - player.removeSkill('yicong'); - player.gainMaxHp(); - player.recover(); - result.targets[0].draw(3); - } - } - }, - kuangfu:{ - trigger:{source:'damageSource'}, - direct:true, - audio:2, - filter:function(event){ - if(event._notrigger.contains(event.player)) return false; - return event.card&&event.card.name=='sha'&&event.player.countCards('e'); - }, - content:function(){ - "step 0" - var neg=get.attitude(player,trigger.player)<=0; - player.choosePlayerCard('e',trigger.player).set('ai',function(button){ - if(_status.event.neg){ - return get.buttonValue(button); - } - return 0; - }).set('neg',neg); - "step 1" - if(result.bool){ - player.logSkill('kuangfu'); - event.card=result.links[0]; - if(player.isEmpty(get.subtype(event.card))){ - player.chooseBool('是否将'+get.translation(event.card)+'置入自己的装备区?').ai=function(){ - return true; - }; - } - else event._result={bool:false}; - } - else event.finish(); - "step 2" - if(result.bool){ - trigger.player.$give(event.card,player,false); - player.equip(event.card); - } - else trigger.player.discard(event.card); - } - }, - "xinfu_lingren":{ - usable:1, - audio:2, - trigger:{ - player:"useCardToPlayered", - }, - direct:true, - filter:function (event,player){ - if(event.getParent().triggeredTargets3.length>1) return false; - if(!player.isPhaseUsing()) return false; - if(!['basic','trick'].contains(get.type(event.card))) return false; - if(get.tag(event.card,'damage')) return true; - return false; - }, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt2('xinfu_lingren'),function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return 2-get.attitude(_status.event.player,target); - }).set('targets',trigger.targets); - 'step 1' - if(result.bool){ - player.logSkill('xinfu_lingren',result.targets); - var target=result.targets[0]; - event.target=target; - event.choice={ - basic:false, - trick:false, - equip:false, - } - player.chooseBool('是否押基本牌?').ai=function(event,player){ - var rand=0.95; - if(!target.countCards('h',{type:['basic']})) rand=0.05; - if(!target.countCards('h')) rand=0; - return Math.random()0){ - target.addTempSkill('lingren_adddamage'); - target.storage.lingren={ - card:trigger.card, - //player:event.targett, - } - } - if(event.num>1) player.draw(2); - if(event.num>2){ - player.addTempSkill('lingren_jianxiong',{player:'phaseBegin'}); - player.addTempSkill('lingren_xingshang',{player:'phaseBegin'}); - } - }, - ai:{ - threaten:2.4, - }, - }, - "lingren_adddamage":{ - onremove:function (player){ - delete player.storage.lingren; - }, - trigger:{ - player:"damageBegin3", - }, - filter:function (event,player){ - var info=player.storage.lingren; - return event.card&&event.card==info.card; - }, - silent:true, - popup:false, - forced:true, - content:function (){ - trigger.num++; - }, - }, - "lingren_jianxiong":{ - audio:1, - trigger:{ - player:"damageEnd", - }, - content:function (){ - "step 0" - if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ - player.gain(trigger.cards,"gain2"); - } - player.draw("nodelay"); - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - if(get.tag(card,'damage')&&player!=target) return [1,0.6]; - }, - }, - }, - }, - "lingren_xingshang":{ - audio:1, - inherit:'rexingshang', - }, - "xinfu_fujian":{ - audio:2, - trigger:{ - player:"phaseJieshuBegin", - }, - filter:function (event,player){ - return !game.hasPlayer(function(current){ - return current.countCards('h')==0; - }); - }, - forced:true, - content:function (){ - event.num=0; - var list=game.filterPlayer(function(target){ - if(target.isMinHandcard()) event.num=target.countCards('h'); - return player!=target; - }); - if(event.num<1){ - event.finish(); - } - else{ - var target=list.randomGet(); - var cards=target.getCards('h').randomGets(event.num); - player.line(target); - var content=[get.translation(target)+'的部分手牌',cards]; - game.log(player,'观看了',target,'的部分手牌'); - player.chooseControl('ok').set('dialog',content); - } - }, - }, - "xinfu_xionghuo":{ - group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin","xinfu_xionghuo_init"], - subSkill:{ - begin:{ - audio:'xinfu_xionghuo', - logTarget:'player', - line:false, - forced:true, - trigger:{ - global:"phaseUseBegin", - }, - filter:function (event,player){ - return event.player.countMark('xionghuo')>0&&event.player!=player; - }, - content:function (){ - 'step 0' - trigger.player.removeMark('xionghuo',trigger.player.countMark('xionghuo')); - var list=[1,2,3]; - var num=list.randomGet(); - event.goto(num); - 'step 1' - player.line(trigger.player,'fire'); - trigger.player.damage('fire'); - if(!trigger.player.storage.xionghuo_disable) trigger.player.storage.xionghuo_disable=[]; - trigger.player.storage.xionghuo_disable.push(player); - trigger.player.addTempSkill('xionghuo_disable','phaseAfter'); - event.goto(4); - 'step 2' - player.line(trigger.player,'water'); - trigger.player.loseHp(); - trigger.player.addMark('xionghuo_low',1,false); - trigger.player.addTempSkill('xionghuo_low','phaseAfter'); - event.goto(4); - 'step 3' - player.line(trigger.player,'green'); - var card1=trigger.player.getCards('h').randomGet(); - var card2=trigger.player.getCards('e').randomGet(); - var list=[]; - if(card1) list.push(card1); - if(card2) list.push(card2); - if(list.length>0){ - player.gain(list,trigger.player,'giveAuto','bySelf'); - } - 'step 4' - game.delay(); - }, - }, - damage:{ - audio:"xinfu_xionghuo", - sub:true, - forced:true, - trigger:{ - source:"damageBegin1", - }, - filter:function (event,player){ - return event.player.countMark('xionghuo')>0; - }, - content:function (){ - trigger.num++; - }, - }, - init:{ - trigger:{ - global:"gameDrawAfter", - player:"enterGame", - }, - forced:true, - locked:false, - content:function(){ - player.addMark("xionghuo",3); - }, - }, - }, - audio:2, - enable:"phaseUse", - filter:function(event,player){ - return player.countMark('xionghuo')>0; - }, - filterTarget:function (card,player,target){ - if(target.hasMark('xionghuo')) return false; - return player!=target>0; - }, - content:function (){ - player.removeMark('xionghuo',1); - target.addMark('xionghuo',1); - }, - ai:{ - order:11, - result:{ - target:function (player,target){ - var mark=player.countMark('xionghuo'); - if(mark>2) return -1; - return Math.min(-(1+mark-target.hp),0); - }, - }, - threaten:1.1, - }, - }, - xionghuo:{ - marktext:"戾", - mark:true, - intro:{ - name:'暴戾', - content:"mark", - }, - locked:true, - }, - "xionghuo_disable":{ - mod:{ - playerEnabled:function (card,player,target){ - if(card.name=='sha'&&(player.storage.xionghuo_disable&&player.storage.xionghuo_disable.contains(target))) return false; - }, - }, - onremove:true, - charlotte:true, - mark:true, - marktext:"禁", - intro:{ - content:"本回合内不能对$使用【杀】", - }, - }, - "xionghuo_low":{ - mod:{ - maxHandcard:function (player,num){ - return num-player.countMark('xionghuo_low'); - }, - }, - marktext:"减", - mark:true, - onremove:true, - charlotte:true, - intro:{ - content:"本回合内手牌上限-#", - }, - }, - "xinfu_shajue":{ - audio:2, - trigger:{ - global:"dying", - }, - filter:function (event,player){ - return event.player.hp<0&&event.player!=player; - }, - forced:true, - //priority:7, - content:function (){ - if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){ - player.gain(trigger.parent.cards,"gain2"); - } - player.addMark('xionghuo',1); - }, - }, - "xinfu_jianjie":{ - derivation:["jianjie_faq"], - group:["xinfu_jianjie1","xinfu_jianjie2"], - audio:3, - trigger:{ - player:"phaseZhunbeiBegin", - }, - forced:true, - direct:true, - filter:function (event,player){ - if(player.phaseNumber>1) return false; - return !game.hasPlayer(function(current){ - return current.hasSkill('smh_huoji')||current.hasSkill('smh_lianhuan'); - }); - }, - content:function (){ - "step 0" - player.chooseTarget('请将「龙印」交给一名角色',true,function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var player=_status.event.player; - return 10+get.attitude(player,target); - }); - "step 1" - if(result.bool&&result.targets&&result.targets.length){ - var target=result.targets[0]; - player.logSkill('xinfu_jianjie',target); - player.line(target,'fire'); - target.addSkill('smh_huoji'); - game.delay(); - } - if(game.hasPlayer(function(current){ - return !current.hasSkill('smh_huoji')&¤t!=player - })){ - player.chooseTarget('请将「凤印」交给一名角色',true,function(card,player,target){ - return target!=player&&!target.hasSkill('smh_huoji'); - }).set('ai',function(target){ - var player=_status.event.player; - return 10+get.attitude(player,target); - }); - }else event.finish(); - "step 2" - if(result.bool&&result.targets&&result.targets.length){ - var target=result.targets[0]; - player.logSkill('xinfu_jianjie',target); - player.line(target,'green'); - target.addSkill('smh_lianhuan'); - game.delay(); - } - }, - }, - "xinfu_jianjie1":{ - audio:3, - prompt:"你的第一个准备阶段,你令两名不同的角色分别获得龙印与凤印;出牌阶段限一次(你的第一个回合除外),或当拥有龙印、凤印的角色死亡时,你可以转移龙印、凤印。", - enable:"phaseUse", - usable:1, - filter:function (event,player){ - if(player.phaseNumber==1) return false; - if(!game.hasPlayer(function(current){ - return current.hasSkill('smh_huoji')||current.hasSkill('smh_lianhuan'); - })) return false; - return true; - }, - filterTarget:function (card,player,target){ - if(ui.selected.targets.length==1){ - return true; - }else{ - return target.hasSkill('smh_huoji')||target.hasSkill('smh_lianhuan'); - } - }, - targetprompt:["移走印","得到印"], - selectTarget:2, - multitarget:true, - content:function (){ - 'step 0' - if(targets[0].hasSkill('smh_huoji')&&targets[0].hasSkill('smh_lianhuan')){ - player.chooseControl('龙印','凤印').set('prompt','请选择要移动的印'); - } - else{ - if(targets[0].hasSkill('smh_huoji')) event._result={control:'龙印'}; - else event._result={control:'凤印'}; - } - 'step 1' - if(result.control=='龙印'){ - targets[0].removeSkill('smh_huoji'); - targets[1].addSkill('smh_huoji'); - } - else{ - targets[0].removeSkill('smh_lianhuan'); - targets[1].addSkill('smh_lianhuan'); - } - }, - ai:{ - order:8, - result:{ - target:function (player,target){ - if(ui.selected.targets.length==0){ - return get.attitude(player,target)<0?-999:-3; - } - else{ - return target.countCards('h')+1; - } - }, - }, - expose:0.4, - threaten:3, - }, - }, - "smh_huoji":{ - charlotte:true, - group:["smh_yeyan"], - mark:true, - marktext:"龙", - intro:{ - name:"龙印", - content:"
  • 出牌阶段限三次,你可以将一张红色牌当【火攻】使用。
  • 若你同时拥有「凤印」,则你视为拥有技能〖业炎〗。(发动〖业炎〗后,弃置龙印和凤印)", - }, - usable:3, - audio:2, - enable:"chooseToUse", - position:"he", - filterCard:function (card){ - return get.color(card)=='red'; - }, - viewAs:{ - name:"huogong", - nature:"fire", - }, - viewAsFilter:function (player){ - if(player.hasSkill('huoji')) return false; - if(!game.hasPlayer(function(current){ - return current.hasSkill('xinfu_jianjie'); - })) return false; - if(!player.countCards('he',{color:'red'})) return false; - }, - prompt:"将一张红色牌当火攻使用", - check:function (card){ - var player=_status.currentPhase; - if(player.countCards('h')>player.hp){ - return 6-get.value(card); - } - return 4-get.value(card) - }, - }, - "smh_lianhuan":{ - audio:2, - charlotte:true, - enable:"phaseUse", - filter:function (event,player){ - if(player.hasSkill('lianhuan')||player.hasSkill('xinlianhuan')) return false; - if(!game.hasPlayer(function(current){ - return current.hasSkill('xinfu_jianjie'); - })) return false; - if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false; - return player.countCards('h',{suit:'club'})>0; - }, - filterCard:function (card){ - return get.suit(card)=='club'; - }, - viewAs:{ - name:"tiesuo", - }, - prompt:"将一张梅花牌当铁锁连环使用", - check:function (card){return 6-get.value(card)}, - mark:true, - marktext:"凤", - intro:{ - name:"凤印", - content:"
  • 出牌阶段限三次,你可以将你的任意一张梅花手牌当作【铁索连环】使用或重铸。", - }, - group:["smh_lianhuan1"], - }, - "xinfu_jianjie2":{ - trigger:{ - global:"dieAfter", - }, - forced:true, - direct:true, - silent:true, - popup:false, - filter:function (event,player){ - return event.player.hasSkill('smh_huoji')||event.player.hasSkill('smh_lianhuan'); - }, - content:function (){ - "step 0" - player.logSkill('xinfu_jianjie'); - "step 1" - if(trigger.player.hasSkill('smh_huoji')){ - player.chooseTarget('请将'+get.translation(trigger.player)+'的「龙印」交给一名角色',true).set('ai',function(target){ - var player=_status.event.player; - return 10+get.attitude(player,target); - }); - }else event.goto(2); - "step 2" - if(result.bool&&result.targets&&result.targets.length){ - var target=result.targets[0]; - player.line(target,'fire'); - target.addSkill('smh_huoji'); - game.delay(); - } - "step 3" - if(trigger.player.hasSkill('smh_lianhuan')){ - player.chooseTarget('请将'+get.translation(trigger.player)+'的「凤印」交给一名角色',true).set('ai',function(target){ - var player=_status.event.player; - return 10+get.attitude(player,target); - }); - }else event.finish(); - "step 4" - if(result.bool&&result.targets&&result.targets.length){ - var target=result.targets[0]; - player.line(target,'green'); - target.addSkill('smh_lianhuan'); - game.delay(); - } - }, - }, - "smh_lianhuan1":{ - enable:"phaseUse", - filter:function (event,player){ - if(player.hasSkill('lianhuan')||player.hasSkill('xinlianhuan')) return false; - if(!game.hasPlayer(function(current){ - return current.hasSkill('xinfu_jianjie'); - })) return false; - if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false; - return player.countCards('h',{suit:'club'})>0; - }, - filterCard:function (card){ - return get.suit(card)=='club'; - }, - check:function (card){ - return -1; - }, - content:function (){ - player.draw(); - }, - discard:false, - loseTo:'discardPile', - prompt:"将一张梅花牌置入弃牌堆并摸一张牌", - delay:0.5, - prepare:function (cards,player){ - player.$throw(cards,1000); - }, - ai:{ - basic:{ - order:1, - }, - result:{ - player:1, - }, - }, - forced:true, - }, - "smh_yeyan":{ - unique:true, - enable:"phaseUse", - audio:3, - skillAnimation:true, - animationColor:'gray', - prompt:"限定技,出牌阶段,你可以对一至三名角色造成至多共3点火焰伤害(你可以任意分配每名目标角色受到的伤害点数),若你将对一名角色分配2点或更多的火焰伤害,你须先弃置四张不同花色的手牌再失去3点体力。", - filter:function (event,player){ - if(!game.hasPlayer(function(current){ - return current.hasSkill('xinfu_jianjie'); - })) return false; - return player.hasSkill('smh_lianhuan'); - }, - filterTarget:function (card,player,target){ - var length=ui.selected.cards.length; - return (length==0||length==4); - }, - filterCard:function (card){ - var suit=get.suit(card); - for(var i=0;i1){ - player.chooseCardButton('【称好】:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ - if(ui.selected.buttons.length==0) return 1; - return 0; - }); - } - else if(event.cards.length==1){ - event._result={links:event.cards.slice(0),bool:true}; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - for(var i=0;i0){ - return att/(1+target.countCards('h')); - } - else{ - return att/100; - } - }).set('enemy',get.value(event.togive[0],player,'raw')<0); - } - "step 3" - if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); - player.line(result.targets[0],'green'); - game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); - event.goto(1); - } - }, - }, - "jianjie_faq":{}, - "xinfu_wuniang":{ - trigger:{ - player:["useCard","respond"], - }, - audio:2, - direct:true, - filter:function (event,player){ - return event.card.name=='sha'; - }, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt('xinfu_wuniang'),'获得一名其他角色的一张牌,然后其和场上所有的“关索”摸一张牌。',function(card,player,target){ - if(player==target) return false; - return target.countGainableCards(player,'he')>0; - }).set('ai',function(target){ - return 10-get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('xinfu_wuniang',target); - player.line(target,'fire'); - event.draws=game.filterPlayer(function(current){ - if(current==target) return true; - return ['guansuo','old_guansuo'].contains(current.name)||['guansuo','old_guansuo'].contains(current.name2); - }); - player.gainPlayerCard(target,'he',true); - } - else event.finish(); - 'step 2' - game.asyncDraw(event.draws,1); - game.delay(); - }, - }, - "xinfu_xushen":{ - derivation:["xinfu_zhennan"], - audio:2, - subSkill:{ - count:{ - trigger:{ - player:"recoverBegin", - }, - forced:true, - silent:true, - popup:false, - filter:function (event,player){ - if(!event.card||event.card.name!='tao') return false; - if(!event.source||event.source.sex!='male') return false; - if(!player.isDying()) return false; - if(game.hasPlayer(function(current){ - return current.name=='guansuo'||current.name2=='guansuo'; - })) return false; - return true; - }, - content:function (){ - trigger.xinfu_xushen=true; - }, - sub:true, - }, - }, - group:["xinfu_xushen_count"], - trigger:{ - player:"recoverAfter", - }, - limited:true, - init:function (player){ - player.storage.xinfu_xushen=false; - }, - filter:function (event,player){ - if(player.storage.xinfu_xushen) return false; - if(player.isDying()) return false; - return event.xinfu_xushen==true; - }, - direct:true, - skillAnimation:true, - animationColor:'fire', - content:function (){ - "step 0" - trigger.source.chooseBool('【许身】:是否将自己的一张武将牌替换为“关索”?').set('ai',function(){ - return false; - }); - "step 1" - if(result.bool){ - player.awakenSkill('xinfu_xushen'); - player.logSkill('xinfu_xushen',trigger.source); - if(trigger.source.name2!=undefined){ - trigger.source.chooseControl(trigger.source.name,trigger.source.name2).set('prompt','请选择要更换的武将牌'); - }else event._result={control:trigger.source.name}; - } - else event.finish(); - "step 2" - trigger.source.reinit(result.control,'guansuo'); - if(_status.characterlist){ - _status.characterlist.add(result.control); - _status.characterlist.remove('guansuo'); - } - player.recover(); - player.addSkill('xinfu_zhennan'); - }, - mark:true, - intro:{ - content:"limited", - }, - }, - - "xinfu_falu":{ - subSkill:{ - spade:{ - marktext:'♠︎️', - intro:{ - name:'紫薇', - content:'mark', - }, - }, - heart:{ - marktext:'♥︎️', - intro:{ - name:'玉清', - content:'mark', - }, - }, - club:{ - marktext:'♣︎️', - intro:{ - name:'后土', - content:'mark', - }, - }, - diamond:{ - marktext:'♦︎', - intro:{ - name:'勾陈', - content:'mark', - }, - }, - }, - forced:true, - audio:2, - trigger:{ - player:["loseAfter","enterGame"], - global:"gameDrawAfter", - }, - filter:function (event,player){ - if(event.name!='lose') return true; - if(event.type!='discard') return false; - for(var i=0;i0){ - if(results>0){ - if(resulth>results) return '红桃5'; - return '黑桃5'; - } - else if(resulth>0) return '红桃5'; - return '取消'; - } - else{ - if(results<0){ - if(resulth=0) return false; - if(event.player.hasSkillTag('filterDamage',null,{ - player:player, - card:event.card, - })) return false; - return player.hasMark('xinfu_falu_spade')||get.color(ui.cardPile.firstChild)=='black'; - }, - prompt2:function(event){ - return '弃置「玉清♥」标记,然后进行判定。若结果为黑色,则对'+get.translation(event.player)+'即将造成的伤害+1。'; - }, - logTarget:"player", - content:function (){ - "step 0" - player.removeMark('xinfu_falu_heart') - player.judge(function(card){ - if(get.color(card)=='black') return 4; - return -1; - }); - "step 1" - if(result.bool==true){ - trigger.num++; - } - }, - }, - "xinfu_zhennan":{ - audio:2, - trigger:{ - target:"useCardToTargeted", - }, - filter:function (event,player){ - return event.card.name=='nanman'; - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget(get.prompt('xinfu_zhennan'),'对一名其他角色造成1-3点随机伤害',function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - "step 1" - if(result.bool&&result.targets&&result.targets.length){ - game.delay(); - player.logSkill('xinfu_zhennan',result.targets); - var num=[1,2,3,1,1,2].randomGet(); - if(get.isLuckyStar(player)) num=3; - player.line(result.targets[0],'fire'); - result.targets[0].damage(num); - } - }, - ai:{ - expose:0.25, - }, - }, - "xinfu_yanyu":{ - trigger:{ - global:"phaseUseBegin", - }, - direct:true, - filter:function (event,player){ - return player.countCards('he')>0; - }, - content:function (){ - 'step 0' - player.chooseToDiscard(get.prompt('xinfu_yanyu'),get.translation('xinfu_yanyu_info'),'he').set('ai',function(card){ - var map=_status.event.goon; - var type=get.type(card,'trick'); - if(!map[type]) return -1; - return map[type]-get.value(card); - }).set('logSkill','xinfu_yanyu').set('goon',function(){ - var map={ - basic:0, - trick:0.1, - }; - var hs=trigger.player.getCards('h'); - var sha=false; - var jiu=false; - for(var i=0;i=3) return false; - //var evt=event.getParent(); - //if(evt&&(evt.name=='useCard'||evt.name=='respond')) return false; - var type=player.storage.xinfu_yanyu; - var cards=event.cards; - for(var i=0;i=3) event.finish(); - else player.chooseCardButton(event.cards,'【燕语】:是否将其中的一张牌交给一名角色?').ai=function(card){ - if(card.name=='du') return 10; - return get.value(card); - }; - 'step 2' - if(result.bool){ - player.storage.xinfu_yanyu2++; - if(!event.logged){ - player.logSkill('xinfu_yanyu'); - player.addExpose(0.25); - event.logged=true; - } - event.togain=result.links[0]; - event.cards.remove(event.togain); - player.chooseTarget(true,'请选择要获得'+get.translation(event.togain)+'的角色').set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - var card=_status.event.card; - var val=get.value(card); - if(target==_status.currentPhase&&target.hasValueTarget(card)) att=att*2; - return att*val; - }).set('card',event.togain); - } - else event.finish(); - 'step 3' - var target=result.targets[0]; - player.line(target,'green'); - target.gain(event.togain,'gain2'); - if(event.cards.length) event.goto(1); - }, - }, - "xinfu_xiaode":{ - subSkill:{ - remove:{ - unique:true, - charlotte:true, - trigger:{ - player:"phaseAfter", - }, - forced:true, - popup:false, - content:function (){ - player.removeAdditionalSkill('xinfu_xiaode'); - player.removeSkill('xinfu_xiaode_remove'); - }, - }, - }, - trigger:{ - global:"dieAfter", - }, - direct:true, - filter:function (skill,event){ - return !event.hasSkill('xinfu_xiaode_remove'); - }, - content:function (){ - 'step 0' - var list=[]; - var listm=[]; - var listv=[]; - if(trigger.player.name1!=undefined) listm=lib.character[trigger.player.name1][3]; - else listm=lib.character[trigger.player.name][3]; - if(trigger.player.name2!=undefined) listv=lib.character[trigger.player.name2][3]; - listm=listm.concat(listv); - var func=function(skill){ - var info=get.info(skill); - if(info.charlotte||info.zhuSkill||(info.unique&&!info.limited)) return false; - return true; - }; - for(var i=0;i觉醒技 当你使用或打出基本牌时,若你已经已累计发动过3次【翊赞】,你将【翊赞】改为“你可以将一张基本牌当任意基本牌牌使用或打出”。", - wuniang:"武娘", - wuniang_info:"你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后该角色摸一张牌;若“关索”在场,你可令“关索”也摸一张牌", - zhennan:"镇南", - zhennan_info:"当你成为【南蛮入侵】的目标时,你可令一名其他角色随机受到一至三点伤害", - xushen:"许身", - xushen_info:"当其他男性角色令你脱离濒死状态时,若“关索”不在场,其可以选择是否用“关索”替换其武将牌,然后你回复一点体力并获得技能【镇南】", - - wanwei:'挽危', - wanwei_info:'当你因被其他角色获得或弃置而失去牌时,你可以改为自己选择失去的牌。', - yuejian:'约俭', - yuejian_info:'一名角色的弃牌阶段开始时,若其本回合内使用过的牌数小于X,则你可以令其本回合的手牌上限+X。(X为其的体力上限)', - gzjili:'蒺藜', - gzjili_info:'当你于一回合内使用或打出第X张牌时,你可以摸X张牌(X为你的攻击范围)。', - xiongsuan:'凶算', - xiongsuan_info:'限定技,出牌阶段,你可以弃置一张手牌并选择一名角色,对其造成1点伤害,然后你摸三张牌。若该角色有已发动的限定技,则你选择其中一个限定技。此回合结束后,视为该限定技未发动过。', - diaodu:"调度", - diaodu_info:"当你使用装备牌时,你可以摸一张牌;出牌阶段开始时,你可以获得一名其他角色装备区里的一张牌,然后你可以将此牌交给另一名角色。", - diancai:'典财', - diancai_info:'其他角色的出牌阶段结束时,若你于此阶段失去了X张或更多的牌,则你可以将手牌摸至体力上限。(X为你的体力值)', - zhengbi:'征辟', - zhengbi_info:'出牌阶段开始时,你可以选择一项:选择一名未受伤的其他角色,你对其使用的牌无距离限制且不计入使用次数直到回合结束;或将一张基本牌交给一名其他角色,然后其交给你一张非基本牌或两张基本牌。', - fengying:'奉迎', - fengying_info:'限定技,出牌阶段,你可以弃置所有手牌。若如此做,你可以令等量的角色将手牌摸至X张(X为其体力上限且至多为5)。然后,你结束出牌阶段,并在当前回合结束后进行一个新的回合。', - - qingzhong:'清忠', - qingzhongx:'清忠', - qingzhongx_info:'出牌阶段开始时,你可以摸两张牌,若如此做,此阶段结束时,你与手牌数最少的角色交换手牌。', - weijing:'卫境', - weijing_info:'每轮限一次,当你需要使用【杀】或【闪】时,你可以视为使用一张【杀】或【闪】。', - zishu:'自书', - zishu_info:'锁定技,你的回合外,你获得的牌均会在当前回合结束后置入弃牌堆;你的回合内,当你不因〖自书〗而获得牌时,你摸一张牌。', - yingyuan:'应援', - yingyuan_info:'当你于回合内使用的牌结算完成后,你可以将其交给一名其他角色(相同牌名的牌每回合限一次)。', - xinyingyuan:'应援', - xinyingyuan_info:'当你于回合内使用一张牌后,你可以令一名其他角色从牌堆获得一张与该牌类型相同的牌(每种类型的牌每回合限一次)。', - qianya:'谦雅', - qianya_info:'当你成为锦囊牌的目标后,你可以将任意张手牌交给一名其他角色。', - shuimeng:'说盟', - shuimeng_info:'出牌阶段结束时,你可以与一名角色拼点,若你赢,视为你使用【无中生有】;若你没赢,视为其对你使用【过河拆桥】。', - xianfu:'先辅', - xianfu2:'先辅', - xianfu2_bg:'辅', - xianfu_info:'锁定技,游戏开始时,你选择一名其他角色,当其受到伤害后,你受到等量的伤害,当其回复体力后,你回复等量的体力。', - chouce:'筹策', - chouce_info:'当你受到1点伤害后,你可以判定,若结果为:黑色,你弃置一名角色区域里的一张牌;红色,你选择一名角色,其摸一张牌,若其是〖先辅〗选择的角色,改为其摸两张牌。', - fuqi:'伏骑', - fuqi_info:'锁定技,当你使用牌时,你令所有与你距离为1的其他角色不能使用或打出牌响应此牌。', - jiaozi:'骄恣', - jiaozi_info:'锁定技,若你的手牌数为全场唯一最多,则当你造成或受到伤害时,此伤害+1。', - wy_meirenji:'美人计', - wy_meirenji_info:'出牌阶段,对一名有手牌的其他男性角色使用。每名女性角色各获得其一张手牌并将一张手牌交给你,然后比较你与其的手牌数,手牌少的角色对手牌多的角色造成1点伤害。', - wy_xiaolicangdao:'笑里藏刀', - wy_xiaolicangdao_info:'出牌阶段,对一名其他角色使用。该角色摸X张牌(X为其已损失的体力值且至多为5),然后你对其造成1点伤害。', - weikui:'伪溃', - weikui2:'伪溃', - weikui_info:'出牌阶段限一次,你可以失去1点体力并选择一名有手牌的其他角色,你观看其手牌:若其手牌中有【闪】,则视为你对其使用【杀】,且本回合你计算与其的距离视为1;若其手牌中没有【闪】,你弃置其中一张牌。', - lizhan:'励战', - lizhan_info:'结束阶段,你可以令任意名已受伤的角色摸一张牌。', - wylianji:'连计', - wylianji_info:'出牌阶段限一次,你可以展示一张【杀】或黑色锦囊牌,并令一名其他角色将牌堆中的随机一张武器牌置入装备区(可替换原装备)。然后该角色选择一项:1.对除你以外的角色使用该牌,并将装备区里的武器牌交给该牌的一个目标角色;2.令你对其使用此牌,然后获得此牌,并将装备区内的武器牌交给你。', - // from here - moucheng:'谋逞', - moucheng_info:'觉醒技,当其他角色使用因〖连计〗交给其的牌累计造成伤害达到3点后,你失去技能〖连计〗,然后获得技能〖矜功〗', - jingong:'矜功', - jingong2:'矜功', - jingong_backup:'矜功', - jingong_info:'出牌阶段限一次,你可以将一张装备牌或【杀】当做一张随机锦囊牌使用(三选一,其中一张为【美人计】或【笑里藏刀】),然后本回合的结束阶段,若你于本回合内未造成过伤害,你失去1点体力', - fenyue:'奋钺', - fenyue2:'奋钺', - fenyue2_bg:'钺', - fenyue_info:'出牌阶段限X次,你可以与一名角色拼点,若你赢,你选择一项:1.令其不能使用或打出手牌直到回合结束;2.视为你对其使用了【杀】(不计入次数限制)。若你没赢,你结束出牌阶段。(X为存活的忠臣数)', - - huoshui:'祸水', - huoshui_info:'出牌阶段,你可以明置此武将牌:你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌。', - qingcheng:'倾城', - qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', - zhuoshui:'祸水', - zhuoshui_info:'锁定技,准备阶段,你令所有其他角色的非锁定技失效直到回合结束。', - zqingcheng:'倾城', - zqingcheng_info:'出牌阶段,你可以弃置一张装备牌,然后令一名角色翻面并摸两张牌。', - zfengshi:'锋矢', - zfengshi_info:'当你使用【杀】指定目标后,你可以令目标弃置装备区内的一张牌。', - chuanxin:'穿心', - chuanxin_info:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能。', - chuanxin_info_guozhan:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将。', - hengjiang:'横江', - hengjiang2:'横江', - hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌。', - rehengjiang:'横江', - rehengjiang2:'横江', - rehengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸X张牌(X为你本回合内对其发动过〖横江〗的次数)。', - shuangren:'双刃', - shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对任意一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你结束出牌阶段。', - shuangren_info_guozhan:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你结束出牌阶段。', - xiashu:'下书', - xiashu_info:'出牌阶段开始时,你可以将所有手牌交给一名其他角色,然后该角色亮出任意数量的手牌(至少一张)。你选择一项:1.获得其亮出的手牌;2.获得其未亮出的手牌。', - kuanshi:'宽释', - kuanshi2:'宽释', - kuanshi_info:'结束阶段,你可以选择一名角色。直到你的下回合开始,该角色第一次受到大于1的伤害时,防止此伤害,然后你跳过下个回合的摸牌阶段。', - bingzheng:'秉正', - bingzheng_info:'出牌阶段结束时,你可以令手牌数不等于体力值的一名角色弃置一张手牌或摸一张牌。然后若其手牌数等于体力值,你摸一张牌,且可以交给该角色一张牌。', - sheyan:'舍宴', - sheyan_info:'当你成为普通锦囊牌的目标时(【借刀杀人】等带有指向目标的锦囊除外),你可以为此牌增加一个目标或令其对其中一个目标无效。(有效目标数至少为一)', - fuman:'抚蛮', - fuman2:'抚蛮', - fuman_info:'出牌阶段,你可以将一张【杀】交给一名本回合未获得过〖抚蛮〗牌的其他角色,其于下个回合结束之前使用〖抚蛮〗牌时,你摸一张牌。', - qizhou:'绮胄', - qizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上:〖马术〗;2种或以上:〖英姿〗;3种或以上:〖短兵〗;4种:〖奋威〗。', - shanxi:'闪袭', - shanxi_info:'出牌阶段限一次,你可以弃置一张红色基本牌,然后弃置攻击范围内的一名其他角色的一张牌。若弃置的牌是【闪】,你观看其手牌,若弃置的不是【闪】,其观看你的手牌。', - duanbing:'短兵', - duanbing_info:'当你使用【杀】选择目标后,你可以令一名距离为1的其他角色也成为此牌的目标。', - fanghun:'芳魂', - fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得X个“梅影”标记(X为伤害点数);你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', - refanghun:'芳魂', - refanghun_info:'当你使用【杀】或成为【杀】的目标后,你获得1个“梅影”标记;你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', - fanghun_sha:'龙胆', - fuhan:'扶汉', - fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至少为2,至多为8),然后回复1点体力。', - refuhan:'扶汉', - refuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,获得其中一张武将牌上的所有技能。', - yjixi:'觊玺', - yjixi_info:'觉醒技,结束阶段,若你连续三回合没有因〖庸肆〗而失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。', - xinyongsi:'庸肆', - xinyongsi1:'庸肆', - xinyongsi2:'庸肆', - xinyongsi_info:'锁定技,摸牌阶段,你令额定摸牌数改为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力。', - xiehui:'黠慧', - xiehui2:'黠慧', - xiehui_info:'锁定技,你的黑色牌不计入手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值减少为止。', - lianzhu:'连诛', - lianzhu_info:'出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若此牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌', - zhaolie:'昭烈', - zhaolie_info:'摸牌阶段摸牌时,你可以少摸一张牌并指定攻击范围内的一名角色。你展示牌堆顶的三张牌,将其中的非基本牌和【桃】置于弃牌堆,然后该角色选择一项:1.你对其造成X点伤害,然后其获得这些基本牌;2.其弃置X张牌,然后你获得这些基本牌。(X为其中非基本牌的数量)', - shichou:'誓仇', - shichou2:'誓仇', - shichou_info:'主公技,限定技,准备阶段,你可指定一名蜀势力角色并交给其两张牌。本局游戏中,当你受到伤害时,改为该角色受到等量的伤害并摸等量的牌,直至该角色第一次进入濒死状态。', - shanjia:'缮甲', - shanjia_info:'出牌阶段开始时,你可以摸X张牌,然后弃置等量的牌。若你以此法弃置了装备区内的牌,则你可以视为使用一张【杀】。(X为你于本局游戏内使用过的装备牌数且最大为7)', - tuifeng:'推锋', - tuifeng2:'推锋', - tuifeng_info:'1.当你受到1点伤害后,你可以将一张牌置于武将牌上,称为“锋”。2.准备阶段开始时,若你的武将牌上有“锋”,你移去所有“锋”,摸2X张牌,然后你于此回合的出牌阶段内使用【杀】的次数上限+X。(X为你此次移去的“锋”数)', - ziyuan:'资援', - ziyuan_info:'出牌阶段限一次,你可以将任意张点数之和为13的手牌交给一名其他角色,然后该角色回复1点体力。', - jugu:'巨贾', - jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', - hongde:'弘德', - hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌。', - dingpan:'定叛', - dingpan_info_identity:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的反贼数)', - dingpan_info_versus:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的敌方角色数)', - dingpan_info:'出牌阶段限一次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。', - weidi:'伪帝', - weidi_info:'锁定技,你视为拥有当前主公的主公技。', - juesi:'决死', - juesi_info:'出牌阶段,你可以弃置一张【杀】并选择攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是【杀】且你的体力值不大于该角色,你视为对其使用【决斗】。', - zhenlue:'缜略', - zhenlue_info:'锁定技,你使用的普通锦囊牌不能被【无懈可击】响应;你不能成为延时锦囊牌的目标。', - jianshu:'间书', - jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去一点体力。', - yongdi:'拥嫡', - yongdi_info:'限定技,准备阶段开始时,你可令一名其他男性角色增加一点体力上限并回复1点体力,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技。', - gushe:'鼓舌', - gushe_bg:'舌', - gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。', - jici:'激词', - jici_info:'当你因发动〖鼓舌〗而扣置的拼点牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动〖鼓舌〗的次数上限+1。(X为你“饶舌”标记的数量)', - shefu:'设伏', - shefu_bg:'伏', - shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为「伏兵」。然后为「伏兵」记录一个基本牌或锦囊牌的名称(须与其他「伏兵」记录的名称均不同)。你的回合外,当有其他角色使用与你记录的「伏兵」牌名相同的牌时,你可以取消此牌的所有目标,然后移去该「伏兵」', - benyu:'贲育', - benyu2:'贲育', - benyu_info:'当你受到伤害后,若你的手牌数不大于伤害来源的手牌数,你可以将手牌摸至与伤害来源手牌数相同(至多摸至5张);否则你可以弃置大于伤害来源手牌数的手牌,然后对其造成1点伤害。', - zhidao:'雉盗', - zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标。', - jili:'寄篱', - jili_info:'锁定技,当一名其他角色成为红色基本牌或红色普通锦囊牌的目标时,若其与你的距离为1且你既不是此牌的使用者也不是目标,你也成为此牌的目标。', - luanzhan:'乱战', - luanzhan_info:'你使用【杀】或黑色普通锦囊牌可以额外选择X名角色为目标;当你使用【杀】或黑色普通锦囊牌指定目标后,若此牌的目标角色数小于X,则X减至0。(X为你于本局游戏内造成过伤害的次数)', - zhengnan:'征南', - zhengnan_info:'其他角色死亡后,你可以摸三张牌并获得下列技能中的任意一个:〖武圣〗、 〖当先〗和〖制蛮〗。', - xinzhengnan:'征南', - xinzhengnan_info:'锁定技,当一名角色进入濒死状态时,若你未因其发动过〖征南〗,则你回复1点体力并摸一张牌并获得下列技能中的任意一个:〖武圣〗、 〖当先〗和〖制蛮〗(若技能全部拥有则改为摸三张牌。你以此法获得的〖当先〗结算时视为已发动过〖伏枥〗)。', - xiefang:'撷芳', - xiefang_info:'锁定技,你计算与其他角色的距离时-X。(X为女性角色数)', - qizhi:'奇制', - qizhi_info:'当你于回合内使用基本牌或锦囊牌指定目标后,你可以弃置不是此牌目标的一名角色的一张牌。若如此做,其摸一张牌。', - jinqu:'进趋', - jinqu_info:'结束阶段开始时,你可以摸两张牌,若如此做,你将手牌弃置至X张。(X为你于此回合发动过〖奇制〗的次数)', - tanhu:'探虎', - tanhu2:'探虎', - tanhu3:'探虎', - tanhu_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,你获得以下效果直到回合结束:你与该角色的距离为1,你对该角色使用的普通锦囊牌不能被【无懈可击】响应。', - mouduan:'谋断', - mouduan_info:'游戏开始时,你获得标记“武”并获得技能〖激昂〗和〖谦逊〗。当你失去手牌后,若手牌数不大于2,你须将你的标记变为“文”,将这两项技能改为〖英姿〗和〖克己〗。一名角色的回合开始前,你可弃一张牌将标记翻回。', - jiqiao:'机巧', - jiqiao_info:'出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶两倍数量的牌并获得其中的非装备牌。', - linglong:'玲珑', - linglong_info:'锁定技,若你的装备区没有武器牌,则你使用【杀】的次数上限+1;若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,则你视为拥有技能〖奇才〗。', - fenyong:'愤勇', - fenyong2:'愤勇', - fenyong2_bg:'勇', - fenyong_info:'每当你受到一次伤害后,你可以获得一枚「愤勇」标记;当你拥有「愤勇」标记时,防止你受到的所有伤害。', - xuehen:'雪恨', - xuehen_info:'每个角色的结束阶段开始时,若你有愤勇标记,你弃置之,然后选择一项:1.弃置当前回合角色X张牌(X为你已损失的体力值);2.视为对一名任意角色使用一张【杀】。', - zhenwei:'镇卫', - zhenwei2:'镇卫', - zhenwei_info:'当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌。', - jie:'嫉恶', - jie_info:'锁定技,当你使用红色【杀】造成伤害时,此伤害+1。', - dahe:'大喝', - dahe2:'大喝', - dahe2_bg:'喝', - dahe_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,该角色不能使用或打出不为♥花色的【闪】直到回合结束,且你可将该角色拼点的牌交给场上一名体力不多于你的角色。若你没赢,你须展示手牌并弃置其中的一张。', - yinling:'银铃', - yinling_bg:'锦', - yinling_info:'出牌阶段,若你的“锦”小于四张,你可以弃置一张黑色牌并指定一名其他角色。若如此做,你将其的一张牌置于你的武将牌上,称为“锦”。', - junwei:'军威', - junwei2:'军威', - junwei_info:'结束阶段开始时,你可以移去三张“锦”。若如此做,你须指定一名角色并令其选择一项:1.展示一张【闪】,然后你将此【闪】交给一名其他角色。2.该角色失去1点体力,然后你将其装备区内的一张牌移出游戏。该角色的回合结束后,将以此法移出游戏的装备牌移回原处。', - yanxiao:'言笑', - yanxiao2:'言笑', - yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的武将牌上。武将牌上有〖言笑〗牌的角色下个判定阶段开始时,获得〖言笑〗牌及其判定区里的所有牌。', - anxian:'安娴', - anxian_info:'当你使用【杀】对目标角色造成伤害时,你可以防止此伤害,令其弃置一张手牌,然后你摸一张牌;当你成为【杀】的目标后,你可以弃置一张手牌,令此【杀】对你无效,然后此【杀】的使用者摸一张牌。', - xingwu:'星舞', - xingwu_info:'弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌', - luoyan:'落雁', - luoyan_info:'锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”', - yinbing:'引兵', - yinbing_info:'结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张「引兵」牌。', - juedi:'绝地', - juedi_info:'锁定技,准备阶段,若你的武将牌上有「引兵」牌,你选择一项:1.移去「引兵」牌,将手牌补至体力上限数;2.将「引兵」牌交给一名体力值不大于你的其他角色,其回复1点体力并摸等量的牌。', - kuangfu:'狂斧', - kuangfu_info:'当你使用【杀】造成伤害时,你可以选择一项:弃置其装备区内的一张牌,或将其装备区内的一张牌移动到你的装备区内。', - xintan:'心惔', - xintan_info:'出牌阶段限一次,你可以移去两张「焚」并选择一名角色,该角色失去一点体力。', - fentian:'焚天', - fentian_info:'锁定技,结束阶段开始时,若你的手牌数少于体力值,你须选择一名攻击范围内的角色,将其一张牌置于你的武将牌上,称为「焚」。锁定技,你的攻击范围+X(X为「焚」的数量)', - zhiri:'炙日', - zhiri_info:'觉醒技,准备阶段开始时,若你的「焚」的数量不小于3,你减1点体力上限,然后获得技能〖心惔〗', - meibu:'魅步', - meibu_info:'其他角色的出牌阶段开始时,若你不在其攻击范围内,你可以令该角色的锦囊牌均视为【杀】,直到该角色以此法使用了一张【杀】或回合结束。若如此做,则直到回合结束,视为你在其攻击范围内。', - mumu:'穆穆', - mumu_info:'出牌阶段限一次,你可以弃置一张【杀】或黑色锦囊牌,然后选择一项:弃置场上的一张武器牌,然后摸一张牌;或将场上的一张防具牌移动到你的装备区里(可替换原防具)。', - zhanyi:'战意', - zhanyi_basic_sha:'战杀', - zhanyi_basic_jiu:'战酒', - zhanyi_basic_tao:'战桃', - zhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作【杀】、【酒】或【桃】使用;锦囊牌,摸两张牌且你使用的牌无距离限制;装备牌,你使用【杀】指定目标角色后,其弃置两张牌。', - nuzhan:'怒斩', - nuzhan2:'怒斩', - nuzhan_info:'锁定技,你使用的由一张锦囊牌转化的【杀】不计入出牌阶段的次数限制;锁定技,你使用的由一张装备牌转化的【杀】的伤害值基数+1', - danji:'单骑', - danji_info:'觉醒技,准备阶段开始时,若你的手牌数大于你的体力值且本局游戏的主公不为刘备,你减1点体力上限,然后获得〖马术〗和〖怒斩〗', - jieyuan:'竭缘', - jieyuan_more:'竭缘', - jieyuan_less:'竭缘', - jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌,令此伤害+1;当你受到一名其他角色造成的伤害时,若其体力值大于或等于你的体力值,你可弃置一张红色手牌,令此伤害-1。', - fenxin:'焚心', - fenxin_old:'焚心', - fenxin_info:'锁定技,一名其他角色死亡后,若其身份为:忠臣,你本局内发动〖竭缘〗减少伤害时无视体力值限制;反贼,你本局内发动〖竭缘〗增加伤害时无视体力值限制;内奸,你本局内选择发动〖竭缘〗的牌时无颜色限制。', - fenxin_old_info:'限定技,当你杀死一名非主公角色时,你可以与其交换未翻开的身份牌。(你的身份为主公时不能发动此技能)', - qingyi:'轻逸', - qingyi1:'轻逸', - qingyi2:'轻逸', - qingyi_info:'你可以跳过判定阶段和摸牌阶段。若如此做,视为对一名角色使用了一张无距离限制的【杀】。', - xiandeng:'先登', - xiandeng_info:'锁定技,出牌阶段,你使用的第一张【杀】不计入次数且无距离限制。', - shulv:'熟虑', - shulv_info:'出牌阶段限一次,若你的手牌数大于体力值,则你可以弃置一张牌并摸一张牌。', - xisheng:'牺牲', - xisheng_info:'每名其他角色的回合限一次,你可以将两张牌当做【桃】使用。', - yuhua:'羽化', - yuhua_info:'锁定技,弃牌阶段内,你的非基本牌不计入手牌上限。', - qirang:'祈禳', - qirang_info:'当有装备牌进入你的装备区时,你可以随机获得牌堆中的一张锦囊牌。', - biluan:'避乱', - biluan_info:'摸牌阶段开始时,若有与你距离不大于1的其他角色,你可以放弃摸牌。若如此做,本局内其他角色计算与你的距离时+X。(X为势力数)', - lixia:'礼下', - lixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。本局内其他角色计算与你的距离时-1。', - rebiluan:'避乱', - rebiluan2:'避乱', - rebiluan_info:'结束阶段开始时,若有与你距离不大于1的其他角色,你可以弃置一张牌。若如此做,本局内其他角色计算与你的距离时+X。(X为场上势力数)', - relixia:'礼下', - relixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你选择一至两项:1.摸一张牌;2.其摸两张牌;3.其回复1点体力。本局内其他角色计算与你的距离时-X(X为你选择的选项数)。', - yishe:'义舍', - yishe_bg:'米', - yishe_info:'结束阶段开始时,若你的武将牌上没有「米」,则你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为「米」;当有「米」移至其他区域后,若你的武将牌上没有「米」,则你回复1点体力。', - bushi:'布施', - midao:'米道', - bushi_info:'当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得你的一张「米」', - midao_info:'一名角色的判定牌生效前,你可以打出一张「米」代替之。', - fengpo:'凤魄', - fengpo_info:'当你于出牌阶段内使用第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌;2.令此牌的伤害值基数+X。(X为其手牌中方牌的数量)', - chenqing:'陈情', - chenqing_info:'每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后其弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】。', - mozhi:'默识', - mozhi_info:'结束阶段开始时,你可以将一张手牌当作你本回合出牌阶段内使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当做你本回合出牌阶段内使用的第二张基本或普通锦囊牌使用。(你不能通过此技能使用【酒】)', - ranshang:'燃殇', - ranshang2:'燃殇', - ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力(X为“燃”标记的数量)', - hanyong:'悍勇', - hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】时,若你的体力值小于游戏轮数,你可以令此牌的伤害值基数+1。', - - yicong:'义从', - yongsi:'庸肆', - yongsi1:'庸肆', - yongsi2:'庸肆', - bifa:'笔伐', - bifa2:'笔伐', - songci:'颂词', - baobian:'豹变', - lihun:'离魂', - chongzhen:'冲阵', - chongzhen1:'冲阵', - chongzhen2:'冲阵', - yuanhu:'援护', - tianming:'天命', - mizhao:'密诏', - duwu:'黩武', - mingzhe:'明哲', - huanshi:'缓释', - hongyuan:'弘援', - aocai:'傲才', - aocai2:'傲才', - aocai2_backup:'傲才', - aocai3:'傲才', - huxiao:'虎啸', - huxiao3:'虎啸', - xueji:'雪恨', - wuji:'武继', - shushen:'淑慎', - shenzhi:'神智', - xiongyi:'雄异', - junbing:'郡兵', - junbing2:'郡兵', - quji:'去疾', - sijian:'死谏', - suishi:'随势', - suishi2:'随势', - xiaoguo:'骁果', - duanxie:'断绁', - fenming:'奋命', - guixiu:'闺秀', - cunsi:'存嗣', - yongjue:'勇决', - hengzheng:'横征', - shengxi:'生息', - shoucheng:'守成', - shangyi:'尚义', - zniaoxiang:'鸟翔', - zhendu:'鸩毒', - qiluan:'戚乱', - qiluan2:'戚乱', - qiluan3:'戚乱', - shenxian:'甚贤', - oldshenxian:'甚贤', - qiangwu:'枪舞', - moukui:'谋溃', - moukui2:'谋溃', - lirang:'礼让', - mingshi:'名士', - liangzhu:'良助', - kaikang:'慷忾', - wangzun:'妄尊', - tongji:'同疾', - kuiwei:'溃围', - kuiwei2:'溃围', - yanzheng:'严整', - zhoufu:'咒缚', - zhoufu2:'咒缚', - zhoufu3:'咒缚', - yingbin:'影兵', - reyingbing:'影兵', - rezhoufu:'咒缚', - rezhoufu2:'咒缚', - fenxun:'奋迅', - fenxun2:'奋迅', - spmengjin:'猛进', - xiemu:'协穆', - xiemu2:'协穆', - oldxiemu:'协穆', - naman:'纳蛮', - zuixiang:'醉乡', - manjuan:'漫卷', - taichen:'抬榇', - jilei:'鸡肋', - jilei2:'鸡肋', - jilei2_bg:'肋', - fulu:'符箓', - fuji:'助祭', - yawang:'雅望', - xunzhi:'殉志', - fanxiang:'返乡', - fanxiang_info:'觉醒技,准备阶段开始时,若场上有已受伤且你发动过〖良助〗的选项二的角色,则你加1点体力上限并回复1点体力,失去技能〖良助〗并获得技能〖枭姬〗', - xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你本局内手牌上限+2。', - yawang_info:'锁定技,摸牌阶段开始时,你改为摸X张牌,然后你于本回合的出牌阶段内至多使用X张牌(X为与你体力值相等的角色数)', - fuji_info:'当一名角色造成雷属性伤害时,你可以令其进行判定,若结果为黑色,此伤害+1;若结果为红色,该角色获得判定牌。', - fulu_info:'当你声明使用普通【杀】时,你可以将此【杀】改为雷【杀】。', - jilei_info:'当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌,直到其下个回合开始。', - danlao:'啖酪', - danlao_info:'当你成为一张指定了多个目标的【杀】或普通锦囊牌的目标时,你可以摸一张牌,令此牌对你无效。', - gongao:'功獒', - zhuiji:'追击', - chouhai:'仇海', - chouhai_info:'锁定技,当你受到伤害时,若你没有手牌,此伤害+1。', - rechouhai:'仇海', - rechouhai_info:'锁定技,当你受到渠道为【杀】的伤害时,若你没有手牌,此伤害+1。', - guiming:'归命', - guiming_info:'主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”', - chixin:'赤心', - chixin1:'赤心', - chixin2:'赤心', - chixin_info:'你可以将♦牌当作【杀】或【闪】使用或打出。出牌阶段,你对在你攻击范围内且本回合内未成为过你使用的【杀】的目标的角色使用的【杀】没有次数限制。', - suiren:'随仁', - suiren_info:'限定技,准备阶段开始时,你可以失去技能〖义从〗,然后加1点体力上限并回复1点体力,然后令一名角色摸三张牌。', - canshi:'残蚀', - canshi2:'残蚀', - canshi_info:'摸牌阶段开始时,你可以改为摸X张牌(X为已受伤的角色数),若如此做,当你于此回合内使用基本牌或锦囊牌时,你弃置一张牌。', - recanshi:'残蚀', - recanshi2:'残蚀', - recanshi_info:'摸牌阶段开始时,你可以多摸X张牌(X为已受伤的角色数),若如此做,当你于此回合内使用【杀】或锦囊牌时,你弃置一张牌。', - zhuiji_info:'锁定技,你与体力值不大于你的角色的距离视为1。', - kunfen:'困奋', - kunfen_info:'锁定技,结束阶段开始时,你失去1点体力,然后摸两张牌。', - fengliang:'逢亮', - fengliang_info:'觉醒技,当你进入濒死状态时,你减1点体力上限,将体力值回复至2点,获得技能〖挑衅〗并将〖困奋〗改为非锁定技。', - oldcihuai:'刺槐', - oldcihuai2:'刺槐', - oldcihuai_info:'出牌阶段开始时,你可以展示手牌。若其中没有【杀】,则当你于此阶段内手牌数变化之前/有角色死亡之前需要使用【杀】时,你可以使用无对应实体牌的【杀】。', - cihuai:'刺槐', - cihuai_info:'出牌阶段开始时,若你的手牌中没有【杀】,则你可以展示你的手牌,视为对一名角色使用一张【杀】。', - gongao_info:'锁定技,当一名角色死亡后,你增加一点体力上限,回复一点体力。', - juyi:'举义', - juyi_info:'觉醒技,准备阶段开始时,若你已受伤且体力上限大于存活角色数,你须将手牌摸至体力上限,然后获得技能〖崩坏〗和〖威重〗。', - weizhong:'威重', - weizhong_info:'锁定技,当你的体力上限增加或减少时,你摸一张牌。', - taichen_info:'出牌阶段限一次,你可以失去1点体力,视为对一名角色使用一张【杀】。(不计入出牌阶段的使用次数限制)', - manjuan_info:'其他角色的牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得此牌。', - xinmanjuan:'漫卷', - xinmanjuan_info:'锁定技,当你不因【漫卷】或【醉乡】而获得牌时,你将此牌置入弃牌堆。然后若此时处于你的回合内,则你可以从弃牌堆中选择获得一张与此牌点数相同的其他牌。', - zuixiang_info:'限定技,准备阶段开始时,你可以展示牌堆顶的3张牌并置于你的武将牌上。你不能使用或打出与该些牌同类的牌,所有同类牌对你无效。之后的每个准备阶段,你须重复展示一次,直到这些牌中任意两张点数相同。然后,你获得这些牌。', - naman_info:'当其他角色打出的【杀】进入弃牌堆时,你可以获得之。', - xiemu_info:'出牌阶段限一次,你可以弃置一张【杀】并选择一个势力。若如此做,直到你的下回合开始时,当你成为该势力的其他角色使用的黑色牌的目标后,你摸两张牌。', - oldxiemu_info:'当你成为其他角色使用的黑色牌的目标后,你可以弃置一张【杀】,然后摸两张牌。', - spmengjin_info:'当你使用【杀】指定目标后,你可以弃置目标角色的一张牌。', - fenxun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他角色,你于本回合内至其的距离视为1。', - rezhoufu_info:'出牌阶段限一次,你可以用一张牌对一名其他角色施“咒”。当有“咒”的角色判定时,将“咒”作为判定牌;一名角色的回合结束时,你令本回合移除过“咒”的角色各失去1点体力', - reyingbing_info:'锁定技,有“咒”的角色使用与“咒”颜色相同的牌时,你摸一张牌;若这是你第二次因该“咒”摸牌,你获得该"咒"。', - yingbin_info:'锁定技,有“咒”的角色使用与“咒”花色相同的牌时,你摸一张牌;当你因同一名角色的同一张“咒”的效果摸第二张牌时,移去该“咒”。', - zhoufu_info:'出牌阶段限一次,你可以将一张手牌置于一名没有“咒”的其他角色的武将牌旁,称为“咒”。当有“咒”的角色判定时,其改为将“咒”作为判定牌;一名角色的回合结束时,若有角色于此回合因判定而移除过“咒”,则你令这些角色各失去1点体力。', - yanzheng_info:'若你的手牌数大于你的体力值,则你可以将你装备区内的牌当作【无懈可击】使用。', - kuiwei_info:'结束阶段开始时,你可以摸2+X张牌并记录X,然后将你的武将牌翻面(X为场上所有角色装备区内武器牌数目之和)。你的下个摸牌阶段开始时,你弃置X张牌。', - tongji_info:'锁定技。若你的手牌数大于你的体力值,则攻击范围包含你的其他角色使用【杀】时不能指定你以外的角色为目标。', - wangzun_info:'其他角色的准备阶段开始时,你可以摸一张牌。若如此做,该角色此回合的手牌上限-1。然后你不能再发动〖妄尊〗直到回合开始。', - kaikang_info:'当一名角色成为【杀】的目标后,若你至该角色的距离为1,你可以摸一张牌。若如此做,你交给其一张牌并展示之。若为装备牌,该角色可以使用此牌。', - liangzhu_info:'当一名角色于其出牌阶段内回复体力时,你可以选择一项:1、摸一张牌;2、令该角色摸两张牌。', - mingshi_info:'当你受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌,令伤害值-1。', - lirang_info:'当你的牌因弃置而置入弃牌堆后,你可以将其中的任意张牌交给其他角色。', - moukui_info:'当你使用【杀】指定目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,当此【杀】被【闪】抵消时,目标角色弃置你的一张牌。 ', - qiangwu_info:'出牌阶段,你可以进行判定。若如此做,直到回合结束,你使用点数小于判定结果的【杀】时不受距离限制,且你使用点数大于判定结果的【杀】时不计入出牌阶段的使用次数限制。', - shenxian_info:'每名角色的回合限一次,你的回合外,当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', - oldshenxian_info:'你的回合外,每当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', - qiluan_info:'一名角色的回合结束时,你可以摸3X+Y张牌。(X为你本回合内杀死过的角色数,Y为本回合内其他角色杀死过的角色数)', - //qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。', - zhendu_info:'一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成一点伤害。', - //zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。', - shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', - zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。', - shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', - shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。', - hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,则你可以放弃摸牌,改为获得每名其他角色区域内的一张牌。', - cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色。该角色获得技能【勇决】,然后你将武将牌翻面。', - yongjue_info:'每回合限一次。当其他角色于回合内使用的【杀】结算完成后,若你不是此【杀】的目标角色,则你可以获得之。', - guixiu_info:'当你成为【杀】的目标后,若你的手牌数小于体力值,则你可以摸一张牌。', - fenming_info:'结束阶段开始时,若你处于横置状态,你可以弃置所有处于横置状态的角色的各一张牌。', - duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置,若如此做,你横置。', - xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌,然后你摸一张牌;2.受到你对其造成的1点伤害。', - sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', - suishi_info:'当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力', - quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。', - junbing_info:'一名角色的结束阶段开始时,若其手牌数不大于1,该角色可以摸一张牌。若如此做,该角色将所有手牌交给你,然后你交给其等量的牌。', - xiongyi_info:'限定技,出牌阶段,你可以选择至多三名角色,这些角色各摸三张牌;若你选择的角色数不超过2,你回复1点体力', - xiongyi_info_guozhan:'限定技,出牌阶段,你可以令与你势力相同的所有角色各摸三张牌,然后若你的势力是角色最少的势力(或之一),则你回复1点体力。', - shenzhi_info:'准备阶段开始时,你可以弃置所有手牌。若你以此法弃置的牌数不小于X,你回复1点体力(X为你的体力值)。', - shushen_info:'当你回复1点体力时,你可以令一名其他角色选择回复1点体力或摸两张牌。', - wuji_info:'觉醒技,结束阶段开始时,若你于此回合内造成过3点或更多伤害,你加1点体力上限并回复1点体力,失去〖虎啸〗,然后从场上、牌堆或弃牌堆中获得【青龙偃月刀】', - xueji_info:'出牌阶段限一次,你可以弃置一张红色牌,然后选择至多X名角色,横置这些角色并对其中一名角色造成1点火焰伤害。(X为你已损失的体力值且至少为1)', - huxiao_info:'锁定技,当你造成火属性伤害时,该角色摸一张牌。然后,你于此回合内对其使用牌没有次数限制。', - aocai_info:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', - hongyuan_info:'摸牌阶段,你可以少摸一张牌并指定至多两名其他角色。若如此做,这些角色各摸一张牌。', - hongyuan_info_combat:'摸牌阶段,你可以少摸一张牌。若如此做,其他友方角色各摸一张牌。', - huanshi_info:'一名角色的判定牌生效前,你可令其观看你的手牌。若如此做,该角色选择你的一张牌,你打出此牌代替之。', - mingzhe_info:'当你于回合外使用或打出红色牌,或因弃置失去一张红色牌后,你可以摸一张牌。', - duwu_info:'出牌阶段,你可以弃置X张牌对你攻击范围内的一名其他角色造成1点伤害(X为该角色的体力值)。若该角色因此法进入濒死状态,则你于濒死状态结算后失去1点体力,且本回合不能再发动〖黩武〗。', - tianming_info:'当你成为【杀】的目标时,你可以弃置两张牌(不足则全弃,无牌则不弃),然后摸两张牌;若此时全场体力值最多的角色仅有一名且不是你,该角色也可以如此做。', - mizhao_info:'出牌阶段限一次,你可以将所有手牌交给一名其他角色。若如此做,你令该角色与你指定的另一名有手牌的角色拼点,视为拼点赢的角色对没赢的角色使用一张【杀】。', - yuanhu_info:'结束阶段开始时,你可以将一张装备牌置于一名角色的装备区里,然后根据此装备牌的类型执行以下对应效果。武器牌:弃置该角色距离1以内的一名角色区域中的一张牌;防具牌:该角色摸一张牌;坐骑牌:该角色回复1点体力。', - lihun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他男性角色。若如此做,你将武将牌翻面并获得其所有手牌。出牌阶段结束时,你交给其X张牌。(X为该角色的体力值)', - chongzhen_info:'当你发动〖龙胆〗使用或打出一张牌时,你可以获得对方的一张手牌。', - bifa_info:'结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的准备阶段开始时,其观看你移出游戏的牌并选择一项:交给你一张与此牌类型相同的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。', - songci_info:'出牌阶段,你可以选择一项:令一名手牌数小于其体力值的角色摸两张牌;或令一名手牌数大于其体力值的角色弃置两张牌。每局游戏每名角色限一次。', - yongsi_info:'锁定技,摸牌阶段,你多摸X张牌。弃牌阶段开始时,你弃置X张牌。(X为场上势力数)', - yicong_info:'锁定技,当你的体力值大于2时,你计算与其他角色的距离时-1;当你的体力值不大于2时,其他角色计算与你的距离时+1。', - baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能〖挑衅〗;若你的体力值为2或更少;你视为拥有技能〖咆哮〗;若你的体力值为1,你视为拥有技能〖神速〗。', - bingzhao:'秉诏', - bingzhao_info:'主公技,游戏开始时,你选择一个其他势力。当你对该势力的角色发动〖骨疽〗时,其可令你额外摸一张牌。', - sp_gongsunzan:'SP公孙瓒', - sp_simazhao:'SP司马昭', - sp_wangyuanji:'SP王元姬', - sp_xinxianying:'SP辛宪英', - sp_liuxie:'SP刘协', - spyicong_info:'弃牌阶段结束时,你可以将任意张牌置于你的武将牌上,称为「扈」。每有一张「扈」,其他角色与你计算距离时便+1。', - spyicong:'义从', - sptuji:'突骑', - sptuji_info:'准备开始时,你将所有「扈」置于弃牌堆,然后你本回合内计算与其他角色的距离时-X。若X不大于1,你摸一张牌。(X为以此法进入弃牌堆的「扈」的数量)', - sphuangen:'皇恩', - sphuangen_info:'一名角色使用锦囊牌指定目标时,若此牌的目标数大于1,则你可以令此牌对其中的至多X个目标无效,然后摸一张牌。(X为你的体力值)', - sphantong:'汉统', - sphantong_gain:'汉统', - sphantong_info:'当你的牌因弃牌阶段的游戏规则要求而进入弃牌堆后,你可以将这些牌置于你的武将牌上,称为「诏」。一名角色的回合开始时,你可以弃置一张「诏」并获得〖护驾〗/〖激将〗/〖救援〗/〖血裔〗中的一个技能直至当前回合结束。', - spzhaoxin:'昭心', - spzhaoxin_info:'摸牌阶段结束时,你可以展示所有手牌,然后视为使用一张【杀】。', - splanggu:'狼顾', - splanggu_rewrite:'狼顾', - splanggu_info:'当你受到有来源的伤害后,你可以进行判定(此判定结果生效前,你可以打出一张手牌替换判定牌)。然后你可以观看伤害来源的手牌并弃置其中的任意张与判定结果花色相同的牌。', - spfuluan:'扶乱', - spfuluan_info:'出牌阶段限一次,你可以弃置三张花色相同的牌并选择攻击范围内的一名角色。若如此做,该角色翻面且你不能使用【杀】直到回合结束', - spshude:'淑德', - spshude_info:'结束阶段开始时,你可以将手牌补至体力上限。', - spmingjian:'明鉴', - spmingjian_info:'一名角色的回合开始时,你可以选择一项:①弃置一张牌,然后其跳过本回合的判定阶段。②将一张手牌置于其武将牌上,然后其本回合内进行判定时不触发「判定结果生效前」的时机,且其回合结束时将此牌置入弃牌堆。', - spyinzhi:'隐智', - spyinzhi_info:'当你受到1点伤害后,你可以展示牌堆顶的两张牌。若其中有黑桃牌,则你可以进行至多X次「令一名角色获得伤害来源的一张手牌」的步骤,然后获得其余的牌。(X为其中黑桃牌的数量)', - sunshao:'孙邵', - bizheng:'弼政', - bizheng_info:'摸牌阶段结束时,你可以令一名其他角色摸两张牌。然后,若你的手牌数大于体力上限,你弃置两张牌。若其的手牌数大于体力上限,其弃置两张牌。', - yidian:'佚典', - yidian_info:'当你使用牌选择目标时,若弃牌堆中没有与此牌名称相同的牌,则你可以为此牌增加一个目标(无距离限制)。', - xinlianji:'连计', - xinlianji_info:'出牌阶段限一次,你可以弃置一张手牌,令其使用牌堆中的一张随机武器牌,然后选择一项:对你指定的一名角色使用【杀】,或令你将其装备区里的武器牌交给任意角色。', - xinmoucheng:'谋逞', - xinmoucheng_info:'觉醒技,准备阶段,若你已经发动了3次以上的〖连计〗,则你失去〖连计〗并获得〖矜功〗。', - xinjingong:'矜功', - xinjingong_info:'出牌阶段限一次,你可以将一张【杀】或装备牌当做三张随机锦囊牌中的一张使用。', - caiyang:'蔡阳', - yinka:'印卡', - zhangling:'张陵', - zlhuji:'虎骑', - zlhuji_info:'锁定技,你与其他角色的距离-1,你于回合外受到伤害后进行判定,若结果为红色,视为你对伤害来源使用一张【杀】(无视距离)。', - zlshoufu:'授符', - zlshoufu2:'授符', - zlshoufu_info:'出牌阶段限一次,你可摸一张牌,然后将一张手牌置于一名没有【箓】的角色的武将牌上,称为【箓】;其不能使用和打出与【箓】同类型的牌。该角色受伤后,或于弃牌阶段弃置至少2张与【箓】同类型的牌后,将【箓】置入弃牌堆。', - ol_zhangchangpu:'OL张昌蒲', - olxingshen:'省身', - olxingshen_info:'当你受到伤害后,你可以随机摸两张牌。若如此做,你移去所有“省”并获得X个“省”,且下一次发动〖严教〗展示牌时移去所有“省”并多展示等量的牌。(X为你已损失的体力值)', - - sp_default:"常规", - sp_zhongdan:"忠胆英杰", - sp_star:"桌游志·SP", - sp_guozhan:"国战", - sp_guozhan2:"国战移植", - sp_others:"其他", - sp_single:'新1v1', - sp_sticker:'桌游志·贴纸', - }, - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'sp', + connect:true, + characterSort:{ + sp:{ + sp_default:["caoying","simahui","yangxiu","chenlin","caohong","xiahouba","yuanshu","sp_diaochan","sp_zhaoyun","liuxie","zhugejin","zhugeke","guanyinping","simalang","zhangxingcai","fuwan","sp_sunshangxiang","caoang","sp_caoren","zhangbao","maliang","zhugedan","sp_jiangwei","sp_machao","sunhao","shixie","mayunlu","zhanglu","wutugu","sp_caiwenji","zhugeguo","lingju","jsp_guanyu","jsp_huangyueying","sunluyu","zumao","wenpin","daxiaoqiao","tadun","yanbaihu","chengyu","wanglang","sp_pangde","sp_jiaxu","litong","mizhu","buzhi","caochun","dongbai","zhaoxiang","mazhong","dongyun","kanze","heqi","wangyun","sunqian","xizhicai","quyi","luzhi","xujing","yuantanyuanshang","sunshao","zhangling",'guansuo','baosanniang','ol_zhangchangpu'], + sp_zhongdan:["cuiyan","huangfusong"], + sp_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei"], + sp_sticker:['sp_gongsunzan','sp_simazhao','sp_wangyuanji','sp_xinxianying','sp_liuxie'], + sp_guozhan:["zangba","shamoke","ganfuren","yuejin","hetaihou","dingfeng","panfeng","jianggan"], + sp_guozhan2:["mifuren","mateng","tianfeng","chendong","sp_dongzhuo","jiangfei","jiangqing","kongrong","bianfuren","liqueguosi","lvfan","cuimao","jiling","zhangren","zoushi"], + sp_single:["hejin","hansui","niujin"], + sp_others:["hanba","caiyang"], + }, + }, + characterFilter:{}, + character:{ + ol_zhangchangpu:['female','wei',3,['yanjiao','olxingshen']], + zhangling:['male','qun',4,['zlhuji','zlshoufu'],['unseen']], + caiyang:['male','qun',1,['yinka'],['forbidai','unseen']], + panfeng:['male','qun',4,['kuangfu']], + sunshao:['male','wu',3,['bizheng','yidian']], + sp_gongsunzan:['male','qun',4,['spyicong','sptuji']], + sp_simazhao:['male','wei',3,['spzhaoxin','splanggu']], + sp_wangyuanji:['female','wei',3,['spfuluan','spshude']], + sp_xinxianying:['female','wei',3,['spmingjian','spyinzhi']], + sp_liuxie:['male','qun',3,['sphuangen','sphantong']], + + huangfusong:['male','qun',4,['xinfenyue']], + yuantanyuanshang:['male','qun',4,['neifa']], + xujing:['male','shu',3,['yuxu','xjshijian']], + + hejin:['male','qun',4,['mouzhu','yanhuo']], + hansui:['male','qun',4,['mashu','niluan']], + niujin:['male','wei',4,['cuorui','liewei']], + jianggan:["male","wei",3,["weicheng","daoshu"]], + + caoying:["female","wei",4,["xinfu_lingren","xinfu_fujian"],[]], + simahui:["male","qun",3,["xinfu_jianjie","xinfu_chenghao","xinfu_yinshi"],[]], + baosanniang:["female","shu",3,["xinfu_wuniang","xinfu_xushen"],[]], + + sp_xiahoushi:["female","shu",3,["xinfu_yanyu","xinfu_xiaode"],[]], + + + yangxiu:['male','wei',3,['jilei','danlao']], + chenlin:['male','wei',3,['bifa','songci']], + caohong:['male','wei',4,['yuanhu']], + xiahouba:['male','shu',4,['baobian']], + yuanshu:['male','qun',4,['yongsi','weidi']], + sp_diaochan:['female','qun',3,['lihun','rebiyue']], + sp_zhaoyun:['male','qun',3,['ollongdan','chongzhen']], + jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren']], + liuxie:['male','qun',3,['tianming','mizhao']], + zhugejin:['male','wu',3,['hongyuan','huanshi','mingzhe']], + zhugeke:['male','wu',3,['aocai','duwu']], + guanyinping:['female','shu',3,['huxiao','xueji','wuji']], + simalang:['male','wei',3,['junbing','quji']], + zhangxingcai:['female','shu',3,['shenxian','qiangwu']], + fuwan:['male','qun',4,['moukui']], + sp_sunshangxiang:['female','shu',3,['liangzhu','fanxiang']], + caoang:['male','wei',4,['kaikang']], + sp_caoren:['male','wei',4,['weikui','lizhan']], + zhangbao:['male','qun',3,['rezhoufu','reyingbing']], + huangjinleishi:['female','qun',3,['fulu','fuji']], + maliang:['male','shu',3,['zishu','xinyingyuan']], + sp_pangtong:['male','qun',3,['xinmanjuan','zuixiang']], + zhugedan:['male','wei',4,['gongao','juyi']], + sp_jiangwei:['male','wei',4,['kunfen','fengliang']], + sp_machao:['male','qun',4,['zhuiji','ol_shichou']], + sunhao:['male','wu',5,['recanshi','rechouhai','guiming'],['zhu']], + shixie:['male','qun',3,['rebiluan','relixia']], + mayunlu:['female','shu',4,['fengpo','mashu']], + zhanglu:['male','qun',3,['yishe','bushi','midao']], + wutugu:['male','qun',15,['ranshang','hanyong']], + sp_caiwenji:['female','wei',3,['chenqing','mozhi']], + zhugeguo:['female','shu',3,['yuhua','qirang']], + + lingju:['female','qun',3,['jieyuan','fenxin']], + + cuiyan:['male','wei',3,['yawang','xunzhi']], + sp_zhangfei:['male','shu',4,['jie','dahe']], + jsp_guanyu:['male','wei',4,['new_rewusheng','danji']], + jsp_huangyueying:['female','qun',3,['jiqiao','linglong']], + sunluyu:['female','wu',3,['new_meibu','new_mumu']], + hanba:['female','qun',4,['fentian','zhiri']], + zumao:['male','wu',4,['yinbing','juedi']], + wenpin:['male','wei',4,['zhenwei']], + daxiaoqiao:['female','wu',3,['new_xingwu','new_luoyan']], + sp_daqiao:['female','wu',3,['yanxiao','anxian']], + sp_ganning:['male','qun',4,['yinling','junwei']], + sp_xiahoudun:['male','wei',4,['fenyong','xuehen'],['die_audio']], + sp_lvmeng:['male','wu',3,['tanhu','mouduan']], + + guansuo:['male','shu',4,['xinzhengnan','xiefang']], + tadun:['male','qun',4,['luanzhan']], + yanbaihu:['male','qun',4,['zhidao','jili']], + chengyu:['male','wei',3,['shefu','benyu']], + + wanglang:['male','wei',3,['gushe','jici']], + sp_pangde:['male','wei',4,['mashu','juesi']], + sp_jiaxu:['male','wei',3,['zhenlue','jianshu','yongdi']], + + litong:['male','wei',4,['tuifeng']], + mizhu:['male','shu',3,['ziyuan','jugu']], + buzhi:['male','wu',3,['hongde','dingpan']], + + sp_liubei:['male','shu',4,['zhaolie','shichou'],['zhu']], + caochun:['male','wei',4,['xinshanjia']], + + dongbai:['female','qun',3,['lianzhu','xiehui']], + + zhaoxiang:['female','shu',4,['refanghun','refuhan']], + mazhong:['male','shu',4,['fuman']], + dongyun:['male','shu',3,['bingzheng','sheyan']], + kanze:['male','wu',3,['xiashu','kuanshi']], + heqi:['male','wu',4,['qizhou','shanxi']], + + ganfuren:['female','shu',3,['shushen','shenzhi']], + mifuren:['female','shu',3,['guixiu','cunsi']], + mateng:['male','qun',4,['xiongyi','mashu']], + tianfeng:['male','qun',3,['sijian','suishi']], + yuejin:['male','wei',4,['xiaoguo']], + chendong:['male','wu',4,['duanxie','fenming']], + sp_dongzhuo:['male','qun',5,['hengzheng']], + jiangfei:['male','shu',3,['shengxi','shoucheng']], + jiangqing:['male','wu',4,['shangyi','zniaoxiang']], + hetaihou:['female','qun',3,['zhendu','qiluan']], + kongrong:['male','qun',3,['lirang','mingshi']], + dingfeng:['male','wu',4,['fenxun','duanbing']], + bianfuren:['female','wei',3,['wanwei','yuejian']], + shamoke:['male','shu',4,['gzjili']], + liqueguosi:['male','qun',4,['xiongsuan']], + lvfan:['male','wu',3,['diaodu','diancai']], + cuimao:['male','wei',3,['zhengbi','fengying']], + + jiling:['male','qun',4,['shuangren']], + zangba:['male','wei',4,['rehengjiang']], + zhangren:['male','qun',4,['chuanxin','zfengshi']], + zoushi:['female','qun',3,['zhuoshui','zqingcheng']], + + wangyun:['male','qun',4,['xinlianji','xinmoucheng']], + sunqian:['male','shu',3,['qianya','shuimeng']], + xizhicai:['male','wei',3,['tiandu','xianfu','chouce']], + quyi:['male','qun',4,['fuqi','jiaozi']], + + luzhi:['male','wei',3,['qingzhongx','weijing']], + + //kaisa:["male","western",4,["zhengfu"]], + }, + characterIntro:{ + zhangling:'张道陵(34年2月22日—156年),字辅汉,原名陵,道教正一道实际创立者,汉朝东汉时期丰邑(今江苏徐州丰县)人。太上老君降临蜀地,“授以三天正法,命为天师”,张道陵整合当时的:黄老派、方仙道、文始派等先秦修道团体,创立道教称正一盟威之道。后世尊称为“老祖天师”、“正一真人”、“三天扶教大法师”、高明上帝、张天师。著作《老子想尔注》,弟子有3000多人,设立24治,奠基天师道。张道陵、葛玄、许逊、萨守坚合称四大天师。张道陵创建道教的背景:当时在巴蜀一带,原有巴人信奉原始巫教,大规模的淫祀而害民。而这些祀奉鬼妖(学名为:妖邪)的法教巫师聚众敛财,无恶不作。张天师携王长、赵升二位弟子和黄帝九鼎丹经,来到北邙山修行,平定了那些祸害百姓的巫妖之教。川渝一带流传的张天师以太上老君剑印符箓大破鬼兵的故事就是以此为原型的。', + caiyang:'蔡阳(?-201年),又作蔡扬,东汉丞相曹操部下武将,汝南太守。于建安六年(201)奉曹操之命攻击与刘备联合的汝南贼龚都等人,兵败被刘备所杀。明代小说《三国演义》改编为“云长擂鼓斩蔡阳”。', + pujing:'湖北省当阳境内有一座山,名叫玉泉山。东汉建安末年,山上住着一个老和尚,法名普净,普净原来是沂水关镇国寺方丈,后因云游天下,来到此处,风这地方山明水秀,就于山中结草为庵,每天坐禅参道,身边只有一个小和尚,外出化一些斋饭,供养师父。在《三国演义》中,当关羽通过汜水关时,正是由于普净提醒,关羽才揭穿了卞喜的阴谋,并杀死了卞喜。关羽死后,其怨魂亦在普净的指点下醒悟,放下了心中的仇恨,专心致力于造福一方百姓。', + huban:'为《三国演义》所杜撰的人物,正史无记载,荥阳太守王植麾下从事、桓帝时议郎胡华之子。关羽过五关斩六将时其中一关就是王植所镇守,胡班奉命放火夜袭关公,因敬服公之气概,并得其父托公所带家书,班看毕,叹曰:“险些误杀忠良!”故将之放走。胡班到荆州来投降关公,公念其旧日相救之情,甚爱之;令随费诗入川,见汉中王受爵。费诗辞别关公,带了胡班,自回蜀中去了。', + chunyuqiong:'淳于琼(?-200年),字仲简,颍川(治今河南禹州)人。东汉时期官吏,于汉灵帝中平五年(188)被任命为西园八校尉之一的右校尉,与蹇硕、袁绍、鲍鸿、曹操、赵融、冯芳、夏牟同列。为袁绍大将,与张郃、高览等人齐名。在官渡之战时镇守乌巢,遭到曹操的偷袭而惨败,自己也被曹操处斩。', + lvkuanglvxiang:'吕旷(生卒年不详),与吕翔同是袁绍属下,袁绍去世后,为袁尚守东平,后来投降曹操,并被封为列侯。在《三国演义》中,在曹操准备往南准备攻击前,两人跟著大将曹仁和将军李典准备要攻击刘备。但吕旷被赵云刺下马身亡,而吕翔也死于张飞矛下,可以算是出师未捷身先死', + caobuxing:'曹不兴,亦名弗兴,三国时著名画家。孙吴吴兴(今浙江湖州)人,生卒年不详。他在黄武年间(222—229年)享有很大的声誉。被称为“佛画之祖”。与东晋顾恺之、南朝宋陆探微、南朝梁张僧繇并称“六朝四大家”。又与赵达的算术、严武的弈棋、皇象的草书等号称“吴中八绝”。曹不兴善画龙、虎、马及人物,有“落墨为蝇”等传奇故事,其佛画成就对后世影响很大,相传其所画龙头令谢赫叹服不已。画迹今已不存,据《贞观公私画史》载,作品有《青溪龙》、《赤盘龙》、《南海监牧进十种马图》、《夷事夷兽样》、《桃源图》等,惜早已散佚。 但之后的著名画家卫协直接师承其法。', + gaolan:'高览,生卒年不详,一名高奂,本属袁绍部将,后官渡之战淳于琼被曹操击破,与张郃一同投降曹操,被封为偏将军,东莱侯。《三国演义》里,曾与许褚、徐晃大战不分胜负。201年刘备败走荆州时,高览奉命追杀,三合斩刘辟,而后被冲阵而来的赵云刺死。', + xunchen:'荀谌,字友若,荀彧之兄(一说荀彧之弟),荀绲之子,颍川人。曾任军阀袁绍的幕僚。帮助袁绍游说韩馥,夺取了冀州。', + sunshao:'孙邵(163年-225年),字长绪,青州北海国人(今山东潍坊市昌乐县西)。原为北海相孔融的功曹,被孔融称赞为可任朝廷要职的人才,后随刘繇到达江东,继而辅佐孙权。孙权称吴王后,孙邵成为吴国首任丞相,数年后病逝。由于孙邵和当时吴国史官的关系并不是很好,因此在史书中并没有详细的记载。', + yuantanyuanshang:'袁谭、袁尚分别是袁绍的长子和第三子。袁绍坐拥青州、冀州、幽州、并州,本是北方最强诸侯,却于官渡大败,惭恨而终。虽然袁绍生前偏爱小儿子袁尚,却并未在继承人上有明确表态,这也导致本应以嫡长子身份继承的袁谭因郭图、审配伪立遗令未能如愿。曹操击败袁绍后,进而渡过黄河追击袁家残余势力,袁谭告急,但袁尚仅给他少量兵力。曹操得郭嘉之计退兵坐观其变,恰使两人此前的种种矛盾彻底爆发,袁谭不敌便引狼入室,派辛毗作为使者向曹操求援,让袁尚不得不北逃投奔乌桓。但袁谭也在之后背叛曹操兵败被杀。没多久,乌桓也被平定,袁熙、袁尚二人投奔公孙康后被斩首送还曹操。', + xujing:'许靖(?—222年),字文休。汝南郡平舆县(今河南省平舆县)人。汉末至三国蜀汉时期重臣、名士、评论家。许靖因与从弟许邵俱以品评人物而闻名于世。后被刘翊推举为孝廉,任尚书郎。曾先后投奔孔伷、陈祎、许贡、王朗等人,于孙策攻王朗前与家属俱避难交州,受到交趾太守士燮礼待。其后受益州牧刘璋邀请,相继为巴郡、广汉、蜀郡太守。于刘备包围成都时欲越墙叛逃,为刘璋所获。刘备定蜀后欲将其弃用,在法正的建议下方以其为左将军长史。建安二十三年(218年),刘备称汉中王,任命许靖为汉中王傅。章武元年(221年),刘备称帝,任命许靖为司徒,位列三公。章武二年(222年),去世。有文集二卷。', + hejin:'何进(?~189年),字遂高,南阳郡宛县(今河南南阳市宛城区)人。东汉时期外戚大臣,灵思皇后之兄。初以妹妹有宠,拜为郎中,出任虎贲中郎将、颍川太守,迁侍中、将作大匠、河南尹。黄巾起义时,拜为大将军,总镇京师,发现并镇压马元义的密谋,封为慎侯。为张大威望,在京师讲武结营,置西园八校尉。汉灵帝驾崩后,粉碎了中常侍蹇硕拥立皇子刘协的图谋,听从袁绍之言,博征智谋之士,内借元舅之资,外据辅政之权,独揽朝中大权。中平六年(189),不纳陈琳和曹操劝谏,阴结军阀董卓,联合袁绍谋诛宦竖。事情败露后,为中常侍张让等人损害,其后代是魏晋高门士族南阳何氏。', + hansui:'韩遂(?-215年),字文约。凉州金城郡人。东汉末年军阀、将领,汉末群雄之一。原名韩约,后改名遂。韩遂最初闻名于西州,被羌胡叛军劫持并推举为首领,以诛宦官为名举兵造反,聚众十万,先后败皇甫嵩、张温、董卓、孙坚等名将,使得天下骚动。后受朝廷招安,拥兵割据一方长达三十余年。韩遂曾与马腾结为异姓兄弟,后二人关系破裂。袁绍、曹操相争之际,马腾、韩遂被钟繇说服,依附于曹操。马腾入京后,留其子马超统领部队。马超推举韩遂为都督起兵反叛曹操,为曹操所败,韩遂逃奔凉州,后又为夏侯渊所败,病死(一说被杀),享年七十余岁。', + niujin:'牛金(生卒年不详),初为曹仁部曲将,周瑜军数万人来攻,前锋数千人始至,曹仁登城望,乃募得三百人,遣牛金迎战。但对方兵力较多,牛金遂被围困。曹仁亲自杀入阵中救出牛金。司马懿使牛金轻骑饵诱蜀军,刚交战诸葛亮就退兵,追至祁山。蜀将马岱入寇,司马懿遣将军牛金击退,斩千余级。公孙渊反,司马懿帅牛金、胡遵等步骑四万发自洛阳,后平定辽东。牛金官至后将军。', + jianggan:"蒋干,字子翼,汉末三国时期的人物,九江(治今安徽寿县)人。历史上的蒋干是当时的名士、辩论家。而罗贯中在历史小说《三国演义》中则将蒋干刻画成了被周瑜所愚弄的小丑形象。", + huangjinleishi:"黄巾军中负责施法的女祭司二人组。", + + caoying:"曹婴是在电影《三国志之见龙卸甲》中登场的虚拟人物,由李美琪饰演。曹婴是曹操的孙女,弓马娴熟,文武双全,深得曹操的用兵之道及心术。于凤鸣山一战中担任魏军大都督阻止诸葛亮北伐并因罗平安的告密而全歼关兴、张苞、赵云率领的蜀军部队。", + simahui:"司马徽(约145—208年),字德操,颍川阳翟(今河南禹州)人。东汉末年名士,精通道学、奇门、兵法、经学。有“水镜先生”之称。 司马徽为人清雅,学识广博,有知人之明,并向刘备推荐了诸葛亮、庞统等人,受到世人的敬重。", + baosanniang:"鲍三娘是中国民间传说中的人物,事迹多见于《花关索传》。相传她是鲍家庄鲍员外的小女儿。后来与关索成亲,关羽自传授其武艺,因此也造就了鲍三娘的文武双全。荆州失守之后鲍三娘就跟随关索一同投奔蜀汉,并随诸葛亮征讨南蛮。平定了南蛮之后,夫妻二人就此一直替诸葛亮镇守着南中,他们也的确留下了许多脍炙人口的行侠仗义故事,在民间广为流传。", + + pangdegong:"庞德公,字尚长,荆州襄阳人,东汉末年名士、隐士。 庞德公与当时徐庶、司马徽、诸葛亮、庞统等人交往密切。庞德公曾称诸葛亮为\"卧龙\",庞统为\"凤雏\",司马徽为\"水镜\",被誉为知人。对诸葛亮、庞统等人早年影响较大,并得到诸葛亮的敬重。庞德公最后隐居于鹿门山,采药而终。", + zhaotongzhaoguang:"赵统,赵云长子,生卒年不详。常山真定(今为河北正定)人,陈寿在正史《三国志》中记载赵云去世后,赵统袭爵永昌亭侯,官至蜀汉虎贲中郎督,加行领军。赵广(?—263年),三国时期蜀汉牙门将,赵云的次子,赵统之弟。随姜维前往沓中,官拜牙门将。曹魏司马氏派五路大军伐蜀时,随大将军姜维与魏兵战于疆川口,姜维败绩还守剑阁,赵广于沓中战死。", + majun:"马钧,字德衡,扶风(今陕西扶风)人,生活在汉朝末期,是中国古代科技史上最负盛名的机械发明家之一。马钧年幼时家境贫寒,自己又有口吃的毛病,所以不擅言谈却精于巧思,后来在魏国担任给事中的官职。马钧最突出的表现有还原指南车;改进当时操作笨重的织绫机;发明一种由低处向高地引水的龙骨水车;制作出一种轮转式发石机,能连续发射石块,远至数百步;把木制原动轮装于木偶下面,叫做“水转百戏”。此后,马钧还改制了诸葛连弩,对科学发展和技术进步做出了贡献。", + simazhao:"司马昭(211年—265年9月6日),字子上(小说《三国演义》为子尚),河内温县(今属河南)人。三国时期曹魏权臣,西晋王朝的奠基人之一。为晋宣帝司马懿与宣穆皇后张春华次子、晋景帝司马师之弟、晋武帝司马炎之父。 司马昭早年随父抗击蜀汉,多有战功。累官洛阳典农中郎将,封新城乡侯。正元二年(255年),继兄司马师为大将军,专揽国政。甘露五年(260年),魏帝曹髦被弑杀,司马昭立曹奂为帝。景元四年(263年),分兵遣钟会、邓艾、诸葛绪三路灭亡蜀汉,受封晋公。次年,进爵晋王。 咸熙二年(265年),司马昭病逝,年五十四,葬于崇阳陵。数月后,其子司马炎代魏称帝,建立晋朝,追尊司马昭为文帝,庙号太祖。", + wangyuanji:"王元姬(217年—268年4月20日),东海郯县(今山东郯城西北)人。三国时期曹魏经学家王朗之孙女、王肃之女,晋文帝司马昭妻子,晋武帝司马炎与齐王司马攸的生母。 王元姬幼时便通《诗经》、《论语》,嫁司马昭后竭尽妇道、谦虚谨慎。其人颇有远见,曾预言钟会谋反之事。泰始元年(265年),司马炎建立西晋,尊王元姬为皇太后,宫号曰崇化宫。王元姬身处太后之位,提倡节俭,身体力行,作为众妃子的表率。在其治理之下,后宫井井有条,众人和睦相处。 泰始四年(268年),王元姬崩逝,终年五十二岁。谥号文明皇后,与司马昭合葬于崇阳陵。", + + liuye:'刘晔(?-234年),字子扬,淮南成德人,是光武帝刘秀之子阜陵王刘延的后代,三国时期魏国著名的战略家。刘晔年少知名,人称有佐世之才,是曹操手下举足轻重的谋士,他屡献妙计,对天下形势的发展往往一语中的。刘晔历仕数朝,是曹魏的三朝元老。', + luzhi:'鲁芝(190年—273年),字世英。扶风郡郿县(今陕西眉县)人。魏晋时期名臣。官至光禄大夫,位特进,封阴平侯。泰始九年(273年)卒,时年八十四。谥号“贞”。', + xizhicai:'戏志才(生卒年不详),或志才为字,名不详(一说名忠),东汉颍川郡(今河南禹州)人。经张邈推荐,成为曹操手下谋士。为人多谋略,曹操十分器重,不幸早卒。三国演义中并无此人,三国志中只有寥寥数语。由荀彧推荐给曹操,被称为有“负俗之讥”。死后,荀彧又举荐了郭嘉。
    陈寿《三国志》记载:太祖与荀彧书曰:自志才亡后,莫可与计事者。汝、颍固多奇士,谁可以继之?彧荐嘉。', + sunqian:'孙乾(?—约215年),字公祐。北海郡(治今山东昌乐西)人。东汉末年刘备的幕僚。最初被大儒郑玄推荐于州里。刘备领徐州,以孙乾为从事。自徐州跟随刘备,多次作为刘备的使臣。刘备定益州后,拜孙乾为秉忠将军,其待遇仅次于麋竺,与简雍相同。不久后便病逝。', + miheng:'祢衡(173年-198年),字正平,平原郡(今山东德州临邑德平镇)人。个性恃才傲物.和孔融交好。孔融著有《荐祢衡表》,向曹操推荐祢衡,但是祢衡称病不肯去,曹操封他为鼓手,想要羞辱祢衡,却反而被祢衡裸身击鼓而羞辱。后来祢衡骂曹操,曹操就把他遣送给刘表,祢衡对刘表也很轻慢,刘表又把他送去给江夏太守黄祖,最后因为和黄祖言语冲突而被杀,时年二十六岁。黄祖对杀害祢衡一事感到十分后悔,便将其加以厚葬。', + quyi:'麴义(又作曲义、鞠义),生卒年不详,是东汉末年军阀袁绍部下的将领,能征善战,屡建战功,早年在凉州,精通羌人战法,率领着袁绍的精锐部队。后来由于自恃功高而骄纵不轨,被袁绍所杀。', + taoqian:'陶谦(132年-194年),字恭祖。丹阳郡(治今安徽宣城)人。汉末群雄之一。陶谦最初为诸生,在州郡任职,被举茂才,历任舒、卢二县令、幽州刺史、议郎,性格刚直,有大志。后随左车骑将军皇甫嵩对抗北宫伯玉,任扬武校尉,之后又随张温征韩遂、边章。中平五年(188年),徐州黄巾起,陶谦被朝廷任为徐州刺史,击破徐州黄巾,并推行屯田,恢复生产。尔后听从王朗、赵昱建议遣使进京朝贡,获拜安东将军、徐州牧,封溧阳侯。晚年因战事上为曹操大败,徐州大半几乎遭兵祸所害,以致过度忧劳而逝,终年六十三岁。', + wangyun:'王允(137~192年),字子师,太原郡祁县(今山西祁县)人。东汉末年时期大臣。出身太原王氏,世代官宦。举孝廉出身,司徒高第征为侍御史。出任豫州刺史,勤政爱民。斗争中常侍张让失败后,去官隐居。中平六年,大将军何进掌权之后,辟为从事中郎,迁河南尹。董卓拥立汉献帝即位后,代替杨彪,拜太仆、尚书令、司徒,密谋刺死董卓,联合吕布共同执政,日益骄傲自满。初平三年(192年),董卓余党李傕、郭汜、樊稠等攻破长安。王允兵败处死,时年五十六岁。', + bianfuren:'武宣皇后卞氏(159年12月30日-230年7月9日),琅邪开阳(今山东临沂)人,魏武帝曹操的正妻(继室),魏文帝曹丕、任城威王曹彰、陈思王曹植、萧怀王曹熊的母亲。原本是倡家,即汉代专门从事音乐歌舞的乐人家庭,后来与曹操成婚,建安初年,原配丁夫人被废,卞夫人成为曹操的正妻。曹丕继位后尊其为皇太后,曹叡继位后尊其为太皇太后。卞后在太和四年去世,与魏武帝曹操合葬高陵。', + shamoke:'沙摩柯(?-222年),东汉末三国时期五溪蛮首领。汉章武元年(221年)初,为报关羽被东吴杀害之仇,刘备亲自领兵攻孙权,以金锦爵赏诱沙摩柯助战。章武二年(222年),吴大都督陆逊以火攻破刘备,率诸军齐击,汉军四十多个营寨被攻破,沙摩柯在大乱中匹马奔逃,被乱军杀死。', + lvfan:'吕范(?-228年),字子衡。汝南郡细阳县(今安徽太和)人。汉末至三国时期吴国重臣。吕范年轻为汝南县吏,后避难寿春,结识孙策。此后随孙策、孙权征伐四方,对稳固孙氏在江东的统治做出了杰出的贡献,孙权将其比之于东汉开国元勋吴汉。吴国建立后,吕范累官至前将军、假节、扬州牧,封南昌侯。黄武七年(228年),吕范被拜为大司马,未得授官,便已病逝。孙权悲痛不已,遣使赠其大司马印绶。孙权还都建业后,以太牢礼祭祀吕范。', + liqueguosi:"请分别参考武将【李傕】和【郭汜】各自的介绍。", + cuimao:"关于【崔琰】的内容,请查看武将【崔琰】的介绍。
    毛玠(?—216年),字孝先,陈留平丘(今河南封丘)人。东汉末年大臣。年少时为县吏,以清廉公正著称。因战乱而打算到荆州避乱,但中途知道刘表政令不严明,因而改往鲁阳。后来投靠曹操,提出“奉天子以令不臣,脩耕植,畜军资”的战略规划,得到曹操的欣赏。
    毛玠与崔琰主持选举,所举用的都是清廉正直之士。而毛玠为人廉洁,激起天下廉洁之风,一改朝中奢华风气。曹操大为赞赏,曹丕也亲自去拜访他。
    曹操获封魏公后,毛玠改任尚书仆射,再典选举。又密谏曹操应该立嫡长子曹丕为魏国太子。崔琰被杀后,毛玠十分不快。后来有人诬告毛玠,曹操大怒,将毛玠收于狱中。及后在桓阶、和洽营救下,只被免职,不久逝世于家中。曹操在他死后赐他棺材和钱帛。", + + huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。', + zangba:'其父臧戒,有二子臧艾与臧舜。年少时曾召集数人将获罪的父亲救出,此后四处流亡。后来成为陶谦麾下的骑都尉,负责募兵抵抗黄巾军。与孙观、尹礼等人拥兵驻屯于开阳,自成一股独立势力,后跟随吕布。吕布战败后,投降了曹操。后与袁绍、孙权等的战役里战功赫赫,官至镇东将军。', + zhangren:'刘璋的属下,以忠勇著称。刘备入蜀时,张任曾劝刘璋提防刘备,但刘璋没有听从。魏延舞剑想趁机除掉刘璋时,张任出面对舞,解救刘璋。后在刘备进攻时于落凤坡射死了庞统。', + jiling:'东汉末年袁术帐下将领,勇猛非常,曾奉命率军攻打小沛的刘备,在吕布辕门射戟的调停下撤兵。', + zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。', + ganfuren:'刘备起兵后,于沛城娶甘氏为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。', + jiangfei:'蒋琬,蜀四英之一。初随刘备入蜀,诸葛亮卒后封大将军,辅佐刘禅,主持朝政,统兵御魏。采取闭关息民政策,国力大增。官至大司马,安阳亭侯,谥号恭侯。费祎,蜀国著名政治家和武将,官至大将军。在一次回途的筵会中,被降将郭修刺杀而亡,谥号敬侯。', + mifuren:'刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。', + chendong:'陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严白虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。', + jiangqing:'擅长弓术。与周泰原为活跃于长江一带的江贼,孙策脱离袁术下江东自立门户时,和周泰一起率众投靠。 孙策攻刘繇,并引出城中麾下的陈横、薛礼、张英三名将领,陈横后被蒋钦一箭射杀,后与韩当等将乘舟过江,乱箭射杀敌军。曾在赤壁之战与周泰,还有擅使长枪的韩当率领水军在三江口踏江破敌。', + kongrong:'字文举,鲁国人,东汉文学家,“建安七子”之首。献帝即位后任北军中侯、虎贲中郎将、北海相,时称孔北海后因触怒曹操,为曹操所杀。能诗善文。', + mateng:'字寿成,扶风茂陵人,东汉末年征西将军,割据西凉一带的军阀,伏波将军马援的后代,官至卫尉,封爵槐里乡侯。因其子马超谋反,而被杀,夷灭三族。', + tianfeng:'字元皓。东汉末年大军阀袁绍部下重要谋士。为人刚直不阿,曾多次向袁绍进言而不被采纳。后因谏阻袁绍征伐曹操而被袁绍下令监禁,并于官渡之战后,被袁绍杀害。', + caochun:'字子和,沛国谯(今安徽亳州)人。东汉末年曹操麾下将领,曹仁之弟。曹纯是曹操部下精锐部队“虎豹骑”的统领者之一,因在平定北方的战役中颇有功绩,被加封为高陵亭侯。死后谥曰威侯。曹纯擅战,甚得人心,为人重纲纪,不失理智,好学问,敬爱学士,闻名天下。', + hanba:'中国古代神话传说中引起旱灾的怪物。《诗·大雅·云汉》:“旱魃为虐,如惔如焚。”', + cuiyan:'字季珪,清河东武城(今河北省清河县)人。东汉末年名士,司空崔林的从兄,曹操帐下谋士。崔琰相貌俊美,很有威望,曹操对他也很敬畏。建安二十一年(216年),崔琰在给杨训的书信中写道“时乎时乎,会当有变时”,曹操认为此句有不逊之意,因而将崔琰下狱,不久崔琰即被曹操赐死。', + lifeng:'南阳(治今河南南阳)人,三国时期蜀汉大臣李严之子。230年,李严迁为骠骑将军,率军前往汉中,诸葛亮上表推举李丰为江州都督督军,以代替李严管理后方事务。李严去世后,李丰在蜀汉官至朱提太守。', + sunru:'孙茹,孙坚之妹,其名载于《江浙通志》中。儿子徐琨亦为孙吴早期名将,当初母子二人随军跟从孙策渡长江时,因为暂时没足够的船,孙策感到苦恼打算暂时驻军江边。孙茹夫人献计以芦苇为筏,孙策大喜。吴军遂以神不知鬼不觉的速度过长江击破刘繇部将张英,立下平江东第一功。', + lingcao:'东汉末年将领,吴郡余杭(今浙江余杭)人,凌统之父。早年跟随孙策转战江东。孙权统军后,凌操随其征伐黄祖,被甘宁射杀。《吴书》载:甘宁以善射,将兵在后,射杀校尉凌操', + zhugeguo:'诸葛果,为《历代神仙通鉴》中诸葛亮女儿的名字,《历代神仙通鉴》记录从上古到明代的神仙历史,因此诸葛果不见于任何史书。成都西南有朝真观,即乘烟观。相传,诸葛果在这里修行后成仙升天。', + zhuling:'朱灵(生卒年不详),字文博,冀州清河国人,三国时期曹魏名将。官至后将军,封为高唐侯,谥号威侯。初为袁绍部将,后归顺曹操,随曹操征伐四方,屡建战功。', + re_yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', + fuwan:'伏完(?-209),琅邪东武(今属山东)人,东汉末大臣,汉献帝伏皇后之父。历官辅国将军、中散大夫、屯骑校尉。', + liuxie:'字伯和,又字合。汉族,祖籍沛县,生于洛阳。汉灵帝第三子,被董卓迎立为帝。董卓被王允和吕布诛杀后,董卓部将李傕等攻入长安,再次挟持了他,后来逃出长安。公元196年,曹操控制了刘协,并迁都许昌,“挟天子以令诸侯”。公元220年,曹操病死,刘协被曹丕控制,随后被迫禅让于曹丕。', + yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', + gongsunzan:'字伯珪,汉族,号“白马义从”。辽西令支人。东汉末年献帝年间占据幽州一带的军阀,汉末群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', + caohong:'字子廉,沛国谯(今安徽亳县)人,曹操从弟,曾献马并救护曹操。后多随军征伐,平兖州、征刘表、讨祝臂。曹丕即位时封曹洪为骠骑将军。曹叡即位,拜曹洪为后将军,更封乐城侯,后复拜为骠骑将军。曹洪逝世,追谥曰恭侯。', + guanyinping:'河东解县(今山西运城)人,美髯公关羽之女。因在关羽的四个子女中排行第三,故又被称作“关三小姐”、“关氏三姐”或“关羽三小姐”。传说她是赵云的弟子、并随同诸葛亮平定南蛮。', + xiahouba:'夏侯渊次子。本为曹魏武将,后因司马懿诛曹爽一族,夏侯霸身为曹氏宗室而心怀不安,遂投降蜀汉。后随蜀将姜维北伐,官至车骑将军。', + daxiaoqiao:'大乔,庐江皖县人,为乔公长女,孙策之妻,容貌国色流离。小乔为大乔之妹,周瑜之妻,资貌绝伦。两人合称“二乔”。', + yuejin:'字文谦,魏“五子良将”之一。容貌短小,以胆烈跟从曹操,南征北讨,战功无数。从击袁绍于官渡,奋勇力战,斩袁绍部将淳于琼。又从击袁绍子谭、尚于黎阳,斩其大将严敬。从平荆州,留屯襄阳,进击关羽、苏非等人,击退其众,南郡诸郡的山谷蛮夷都前往乐进处投降。后来从曹操征孙权,假进节。曹操回师后,留乐进与张辽、李典屯于合肥。又以乐进数有军功,迁右将军。建安二十三年逝世,谥曰威侯。', + caoang:'字子修,曹操的长子,由于性情谦和且聪慧所以深得曹操喜爱。曹操征讨张绣时,羞辱张绣之婶邹氏,被张绣突然袭击。曹昂为保护曹操撤退,与典韦一起战死在宛城。', + zhugejin:'字子瑜,吴国大臣,诸葛亮之兄,诸葛恪之父。经鲁肃推荐,为东吴效力。胸怀宽广,温厚诚信,得到孙权的深深信赖,努力缓和蜀汉与东吴的关系。建安二十五年(220年)吕蒙病逝,诸葛瑾代吕蒙领南郡太守,驻守公安。孙权称帝后,诸葛瑾官至大将军,领豫州牧。', + zhangxingcai:'蜀名将张飞与夏侯氏所生之女,刘禅的妻子,史上称为“敬哀皇后”。', + zumao:'字大荣,吴郡富春人,使用双刀。孙坚在汜水关被华雄击败,祖茂为保护主公而主动提出与孙坚交换头盔,孙坚因此得脱。祖茂将孙坚的赤帻挂在柱子上,准备以此引诱华雄,趁机偷袭,却反被华雄所杀。', + dingfeng:'吴国将领。年少时以骁勇为小将,经常奋勇杀敌,屡立功勋,此后又于东兴之战中“雪中奋短兵”,大破侵犯东吴的魏军。吴景帝孙休在位时,丁奉设计除掉了东吴的权臣孙綝,被拜为大将军,后为右大司马、左军师。', + panfeng:'冀州牧韩馥部下的上将。当十八路诸侯讨伐董卓之时,他奉韩馥之命前往汜水关前挑战董卓部下大将华雄,不敌被斩。', + maliang:'字季常,因眉毛中有白毛,人称白眉马良,马谡的兄长。马良在兄弟五人中名声最佳,因此有“马氏五常,白眉最良”的说法。', + zhugedan:'字公休,曹魏后期的重要将领,诸葛亮的族弟。曾与司马师一同平定毌丘俭、文钦的叛乱。之后因与被诛的夏侯玄、邓飏交厚,且见到王淩、毌丘俭等人的覆灭而心不自安,于甘露二年起兵,并得到东吴的支援,但于次年被镇压,被大将军司马胡奋所斩。', + hetaihou:'大将军何进的妹妹,汉灵帝刘宏第二任皇后,汉少帝刘辩的生母。何氏出身于屠户家庭,后选入掖庭,得到汉灵帝临幸,生下皇子刘辩,并受封贵人。光和三年(180年),立为皇后。中平六年(189年),汉灵帝去世,刘辩继位,尊何氏为皇太后。董卓进京,废黜刘辩,不久毒杀刘辩及何氏。', + sunluyu:'又名小虎,孙权与步练师之女。吴后期,孙鲁班诬陷孙鲁育参与谋反,于是孙峻杀害了孙鲁育。', + wenpin:'本为刘表大将,刘表死后,跟随刘琮投降曹操。后曹操令其镇守江夏,多次阻止了关羽和孙权的进攻,为曹操倚为屏障的大将之一。', + zhanglu:'汉宁太守,继父祖之后传播五斗米教。刘璋杀张鲁之母,二人因此结仇,多次交战。刘备攻益州时,刘璋向张鲁求援。张鲁派马超前往,但马超投降刘备。张鲁后见曹操自封魏王,想要自立为汉宁王,为谋士阎圃劝免。后曹操讨汉中,张鲁败,众人劝其烧粮仓,张鲁认为这是国家之物,未听从,为曹操所称赞。后投降曹操,任镇南将军。', + mayunlu:'马腾之女,马超之妹,赵云之妻。父亲令其自幼习武,枪术非凡,寻常男子也是难以匹敌。', + tadun:'东汉末年辽西乌桓(亦称乌丸)的首领,乌桓大人丘力居的从子,总摄三王部。曾出兵协助袁绍,击破公孙瓒。此后受袁绍假传朝廷诏命,与三王难楼、苏仆延、乌延等人同受单于称号及印绶。后难楼、苏仆延率其部众奉立楼班为单于,蹋顿于是退位为王。袁绍死后,收到被曹操击败的袁尚的求助,纠集逃亡至乌桓的幽州、冀州官吏百姓,企图夺回河北。东汉建安十二年,曹操亲征乌桓。八月,乌桓、袁氏部队于柳城白狼山为曹军所败,蹋顿在此战中被曹操的先锋张辽所斩杀。 ', + yanbaihu:'吴郡乌程县人,原名“严虎”,别号“白虎”,东汉末年盘据吴郡一带山贼出身的地方豪帅。献帝初拥兵万人自固。孙策受袁术使渡江,攻破白虎等。白虎奔余杭,投靠许昭。建安二年,再度被孙策击败,至此不知亡佚何处。', + simalang:'字伯达,“司马八达”之一。曹操任司空后,司马朗被辟为司空属官,又历任成皋令、堂阳长、元城令、丞相主簿、兖州刺史等职,所在皆有政绩,深受百姓爱戴。后司马朗与夏侯惇、臧霸等征讨吴国,到达居巢。军队中流行瘟疫,司马朗亲自去视察,派送医药,因此染病去世。', + wangji:'字伯舆,东莱曲城人。三国时期魏国将领。王基文武兼备,才高于世,德溥于时,深得司马懿、司马师、司马昭的器重,尤其在南征毋丘俭,文钦之乱,东征诸葛诞之叛大规模军事活动中,王基与司马师、司马昭结下了深厚的军友情谊。魏景元二年王基去世,追赠司空,谥号为景侯。', + buzhi:'吴重臣,最初避难江东,于孙权统事后,被召为主记。后游历吴地,又任海盐县长,还任东曹掾,出领鄱阳太守。建安十五年,转交州刺史、立武中郎将,率军接管往交州,追拜使持节、征南中郎将。次年,以平定交州功,加平戎将军,封广信侯。后迁右将军、左护军,改封临湘侯。孙权称帝后,拜骠骑将军,领冀州牧,后因冀州分与蜀汉而解牧职。又都督西陵。赤乌九年,代陆逊为丞相。', + litong:'字文达,小字万亿。江夏平春(今河南信阳)人,汝南太守。早年以游侠闻名于江汝,在率众补充曹操兵源有功拜为阳安都尉,其间不因私而忘公,不因其妻子的求请而过问执法者。后来在曹操讨伐马超时出阵挑战,死于马超枪下。', + mizhu:'原为徐州富商,后被徐州牧陶谦辟为别驾从事。陶谦病死后,奉其遗命迎接刘备。与其弟麋芳拒绝曹操的任命而跟随刘备,在刘备最潦倒之时给予刘备很大的帮助,使他重新振作。214年(建安十九年),刘备入主益州后,拜麋竺为安汉将军,地位在诸葛亮之上,为刘备手下众臣之最。吕蒙袭取荆州,麋芳举城投降,导致关羽兵败身亡,麋竺面缚请罪,刘备劝慰麋竺,对他待遇如初。', + dongbai:'东汉末年县君,陇西临洮(今甘肃省岷县)人,董卓之孙女。董卓当权时,遍封其宗族,其中孙女董白尚未及笄,被封为渭阳君。', + zhaoxiang:'赵云与马云騄之女,赵统赵广之妹,关平之妻。', + heqi:'早年在平定山越的战争中立有大功,又讨平叛乱无数,身经百战,所向披靡,深受孙权器重。后来在与魏国的多次边境争斗中也屡立战功,官至后将军,并领徐州牧。', + dongyun:'大汉重臣,掌军中郎将董和之子。东汉末年,其父董和事刘璋为益州太守,刘备立太子时,允被选为洗马,后为黄门侍郎,延熙六年(公元243年)加辅国将军,延熙七年(公元244年)以侍中守尚书令,任大将军费祎的副手。', + mazhong:'本名狐笃,字德信,巴西阆中人,初次出场时随丞相诸葛亮南征孟获,诸葛亮遣马忠与赵云两路夹攻,大败蛮将阿会喃。孟获派弟孟优赴汉军处假投降,欲内应外合,诸葛亮将计就计,埋伏擒获孟获和诸洞酋长,马忠亦于此战立下战功。后诸葛亮北伐时亦数次出阵,立下汗马功劳。', + kanze:'孙权谋士,在孙权广纳贤才之时与严畯等来到江东,甚为孙权礼遇。第一个识破周瑜打黄盖是苦肉计,后欣然向曹操献诈降书,被曹操识破后面不改色,哈哈大笑,一番妙言让曹操相信了诈降书,是苦肉计中的关键人物。后劝孙权不要设局请关羽。在刘备御驾亲征东吴时,向孙权举荐陆逊为都督,间接上挽救了东吴的命运。', + lingju:'相传为吕布与貂蝉的女儿,被汉献帝掳走并训练为死士,被秘密送入宫中接近曹操,成为其“忘年红颜知己”。外表是柔弱的女子,实际上身怀致命的杀人绝技,等待时机给予曹操致命一击。', + yangxiu:'字德祖,今陕西华阴人,是东汉末年的文学家。杨修学问渊博,极聪慧,任丞相府主簿。史载,“是时,军国多事,修总知外内,事皆称意”。', + chenlin:'陈琳(?-217年),字孔璋,广陵射阳(今江苏宝应)人。东汉末年著名文学家,“建安七子”之一。', + zhugeke:'字元逊,琅邪阳都(今山东沂南)人。三国时期吴臣,蜀丞相诸葛亮之侄,吴大将军诸葛瑾长子,从小就以神童著称,深受孙权赏识。', + zhangbao:'东汉末年黄巾起义的首领之一,张角之弟,张梁之兄。中平元年(184)随兄张角起义,号称“地公将军”。', + chengyu:'字仲德,本名程立,因梦中於泰山捧日,更名程昱。荀彧投曹操时向其举荐程昱。他参与了攻打吕布、袁绍、刘备、孙权的大部份战事,一直出谋献策,表现出众。', + sunhao:'孙权之孙,孙和之子,东吴的末代君主。在位初期虽施行过明政,但不久即沉溺酒色,专于杀戮,变得昏庸暴虐,嗜用挖眼、剥皮等酷刑。280年,吴国被西晋所灭,孙皓投降西晋,被封为归命侯。', + wutugu:'南蛮乌戈国主,身长丈二(约合现在2.77米),不食五谷,以生蛇恶兽为饭。身有鳞甲,刀箭不能侵。兀突骨乘骑巨象,头戴日月狼须帽,身披金珠缨络,两肋下露出生鳞甲,眼目中微有光芒。', + shixie:'割据交州(今越南)一带的军阀,年少时师事刘陶,经逐渐升迁任交趾太守。后被朝廷加职绥南中郎将,迁安远将军,封龙度亭侯。在步骘接管交州时积极配合,归附孙权,被孙权加为左将军;此后又因诱降益州豪族雍闿而迁任卫将军,进封龙编侯。任交趾太守四十年。', + guansuo:'关羽的三子。自荆州失陷后,逃难在鲍家庄养病,伤势痊愈之后入蜀,逢丞相诸葛亮南征,拜之为前部先锋,一同南征。', + wanglang:'字景兴,汉末三国经学家,曹魏初期重臣。曾任会稽太守举兵抵抗孙策,后为曹操所征,被拜为谏议大夫等职。曹丕建立魏国后任命为司空。小说《三国演义》中他在阵前与诸葛亮饶舌比拼,最终被诸葛亮言词所驳倒,一时气愤坠马身亡。', + zhangliang:'东汉末年黄巾起义首领之一,张角的三弟。中平元年(184)随兄起义,号称“人公将军”。遭到朝廷所派左中郎将皇甫嵩进攻时,他率军在广宗(今河北威县)进行反击。后因警戒疏忽,遭到汉军夜袭,兵败身亡。', + }, + characterTitle:{}, + perfectPair:{ + yuejin:['re_lidian'], + zhugejin:['zhugeke'], + guanyinping:['guanyu'], + zhangxingcai:['liushan'], + fuwan:['fuhuanghou'], + sunshangxiang:['liubei'], + caoang:['caocao'], + zhangbao:['zhangliang','zhangjiao'], + zhangliang:['zhangjiao'], + maliang:['masu'], + lingcao:['lingtong'], + lingju:['diaochan','lvbu'], + jiangqing:['zhoutai'], + dingfeng:['xusheng'], + caohong:['caoren'], + daxiaoqiao:['zhouyu','sunce'], + cuiyan:['caocao'], + guansuo:['guanyu'], + mateng:['machao','madai','mayunlu'], + chengpu:['zhouyu'], + hanba:['swd_muyun'], + dongbai:['dongzhuo'], + cuimao:['caopi'], + simazhao:['wangyuanji'], + }, + card:{ + wy_meirenji:{ + fullskin:true, + vanish:true, + derivation:'wangyun', + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')&&target!=player&&target.sex=='male'; + }, + content:function(){ + 'step 0' + event.list=game.filterPlayer(function(current){ + return current!=player&¤t!=target&¤t.sex=='female'; + }).sortBySeat(); + 'step 1' + if(target.countCards('h')&&event.list.length){ + event.current=event.list.shift(); + event.current.gainPlayerCard(target,true); + target.line2([event.current,player]); + } + else{ + event.goto(4); + } + 'step 2' + event.current.chooseCard('h',true,'将一张手牌交给'+get.translation(player)); + 'step 3' + if(result.bool){ + event.current.give(result.cards,player); + } + event.goto(1); + 'step 4' + var n1=target.countCards('h'); + var n2=player.countCards('h'); + if(n1>n2){ + target.damage(player); + player.line(target); + } + else if(n1=3) return 0; + if(!target.hasSkillTag('maixie_hp')){ + return -3; + } + return -1; + } + if(num==2) return 0; + return -2+num+(Math.pow(target.hp,0.2)-1); + } + } + } + }, + }, + skill:{ + olxingshen:{ + trigger:{player:'damageEnd'}, + frequent:true, + audio:'xingshen', + content:function(){ + 'step 0' + var next=player.draw(); + if(get.isLuckyStar(player)||Math.random()<0.5) next.num=2; + player.storage.olxingshen=player.getDamagedHp(); + player[player.storage.olxingshen?'markSkill':'unmarkSkill']('olxingshen'); + }, + intro:{ + content:'下一次发动〖严教〗时多展示X张牌', + }, + }, + //张道陵 + zlhuji:{ + mod:{ + globalFrom:function(player,target,distance){ + return distance-1; + }, + }, + trigger:{player:'damageEnd'}, + forced:true, + content:function(){ + 'step 0' + var func=function(result){ + if(get.color(result)=='red') return 1; + return 0; + }; + if(get.itemtype(trigger.source)!='player'||!player.canUse('sha',trigger.source,false)) func=function(result){ + return 0; + }; + else if(get.effect(trigger.source,{name:'sha'},player,player)<0) func=function(result){ + if(get.color(result)=='red') return -1; + return 0; + }; + player.judge(func); + 'step 1' + if(result.bool&&get.itemtype(trigger.source)=='player'&&player.canUse('sha',trigger.source,false)){ + player.useCard({name:'sha',isCard:true},trigger.source,false); + } + }, + }, + zlshoufu:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&!target.getStorage('zlshoufu2').length; + }, + filterCard:true, + position:'he', + discard:false, + toStorage:true, + prepare:'give', + content:function(){ + target.addSkill('zlshoufu2'); + target.storage.zlshoufu2_markcount=0; + target.markAuto('zlshoufu2',cards); + player.draw(); + }, + }, + zlshoufu2:{ + marktext:'箓', + intro:{ + content:'cards', + onunmark:'throw', + }, + charlotte:true, + mod:{ + cardEnabled:function(card,player){ + if(player.getStorage('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type(card); + }).length) return false; + }, + cardRespondable:function(card,player){ + if(player.getStorage('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type(card); + }).length) return false; + }, + cardSavable:function(card,player){ + if(player.getStorage('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type(card); + }).length) return false; + }, + }, + trigger:{ + player:['damageEnd','loseAfter'], + }, + forced:true, + filter:function(event,player){ + var storage=player.getStorage('zlshoufu2'); + if(!storage.length) return false; + if(event.name=='damage') return true; + if(event.type!='discard'||event.getParent('phaseDiscard').player!=player) return false; + for(var i of event.cards2){ + if(storage.filter(function(magic){ + return get.type2(magic)==get.type2(i,event.hs.contains(i)?player:false); + }).length) return true; + } + return false; + }, + content:function(){ + if(trigger.name=='lose'){ + for(var i of trigger.cards2){ + if(player.getStorage('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type(i,trigger.hs.contains(i)?player:false); + }).length) player.storage.zlshoufu2_markcount++; + } + } + if(trigger.name=='damage'||player.storage.zlshoufu2_markcount>=2) player.unmarkSkill('zlshoufu2'); + else player.markSkill('zlshoufu2'); + }, + }, + //蔡阳 + yinka:{ + trigger:{player:['drawBegin','judgeBegin']}, + direct:true, + filter:function(){ + return ui.cardPile.childNodes.length>0; + }, + content:function(){ + 'step 0' + player.chooseButton(['印卡:请选择要置于牌堆'+(trigger.bottom?'底':'顶')+'的牌(先选择的在上)',Array.from(ui.cardPile.childNodes)],[1,trigger.num||1]); + 'step 1' + if(result.bool){ + while(result.links.length){ + if(trigger.bottom){ + var card=result.links.shift(); + ui.cardPile.removeChild(card); + ui.cardPile.appendChild(card); + } + else{ + var card=result.links.pop(); + ui.cardPile.removeChild(card); + ui.cardPile.insertBefore(card,ui.cardPile.firstChild) + } + } + } + }, + ai:{isLuckyStar:true}, + }, + //新王允 + xinlianji:{ + enable:'phaseUse', + audio:'wylianji', + usable:1, + check:function(card){ + return 5-get.value(card); + }, + filterTarget:function(card,player,target){ + if(ui.selected.targets.length) return true; + return target!=player; + }, + filterCard:true, + selectTarget:2, + multitarget:true, + targetprompt:['打人','被打'], + content:function(){ + 'step 0' + player.addMark('xinlianji',1,false); + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'&&targets[0].hasUseTarget(card); + }); + if(card){ + if(card.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ + card.remove(); + card=game.createCard('qibaodao',card.suit,card.number); + } + targets[0].chooseUseTarget(card,true,'nopopup','noanimate'); + } + else{ + player.chat('没有装备牌了吗'); + game.log('但是牌堆里已经没有装备牌了!'); + } + 'step 1' + game.updateRoundNumber(); + targets[0].chooseToUse('对'+get.translation(targets[1])+'使用一张杀,或将装备区里的武器牌交给一名其他角色', + {name:'sha'}).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',targets[1]).set('addCount',false); + 'step 2' + var card=targets[0].getEquip(1); + if(!result.bool&&card){ + event.card=card; + player.chooseTarget(true,'将'+get.translation(card)+'交给一名其他角色').set('ai',function(target){ + var card=_status.event.getParent().card; + return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card)); + }); + } + else event.finish(); + 'step 3' + result.targets[0].gain(card,targets[0],'give'); + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(ui.selected.targets.length){ + var pretarget=ui.selected.targets[0]; + if(pretarget.hasSha()&&pretarget.canUse({name:'sha'},target)) return get.effect(target,{name:'sha'},pretarget,target); + return Math.random(); + } + if(!target.getEquip(1)){ + if(game.hasPlayer(function(current){ + return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; + })) return 3; + return -3; + } + if(!game.hasPlayer(function(current){ + return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; + })) return -6; + return 4-get.value(target.getEquip(1)); + }, + }, + }, + }, + xinmoucheng:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:'moucheng', + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + derivation:'xinjingong', + unique:true, + filter:function(event,player){ + return player.countMark('xinlianji')>2; + }, + content:function(){ + player.awakenSkill('xinmoucheng'); + player.addSkill('xinjingong'); + player.removeSkill('xinlianji'); + }, + }, + xinjingong:{ + audio:'jingong', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',function(card){ + return card.name=='sha'||get.type(card)=='equip'; + }); + }, + delay:false, + usable:1, + content:function(){ + 'step 0' + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ + list.push('wy_meirenji'); + } + else{ + list.push('wy_xiaolicangdao'); + } + for(var i=0;iplayer.maxHp) return 0; + var att=get.attitude(player,target); + if(att<=0||target.hasSkillTag('nogain')) return 0; + if(target.maxHp-target.countCards('h')>=2) return att; + return att/2; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('bizheng',target); + target.draw(2); + } + else event.finish(); + 'step 2' + if(player.countCards('h')>player.maxHp) player.chooseToDiscard(2,'he',true); + 'step 3' + if(target.countCards('h')>target.maxHp) target.chooseToDiscard(2,'he',true); + }, + ai:{ + expose:0.25, + }, + }, + yidian:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + for(var i=0;i0){ + player.chooseTarget('令一名角色获得'+get.translation(trigger.source)+'的一张手牌',function(card,player,target){ + var source=_status.event.source; + return target!=source&&source.countGainableCards(target,'h')>0; + }).set('source',trigger.source); + } + else event.goto(4); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line([trigger.source,target],'green'); + target.gainPlayerCard(trigger.source,'h',true); + if(event.count2) event.goto(2) + } + 'step 4' + if(cards.length) player.gain(cards,'gain2','log'); + 'step 5' + if(event.count>0){ + player.chooseBool(get.prompt2('spyinzhi')).set('frequentSkill','spyinzhi'); + } + else event.finish(); + 'step 6' + if(result.bool){ + player.logSkill('spyinzhi'); + event.goto(1); + }; + }, + }, + spmingjian:{ + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.chooseCard(get.prompt2('spmingjian',trigger.player),'he'); + next.set('ai',function(card){ + var target=_status.event.getTrigger().player; + var player=_status.event.player; + if(get.attitude(player,target)>0&&target.countCards('j')>0) return 5-get.value(card); + return -1; + }); + next.set('filterCard',function(card,player){ + if(get.position(card)=='e') return lib.filter.cardDiscardable.apply(this,arguments); + return true; + }); + //next.set('logSkill',['spmingjian',trigger.player]); + 'step 1' + if(result.bool){ + player.logSkill('spmingjian',trigger.player); + var card=result.cards[0]; + event.card=card; + if(get.position(card)=='e') event._result={index:0}; + else if(!lib.filter.cardDiscardable(card,player,event)) event._result={index:1}; + else{ + var name=get.translation(trigger.player); + player.chooseControl().set('choiceList',[ + '令'+name+'跳过本回合的判定阶段', + '令'+name+'于本回合的判定中不触发「判定结果生效前」的时机', + ]).set('ai',function(){return 0}); + } + } + else event.finish(); + 'step 2' + if(result.index==0){ + player.discard(card); + trigger.player.skip('phaseJudge'); + } + else{ + player.lose(card,ui.special,'toStorage'); + trigger.player.addSkill('spmingjian_charlotte'); + trigger.player.storage.spmingjian_charlotte.add(card); + trigger.player.markSkill('spmingjian_charlotte'); + } + }, + ai:{ + expose:0.25, + }, + }, + spmingjian_charlotte:{ + trigger:{player:['judgeBefore','phaseAfter']}, + forced:true, + firstDo:true, + silent:true, + popup:false, + charlotte:true, + content:function(){ + if(trigger.name=='phase') player.removeSkill(event.name); + else trigger.noJudgeTrigger=true; + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + marktext:'鉴', + intro:{ + name:'明鉴', + content:'cards', + onunmark:'throw', + }, + }, + spshude:{ + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + filter:function(event,player){ + return player.countCards('h')2; + return get.suit(card)==get.suit(ui.selected.cards[0]); + }, + content:function(){ + target.turnOver(); + player.addTempSkill('spfuluan2'); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.isTurnedOver()) return 2; + return -1; + }, + }, + }, + }, + spfuluan2:{ + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + }, + }, + spzhaoxin:{ + trigger:{player:'phaseDrawEnd'}, + check:function(event,player){ + return player.getUseValue({name:'sha',isCard:true})>0; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.showHandcards(); + 'step 1' + player.chooseUseTarget('sha',false); + }, + }, + splanggu:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return get.itemtype(event.source)=='player'; + }, + logTarget:'source', + content:function(){ + 'step 0' + player.judge(); + 'step 1' + if(trigger.source.countCards('h')>0){ + var next=player.discardPlayerCard(trigger.source,'h',[1,Infinity]); + next.set('suit',result.suit); + next.set('filterButton',function(button){ + return get.suit(button.link)==_status.event.suit; + }); + next.set('visible',true); + } + }, + group:'splanggu_rewrite', + }, + splanggu_rewrite:{ + trigger:{player:'judge'}, + filter:function (event,player){ + return player.countCards('h')>0&&event.getParent().name=='splanggu'; + }, + direct:true, + content:function (){ + "step 0" + player.chooseCard('狼顾的判定结果为'+ + get.translation(trigger.player.judging[0])+',是否打出一张手牌进行代替?','h',function(card){ + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + return -1; + }); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight','splanggu','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + }, + sphantong:{ + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + return event.type=='discard'&&event.getParent(3).name=='phaseDiscard'&&event.cards.filterInD('d').length>0; + }, + content:function(){ + if(!player.storage.sphantong) player.storage.sphantong=[]; + var cards=trigger.cards.filterInD('d'); + player.storage.sphantong.addArray(cards); + player.$gain2(cards); + game.log(player,'将',cards,'置于武将牌上'); + player.markSkill('sphantong'); + }, + group:['sphantong_gain'], + derivation:['hujia','jijiang','jiuyuan','xueyi'], + marktext:'诏', + intro:{ + content:'cards', + onunmark:'throw', + }, + }, + sphantong_gain:{ + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.sphantong&&player.storage.sphantong.length>0; + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('sphantong'),player.storage.sphantong],function(button){return -1}); + 'step 1' + if(result.bool){ + player.logSkill('sphantong'); + var card=result.links[0]; + player.$throw(card); + game.log(player,'将',card,'置入了弃牌堆'); + player.storage.sphantong.remove(card); + player[player.storage.sphantong.length>0?'markSkill':'unmarkSkill']('sphantong'); + game.cardsDiscard(card); + var list=['hujia','jijiang','jiuyuan','xueyi']; + for(var i=0;i0) player.chooseControl(list).set('prompt','选择获得以下技能中的一个'); + else event.finish(); + } + else event.finish(); + 'step 2' + var skill=result.control; + player.addTempSkill(skill); + if(!player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong=[]; + player.storage.zhuSkill_sphantong.add(skill); + player.popup(skill,'wood'); + game.log(player,'获得了技能','#g【'+get.translation(skill)+'】'); + var next=game.createEvent('sphantong_clear',false); + event.next.remove(next); + trigger.after.push(next); + next.player=player; + next.skill=skill; + next.setContent(function(){ + if(player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong.remove(event.skill); + }) + }, + }, + sphuangen:{ + trigger:{global:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.isFirstTarget) return false; + if(get.type(event.card)!='trick') return false; + if(get.info(event.card).multitarget) return false; + if(event.targets.length<2) return false; + return player.hp>0; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('sphuangen'), + [1,Math.min(player.hp,trigger.targets.length)],function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + }).set('targets',trigger.targets); + "step 1" + if(result.bool){ + player.logSkill('sphuangen',result.targets); + trigger.excluded.addArray(result.targets); + player.draw(); + } + }, + }, + spyicong:{ + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCard('he',[1,player.countCards('he')],get.prompt2('spyicong')).set('ai',function(card){ + if(card.name=='du') return 10; + if(ui.selected.cards.length) return -1; + return 4-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('spyicong'); + if(!player.storage.spyicong) player.storage.spyicong=[]; + player.storage.spyicong.addArray(result.cards); + player.$giveAuto(result.cards.length,player,false); + game.log(player,'扣置了'+get.cnNumber(player.lose(result.cards,'toStorage',ui.special).cards.length)+'张【扈】'); + player.markSkill('spyicong'); + } + }, + mod:{ + globalTo:function(from,to,num){ + if(to.storage.spyicong&&to.storage.spyicong.length) return num+to.storage.spyicong.length; + }, + }, + marktext:'扈', + intro:{ + name:'义从', + content:'cardCount', + onunmark:'throw', + }, + }, + sptuji:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.spyicong&&player.storage.spyicong.length>0; + }, + content:function(){ + var num=player.storage.spyicong.length; + player.addMark('sptuji2',num,false); + player.addTempSkill('sptuji2'); + player.unmarkSkill('spyicong'); + if(num<=1) player.draw(); + }, + }, + sptuji2:{ + onremove:true, + charlotte:true, + mod:{ + globalFrom:function(from,to,num){ + return num-from.countMark('sptuji2'); + }, + }, + marktext:'突', + intro:{ + name:'突骑', + content:'至其他角色的距离-#', + }, + }, + //二袁 + neifa:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ + 'step 0' + _status.noclearcountdown=true; + if(game.hasPlayer(function(current){ + return current.countGainableCards(player,'ej')>0; + })){ + player.chooseControl('cancel2').set('choiceList',[ + '摸两张牌,然后弃置一张牌', + '获得场上的一张牌,然后弃置一张牌', + ]).set('prompt',get.prompt('neifa')).set('ai',function(){ + if(game.hasPlayer(function(current){ + var att=get.attitude(player,current); + if(att==0) return false; + if(att<0) return current.countCards('e',function(card){ + return get.value(card)>0; + })>0; + return current.countCards('ej',function(card){ + return get.position(card)=='j'||get.value(card)<=0; + })>0; + })) return 1; + return 0; + }); + } + else{ + player.chooseControl('ok','cancel2').set('prompt',get.prompt2('neifa')); + } + 'step 1' + if(result.control=='cancel2'){ + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + event.finish(); + return; + } + else if(result.index==1){ + player.chooseTarget('请选择一名角色,获得其装备区或判定区内的一张牌',true,function(card,player,target){ + return target.countGainableCards(player,'ej')>0; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>0&&target.countCards('ej',function(card){ + return get.position(card)=='j'||get.value(card,target)<=0; + })) return 2*att; + else if(att<0&&target.countCards('e',function(card){ + return get.value(card)>0; + })) return -att; + return -1; + }); + } + else{ + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + player.logSkill('neifa'); + player.draw(2); + event.goto(3) + } + 'step 2' + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + if(result.bool){ + var target=result.targets[0]; + player.logSkill('neifa',target); + player.gainPlayerCard(target,'ej',true); + } + 'step 3' + player.chooseToDiscard(true,'he'); + 'step 4' + if(result.bool&&result.cards&&result.cards.length){ + var name=get.type(result.cards[0])=='basic'?'neifa_basic':'neifa_nobasic'; + player.addTempSkill(name); + var num=Math.min(5,player.countCards('h',function(cardx){ + return (name=='neifa_basic')!=(get.type(cardx,player)=='basic') + })); + player.addMark(name,num,false); + } + }, + ai:{ + threaten:3, + }, + }, + neifa_basic:{ + mark:true, + marktext:'伐', + onremove:true, + intro:{ + name:'内伐 - 基本牌', + content:'本回合内不能使用锦囊牌和装备牌,且使用【杀】选择目标时可以多选择1个目标,且使用【杀】的目标次数上限+#。', + }, + mod:{ + cardEnabled:function(card,player){ + if(['trick','equip'].contains(get.type(card,'trick'))) return false; + }, + cardSavable:function(card,player){ + if(['trick','equip'].contains(get.type(card,'trick'))) return false; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return num+player.countMark('neifa_basic'); + } + }, + }, + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&player.canUse(event.card,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('neifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ + return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); + }).set('sourcex',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!_status.connectMode) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('neifa',event.targets); + trigger.targets.addArray(event.targets); + }, + }, + neifa_nobasic:{ + trigger:{player:'useCard2'}, + direct:true, + mark:true, + marktext:'伐', + onremove:true, + mod:{ + cardEnabled:function(card,player){ + if(get.type(card)=='basic') return false; + }, + cardSavable:function(card,player){ + if(get.type(card)=='basic') return false; + }, + }, + intro:{ + name:'内伐 - 非基本牌', + content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择1个目标,且本回合的出牌阶段内前两次使用装备牌时摸#张牌。' + }, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(event.targets&&event.targets.length>0) return true; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' + player.chooseTarget(get.prompt('neifa'),function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.contains(target)) return true; + return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target); + }).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1); + }).set('targets',trigger.targets).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets){ + player.logSkill('neifa',event.targets); + if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets); + else trigger.targets.addArray(event.targets); + } + }, + group:'neifa_use', + ai:{ + reverseOrder:true, + skillTagFilter:function(player){ + if(player.storage.counttrigger&&player.storage.counttrigger.neifa_use>=2) return false; + }, + effect:{ + target:function(card,player,target){ + if((!player.storage.counttrigger||!player.storage.counttrigger.neifa_use||player.storage.counttrigger.neifa_use<2)&&player==target&&get.type(card)=='equip') return [1,3]; + }, + }, + }, + }, + neifa_use:{ + audio:'neifa', + usable:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.type(event.card)=='equip'&&player.countMark('neifa_nobasic')>0; + }, + content:function(){ + player.draw(player.countMark('neifa_nobasic')); + }, + }, + //许靖 + yuxu:{ + audio:2, + trigger:{player:'useCardEnd'}, + filter:function(event,player){ + if(event!=player.getLastUsed()) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var history=player.getHistory('useCard',function(evtt){ + return evtt.getParent('phaseUse')==evt; + }); + var index=history.indexOf(event); + if(index==0) return true; + return history[index-1].yuxu!=true&&player.countCards('he')>0; + }, + content:function(){ + trigger.yuxu=true; + player.addTempSkill('yuxu2'); + player.draw(); + }, + }, + yuxu2:{ + trigger:{player:'useCardEnd'}, + direct:true, + charlotte:true, + locked:true, + filter:function(event,player){ + if(event!=player.getLastUsed()) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var history=player.getHistory('useCard',function(evtt){ + return evtt.getParent('phaseUse')==evt; + }); + var index=history.indexOf(event); + if(index<1) return false; + return history[index-1].yuxu==true&&player.countCards('he')>0; + }, + content:function(){ + player.chooseToDiscard('he',true); + }, + }, + xjshijian:{ + audio:2, + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(event.player==player) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=event.player) return false; + return event.player.getHistory('useCard',function(evtt){ + return evtt.getParent('phaseUse')==evt; + }).indexOf(event)==1&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',get.prompt('xjshijian',trigger.player),'弃置一张牌并令其获得技能〖誉虚〗至回合结束'); + next.set('logSkill',['xjshijian',trigger.player]); + next.set('check',get.attitude(player,trigger.player)>0&&trigger.player.countCards('h')>2); + next.ai=function(card){ + if(_status.event.check) return 5-get.value(card); + return -1; + }; + 'step 1' + if(result.bool) trigger.player.addTempSkill('yuxu'); + }, + ai:{ + expose:0.25, + }, + }, + //新1v1 + yanhuo:{ + audio:2, + trigger:{player:'die'}, + forceDie:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + direct:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('yanhuo'),function(card,player,target){ + return target!=player&&target.countDiscardableCards(player,'he')>0 + }).set('forceDie',true).ai=function(target){ + return -target.countCards('he')*get.attitude(player,target); + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('yanhuo',target); + event.count=player.countCards('he'); + } + else event.finish() + 'step 2' + if(target.countDiscardableCards(player,'he')){ + player.line(target); + player.discardPlayerCard(target,'he',true).set('forceDie',true); + event.count--; + if(event.count) event.redo(); + } + }, + }, + mouzhu:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + target.chooseCard('he','交给'+get.translation(player)+'一张牌',true); + 'step 1' + player.gain(result.cards,target,'giveAuto'); + 'step 2' + if(player.countCards('h')<=target.countCards('h')){ + event.finish(); + return; + } + var list=[]; + if(target.canUse('sha',player,false)) list.push('sha'); + if(target.canUse('juedou',player,false)) list.push('juedou'); + if(!list.length) event.finish(); + else if(list.length==1) event._result={control:list[0]}; + else target.chooseControl(list).set('prompt','对'+get.translation(player)+'使用一张【杀】或【决斗】。').ai=function(){ + return get.effect(player,{name:'sha'},target,target)>=get.effect(player,{name:'juedou'},target,target)?'sha':'juedou'; + }; + 'step 3' + target.useCard({name:result.control,isCard:true},player); + }, + ai:{ + order:7, + result:{ + target:-1.2, + player:function(player,target){ + if(target.countCards('h')-player.countCards('h')>1) return 1; + if(get.damageEffect(target,player,player,player)>0) return 1; + if(player.hp>3||player.countCards('h','sha')&&player.countCards('h','shan')) return 0; + if(player.hp>2) return -1.1; + return -2; + }, + }, + }, + }, + niluan:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player!=player&&(event.player.hp>player.hp||event.player.countUsed('sha')) + }, + direct:true, + content:function(){ + var next=player.chooseToUse(); + next.logSkill='niluan'; + next.set('openskilldialog',get.prompt2('niluan')); + next.set('norestore',true); + next.set('_backupevent','niluanx'); + next.backup('niluanx'); + }, + }, + niluanx:{ + viewAs:{name:'sha'}, + filterCard:{color:'black'}, + position:'he', + check:function(card){return 5-get.value(card)}, + }, + cuorui:{ + audio:2, + trigger:{ + global:'gameDrawAfter', + player:'enterGame', + }, + forced:true, + filter:function(event,player){ + return player.maxHp>0&&!get.is.single(); + }, + content:function(){ + player.draw(Math.min(5,player.maxHp),false); + }, + group:'cuorui_nojudge', + subSkill:{ + nojudge:{ + trigger:{ + player:'phaseJudgeBefore', + }, + forced:true, + audio:'cuorui', + filter:function(event,player){ + return !player.storage.cuorui&&(get.is.single()||player.countCards('j')); + }, + content:function(){ + player.storage.cuorui=true; + trigger.cancel(); + game.log(player,'跳过了','#g判定阶段'); + }, + }, + }, + }, + liewei:{ + audio:2, + trigger:{source:'dieAfter'}, + frequent:true, + content:function(){ + player.draw(3); + }, + }, + //蒋干 + weicheng:{ + audio:2, + trigger:{global:'gainAfter'}, + //forced:true, + frequent:true, + filter:function(event,player){ + if(event.source==player&&event.player!=player&&player.hp>player.countCards('h')){ + return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; + } + return false; + }, + content:function(){ + player.draw(); + }, + }, + daoshu:{ + audio:2, + enable:'phaseUse', + filterTarget:function(c,p,t){ + return t!=p&&t.countGainableCards(p,'h')>0; + }, + filter:function(e,p){ + return !p.hasSkill('daoshu_used') + }, + content:function(){ + 'step 0' + player.chooseControl(lib.suit).set('prompt','请选择一个花色').ai=function(){return lib.suit.randomGet()}; + 'step 1' + event.suit=result.control; + player.popup(event.suit+2); + game.log(player,'选择了',event.suit+2); + player.gainPlayerCard(target,true,'h','visibleMove'); + 'step 2' + if(result.bool){ + var suit2=get.suit(result.cards[0]); + if(suit2==event.suit){ + target.damage(); + event.finish(); + } + else{ + player.addTempSkill('daoshu_used','phaseUseEnd'); + if(player.countCards('h',function(card){return get.suit(card)!=suit2})==0){ + player.showHandcards(); + event.finish(); + } + else player.chooseCard('h',true,function(card){ + return get.suit(card)!=_status.event.suit2 + },'交给'+get.translation(target)+'一张不为'+get.translation(suit2)+'花色的牌').set('suit2',suit2); + } + } + else event.finish(); + 'step 3' + player.give(result.cards,target,true); + }, + ai:{ + order:1, + result:{ + target:-1, + }, + }, + subSkill:{ + used:{sub:true}, + }, + }, + //统率三军诸葛瑾和文聘 + "zhenwei_three":{ + global:"zhenwei_three_others", + subSkill:{ + others:{ + mod:{ + globalTo:function (from,to,distance){ + if(from.side!=to.side&&game.hasPlayer(function(current){ + return current!=to&¤t.side==to.side&¤t.hasSkill('zhenwei_three'); + }))return distance+1; + }, + }, + sub:true, + }, + }, + }, + "huanshi_three":{ + audio:"huanshi", + trigger:{ + global:"judge", + }, + filter:function (event,player){ + return player.countCards('he')>0&&player.side==event.player.side; + }, + direct:true, + content:function (){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he',function(card){ + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight','huanshi_three','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + }, + }, + }, + //英文版特典武将凯撒 + zhengfu:{ + 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", + line:false, + content:function (){ + 'step 0' + player.line(trigger.target,{color:[220, 90, 139]}); + player.chooseControl(['basic','trick','equip']).set('ai',function(){ + var player=_status.event.target; + if(!player.countCards('h','sha')&&player.countCards('h','shan')) return 'trick'; + return 'basic'; + }).set('prompt','请选择一种牌的类别').set('target',trigger.target); + 'step 1' + trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){ + return get.type(card,'trick')==result.control; + }).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',trigger.target.countCards('h','shan')) + 'step 2' + if(result.bool){ + var cards=result.cards; + player.gain(cards,trigger.target,'giveAuto'); + } + else trigger.getParent().directHit.add(trigger.target); + game.delay(); + }, + }, + //变权移植 + wanwei:{ + trigger:{target:['rewriteGainResult','rewriteDiscardResult']}, + direct:true, + filter:function(event,player){ + return event.player!=player; + }, + audio:2, + content:function(){ + 'step 0' + var prompt='即将失去'+get.translation(trigger.result.cards)+',是否发动【挽危】?'; + var next=player.choosePlayerCard(player,prompt,trigger.position); + next.set('ai',function(button){ + return 20-get.value(button.link); + }); + next.filterButton=trigger.filterButton; + next.selectButton=trigger.result.cards.length; + 'step 1' + if(result.bool){ + player.logSkill('wanwei'); + trigger.result.cards=result.links.slice(0); + trigger.result.links=result.links.slice(0); + trigger.cards=result.links.slice(0); + trigger.untrigger(); + } + } + }, + yuejian:{ + trigger:{global:'phaseDiscardBegin'}, + audio:2, + filter:function(event,player){ + return event.player.countUsed()0&&event.player.needsToDiscard(); + }, + subSkill:{ + num:{ + mod:{ + maxHandcard:function(player,num){ + return num+player.maxHp; + } + } + }, + } + }, + gzjili:{ + mod:{ + aiOrder:function(player,card,num){ + if(player.isPhaseUsing()&&get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')){ + var range0=player.getAttackRange(); + var range=0; + var info=get.info(card); + if(info&&info.distance&&info.distance.attackFrom){ + range-=info.distance.attackFrom; + } + if(player.getEquip(1)){ + var num=0; + var info=get.info(player.getEquip(1)); + if(info&&info.distance&&info.distance.attackFrom){ + num-=info.distance.attackFrom; + } + range0-=num; + } + range0+=range; + if(range0==(player.getHistory('useCard').length+player.getHistory('respond').length+2)&&player.countCards('h',function(cardx){ + return get.subtype(cardx)!='equip1'&&player.getUseValue(cardx)>0; + })) return num+10; + } + }, + }, + trigger:{player:['useCard','respond']}, + frequent:true, + locked:false, + filter:function(event,player){ + return player.getHistory('useCard').length+player.getHistory('respond').length==player.getAttackRange(); + }, + audio:2, + content:function(){ + player.draw(player.getAttackRange()); + }, + ai:{ + threaten:1.8, + effect:{ + target:function(card,player,target,current){ + if(player!=target||!player.isPhaseUsing()) return; + if(get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')){ + var range0=player.getAttackRange(); + var range=0; + var info=get.info(card); + if(info&&info.distance&&info.distance.attackFrom){ + range-=info.distance.attackFrom; + } + if(player.getEquip(1)){ + var num=0; + var info=get.info(player.getEquip(1)); + if(info&&info.distance&&info.distance.attackFrom){ + num-=info.distance.attackFrom; + } + range0-=num; + } + range0+=range; + var delta=range0-(player.getHistory('useCard').length+player.getHistory('respond').length); + if(delta<0) return; + var num=player.countCards('h',function(card){ + return (get.cardtag(card,'gifts')||get.subtype(card)!='equip1')&&player.getUseValue(card)>0; + }); + if(delta==2&&num>0) return [1,3]; + if(num>=delta) return 'zeroplayertarget'; + } + }, + }, + } + }, + xiongsuan:{ + limited:true, + enable:'phaseUse', + filterCard:true, + filter:function(event,player){ + return player.countCards('h'); + }, + check:function(card){ + return 7-get.value(card); + }, + filterTarget:true, + content:function(){ + 'step 0' + player.awakenSkill('xiongsuan'); + target.damage('nocard'); + 'step 1' + player.draw(3); + var list=[]; + var skills=target.getOriginalSkills(); + for(var i=0;i1){ + player.chooseControl(list).set('prompt','选择一个限定技在回合结束后重置之'); + } + else{ + event.finish(); + } + 'step 2' + target.storage.xiongsuan_restore=result.control; + target.addTempSkill('xiongsuan_restore','phaseZhunbeiBegin'); + }, + subSkill:{ + restore:{ + trigger:{global:'phaseAfter'}, + silent:true, + content:function(){ + player.restoreSkill(player.storage.xiongsuan_restore); + } + } + }, + ai:{ + order:4, + damage:true, + result:{ + target:function(player,target){ + if(target.hp>1){ + var skills=target.getOriginalSkills(); + for(var i=0;i=0) return 10; + if(target.hp>=4) return 5; + if(target.hp==3){ + if(player.countCards('h')<=2&&game.hasPlayer(function(current){ + return current.hp<=1&&get.attitude(player,current)<0; + })){ + return 3; + } + } + return 0; + } + } + } + }, + diancai:{ + audio:2, + trigger:{global:'phaseUseEnd'}, + filter:function(event,player){ + if(_status.currentPhase==player) return false; + var num=0; + player.getHistory('lose',function(evt){ + if(evt.cards2&&evt.getParent('phaseUse')==event) num+=evt.cards2.length; + }); + return num>=player.hp; + }, + content:function(){ + 'step 0' + var num=player.maxHp-player.countCards('h'); + if(num>0){ + player.draw(num); + } + }, + }, + diaodu:{ + audio:2, + group:"diaodu_use", + subfrequent:['use'], + subSkill:{ + use:{ + trigger:{ + player:"useCard", + }, + audio:"diaodu", + frequent:true, + prompt:'是否发动【调度】摸一张牌?', + filter:function (event,player){ + return get.type(event.card)=='equip' + }, + content:function (){ + player.draw('nodelay'); + }, + ai:{ + reverseEquip:true, + effect:{ + target:function (card,player,target,current){ + if(player==target&&get.type(card)=='equip') return [1,3]; + }, + }, + }, + }, + }, + trigger:{ + player:"phaseUseBegin", + }, + filter:function (event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countGainableCards(player,'e')>0; + }); + }, + direct:true, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt2('diaodu'),function(card,player,current){ + return current!=player&¤t.countGainableCards(player,'e')>0; + }).ai=function(target){ + var num=get.attitude(_status.event.player,target); + if(target.isDamaged()&&target.getEquip('baiyin')&&num>0) return 2*num + return -num; + }; + 'step 1' + if(result.bool){ + event.target1=result.targets[0]; + player.logSkill('diaodu',event.target1); + player.line(event.target1,'diaodu'); + player.gainPlayerCard(event.target1,'e',true); + } + else event.finish(); + 'step 2' + if(result.bool){ + event.card=result.cards[0]; + player.chooseTarget('是否将'+get.translation(event.card)+'交给一名其他角色?',function(card,player,current){ + return current!=player&¤t!=event.target1; + }); + } + else event.finish(); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.gain(card,player,'give'); + } + }, + }, + zhengbi:{ + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + //if(event.player!=player) return false; + return game.hasPlayer(function(current){return current!=player&¤t.isHealthy()})||player.countCards('h',{type:'basic'}); + }, + content:function(){ + 'step 0' + var choices=[]; + if(game.hasPlayer(function(current){return current.isHealthy()})) choices.push('选择一名未受伤的角色'); + if(player.countCards('h',{type:'basic'})) choices.push('交给一名角色一张基本牌'); + player.chooseControl(choices,ui.create.dialog('征辟

    选择一项
    ','hidden')).set('ai',function(){ + if(choices.length>1){ + return 1; + } + return 0; + }); + 'step 1' + if(result.control=='选择一名未受伤的角色') player.chooseTarget('征辟

    选择一名未受伤的角色,你对其使用牌没有次数和距离限制直到回合结束
    ',function(card,player,target){ + return target!=player&&target.isHealthy(); + },true); + else player.chooseCardTarget({ + prompt:'征辟

    交给一名其他角色一张基本牌,然后该角色交给你一张非基本牌或两张基本牌
    ', + position:'h', + filterCard:function(card){return get.type(card)=='basic'}, + filterTarget:function(card,player,target){ + return target!=player; + }, + ai1:function(card){return 7-get.value(card)}, + //ai2:function(card,player,target){} + }).set('forced',true); + 'step 2' + event.target=result.targets[0]; + player.line(result.targets,'green'); + if(result.cards.length){ + event.cards=result.cards; + result.targets[0].gain(result.cards,player,'give'); + } + else{ + player.storage.zhengbi_eff1=result.targets[0]; + player.addTempSkill('zhengbi_eff1'); + event.finish(); + } + 'step 3' + var choices=[]; + if(target.countCards('he',{type:['trick','delay','equip']})) choices.push('一张非基本牌'); + if(target.countCards('h',{type:'basic'})>1) choices.push('两张基本牌'); + if(choices.length) target.chooseControl(choices,ui.create.dialog('征辟

    交给'+get.translation(player)+'
    ')).set('ai',function(event,player){ + if(choices.length>1){ + if(player.countCards('he',{type:['trick','delay','equip']},function(card){return get.value(card)<7})) return 0; + return 1; + } + return 0; + }); + else{ + if(target.countCards('h')){ + var cards=target.getCards('h'); + player.gain(cards,target,'giveAuto'); + event.finish(); + } + else event.finish(); + } + 'step 4' + var check=(result.control=='一张非基本牌'); + target.chooseCard('he',(check?1:2),{type:(check?['trick','delay','equip']:'basic')},true); + 'step 5' + if(result.cards){ + player.gain(result.cards,target,'giveAuto'); + } + }, + subSkill:{ + eff1:{ + sub:true, + mod:{ + targetInRange:function (card,player,target){ + if(target==player.storage.zhengbi_eff1) return true; + }, + cardUsable:function (card,player,num){ + if(typeof num=='number'&&player.storage.zhengbi_eff1&&player.storage.zhengbi_eff1.isAlive()) return num+100; + }, + playerEnabled:function (card,player,target){ + if(player.storage.zhengbi_eff1.isAlive()&&player.storage.zhengbi_eff1&&target!=player.storage.zhengbi_eff1){ + var num=player.getCardUsable(card)-100; + if(num<=0) return false; + } + }, + }, + onremove:true, + }, + eff2:{sub:true}, + } + }, + fengying:{ + limited:true, + enable:'phaseUse', + position:'h', + filterCard:true, + selectCard:-1, + filter:function(event,player){ + return !player.storage.fengying&&player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + discard:false, + lose:false, + content:function(){ + 'step 0' + player.awakenSkill('fengying'); + player.storage.fengying=true; + player.insertPhase(); + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; + } + 'step 1' + var cards=player.getCards('h'); + player.discard(cards); + player.chooseTarget('请选择至多'+cards.length+'名角色,令这些角色将手牌摸至手牌上限。',[1,cards.length],function(card,player,target){ + return target.countCards('h')2){ + return Math.min(5,target.maxHp)-target.countCards('h'); + } + return att/3; + }); + 'step 2' + if(result.bool){ + var list=result.targets; + list.sort(lib.sort.seat); + player.line(list,'thunder'); + game.asyncDraw(list,function(current){ + return current.maxHp-current.countCards('h'); + }); + } + }, + skillAnimation:'epic', + animationColor:'gray', + ai:{ + order:0.1, + result:{ + player:0, + } + }, + }, + //新服曹笨 + xinshanjia:{ + group:["xinshanjia_count"], + locked:false, + mod:{ + aiValue:function(player,card,num){ + if((player.storage.xinshanjia||0)<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')){ + if(get.position(card)=='e') return num/player.hp; + return num*player.hp; + } + }, + }, + subSkill:{ + count:{ + forced:true, + silent:true, + popup:false, + trigger:{ + player:"loseEnd", + }, + filter:function(event,player){ + return event.es.length>0; + }, + content:function (){ + lib.skill.xinshanjia.sync(player); + }, + }, + }, + audio:"shanjia", + trigger:{ + player:"phaseUseBegin", + }, + intro:{ + content:"本局游戏内已失去过#张装备区内的牌", + }, + frequent:true, + sync:function(player){ + var history=player.actionHistory; + var num=0; + for(var i=0;i0) player.markSkill('xinshanjia'); + }, + content:function (){ + 'step 0' + player.draw(3); + 'step 1' + lib.skill.xinshanjia.sync(player); + var num=3-player.storage.xinshanjia; + if(num>0){ + player.chooseToDiscard('he',true,num).ai=get.disvalue; + } + 'step 2' + var bool=true; + if(result.cards){ + for(var i=0;i2) return false; + }, + effect:{ + target:function(card,player,target){ + if(player.storage.xinshanjia<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; + }, + }, + }, + }, + //OL马超 + ol_shichou:{ + audio:2, + trigger:{ + player:'useCard2', + }, + direct:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha';//&&player.isDamaged(); + }, + content:function(){ + 'step 0' + var num=Math.max(1,player.getDamagedHp()); + player.chooseTarget('是否发动【誓仇】,令至多'+num+'名其他角色也成为此【杀】的目标?',[1,num],function(card,player,target){ + return target!=player&&!trigger.targets.contains(target)&&player.canUse({name:'sha'},target); + }).ai=function(target){ + return get.effect(target,{name:'sha'},_status.event.player); + }; + 'step 1' + if(result.bool&&result.targets&&result.targets.length){ + var targets=result.targets; + player.logSkill('ol_shichou',targets); + player.line(targets,trigger.card.nature); + trigger.targets.addArray(targets); + } + }, + }, + //新大小乔 + "new_xingwu":{ + audio:"xingwu", + trigger:{ + player:"phaseDiscardBegin", + }, + direct:true, + intro:{ + content:"cards", + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + init:function (player){ + if(!player.storage.new_xingwu) player.storage.new_xingwu=[]; + }, + content:function (){ + 'step 0' + player.chooseCard(get.prompt2('new_xingwu')).set('ai',function(card){ + var player=_status.event.player; + for(var i=0;i0&& + get.attitude(player,current)<0) + })) return 0; + } + return 7-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('new_xingwu'); + if(player.storage.new_xingwu.length<2){ + player.$give(result.cards,player,false); + } + player.lose(result.cards,ui.special,'toStorage'); + player.storage.new_xingwu=player.storage.new_xingwu.concat(result.cards); + player.markSkill('new_xingwu'); + player.syncStorage('new_xingwu'); + } + else{ + event.finish(); + } + 'step 2' + var suitlist=[]; + for(var i=0;i0) return -1; + return get.damageEffect(target,player,player)*target.sex=='male'?2:1+target.countCards('e')/2; + }); + } + 'step 4' + if(result.bool){ + var target=result.targets[0]; + var num=target.sex=="male"?2:1; + target.damage(num); + event.target=target; + player.line(target,'green'); + } + else{ + event.finish(); + } + 'step 5' + if(event.target&&event.target.isAlive()){ + var es=event.target.getCards('e'); + if(es.length){ + event.target.discard(es); + } + } + }, + ai:{ + threaten:1.5, + }, + }, + "new_luoyan":{ + group:["new_luoyan_tianxiang","new_luoyan_liuli"], + }, + "new_luoyan_tianxiang":{ + inherit:"retianxiang", + filter:function (event,player){ + if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; + if(player.hasSkill('retianxiang')||player.hasSkill('tianxiang')) return false; + return lib.skill.retianxiang.filter(event,player); + }, + audio:"tianxiang", + }, + "new_luoyan_liuli":{ + inherit:"liuli", + filter:function (event,player){ + if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; + if(player.hasSkill('liuli')) return false; + return lib.skill.liuli.filter(event,player); + }, + audio:"liuli", + }, + //新孙鲁育 + "new_meibu":{ + audio:"meibu", + trigger:{ + global:"phaseUseBegin", + }, + filter:function (event,player){ + return event.player!=player&&event.player.isAlive()&&event.player.inRange(player); + }, + direct:true, + derivation:["new_zhixi"], + checkx:function (event,player){ + if(get.attitude(player,event.player)>=0) return false; + var e2=player.getEquip(2); + if(e2){ + if(e2.name=='tengjia') return true; + if(e2.name=='bagua') return true; + } + return event.player.countCards('h')>event.player.hp; + }, + content:function (){ + "step 0" + var check=lib.skill.new_meibu.checkx(trigger,player); + player.chooseToDiscard(get.prompt2('new_meibu',trigger.player),'he').set('ai',function(card){ + if(_status.event.check) return 6-get.value(card); + return 0; + }).set('check',check).set('logSkill','new_meibu'); + "step 1" + if(result.bool){ + var target=trigger.player; + var card=result.cards[0]; + player.line(target,'green'); + target.addTempSkill('new_zhixi','phaseUseEnd'); + if(card.name!='sha'&&get.type(card)!='trick'&&get.color(card)!='black'){ + target.addTempSkill('new_meibu_range','phaseUseEnd'); + target.storage.meibu=player; + } + target.markSkillCharacter('new_meibu',player,'魅步','锁定技,出牌阶段,你至多可使用X张牌,你使用了锦囊牌后不能再使用牌(X为你的体力值)。'); + } + }, + ai:{ + expose:0.2, + }, + subSkill:{ + range:{ + mod:{ + globalFrom:function (from,to,num){ + if(to==from.storage.meibu){ + return -Infinity; + } + }, + }, + sub:true, + }, + }, + }, + "new_mumu":{ + audio:"mumu", + trigger:{ + player:"phaseUseBegin", + }, + direct:true, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt('new_mumu'),'弃置一名角色装备区内的一张牌,或者获得一名角色装备区内的防具牌',function(card,player,target){ + if(target==player) return target.getEquip(2)!=undefined; + return target.countCards('e')>0; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target) + if(target.getEquip(2)&&player.isEmpty(2)){ + return -2*att; + } + return -att; + }); + 'step 1' + if(result.bool&&result.targets&&result.targets.length){ + event.target=result.targets[0]; + player.logSkill('new_mumu',event.target); + player.line(event.target,'green'); + var e=event.target.getEquip(2); + event.e=e; + if(target==player) event.choice='获得一张防具牌'; + else if(e){ + player.chooseControl('弃置一张装备牌','获得一张防具牌').set('ai',function(){ + if(_status.event.player.getEquip(2)){ + return '弃置一张装备牌'; + } + return '获得一张防具牌'; + }); + } + else{ + event.choice='弃置一张装备牌'; + } + }else event.finish(); + 'step 2' + var choice=event.choice||result.control; + if(choice=='弃置一张装备牌'){ + player.discardPlayerCard(event.target,'e',true); + } + else{ + if(event.e){ + player.gain(event.e,event.target,'give'); + player.addTempSkill('new_mumu2') + } + } + }, + }, + "new_zhixi":{ + mod:{ + cardEnabled:function(card,player){ + if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; + }, + cardUsable:function(card,player){ + if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; + }, + cardRespondable:function(card,player){ + if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; + }, + }, + trigger:{ + player:"useCard1", + }, + forced:true, + popup:false, + onremove:true, + firstDo:true, + onremove:function(player){ + player.unmarkSkill('new_meibu'); + delete player.storage.new_zhixi; + delete player.storage.new_zhixi2; + }, + content:function(){ + player.addMark('new_zhixi',1,false); + if(get.type2(trigger.card)=='trick') player.storage.new_zhixi2=true; + }, + ai:{presha:true,pretao:true,nokeep:true}, + }, + "new_mumu2":{ + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + }, + }, + qingzhong:{ + audio:2, + }, + qingzhongx:{ + audio:'weijing', + trigger:{player:'phaseUseBegin'}, + check:function(event,player){ + if(game.hasPlayer(function(current){ + return current!=player&¤t.isMinHandcard()&&get.attitude(player,current)>0; + })){ + return true; + } + if(player.countCards('h')<=2) return true; + // if(player.countCards('h')<=3&&!player.countCards('h','shan')) return true; + //if(player.countCards('h',{type:'basic'})<=1) return true; + return false; + }, + content:function(){ + player.draw(2); + player.addTempSkill('qingzhongx_give'); + }, + subSkill:{ + give:{ + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ + return !player.isMinHandcard(true); + }, + audio:'weijing', + forced:true, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current.isMinHandcard(); + }); + if(list.length==1){ + if(list[0]!=player){ + player.line(list[0],'green'); + player.swapHandcards(list[0]); + } + event.finish(); + } + else{ + player.chooseTarget(true,'清忠:选择一名手牌最少的角色与其交换手牌',function(card,player,target){ + return target.isMinHandcard(); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + if(target!=player){ + player.line(target,'green'); + player.swapHandcards(target); + } + } + } + } + } + }, + weijing:{ + audio:2, + group:['weijing_sha','weijing_shan'], + subSkill:{ + sha:{ + audio:'qingzhong', + enable:'chooseToUse', + viewAs:{name:'sha',isCard:true}, + filterCard:function(){return false}, + viewAsFilter:function(player){ + if(player.hasSkill('weijing_disable')) return false; + }, + selectCard:-1, + mark:false, + precontent:function(){ + player.addTempSkill('weijing_disable','roundStart'); + }, + prompt:'视为使用一张杀', + ai:{ + order:function(){ + var player=_status.event.player; + if(!player.hasShan()&&!game.hasPlayer(function(current){ + return player.canUse('sha',current)&¤t.hp==1&&get.effect(current,{name:'sha'},player,player)>0; + })){ + return 0; + } + return 2.95; + }, + skillTagFilter:function(player,tag,arg){ + if(player.hasSkill('weijing_disable')) return false; + if(arg!='use') return false; + }, + respondSha:true, + } + }, + shan:{ + audio:'qingzhong', + enable:'chooseToUse', + viewAs:{name:'shan',isCard:true}, + mark:false, + filterCard:function(){return false}, + viewAsFilter:function(player){ + if(player.hasSkill('weijing_disable')) return false; + return true; + }, + onuse:function(event,player){ + player.addTempSkill('weijing_disable','roundStart'); + }, + selectCard:-1, + prompt:'视为使用一张闪', + ai:{ + order:function(){ + var player=_status.event.player; + if(player.hasSkill('qingzhongx_give')) return 2.95; + return 3.15; + }, + skillTagFilter:function(player){ + if(player.hasSkill('weijing_disable')) return false; + }, + respondShan:true, + } + }, + disable:{ + mark:true, + intro:{ + content:'本轮已发动' + } + } + } + }, + zishu:{ + audio:2, + locked:true, + subSkill:{ + discard:{ + trigger:{global:'phaseEnd'}, + audio:"zishu", + forced:true, + filter:function(event,player){ + if(_status.currentPhase!=player){ + var he=player.getCards('h'); + var bool=false; + player.getHistory('gain',function(evt){ + if(!bool&&evt&&evt.cards){ + for(var i=0;i0) return false; + return event.cards.filterInD().length>0 + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yingyuan'),'将'+get.translation(trigger.cards)+'交给一名其他角色',function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + if(target.hasJudge('lebu')) return 0; + var att=get.attitude(_status.event.player,target); + if(att<3) return 0; + if(target.hasSha()&&_status.event.sha){ + att/=5; + } + if(event.wuxie&&target.needsToDiscard(1)){ + att/=5; + } + return att/(1+get.distance(player,target,'absolute')); + }).set('sha',trigger.cards[0].name=='sha').set('wuxie',trigger.cards[0].name=='wuxie'); + 'step 1' + if(result.bool){ + player.logSkill('yingyuan',result.targets[0]); + result.targets[0].gain(trigger.cards.filterInD(),'gain2'); + player.getHistory('custom').push({yingyuan_name:trigger.card.name}); + } + }, + }, + shuimeng:{ + audio:true, + trigger:{player:'phaseUseAfter'}, + direct:true, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('shuimeng'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + return -get.attitude(_status.event.player,target); + }).set('goon',player.needsToDiscard()||player.hasCard(function(card){ + var val=get.value(card); + if(val<0) return true; + if(val<=5){ + return card.number>=11; + } + if(val<=6){ + return card.number>=12; + } + return false; + })); + 'step 1' + if(result.bool){ + player.logSkill('shuimeng',result.targets); + event.target=result.targets[0]; + player.chooseToCompare(event.target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.chooseUseTarget({name:'wuzhong',isCard:true},true); + } + else{ + event.target.useCard({name:'guohe',isCard:true},player); + } + } + }, + qianya:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + direct:true, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'&&player.countCards('h'); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + player.chooseCardTarget({ + filterCard:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + selectCard:[1,nh], + ai1:function(card){ + var player=_status.event.player; + var cardname=_status.event.cardname; + if(_status.event.du) return -get.value(card,player,'raw'); + else if(_status.event.shuimeng){ + if(cardname=='wuzhong'){ + if(player.needsToDiscard(2-ui.selected.cards.length)){ + return 10-get.value(card,player,'raw'); + } + } + else if(cardname=='guohe'){ + if(player.needsToDiscard(-1-ui.selected.cards.length)){ + return 10-get.value(card,player,'raw'); + } + } + return 0; + } + else if(cardname=='lebu'){ + if(player.needsToDiscard(1-ui.selected.cards.length)){ + return 8-get.value(card,player,'raw'); + } + else{ + if(!ui.selected.cards.length){ + return 6-get.value(card,player,'raw'); + } + return 0; + } + } + else if(cardname=='shunshou'){ + if(_status.event.nh<=2) return get.value(card,player,'raw'); + } + else if(cardname=='huogong'){ + if(player.hp==1) return get.value(card,player,'raw'); + } + if(ui.selected.cards.length) return 0; + return 7-get.value(card,player,'raw'); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + var nh2=target.countCards('h'); + var num=Math.sqrt(1+nh2); + var cardname=_status.event.cardname; + if(_status.event.du) return 0.5-att; + else if(_status.event.shuimeng){ + return att/num; + } + else if(cardname=='lebu'){ + return att/num; + } + else if(cardname=='shunshou'){ + if(_status.event.nh<=2) return att/num; + } + else if(cardname=='huogong'){ + if(_status.event.player.hp==1) return att/num; + } + if(_status.event.nh>nh2+1){ + return att/num; + } + return 0; + }, + du:player.hasCard(function(card){ + return get.value(card,player,'raw')<0; + }), + shuimeng:trigger.getParent(2).name=='shuimeng', + nh:nh, + cardname:trigger.card.name, + prompt:get.prompt2('qianya') + }); + 'step 1' + if(result.bool){ + player.logSkill('qianya',result.targets); + player.give(result.cards,result.targets[0]); + } + } + }, + xianfu:{ + trigger:{ + global:'gameDrawAfter', + player:'enterGame', + }, + forced:true, + filter:function(){ + return game.players.length>1; + }, + audio:6, + content:function(){ + 'step 0' + player.chooseTarget('请选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){ + return target!=player&&(!player.storage.xianfu2||!player.storage.xianfu2.contains(target)); + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0) return att+1; + if(att==0) return Math.random(); + return att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + if(!player.storage.xianfu2) player.storage.xianfu2=[]; + player.storage.xianfu2.push(target); + player.addSkill('xianfu2'); + } + } + }, + xianfu_mark:{ + marktext:'辅', + intro:{ + name:'先辅', + content:'当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力' + }, + }, + xianfu2:{ + audio:'xianfu', + charlotte:true, + trigger:{global:['damageEnd','recoverEnd']}, + forced:true, + filter:function(event,player){ + if(event.player.isDead()||!player.storage.xianfu2||!player.storage.xianfu2.contains(event.player)||event.num<=0) return false; + if(event.name=='damage') return true; + return player.isDamaged(); + }, + logTarget:'player', + content:function(){ + 'step 0' + var target=trigger.player; + if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[]; + target.storage.xianfu_mark.add(player); + target.storage.xianfu_mark.sortBySeat(); + target.markSkill('xianfu_mark'); + game.delayx(); + 'step 1' + player[trigger.name](trigger.num,'nosource'); + }, + onremove:function(player){ + if(!player.storage.xianfu2) return; + game.countPlayer(function(current){ + if(player.storage.xianfu2.contains(current)&¤t.storage.xianfu_mark){ + current.storage.xianfu_mark.remove(player); + if(!current.storage.xianfu_mark.length) current.unmarkSkill('xianfu_mark'); + else current.markSkill('xianfu_mark'); + } + }); + delete player.storage.xianfu2; + }, + group:'xianfu3', + }, + xianfu3:{ + trigger:{global:'dieBegin'}, + silent:true, + filter:function(event,player){ + return event.player==player||player.storage.xianfu2&&player.storage.xianfu2.contains(player); + }, + content:function(){ + if(player==event.player) lib.skill.xianfu2.onremove(player); + else player.storage.xianfu2.remove(event.player); + } + }, + chouce:{ + trigger:{player:'damageEnd'}, + content:function(){ + 'step 0' + event.num=trigger.num; + 'step 1' + player.judge(); + 'step 2' + event.color=result.color; + if(event.color=='black'){ + player.chooseTarget('弃置一名角色区域内的一张牌',function(card,player,target){ + return target.countCards('hej'); + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<0){ + att=-Math.sqrt(-att); + } + else{ + att=Math.sqrt(att); + } + return att*lib.card.guohe.ai.result.target(player,target); + }) + } + else{ + var next=player.chooseTarget('令一名角色摸一张牌'); + if(player.storage.xianfu2&&player.storage.xianfu2.length){ + next.set('prompt2','(若目标为'+get.translation(player.storage.xianfu2)+'则改为摸两张牌)'); + } + next.set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); + if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)) return att*2; + return att; + }) + } + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + if(event.color=='black'){ + player.discardPlayerCard(target,'hej',true); + } + else{ + if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)){ + if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[]; + target.storage.xianfu_mark.add(player); + target.storage.xianfu_mark.sortBySeat(); + target.markSkill('xianfu_mark'); + target.draw(2); + } + else{ + target.draw(); + } + } + } + 'step 4' + if(--event.num>0){ + player.chooseBool(get.prompt2('chouce')); + } + else{ + event.finish(); + } + 'step 5' + if(result.bool){ + player.logSkill('chouce'); + event.goto(1); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==3) return [1,get.tag(card,'damage')*1]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + fuqi:{ + audio:2, + forced:true, + trigger:{ + player:"useCard", + }, + filter:function(event,player){ + return event.card&&(get.type(event.card)=='trick'||get.type(event.card)=='basic'&&!['shan','tao','jiu','du'].contains(event.card.name))&&game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + }); + }, + content:function(){ + trigger.directHit.addArray(game.filterPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + })); + }, + }, + wylianji:{ + enable:'phaseUse', + audio:2, + usable:1, + filter:function(event,player){ + return player.hasCard(lib.skill.wylianji.filterCard); + }, + check:function(card){ + if(card.name=='sha') return 1; + else{ + if(get.tag(card,'damage')){ + if(get.tag(card,'multineg')) return 5; + return 2; + } + } + return 0; + }, + filterCard:function(card){ + return get.name(card)=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'&&!get.info(card).multitarget)&&get.info(card).enable; + }, + filterTarget:function(card,player,target){ + return target!=player&&!target.isMin()&& + (player.canUse(card,target,false)||game.hasPlayer(function(current){ + return current!=player&&target.canUse(card,current); + })); + }, + discard:false, + lose:true, + delay:false, + content:function(){ + 'step 0' + player.showCards(get.translation(player)+'对'+get.translation(target)+'发动了【连计】',cards); + 'step 1' + var equip1=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'; + }); + if(!equip1){ + player.popup('连计失败'); + game.log('牌堆中无装备'); + event.finish(); + return; + } + if(equip1.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ + equip1.remove(); + equip1=game.createCard2('qibaodao',equip1.suit,equip1.number); + } + target.$draw(equip1); + target.chooseUseTarget(true,equip1,'noanimate','nopopup'); + game.delay(); + 'step 2' + game.updateRoundNumber(); + var card=cards[0]; + var bool1=game.hasPlayer(function(current){ + return current!=player&&target.canUse(card,current); + }); + var bool2=player.canUse(card,target,false); + if(bool1&&bool2){ + target.chooseControl(function(){ + return 0; + }).set('choiceList',[ + '对除'+get.translation(player)+'以外的角色使用'+get.translation(cards)+',并将装备区里的武器牌交给该牌的一个目标角色', + '视为'+get.translation(player)+'对你使用'+get.translation(cards)+',并将装备区内的武器牌交给'+get.translation(player) + ]); + } + else if(bool1){ + event.directindex=0; + } + else if(bool2){ + event.directindex=1; + } + else{ + event.finish(); + } + 'step 3' + var card=cards[0]; + if(result&&typeof event.directindex!='number'){ + event.directindex=result.index; + } + if(event.directindex==1){ + event.insert(lib.skill.wylianji.content_use,{ + player:player, + target:target, + card:card + }) + } + else{ + event.insert(lib.skill.wylianji.content_give,{ + player:target, + card:card, + targets:game.filterPlayer(function(current){ + return current!=player; + }) + }); + } + }, + content_use:function(){ + 'step 0' + player.useCard(card,target); + 'step 1' + if(!get.owner(card)){ + target.gain(card,'gain2'); + } + 'step 2' + var equip1=target.getEquip(1); + if(equip1){ + game.delay(); + target.give(equip1,player); + target.line(player); + } + }, + content_give:function(){ + 'step 0' + var select=get.select(get.info(card).selectTarget); + if(select[1]==-1){ + for(var i=0;i1){ + player.chooseTarget(true,'将'+get.translation(equip1)+'交给一名角色',function(card,player,target){ + return _status.event.list.contains(target); + }).set('ai',function(target){ + return get.attitude(player,target); + }).set('list',_status.event.list); + event.equip1=equip1; + } + else{ + if(event.list.length==1){ + player.give(equip1,event.list[0]); + player.line(event.list); + } + event.finish(); + } + } + else{ + event.finish(); + } + 'step 3' + if(result.bool&&result.targets.length&&event.equip1){ + player.give(event.equip1,result.targets[0]); + player.line(result.targets); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(ui.selected.cards.length){ + var card=ui.selected.cards[0]; + var bool=(card.name!='sha'); + if(game.hasPlayer(function(current){ + return target.canUse(card,current,bool)&&get.effect(current,card,target,player)>0; + })){ + var num=1; + if(target.getEquip(1)){ + num=0.6; + } + if(target.hasSkillTag('noe')) 2*num; + return num; + } + } + return 0; + } + } + } + }, + moucheng:{ + audio:2, + derivation:['jingong','wy_meirenji','wy_xiaolicangdao'], + trigger:{global:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.source!=player&&event.getParent(2).name=='useCard'&&event.getParent(3).name=='wylianjiInserted'; + }, + init:function(player){ + player.storage.moucheng=0; + }, + intro:{ + content:'已造成#点伤害' + }, + unique:true, + juexingji:true, + content:function(){ + player.storage.moucheng+=trigger.num; + if(player.hasSkill('moucheng')){ + player.markSkill('moucheng'); + player.syncStorage('moucheng'); + } + if(player.storage.moucheng>=3){ + event.trigger('mouchengAwaken'); + } + }, + group:'moucheng_awaken', + subSkill:{ + awaken:{ + trigger:{player:'mouchengAwaken'}, + forced:true, + skillAnimation:true, + animationColor:'gray', + content:function(){ + player.awakenSkill('moucheng'); + player.removeSkill('wylianji'); + player.addSkill('jingong'); + } + } + } + }, + jingong:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',function(card){ + return card.name=='sha'||get.type(card)=='equip'; + }); + }, + delay:false, + usable:1, + content:function(){ + 'step 0' + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ + list.push('wy_meirenji'); + } + else{ + list.push('wy_xiaolicangdao'); + } + for(var i=0;i=num) return false; + return player.countCards('h')>0; + }, + filterTarget:function(event,player,target){ + return player.canCompare(target); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(!result.bool) event.finish(); + event.num=result.num1; + 'step 2' + if(num<=5&&target.countGainableCards(player,'he')>0) player.gainPlayerCard(target,'he',true); + 'step 3' + if(num<=9){ + var card=get.cardPile2(function(x){ + return x.name=='sha'; + }); + if(card) player.gain(card,'gain2'); + } + 'step 4' + if(num<=13){ + var card={name:'sha',nature:'thunder'}; + if(player.canUse(card,target,false)) player.useCard(card,target,false); + } + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + var sort=function(a,b){ + return b.number-a.number; + }; + var ps=player.getCards('h').sort(sort); + var ts=target.getCards('h').sort(sort); + if(ps[0].number>ts[0].number){ + var effect=get.effect(target,{name:'sha',nature:'thunder'},player,player) + if(ps[0].number<6&&target.countCards('he')>1) effect-=2; + if(ps[0].number<10) effect-=1; + return effect; + } + return ps.length>=ts.length?-0.5:0; + }, + }, + }, + }, + fenyue:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + if(!player.countCards('h')) return false; + var num; + if(get.mode()=='identity'){ + num=game.countPlayer(function(current){ + return current.identity=='zhong'||current.identity=='mingzhong'; + }); + } + else{ + num=1; + } + if(player.getStat().skill.fenyue>=num) return false; + return true; + }, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + ai:{ + order:2.8, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<0&&player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + })){ + return get.effect(target,{name:'sha'},player,target); + } + else{ + return 0; + } + } + } + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + player.chooseControl(function(){ + return 1; + }).set('choiceList',[ + '令'+get.translation(target)+'不能使用或打出手牌直到回合结束', + '视为对'+get.translation(target)+'使用一张杀(不计入次数限制)' + ]); + } + else{ + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; + } + event.finish(); + } + 'step 2' + if(result.control=='选项一'){ + target.addTempSkill('fenyue2'); + } + else{ + player.useCard({name:'sha',isCard:true},target,false); + } + } + }, + fenyue2:{ + mark:true, + mod:{ + cardEnabled2:function (card){ + if(get.position(card)=='h') return false; + }, + }, + intro:{ + content:'不能使用或打出手牌' + } + }, + + huoshui:{ + audio:2, + enable:'phaseUse', + unique:true, + forceunique:true, + filter:function(event,player){ + if(player.name1=='gz_zoushi') return player.isUnseen(0); + return player.isUnseen(1); + }, + content:function(){ + if(player.name1=='gz_zoushi') player.showCharacter(0); + else player.showCharacter(1); + }, + global:'huoshui_mingzhi' + }, + huoshui_mingzhi:{ + ai:{ + nomingzhi:true, + skillTagFilter:function(player){ + if(_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('huoshui')){ + return true; + } + return false; + } + } + }, + qingcheng:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'})&&game.hasPlayer(function(current){ + return current!=player&&!current.isUnseen(2); + }); + }, + filterCard:{type:'equip'}, + position:'he', + filterTarget:function(card,player,target){ + return !target.isUnseen(2); + }, + check:function(card){ + return 6-get.value(card,_status.event.player); + }, + content:function(){ + 'step 0' + if(get.is.jun(target)){ + event._result={control:'副将'}; + } + else{ + var choice='主将'; + var skills=lib.character[target.name2][3]; + for(var i=0;i=0) return 0; + if(player.hasCard(function(card){ + return get.tag(card,'damage')&&player.canUse(card,target,true,true); + })){ + if(target.maxHp>3) return -0.5; + return -1; + } + return 0; + } + } + } + }, + qingcheng_ai:{ + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'damage')) return 2; + } + } + } + }, + zhuoshui:{ + audio:'huoshui', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ + game.countPlayer(function(current){ + if(current!=player&&!current.hasSkill('fengyin')){ + player.line(current,'green'); + current.addTempSkill('fengyin'); + } + }); + } + }, + zqingcheng:{ + audio:'qingcheng', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + filterCard:{type:'equip'}, + position:'he', + filterTarget:function(card,player,target){ + return target!=player; + }, + check:function(card){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return get.attitude(player,current)>2&¤t.isTurnedOver(); + })){ + return 10-get.value(card,player); + } + return 6-get.value(card,player); + }, + content:function(){ + 'step 0' + target.turnOver(); + 'step 1' + target.draw(2); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noturn')) return 0; + if(target.isTurnedOver()) return 2; + return -0.5; + } + } + } + }, + zfengshi:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countCards('e'); + }, + logTarget:'target', + check:function(event,player){ + if(event.target.hasSkillTag('noe')) return false; + return get.attitude(player,event.target)<0; + }, + content:function(){ + trigger.target.chooseToDiscard('e',true); + } + }, + chuanxin:{ + audio:2, + trigger:{source:'damageBegin2'}, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + if(!_status.event.getParent('phaseUse')) return false; + if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.getParent().name==event.card.name){ + if(get.mode()=='guozhan'){ + return (event.player.identity!='qun'||player.identity=='ye')&& + !event.player.isUnseen()&&event.player.hasViceCharacter(); + } + else{ + var info=lib.character[event.player.name]; + if(!info) return false; + var skills=event.player.getSkills(); + for(var i=0;i=2) return 1; + return 0; + }).set('choiceList',['弃置装备区内的所有牌并失去一点体力',get.mode()=='guozhan'?'移除副将牌':'随机移除武将牌上的一个技能']); + } + else{ + event._result={index:1}; + } + 'step 1' + if(result.index==1){ + if(get.mode()!='guozhan'){ + var info=lib.character[trigger.player.name]; + var skills=trigger.player.getSkills(); + var list=[]; + for(var i=0;i0; + }, + logTarget:function(){ + return _status.currentPhase; + }, + content:function(){ + var source=_status.currentPhase; + if(source.hasSkill('hengjiang2')){ + source.storage.hengjiang2+=trigger.num; + source.storage.hengjiang3.add(player); + source.updateMarks(); + } + else{ + source.storage.hengjiang3=[player]; + source.storage.hengjiang2=trigger.num; + source.addTempSkill('hengjiang2'); + } + }, + ai:{ + maixie_defend:true, + } + }, + hengjiang2:{ + mark:true, + charlotte:true, + intro:{ + content:'手牌上限-#' + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.hengjiang2; + } + }, + onremove:function(player){ + delete player.storage.hengjiang2; + delete player.storage.hengjiang3; + }, + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + if(event.cards&&event.cards.length) return false; + var players=player.storage.hengjiang3; + for(var i=0;i0; + }, + logTarget:function(){ + return _status.currentPhase; + }, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + event.count--; + var source=_status.currentPhase; + if(source.hasSkill('rehengjiang2')){ + source.storage.rehengjiang2++; + source.storage.rehengjiang3.push(player); + source.storage.rehengjiang3.sortBySeat(source); + source.updateMarks(); + } + else{ + source.storage.rehengjiang3=[player]; + source.storage.rehengjiang2=1; + source.addTempSkill('rehengjiang2'); + } + "step 2" + if(event.count){ + player.chooseBool(get.prompt2('rehengjiang',_status.currentPhase)).set('ai',function(){ + return lib.skill.rehengjiang.check(_status.event.getTrigger(),_status.event.player); + }) + } + else event.finish(); + "step 3" + if(result.bool){ + player.logSkill('rehengjiang',_status.currentPhase); + event.goto(1); + } + }, + ai:{ + maixie_defend:true, + } + }, + rehengjiang2:{ + mark:true, + charlotte:true, + intro:{ + content:'手牌上限-#' + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.rehengjiang2; + } + }, + onremove:function(player){ + delete player.storage.rehengjiang2; + delete player.storage.rehengjiang3; + }, + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + if(event.cards&&event.cards.length) return false; + var players=player.storage.rehengjiang3; + for(var i=0;i1){ + goon=player.hasCard(function(card){ + return card.number>10&&get.value(card)<=5; + }); + } + else{ + goon=player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + }); + } + player.chooseTarget(get.prompt2('shuangren'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.goon&&get.attitude(player,target)<0){ + return get.effect(target,{name:'sha'},player,player); + } + return 0; + }).set('goon',goon); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('shuangren',target); + player.chooseToCompare(target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + var target=event.target; + if(target.identity!='ye'&&target.identity!='unknown'&&game.hasPlayer(function(current){ + if(!player.canUse('sha',current,false)) return false; + if(target==current) return false; + if(get.mode()=='guozhan'){ + return target.identity==current.identity; + } + return true; + })){ + var str='对一名'; + if(get.mode()=='guozhan'){ + str+=get.translation(target.identity)+'势力的'; + } + player.chooseTarget(str+'角色使用一张杀',true,function(card,player,target){ + if(!player.canUse('sha',target,false)) return false; + if(get.mode()=='guozhan'){ + return target.identity==_status.event.identity; + } + return true; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }).set('identity',target.identity); + } + else{ + player.useCard({name:'sha',isCard:true},target,false); + event.finish(); + } + } + else{ + trigger.cancel(); + event.finish(); + } + 'step 3' + if(result.bool&&result.targets&&result.targets.length){ + player.useCard({name:'sha',isCard:true},result.targets[0],false); + } + } + }, + kuanshi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('kuanshi')).set('ai',function(target){ + if(get.attitude(_status.event.player,target)>0){ + return 1/Math.sqrt(target.hp+1); + } + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('kuanshi'); + target.storage.kuanshi2=player; + target.addSkill('kuanshi2'); + } + } + }, + kuanshi2:{ + /*mark:'character', + intro:{ + content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' + },*/ + trigger:{player:'damageBegin4'}, + forced:true, + filter:function(event,player){ + return event.num>1; + }, + //priority:-11, + content:function(){ + trigger.cancel(); + player.storage.kuanshi2.skip('phaseDraw'); + player.removeSkill('kuanshi2'); + }, + group:'kuanshi2_remove', + onremove:true, + subSkill:{ + remove:{ + trigger:{global:['phaseZhunbeiBegin','dieAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.kuanshi2; + }, + content:function(){ + player.removeSkill('kuanshi2'); + } + } + } + }, + xiashu:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + var maxval=0; + var hs=player.getCards('h'); + for(var i=0;i0) return 0.1; + if(maxval>=8) return 0; + if(att==0) return 0.2; + if(dh>=3) return dh; + if(dh==2){ + if(maxval<=7) return dh; + } + if(maxval<=6) return dh; + return 0; + + }).set('maxval',maxval); + 'step 1' + if(result.bool){ + player.logSkill('xiashu',result.targets); + event.target=result.targets[0]; + var hs=player.getCards('h'); + event.target.gain(hs,player,'giveAuto'); + } + else{ + event.finish(); + } + 'step 2' + var hs=event.target.getCards('h'); + if(!hs.length){ + event.finish(); + return; + } + hs.sort(function(a,b){ + return get.value(b,player,'raw')-get.value(a,player,'raw'); + }); + event.target.chooseCard([1,hs.length],'展示至少一张手牌',true).set('ai',function(card){ + var rand=_status.event.rand; + var list=_status.event.list; + if(_status.event.att){ + if(ui.selected.cards.length>=Math.ceil(list.length/2)) return 0; + var value=get.value(card); + if(_status.event.getParent().player.isHealthy()){ + value+=(get.tag(card,'damage')?1.5:0)+(get.tag(card,'draw')?2:0); + } + return value; + } + if(ui.selected.cards.length>=Math.floor(list.length/2)) return 0; + return (list.indexOf(card)%2==rand)?1:0; + }).set('rand',(Math.random()<0.6)?1:0).set('list',hs).set('att',get.attitude(event.target,player)>0); + 'step 3' + event.target.showCards(result.cards); + event.cards1=result.cards; + event.cards2=event.target.getCards('h',function(card){ + return !event.cards1.contains(card); + }); + 'step 4' + var choice; + var num1=event.cards1.length; + var num2=event.cards2.length; + if(get.attitude(event.target,player)>0&&num1>=num2){ + choice=0; + } + else if(num1==num2){ + choice=(Math.random()<0.45)?0:1; + } + else if(num1>num2){ + if(num1-num2==1){ + choice=(Math.random()<0.6)?0:1; + } + else{ + choice=0; + } + } + else{ + if(num2-num1==1){ + choice=(Math.random()<0.6)?1:0; + } + else{ + choice=1; + } + } + player.chooseControl(function(event,player){ + return _status.event.choice; + }).set('choiceList',['获得'+get.translation(event.target)+'展示的牌', + '获得'+get.translation(event.target)+'未展示的牌']).set('choice',choice); + 'step 5' + if(result.index==0){ + player.gain(event.cards1,target,'give'); + } + else{ + player.gain(event.cards2,target,'giveAuto'); + } + }, + ai:{ + expose:0.1 + } + }, + sheyan:{ + audio:2, + trigger:{target:'useCardToTarget'}, + filter:function(event,player){ + if(!event.targets||!event.targets.contains(player)) return false; + var info=get.info(event.card); + if(info.type!='trick') return false; + if(info.multitarget) return false; + if(event.targets.length>1) return true; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,event.player,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + var bool1=(trigger.targets.length>1); + var bool2=game.hasPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); + }); + if(bool1&&bool2){ + player.chooseControlList(get.prompt('sheyan'),['为'+get.translation(trigger.card)+'增加一个目标','为'+get.translation(trigger.card)+'减少一个目标'],function(event,player){ + if(_status.event.add) return 0; + return 1; + }).set('add',get.effect(player,trigger.card,trigger.player,player)>=0); + } + else if(bool2){ + event.type='add'; + event.goto(2); + event.unchosen=true; + } + else{ + event.type='remove'; + event.goto(2); + event.unchosen=true; + } + 'step 1' + if(result.control=='cancel2'){ + event.finish(); + } + else if(result.index==1){ + event.type='remove'; + } + else{ + event.type='add'; + } + 'step 2' + if(event.type=='add'){ + player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ + var trigger=_status.event.getTrigger(); + return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + return get.effect(target,trigger.card,trigger.player,_status.event.player); + }); + } + else{ + player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + }).set('targets',trigger.targets); + } + 'step 3' + if(result.bool){ + if(!event.isMine()) game.delayx(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 4' + player.logSkill('sheyan',event.target); + if(event.type=='add'){ + trigger.targets.push(event.target); + } + else{ + trigger.getParent().excluded.add(event.target); + } + }, + ai:{ + expose:0.2 + } + }, + bingzheng:{ + audio:2, + trigger:{player:'phaseUseEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('bingzheng'),function(card,player,target){ + return target.countCards('h')!=target.hp; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + var nh=target.countCards('h'); + if(att>0){ + if(nh==target.hp-1){ + if(player==target) return att+1; + return att+2; + } + if(player==target&&player.needsToDiscard()) return att/3; + return att; + } + else{ + if(nh==target.hp+1) return -att; + if(nh==0) return 0; + return -att/2; + } + }); + 'step 1' + if(result.bool){ + player.logSkill('bingzheng',result.targets); + event.target=result.targets[0]; + if(event.target.countCards('h')){ + player.chooseControl(function(event,player){ + var target=event.target; + if(get.attitude(player,target)<0) return 1; + return 0; + }).set('choiceList',['令'+get.translation(event.target)+'摸一张牌', + '令'+get.translation(event.target)+'弃置一张手牌']); + } + else{ + event.directfalse=true; + } + } + else{ + event.finish(); + } + 'step 2' + if(event.directfalse||result.index==0){ + event.target.draw(); + } + else{ + event.target.chooseToDiscard('h',true); + } + 'step 3' + if(event.target.countCards('h')==event.target.hp){ + player.draw(); + if(event.target==player){ + event.finish(); + return; + } + var next=player.chooseCard('是否交给'+get.translation(event.target)+'一张牌?','he'); + next.set('ai',function(card){ + if(get.position(card)!='h') return 0; + if(_status.event.shan&&card.name=='shan'){ + return 11; + } + if(_status.event.goon){ + return 10-get.value(card); + } + return -get.value(card,_status.event.player,'raw'); + }); + if(get.attitude(player,event.target)>1&& + player.countCards('h','shan')>1&&player.countCards('h')>event.target.countCards('h')){ + next.set('shan',true); + } + if(get.attitude(player,event.target)>0&&player.needsToDiscard()){ + next.set('goon',true); + } + } + else{ + event.finish(); + } + 'step 4' + if(result.bool){ + event.target.gain(result.cards,player,'giveAuto'); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + fuman:{ + audio:2, + enable:'phaseUse', + filterTarget:function(card,player,target){ + return !target.hasSkill('fuman2')&&target!=player; + }, + filter:function(event,player){ + return player.countCards('h','sha'); + }, + discard:false, + lose:false, + delay:false, + filterCard:{name:'sha'}, + content:function(){ + target.gain(cards,player,'giveAuto'); + target.storage.fuman3=cards[0]; + target.storage.fuman2=player; + target.addTempSkill('fuman2',{player:'phaseAfter'}); + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(!target.hasSha()) return 1.2; + return 1; + } + } + } + }, + fuman2:{ + mod:{ + aiOrder:function(player,card,num){ + if(card==player.storage.fuman3&&player.storage.fuman2.isIn()) return num+get.sgn(get.attitude(player,player.storage.fuman2)); + }, + }, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return event.cards.contains(player.storage.fuman3)&&player.storage.fuman2.isIn(); + }, + mark:true, + intro:{ + content:'下个回合结束之前使用“抚蛮”牌时,令$一张牌' + }, + content:function(){ + 'step 0' + game.delayx(); + 'step 1' + player.line(player.storage.fuman2,'green'); + player.storage.fuman2.draw(); + }, + onremove:function(player){ + delete player.storage.fuman2; + delete player.storage.fuman3; + }, + }, + qizhou:{ + trigger:{player:['phaseBefore','equipEnd','loseEnd']}, + forced:true, + popup:false, + derivation:['mashu','reyingzi','duanbing','fenwei'], + filter:function(event,player){ + if(player.equiping) return false; + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i0; + } + }, + content:function(){ + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i0; + } + if(player.hasSha()&&geteff(target)){ + var num=game.countPlayer(function(current){ + return current!=player&&get.distance(player,current)<=1&&geteff(current); + }); + if(num==0){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current)&&geteff(current)&¤t!=target; + })){ + return 1; + } + } + else if(num==1){ + return 1; + } + } + return 0; + } + } + } + }, + fenxun2:{ + mark:'character', + onremove:true, + intro:{ + content:'到$的距离视为1' + }, + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.fenxun2){ + return -Infinity; + } + } + } + }, + duanbing:{ + audio:2, + audioname:['heqi'], + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse(event.card,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('duanbing'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ + return !_status.event.sourcex.contains(target)&&get.distance(player,target)<=1&&player.canUse(_status.event.card,target); + }).set('sourcex',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!_status.connectMode) game.delayx(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('duanbing',event.target); + trigger.targets.push(event.target); + }, + ai:{ + effect:{ + player:function(card,player,target,current,isLink){ + if(!isLink&&card.name=='sha'){ + if(player._duanbingtmp) return; + player._duanbingtmp=true; + if(get.effect(target,card,player,player)<=0){ + delete player._duanbingtmp; + return; + } + if(game.hasPlayer(function(current){ + return current!=target&&get.distance(player,current)<=1&& + player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })){ + delete player._duanbingtmp; + return [1,1]; + } + delete player._duanbingtmp; + } + } + } + } + }, + fuhan:{ + audio:2, + trigger:{player:'phaseBegin'}, + unique:true, + limited:true, + skillAnimation:true, + animationColor:'orange', + forceunique:true, + //filter:function(event,player){ + // return player.storage.fanghun2>0; + //}, + prompt:function(event,player){ + var num=Math.max(2,player.storage.fanghun2||0); + num=Math.min(num,8); + return get.prompt('fuhan')+'(体力上限:'+num+')'; + }, + check:function(event,player){ + var num=Math.max(2,player.storage.fanghun2||0); + if(num==1) return false; + if(player.hp<=1) return true; + if(num==2) return false; + if(num==3) return player.hp<3&&player.isMinHp(); + return true; + }, + content:function(){ + 'step 0' + if(player.storage.fanghun) player.draw(player.storage.fanghun); + player.removeMark('fanghun',player.storage.fanghun); + event.num=Math.max(2,player.storage.fanghun2||0); + var list; + if(_status.characterlist){ + list=[]; + for(var i=0;i<_status.characterlist.length;i++){ + var name=_status.characterlist[i]; + if(lib.character[name][1]=='shu') list.push(name); + } + } + else if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; + }); + } + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='shu'; + }); + } + var players=game.players.concat(game.dead); + for(var i=0;i0) player.gainMaxHp(num); + else player.loseMaxHp(-num); + player.recover(); + } + }, + refuhan:{ + audio:'fuhan', + trigger:{player:'phaseBegin'}, + unique:true, + limited:true, + skillAnimation:true, + animationColor:'orange', + forceunique:true, + filter:function(event,player){ + return player.countMark('fanghun')>0; + }, + content:function(){ + 'step 0' + if(player.storage.fanghun) player.draw(player.storage.fanghun); + player.removeMark('fanghun',player.storage.fanghun); + var list; + if(_status.characterlist){ + list=[]; + for(var i=0;i<_status.characterlist.length;i++){ + var name=_status.characterlist[i]; + if(lib.character[name][1]=='shu') list.push(name); + } + } + else if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; + }); + } + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='shu'; + }); + } + var players=game.players.concat(game.dead); + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.name(card,player)) return 1; + return 0; + } + return 1; + }, + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.name(card,player); + if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true; + if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true; + if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true; + if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true; + return false; + }, + filter:function(event,player){ + if(!player.storage.fanghun||player.storage.fanghun<0) return false; + var filter=event.filterCard; + if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; + if(filter({name:'jiu'},player, event)&&player.countCards('h','tao')) return true; + return false; + }, + onrespond:function(){return this.onuse.apply(this,arguments)}, + onuse:function(result,player){ + player.removeMark('fanghun',1); + }, + ai:{ + respondSha:true, + respondShan:true, + save:true, + skillTagFilter:function(player,tag){ + if(!player.storage.fanghun||player.storage.fanghun<0) return false; + var name; + switch(tag){ + case 'respondSha':name='shan';break; + case 'respondShan':name='sha';break; + case 'save':name='jiu';break; + } + if(!player.countCards('h',name)) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao','jiu']; + var map={sha:'shan',tao:'jiu',jiu:'tao'} + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max) max=temp; + } + } + if(max>0) max+=0.3; + return max; + } + return 4; + }, + }, + }, + } + }, + yjixi:{ + init:function(player){ + player.storage.yjixi=0; + }, + derivation:'wangzun', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.yjixi>=3; + }, + skillAnimation:true, + animationColor:'gray', + unique:true, + juexingji:true, + content:function(){ + 'step 0' + player.awakenSkill('yjixi'); + player.gainMaxHp(); + player.recover(); + 'step 1' + var str='摸两张牌'; + var mode=get.mode(); + var choice='选项一'; + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + var list=[]; + var zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;i=6) return 0; + return 20-num; + } + else{ + if(_status.event.player.needsToDiscard()){ + return 7-num; + } + } + return 0; + }, + discard:false, + lose:false, + delay:false, + content:function(){ + 'step 0' + target.gain(cards,player,'giveAuto'); + if(get.color(cards[0])=='black'){ + target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)<0); + } + else{ + event.finish(); + } + 'step 1' + if(!result.bool){ + player.draw(2); + } + }, + ai:{ + order:8, + expose:0.2, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ + if(target.countCards('h')0) player.markSkill('shanjia'); + }, + audio:2, + intro:{ + content:function(storage){ + if(storage==0) return '未使用过装备牌'; + return '已使用过'+storage+'张装备牌'; + } + }, + group:'shanjia2', + trigger:{player:'phaseUseBegin'}, + frequent:true, + filter:function(event,player){ + lib.skill.shanjia.sync(player); + return player.storage.shanjia>0; + }, + content:function(){ + 'step 0' + lib.skill.shanjia.sync(player); + player.draw(Math.min(7,player.storage.shanjia)); + 'step 1' + player.chooseToDiscard('he',Math.min(7,player.storage.shanjia),true); + 'step 2' + var useCard=false; + if(result.bool&&result.cards){ + for(var i=0;i0) + })){ + return 6-get.value(card); + } + } + return 0; + }, + content:function(){ + player.loseHp(); + switch(get.type(cards[0],'trick')){ + case 'basic':player.addTempSkill('zhanyi_basic');break; + case 'equip':player.addTempSkill('zhanyi_equip');break; + case 'trick':player.addTempSkill('zhanyi_trick');player.draw(2);break; + } + }, + ai:{ + order:9.1, + result:{ + player:1 + } + } + }, + zhanyi_basic:{ + group:['zhanyi_basic_sha','zhanyi_basic_jiu','zhanyi_basic_tao'] + }, + zhanyi_basic_tao:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'tao'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当桃使用', + check:function(card){ + return 8-get.value(card); + }, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + save:true, + } + }, + zhanyi_basic_sha:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当杀使用', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + respondSha:true, + } + }, + zhanyi_basic_jiu:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'jiu'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当酒使用', + check:function(card){ + if(_status.event.type=='dying') return 1; + return 4-get.value(card); + }, + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{type:'basic'})>0&&player.hp<=0; + }, + save:true, + } + }, + zhanyi_equip:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + trigger.target.chooseToDiscard('he',true,2); + } + }, + zhanyi_trick:{ + mod:{ + targetInRange:function(){ + return true; + } + } + }, + shichou:{ + //audio:1, + skillAnimation:true, + animationColor:'orange', + unique:true, + limited:true, + mark:false, + trigger:{player:'phaseZhunbeiBegin'}, + zhuSkill:true, + direct:true, + filter:function(event,player){ + if(!player.hasZhuSkill('shichou'))return false; + if(player.countCards('he')<2) return false; + return !player.storage.shichou; + }, + init:function(player){ + if(player.hasZhuSkill('shichou')){ + player.markSkill('shichou'); + player.storage.shichou=false; + } + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + prompt:get.prompt2('shichou'), + selectCard:2, + filterTarget:function(card,player,target){ + return target.group=='shu'&&target!=player; + }, + filterCard:true, + position:'he', + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player; + if(player.hasUnknown()) return 0; + var att=get.attitude(player,target); + if(att<=0){ + if(target.hp==1) return (10-att)/2; + return 10-att; + } + else{ + if(target.hp==1) return 0; + return (10-att)/4; + } + }, + }); + "step 1" + if(!result.bool) return; + var target=result.targets[0]; + var cards=result.cards; + player.storage.shichou=true; + player.logSkill('shichou',target); + player.awakenSkill('shichou'); + target.gain(cards,player,'giveAuto'); + player.storage.shichou_target=target; + player.addSkill('shichou2'); + target.markSkillCharacter('shichou',player,'誓仇','代替'+get.translation(player)+'承受伤害直到首次进入濒死状态'); + }, + intro:{ + content:'limited' + }, + }, + shichou2:{ + group:'shichou3', + trigger:{player:'damageBegin3'}, + forced:true, + popup:false, + content:function(){ + trigger.player=player.storage.shichou_target; + trigger.shichou4=true; + trigger.player.addSkill('shichou4'); + player.logSkill('shichou2',player.storage.shichou_target); + game.delay(0.5); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(get.attitude(player,target)>0) return [0,0]; + var eff=get.damageEffect(target.storage.shichou_target,player,target); + if(eff>0){ + return [0,1]; + } + else if(eff<0){ + return [0,-2]; + } + else{ + return [0,0]; + } + } + } + } + } + }, + shichou3:{ + trigger:{global:['dying','dieBegin']}, + forced:true, + popup:false, + //priority:10, + filter:function(event,player){ + return event.player==player.storage.shichou_target; + }, + content:function(){ + trigger.player.unmarkSkill('shichou'); + delete player.storage.shichou_target; + player.removeSkill('shichou2'); + } + }, + shichou4:{ + trigger:{player:['damageAfter','damageCancelled']}, + forced:true, + popup:false, + audio:false, + content:function(){ + if(!trigger.shichou4) return; + if(event.triggername=='damageAfter'&&trigger.num){ + player.draw(trigger.num); + } + player.removeSkill('shichou4'); + } + }, + zhaolie:{ + trigger:{player:'phaseDrawBegin2'}, + direct:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('zhaolie'),function(card,player,target){ + return target!=player&&player.inRange(target); + }).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0) return 0; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + trigger.num--; + player.storage.zhaolie=result.targets[0]; + player.logSkill('zhaolie',result.targets); + player.addTempSkill('zhaolie2','phaseDrawAfter'); + } + } + }, + zhaolie2:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + content:function(){ + 'step 0' + event.cards=get.cards(3); + player.showCards(event.cards); + 'step 1' + event.basic=[]; + event.nonbasic=[]; + event.todis=[]; + for(var i=0;i1?0:7-get.value(card); + case 2:return 8-get.value(card); + case 3:return 10-get.value(card); + default:return 0; + } + }).set('num',num); + } + 'step 2' + var num=event.nonbasic.length; + var undone=false; + if(num==0){ + if(event.basic.length){ + result.targets[0].gain(event.basic,'gain2','log'); + } + } + else{ + if(result.bool){ + if(event.basic.length){ + player.gain(event.basic,'gain2','log'); + } + } + else{ + player.storage.zhaolie.damage(num); + if(event.basic.length){ + undone=true; + } + } + } + if(!undone){ + delete player.storage.zhaolie; + event.finish(); + } + 'step 3' + if(player.storage.zhaolie.isAlive()){ + player.storage.zhaolie.gain(event.basic,'gain2','log'); + } + else{ + game.cardsDiscard(event.basic); + } + delete player.storage.zhaolie; + } + }, + dingpan:{ + enable:'phaseUse', + filter:function(event,player){ + var num; + var mode=get.mode(); + if(mode=='identity'){ + if(_status.mode=='purple') num=player.getEnemies().length; + else num=get.population('fan'); + } + else if(mode=='versus'){ + num=player.getEnemies().length; + } + else{ + num=1; + } + if((player.getStat().skill.dingpan||0)>=num) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target.countCards('e')>0; + }, + content:function(){ + 'step 0' + target.draw(); + 'step 1' + var goon=get.damageEffect(target,player,target)>=0; + if(!goon&&target.hp>=4&&get.attitude(player,target)<0){ + var es=target.getCards('e'); + for(var i=0;i=8){ + goon=true;break; + } + } + } + target.chooseControl(function(){ + if(_status.event.goon) return '选项二'; + return '选项一'; + }).set('goon',goon).set('prompt','定叛').set('choiceList',['令'+get.translation(player)+'弃置你装备区里的一张牌','获得你装备区内的所有牌并受到一点伤害']); + 'step 2' + if(result.control=='选项一'){ + player.discardPlayerCard(target,true,'e'); + event.finish(); + } + else{ + target.gain(target.getCards('e'),'gain2'); + } + 'step 3' + game.delay(0.5); + target.damage(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(get.damageEffect(target,player,target)>=0) return 2; + var att=get.attitude(player,target); + if(att==0) return 0; + var es=target.getCards('e'); + if(att>0&&(target.countCards('h')>2||target.needsToDiscard(1))) return 0; + if(es.length==1&&att>0) return 0; + for(var i=0;i0){ + return 1; + } + } + else if(val>=7){ + if(att<0){ + return -1; + } + } + } + return 0; + } + } + } + }, + hongde:{ + audio:2, + trigger:{player:['gainAfter','loseAfter']}, + direct:true, + filter:function(event,player){ + if(event.name=='lose'&&event.type=='gain'&&event.getParent().player==player) return false; + if(event.name=='gain') return event.cards&&event.cards.length>1; + return event.cards2&&event.cards2.length>1; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('hongde'),'令一名其他角色摸一张牌',function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return get.attitude(player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('hongde',result.targets); + result.targets[0].draw(); + } + } + }, + ziyuan:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:function(card){ + var num=0; + for(var i=0;i0); + })){ + return 10; + } + return 1; + }, + result:{ + player:function(player,target){ + if(get.attitude(player,target)<0) return -1; + var eff=get.recoverEffect(target,player,player); + if(eff<0) return 0; + if(eff>0){ + if(target.hp==1) return 3; + return 2; + } + if(player.needsToDiscard()) return 1; + return 0; + } + }, + threaten:1.3 + } + }, + jugu:{ + audio:2, + mod:{ + maxHandcard:function(player,num){ + return num+player.maxHp; + } + }, + trigger:{global:'gameDrawAfter',player:'enterGame'}, + forced:true, + content:function(){ + player.draw(player.maxHp); + } + }, + tuifeng:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + notemp:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + init:function(player){ + if(!player.storage.tuifeng) player.storage.tuifeng=[]; + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt2('tuifeng'),'he',[1,trigger.num]).set('ai',function(card){ + if(card.name=='du') return 20; + return 7-get.useful(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('tuifeng'); + player.lose(result.cards,ui.special,'toStorage'); + player.$give(result.cards,player,false); + for(var i=0;i0; + }, + content:function(){ + player.draw(2*player.storage.tuifeng.length); + player.addTempSkill('tuifeng3'); + player.storage.tuifeng3=player.storage.tuifeng.length; + player.unmarkSkill('tuifeng'); + } + }, + tuifeng3:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3; + } + }, + onremove:true + }, + weidi:{ + trigger:{global:['gameStart','zhuUpdate']}, + forced:true, + audio:2, + filter:function(event,player){ + var mode=get.mode(); + return (mode=='identity'||(mode=='versus'&&_status.mode=='four')); + }, + content:function(){ + var list=[]; + var zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;i0; + }, + init:function(player){ + player.storage.jianshu=false; + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(ui.selected.targets.length){ + return ui.selected.targets[0]!=target&&!ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h') + &&!target.hasSkillTag('noCompareTarget'); + } + return true; + }, + filterCard:{color:'black'}, + mark:true, + discard:false, + lose:false, + delay:false, + check:function(card){ + if(_status.event.player.hp==1) return 8-get.value(card); + return 6-get.value(card); + }, + selectTarget:2, + multitarget:true, + content:function(){ + 'step 0' + player.awakenSkill('jianshu'); + player.storage.jianshu=true; + targets[0].gain(cards,player,'give'); + 'step 1' + targets[0].chooseToCompare(targets[1]); + 'step 2' + if(result.bool){ + targets[0].chooseToDiscard('he',2,true); + targets[1].loseHp(); + } + else if(result.tie){ + targets[0].loseHp() + targets[1].loseHp() + } + else{ + targets[1].chooseToDiscard('he',2,true); + targets[0].loseHp(); + } + }, + intro:{ + content:'limited' + }, + ai:{ + expose:0.4, + order:4, + result:{ + target:function(player,target){ + if(player.hasUnknown()) return 0; + if(ui.selected.targets.length) return -1; + return -0.5; + } + } + } + }, + yongdi:{ + audio:2, + unique:true, + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + animationColor:'thunder', + skillAnimation:'legend', + filter:function(event,player){ + return !player.storage.yongdi; + }, + init:function(player){ + player.storage.yongdi=false; + }, + mark:true, + intro:{ + content:'limited' + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('yongdi'),function(card,player,target){ + return (target.sex=='male'||target.name=='key_yuri')&&target!=player; + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<=1) return 0; + var mode=get.mode(); + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + if(target.name&&lib.character[target.name]){ + for(var i=0;i0; + }, + multitarget:true, + multiline:true, + content:function(){ + player.chooseToCompare(targets).callback=lib.skill.gushe.callback; + }, + intro:{ + name:'饶舌', + content:'mark' + }, + chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚颜无耻之人!'], + callback:function(){ + 'step 0' + if(event.num1<=event.num2){ + target.chat(lib.skill.gushe.chat[player.countMark('gushe')]); + game.delay(); + player.addMark('gushe',1); + if(player.countMark('gushe')>=7){ + player.die(); + } + } + 'step 1' + if(event.num1>=event.num2){ + target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ + if(_status.event.goon) return 6-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)<0); + } + else event.goto(3); + 'step 2' + if(!result.bool){ + player.draw(); + } + 'step 3' + if(event.num1<=event.num2){ + player.chooseToDiscard('he','弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); + } + else event.finish(); + 'step 4' + if(!result.bool) player.draw(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + var num=ui.selected.targets.length+1; + if(num>3) num=3; + var hs=player.getCards('h'); + for(var i=0;i5&&player.countMark('gushe')+num<=6) return -1; + } + } + } + return 0; + }, + } + } + }, + jici:{ + audio:2, + trigger:{player:'compare'}, + filter:function(event,player){ + return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.countMark('gushe'); + }, + content:function(){ + if(trigger.num10; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + filterCard:{name:'sha'}, + content:function(){ + 'step 0' + target.chooseToDiscard('he',true); + 'step 1' + if(target.hp>=player.hp&&result.bool&&result.cards[0].name!='sha'){ + player.useCard({name:'juedou',isCard:true},target); + } + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(get.effect(target,{name:'juedou'},player,player)<=0){ + return 0; + } + if(target.hpplayer.hp) return -0.1; + return 0; + } + var hs1=target.getCards('h','sha'); + var hs2=player.getCards('h','sha'); + if(hs1.length>hs2.length){ + return 0; + } + var hsx=target.getCards('h'); + if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){ + return 0; + } + if(hsx.length>3&&hs2.length<=1){ + return 0; + } + if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ + return 0; + } + return -1; + } + } + } + }, + shefu:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + init:function(player){ + if(!player.storage.shefu) player.storage.shefu=[]; + if(!player.storage.shefu2) player.storage.shefu2=[]; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + player.storage.shefu2=[]; + }, + mark:function(dialog,content,player){ + if(content&&content.length){ + dialog.addAuto(content); + if(player.isUnderControl(true)){ + var str=''; + for(var i=0;i'+str+'') + } + } + }, + }, + content:function(){ + 'step 0' + var list1=[],list2=[],list3=[]; + for(var i=0;i=5) return false; + if(nh2>nh2&&event.source.isDead()) return false; + return true; + }, + direct:true, + content:function(){ + "step 0" + var num1=player.countCards('h'); + var num2=trigger.source.countCards('h'); + if(num1>num2){ + var next=player.chooseToDiscard([num2+1,num1],'贲育:是否弃置至少'+(num2+1)+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); + next.logSkill=['benyu',trigger.source]; + next.set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + if(ui.selected.cards.length>=_status.event.num){ + return -1; + } + if(get.damageEffect(trigger.source,player,player)>0&&_status.event.num<=2){ + return 8-get.value(card); + } + return -1; + }); + next.set('num',num2+1); + } + else{ + event.draw=true; + event.num=Math.min(num2,5)-num1; + player.chooseBool(get.prompt2('benyu')); + } + "step 1" + if(result.bool){ + if(event.draw){ + player.logSkill('benyu',trigger.source); + player.draw(event.num); + } + else{ + trigger.source.damage(player); + } + } + }, + }, + jili:{ + audio:2, + trigger:{ + global:'useCardToTarget' + }, + forced:true, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)>0; + }, + filter:function(event,player){ + if(get.color(event.card)!='red') return false; + if(!event.targets) return false; + if(event.player==player) return false; + if(event.targets.contains(player)) return false; + if(get.info(event.card).multitarget) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + if(lib.filter.targetEnabled2(event.card,event.player,player)){ + for(var i=0;i0&&event.player!=player&&!player.hasSkill('zhidao2'); + }, + forced:true, + content:function(){ + var num=0; + if(trigger.player.countCards('h')) num++; + if(trigger.player.countCards('e')) num++; + if(trigger.player.countCards('j')) num++; + if(num){ + player.gainPlayerCard(trigger.player,num,'hej',true).set('filterButton',function(button){ + for(var i=0;i0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('qizhi'),'弃置一名角色的一张牌,然后其摸一张牌',function(card,player,target){ + return !_status.event.targets.contains(target)&&target.countCards('he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(target==player) return 2; + if(get.attitude(player,target)<=0){ + return 1 + } + return 0.5; + }).set('targets',trigger.targets); + 'step 1' + if(result.bool){ + player.getHistory('custom').push({qizhi:true}); + if(!event.isMine()&&!_status.connectMode) game.delay(); + player.logSkill('qizhi',result.targets); + player.discardPlayerCard(result.targets[0],true,'he'); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + event.target.draw(); + }, + }, + jinqu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + check:function(event,player){ + return player.getHistory('custom',function(evt){ + return evt.qizhi==true; + }).length>=player.countCards('h'); + }, + prompt:function(event,player){ + var num=player.getHistory('custom',function(evt){ + return evt.qizhi==true; + }).length; + return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(num)+'张?'; + }, + content:function(){ + 'step 0' + player.draw(2); + 'step 1' + var dh=player.countCards('h')-player.getHistory('custom',function(evt){ + return evt.qizhi==true; + }).length; + if(dh>0){ + player.chooseToDiscard(dh,true); + } + } + }, + mouduan:{ + audio:1, + init2:function(player){ + game.broadcastAll(function(player){ + player._mouduan_mark=player.mark('武',{ + content:'拥有技能【激昂】、【谦逊】' + }); + },player); + player.addAdditionalSkill('mouduan',['jiang','qianxun']); + }, + onremove:function(player){ + game.broadcastAll(function(player){ + if(player._mouduan_mark){ + player._mouduan_mark.delete(); + delete player._mouduan_mark; + } + },player); + player.removeAdditionalSkill('mouduan'); + }, + trigger:{player:'loseEnd'}, + forced:true, + filter:function(event,player){ + return player._mouduan_mark&&player._mouduan_mark.name=='武'&&player.countCards('h')<=2; + }, + content:function(){ + game.broadcastAll(function(player){ + if(!player._mouduan_mark) return; + player._mouduan_mark.name='文'; + player._mouduan_mark.skill='文'; + player._mouduan_mark.firstChild.innerHTML='文'; + player._mouduan_mark.info.content='拥有技能【英姿】、【克己】'; + },player); + player.addAdditionalSkill('mouduan',['yingzi','keji']); + }, + group:'mouduan2' + }, + mouduan2:{ + audio:1, + trigger:{global:'phaseZhunbeiBegin'}, + //priority:5, + filter:function(event,player){ + return player._mouduan_mark&&player._mouduan_mark.name=='文'&&player.countCards('h')>2; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard('he','谋断:是否弃置一张牌将标记变为“武”?').ai=function(){ + return -1; + } + 'step 1' + if(result.bool&&player.countCards('h')>2){ + game.broadcastAll(function(player){ + if(!player._mouduan_mark) return; + player._mouduan_mark.name='武'; + player._mouduan_mark.skill='武'; + player._mouduan_mark.firstChild.innerHTML='武'; + player._mouduan_mark.info.content='拥有技能【激昂】、【谦逊】'; + },player); + player.addAdditionalSkill('mouduan',['jiang','qianxun']); + } + } + }, + tanhu:{ + audio:1, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + target.addTempSkill('tanhu2'); + } + }, + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + return -1; + } + }, + order:9, + }, + group:'tanhu3' + }, + tanhu2:{ + mark:true, + intro:{ + content:'已成为探虎目标' + } + }, + tanhu3:{ + mod:{ + globalFrom:function(from,to){ + if(to.hasSkill('tanhu2')) return -Infinity; + }, + wuxieRespondable:function(card,player,target){ + if(target&&target.hasSkill('tanhu2')) return false; + } + } + }, + jiaozi:{ + audio:2, + trigger:{player:'damageBegin3',source:'damageBegin1'}, + forced:true, + filter:function(event,player){ + return player.isMaxHandcard(true); + }, + content:function(){ + trigger.num++; + }, + ai:{presha:true}, + }, + jiqiao:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt2('jiqiao'),[1,player.countCards('he',{type:'equip'})],'he',function(card){ + return get.type(card)=='equip'; + }).set('ai',function(card){ + if(card.name=='bagua') return 10; + return 7-get.value(card); + }).logSkill='jiqiao'; + 'step 1' + if(result.bool){ + event.cards=get.cards(2*result.cards.length); + player.showCards(event.cards); + } + else{ + event.finish(); + } + 'step 2' + var gained=[]; + var tothrow=[]; + for(var i=0;i=2&&he<=3){ + return '弃牌'; + } + if(player.maxHp-player.hp>=3&&he<=5){ + return '弃牌'; + } + if(player.maxHp-player.hp>3){ + return '弃牌'; + } + return '出杀'; + } + return '出杀'; + }).set('prompt','弃置'+get.translation(trigger.player)+get.cnNumber(player.maxHp-player.hp)+'张牌,或对任意一名角色使用一张杀'); + 'step 1' + if(result.control=='弃牌'){ + player.line(trigger.player,'green'); + if(player.hp1) return false; + if(!event.target) return false; + if(event.target.hp>=player.hp) return false; + + var card=event.card; + if(card.name=='sha') return true; + if(get.color(card)=='black'&&get.type(card,'trick')=='trick') return true; + return false; + }, + content:function(){ + "step 0" + var save=false; + if(get.attitude(player,trigger.target)>2){ + if(trigger.card.name=='sha'){ + if(player.countCards('h','shan')||player.getEquip(2)|| + trigger.target.hp==1||player.hp>trigger.target.hp+1){ + if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')0; + }, + content:function(){ + 'step 0' + player.chooseToCompare(target).set('preserve','win'); + 'step 1' + if(result.bool&&result.target){ + event.type=true; + event.card=result.target; + player.chooseTarget('将'+get.translation(result.target)+'交给一名角色',function(card,player,target){ + return target.hp<=player.hp; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du) return -att; + return att; + }).set('du',event.card.name=='du'); + target.addTempSkill('dahe2'); + } + else{ + event.type=false; + if(player.countCards('h')){ + player.showHandcards(); + player.chooseToDiscard('h',true); + } + } + 'step 2' + if(event.type){ + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'gain2'); + } + } + }, + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + if(player.canUse('sha',target)&&(player.countCards('h','sha'))){ + return -2; + } + return -0.5; + } + }, + order:9, + } + }, + dahe2:{ + mark:true, + intro:{ + content:'非红桃闪无效' + }, + mod:{ + cardRespondable:function(card,player){ + if(card.name=='shan'&&get.suit(card)!='heart') return false; + }, + cardEnabled:function(card,player){ + if(card.name=='shan'&&get.suit(card)!='heart') return false; + }, + } + }, + xunzhi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + init:function(player){ + player.storage.xunzhi=0; + }, + filter:function(event,player){ + var previous=player.getPrevious(); + var next=player.getNext(); + if(previous&&next){ + return player.hp!=previous.hp&&player.hp!=next.hp; + } + return false; + }, + check:function(event,player){ + return player.hp>=3&&player.countCards('h')>player.hp+1+player.storage.xunzhi; + }, + content:function(){ + player.loseHp(); + player.storage.xunzhi+=2; + }, + mark:true, + intro:{ + content:function(storage,player){ + return '手牌上限+'+player.storage.xunzhi; + } + }, + mod:{ + maxHandcard:function(player,num){ + if(typeof player.storage.xunzhi=='number'){ + return num+player.storage.xunzhi; + } + } + } + }, + yawang:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + check:function(event,player){ + var num=game.countPlayer(function(target){ + return target.hp==player.hp; + }); + if(!player.hasSkill('xunzhi2')){ + var nh=player.countCards('h'); + if(nh>5) return false; + if(num==3&&nh>3) return false; + } + return num>=3; + }, + content:function(){ + trigger.changeToZero(); + var num=game.countPlayer(function(target){ + return target.hp==player.hp; + }); + if(num){ + player.draw(num); + } + player.storage.yawang=num; + player.addTempSkill('yawang2'); + } + }, + yawang2:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.currentPhase!=player) return; + if(player.countUsed()>=player.storage.yawang) return false; + } + } + }, + junwei:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.yinling&&player.storage.yinling.length>=3; + }, + content:function(){ + 'step 0' + if(player.storage.yinling.length>3){ + player.chooseButton(3,[get.prompt('junwei'),'hidden',player.storage.yinling]).set('ai',function(button){ + return 1; + }); + } + else{ + player.chooseBool().set('createDialog',[get.prompt('junwei'),'hidden',player.storage.yinling]).set('dialogselectx',true).set('choice',true); + event.cards=player.storage.yinling.slice(0); + } + 'step 1' + if(result.bool){ + player.logSkill('junwei'); + var cards=event.cards||result.links; + for(var i=0;i1) return 1; + if(_status.event.player.hp>=3) return 0; + return 1; + }).set('nshan',nshan); + } + } + else{ + event.finish(); + } + 'step 3' + if(!event.directfalse&&result.bool) game.delay(); + ui.clear(); + 'step 4' + if(!event.directfalse&&result.bool){ + event.cards=result.cards; + event.target.$throw(result.cards); + player.chooseTarget('将'+get.translation(event.cards)+'交给一名角色',true,function(card,player,target){ + return target!=_status.event.getParent().target; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target)/(target.countCards('h','shan')+1); + }); + } + else{ + event.target.loseHp(); + delete event.cards; + } + 'step 5' + if(event.cards){ + player.line(result.targets,'green'); + result.targets[0].gain(event.cards,'gain2'); + game.log(player,'将',event.cards,'交给',result.targets[0]); + event.finish(); + } + else{ + if(event.target.countCards('e')){ + player.choosePlayerCard('e','将'+get.translation(event.target)+'的一张装备牌移出游戏',true,event.target); + } + else{ + event.finish(); + } + } + 'step 6' + if(result.bool){ + var card=result.links[0]; + if(event.target.storage.junwei2){ + event.target.storage.junwei2.push(card); + event.target.markSkill('junwei2'); + } + else{ + event.target.storage.junwei2=[card]; + } + event.target.lose(card,ui.special,'toStorage'); + event.target.addSkill('junwei2'); + event.target.syncStorage('junwei2'); + } + } + }, + junwei2:{ + mark:true, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + 'step 0' + if(player.storage.junwei2.length){ + var card=player.storage.junwei2.shift(); + player.equip(card); + event.redo(); + } + 'step 1' + player.removeSkill('junwei2'); + delete player.storage.junwei2; + } + }, + yinling:{ + enable:'phaseUse', + filterCard:{color:'black'}, + position:'he', + intro:{ + content:'cards', + onunmark:'throw' + }, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0&&player.storage.yinling.length<4; + }, + filterTarget:function(card,player,target){ + return target.countCards('he')>0&&target!=player; + }, + init:function(player){ + player.storage.yinling=[]; + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + player.choosePlayerCard('hej',target,true); + 'step 1' + if(result.bool&&result.links&&result.links.length){ + target.$give(result.links,player,false); + target.lose(result.links,ui.special,'toStorage'); + player.storage.yinling.push(result.links[0]); + player.markSkill('yinling'); + player.syncStorage('yinling'); + } + }, + ai:{ + order:10.1, + expose:0.1, + result:{ + target:function(player,target){ + if(target.hasSkill('tuntian')) return 0; + var es=target.getCards('e'); + var nh=target.countCards('h'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ + return -1.5; + } + return 2; + } + return -1.5; + }, + }, + } + }, + yanxiao:{ + audio:2, + enable:'phaseUse', + filterCard:{suit:'diamond'}, + filterTarget:true, + check:function(card){ + return 7-get.value(card); + }, + position:'he', + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + discard:false, + //lose:false, + visible:true, + toStorage:true, + prepare:'give', + content:function(){ + //player.lose(cards,ui.special,'toStorage','visible'); + if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ + target.storage.yanxiao2.push(cards[0]); + target.syncStorage('yanxiao2'); + target.markSkill('yanxiao2'); + } + else{ + target.storage.yanxiao2=cards.slice(0); + target.syncStorage('yanxiao2'); + target.addSkill('yanxiao2'); + } + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.storage.yanxiao2&&target.storage.yanxiao2.length) return 0; + if(target.countCards('j')) return 1; + return 0; + } + } + } + }, + yanxiao2:{ + audio:'yanxiao', + mark:true, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + trigger:{player:'phaseJudgeBegin'}, + forced:true, + content:function(){ + var cards=player.storage.yanxiao2.concat(player.getCards('j')); + player.gain(cards,'gain2','log','fromStorage'); + delete player.storage.yanxiao2; + player.removeSkill('yanxiao2'); + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)=='delay') return [0,0.1]; + } + } + } + }, + anxian:{ + audio:2, + group:['anxian_source','anxian_target'], + subSkill:{ + source:{ + audio:"anxian", + trigger:{source:'damageBegin2'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; + }, + check:function(event,player){ + if(get.damageEffect(event.player,player,player)<=0) return true; + return false; + }, + content:function(){ + 'step 0' + if(trigger.player.countCards('h')){ + trigger.player.chooseToDiscard(true); + } + 'step 1' + player.draw(); + trigger.cancel(); + } + }, + target:{ + audio:"anxian", + trigger:{target:'useCardToTargeted'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&player.countCards('h'); + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt2('anxian')); + next.set('ai',function(card){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + if(get.attitude(player,trigger.player)>0){ + return 9-get.value(card); + } + if(player.countCards('h',{name:'shan'})) return -1; + return 7-get.value(card); + }); + next.logSkill='anxian'; + "step 1" + if(result.bool){ + trigger.player.draw(); + trigger.getParent().excluded.push(player); + } + }, + } + } + }, + luoyan_tianxiang:{ + inherit:'tianxiang', + filter:function(event,player){ + if(!player.storage.xingwu||!player.storage.xingwu.length) return false; + if(player.hasSkill('tianxiang')) return false; + return lib.skill.tianxiang.filter(event,player); + }, + }, + luoyan_liuli:{ + inherit:'liuli', + filter:function(event,player){ + if(!player.storage.xingwu||!player.storage.xingwu.length) return false; + if(player.hasSkill('liuli')) return false; + return lib.skill.liuli.filter(event,player); + }, + }, + luoyan:{ + group:['luoyan_tianxiang','luoyan_liuli'], + }, + xingwu:{ + audio:2, + group:['xingwu_color','xingwu_color2'], + subSkill:{ + color:{ + trigger:{player:'phaseZhunbeiBegin'}, + silent:true, + content:function(){ + player.storage.xingwu_color=['black','red']; + } + }, + color2:{ + trigger:{player:'useCard'}, + silent:true, + filter:function(event,player){ + return Array.isArray(player.storage.xingwu_color)&&_status.currentPhase==player; + }, + content:function(){ + player.storage.xingwu_color.remove(get.color(trigger.card)); + } + } + }, + trigger:{player:'phaseDiscardBegin'}, + direct:true, + filter:function(event,player){ + if(!player.storage.xingwu_color) return false; + var length=player.storage.xingwu_color.length; + if(length==0) return false; + var hs=player.getCards('h'); + if(hs.length==0) return false; + if(length==2) return true; + var color=player.storage.xingwu_color[0]; + for(var i=0;i0&& + get.attitude(player,current)<0) + })) return 0; + } + return 7-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('xingwu'); + if(player.storage.xingwu.length<2){ + player.$give(result.cards,player); + } + player.lose(result.cards,ui.special); + player.storage.xingwu=player.storage.xingwu.concat(result.cards); + player.markSkill('xingwu'); + player.syncStorage('xingwu'); + } + else{ + event.finish(); + } + 'step 2' + if(player.storage.xingwu.length==3){ + player.$throw(player.storage.xingwu); + while(player.storage.xingwu.length){ + player.storage.xingwu.shift().discard(); + } + player.unmarkSkill('xingwu'); + player.chooseTarget(function(card,player,target){ + return target!=player&&target.sex=='male'; + },'对一名男性角色造成两点伤害并弃置其装备区内的牌').set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0) return -1; + return get.damageEffect(target,player,player)+target.countCards('e')/2; + }); + } + else{ + event.finish(); + } + 'step 3' + if(result.bool){ + var target=result.targets[0]; + target.damage(2); + event.target=target; + player.line(target,'green'); + } + else{ + event.finish(); + } + 'step 4' + if(event.target&&event.target.isAlive()){ + var es=event.target.getCards('e'); + if(es.length){ + event.target.discard(es); + } + } + }, + ai:{ + threaten:1.5 + } + }, + yinbing:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + init:function(player){ + if(!player.storage.yinbing) player.storage.yinbing=[]; + }, + filter:function(event,player){ + return player.countCards('he',{type:'basic'})0&& + (event.card.name=='sha'||event.card.name=='juedou'); + }, + content:function(){ + 'step 0' + player.chooseCardButton('移去一张引兵牌',true,player.storage.yinbing); + 'step 1' + var card=result.links[0]; + player.storage.yinbing.remove(card); + game.cardsDiscard(card); + player.$throw(card); + game.log(player,'将',card,'置入弃牌堆'); + player.syncStorage('yinbing'); + if(player.storage.yinbing.length==0){ + player.unmarkSkill('yinbing'); + } + } + } + }, + group:'yinbing_discard' + }, + juedi:{ + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.storage.yinbing&&player.storage.yinbing.length>0; + }, + forced:true, + audio:2, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('juedi'),true,function(card,player,target){ + return player.hp>=target.hp; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<2) return att-10; + var num=att/10; + if(target==player){ + num+=player.maxHp-player.countCards('h')+0.5; + } + else{ + num+=_status.event.n2*2; + if(target.isDamaged()){ + if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=2; + } + else{ + num+=0.5; + } + } + } + if(target.hasJudge('lebu')){ + num/=2; + } + return num; + }).set('n2',player.storage.yinbing.length); + 'step 1' + if(result.bool){ + player.line(result.targets[0],'green'); + if(result.targets[0]==player){ + player.$throw(player.storage.yinbing,1000); + var num=player.maxHp-player.countCards('h'); + if(num>0) player.draw(num); + game.cardsDiscard(player.storage.yinbing); + player.storage.yinbing=[]; + player.syncStorage('yinbing'); + player.unmarkSkill('yinbing'); + } + else{ + var target=result.targets[0]; + target.recover(); + target.gain(player.storage.yinbing.slice(0),'gain2','log','fromStorage'); + target.draw(player.storage.yinbing.length); + player.storage.yinbing.length=0; + } + player.syncStorage('yinbing'); + player.unmarkSkill('yinbing'); + } + } + }, + meibu:{ + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player!=player&&get.distance(event.player,player,'attack')>1; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + var e2=player.getEquip(2); + if(e2){ + if(e2.name=='tengjia') return true; + if(e2.name=='bagua') return true; + } + return player.countCards('h','shan')>0; + }, + content:function(){ + var target=trigger.player; + target.addTempSkill('meibu_viewas'); + target.addTempSkill('meibu_range'); + target.storage.meibu=player; + target.markSkillCharacter('meibu',player,'魅步','锦囊牌均视为杀且'+get.translation(player)+'视为在攻击范围内'); + }, + ai:{ + expose:0.2 + }, + subSkill:{ + range:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&target==player.storage.meibu){ + return true; + } + } + }, + onremove:function(player){ + game.broadcast(function(player){ + if(player.marks.meibu){ + player.marks.meibu.delete(); + delete player.marks.meibu; + } + },player); + if(player.marks.meibu){ + player.marks.meibu.delete(); + delete player.marks.meibu; + game.addVideo('unmark',player,'meibu'); + } + }, + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='meibu_viewas' + }, + content:function(){ + player.removeSkill('meibu_viewas'); + game.broadcastAll(function(player){ + if(player.marks.meibu&&player.marks.meibu.info){ + player.marks.meibu.info.content=player.marks.meibu.info.content.slice(8); + } + },player); + } + }, + viewas:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardUsable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardRespondable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardSavable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filterCard:function(card){ + return get.type(card,'trick')=='trick'; + }, + viewAs:{name:'sha'}, + check:function(){return 1}, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.8 + } + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + } + } + }, + mumu:{ + enable:'phaseUse', + usable:1, + filterCard:function(card,player,target){ + return card.name=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'); + }, + check:function(card){ + return 7-get.value(card); + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + return target.getEquip(1)||target.getEquip(2); + }, + content:function(){ + 'step 0' + var e1=target.getEquip(1); + var e2=target.getEquip(2); + event.e1=e1; + event.e2=e2; + if(e1&&e2){ + player.chooseControl('武器牌','防具牌').set('ai',function(){ + if(_status.event.player.getEquip(2)){ + return '武器牌'; + } + return '防具牌'; + }); + } + else if(e1){ + event.choice='武器牌'; + } + else{ + event.choice='防具牌'; + } + 'step 1' + var choice=event.choice||result.control; + if(choice=='武器牌'){ + if(event.e1){ + target.discard(event.e1); + } + player.draw(); + } + else{ + if(event.e2){ + player.equip(event.e2); + target.$give(event.e2,player); + } + } + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.getEquip(2)&&!player.getEquip(2)){ + return -2; + } + return -1; + } + } + } + }, + fentian:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')>=player.hp) return false; + return game.hasPlayer(function(current){ + return player!=current&&player.inRange(current)&¤t.countCards('he'); + }); + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage.fentian=[]; + }, + content:function(){ + 'step 0' + player.chooseTarget('焚天:选择一名攻击范围内的角色,将其一张牌置于你的武将牌上',true,function(card,player,target){ + return player!=target&&player.inRange(target)&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target) + }); + 'step 1' + if(result.bool){ + player.logSkill('fentian',result.targets); + event.target=result.targets[0]; + player.choosePlayerCard(result.targets[0],'he',true); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + event.target.$give(result.links,player,false); + event.target.lose(result.links,ui.special,'toStorage'); + player.storage.fentian=player.storage.fentian.concat(result.links); + player.syncStorage('fentian'); + player.markSkill('fentian'); + } + 'step 3' + game.delayx(); + }, + mod:{ + attackFrom:function(from,to,distance){ + return distance-from.storage.fentian.length; + } + } + }, + zhiri:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + unique:true, + juexingji:true, + audio:2, + skillAnimation:true, + animationColor:'fire', + derivation:'xintan', + filter:function(event,player){ + return player.storage.fentian&&player.storage.fentian.length>=3&&!player.storage.zhiri; + }, + content:function(){ + player.loseMaxHp(); + player.addSkill('xintan'); + player.storage.zhiri=true; + player.awakenSkill('zhiri'); + } + }, + xintan:{ + enable:'phaseUse', + usable:1, + audio:2, + unique:true, + filter:function(event,player){ + return player.storage.fentian&&player.storage.fentian.length>=2; + }, + filterTarget:true, + prompt:'移去两张“焚”并令一名角色失去一点体力', + content:function(){ + 'step 0' + player.chooseCardButton(2,'移去两张“焚”并令'+get.translation(target)+'失去一点体力',player.storage.fentian,true); + 'step 1' + if(result.bool){ + player.$throw(result.links); + for(var i=0;iplayer.hp; + }, + content:function(){ + player.storage.danji=true; + player.loseMaxHp(); + player.addSkill('mashu'); + player.addSkill('nuzhan'); + player.awakenSkill('danji'); + } + }, + nuzhan:{ + audio:2, + popup:false, + silent:true, + firstDo:true, + trigger:{player:'useCard1'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.addCount!==false&&event.cards&& + event.cards.length==1&&get.type(event.cards[0],'trick')=='trick'; + }, + forced:true, + content:function(){ + trigger.addCount=false; + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + group:'nuzhan2' + }, + nuzhan2:{ + audio:'nuzhan', + trigger:{player:'useCard1'}, + forced:true, + popup:false, + silent:true, + firstDo:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.cards&& + event.cards.length==1&&get.type(event.cards[0])=='equip'; + }, + content:function(){ + trigger.baseDamage++; + } + }, + jieyuan:{ + group:['jieyuan_more','jieyuan_less'], + subSkill:{ + more:{ + audio:true, + trigger:{source:'damageBegin1'}, + direct:true, + filter:function(event,player){ + if(!player.hasSkill('fenxin_nei')){ + if(!player.countCards('h',{color:'black'})) return false; + } + return (event.player.hp>=player.hp||player.hasSkill('fenxin_fan'))&&player!=event.player; + }, + content:function(){ + 'step 0' + var goon=(get.attitude(player,trigger.player)<0); + var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player)); + if(!player.hasSkill('fenxin_nei')){ + next.set('filterCard',function(card){ + return get.color(card)=='black'; + }); + next.set('prompt2','弃置一张黑色手牌令伤害+1'); + } + else{ + next.set('prompt2','弃置一张手牌令伤害+1'); + } + next.set('ai',function(card){ + if(_status.event.goon){ + return 8-get.value(card); + } + return 0; + }); + next.set('goon',goon); + next.logSkill=['jieyuan_more',trigger.player]; + 'step 1' + if(result.bool){ + trigger.num++; + } + } + }, + less:{ + audio:true, + trigger:{player:'damageBegin2'}, + filter:function(event,player){ + if(!player.hasSkill('fenxin_nei')){ + if(!player.countCards('h',{color:'red'})) return false; + } + return event.source&&(event.source.hp>=player.hp||player.hasSkill('fenxin_zhong'))&&player!=event.source; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('jieyuan')); + if(!player.hasSkill('fenxin_nei')){ + next.set('filterCard',function(card){ + return get.color(card)=='red'; + }); + next.set('prompt2','弃置一张红色手牌令伤害-1'); + } + else{ + next.set('prompt2','弃置一张手牌令伤害-1'); + } + next.set('ai',function(card){ + var player=_status.event.player; + if(player.hp==1||_status.event.getTrigger().num>1){ + return 9-get.value(card); + } + if(player.hp==2){ + return 8-get.value(card); + } + return 7-get.value(card); + }); + next.logSkill='jieyuan_less'; + "step 1" + if(result.bool){ + trigger.num--; + } + } + } + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + fenxin:{ + mode:['identity'], + available:function(mode){ + if(mode=='identity'&&_status.mode=='purple') return false; + }, + trigger:{global:'dieAfter'}, + filter:function(event,player){ + return ['fan','zhong','nei'].contains(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity); + }, + forced:true, + content:function(){ + player.addSkill('fenxin_'+trigger.player.identity); + player.markSkill('fenxin'); + }, + intro:{ + mark:function(dialog,content,player){ + if(player.hasSkill('fenxin_zhong')){ + dialog.addText('你发动“竭缘”减少伤害无体力值限制'); + } + if(player.hasSkill('fenxin_fan')){ + dialog.addText('你发动“竭缘”增加伤害无体力值限制'); + } + if(player.hasSkill('fenxin_nei')){ + dialog.addText('将“竭缘”中的黑色手牌和红色手牌改为一张牌'); + } + } + }, + subSkill:{ + fan:{}, + zhong:{}, + nei:{} + }, + ai:{ + combo:'jieyuan' + } + }, + fenxin_old:{ + mode:['identity'], + trigger:{source:'dieBegin'}, + init:function(player){ + player.storage.fenxin=false; + }, + intro:{ + content:'limited' + }, + skillAnimation:'epic', + animationColor:'fire', + unique:true, + limited:true, + audio:2, + mark:true, + filter:function(event,player){ + if(player.storage.fenxin) return false; + return event.player.identity!='zhu'&&player.identity!='zhu'&& + player.identity!='mingzhong'&&event.player.identity!='mingzhong'; + }, + check:function(event,player){ + if(player.identity==event.player.identity) return Math.random()<0.5; + var stat=get.situation(); + switch(player.identity){ + case 'fan': + if(stat<0) return false; + if(stat==0) return Math.random()<0.6; + return true; + case 'zhong': + if(stat>0) return false; + if(stat==0) return Math.random()<0.6; + return true; + case 'nei': + if(event.player.identity=='fan'&&stat<0) return true; + if(event.player.identity=='zhong'&&stat>0) return true; + if(stat==0) return Math.random()<0.7; + return false; + } + }, + prompt:function(event,player){ + return '焚心:是否与'+get.translation(event.player)+'交换身份?'; + }, + content:function(){ + game.broadcastAll(function(player,target,shown){ + var identity=player.identity; + player.identity=target.identity; + if(shown||player==game.me){ + player.setIdentity(); + } + target.identity=identity; + },player,trigger.player,trigger.player.identityShown); + player.line(trigger.player,'green'); + player.storage.fenxin=true; + player.awakenSkill('fenxin_old'); + } + }, + xisheng:{ + enable:'chooseToUse', + usable:1, + viewAs:{name:'tao'}, + viewAsFilter:function(player){ + return player!=_status.currentPhase&&player.countCards('he')>1; + }, + selectCard:2, + filterCard:true, + position:'he', + ai:{ + save:true, + skillTagFilter:function(){ + return lib.skill.xisheng.viewAsFilter.apply(this,arguments) + }, + }, + }, + shulv:{ + inherit:'zhiheng', + prompt:'弃置一张牌并摸一张牌', + selectCard:1, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + }, + xiandeng:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + }, + targetInRange:function(card,player){ + if(card.name=='sha'&&player.countUsed('sha',true)==0) return true; + }, + }, + }, + qingyi:{ + audio:2, + trigger:{player:'phaseJudgeBefore'}, + direct:true, + content:function(){ + "step 0" + var check= player.countCards('h')>2; + player.chooseTarget(get.prompt("qingyi"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target,false); + }).set('check',check).set('ai',function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }); + "step 1" + if(result.bool){ + player.logSkill('qingyi',result.targets); + player.useCard({name:'sha',isCard:true},result.targets[0],false); + trigger.cancel(); + player.skip('phaseDraw'); + } + }, + }, + qingyi1:{ + audio:true, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ + "step 0" + player.addSkill('qingyi3'); + var check= player.countCards('h')>2; + player.chooseTarget(get.prompt2('qingyi'),function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target); + }).ai=function(target){ + if(!check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + } + "step 1" + if(result.bool){ + player.logSkill('qingyi1',result.targets); + player.useCard({name:'sha',isCard:true},result.targets[0],false); + player.skip('phaseJudge'); + player.skip('phaseDraw'); + } + player.removeSkill('qingyi3'); + } + }, + qingyi2:{ + audio:true, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + "step 0" + player.addSkill('qingyi3'); + var check=player.countCards('h')<=player.hp; + player.chooseCardTarget({ + prompt:get.prompt2('qingyi'), + filterCard:function(card,player){ + return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player); + }, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target); + }, + ai1:function(card){ + if(!_status.event.check) return 0; + return 6-get.value(card); + }, + ai2:function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }, + check:check + }); + "step 1" + if(result.bool){ + player.logSkill('qingyi2',result.targets); + player.discard(result.cards[0]); + player.useCard({name:'sha',isCard:true},result.targets[0]); + trigger.cancel(); + } + player.removeSkill('qingyi3'); + } + }, + qingyi3:{ + mod:{ + targetInRange:function(card,player,target,now){ + return true; + } + }, + }, + qirang:{ + audio:2, + trigger:{player:'equipEnd'}, + frequent:true, + content:function(){ + player.gain(get.cardPile(function(card){ + return get.type(card,'trick')=='trick'; + }),'gain2'); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; + } + }, + threaten:1.3 + } + }, + yuhua:{ + trigger:{player:'phaseDiscardBegin'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.parent.name=='phaseDiscard'&&player.countCards('h',{type:'basic'})0){ + var att1=get.attitude(target,player); + var att2=get.attitude(target,trigger.player); + var att3=get.attitude(player,target); + if(att3<0) return 0; + return att1/2+att2+att3; + } + else{ + return 0; + // return get.attitude(player,target); + } + }); + 'step 1' + if(result.bool){ + player.addTempSkill('chenqing2','roundStart'); + event.target=result.targets[0]; + event.target.draw(4); + player.logSkill('chenqing',event.target); + } + else{ + event.finish(); + } + 'step 2' + var target=event.target; + var tosave=trigger.player; + var att=get.attitude(target,tosave); + var hastao=target.countCards('h','tao'); + target.chooseToDiscard(4,true,'he').set('ai',function(card){ + var hastao=_status.event.hastao; + var att=_status.event.att; + if(!hastao&&att>0){ + var suit=get.suit(card); + for(var i=0;i0&&player.countCards('h')>0; + }, + content:function(){ + "step 0" + event.count=2; + event.history=player.getHistory('useCard',function(evt){ + return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card)); + }) + "step 1" + event._result={}; + if(event.count&&event.history.length&&player.countCards('h')){ + event.count--; + var card=event.history.shift().card; + card={name:card.name,nature:card.nature}; + if(card.name!='jiu'&&lib.filter.cardEnabled(card)){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current); + })){ + lib.skill.mozhix.viewAs=card; + var next=player.chooseToUse(); + if(next.isOnline()){ + player.send(function(card){ + lib.skill.mozhix.viewAs=card; + },card) + } + next.logSkill='mozhi'; + next.set('openskilldialog','默识:将一张手牌当'+get.translation(card)+'使用'); + next.set('norestore',true); + next.set('_backupevent','mozhix'); + next.backup('mozhix'); + } + } + } + "step 2" + if(result&&result.bool) event.goto(1); + }, + }, + mozhix:{ + filterCard:function(card){ + return get.itemtype(card)=='card'; + }, + selectCard:1, + popname:true, + }, + chenqing2:{}, + ranshang:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.nature=='fire'; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + player.addMark('ranshang',trigger.num); + }, + intro:{ + name2:'燃', + content:'mark' + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; + } + if(get.tag(card,'fireDamage')&¤t<0) return 2; + } + } + }, + group:'ranshang2' + }, + ranshang2:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.countMark('ranshang')>0; + }, + content:function(){ + player.loseHp(player.countMark('ranshang')); + } + }, + hanyong:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return game.roundNumber>player.hp&&event.card&& + (event.card.name=='nanman'||event.card.name=='wanjian'); + }, + content:function(){ + trigger.baseDamage++; + }, + }, + hanyong3:{ + audio:false, + trigger:{source:'damageBegin1'}, + forced:true, + onremove:true, + filter:function(event,player){ + return event.card==player.storage.hanyong3; + }, + content:function(){ + trigger.num++; + } + }, + yishe:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + init:function(player){ + if(!player.storage.yishe) player.storage.yishe=[]; + }, + filter:function(event,player){ + return !player.storage.yishe||!player.storage.yishe.length; + }, + intro:{ + content:'cards' + }, + content:function(){ + 'step 0' + player.draw(2); + player.chooseCard(2,'he',true,'选择两张牌作为“米”'); + 'step 1' + player.storage.yishe=result.cards; + player.lose(result.cards,ui.special,'toStorage'); + player.syncStorage('yishe'); + player.markSkill('yishe'); + } + }, + bushi:{ + audio:2, + trigger:{player:'damageEnd',source:'damageEnd'}, + filter:function(event,player){ + if(event._notrigger.contains(event.player)) return false; + return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); + }, + direct:true, + content:function(){ + 'step 0' + event.count=trigger.num; + 'step 1' + trigger.player.chooseCardButton('选择获得一张“米”',player.storage.yishe); + 'step 2' + if(result.bool){ + event.count--; + player.logSkill('bushi'); + trigger.player.gain(result.links[0],'draw2','log','fromStorage'); + player.storage.yishe.remove(result.links[0]); + player.syncStorage('yishe'); + if(player.storage.yishe.length==0){ + player.recover(); + player.unmarkSkill('yishe'); + } + else{ + player.markSkill('yishe'); + if(event.count>0) event.goto(1); + } + } + } + }, + midao:{ + audio:2, + //unique:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); + }, + content:function(){ + "step 0" + var list=player.storage.yishe; + player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ + ','+get.prompt('midao'),list,'hidden'],function(button){ + var card=button.link; + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + return result*attitude; + }).set('judging',trigger.player.judging[0]).set('filterButton',function(button){ + var player=_status.event.player; + var card=button.link; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }); + "step 1" + if(result.bool){ + event.forceDie=true; + player.respond(result.links,'midao','highlight','noOrdering'); + result.cards=result.links; + var card=result.cards[0]; + event.card=card; + player.storage.yishe.remove(card); + if(player.storage.yishe.length==0){ + player.unmarkSkill('yishe'); + if(player.hasSkill('yishe')){ + player.logSkill('yishe'); + player.recover(); + } + } + else player.markSkill('yishe'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',card); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:0.6 + } + } + }, + fengpo:{ + shaRelated:true, + audio:2, + trigger:{ + player:'useCardToPlayered', + }, + filter:function(event,player){ + if(event.targets.length!=1||!['sha','juedou'].contains(event.card.name)) return false; + var evt2=event.getParent('phaseUse'); + if(evt2.player!=player) return false; + return player.getHistory('useCard',function(evt){ + return ['sha','juedou'].contains(evt.card.name)&&evt.getParent('phaseUse')==evt2; + }).indexOf(event.getParent())==0; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt2('fengpo')); + 'step 1' + if(result.control&&result.control!='cancel2'){ + player.logSkill('fengpo',trigger.target); + var nd=trigger.target.countCards('h',{suit:'diamond'}); + if(result.control=='draw_card'){ + player.draw(nd); + } + else{ + var trigger2=trigger.getParent(); + if(typeof trigger2.baseDamage!='number'){ + trigger2.baseDamage=1; + } + trigger2.baseDamage+=nd; + } + } + } + }, + fengpo2:{ + trigger:{source:'damageBegin1'}, + filter:function(event){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); + }, + forced:true, + audio:false, + content:function(){ + if(typeof player.storage.fengpo=='number'){ + trigger.num+=player.storage.fengpo; + } + } + }, + fengpo3:{}, + biluan:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + mark:true, + //unique:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '其他角色计算与你的距离时+'+storage; + } + else if(storage<0){ + return '其他角色计算与你的距离时'+storage; + } + else{ + return '无距离变化'; + } + } + }, + init:function(player){ + if(typeof player.storage.biluan!='number') player.storage.biluan=0; + }, + check:function(event,player){ + if(player.countCards('h')>player.hp) return true; + if(player.hasJudge('lebu')) return true; + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i1){ + nai++; + } + } + } + return nai>=2; + }, + filter:function(event,player){ + return !event.numFixed&&game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + }); + }, + content:function(){ + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i1; + }, + forced:true, + content:function(){ + 'step 0' + player.chooseTarget(function(card,player,target){ + return target==player||target==_status.event.source; + },true,'礼下:选择一个目标摸一张牌').set('ai',function(target){ + return player==target?1:0; + }).set('source',trigger.player); + 'step 1' + if(result.targets.length){ + result.targets[0].draw(); + player.line(result.targets[0],'green'); + } + player.storage.biluan--; + player.markSkill('biluan'); + game.addVideo('storage',player,['biluan',player.storage.biluan]); + } + }, + rebiluan2:{ + mark:true, + charlotte:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '其他角色计算与你的距离时+'+storage; + } + else if(storage<0){ + return '其他角色计算与你的距离时'+storage; + } + else{ + return '无距离变化'; + } + } + }, + init:function(player){ + if(typeof player.storage.rebiluan2!='number') player.storage.rebiluan2=0; + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.rebiluan2=='number'){ + return distance+to.storage.rebiluan2; + } + } + } + }, + rebiluan:{ + audio:'biluan', + trigger:{player:'phaseJieshuBegin'}, + checkx:function(player){ + var ng=Math.min(4,game.countPlayer()); + var nai=0; + for(var i=0;i1){ + nai++; + } + } + } + return nai>=2; + }, + filter:function(event,player){ + return player.countCards('he')&&game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + }); + }, + direct:true, + content:function(){ + "step 0" + player.chooseToDiscard('he',get.prompt2('rebiluan')).set('logSkill','rebiluan').set('check',lib.skill.rebiluan.checkx(player)).set('ai',function(card){ + if(_status.event.check) return 6-get.value(card); + return 0; + }); + "step 1" + if(result.bool){ + player.addSkill('rebiluan2'); + var ng=Math.min(4,game.countPlayer()); + player.$damagepop(ng,'unknownx'); + player.storage.rebiluan2+=ng; + player.markSkill('rebiluan2'); + game.addVideo('storage',player,['rebiluan2',player.storage.rebiluan2]); + } + }, + }, + relixia:{ + audio:'lixia', + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player.isAlive()&&event.player!=player&&!player.inRangeOf(event.player); + }, + forced:true, + content:function(){ + 'step 0' + if(trigger.player.isDead()){ + event._result={bool:true,links:[0]}; + return; + } + event.videoId=lib.status.videoId++; + var func=function(card,id,bool){ + var list=[ + '令自己摸一张牌', + '令XXX摸两张牌', + '令XXX回复1点体力', + ]; + var choiceList=ui.create.dialog('【礼下】:请选择一至两项','forcebutton'); + choiceList.videoId=id; + for(var i=0;i0&&get.attitude(player,event.player)<0; + }, + prompt:function(event){ + return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,'+get.prompt('fuji'); + }, + logTarget:'source', + content:function(){ + trigger.source.judge().callback=lib.skill.fuji.callback; + }, + callback:function(){ + var evt=event.getParent(2); + if(event.judgeResult.color=='black'){ + //game.cardsDiscard(card); + evt._trigger.num++; + } + else{ + evt._trigger.source.gain(card,'gain2'); + } + }, + }, + fulu:{ + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(event.card.name=='sha'&&!event.card.nature) return true; + }, + audio:true, + check:function(event,player){ + var eff=0; + for(var i=0;i=0; + }, + content:function(){ + trigger.card.nature='thunder'; + if(get.itemtype(trigger.card)=='card'){ + var next=game.createEvent('fulu_clear'); + next.card=trigger.card; + event.next.remove(next); + trigger.after.push(next); + next.setContent(function(){ + delete card.nature; + }); + } + } + }, + guiming:{ + unique:true, + zhuSkill:true, + }, + canshi:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; + return current.isDamaged(); + }); + return num>3; + }, + prompt:function(event,player){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; + }, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.changeToZero(); + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + if(num>0){ + player.draw(num); + } + player.addTempSkill('canshi2'); + } + }, + canshi2:{ + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + var type=get.type(event.card,'trick'); + return type=='basic'||type=='trick'; + }, + autodelay:true, + content:function(){ + player.chooseToDiscard(true,'he'); + } + }, + chouhai:{ + audio:2, + trigger:{player:'damageBegin3'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return player.countCards('h')==0; + }, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')&&target.countCards('h')==0) return [1,-2]; + } + } + } + }, + recanshi:{ + audio:'canshi', + trigger:{player:'phaseDrawBegin2'}, + check:function(event,player){ + if(player.skipList.contains('phaseUse')||!player.countCards('h',function(card){ + return get.type(card,'trick')=='trick'&&player.hasUseTarget(card); + })) return true; + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; + return current.isDamaged(); + }); + return num>1; + }, + prompt:function(event,player){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + return '残蚀:是否多摸'+get.cnNumber(num)+'张牌?'; + }, + filter:function(event,player){ + return !event.numFixed&&game.hasPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + }, + content:function(){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + if(num>0){ + trigger.num+=num; + } + player.addTempSkill('recanshi2'); + } + }, + recanshi2:{ + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + if(event.card.name=='sha') return true; + var type=get.type(event.card,'trick'); + return type=='trick'; + }, + autodelay:true, + content:function(){ + player.chooseToDiscard(true,'he'); + } + }, + rechouhai:{ + audio:'chouhai', + trigger:{player:'damageBegin3'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.countCards('h')==0; + }, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&target.countCards('h')==0) return [1,-2]; + } + } + } + }, + kunfen:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + "step 0" + if(player.storage.kunfen|| + (get.mode()=='guozhan'&&player.hiddenSkills.contains('kunfen'))){ + if(!player.storage.kunfen){ + event.skillHidden=true; + } + player.chooseBool(get.prompt2('kunfen')).set('ai',function(){ + var player=_status.event.player; + if(player.hp>3) return true; + if(player.hp==3&&player.countCards('h')<3) return true; + if(player.hp==2&&player.countCards('h')==0) return true; + return false; + }); + } + else{ + event.forced=true; + } + "step 1" + if(event.forced||result.bool){ + player.logSkill('kunfen'); + player.loseHp(); + } + else{ + event.finish(); + } + "step 2" + player.draw(2); + }, + ai:{ + threaten:1.5 + } + }, + fengliang:{ + skillAnimation:true, + animationColor:'thunder', + unique:true, + juexingji:true, + audio:2, + derivation:'retiaoxin', + trigger:{player:'dying'}, + //priority:10, + forced:true, + filter:function(event,player){ + return !player.storage.kunfen; + }, + content:function(){ + "step 0" + player.loseMaxHp(); + "step 1" + if(player.hp<2){ + player.recover(2-player.hp); + } + "step 2" + player.addSkill('retiaoxin'); + player.storage.kunfen=true; + player.awakenSkill('fengliang'); + }, + }, + zhuiji:{ + mod:{ + globalFrom:function(from,to){ + if(from.hp>=to.hp) return -Infinity; + } + } + }, + oldcihuai:{ + audio:'cihuai', + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + check:function(event,player){ + return !player.countCards('h','sha'); + }, + content:function(){ + player.showHandcards(); + if(!player.countCards('h','sha')) player.addTempSkill('oldcihuai2'); + }, + }, + oldcihuai2:{ + group:'oldcihuai3', + prompt:'视为使用一张杀', + enable:'chooseToUse', + viewAs:{name:'sha',isCard:true}, + filterCard:function(){return false}, + selectCard:-1, + ai:{ + presha:true, + respondSha:true, + }, + }, + oldcihuai3:{ + trigger:{ + player:['gainEnd','loseEnd'], + global:'die', + }, + silent:true, + firstDo:true, + filter:function(event,player){ + if(event.name=='lose') return event.hs.length>0; + return true; + }, + content:function(){ + player.removeSkill('oldcihuai2'); + }, + }, + cihuai:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h','sha')==0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('cihuai'),function(card,player,target){ + return player.canUse({name:'sha',isCard:true},target); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha',isCard:true},player,player); + }); + "step 1" + if(result.bool){ + player.logSkill('cihuai'); + player.showHandcards(); + player.useCard({name:'sha',isCard:true},result.targets); + } + }, + ai:{ + expose:0.2, + } + }, + jilei:{ + trigger:{player:'damageEnd'}, + //priority:9, + audio:2, + direct:true, + filter:function(event){ + return event&&event.source; + }, + content:function(){ + 'step 0' + player.chooseControl('basic','trick','equip','cancel2',function(){ + var source=_status.event.source; + if(get.attitude(_status.event.player,source)>0) return 'cancel2'; + if(!source.storage.jilei2||!source.storage.jilei2.contains('basic')) return 'basic'; + if(_status.currentPhase!=source) return 'trick'; + if(lib.filter.cardUsable({name:'sha'},source)&&source.countCards('h')>=2) return 'basic'; + return 'trick'; + }).set('prompt',get.prompt2('jilei',trigger.source)).set('source',trigger.source); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('jilei',trigger.source); + player.popup(get.translation(result.control)+'牌'); + trigger.source.addTempSkill('jilei2',{player:'phaseBegin'}); + trigger.source.storage.jilei2.add(result.control); + trigger.source.updateMarks('jilei2'); + } + }, + ai:{ + maixie_defend:true, + threaten:0.7 + } + }, + jilei2:{ + unique:true, + charlotte:true, + intro:{ + content:function(storage){ + return '不能使用、打出或弃置'+get.translation(storage)+'牌'; + } + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + mark:true, + onremove:true, + mod:{ + cardDiscardable:function(card,player){ + if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; + }, + cardEnabled:function(card,player){ + if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; + }, + cardUsable:function(card,player){ + if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; + }, + cardRespondable:function(card,player){ + if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; + }, + cardSavable:function(card,player){ + if(player.storage.jilei2.contains(get.type(card,'trick'))) return false; + }, + }, + }, + danlao:{ + audio:2, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card)=='trick')&&event.targets&&event.targets.length>1; + }, + check:function(event,player){ + return event.getParent().excluded.contains(player)||get.tag(event.card,'multineg')||get.effect(player,event.card,event.player,player)<=0; + }, + trigger:{target:'useCardToTargeted'}, + content:function(){ + trigger.getParent().excluded.add(player); + player.draw(); + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)!='trick') return; + if(card.name=='tiesuo') return [0,0]; + if(card.name=='yihuajiemu') return [0,1]; + if(get.tag(card,'multineg')) return [0,2]; + } + } + } + }, + taichen:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canUse('sha',target); + }, + content:function(){ + "step 0" + player.loseHp(); + "step 1" + player.useCard({name:'sha',isCard:true},target,false); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.hp>2&&player.hp>target.hp&&target.countCards('he')<4){ + return get.effect(target,{name:'sha'},player,target); + } + return 0; + } + } + } + }, + xinmanjuan:{ + audio:'manjuan', + forced:true, + priority:15, + trigger:{player:'gainAfter'}, + filter:function(event,player){ + return event.type!='xinmanjuan'; + }, + content:function(){ + "step 0" + player.lose(trigger.cards,ui.discardPile,'visible'); + player.$throw(trigger.cards,1000); + game.log(player,'将',trigger.cards,'置入了弃牌堆') + "step 1" + event.cards=trigger.cards.slice(0); + if(_status.currentPhase!=player) event.finish(); + "step 2" + event.card=event.cards.shift(); + event.togain=[]; + var number=get.number(event.card); + for(var i=0;imaxval){ + maxval=tempval; + } + } + maxval+=cards.length-1; + var next=player.chooseToDiscard('he',{suit:suits}); + next.set('ai',function(card){ + return _status.event.maxval-get.value(card); + }); + next.set('maxval',maxval); + next.set('dialog',[get.prompt(event.name),'hidden',cards]) + next.logSkill=event.name; + event.cards=cards; + } + "step 2" + if(result.bool){ + player.gain(event.cards,'gain2','log'); + } + }, + ai:{ + threaten:1.3 + } + }, + zuixiang:{ + skillAnimation:true, + animationColor:'gray', + audio:true, + unique:true, + mark:true, + trigger:{player:'phaseZhunbeiBegin'}, + //priority:10, + filter:function(event,player){ + if(player.storage.zuixiang) return false; + return true; + }, + check:function(event,player){ + return player.countCards('h')0; + }, + filterCard:{name:'sha'}, + check:function(card){return 6-get.value(card)}, + content:function(){ + 'step 0' + var list=lib.group.slice(0); + list.remove('shen'); + if(player.storage.xiemu2) list.removeArray(player.storage.xiemu2); + var list2=list.slice(0); + list2.sort(function(a,b){ + return lib.skill.xiemu.count(b)-lib.skill.xiemu.count(a); + }); + player.chooseControl(list).set('prompt','请选择一个势力').ai=function(){return list2[0]}; + 'step 1' + player.popup(result.control+2,get.groupnature(result.control)); + game.log(player,'选择了','#g'+get.translation(result.control+2)); + player.addTempSkill('xiemu2',{player:'phaseBegin'}); + player.storage.xiemu2.add(result.control); + player.updateMarks('xiemu2'); + }, + ai:{ + order:1, + result:{player:1}, + }, + count:function(group){ + var player=_status.event.player; + return game.countPlayer(function(current){ + return current!=player&¤t.group==group&&get.attitude(current,player)<0; + }); + }, + }, + xiemu2:{ + onremove:true, + mark:true, + forced:true, + audio:'xiemu', + intro:{ + content:function(storage){ + return '已指定'+get.translation(storage)+'势力'; + }, + }, + trigger:{ + target:'useCardToTargeted' + }, + init:function(player){ + if(!player.storage.xiemu2) player.storage.xiemu2=[]; + }, + filter:function(event,player){ + if(!player.storage.xiemu2) return false; + if(get.color(event.card)!='black') return false; + if(!event.player) return false; + if(event.player==player||!player.storage.xiemu2.contains(event.player.group)) return false; + return true; + }, + content:function(){ + player.draw(2); + }, + }, + oldxiemu:{ + audio:'xiemu', + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + if(get.color(event.card)!='black') return false; + if(!event.player) return false; + if(event.player==player) return false; + if(get.mode()!='guozhan') return false; + return player.countCards('h','sha')>0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}); + next.set('ai',function(card){ + return 9-get.value(card); + }); + next.logSkill='xiemu'; + "step 1" + if(result.bool){ + player.draw(2); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.color(card)=='black'&&target.countCards('h')>0){ + return [1,0.5]; + } + } + } + } + }, + spmengjin:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + return event.target.countCards('he')>0; + }, + direct:true, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.target); + player.choosePlayerCard(get.prompt('spmengjin',trigger.target),'he',trigger.target).ai=function(button){ + var val=get.buttonValue(button); + if(att>0) return -val; + return val; + }; + "step 1" + if(result.bool){ + trigger.target.discard(result.links); + player.logSkill('spmengjin',trigger.target); + trigger.target.addTempSkill('mengjin2','shaAfter'); + } + }, + ai:{ + expose:0.2 + } + }, + fenxun_old:{ + audio:2, + trigger:{player:'shaBefore'}, + direct:true, + filter:function(event,player){ + return event.targets.length==1; + }, + position:'he', + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var trigger=_status.event.getTrigger(); + return lib.filter.targetEnabled(trigger.card,player,target)&&target!=trigger.targets[0]; + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }, + prompt:get.prompt2('fenxun') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + trigger.targets.push(result.targets[0]); + player.logSkill('fenxun',result.targets); + } + } + }, + rezhoufu:{ + audio:'zhoufu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + filterTarget:function(card,player,target){ + return target!=player&&!target.getStorage('rezhoufu2').length; + }, + check:function(card){ + return 6-get.value(card) + }, + position:'he', + discard:false, + toStorage:true, + prepare:'give', + content:function(){ + if(!target.storage.rezhoufu2_markcount) target.storage.rezhoufu2_markcount=0; + target.markAuto('rezhoufu2',cards); + }, + ai:{ + order:1, + result:{ + target:-1, + }, + }, + group:['rezhoufu_judge','rezhoufu_losehp'], + subSkill:{ + judge:{ + audio:'zhoufu', + trigger:{global:'judgeBefore'}, + forced:true, + filter:function(event,player){ + return !event.directresult&&event.player.getStorage('rezhoufu2').length; + }, + logTarget:'player', + content:function(){ + var cards=[trigger.player.getStorage('rezhoufu2')[0]]; + trigger.directresult=cards[0]; + trigger.player.unmarkAuto('rezhoufu2',cards); + }, + }, + losehp:{ + audio:'zhoufu', + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return event.player.hasSkill('rezhoufu3')&&event.player.isAlive(); + }, + logTarget:'player', + content:function(){ + trigger.player.loseHp(); + }, + }, + }, + }, + rezhoufu2:{ + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length==0; + } + player.addTempSkill('rezhoufu3'); + delete player.storage.rezhoufu2_markcount; + }, + }, + }, + rezhoufu3:{}, + reyingbing:{ + audio:'yingbin', + trigger:{global:'useCard'}, + forced:true, + filter:function(event,player){ + var cards=event.player.getStorage('rezhoufu2'); + return cards.length&&get.color(cards[0])==get.color(event.card); + }, + logTarget:'player', + content:function(){ + 'step 0' + player.draw(); + 'step 1' + trigger.player.storage.rezhoufu2_markcount++; + if(trigger.player.storage.rezhoufu2_markcount>=2){ + var cards=trigger.player.getStorage('rezhoufu2'); + trigger.player.$throw(cards); + game.delayx(); + player.gain(cards,'gain2','log'); + cards.length=0; + trigger.player.unmarkSkill('rezhoufu2'); + } + else trigger.player.markSkill('rezhoufu2'); + }, + }, + zhoufu:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('zhoufu2'); + }, + prepare:'throw', + discard:false, + //lose:false, + visible:true, + toStorage:true, + content:function(){ + //player.lose(cards,ui.special,'toStorage'); + target.$gain2(cards); + target.storage.zhoufu2=cards[0]; + target.addSkill('zhoufu2'); + target.storage.zhoufu3=player; + //ui.special.appendChild(cards[0]); + target.syncStorage('zhoufu2'); + }, + check:function(card){ + return 6-get.value(card) + }, + ai:{ + expose:0.1, + order:1, + result:{ + target:-1 + } + } + }, + zhoufu2:{ + trigger:{player:'judgeBefore'}, + forced:true, + //priority:10, + mark:'card', + filter:function(event){ + return !event.directresult; + }, + content:function(){ + "step 0" + trigger.directresult=player.storage.zhoufu2; + delete player.storage.zhoufu2; + player.removeSkill('zhoufu2'); + delete player.storage.zhoufu2_markcount; + if(player.storage.zhoufu3.isIn()){ + player.storage.zhoufu3.line(player,'green'); + } + "step 1" + player.addTempSkill('zhoufu3'); + }, + intro:{ + content:'card', + onunmark:function(storage,player){ + if(storage){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + } + delete player.storage.zhoufu2; + }, + } + }, + zhoufu3:{ + trigger:{global:'phaseEnd'}, + silent:true, + content:function(){ + if(player.storage.zhoufu3.isIn()){ + player.storage.zhoufu3.logSkill('zhoufu',player); + player.loseHp(); + } + delete player.storage.zhoufu3; + }, + onremove:true + }, + yingbin:{ + audio:2, + trigger:{global:'useCard'}, + filter:function(event,player){ + return event.player.hasSkill('zhoufu2')&&event.player.storage.zhoufu3==player&& + get.suit(event.player.storage.zhoufu2)==get.suit(event.card); + }, + forced:true, + autodelay:true, + content:function(){ + player.draw(); + if(trigger.player.storage.zhoufu2_markcount==1){ + trigger.player.removeSkill('zhoufu2'); + delete trigger.player.storage.zhoufu2; + delete trigger.player.storage.zhoufu2_markcount; + delete trigger.player.storage.zhoufu3; + } + else{ + trigger.player.storage.zhoufu2_markcount=1; + trigger.player.updateMarks(); + } + } + }, + kuiwei:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + check:function(event,player){ + if(player.isTurnedOver()) return true; + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + return num>1; + }, + content:function(){ + "step 0" + player.turnOver(); + "step 1" + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + player.draw(2+num); + player.addSkill('kuiwei2'); + }, + ai:{ + effect:{ + target:function(card){ + if(card.name=='guiyoujie') return [0,2]; + } + } + } + }, + kuiwei2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + audio:false, + content:function(){ + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + if(num>=player.countCards('he')){ + player.discard(player.getCards('he')); + } + else if(num){ + player.chooseToDiscard('he',num,true); + } + player.removeSkill('kuiwei2'); + } + }, + yanzheng:{ + enable:'chooseToUse', + audio:2, + filter:function(event,player){ + return player.hp0; + }, + viewAsFilter:function(player){ + return player.hp0; + }, + filterCard:true, + position:'e', + viewAs:{name:'wuxie'}, + prompt:'将一张装备区内的牌当无懈可击使用', + check:function(card){return 8-get.equipValue(card)}, + threaten:1.2 + }, + tongji:{ + global:'tongji_disable', + audio:2, + trigger:{global:"useCard1"}, + forced:true, + filter:function (event,player){ + return event.targets.contains(player)&&player!=event.player&&event.card.name=='sha'&&player.hp=0; + }, + content:function(){ + "step 0" + player.draw(); + if(trigger.target!=player){ + player.chooseCard(true,'he','交给'+get.translation(trigger.target)+'一张牌').set('ai',function(card){ + if(get.position(card)=='e') return -1; + if(card.name=='shan') return 1; + if(get.type(card)=='equip') return 0.5; + return 0; + }); + } + else{ + event.finish(); + } + "step 1" + trigger.target.gain(result.cards,player,'give'); + game.delay(); + event.card=result.cards[0]; + "step 2" + if(trigger.target.getCards('h').contains(card)&&get.type(card)=='equip'){ + trigger.target.chooseUseTarget(card); + } + }, + ai:{ + threaten:1.1 + } + }, + liangzhu:{ + audio:2, + trigger:{global:'recoverAfter'}, + direct:true, + filter:function(event,player){ + return event.player.isPhaseUsing(); + }, + content:function(){ + 'step 0' + if(player==trigger.player){ + player.chooseControl('摸一张','摸两张','cancel2',function(){ + return '摸两张'; + }).set('prompt',get.prompt2('liangzhu')); + event.single=true; + } + else{ + player.chooseTarget(get.prompt2('liangzhu'),function(card,player,target){ + return target==_status.event.player||target==_status.event.target; + }).set('target',trigger.player).set('ai',function(target){ + var player=_status.event.player; + if(player==target) return 1; + return get.attitude(player,target)-1.5; + }); + } + 'step 1' + if(event.single){ + if(result.control!='cancel2'){ + player.logSkill('liangzhu',player); + if(result.control=='摸一张'){ + player.draw(); + } + else{ + player.draw(2); + if(!player.storage.liangzhu) player.storage.liangzhu=[]; + player.storage.liangzhu.add(player); + } + } + } + else if(result.bool){ + var target=result.targets[0]; + player.logSkill('liangzhu',target); + if(target==player){ + target.draw(); + } + else{ + target.draw(2); + if(target.storage.liangzhu){ + target.storage.liangzhu.add(player); + } + else{ + target.storage.liangzhu=[player]; + } + } + } + }, + ai:{ + expose:0.1 + } + }, + fanxiang:{ + skillAnimation:true, + animationColor:'fire', + audio:2, + unique:true, + juexingji:true, + forceunique:true, + derivation:'xiaoji', + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(player.storage.fanxiang) return false; + return game.hasPlayer(function(current){ + return current.storage.liangzhu&¤t.storage.liangzhu.contains(player)&¤t.isDamaged(); + }); + }, + forced:true, + content:function(){ + player.storage.fanxiang=true; + player.gainMaxHp(); + player.recover(); + player.removeSkill('liangzhu'); + player.addSkill('xiaoji'); + player.awakenSkill('fanxiang'); + }, + }, + mingshi:{ + audio:2, + trigger:{player:'damageBegin3'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source.hp>player.hp; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt2('mingshi'),{color:'black'}); + next.set('ai',function(card){ + return 9-get.value(card); + }); + next.set('logSkill','mingshi'); + "step 1" + if(result.bool){ + trigger.num--; + } + }, + ai:{ + threaten:0.8 + } + }, + lirang:{ + audio:2, + trigger:{player:'loseAfter'}, + filter:function(event,player){ + if(event.type!='discard') return false; + for(var i=0;i1; + }); + } + player.chooseCardButton(get.prompt('lirang'),event.cards,[1,event.cards.length]).set('ai',function(button){ + if(!_status.event.goon||ui.selected.buttons.length) return 0; + if(button.link.name=='du') return 2; + return 1; + }).set('goon',goon); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + event.togive=result.links.slice(0); + player.chooseTarget('将'+get.translation(result.links)+'交给一名角色',true,function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.enemy){ + return -att; + } + else{ + if(att>2) return att/Math.sqrt(1+target.countCards('h')); + return att/Math.sqrt(1+target.countCards('h'))/5; + } + }).set('enemy',get.value(event.togive[0],player,'raw')<0); + } + else{ + //game.cardsDiscard(event.cards); + event.finish(); + } + "step 3" + if(result.bool){ + if(!event.logged){ + player.logSkill('lirang',result.targets); + event.logged=true; + } + else player.line(result.targets,'green'); + for(var i=0;i0; + }, + content:function(){ + trigger.target.discardPlayerCard(player,true); + } + }, + shenxian:{ + audio:2, + trigger:{global:'loseAfter'}, + filter:function(event,player){ + if(event.type!='discard'||event.player==player||_status.currentPhase==player) return false; + if(player.hasSkill('shenxian2')) return false; + for(var i=0;iplayer.storage.qiangwu) return num+2; + }, + targetInRange:function(card,player){ + if(_status.currentPhase==player&&card.name=='sha'&&card.numberplayer.storage.qiangwu) return Infinity; + } + }, + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(_status.currentPhase==player&&event.card.name=='sha'&& + event.card.number>player.storage.qiangwu&&event.addCount!==false) return true; + return false; + }, + forced:true, + popup:false, + firstDo:true, + content:function(){ + trigger.addCount=false; + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + }, + zhendu:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return /*(get.mode()!='guozhan'||event.player!=player)&&*/player.countCards('h')>0; + }, + direct:true, + content:function(){ + "step 0" + var nono=(Math.abs(get.attitude(player,trigger.player))<3); + if(player==trigger.player||get.damageEffect(trigger.player,player,player)<=0){ + nono=true + } + else if(trigger.player.hp>2){ + nono=true; + } + else if(trigger.player.hp>1&&player.countCards('h')<3){ + nono=true; + } + else if(trigger.player.canUse('sha',player)&&!player.countCards('h','shan')&&trigger.player.countCards('h')>=3){ + nono=true; + } + var next=player.chooseToDiscard(get.prompt2('zhendu',trigger.player)); + next.set('ai',function(card){ + if(_status.event.nono) return -1; + return 7-get.useful(card); + }); + next.set('logSkill',['zhendu',trigger.player]); + next.set('nono',nono); + "step 1" + if(result.bool){ + trigger.player.chooseUseTarget({name:'jiu'},true,'noTargetDelay','nodelayx'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool&&trigger.player!=player) trigger.player.damage(); + }, + ai:{ + threaten:2, + expose:0.3 + } + }, + qiluan:{ + audio:'qiluan2', + //group:'qiluan_draw', + //subfrequent:['draw'], + trigger:{global:'phaseEnd'}, + frequent:true, + filter:function(event,player){ + return game.hasPlayer2(function(current){ + return current.getStat('kill')>0 + }); + }, + prompt:function(event,player){ + var num=game.countPlayer2(function(current){ + return (current.getStat('kill')||0)*(current==player?3:1); + }); + return get.prompt('qiluan')+'(可摸'+get.cnNumber(num)+'张牌)'; + }, + content:function(){ + //if(get.mode()=='guozhan'){ + // player.draw(3); + //} + //else{ + player.draw(game.countPlayer2(function(current){ + return (current.getStat('kill')||0)*(current==player?3:1); + })); + //} + }, + subSkill:{ + draw:{ + trigger:{global:'dieAfter'}, + frequent:true, + filter:function(event,player){ + return /*get.mode()!='guozhan'&&*/player!=event.source; + }, + content:function(){player.draw()}, + }, + }, + }, + qiluan2:{ + audio:2, + }, + zniaoxiang:{ + shaRelated:true, + audio:2, + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.getParent().directHit.contains(event.target); + }, + //priority:-1, + logTarget:'target', + content:function(){ + var id=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[id]) map[id]={}; + if(typeof map[id].shanRequired=='number'){ + map[id].shanRequired++; + } + else{ + map[id].shanRequired=2; + } + } + }, + shangyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + content:function(){ + "step 0" + player.chooseCardButton(target,target.getCards('h')).set('filterButton',function(button){ + return get.color(button.link)=='black'; + }); + "step 1" + if(result.bool){ + target.discard(result.links[0]); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + return -target.countCards('h'); + } + }, + threaten:1.1 + }, + }, + shengxi:{ + trigger:{player:'phaseDiscardBegin'}, + frequent:true, + filter:function(event,player){ + return !player.getStat('damage'); + }, + content:function(){ + player.draw(2); + }, + audio:2, + audioname:['liushan'] + }, + shoucheng:{ + trigger:{global:'loseAfter'}, + audio:2, + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + filter:function(event,player){ + if(event.player==player||event.player.isDead()||event.player.countCards('h')) return false; + if(_status.currentPhase==event.player) return false; + return event.hs&&event.hs.length>0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + threaten:1.3, + expose:0.2, + noh:true, + } + }, + hengzheng:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return !event.numFixed&&(player.hp==1||player.countCards('h')==0); + }, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ + return true; + } + if(current.countCards('j')&¤t!=player&&get.attitude(player,current)>0){ + return true; + } + }); + return num>=2; + }, + content:function(){ + "step 0" + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(lib.sort.seat); + event.targets=targets; + event.num=0; + trigger.changeToZero(); + player.line(targets,'green'); + "step 1" + if(num【勇决】
    每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
    '); + "step 1" + player.turnOver(); + }, + intro:{ + content:'limited' + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(target.isMin()) return 0; + if(player.hp>1){ + if(game.phaseNumber2) return 0; + if(get.attitude(player,target)<5) return 0; + } + if(get.attitude(player,target)<5) return 0; + if(target.hp==1&&target.maxHp>2) return 0.2; + if(target==game.me) return 1.2; + return 1; + } + }, + expose:0.5, + threaten:1.5 + } + }, + fenming:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ + return get.attitude(player,current); + } + }); + return num<0; + }, + filter:function(event,player){ + return player.isLinked(); + }, + content:function(){ + "step 0" + event.targets=game.filterPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ + return true; + } + }); + event.num=0; + event.targets.sort(lib.sort.seat); + "step 1" + if(event.num=0); + trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){ + if(_status.event.nono){ + return 0; + } + if(_status.event.player.hp==1) return 10-get.value(card); + return 9-get.value(card); + }).set('nono',nono); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.draw(); + } + else{ + trigger.player.damage(); + } + }, + ai:{ + expose:0.3, + threaten:1.3 + } + }, + suishi:{ + audio:2, + trigger:{global:'dying'}, + forced:true, + popup:false, + //priority:12, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source!=event.player; + }, + content:function(){ + 'step 0' + var str; + if(trigger.parent.source==player){ + str='随势:是否摸一张牌?'; + } + else{ + str='随势:是否令'+get.translation(player)+'摸一张牌?' + } + trigger.parent.source.chooseBool(str).set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)>0; + }).set('target',player); + 'step 1' + if(result.bool){ + player.logSkill('suishi'); + trigger.parent.source.line(player,'green'); + player.draw(); + } + }, + group:'suishi2' + }, + suishi2:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.source&&event.source!=player&&event.source!=event.player; + }, + content:function(){ + 'step 0' + var str; + if(trigger.source==player){ + str='随势:是否流失一点体力?'; + } + else{ + str='随势:是否令'+get.translation(player)+'流失一点体力?' + } + trigger.source.chooseBool(str).set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)<0; + }).set('target',player); + 'step 1' + if(result.bool){ + player.logSkill('suishi'); + trigger.source.line(player,'green'); + player.loseHp(); + } + }, + }, + sijian:{ + trigger:{player:'loseAfter'}, + direct:true, + audio:2, + filter:function(event,player){ + if(player.countCards('h')) return false; + return event.hs&&event.hs.length>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('sijian'),'弃置一名其他角色的一张牌',function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + player.logSkill('sijian',result.targets); + event.target=result.targets[0]; + player.discardPlayerCard(event.target,true); + } + else{ + event.finish(); + } + }, + ai:{ + expose:0.2, + } + }, + quji:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + return player.getDamagedHp(); + }, + filterTarget:function(card,player,target){ + return target.hp-1; + if(num==2) return att>0; + return att>1; + } + return false; + }, + content:function(){ + "step 0" + event.target=player; + event.player=trigger.player; + event.player.chooseBool('是否对'+get.translation(event.target)+'发动【郡兵】?',event.player==event.target?'摸一张牌':'摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌').set('choice',lib.skill.junbing.checkx(event.target,event.player)); + "step 1" + if(!result.bool){event.finish();return} + target.logSkill('junbing',player); + if(player==target) event.finish(); + player.draw(); + "step 2" + var cards=player.getCards('h'); + target.gain(cards,player,'giveAuto'); + event.num=cards.length; + game.delay(); + "step 3" + target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num); + game.delay(0.2); + "step 4" + player.gain(result.cards,target,'giveAuto'); + game.delay(); + }, + audio:2, + }, + xiongyi:{ + skillAnimation:true, + animationColor:'gray', + unique:true, + enable:'phaseUse', + audio:2, + limited:true, + filterTarget:function(card,player,target){ + if(get.mode()=='guozhan'){ + if(player==target) return true; + if(player.identity=='ye') return false; + if(player.identity=='unknown'){ + if(_status.yeidentity.contains(player._group)){ + return false; + } + else if(get.zhu(player)||get.population(player._group)+1<=get.population()/2){ + return player._group==target.identity; + } + else{ + return false; + } + } + return player.identity==target.identity; + } + else{ + return true; + } + }, + multitarget:true, + multiline:true, + selectTarget:function(){ + if(get.mode()=='guozhan') return -1; + return [1,3]; + }, + content:function(){ + "step 0" + player.awakenSkill('xiongyi'); + game.asyncDraw(targets,3); + "step 1" + if(player.isDamaged()){ + if(get.mode()=='guozhan'){ + if(player.isMinor(true)){ + player.recover(); + } + } + else if(targets.length<=2){ + player.recover(); + } + } + }, + ai:{ + order:1, + result:{ + target:function(player){ + var num=player.countCards('h'); + if(player.hp==1) return 1; + if(player.hp==2&&num<=2) return 1; + if(player.hp==3&&num<=1) return 1; + if(game.phaseNumber1){ + event.num--; + event.goto(1); + } + } + }, + ai:{ + threaten:0.8, + expose:0.1 + } + }, + shushen:{ + audio:2, + trigger:{player:'recoverAfter'}, + direct:true, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + player.chooseTarget(get.prompt('shushen'),'令一名其他角色选择摸两张牌或回复1点体力',function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + "step 2" + if(result.bool){ + event.count--; + player.logSkill('shushen',result.targets); + result.targets[0].chooseDrawRecover(2,true); + if(event.count) event.goto(1); + } + }, + ai:{ + threaten:0.8, + expose:0.1 + } + }, + shenzhi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + check:function(event,player){ + if(player.hp>2) return false; + var cards=player.getCards('h'); + if(cards.length3) return false; + for(var i=0;i7||get.tag(cards[i],'recover')>=1) return false; + } + return true; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var cards=player.getCards('h'); + event.bool=cards.length>=player.hp; + player.discard(cards); + "step 1" + if(event.bool){ + player.recover(); + } + } + }, + wuji:{ + skillAnimation:true, + animationColor:'orange', + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + unique:true, + juexingji:true, + filter:function(event,player){ + return player.getStat('damage')>=3&&!player.storage.wuji; + }, + content:function(){ + "step 0" + player.removeSkill('huxiao'); + player.gainMaxHp(); + "step 1" + player.recover(); + player.awakenSkill('wuji'); + player.storage.wuji=true; + + var card=get.cardPile('qinglong','field'); + if(card){ + player.gain(card,'gain2','log'); + } + } + }, + xueji_old:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hp0; + }, + filterTarget:function(card,player,target){ + return player!=target&&get.distance(player,target,'attack')<=1; + }, + selectTarget:function(){ + return [1,_status.event.player.maxHp-_status.event.player.hp]; + }, + position:'he', + filterCard:function(card){ + return get.color(card)=='red'; + }, + check:function(card){ + return 8-get.useful(card); + }, + content:function(){ + "step 0" + target.damage(); + "step 1" + target.draw(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + } + }, + threaten:function(player,target){ + if(target.hp==1) return 2; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp&&target.hasFriend()) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + xueji:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + filterTarget:true, + selectTarget:function(){ + var player=_status.event.player + return [1,Math.max(1,player.getDamagedHp())]; + }, + position:'he', + filterCard:{color:'red'}, + check:function(card){ + return 8-get.value(card); + }, + multitarget:true, + multiline:true, + line:'fire', + content:function(){ + 'step 0' + event.delay=false; + for(var i=0;ii) cards.push(ui.cardPile.childNodes[i]); + } + player.chooseCardButton('傲才:选择一张卡牌打出',cards).set('filterButton',function(button){ + return get.type(button.link)=='basic'&&_status.event.getTrigger().filterCard(button.link); + }); + "step 1" + if(result.bool){ + game.log(player,'傲才发动成功'); + trigger.untrigger(); + trigger.responded=true; + result.links[0].remove(); + trigger.result={bool:true,card:result.links[0]} + } + }, + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')) return 0.7; + if(get.tag(card,'respondSha')) return 0.7; + } + } + }, + group:'aocai2', + }, + aocai2:{ + enable:'chooseToUse', + filter:function(event,player){ + return _status.currentPhase!==player&&event.type!='wuxie'&&event.type!='trickuse'; + }, + onChooseToUse:function(event){ + if(!game.online){ + var cards=[]; + if(ui.cardPile.childNodes.length<2){ + var discardcards=get.cards(2); + game.cardsDiscard(discardcards); + } + for(var i=0;i<2;i++){ + if(ui.cardPile.childNodes.length>i) cards.push(ui.cardPile.childNodes[i]); + } + event.set('aocaicards',cards); + } + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('傲才:选择一张卡牌使用',event.aocaicards); + }, + filter:function(button,player){ + var evt=_status.event.getParent(); + if(evt&&evt.filterCard){ + return get.type(button.link)=='basic'&&evt.filterCard(button.link,player,evt); + } + return false; + }, + check:function(button){ + return 1; + }, + backup:function(links,player){ + return { + audio:'aocai', + filterCard:function(){return false}, + selectCard:-1, + viewAs:links[0], + } + }, + prompt:function(links,player){ + return '选择'+get.translation(links)+'的目标'; + } + }, + ai:{ + order:11, + respondShan:true, + respondSha:true, + save:true, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + } + } + } + }, + hongyuan:{ + trigger:{player:'phaseDrawBegin2'}, + direct:true, + audio:2, + filter:function(event,player){ + return !event.numFixed&&event.num>0; + }, + content:function(){ + "step 0" + var check; + if(player.countCards('h')==0){ + check=false; + } + else{ + check=(game.countPlayer(function(current){ + return player!=current&&get.attitude(player,current)>1; + })>=2); + } + if(get.is.versus()){ + event.versus=true; + player.chooseBool(get.prompt2('hongyuan')).ai=function(){ + return game.countPlayer(function(current){ + return player.side==current.side; + })>2; + }; + } + else{ + player.chooseTarget(get.prompt2('hongyuan'),[1,2],function(card,player,target){ + return player!=target; + },function(target){ + if(!_status.event.check) return 0; + return get.attitude(_status.event.player,target); + }).set('check',check); + } + "step 1" + if(result.bool){ + var targets; + if(event.versus){ + targets=game.filterPlayer(function(current){ + return current!=player&¤t.side==player.side; + }); + } + else{ + targets=result.targets; + } + player.logSkill('hongyuan',targets); + game.asyncDraw(targets); + trigger.num--; + } + }, + }, + huanshi:{ + audio:2, + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he')>0; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)<=0) return false; + var cards=player.getCards('he'); + var judge=event.judge(event.player.judging[0]); + for(var i=0;ijudge) return true; + if(_status.currentPhase!=player&&judge2==judge&&get.color(cards[i])=='red'&&get.useful(cards[i])<5) return true; + } + return false; + }, + content:function(){ + "step 0" + var target=trigger.player; + var judge=trigger.judge(target.judging[0]); + var attitude=get.attitude(target,player); + target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){ + var card=button.link; + var judge=_status.event.judge; + var attitude=_status.event.attitude; + var result=trigger.judge(card)-judge; + var player=_status.event.player; + if(result>0){ + return 20+result; + } + if(result==0){ + if(_status.currentPhase==player) return 0; + if(attitude>=0){ + return get.color(card)=='red'?7:0-get.value(card); + } + else{ + return get.color(card)=='black'?10:0+get.value(card); + } + } + if(attitude>=0){ + return get.color(card)=='red'?0:-10+result; + } + else{ + return get.color(card)=='black'?0:-10+result; + } + }).set('filterButton',function(button){ + var player=_status.event.target; + var card=button.link; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('judge',judge).set('attitude',attitude); + "step 1" + if(result.bool){ + event.card=result.links[0]; + player.respond(event.card,'highlight').nopopup=true; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=event.card; + trigger.orderingCards.add(event.card); + game.log(trigger.player,'的判定牌改为',event.card); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + } + } + }, + mingzhe:{ + audio:2, + trigger:{player:['useCard','respond','loseAfter']}, + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.name!='lose') return get.color(event.card)=='red'; + if(event.type!='discard') return false; + if(event.cards2){ + for(var i=0;i2) return current-1; + }, + globalTo:function(from,to,current){ + if(to.hp<=2) return current+1; + }, + }, + ai:{ + threaten:0.8 + } + }, + yongsi:{ + group:['yongsi1','yongsi2'], + ai:{ + threaten:2.2 + } + }, + yongsi1:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num+=game.countGroup(); + } + }, + yongsi2:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + forced:true, + content:function(){ + player.chooseToDiscard(game.countGroup(),'he',true); + } + }, + bifa:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var players=game.filterPlayer(); + for(var i=0;itarget.hp){ + target.chooseToDiscard(2,'he',true); + } + else{ + target.draw(2); + } + if(!player.storage.songci) player.storage.songci=[]; + player.storage.songci.push(target); + player.storage.songci.sortBySeat(); + player.markSkill('songci'); + }, + intro:{ + content:'已对$发动过〖颂词〗' + }, + ai:{ + order:7, + threaten:1.5, + expose:0.2, + result:{ + target:function(player,target){ + if(target.countCards('h')target.hp){ + return -1; + } + } + } + } + }, + baobian:{ + audio:2, + trigger:{player:['phaseBefore','changeHp']}, + forced:true, + popup:false, + init:function(player){ + if(game.online) return; + player.removeAdditionalSkill('baobian'); + var list=[]; + if(player.hp<=3){ + //if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); + list.push('retiaoxin'); + } + if(player.hp<=2){ + list.push('olpaoxiao'); + } + if(player.hp<=1){ + list.push('xinshensu'); + } + if(list.length){ + player.addAdditionalSkill('baobian',list); + } + }, + derivation:['retiaoxin','olpaoxiao','xinshensu'], + content:function(){ + player.removeAdditionalSkill('baobian'); + var list=[]; + if(player.hp<=3){ + if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); + list.push('retiaoxin'); + } + if(player.hp<=2){ + list.push('olpaoxiao'); + } + if(player.hp<=1){ + list.push('xinshensu'); + } + if(list.length){ + player.addAdditionalSkill('baobian',list); + } + }, + ai:{ + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(!target.hasFriend()) return; + if(target.hp>=4) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + chongzhen:{ + group:['chongzhen1','chongzhen2'], + audio:'chongzhen1', + ai:{ + combo:'ollongdan', + mingzhi:false, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ + if(get.attitude(target,player)<=0){ + if(current>0) return; + if(target.countCards('h')==0) return 1.6; + if(target.countCards('h')==1) return 1.2; + if(target.countCards('h')==2) return [0.8,0.2,0,-0.2]; + return [0.4,0.7,0,-0.7]; + } + } + }, + }, + } + }, + chongzhen1:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + if((event.card.name!='sha'&&event.card.name!='shan')||(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& + event.skill!='fanghun_shan'&&event.skill!='fanghun_sha'&&event.skill!='ollongdan')) return false; + var target=lib.skill.chongzhen1.logTarget(event,player); + return target&&target.countGainableCards(player,'h')>0; + }, + logTarget:function(event,player){ + if(event.card.name=='sha') return event.targets[0]; + return event.respondTo[0]; + }, + prompt2:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', + content:function(){ + var target=lib.skill.chongzhen1.logTarget(trigger,player); + player.gainPlayerCard(target,'h',true); + } + }, + chongzhen2:{ + audio:2, + trigger:{player:'respond'}, + filter:function(event,player){ + if(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& + event.skill!='fanghun_shan'&&event.skill!='fanghun_sha'&&event.skill!='ollongdan') return false; + return event.source&&event.source.countGainableCards(player,'h')>0; + }, + logTarget:'source', + prompt2:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', + content:function(){ + player.gainPlayerCard(trigger.source,'h',true); + } + }, + lihun:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.sex=='male'; + }, + filterCard:true, + position:'he', + content:function(){ + player.gain(target.getCards('h'),target,'giveAuto'); + player.turnOver(); + player.addSkill('lihun2'); + player.storage.lihun=target; + }, + check:function(card){return 8-get.value(card)}, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.classList.contains('turnedover')) return 10; + return 0; + }, + target:function(player,target){ + if(target.countCards('h')>target.hp) return target.hp-target.countCards('h'); + return 0; + } + }, + threaten:1.5, + effect:{ + target:function(card){ + if(card.name=='guiyoujie') return [0,2]; + } + } + }, + }, + lihun2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + audio:false, + content:function(){ + "step 0" + var cards=player.getCards('he'); + player.removeSkill('lihun2'); + if(player.storage.lihun.classList.contains('dead')||player.storage.lihun.hp<=0||cards.length==0){ + event.finish(); + } + else{ + if(cards.length0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + filterTarget:function(card,player,target){ + return target.isEmpty(get.subtype(card)); + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)-3; + }, + prompt:get.prompt2('yuanhu') + }); + "step 1" + if(result.bool){ + player.logSkill('yuanhu',result.targets); + var thisTarget=result.targets[0]; + var thisCard=result.cards[0]; + thisTarget.equip(thisCard); + event.target=thisTarget; + if(thisTarget!=player){ + player.$give(thisCard,thisTarget,false); + } + switch(get.subtype(thisCard)){ + case 'equip1':{ + if(!game.hasPlayer(function(current){ + return get.distance(thisTarget,current)<=1; + })){ + event.finish(); + return; + } + game.delay(); + player.chooseTarget(true,function(card,player,target){ + return get.distance(_status.event.thisTarget,target)<=1&&target.countCards('hej'); + }).set('ai',function(target){ + var attitude=get.attitude(_status.event.player,target); + if(attitude>0&&target.countCards('j')){ + return attitude*1.5; + } + return -attitude; + }).set('thisTarget',thisTarget); + return; + } + case 'equip2':{ + thisTarget.draw();event.finish(); + return; + } + case 'equip5':{ + event.finish(); + return; + } + default:{ + thisTarget.recover(); + event.finish(); + return; + } + } + } + else{ + event.finish(); + } + "step 2" + if(result.targets.length){ + player.discardPlayerCard(true,result.targets[0],'hej'); + } + }, + }, + tianming:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + check:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<=2){ + for(var i=0;iplayers[1].hp&&players[0]!=player){ + players[0].chooseBool(get.prompt2('tianming')); + event.player=players[0]; + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + player.chooseToDiscard(2,true,'he'); + player.draw(2); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha') return [1,0.5]; + } + } + } + }, + mizhao:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + selectCard:-1, + filterTarget:function(card,player,target){ + return player!=target; + }, + discard:false, + lose:false, + delay:false, + ai:{ + order:1, + result:{ + player:0, + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(player.countCards('h')>1){ + return 1; + } + var players=game.filterPlayer(); + for(var i=0;i0){ + return eff-10; + } + return eff; + }).set('target1',event.target1); + "step 2" + if(result.targets.length){ + event.target2=result.targets[0]; + event.target1.line(event.target2); + event.target1.chooseToCompare(event.target2); + } + else{ + event.finish(); + } + "step 3" + if(!result.tie){ + if(result.bool&&event.target1.canUse({name:'sha',isCard:true},event.target2,false)){ + event.target1.useCard({name:'sha',isCard:true},event.target2); + } + else if(event.target2.canUse({name:'sha',isCard:true},event.target1,false)){ + event.target2.useCard({name:'sha',isCard:true},event.target1); + } + } + } + }, + gongao:{ + audio:2, + trigger:{global:'dieAfter'}, + forced:true, + content:function(){ + player.gainMaxHp(); + player.recover(); + }, + ai:{ + threaten:1.5 + } + }, + juyi:{ + skillAnimation:true, + animationColor:'thunder', + audio:true, + derivation:['benghuai','weizhong'], + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.maxHp>game.players.length&&player.hp0){ + player.draw(num); + } + player.addSkill('benghuai'); + player.addSkill('weizhong'); + player.storage.juyi=true; + player.awakenSkill('juyi'); + } + }, + weizhong:{ + audio:true, + trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']}, + forced:true, + content:function(){ + player.draw(); + } + }, + chixin:{ + group:['chixin1','chixin2'], + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return num+20; + } + }, + }, + trigger:{player:'shaBefore'}, + forced:true, + popup:false, + check:function(event,player){ + return player.countCards('h','sha')>0; + }, + filter:function(event,player){ + return _status.currentPhase==player; + }, + content:function(){ + var target=trigger.target; + if(target.hasSkill('chixin3')){ + target.storage.chixin++; + } + else{ + target.storage.chixin=1; + target.addTempSkill('chixin3','phaseUseEnd'); + } + } + }, + chixin1:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:{suit:'diamond'}, + position:'he', + viewAs:{name:'sha'}, + prompt:'将一张♦牌当杀使用或打出', + check:function(card){return 5-get.value(card)}, + ai:{ + respondSha:true, + } + }, + chixin2:{ + enable:['chooseToUse','chooseToRespond'], + filterCard:{suit:'diamond'}, + viewAs:{name:'shan'}, + position:'he', + prompt:'将一张♦牌当闪使用或打出', + check:function(card){return 5-get.value(card)}, + ai:{ + respondShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.8 + } + }, + } + }, + chixin3:{ + mod:{ + targetEnabled:function(card,player,target){ + if(card.name!='sha') return; + if(player==_status.currentPhase&&player.hasSkill('chixin')){ + var num=player.getCardUsable(card,true)-20; + var players=game.filterPlayer(); + for(var i=0;i1; + } + } + } + }, + suiren:{ + trigger:{player:'phaseZhunbeiBegin'}, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return !player.storage.suiren; + }, + intro:{ + content:'limited', + }, + mark:true, + direct:true, + unique:true, + limited:true, + content:function(){ + "step 0" + var check=(player.hp==1||(player.hp==2&&player.countCards('h')<=1)); + player.chooseTarget(get.prompt2('suiren')).set('ai',function(target){ + if(!_status.event.check) return 0; + return get.attitude(_status.event.player,target); + }).set('check',check); + "step 1" + if(result.bool){ + player.storage.suiren=true; + player.awakenSkill('suiren'); + player.logSkill('suiren',result.targets); + player.removeSkill('yicong'); + player.gainMaxHp(); + player.recover(); + result.targets[0].draw(3); + } + } + }, + kuangfu:{ + trigger:{source:'damageSource'}, + direct:true, + audio:2, + filter:function(event){ + if(event._notrigger.contains(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.player.countCards('e'); + }, + content:function(){ + "step 0" + var neg=get.attitude(player,trigger.player)<=0; + player.choosePlayerCard('e',trigger.player).set('ai',function(button){ + if(_status.event.neg){ + return get.buttonValue(button); + } + return 0; + }).set('neg',neg); + "step 1" + if(result.bool){ + player.logSkill('kuangfu'); + event.card=result.links[0]; + if(player.isEmpty(get.subtype(event.card))){ + player.chooseBool('是否将'+get.translation(event.card)+'置入自己的装备区?').ai=function(){ + return true; + }; + } + else event._result={bool:false}; + } + else event.finish(); + "step 2" + if(result.bool){ + trigger.player.$give(event.card,player,false); + player.equip(event.card); + } + else trigger.player.discard(event.card); + } + }, + "xinfu_lingren":{ + usable:1, + audio:2, + trigger:{ + player:"useCardToPlayered", + }, + direct:true, + filter:function (event,player){ + if(event.getParent().triggeredTargets3.length>1) return false; + if(!player.isPhaseUsing()) return false; + if(!['basic','trick'].contains(get.type(event.card))) return false; + if(get.tag(event.card,'damage')) return true; + return false; + }, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt2('xinfu_lingren'),function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return 2-get.attitude(_status.event.player,target); + }).set('targets',trigger.targets); + 'step 1' + if(result.bool){ + player.logSkill('xinfu_lingren',result.targets); + var target=result.targets[0]; + event.target=target; + event.choice={ + basic:false, + trick:false, + equip:false, + } + player.chooseBool('是否押基本牌?').ai=function(event,player){ + var rand=0.95; + if(!target.countCards('h',{type:['basic']})) rand=0.05; + if(!target.countCards('h')) rand=0; + return Math.random()0){ + target.addTempSkill('lingren_adddamage'); + target.storage.lingren={ + card:trigger.card, + //player:event.targett, + } + } + if(event.num>1) player.draw(2); + if(event.num>2){ + player.addTempSkill('lingren_jianxiong',{player:'phaseBegin'}); + player.addTempSkill('lingren_xingshang',{player:'phaseBegin'}); + } + }, + ai:{ + threaten:2.4, + }, + }, + "lingren_adddamage":{ + onremove:function (player){ + delete player.storage.lingren; + }, + trigger:{ + player:"damageBegin3", + }, + filter:function (event,player){ + var info=player.storage.lingren; + return event.card&&event.card==info.card; + }, + silent:true, + popup:false, + forced:true, + content:function (){ + trigger.num++; + }, + }, + "lingren_jianxiong":{ + audio:1, + trigger:{ + player:"damageEnd", + }, + content:function (){ + "step 0" + if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ + player.gain(trigger.cards,"gain2"); + } + player.draw("nodelay"); + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')&&player!=target) return [1,0.6]; + }, + }, + }, + }, + "lingren_xingshang":{ + audio:1, + inherit:'rexingshang', + }, + "xinfu_fujian":{ + audio:2, + trigger:{ + player:"phaseJieshuBegin", + }, + filter:function (event,player){ + return !game.hasPlayer(function(current){ + return current.countCards('h')==0; + }); + }, + forced:true, + content:function (){ + event.num=0; + var list=game.filterPlayer(function(target){ + if(target.isMinHandcard()) event.num=target.countCards('h'); + return player!=target; + }); + if(event.num<1){ + event.finish(); + } + else{ + var target=list.randomGet(); + var cards=target.getCards('h').randomGets(event.num); + player.line(target); + var content=[get.translation(target)+'的部分手牌',cards]; + game.log(player,'观看了',target,'的部分手牌'); + player.chooseControl('ok').set('dialog',content); + } + }, + }, + "xinfu_xionghuo":{ + group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin","xinfu_xionghuo_init"], + subSkill:{ + begin:{ + audio:'xinfu_xionghuo', + logTarget:'player', + line:false, + forced:true, + trigger:{ + global:"phaseUseBegin", + }, + filter:function (event,player){ + return event.player.countMark('xionghuo')>0&&event.player!=player; + }, + content:function (){ + 'step 0' + trigger.player.removeMark('xionghuo',trigger.player.countMark('xionghuo')); + var list=[1,2,3]; + var num=list.randomGet(); + event.goto(num); + 'step 1' + player.line(trigger.player,'fire'); + trigger.player.damage('fire'); + if(!trigger.player.storage.xionghuo_disable) trigger.player.storage.xionghuo_disable=[]; + trigger.player.storage.xionghuo_disable.push(player); + trigger.player.addTempSkill('xionghuo_disable','phaseAfter'); + event.goto(4); + 'step 2' + player.line(trigger.player,'water'); + trigger.player.loseHp(); + trigger.player.addMark('xionghuo_low',1,false); + trigger.player.addTempSkill('xionghuo_low','phaseAfter'); + event.goto(4); + 'step 3' + player.line(trigger.player,'green'); + var card1=trigger.player.getCards('h').randomGet(); + var card2=trigger.player.getCards('e').randomGet(); + var list=[]; + if(card1) list.push(card1); + if(card2) list.push(card2); + if(list.length>0){ + player.gain(list,trigger.player,'giveAuto','bySelf'); + } + 'step 4' + game.delay(); + }, + }, + damage:{ + audio:"xinfu_xionghuo", + sub:true, + forced:true, + trigger:{ + source:"damageBegin1", + }, + filter:function (event,player){ + return event.player.countMark('xionghuo')>0; + }, + content:function (){ + trigger.num++; + }, + }, + init:{ + trigger:{ + global:"gameDrawAfter", + player:"enterGame", + }, + forced:true, + locked:false, + content:function(){ + player.addMark("xionghuo",3); + }, + }, + }, + audio:2, + enable:"phaseUse", + filter:function(event,player){ + return player.countMark('xionghuo')>0; + }, + filterTarget:function (card,player,target){ + if(target.hasMark('xionghuo')) return false; + return player!=target>0; + }, + content:function (){ + player.removeMark('xionghuo',1); + target.addMark('xionghuo',1); + }, + ai:{ + order:11, + result:{ + target:function (player,target){ + var mark=player.countMark('xionghuo'); + if(mark>2) return -1; + return Math.min(-(1+mark-target.hp),0); + }, + }, + threaten:1.1, + }, + }, + xionghuo:{ + marktext:"戾", + mark:true, + intro:{ + name:'暴戾', + content:"mark", + }, + locked:true, + }, + "xionghuo_disable":{ + mod:{ + playerEnabled:function (card,player,target){ + if(card.name=='sha'&&(player.storage.xionghuo_disable&&player.storage.xionghuo_disable.contains(target))) return false; + }, + }, + onremove:true, + charlotte:true, + mark:true, + marktext:"禁", + intro:{ + content:"本回合内不能对$使用【杀】", + }, + }, + "xionghuo_low":{ + mod:{ + maxHandcard:function (player,num){ + return num-player.countMark('xionghuo_low'); + }, + }, + marktext:"减", + mark:true, + onremove:true, + charlotte:true, + intro:{ + content:"本回合内手牌上限-#", + }, + }, + "xinfu_shajue":{ + audio:2, + trigger:{ + global:"dying", + }, + filter:function (event,player){ + return event.player.hp<0&&event.player!=player; + }, + forced:true, + //priority:7, + content:function (){ + if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){ + player.gain(trigger.parent.cards,"gain2"); + } + player.addMark('xionghuo',1); + }, + }, + "xinfu_jianjie":{ + derivation:["jianjie_faq"], + group:["xinfu_jianjie1","xinfu_jianjie2"], + audio:3, + trigger:{ + player:"phaseZhunbeiBegin", + }, + forced:true, + direct:true, + filter:function (event,player){ + if(player.phaseNumber>1) return false; + return !game.hasPlayer(function(current){ + return current.hasSkill('smh_huoji')||current.hasSkill('smh_lianhuan'); + }); + }, + content:function (){ + "step 0" + player.chooseTarget('请将「龙印」交给一名角色',true,function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var player=_status.event.player; + return 10+get.attitude(player,target); + }); + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.logSkill('xinfu_jianjie',target); + player.line(target,'fire'); + target.addSkill('smh_huoji'); + game.delay(); + } + if(game.hasPlayer(function(current){ + return !current.hasSkill('smh_huoji')&¤t!=player + })){ + player.chooseTarget('请将「凤印」交给一名角色',true,function(card,player,target){ + return target!=player&&!target.hasSkill('smh_huoji'); + }).set('ai',function(target){ + var player=_status.event.player; + return 10+get.attitude(player,target); + }); + }else event.finish(); + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.logSkill('xinfu_jianjie',target); + player.line(target,'green'); + target.addSkill('smh_lianhuan'); + game.delay(); + } + }, + }, + "xinfu_jianjie1":{ + audio:3, + prompt:"你的第一个准备阶段,你令两名不同的角色分别获得龙印与凤印;出牌阶段限一次(你的第一个回合除外),或当拥有龙印、凤印的角色死亡时,你可以转移龙印、凤印。", + enable:"phaseUse", + usable:1, + filter:function (event,player){ + if(player.phaseNumber==1) return false; + if(!game.hasPlayer(function(current){ + return current.hasSkill('smh_huoji')||current.hasSkill('smh_lianhuan'); + })) return false; + return true; + }, + filterTarget:function (card,player,target){ + if(ui.selected.targets.length==1){ + return true; + }else{ + return target.hasSkill('smh_huoji')||target.hasSkill('smh_lianhuan'); + } + }, + targetprompt:["移走印","得到印"], + selectTarget:2, + multitarget:true, + content:function (){ + 'step 0' + if(targets[0].hasSkill('smh_huoji')&&targets[0].hasSkill('smh_lianhuan')){ + player.chooseControl('龙印','凤印').set('prompt','请选择要移动的印'); + } + else{ + if(targets[0].hasSkill('smh_huoji')) event._result={control:'龙印'}; + else event._result={control:'凤印'}; + } + 'step 1' + if(result.control=='龙印'){ + targets[0].removeSkill('smh_huoji'); + targets[1].addSkill('smh_huoji'); + } + else{ + targets[0].removeSkill('smh_lianhuan'); + targets[1].addSkill('smh_lianhuan'); + } + }, + ai:{ + order:8, + result:{ + target:function (player,target){ + if(ui.selected.targets.length==0){ + return get.attitude(player,target)<0?-999:-3; + } + else{ + return target.countCards('h')+1; + } + }, + }, + expose:0.4, + threaten:3, + }, + }, + "smh_huoji":{ + charlotte:true, + group:["smh_yeyan"], + mark:true, + marktext:"龙", + intro:{ + name:"龙印", + content:"
  • 出牌阶段限三次,你可以将一张红色牌当【火攻】使用。
  • 若你同时拥有「凤印」,则你视为拥有技能〖业炎〗。(发动〖业炎〗后,弃置龙印和凤印)", + }, + usable:3, + audio:2, + enable:"chooseToUse", + position:"he", + filterCard:function (card){ + return get.color(card)=='red'; + }, + viewAs:{ + name:"huogong", + nature:"fire", + }, + viewAsFilter:function (player){ + if(player.hasSkill('huoji')) return false; + if(!game.hasPlayer(function(current){ + return current.hasSkill('xinfu_jianjie'); + })) return false; + if(!player.countCards('he',{color:'red'})) return false; + }, + prompt:"将一张红色牌当火攻使用", + check:function (card){ + var player=_status.currentPhase; + if(player.countCards('h')>player.hp){ + return 6-get.value(card); + } + return 4-get.value(card) + }, + }, + "smh_lianhuan":{ + audio:2, + charlotte:true, + enable:"phaseUse", + filter:function (event,player){ + if(player.hasSkill('lianhuan')||player.hasSkill('xinlianhuan')) return false; + if(!game.hasPlayer(function(current){ + return current.hasSkill('xinfu_jianjie'); + })) return false; + if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false; + return player.countCards('h',{suit:'club'})>0; + }, + filterCard:function (card){ + return get.suit(card)=='club'; + }, + viewAs:{ + name:"tiesuo", + }, + prompt:"将一张梅花牌当铁锁连环使用", + check:function (card){return 6-get.value(card)}, + mark:true, + marktext:"凤", + intro:{ + name:"凤印", + content:"
  • 出牌阶段限三次,你可以将你的任意一张梅花手牌当作【铁索连环】使用或重铸。", + }, + group:["smh_lianhuan1"], + }, + "xinfu_jianjie2":{ + trigger:{ + global:"dieAfter", + }, + forced:true, + direct:true, + silent:true, + popup:false, + filter:function (event,player){ + return event.player.hasSkill('smh_huoji')||event.player.hasSkill('smh_lianhuan'); + }, + content:function (){ + "step 0" + player.logSkill('xinfu_jianjie'); + "step 1" + if(trigger.player.hasSkill('smh_huoji')){ + player.chooseTarget('请将'+get.translation(trigger.player)+'的「龙印」交给一名角色',true).set('ai',function(target){ + var player=_status.event.player; + return 10+get.attitude(player,target); + }); + }else event.goto(2); + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'fire'); + target.addSkill('smh_huoji'); + game.delay(); + } + "step 3" + if(trigger.player.hasSkill('smh_lianhuan')){ + player.chooseTarget('请将'+get.translation(trigger.player)+'的「凤印」交给一名角色',true).set('ai',function(target){ + var player=_status.event.player; + return 10+get.attitude(player,target); + }); + }else event.finish(); + "step 4" + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'green'); + target.addSkill('smh_lianhuan'); + game.delay(); + } + }, + }, + "smh_lianhuan1":{ + enable:"phaseUse", + filter:function (event,player){ + if(player.hasSkill('lianhuan')||player.hasSkill('xinlianhuan')) return false; + if(!game.hasPlayer(function(current){ + return current.hasSkill('xinfu_jianjie'); + })) return false; + if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false; + return player.countCards('h',{suit:'club'})>0; + }, + filterCard:function (card){ + return get.suit(card)=='club'; + }, + check:function (card){ + return -1; + }, + content:function (){ + player.draw(); + }, + discard:false, + loseTo:'discardPile', + prompt:"将一张梅花牌置入弃牌堆并摸一张牌", + delay:0.5, + prepare:function (cards,player){ + player.$throw(cards,1000); + }, + ai:{ + basic:{ + order:1, + }, + result:{ + player:1, + }, + }, + forced:true, + }, + "smh_yeyan":{ + unique:true, + enable:"phaseUse", + audio:3, + skillAnimation:true, + animationColor:'gray', + prompt:"限定技,出牌阶段,你可以对一至三名角色造成至多共3点火焰伤害(你可以任意分配每名目标角色受到的伤害点数),若你将对一名角色分配2点或更多的火焰伤害,你须先弃置四张不同花色的手牌再失去3点体力。", + filter:function (event,player){ + if(!game.hasPlayer(function(current){ + return current.hasSkill('xinfu_jianjie'); + })) return false; + return player.hasSkill('smh_lianhuan'); + }, + filterTarget:function (card,player,target){ + var length=ui.selected.cards.length; + return (length==0||length==4); + }, + filterCard:function (card){ + var suit=get.suit(card); + for(var i=0;i1){ + player.chooseCardButton('【称好】:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0],player,'raw')<0); + } + "step 3" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); + event.goto(1); + } + }, + }, + "jianjie_faq":{}, + "xinfu_wuniang":{ + trigger:{ + player:["useCard","respond"], + }, + audio:2, + direct:true, + filter:function (event,player){ + return event.card.name=='sha'; + }, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt('xinfu_wuniang'),'获得一名其他角色的一张牌,然后其和场上所有的“关索”摸一张牌。',function(card,player,target){ + if(player==target) return false; + return target.countGainableCards(player,'he')>0; + }).set('ai',function(target){ + return 10-get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('xinfu_wuniang',target); + player.line(target,'fire'); + event.draws=game.filterPlayer(function(current){ + if(current==target) return true; + return ['guansuo','old_guansuo'].contains(current.name)||['guansuo','old_guansuo'].contains(current.name2); + }); + player.gainPlayerCard(target,'he',true); + } + else event.finish(); + 'step 2' + game.asyncDraw(event.draws,1); + game.delay(); + }, + }, + "xinfu_xushen":{ + derivation:["xinfu_zhennan"], + audio:2, + subSkill:{ + count:{ + trigger:{ + player:"recoverBegin", + }, + forced:true, + silent:true, + popup:false, + filter:function (event,player){ + if(!event.card||event.card.name!='tao') return false; + if(!event.source||event.source.sex!='male') return false; + if(!player.isDying()) return false; + if(game.hasPlayer(function(current){ + return current.name=='guansuo'||current.name2=='guansuo'; + })) return false; + return true; + }, + content:function (){ + trigger.xinfu_xushen=true; + }, + sub:true, + }, + }, + group:["xinfu_xushen_count"], + trigger:{ + player:"recoverAfter", + }, + limited:true, + init:function (player){ + player.storage.xinfu_xushen=false; + }, + filter:function (event,player){ + if(player.storage.xinfu_xushen) return false; + if(player.isDying()) return false; + return event.xinfu_xushen==true; + }, + direct:true, + skillAnimation:true, + animationColor:'fire', + content:function (){ + "step 0" + trigger.source.chooseBool('【许身】:是否将自己的一张武将牌替换为“关索”?').set('ai',function(){ + return false; + }); + "step 1" + if(result.bool){ + player.awakenSkill('xinfu_xushen'); + player.logSkill('xinfu_xushen',trigger.source); + if(trigger.source.name2!=undefined){ + trigger.source.chooseControl(trigger.source.name,trigger.source.name2).set('prompt','请选择要更换的武将牌'); + }else event._result={control:trigger.source.name}; + } + else event.finish(); + "step 2" + trigger.source.reinit(result.control,'guansuo'); + if(_status.characterlist){ + _status.characterlist.add(result.control); + _status.characterlist.remove('guansuo'); + } + player.recover(); + player.addSkill('xinfu_zhennan'); + }, + mark:true, + intro:{ + content:"limited", + }, + }, + + "xinfu_falu":{ + subSkill:{ + spade:{ + marktext:'♠︎️', + intro:{ + name:'紫薇', + content:'mark', + }, + }, + heart:{ + marktext:'♥︎️', + intro:{ + name:'玉清', + content:'mark', + }, + }, + club:{ + marktext:'♣︎️', + intro:{ + name:'后土', + content:'mark', + }, + }, + diamond:{ + marktext:'♦︎', + intro:{ + name:'勾陈', + content:'mark', + }, + }, + }, + forced:true, + audio:2, + trigger:{ + player:["loseAfter","enterGame"], + global:"gameDrawAfter", + }, + filter:function (event,player){ + if(event.name!='lose') return true; + if(event.type!='discard') return false; + for(var i=0;i0){ + if(results>0){ + if(resulth>results) return '红桃5'; + return '黑桃5'; + } + else if(resulth>0) return '红桃5'; + return '取消'; + } + else{ + if(results<0){ + if(resulth=0) return false; + if(event.player.hasSkillTag('filterDamage',null,{ + player:player, + card:event.card, + })) return false; + return player.hasMark('xinfu_falu_spade')||get.color(ui.cardPile.firstChild)=='black'; + }, + prompt2:function(event){ + return '弃置「玉清♥」标记,然后进行判定。若结果为黑色,则对'+get.translation(event.player)+'即将造成的伤害+1。'; + }, + logTarget:"player", + content:function (){ + "step 0" + player.removeMark('xinfu_falu_heart') + player.judge(function(card){ + if(get.color(card)=='black') return 4; + return -1; + }); + "step 1" + if(result.bool==true){ + trigger.num++; + } + }, + }, + "xinfu_zhennan":{ + audio:2, + trigger:{ + target:"useCardToTargeted", + }, + filter:function (event,player){ + return event.card.name=='nanman'; + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget(get.prompt('xinfu_zhennan'),'对一名其他角色造成1-3点随机伤害',function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + game.delay(); + player.logSkill('xinfu_zhennan',result.targets); + var num=[1,2,3,1,1,2].randomGet(); + if(get.isLuckyStar(player)) num=3; + player.line(result.targets[0],'fire'); + result.targets[0].damage(num); + } + }, + ai:{ + expose:0.25, + }, + }, + "xinfu_yanyu":{ + trigger:{ + global:"phaseUseBegin", + }, + direct:true, + filter:function (event,player){ + return player.countCards('he')>0; + }, + content:function (){ + 'step 0' + player.chooseToDiscard(get.prompt('xinfu_yanyu'),get.translation('xinfu_yanyu_info'),'he').set('ai',function(card){ + var map=_status.event.goon; + var type=get.type(card,'trick'); + if(!map[type]) return -1; + return map[type]-get.value(card); + }).set('logSkill','xinfu_yanyu').set('goon',function(){ + var map={ + basic:0, + trick:0.1, + }; + var hs=trigger.player.getCards('h'); + var sha=false; + var jiu=false; + for(var i=0;i=3) return false; + //var evt=event.getParent(); + //if(evt&&(evt.name=='useCard'||evt.name=='respond')) return false; + var type=player.storage.xinfu_yanyu; + var cards=event.cards; + for(var i=0;i=3) event.finish(); + else player.chooseCardButton(event.cards,'【燕语】:是否将其中的一张牌交给一名角色?').ai=function(card){ + if(card.name=='du') return 10; + return get.value(card); + }; + 'step 2' + if(result.bool){ + player.storage.xinfu_yanyu2++; + if(!event.logged){ + player.logSkill('xinfu_yanyu'); + player.addExpose(0.25); + event.logged=true; + } + event.togain=result.links[0]; + event.cards.remove(event.togain); + player.chooseTarget(true,'请选择要获得'+get.translation(event.togain)+'的角色').set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + var card=_status.event.card; + var val=get.value(card); + if(target==_status.currentPhase&&target.hasValueTarget(card)) att=att*2; + return att*val; + }).set('card',event.togain); + } + else event.finish(); + 'step 3' + var target=result.targets[0]; + player.line(target,'green'); + target.gain(event.togain,'gain2'); + if(event.cards.length) event.goto(1); + }, + }, + "xinfu_xiaode":{ + subSkill:{ + remove:{ + unique:true, + charlotte:true, + trigger:{ + player:"phaseAfter", + }, + forced:true, + popup:false, + content:function (){ + player.removeAdditionalSkill('xinfu_xiaode'); + player.removeSkill('xinfu_xiaode_remove'); + }, + }, + }, + trigger:{ + global:"dieAfter", + }, + direct:true, + filter:function (skill,event){ + return !event.hasSkill('xinfu_xiaode_remove'); + }, + content:function (){ + 'step 0' + var list=[]; + var listm=[]; + var listv=[]; + if(trigger.player.name1!=undefined) listm=lib.character[trigger.player.name1][3]; + else listm=lib.character[trigger.player.name][3]; + if(trigger.player.name2!=undefined) listv=lib.character[trigger.player.name2][3]; + listm=listm.concat(listv); + var func=function(skill){ + var info=get.info(skill); + if(info.charlotte||info.zhuSkill||(info.unique&&!info.limited)) return false; + return true; + }; + for(var i=0;i觉醒技 当你使用或打出基本牌时,若你已经已累计发动过3次【翊赞】,你将【翊赞】改为“你可以将一张基本牌当任意基本牌牌使用或打出”。", + wuniang:"武娘", + wuniang_info:"你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后该角色摸一张牌;若“关索”在场,你可令“关索”也摸一张牌", + zhennan:"镇南", + zhennan_info:"当你成为【南蛮入侵】的目标时,你可令一名其他角色随机受到一至三点伤害", + xushen:"许身", + xushen_info:"当其他男性角色令你脱离濒死状态时,若“关索”不在场,其可以选择是否用“关索”替换其武将牌,然后你回复一点体力并获得技能【镇南】", + + wanwei:'挽危', + wanwei_info:'当你因被其他角色获得或弃置而失去牌时,你可以改为自己选择失去的牌。', + yuejian:'约俭', + yuejian_info:'一名角色的弃牌阶段开始时,若其本回合内使用过的牌数小于X,则你可以令其本回合的手牌上限+X。(X为其的体力上限)', + gzjili:'蒺藜', + gzjili_info:'当你于一回合内使用或打出第X张牌时,你可以摸X张牌(X为你的攻击范围)。', + xiongsuan:'凶算', + xiongsuan_info:'限定技,出牌阶段,你可以弃置一张手牌并选择一名角色,对其造成1点伤害,然后你摸三张牌。若该角色有已发动的限定技,则你选择其中一个限定技。此回合结束后,视为该限定技未发动过。', + diaodu:"调度", + diaodu_info:"当你使用装备牌时,你可以摸一张牌;出牌阶段开始时,你可以获得一名其他角色装备区里的一张牌,然后你可以将此牌交给另一名角色。", + diancai:'典财', + diancai_info:'其他角色的出牌阶段结束时,若你于此阶段失去了X张或更多的牌,则你可以将手牌摸至体力上限。(X为你的体力值)', + zhengbi:'征辟', + zhengbi_info:'出牌阶段开始时,你可以选择一项:选择一名未受伤的其他角色,你对其使用的牌无距离限制且不计入使用次数直到回合结束;或将一张基本牌交给一名其他角色,然后其交给你一张非基本牌或两张基本牌。', + fengying:'奉迎', + fengying_info:'限定技,出牌阶段,你可以弃置所有手牌。若如此做,你可以令等量的角色将手牌摸至X张(X为其体力上限且至多为5)。然后,你结束出牌阶段,并在当前回合结束后进行一个新的回合。', + + qingzhong:'清忠', + qingzhongx:'清忠', + qingzhongx_info:'出牌阶段开始时,你可以摸两张牌,若如此做,此阶段结束时,你与手牌数最少的角色交换手牌。', + weijing:'卫境', + weijing_info:'每轮限一次,当你需要使用【杀】或【闪】时,你可以视为使用一张【杀】或【闪】。', + zishu:'自书', + zishu_info:'锁定技,你的回合外,你获得的牌均会在当前回合结束后置入弃牌堆;你的回合内,当你不因〖自书〗而获得牌时,你摸一张牌。', + yingyuan:'应援', + yingyuan_info:'当你于回合内使用的牌结算完成后,你可以将其交给一名其他角色(相同牌名的牌每回合限一次)。', + xinyingyuan:'应援', + xinyingyuan_info:'当你于回合内使用一张牌后,你可以令一名其他角色从牌堆获得一张与该牌类型相同的牌(每种类型的牌每回合限一次)。', + qianya:'谦雅', + qianya_info:'当你成为锦囊牌的目标后,你可以将任意张手牌交给一名其他角色。', + shuimeng:'说盟', + shuimeng_info:'出牌阶段结束时,你可以与一名角色拼点,若你赢,视为你使用【无中生有】;若你没赢,视为其对你使用【过河拆桥】。', + xianfu:'先辅', + xianfu2:'先辅', + xianfu2_bg:'辅', + xianfu_info:'锁定技,游戏开始时,你选择一名其他角色,当其受到伤害后,你受到等量的伤害,当其回复体力后,你回复等量的体力。', + chouce:'筹策', + chouce_info:'当你受到1点伤害后,你可以判定,若结果为:黑色,你弃置一名角色区域里的一张牌;红色,你选择一名角色,其摸一张牌,若其是〖先辅〗选择的角色,改为其摸两张牌。', + fuqi:'伏骑', + fuqi_info:'锁定技,当你使用牌时,你令所有与你距离为1的其他角色不能使用或打出牌响应此牌。', + jiaozi:'骄恣', + jiaozi_info:'锁定技,若你的手牌数为全场唯一最多,则当你造成或受到伤害时,此伤害+1。', + wy_meirenji:'美人计', + wy_meirenji_info:'出牌阶段,对一名有手牌的其他男性角色使用。每名女性角色各获得其一张手牌并将一张手牌交给你,然后比较你与其的手牌数,手牌少的角色对手牌多的角色造成1点伤害。', + wy_xiaolicangdao:'笑里藏刀', + wy_xiaolicangdao_info:'出牌阶段,对一名其他角色使用。该角色摸X张牌(X为其已损失的体力值且至多为5),然后你对其造成1点伤害。', + weikui:'伪溃', + weikui2:'伪溃', + weikui_info:'出牌阶段限一次,你可以失去1点体力并选择一名有手牌的其他角色,你观看其手牌:若其手牌中有【闪】,则视为你对其使用【杀】,且本回合你计算与其的距离视为1;若其手牌中没有【闪】,你弃置其中一张牌。', + lizhan:'励战', + lizhan_info:'结束阶段,你可以令任意名已受伤的角色摸一张牌。', + wylianji:'连计', + wylianji_info:'出牌阶段限一次,你可以展示一张【杀】或黑色锦囊牌,并令一名其他角色将牌堆中的随机一张武器牌置入装备区(可替换原装备)。然后该角色选择一项:1.对除你以外的角色使用该牌,并将装备区里的武器牌交给该牌的一个目标角色;2.令你对其使用此牌,然后获得此牌,并将装备区内的武器牌交给你。', + // from here + moucheng:'谋逞', + moucheng_info:'觉醒技,当其他角色使用因〖连计〗交给其的牌累计造成伤害达到3点后,你失去技能〖连计〗,然后获得技能〖矜功〗', + jingong:'矜功', + jingong2:'矜功', + jingong_backup:'矜功', + jingong_info:'出牌阶段限一次,你可以将一张装备牌或【杀】当做一张随机锦囊牌使用(三选一,其中一张为【美人计】或【笑里藏刀】),然后本回合的结束阶段,若你于本回合内未造成过伤害,你失去1点体力', + fenyue:'奋钺', + fenyue2:'奋钺', + fenyue2_bg:'钺', + fenyue_info:'出牌阶段限X次,你可以与一名角色拼点,若你赢,你选择一项:1.令其不能使用或打出手牌直到回合结束;2.视为你对其使用了【杀】(不计入次数限制)。若你没赢,你结束出牌阶段。(X为存活的忠臣数)', + + huoshui:'祸水', + huoshui_info:'出牌阶段,你可以明置此武将牌:你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌。', + qingcheng:'倾城', + qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', + zhuoshui:'祸水', + zhuoshui_info:'锁定技,准备阶段,你令所有其他角色的非锁定技失效直到回合结束。', + zqingcheng:'倾城', + zqingcheng_info:'出牌阶段,你可以弃置一张装备牌,然后令一名角色翻面并摸两张牌。', + zfengshi:'锋矢', + zfengshi_info:'当你使用【杀】指定目标后,你可以令目标弃置装备区内的一张牌。', + chuanxin:'穿心', + chuanxin_info:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能。', + chuanxin_info_guozhan:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将。', + hengjiang:'横江', + hengjiang2:'横江', + hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌。', + rehengjiang:'横江', + rehengjiang2:'横江', + rehengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸X张牌(X为你本回合内对其发动过〖横江〗的次数)。', + shuangren:'双刃', + shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对任意一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你结束出牌阶段。', + shuangren_info_guozhan:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你结束出牌阶段。', + xiashu:'下书', + xiashu_info:'出牌阶段开始时,你可以将所有手牌交给一名其他角色,然后该角色亮出任意数量的手牌(至少一张)。你选择一项:1.获得其亮出的手牌;2.获得其未亮出的手牌。', + kuanshi:'宽释', + kuanshi2:'宽释', + kuanshi_info:'结束阶段,你可以选择一名角色。直到你的下回合开始,该角色第一次受到大于1的伤害时,防止此伤害,然后你跳过下个回合的摸牌阶段。', + bingzheng:'秉正', + bingzheng_info:'出牌阶段结束时,你可以令手牌数不等于体力值的一名角色弃置一张手牌或摸一张牌。然后若其手牌数等于体力值,你摸一张牌,且可以交给该角色一张牌。', + sheyan:'舍宴', + sheyan_info:'当你成为普通锦囊牌的目标时(【借刀杀人】等带有指向目标的锦囊除外),你可以为此牌增加一个目标或令其对其中一个目标无效。(有效目标数至少为一)', + fuman:'抚蛮', + fuman2:'抚蛮', + fuman_info:'出牌阶段,你可以将一张【杀】交给一名本回合未获得过〖抚蛮〗牌的其他角色,其于下个回合结束之前使用〖抚蛮〗牌时,你摸一张牌。', + qizhou:'绮胄', + qizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上:〖马术〗;2种或以上:〖英姿〗;3种或以上:〖短兵〗;4种:〖奋威〗。', + shanxi:'闪袭', + shanxi_info:'出牌阶段限一次,你可以弃置一张红色基本牌,然后弃置攻击范围内的一名其他角色的一张牌。若弃置的牌是【闪】,你观看其手牌,若弃置的不是【闪】,其观看你的手牌。', + duanbing:'短兵', + duanbing_info:'当你使用【杀】选择目标后,你可以令一名距离为1的其他角色也成为此牌的目标。', + fanghun:'芳魂', + fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得X个“梅影”标记(X为伤害点数);你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', + refanghun:'芳魂', + refanghun_info:'当你使用【杀】或成为【杀】的目标后,你获得1个“梅影”标记;你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', + fanghun_sha:'龙胆', + fuhan:'扶汉', + fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至少为2,至多为8),然后回复1点体力。', + refuhan:'扶汉', + refuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,获得其中一张武将牌上的所有技能。', + yjixi:'觊玺', + yjixi_info:'觉醒技,结束阶段,若你连续三回合没有因〖庸肆〗而失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。', + xinyongsi:'庸肆', + xinyongsi1:'庸肆', + xinyongsi2:'庸肆', + xinyongsi_info:'锁定技,摸牌阶段,你令额定摸牌数改为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力。', + xiehui:'黠慧', + xiehui2:'黠慧', + xiehui_info:'锁定技,你的黑色牌不计入手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值减少为止。', + lianzhu:'连诛', + lianzhu_info:'出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若此牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌', + zhaolie:'昭烈', + zhaolie_info:'摸牌阶段摸牌时,你可以少摸一张牌并指定攻击范围内的一名角色。你展示牌堆顶的三张牌,将其中的非基本牌和【桃】置于弃牌堆,然后该角色选择一项:1.你对其造成X点伤害,然后其获得这些基本牌;2.其弃置X张牌,然后你获得这些基本牌。(X为其中非基本牌的数量)', + shichou:'誓仇', + shichou2:'誓仇', + shichou_info:'主公技,限定技,准备阶段,你可指定一名蜀势力角色并交给其两张牌。本局游戏中,当你受到伤害时,改为该角色受到等量的伤害并摸等量的牌,直至该角色第一次进入濒死状态。', + shanjia:'缮甲', + shanjia_info:'出牌阶段开始时,你可以摸X张牌,然后弃置等量的牌。若你以此法弃置了装备区内的牌,则你可以视为使用一张【杀】。(X为你于本局游戏内使用过的装备牌数且最大为7)', + tuifeng:'推锋', + tuifeng2:'推锋', + tuifeng_info:'1.当你受到1点伤害后,你可以将一张牌置于武将牌上,称为“锋”。2.准备阶段开始时,若你的武将牌上有“锋”,你移去所有“锋”,摸2X张牌,然后你于此回合的出牌阶段内使用【杀】的次数上限+X。(X为你此次移去的“锋”数)', + ziyuan:'资援', + ziyuan_info:'出牌阶段限一次,你可以将任意张点数之和为13的手牌交给一名其他角色,然后该角色回复1点体力。', + jugu:'巨贾', + jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', + hongde:'弘德', + hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌。', + dingpan:'定叛', + dingpan_info_identity:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的反贼数)', + dingpan_info_versus:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的敌方角色数)', + dingpan_info:'出牌阶段限一次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。', + weidi:'伪帝', + weidi_info:'锁定技,你视为拥有当前主公的主公技。', + juesi:'决死', + juesi_info:'出牌阶段,你可以弃置一张【杀】并选择攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是【杀】且你的体力值不大于该角色,你视为对其使用【决斗】。', + zhenlue:'缜略', + zhenlue_info:'锁定技,你使用的普通锦囊牌不能被【无懈可击】响应;你不能成为延时锦囊牌的目标。', + jianshu:'间书', + jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去一点体力。', + yongdi:'拥嫡', + yongdi_info:'限定技,准备阶段开始时,你可令一名其他男性角色增加一点体力上限并回复1点体力,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技。', + gushe:'鼓舌', + gushe_bg:'舌', + gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。', + jici:'激词', + jici_info:'当你因发动〖鼓舌〗而扣置的拼点牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动〖鼓舌〗的次数上限+1。(X为你“饶舌”标记的数量)', + shefu:'设伏', + shefu_bg:'伏', + shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为「伏兵」。然后为「伏兵」记录一个基本牌或锦囊牌的名称(须与其他「伏兵」记录的名称均不同)。你的回合外,当有其他角色使用与你记录的「伏兵」牌名相同的牌时,你可以取消此牌的所有目标,然后移去该「伏兵」', + benyu:'贲育', + benyu2:'贲育', + benyu_info:'当你受到伤害后,若你的手牌数不大于伤害来源的手牌数,你可以将手牌摸至与伤害来源手牌数相同(至多摸至5张);否则你可以弃置大于伤害来源手牌数的手牌,然后对其造成1点伤害。', + zhidao:'雉盗', + zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标。', + jili:'寄篱', + jili_info:'锁定技,当一名其他角色成为红色基本牌或红色普通锦囊牌的目标时,若其与你的距离为1且你既不是此牌的使用者也不是目标,你也成为此牌的目标。', + luanzhan:'乱战', + luanzhan_info:'你使用【杀】或黑色普通锦囊牌可以额外选择X名角色为目标;当你使用【杀】或黑色普通锦囊牌指定目标后,若此牌的目标角色数小于X,则X减至0。(X为你于本局游戏内造成过伤害的次数)', + zhengnan:'征南', + zhengnan_info:'其他角色死亡后,你可以摸三张牌并获得下列技能中的任意一个:〖武圣〗、 〖当先〗和〖制蛮〗。', + xinzhengnan:'征南', + xinzhengnan_info:'锁定技,当一名角色进入濒死状态时,若你未因其发动过〖征南〗,则你回复1点体力并摸一张牌并获得下列技能中的任意一个:〖武圣〗、 〖当先〗和〖制蛮〗(若技能全部拥有则改为摸三张牌。你以此法获得的〖当先〗结算时视为已发动过〖伏枥〗)。', + xiefang:'撷芳', + xiefang_info:'锁定技,你计算与其他角色的距离时-X。(X为女性角色数)', + qizhi:'奇制', + qizhi_info:'当你于回合内使用基本牌或锦囊牌指定目标后,你可以弃置不是此牌目标的一名角色的一张牌。若如此做,其摸一张牌。', + jinqu:'进趋', + jinqu_info:'结束阶段开始时,你可以摸两张牌,若如此做,你将手牌弃置至X张。(X为你于此回合发动过〖奇制〗的次数)', + tanhu:'探虎', + tanhu2:'探虎', + tanhu3:'探虎', + tanhu_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,你获得以下效果直到回合结束:你与该角色的距离为1,你对该角色使用的普通锦囊牌不能被【无懈可击】响应。', + mouduan:'谋断', + mouduan_info:'游戏开始时,你获得标记“武”并获得技能〖激昂〗和〖谦逊〗。当你失去手牌后,若手牌数不大于2,你须将你的标记变为“文”,将这两项技能改为〖英姿〗和〖克己〗。一名角色的回合开始前,你可弃一张牌将标记翻回。', + jiqiao:'机巧', + jiqiao_info:'出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶两倍数量的牌并获得其中的非装备牌。', + linglong:'玲珑', + linglong_info:'锁定技,若你的装备区没有武器牌,则你使用【杀】的次数上限+1;若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,则你视为拥有技能〖奇才〗。', + fenyong:'愤勇', + fenyong2:'愤勇', + fenyong2_bg:'勇', + fenyong_info:'每当你受到一次伤害后,你可以获得一枚「愤勇」标记;当你拥有「愤勇」标记时,防止你受到的所有伤害。', + xuehen:'雪恨', + xuehen_info:'每个角色的结束阶段开始时,若你有愤勇标记,你弃置之,然后选择一项:1.弃置当前回合角色X张牌(X为你已损失的体力值);2.视为对一名任意角色使用一张【杀】。', + zhenwei:'镇卫', + zhenwei2:'镇卫', + zhenwei_info:'当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌。', + jie:'嫉恶', + jie_info:'锁定技,当你使用红色【杀】造成伤害时,此伤害+1。', + dahe:'大喝', + dahe2:'大喝', + dahe2_bg:'喝', + dahe_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,该角色不能使用或打出不为♥花色的【闪】直到回合结束,且你可将该角色拼点的牌交给场上一名体力不多于你的角色。若你没赢,你须展示手牌并弃置其中的一张。', + yinling:'银铃', + yinling_bg:'锦', + yinling_info:'出牌阶段,若你的“锦”小于四张,你可以弃置一张黑色牌并指定一名其他角色。若如此做,你将其的一张牌置于你的武将牌上,称为“锦”。', + junwei:'军威', + junwei2:'军威', + junwei_info:'结束阶段开始时,你可以移去三张“锦”。若如此做,你须指定一名角色并令其选择一项:1.展示一张【闪】,然后你将此【闪】交给一名其他角色。2.该角色失去1点体力,然后你将其装备区内的一张牌移出游戏。该角色的回合结束后,将以此法移出游戏的装备牌移回原处。', + yanxiao:'言笑', + yanxiao2:'言笑', + yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的武将牌上。武将牌上有〖言笑〗牌的角色下个判定阶段开始时,获得〖言笑〗牌及其判定区里的所有牌。', + anxian:'安娴', + anxian_info:'当你使用【杀】对目标角色造成伤害时,你可以防止此伤害,令其弃置一张手牌,然后你摸一张牌;当你成为【杀】的目标后,你可以弃置一张手牌,令此【杀】对你无效,然后此【杀】的使用者摸一张牌。', + xingwu:'星舞', + xingwu_info:'弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌', + luoyan:'落雁', + luoyan_info:'锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”', + yinbing:'引兵', + yinbing_info:'结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张「引兵」牌。', + juedi:'绝地', + juedi_info:'锁定技,准备阶段,若你的武将牌上有「引兵」牌,你选择一项:1.移去「引兵」牌,将手牌补至体力上限数;2.将「引兵」牌交给一名体力值不大于你的其他角色,其回复1点体力并摸等量的牌。', + kuangfu:'狂斧', + kuangfu_info:'当你使用【杀】造成伤害时,你可以选择一项:弃置其装备区内的一张牌,或将其装备区内的一张牌移动到你的装备区内。', + xintan:'心惔', + xintan_info:'出牌阶段限一次,你可以移去两张「焚」并选择一名角色,该角色失去一点体力。', + fentian:'焚天', + fentian_info:'锁定技,结束阶段开始时,若你的手牌数少于体力值,你须选择一名攻击范围内的角色,将其一张牌置于你的武将牌上,称为「焚」。锁定技,你的攻击范围+X(X为「焚」的数量)', + zhiri:'炙日', + zhiri_info:'觉醒技,准备阶段开始时,若你的「焚」的数量不小于3,你减1点体力上限,然后获得技能〖心惔〗', + meibu:'魅步', + meibu_info:'其他角色的出牌阶段开始时,若你不在其攻击范围内,你可以令该角色的锦囊牌均视为【杀】,直到该角色以此法使用了一张【杀】或回合结束。若如此做,则直到回合结束,视为你在其攻击范围内。', + mumu:'穆穆', + mumu_info:'出牌阶段限一次,你可以弃置一张【杀】或黑色锦囊牌,然后选择一项:弃置场上的一张武器牌,然后摸一张牌;或将场上的一张防具牌移动到你的装备区里(可替换原防具)。', + zhanyi:'战意', + zhanyi_basic_sha:'战杀', + zhanyi_basic_jiu:'战酒', + zhanyi_basic_tao:'战桃', + zhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作【杀】、【酒】或【桃】使用;锦囊牌,摸两张牌且你使用的牌无距离限制;装备牌,你使用【杀】指定目标角色后,其弃置两张牌。', + nuzhan:'怒斩', + nuzhan2:'怒斩', + nuzhan_info:'锁定技,你使用的由一张锦囊牌转化的【杀】不计入出牌阶段的次数限制;锁定技,你使用的由一张装备牌转化的【杀】的伤害值基数+1', + danji:'单骑', + danji_info:'觉醒技,准备阶段开始时,若你的手牌数大于你的体力值且本局游戏的主公不为刘备,你减1点体力上限,然后获得〖马术〗和〖怒斩〗', + jieyuan:'竭缘', + jieyuan_more:'竭缘', + jieyuan_less:'竭缘', + jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌,令此伤害+1;当你受到一名其他角色造成的伤害时,若其体力值大于或等于你的体力值,你可弃置一张红色手牌,令此伤害-1。', + fenxin:'焚心', + fenxin_old:'焚心', + fenxin_info:'锁定技,一名其他角色死亡后,若其身份为:忠臣,你本局内发动〖竭缘〗减少伤害时无视体力值限制;反贼,你本局内发动〖竭缘〗增加伤害时无视体力值限制;内奸,你本局内选择发动〖竭缘〗的牌时无颜色限制。', + fenxin_old_info:'限定技,当你杀死一名非主公角色时,你可以与其交换未翻开的身份牌。(你的身份为主公时不能发动此技能)', + qingyi:'轻逸', + qingyi1:'轻逸', + qingyi2:'轻逸', + qingyi_info:'你可以跳过判定阶段和摸牌阶段。若如此做,视为对一名角色使用了一张无距离限制的【杀】。', + xiandeng:'先登', + xiandeng_info:'锁定技,出牌阶段,你使用的第一张【杀】不计入次数且无距离限制。', + shulv:'熟虑', + shulv_info:'出牌阶段限一次,若你的手牌数大于体力值,则你可以弃置一张牌并摸一张牌。', + xisheng:'牺牲', + xisheng_info:'每名其他角色的回合限一次,你可以将两张牌当做【桃】使用。', + yuhua:'羽化', + yuhua_info:'锁定技,弃牌阶段内,你的非基本牌不计入手牌上限。', + qirang:'祈禳', + qirang_info:'当有装备牌进入你的装备区时,你可以随机获得牌堆中的一张锦囊牌。', + biluan:'避乱', + biluan_info:'摸牌阶段开始时,若有与你距离不大于1的其他角色,你可以放弃摸牌。若如此做,本局内其他角色计算与你的距离时+X。(X为势力数)', + lixia:'礼下', + lixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。本局内其他角色计算与你的距离时-1。', + rebiluan:'避乱', + rebiluan2:'避乱', + rebiluan_info:'结束阶段开始时,若有与你距离不大于1的其他角色,你可以弃置一张牌。若如此做,本局内其他角色计算与你的距离时+X。(X为场上角色数且至多为4)', + relixia:'礼下', + relixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你选择一至两项:1.摸一张牌;2.其摸两张牌;3.其回复1点体力。本局内其他角色计算与你的距离时-X(X为你选择的选项数)。', + yishe:'义舍', + yishe_bg:'米', + yishe_info:'结束阶段开始时,若你的武将牌上没有「米」,则你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为「米」;当有「米」移至其他区域后,若你的武将牌上没有「米」,则你回复1点体力。', + bushi:'布施', + midao:'米道', + bushi_info:'当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得你的一张「米」', + midao_info:'一名角色的判定牌生效前,你可以打出一张「米」代替之。', + fengpo:'凤魄', + fengpo_info:'当你于出牌阶段内使用第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌;2.令此牌的伤害值基数+X。(X为其手牌中方牌的数量)', + chenqing:'陈情', + chenqing_info:'每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后其弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】。', + mozhi:'默识', + mozhi_info:'结束阶段开始时,你可以将一张手牌当作你本回合出牌阶段内使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当做你本回合出牌阶段内使用的第二张基本或普通锦囊牌使用。(你不能通过此技能使用【酒】)', + ranshang:'燃殇', + ranshang2:'燃殇', + ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力(X为“燃”标记的数量)', + hanyong:'悍勇', + hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】时,若你的体力值小于游戏轮数,你可以令此牌的伤害值基数+1。', + + yicong:'义从', + yongsi:'庸肆', + yongsi1:'庸肆', + yongsi2:'庸肆', + bifa:'笔伐', + bifa2:'笔伐', + songci:'颂词', + baobian:'豹变', + lihun:'离魂', + chongzhen:'冲阵', + chongzhen1:'冲阵', + chongzhen2:'冲阵', + yuanhu:'援护', + tianming:'天命', + mizhao:'密诏', + duwu:'黩武', + mingzhe:'明哲', + huanshi:'缓释', + hongyuan:'弘援', + aocai:'傲才', + aocai2:'傲才', + aocai2_backup:'傲才', + aocai3:'傲才', + huxiao:'虎啸', + huxiao3:'虎啸', + xueji:'雪恨', + wuji:'武继', + shushen:'淑慎', + shenzhi:'神智', + xiongyi:'雄异', + junbing:'郡兵', + junbing2:'郡兵', + quji:'去疾', + sijian:'死谏', + suishi:'随势', + suishi2:'随势', + xiaoguo:'骁果', + duanxie:'断绁', + fenming:'奋命', + guixiu:'闺秀', + cunsi:'存嗣', + yongjue:'勇决', + hengzheng:'横征', + shengxi:'生息', + shoucheng:'守成', + shangyi:'尚义', + zniaoxiang:'鸟翔', + zhendu:'鸩毒', + qiluan:'戚乱', + qiluan2:'戚乱', + qiluan3:'戚乱', + shenxian:'甚贤', + oldshenxian:'甚贤', + qiangwu:'枪舞', + moukui:'谋溃', + moukui2:'谋溃', + lirang:'礼让', + mingshi:'名士', + liangzhu:'良助', + kaikang:'慷忾', + wangzun:'妄尊', + tongji:'同疾', + kuiwei:'溃围', + kuiwei2:'溃围', + yanzheng:'严整', + zhoufu:'咒缚', + zhoufu2:'咒缚', + zhoufu3:'咒缚', + yingbin:'影兵', + reyingbing:'影兵', + rezhoufu:'咒缚', + rezhoufu2:'咒缚', + fenxun:'奋迅', + fenxun2:'奋迅', + spmengjin:'猛进', + xiemu:'协穆', + xiemu2:'协穆', + oldxiemu:'协穆', + naman:'纳蛮', + zuixiang:'醉乡', + manjuan:'漫卷', + taichen:'抬榇', + jilei:'鸡肋', + jilei2:'鸡肋', + jilei2_bg:'肋', + fulu:'符箓', + fuji:'助祭', + yawang:'雅望', + xunzhi:'殉志', + fanxiang:'返乡', + fanxiang_info:'觉醒技,准备阶段开始时,若场上有已受伤且你发动过〖良助〗的选项二的角色,则你加1点体力上限并回复1点体力,失去技能〖良助〗并获得技能〖枭姬〗', + xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你本局内手牌上限+2。', + yawang_info:'锁定技,摸牌阶段开始时,你改为摸X张牌,然后你于本回合的出牌阶段内至多使用X张牌(X为与你体力值相等的角色数)', + fuji_info:'当一名角色造成雷属性伤害时,你可以令其进行判定,若结果为黑色,此伤害+1;若结果为红色,该角色获得判定牌。', + fulu_info:'当你声明使用普通【杀】时,你可以将此【杀】改为雷【杀】。', + jilei_info:'当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌,直到其下个回合开始。', + danlao:'啖酪', + danlao_info:'当你成为一张指定了多个目标的【杀】或普通锦囊牌的目标时,你可以摸一张牌,令此牌对你无效。', + gongao:'功獒', + zhuiji:'追击', + chouhai:'仇海', + chouhai_info:'锁定技,当你受到伤害时,若你没有手牌,此伤害+1。', + rechouhai:'仇海', + rechouhai_info:'锁定技,当你受到渠道为【杀】的伤害时,若你没有手牌,此伤害+1。', + guiming:'归命', + guiming_info:'主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”', + chixin:'赤心', + chixin1:'赤心', + chixin2:'赤心', + chixin_info:'你可以将♦牌当作【杀】或【闪】使用或打出。出牌阶段,你对在你攻击范围内且本回合内未成为过你使用的【杀】的目标的角色使用的【杀】没有次数限制。', + suiren:'随仁', + suiren_info:'限定技,准备阶段开始时,你可以失去技能〖义从〗,然后加1点体力上限并回复1点体力,然后令一名角色摸三张牌。', + canshi:'残蚀', + canshi2:'残蚀', + canshi_info:'摸牌阶段开始时,你可以改为摸X张牌(X为已受伤的角色数),若如此做,当你于此回合内使用基本牌或锦囊牌时,你弃置一张牌。', + recanshi:'残蚀', + recanshi2:'残蚀', + recanshi_info:'摸牌阶段开始时,你可以多摸X张牌(X为已受伤的角色数),若如此做,当你于此回合内使用【杀】或锦囊牌时,你弃置一张牌。', + zhuiji_info:'锁定技,你与体力值不大于你的角色的距离视为1。', + kunfen:'困奋', + kunfen_info:'锁定技,结束阶段开始时,你失去1点体力,然后摸两张牌。', + fengliang:'逢亮', + fengliang_info:'觉醒技,当你进入濒死状态时,你减1点体力上限,将体力值回复至2点,获得技能〖挑衅〗并将〖困奋〗改为非锁定技。', + oldcihuai:'刺槐', + oldcihuai2:'刺槐', + oldcihuai_info:'出牌阶段开始时,你可以展示手牌。若其中没有【杀】,则当你于此阶段内手牌数变化之前/有角色死亡之前需要使用【杀】时,你可以使用无对应实体牌的【杀】。', + cihuai:'刺槐', + cihuai_info:'出牌阶段开始时,若你的手牌中没有【杀】,则你可以展示你的手牌,视为对一名角色使用一张【杀】。', + gongao_info:'锁定技,当一名角色死亡后,你增加一点体力上限,回复一点体力。', + juyi:'举义', + juyi_info:'觉醒技,准备阶段开始时,若你已受伤且体力上限大于存活角色数,你须将手牌摸至体力上限,然后获得技能〖崩坏〗和〖威重〗。', + weizhong:'威重', + weizhong_info:'锁定技,当你的体力上限增加或减少时,你摸一张牌。', + taichen_info:'出牌阶段限一次,你可以失去1点体力,视为对一名角色使用一张【杀】。(不计入出牌阶段的使用次数限制)', + manjuan_info:'其他角色的牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得此牌。', + xinmanjuan:'漫卷', + xinmanjuan_info:'锁定技,当你不因【漫卷】或【醉乡】而获得牌时,你将此牌置入弃牌堆。然后若此时处于你的回合内,则你可以从弃牌堆中选择获得一张与此牌点数相同的其他牌。', + zuixiang_info:'限定技,准备阶段开始时,你可以展示牌堆顶的3张牌并置于你的武将牌上。你不能使用或打出与该些牌同类的牌,所有同类牌对你无效。之后的每个准备阶段,你须重复展示一次,直到这些牌中任意两张点数相同。然后,你获得这些牌。', + naman_info:'当其他角色打出的【杀】进入弃牌堆时,你可以获得之。', + xiemu_info:'出牌阶段限一次,你可以弃置一张【杀】并选择一个势力。若如此做,直到你的下回合开始时,当你成为该势力的其他角色使用的黑色牌的目标后,你摸两张牌。', + oldxiemu_info:'当你成为其他角色使用的黑色牌的目标后,你可以弃置一张【杀】,然后摸两张牌。', + spmengjin_info:'当你使用【杀】指定目标后,你可以弃置目标角色的一张牌。', + fenxun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他角色,你于本回合内至其的距离视为1。', + rezhoufu_info:'出牌阶段限一次,你可以用一张牌对一名其他角色施“咒”。当有“咒”的角色判定时,将“咒”作为判定牌;一名角色的回合结束时,你令本回合移除过“咒”的角色各失去1点体力', + reyingbing_info:'锁定技,有“咒”的角色使用与“咒”颜色相同的牌时,你摸一张牌;若这是你第二次因该“咒”摸牌,你获得该"咒"。', + yingbin_info:'锁定技,有“咒”的角色使用与“咒”花色相同的牌时,你摸一张牌;当你因同一名角色的同一张“咒”的效果摸第二张牌时,移去该“咒”。', + zhoufu_info:'出牌阶段限一次,你可以将一张手牌置于一名没有“咒”的其他角色的武将牌旁,称为“咒”。当有“咒”的角色判定时,其改为将“咒”作为判定牌;一名角色的回合结束时,若有角色于此回合因判定而移除过“咒”,则你令这些角色各失去1点体力。', + yanzheng_info:'若你的手牌数大于你的体力值,则你可以将你装备区内的牌当作【无懈可击】使用。', + kuiwei_info:'结束阶段开始时,你可以摸2+X张牌并记录X,然后将你的武将牌翻面(X为场上所有角色装备区内武器牌数目之和)。你的下个摸牌阶段开始时,你弃置X张牌。', + tongji_info:'锁定技。若你的手牌数大于你的体力值,则攻击范围包含你的其他角色使用【杀】时不能指定你以外的角色为目标。', + wangzun_info:'其他角色的准备阶段开始时,你可以摸一张牌。若如此做,该角色此回合的手牌上限-1。然后你不能再发动〖妄尊〗直到回合开始。', + kaikang_info:'当一名角色成为【杀】的目标后,若你至该角色的距离为1,你可以摸一张牌。若如此做,你交给其一张牌并展示之。若为装备牌,该角色可以使用此牌。', + liangzhu_info:'当一名角色于其出牌阶段内回复体力时,你可以选择一项:1、摸一张牌;2、令该角色摸两张牌。', + mingshi_info:'当你受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌,令伤害值-1。', + lirang_info:'当你的牌因弃置而置入弃牌堆后,你可以将其中的任意张牌交给其他角色。', + moukui_info:'当你使用【杀】指定目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,当此【杀】被【闪】抵消时,目标角色弃置你的一张牌。 ', + qiangwu_info:'出牌阶段,你可以进行判定。若如此做,直到回合结束,你使用点数小于判定结果的【杀】时不受距离限制,且你使用点数大于判定结果的【杀】时不计入出牌阶段的使用次数限制。', + shenxian_info:'每名角色的回合限一次,你的回合外,当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', + oldshenxian_info:'你的回合外,每当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', + qiluan_info:'一名角色的回合结束时,你可以摸3X+Y张牌。(X为你本回合内杀死过的角色数,Y为本回合内其他角色杀死过的角色数)', + //qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。', + zhendu_info:'一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成一点伤害。', + //zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。', + shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', + zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。', + shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', + shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。', + hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,则你可以放弃摸牌,改为获得每名其他角色区域内的一张牌。', + cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色。该角色获得技能【勇决】,然后你将武将牌翻面。', + yongjue_info:'每回合限一次。当其他角色于回合内使用的【杀】结算完成后,若你不是此【杀】的目标角色,则你可以获得之。', + guixiu_info:'当你成为【杀】的目标后,若你的手牌数小于体力值,则你可以摸一张牌。', + fenming_info:'结束阶段开始时,若你处于横置状态,你可以弃置所有处于横置状态的角色的各一张牌。', + duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置,若如此做,你横置。', + xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌,然后你摸一张牌;2.受到你对其造成的1点伤害。', + sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', + suishi_info:'当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力', + quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。', + junbing_info:'一名角色的结束阶段开始时,若其手牌数不大于1,该角色可以摸一张牌。若如此做,该角色将所有手牌交给你,然后你交给其等量的牌。', + xiongyi_info:'限定技,出牌阶段,你可以选择至多三名角色,这些角色各摸三张牌;若你选择的角色数不超过2,你回复1点体力', + xiongyi_info_guozhan:'限定技,出牌阶段,你可以令与你势力相同的所有角色各摸三张牌,然后若你的势力是角色最少的势力(或之一),则你回复1点体力。', + shenzhi_info:'准备阶段开始时,你可以弃置所有手牌。若你以此法弃置的牌数不小于X,你回复1点体力(X为你的体力值)。', + shushen_info:'当你回复1点体力时,你可以令一名其他角色选择回复1点体力或摸两张牌。', + wuji_info:'觉醒技,结束阶段开始时,若你于此回合内造成过3点或更多伤害,你加1点体力上限并回复1点体力,失去〖虎啸〗,然后从场上、牌堆或弃牌堆中获得【青龙偃月刀】', + xueji_info:'出牌阶段限一次,你可以弃置一张红色牌,然后选择至多X名角色,横置这些角色并对其中一名角色造成1点火焰伤害。(X为你已损失的体力值且至少为1)', + huxiao_info:'锁定技,当你造成火属性伤害时,该角色摸一张牌。然后,你于此回合内对其使用牌没有次数限制。', + aocai_info:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', + hongyuan_info:'摸牌阶段,你可以少摸一张牌并指定至多两名其他角色。若如此做,这些角色各摸一张牌。', + hongyuan_info_combat:'摸牌阶段,你可以少摸一张牌。若如此做,其他友方角色各摸一张牌。', + huanshi_info:'一名角色的判定牌生效前,你可令其观看你的手牌。若如此做,该角色选择你的一张牌,你打出此牌代替之。', + mingzhe_info:'当你于回合外使用或打出红色牌,或因弃置失去一张红色牌后,你可以摸一张牌。', + duwu_info:'出牌阶段,你可以弃置X张牌对你攻击范围内的一名其他角色造成1点伤害(X为该角色的体力值)。若该角色因此法进入濒死状态,则你于濒死状态结算后失去1点体力,且本回合不能再发动〖黩武〗。', + tianming_info:'当你成为【杀】的目标时,你可以弃置两张牌(不足则全弃,无牌则不弃),然后摸两张牌;若此时全场体力值最多的角色仅有一名且不是你,该角色也可以如此做。', + mizhao_info:'出牌阶段限一次,你可以将所有手牌交给一名其他角色。若如此做,你令该角色与你指定的另一名有手牌的角色拼点,视为拼点赢的角色对没赢的角色使用一张【杀】。', + yuanhu_info:'结束阶段开始时,你可以将一张装备牌置于一名角色的装备区里,然后根据此装备牌的类型执行以下对应效果。武器牌:弃置该角色距离1以内的一名角色区域中的一张牌;防具牌:该角色摸一张牌;坐骑牌:该角色回复1点体力。', + lihun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他男性角色。若如此做,你将武将牌翻面并获得其所有手牌。出牌阶段结束时,你交给其X张牌。(X为该角色的体力值)', + chongzhen_info:'当你发动〖龙胆〗使用或打出一张牌时,你可以获得对方的一张手牌。', + bifa_info:'结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的准备阶段开始时,其观看你移出游戏的牌并选择一项:交给你一张与此牌类型相同的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。', + songci_info:'出牌阶段,你可以选择一项:令一名手牌数小于其体力值的角色摸两张牌;或令一名手牌数大于其体力值的角色弃置两张牌。每局游戏每名角色限一次。', + yongsi_info:'锁定技,摸牌阶段,你多摸X张牌。弃牌阶段开始时,你弃置X张牌。(X为场上势力数)', + yicong_info:'锁定技,当你的体力值大于2时,你计算与其他角色的距离时-1;当你的体力值不大于2时,其他角色计算与你的距离时+1。', + baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能〖挑衅〗;若你的体力值为2或更少;你视为拥有技能〖咆哮〗;若你的体力值为1,你视为拥有技能〖神速〗。', + bingzhao:'秉诏', + bingzhao_info:'主公技,游戏开始时,你选择一个其他势力。当你对该势力的角色发动〖骨疽〗时,其可令你额外摸一张牌。', + sp_gongsunzan:'SP公孙瓒', + sp_simazhao:'SP司马昭', + sp_wangyuanji:'SP王元姬', + sp_xinxianying:'SP辛宪英', + sp_liuxie:'SP刘协', + spyicong_info:'弃牌阶段结束时,你可以将任意张牌置于你的武将牌上,称为「扈」。每有一张「扈」,其他角色与你计算距离时便+1。', + spyicong:'义从', + sptuji:'突骑', + sptuji_info:'准备开始时,你将所有「扈」置于弃牌堆,然后你本回合内计算与其他角色的距离时-X。若X不大于1,你摸一张牌。(X为以此法进入弃牌堆的「扈」的数量)', + sphuangen:'皇恩', + sphuangen_info:'一名角色使用锦囊牌指定目标时,若此牌的目标数大于1,则你可以令此牌对其中的至多X个目标无效,然后摸一张牌。(X为你的体力值)', + sphantong:'汉统', + sphantong_gain:'汉统', + sphantong_info:'当你的牌因弃牌阶段的游戏规则要求而进入弃牌堆后,你可以将这些牌置于你的武将牌上,称为「诏」。一名角色的回合开始时,你可以弃置一张「诏」并获得〖护驾〗/〖激将〗/〖救援〗/〖血裔〗中的一个技能直至当前回合结束。', + spzhaoxin:'昭心', + spzhaoxin_info:'摸牌阶段结束时,你可以展示所有手牌,然后视为使用一张【杀】。', + splanggu:'狼顾', + splanggu_rewrite:'狼顾', + splanggu_info:'当你受到有来源的伤害后,你可以进行判定(此判定结果生效前,你可以打出一张手牌替换判定牌)。然后你可以观看伤害来源的手牌并弃置其中的任意张与判定结果花色相同的牌。', + spfuluan:'扶乱', + spfuluan_info:'出牌阶段限一次,你可以弃置三张花色相同的牌并选择攻击范围内的一名角色。若如此做,该角色翻面且你不能使用【杀】直到回合结束', + spshude:'淑德', + spshude_info:'结束阶段开始时,你可以将手牌补至体力上限。', + spmingjian:'明鉴', + spmingjian_info:'一名角色的回合开始时,你可以选择一项:①弃置一张牌,然后其跳过本回合的判定阶段。②将一张手牌置于其武将牌上,然后其本回合内进行判定时不触发「判定结果生效前」的时机,且其回合结束时将此牌置入弃牌堆。', + spyinzhi:'隐智', + spyinzhi_info:'当你受到1点伤害后,你可以展示牌堆顶的两张牌。若其中有黑桃牌,则你可以进行至多X次「令一名角色获得伤害来源的一张手牌」的步骤,然后获得其余的牌。(X为其中黑桃牌的数量)', + sunshao:'孙邵', + bizheng:'弼政', + bizheng_info:'摸牌阶段结束时,你可以令一名其他角色摸两张牌。然后,若你的手牌数大于体力上限,你弃置两张牌。若其的手牌数大于体力上限,其弃置两张牌。', + yidian:'佚典', + yidian_info:'当你使用牌选择目标时,若弃牌堆中没有与此牌名称相同的牌,则你可以为此牌增加一个目标(无距离限制)。', + xinlianji:'连计', + xinlianji_info:'出牌阶段限一次,你可以弃置一张手牌,令其使用牌堆中的一张随机武器牌,然后选择一项:对你指定的一名角色使用【杀】,或令你将其装备区里的武器牌交给任意角色。', + xinmoucheng:'谋逞', + xinmoucheng_info:'觉醒技,准备阶段,若你已经发动了3次以上的〖连计〗,则你失去〖连计〗并获得〖矜功〗。', + xinjingong:'矜功', + xinjingong_info:'出牌阶段限一次,你可以将一张【杀】或装备牌当做三张随机锦囊牌中的一张使用。', + caiyang:'蔡阳', + yinka:'印卡', + zhangling:'张陵', + zlhuji:'虎骑', + zlhuji_info:'锁定技,你与其他角色的距离-1,你于回合外受到伤害后进行判定,若结果为红色,视为你对伤害来源使用一张【杀】(无视距离)。', + zlshoufu:'授符', + zlshoufu2:'授符', + zlshoufu_info:'出牌阶段限一次,你可摸一张牌,然后将一张手牌置于一名没有【箓】的角色的武将牌上,称为【箓】;其不能使用和打出与【箓】同类型的牌。该角色受伤后,或于弃牌阶段弃置至少2张与【箓】同类型的牌后,将【箓】置入弃牌堆。', + ol_zhangchangpu:'OL张昌蒲', + olxingshen:'省身', + olxingshen_info:'当你受到伤害后,你可以随机摸两张牌。若如此做,你移去所有“省”并获得X个“省”,且下一次发动〖严教〗展示牌时移去所有“省”并多展示等量的牌。(X为你已损失的体力值)', + + sp_default:"常规", + sp_zhongdan:"忠胆英杰", + sp_star:"桌游志·SP", + sp_guozhan:"国战", + sp_guozhan2:"国战移植", + sp_others:"其他", + sp_single:'新1v1', + sp_sticker:'桌游志·贴纸', + }, + }; +}); diff --git a/character/sp2.js b/character/sp2.js index fb9b11db5..6f1bf6b47 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,8 +4,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + re_maliang:['male','shu',3,['rexiemu','heli'],['unseen']], + ol_yujin:['male','wei',4,['rezhenjun']], + ol_xinxianying:['female','wei',3,['caishi','zhongjian']], + caobuxing:['male','wu',3,['moying','juanhui'],['unseen']], //sp_zhangliao:['male','qun',4,['mubing','diaoling']], - sp_key_yuri:['female','qun',4,['mubing','diaoling'],['unseen']], re_sunluyu:['female','wu',3,['remeibu','remumu']], liuzan:['male','wu',4,['refenyin','liji']], wenyang:['male','wei',5,['xinlvli','choujue']], @@ -57,11 +60,431 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_shengun:["puyuan","guanlu","gexuan","xushao"], sp_baigei:['re_panfeng','xingdaorong'], sp_guandu:["sp_zhanghe","xunchen","sp_shenpei","gaolan","lvkuanglvxiang","chunyuqiong","sp_xuyou"], - sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','liuzan','re_sunluyu'], + sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','liuzan','re_sunluyu','caobuxing','ol_xinxianying','ol_yujin','re_maliang'], } }, skill:{ + rexiemu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return !game.hasPlayer(function(current){ + return current.hasMark('rexiemu'); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('rexiemu'),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target)*Math.sqrt(Math.max(1+player.countCards('h'),1+target.countCards('h'))); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('rexiemu',target); + target.addMark('rexiemu',1); + player.addSkill('rexiemu2'); + } + }, + intro:{content:'mark'}, + ai:{ + expose:0.1, + }, + }, + rexiemu2:{ + audio:'rexiemu', + trigger:{global:['loseAfter']}, + forced:true, + charlotte:true, + usable:1, + filter:function(event,player){ + return (event.player==player||event.player.hasMark('rexiemu'))&&['useCard','respond'].contains(event.getParent().name)&&event.hs&&event.hs.length&& + event.player!=_status.currentPhase&&game.hasPlayer(function(current){ + return current.hasMark('rexiemu'); + }); + }, + content:function(){ + 'step 0' + game.asyncDraw(game.filterPlayer(function(current){ + return current==player||current==trigger.player||current.hasMark('rexiemu'); + })); + 'step 1' + game.delayx(); + }, + group:'rexiemu3', + }, + rexiemu3:{ + trigger:{player:'phaseBegin'}, + forced:true, + charlotte:true, + silent:true, + firstDo:true, + content:function(){ + player.removeSkill('rexiemu2'); + game.countPlayer(function(current){ + var num=current.countMark('rexiemu'); + if(num) current.removeMark('rexiemu',num); + }); + }, + }, + heli:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return lib.skill.heli.filterTarget(null,player,current); + }); + }, + filterTarget:function(card,player,target){ + return target.countCards('h')=1&&number<=13; + }); + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var switchToAuto=function(){ + _status.imchoosing=false; + event._result={ + bool:true, + suit:lib.suit.randomGet(), + number:numbers.randomGet(), + }; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + }; + var chooseButton=function(player,numbers){ + var event=_status.event; + player=player||event.player; + var dialog=ui.create.dialog('是否发动【墨影】?','forcebutton','hidden'); + event.dialog=dialog; + dialog.addText('花色'); + var table=document.createElement('div'); + table.classList.add('add-setting'); + table.style.margin='0'; + table.style.width='100%'; + table.style.position='relative'; + var listi=['spade','heart','club','diamond']; + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + var current=this.parentNode.querySelector('.bluebg'); + if(current){ + current.classList.remove('bluebg'); + } + this.classList.add('bluebg'); + event._result.suit=link; + }); + } + dialog.content.appendChild(table); + dialog.addText('点数'); + var table2=document.createElement('div'); + table2.classList.add('add-setting'); + table2.style.margin='0'; + table2.style.width='100%'; + table2.style.position='relative'; + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + var current=this.parentNode.querySelector('.bluebg'); + if(current){ + current.classList.remove('bluebg'); + } + this.classList.add('bluebg'); + event._result.number=link; + }); + } + dialog.content.appendChild(table2); + dialog.add('  '); + event.dialog.open(); + + event.switchToAuto=function(){ + event._result={ + bool:true, + number:numbers.randomGet(), + suit:lib.suit.randomGet(), + }; + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }; + event.control=ui.create.control('ok','cancel2',function(link){ + var result=event._result; + if(link=='cancel2') result.bool=false; + else{ + if(!result.number||!result.suit) return; + result.bool=true; + } + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }); + for(var i=0;i0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('绢绘',[player.getStorage('juanhui3'),'vcard'],'hidden') + }, + filter:function(button,player){ + return lib.filter.cardEnabled({ + name:button.link[2], + nature:button.link[3], + },player,_status.event.getParent()); + }, + check:function(button){ + var player=_status.event.player; + var card={ + name:button.link[2], + nature:button.link[3], + }; + if(player.getUseValue(card)>0) return get.order(card); + return -1; + }, + backup:function(links,player){ + return { + audio:'juanhui', + filterCard:true, + viewAs:{ + name:links[0][2], + nature:links[0][3], + }, + check:function(card){ + return 6-get.value(card); + }, + precontent:function(){ + var card=event.result.card; + if(card.name=='sha') event.getParent().addCount=false; + var vcard=player.storage.juanhui3; + for(var i=0;i0){ + var order2=get.order(card); + if(order2>order) order=order2 + } + } + return order+0.1; + }, + result:{ + player:1, + }, + }, + }, + juanhui3:{ + charlotte:true, + firstDo:true, + trigger:{ + global:'useCard2', + player:['phaseUseEnd','phaseUseSkipped','useCardAfter'], + }, + silent:true, + filter:function(event,player,name){ + if(event.name=='phaseUse') return true; + else if(name=='useCardAfter') return event.getParent().juanhui; + return event.player==player.storage.juanhui2&&event.player.isPhaseUsing()&& + ['basic','trick'].contains(get.type(event.card))&&player.getStorage('juanhui3').filter(function(vcard){ + return vcard[2]==event.card.name; + }).length==0; + }, + content:function(){ + if(trigger.name=='phaseUse') player.removeSkill('juanhui2'); + else if(event.triggername=='useCardAfter'){ + player.recover(); + player.drawTo(3); + } + else{ + var vcard=[get.type(trigger.card),'',trigger.card.name]; + if(trigger.card.nature) vcard.push(trigger.card.nature); + player.storage.juanhui3.push(vcard); + player.markSkill('juanhui2'); + } + }, + }, mubing:{ + audio:2, + audioname:['sp_key_yuri'], trigger:{player:'phaseUseBegin'}, direct:true, filter:function(event,player){ @@ -71,7 +494,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' var num=player.storage.mubing2?3:2; event.num=num+1; - player.chooseToDiscard(true,[1,num],'he',get.prompt('mubing'),'弃置至多'+get.cnNumber(num)+'张牌,然后展示牌堆顶的'+get.cnNumber(num+1)+'张牌').logSkill='mubing'; + player.chooseToDiscard([1,num],'he',get.prompt('mubing'),'弃置至多'+get.cnNumber(num)+'张牌,然后展示牌堆顶的'+get.cnNumber(num+1)+'张牌').set('ai',function(card){ + var player=_status.event.player; + if(card.name!='tengjia'&&get.position(card)=='e'&&get.equipValue(card,player)<=0) return 14; + if(!ui.selected.cards.length){ + if(card.number<9) return 0; + if(card.number>11) return card.number; + if(!player.countCards('he',function(xcard){ + return xcard!=card&&card.number+xcard.number>17; + })) return 0; + return card.number; + } + var num=0; + for(var i of ui.selected.cards){ + num+=i.number; + } + if(num+card.number<18) return 0; + return Math.max(5-get.value(card),card.number); + }).logSkill='mubing'; 'step 1' if(!result.bool){ event.finish();return; @@ -136,6 +576,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, diaoling:{ + audio:2, + audioname:['sp_key_yuri'], trigger:{player:'phaseZhunbeiBegin'}, forced:true, juexingji:true, @@ -145,7 +587,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var num=0; player.getAllHistory('gain',function(evt){ var evt2=evt.getParent(); - if(evt.name=='mubing'&&evt.player==player) num+=evt.cards.filter(function(card){ + if(evt2.name=='mubing'&&evt2.player==player) num+=evt.cards.filter(function(card){ return card.name=='sha'||get.subtype(card,false)=='equip1'||(get.type2(card,false)=='trick'&&get.tag({name:card.name},'damage')); }).length; }); @@ -4961,13 +5403,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ remumu_info:'出牌阶段开始时,你可以选择一项:1.弃置一名其他角色装备区里的一张牌,然后你本回合可使用【杀】的次数+1;2.获得一名角色装备区里的一张防具牌,然后你本回合可使用【杀】的次数-1。', sp_zhangliao:'SP张辽', //这俩技能给SP仲村由理毫无违和感好吗!!! - sp_key_yuri:'SP仲村由理', mubing:'募兵', mubing_info:'出牌阶段开始时,你可以弃置至多两张牌,然后展示牌堆顶的三张牌,并可获得任意张点数之和不大于你弃置的牌点数之和的牌。', diaoling:'调令', - diaoling_info:'觉醒技,准备阶段,若你已经获得了6张或更多的【杀】或武器牌或伤害锦囊牌,则你回复1点体力或摸两张牌,然后修改【募兵】。', + diaoling_info:'觉醒技,准备阶段,若你已因〖募兵〗获得了6张或更多的【杀】或武器牌或伤害锦囊牌,则你回复1点体力或摸两张牌,然后修改〖募兵〗。', mubing_rewrite:'募兵·改', mubing_rewrite_info:'出牌阶段开始时,你可以弃置至多三张牌,然后展示牌堆顶的四张牌,并可令一名角色获得任意张点数之和不大于你弃置的牌点数之和的牌。', + caobuxing:'曹不兴', + moying:'墨影', + moying_info:'每回合限一次,当你于回合外不因使用而失去单一一张锦囊牌或装备牌后,你可以选择一个花色和与此牌点数差绝对值不超过2的点数,然后获得牌堆中所有与此牌花色点数相同的牌。', + juanhui:'绢绘', + juanhui2:'绢绘', + juanhui2_backup:'绢绘', + juanhui_info:'结束阶段,你可以选择一名其他角色。记录该角色下回合的出牌阶段里使用的基本牌和普通锦囊牌(每种牌名限记一次),你的下回合出牌阶段,可将一张手牌当这些牌里的任意一张牌使用(每张限使用一次,且【杀】不计次数)。当"绢绘"的牌全部用完时,你回复1点体力并将手牌摸至三张。', + ol_xinxianying:'OL辛宪英', + ol_yujin:'OL于禁', + re_maliang:'马良', + rexiemu:'协穆', + rexiemu_info:'结束阶段,若全场没有“协穆”标记,你可以选择一名角色获得“协穆”标记直到你的下回合开始。你或该角色在各自的回合外使用或打出手牌时,你与其各摸一张牌(每回合限一次)。', + heli:'贺励', + heli_info:'出牌阶段限一次,你可以选择手牌数比你少的一名其他角色。该角色展示所有手牌,然后每缺少一种类型的牌,便从牌堆中随机获得一张此类型的牌。', + sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/standard.js b/character/standard.js index a549fd342..e501a47f0 100755 --- a/character/standard.js +++ b/character/standard.js @@ -1,2814 +1,2816 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'standard', - connect:true, - characterSort:{ - standard:{ - standard_2008:["caocao","simayi","xiahoudun","zhangliao","xuzhu","guojia","zhenji","liubei","guanyu","zhangfei","zhugeliang","zhaoyun","machao","huangyueying","sunquan","ganning","lvmeng","huanggai","zhouyu","daqiao","luxun","sunshangxiang","huatuo","lvbu","diaochan",], - standard_2013:["huaxiong","re_yuanshu"], - standard_2019:["gongsunzan","xf_yiji"], - }, - }, - character:{ - caocao:['male','wei',4,['jianxiong','hujia'],['zhu']], - simayi:['male','wei',3,['fankui','guicai']], - xiahoudun:['male','wei',4,['ganglie']], - zhangliao:['male','wei',4,['tuxi']], - xuzhu:['male','wei',4,['luoyi']], - guojia:['male','wei',3,['tiandu','yiji']], - zhenji:['female','wei',3,['luoshen','qingguo']], - liubei:['male','shu',4,['rende','jijiang'],['zhu']], - guanyu:['male','shu',4,['wusheng']], - zhangfei:['male','shu',4,['paoxiao']], - zhugeliang:['male','shu',3,['guanxing','kongcheng']], - zhaoyun:['male','shu',4,['longdan']], - machao:['male','shu',4,['mashu','tieji']], - huangyueying:['female','shu',3,['jizhi','qicai']], - sunquan:['male','wu',4,['zhiheng','jiuyuan'],['zhu']], - ganning:['male','wu',4,['qixi']], - lvmeng:['male','wu',4,['keji']], - huanggai:['male','wu',4,['kurou']], - zhouyu:['male','wu',3,['yingzi','fanjian']], - daqiao:['female','wu',3,['guose','liuli']], - luxun:['male','wu',3,['qianxun','lianying']], - sunshangxiang:['female','wu',3,['xiaoji','jieyin']], - huatuo:['male','qun',3,['qingnang','jijiu']], - lvbu:['male','qun',4,['wushuang']], - diaochan:['female','qun',3,['lijian','biyue']], - huaxiong:['male','qun',6,['yaowu']], - gongsunzan:['male','qun',4,['yicong']], - - xf_yiji:["male","shu",3,["xinfu_jijie","xinfu_jiyuan"],[]], - re_yuanshu:['male','qun',4,['wangzun','tongji']], - }, - characterIntro:{ - liubei:'先主姓刘,讳备,字玄德,涿郡涿县人,汉景帝子中山靖王胜之后也。以仁德治天下。', - guanyu:'字云长,本字长生,并州河东解州人。五虎上将之首,爵至汉寿亭侯,谥曰“壮缪侯”。被奉为“关圣帝君”,崇为“武圣”。', - zhangfei:'字翼德,涿郡人,燕颔虎须,豹头环眼。有诗云:“长坂坡头杀气生,横枪立马眼圆睁。一声好似轰雷震,独退曹家百万兵”。', - zhugeliang:'字孔明,号卧龙,琅琊阳都人,蜀汉丞相。在世时被封为武乡侯,谥曰忠武侯。著有《出师表》、《诫子书》等。怀不世之才,以空城戏司马,能观星象而通鬼神。', - zhaoyun:'字子龙,常山真定人。身长八尺,姿颜雄伟。长坂坡单骑救阿斗,先主云:“子龙一身都是胆也。”', - machao:'字孟起,扶风茂陵人。面如冠玉,目如流星,虎体猿臂,彪腹狼腰,声雄力猛。因衣着讲究,举止非凡,故人称“锦马超”。麾铁骑,捻金枪。', - huangyueying:'荆州沔南白水人,沔阳名士黄承彦之女,诸葛亮之妻,诸葛瞻之母。容貌甚丑,而有奇才:上通天文,下察地理,韬略近于诸书无所不晓,诸葛亮在南阳闻其贤而迎娶。', - sunquan:'吴大帝,字仲谋,吴郡富春县人。统领吴与蜀魏三足鼎立,制衡天下。', - ganning:'字兴霸,巴郡临江人,祖籍荆州南阳郡。为人勇猛刚强,忠心耿耿,勇往无前。曾带兵百人于二更奇袭曹营,大挫其锐气。', - lvmeng:'字子明,汝南富陂人。陈寿评曰:“吕蒙勇而有谋断,识军计,谲郝普,擒关羽,最其妙者。初虽轻果妄杀,终于克己,有国士之量,岂徒武将而已乎!”', - huanggai:'字公覆,零陵郡泉陵县人。官至偏将军、武陵太守。以苦肉计骗曹孟德,亲往诈降,火烧战船,重创敌军。', - zhouyu:'字公瑾,庐江舒县人,任东吴三军大都督,雄姿英发,人称“美周郎”。赤壁之战前,巧用反间计杀了精通水战的叛将蔡瑁、张允。', - daqiao:'庐江皖县人,为乔公长女,孙策之妻,小乔之姊。与小乔并称为“江东二乔”,容貌国色流离。', - luxun:'本名陆议,字伯言,吴郡吴县人。历任东吴大都督、丞相。吴大帝孙权兄孙策之婿,世代为江东大族。以谦逊之书麻痹关羽,夺取荆州,又有火烧连营大破蜀军。', - sunshangxiang:'孙夫人,乃孙权之妹。刘备定荆州,孙权进妹与其结姻,重固盟好。孙夫人才捷刚猛,有诸兄之风。后人为其立庙,号曰“枭姬庙”。', - caocao:'魏武帝曹操,字孟德,小名阿瞒、吉利,沛国谯人。精兵法,善诗歌,乃治世之能臣,乱世之奸雄也。', - simayi:'晋宣帝,字仲达,河内温人。曾任职过曹魏的大都督,太尉,太傅。少有奇节,聪明多大略,博学洽闻,伏膺儒教,世之鬼才也。', - xiahoudun:'字元让,沛国谯人。有拔矢啖睛之勇,性格勇猛刚烈。', - zhangliao:'字文远,魏雁门马邑人。官至前将军、征东将军、晋阳侯。武功高强,又谋略过人,多次建立奇功,以800人突袭孙权十万大军,皆望风披靡。', - xuzhu:'字仲康,谯国谯县人。和典韦一同统率着曹操的亲卫队“虎卫军”。因为他十分勇猛,所以有“虎痴”的绰号。曾有裸衣斗马超之举。', - guojia:'字奉孝,颍川阳翟人,官至军师祭酒。惜天妒英才,英年早逝。有诗云:“良计环环不遗策,每临制变满座惊”。', - zhenji:'中山无极人,别称甄洛或甄宓,庙号文昭甄皇后。魏文帝曹丕的正室。懂诗文,有倾国倾城之貌,《洛神赋》即是曹植为她所作。', - huatuo:'字元化,一名旉,沛国谯人,“建安三神医”之一。集平生之所得著《青囊经》,现已失传。', - lvbu:'字奉先,五原郡九原县人。三国第一猛将,曾独力战刘关张三人,其武力世之无双。时人语曰:“人中有吕布,马中有赤兔。”', - diaochan:'中国古代四大美女之一,有闭月羞花之貌。司徒王允之义女,由王允授意施行连环计,离间董卓、吕布,借布手除卓。后貂蝉成为吕布的妾。', - huaxiong:'董卓旗下名将,自荐抵抗山东地区反对董卓的诸侯联军于汜水关前,他先后斩杀济北相鲍信之弟鲍忠和孙坚部将祖茂、以及袁术部将俞涉和韩馥手下潘凤等人,最后关东联军派出关羽与之一对一决斗而被杀。', - - xf_yiji:"伊籍,字机伯,生卒年不详,兖州山阳郡(今山东金乡县)人,三国时期蜀汉官员。年少时依附于同乡刘表。刘备落难到荆州时,伊籍时常拜访,托请刘备照顾。建安十三年(208年),刘表病死,伊籍便转投刘备,一起渡江南下。建安十六年(211年),刘备入蜀帮助刘璋,伊籍亦有跟随。随后刘备和刘璋双方决裂。建安十九年(214年),刘备平定益州,任命伊籍为左将军从事中郎,其待遇次于简雍、孙乾等。后升任昭文将军,并与诸葛亮、法正、刘巴、李严共同编制《蜀科》。", - }, - perfectPair:{ - xiahoudun:['xiahouyuan'], - zhenji:['caopi'], - caocao:['xuzhu','dianwei','bianfuren'], - huangzhong:['weiyan'], - zhugeliang:['huangyueying','jiangwei','jiangfei'], - liubei:['guanyu','zhangfei','ganfuren'], - zhaoyun:['liushan'], - daqiao:['xiaoqiao'], - zhouyu:['huanggai','xiaoqiao'], - sunquan:['zhoutai'], - lvbu:['diaochan'], - machao:['madai','mayunlu'], - zhangliao:['zangba'], - ganning:['lingtong'], - }, - skill:{ - hujia:{ - audio:2, - audioname:['re_caocao'], - unique:true, - zhuSkill:true, - trigger:{player:['chooseToRespondBefore','chooseToUseBefore']}, - filter:function(event,player){ - if(event.responded) return false; - if(player.storage.hujiaing) return false; - if(!player.hasZhuSkill('hujia')) return false; - if(!event.filterCard({name:'shan'},player,event)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='wei'; - }); - }, - check:function(event,player){ - if(get.damageEffect(player,event.player,player)>=0) return false; - return true; - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='wei'){ - if((event.current==game.me&&!_status.auto)||( - get.attitude(event.current,player)>2)|| - event.current.isOnline()){ - player.storage.hujiaing=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.source)-2); - }); - next.set('skillwarn','替'+get.translation(player)+'打出一张闪'); - next.autochoose=lib.filter.autoRespondShan; - next.set('source',player); - } - } - "step 1" - player.storage.hujiaing=false; - if(result.bool){ - event.finish(); - trigger.result={bool:true,card:{name:'shan',isCard:true}}; - trigger.responded=true; - trigger.animate=false; - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - }, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(player.storage.hujiaing) return false; - if(!player.hasZhuSkill('hujia')) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='wei'; - }); - }, - }, - }, - jianxiong:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0],true)=='o'; - }, - content:function(){ - player.gain(trigger.cards,'gain2'); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - if(get.tag(card,'damage')) return [1,0.55]; - } - } - } - }, - fankui:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return (event.source&&event.source.countGainableCards(player,'he')&&event.num>0&&event.source!=player); - }, - content:function(){ - player.gainPlayerCard(get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); - }, - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.countCards('he')>1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; - if(get.attitude(target,player)<0) return [1,1]; - } - } - } - } - }, - guicai:{ - audio:2, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards(get.mode()=='guozhan'?'he':'h')>0; - }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),get.mode()=='guozhan'?'he':'h',function(card){ - var player=_status.event.player; - var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); - if(mod2!='unchanged') return mod2; - var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); - if(mod!='unchanged') return mod; - return true; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'guicai','highlight','noOrdering'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - game.cardsDiscard(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.orderingCards.addArray(result.cards); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - rejudge:true, - tag:{ - rejudge:1, - } - } - }, - ganglie:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return (event.source!=undefined); - }, - check:function(event,player){ - return (get.attitude(player,event.source)<=0); - }, - logTarget:'source', - content:function(){ - "step 0" - player.judge(function(card){ - if(get.suit(card)=='heart') return -2; - return 2; - }) - "step 1" - if(result.judge<2){ - event.finish();return; - } - trigger.source.chooseToDiscard(2).set('ai',function(card){ - if(card.name=='tao') return -10; - if(card.name=='jiu'&&_status.event.player.hp==1) return -10; - return get.unuseful(card)+2.5*(5-get.owner(card).hp); - }); - "step 2" - if(result.bool==false){ - trigger.source.damage(); - } - }, - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - return 0.8; - // if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; - } - } - } - }, - ganglie_three:{ - audio:'ganglie', - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('ganglie_three'),function(card,player,target){ - return target.isEnemyOf(player); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)/(1+target.countCards('h')); - }); - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('ganglie_three',target); - } - else event.finish(); - "step 2" - player.judge(function(card){ - if(get.suit(card)=='heart') return -2; - return 2; - }) - "step 3" - if(result.judge<2){ - event.finish();return; - } - target.chooseToDiscard(2).set('ai',function(card){ - if(card.name=='tao') return -10; - if(card.name=='jiu'&&_status.event.player.hp==1) return -10; - return get.unuseful(card)+2.5*(5-get.owner(card).hp); - }); - "step 4" - if(result.bool==false){ - target.damage(); - } - }, - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - return 0.8; - // if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; - } - } - } - }, - tuxi:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - direct:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - "step 0" - var check; - var i,num=game.countPlayer(function(current){ - return current!=player&¤t.countCards('h')&&get.attitude(player,current)<=0; - }); - check=(num>=2); - player.chooseTarget(get.prompt('tuxi'),'获得其他一至两名角色的各一张手牌',[1,2],function(card,player,target){ - return target.countCards('h')>0&&player!=target; - },function(target){ - if(!_status.event.aicheck) return 0; - var att=get.attitude(_status.event.player,target); - if(target.hasSkill('tuntian')) return att/10; - return 1-att; - }).set('aicheck',check); - "step 1" - if(result.bool){ - player.logSkill('tuxi',result.targets); - player.gainMultiple(result.targets); - trigger.changeToZero(); - } - else{ - event.finish(); - } - "step 2" - game.delay(); - }, - ai:{ - threaten:2, - expose:0.3 - } - }, - luoyi:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - check:function(event,player){ - if(player.countCards('h')<3) return false; - if(!player.hasSha()) return false; - return game.hasPlayer(function(current){ - return get.attitude(player,current)<0&&player.canUse('sha',current); - }); - }, - filter:function(event,player){ - return !event.numFixed&&event.num>0; - }, - content:function(){ - player.addTempSkill('luoyi2','phaseJieshuBegin'); - trigger.num--; - } - }, - luoyi2:{ - trigger:{source:'damageBegin1'}, - filter:function(event){ - return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); - }, - forced:true, - content:function(){ - trigger.num++; - }, - ai:{ - damageBonus:true - } - }, - tiandu:{ - audio:2, - audioname:['re_guojia','xizhicai','gz_nagisa'], - trigger:{player:'judgeEnd'}, - frequent:function(event){ - if(event.result.card.name=='du') return false; - //if(get.mode()=='guozhan') return false; - return true; - }, - check:function(event){ - if(event.result.card.name=='du') return false; - return true; - }, - filter:function(event,player){ - return get.position(event.result.card,true)=='o'; - }, - content:function(){ - player.gain(trigger.result.card,'gain2'); - } - }, - yiji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - filter:function(event){ - return (event.num>0) - }, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - event.count--; - event.cards=get.cards(2); - "step 2" - if(event.cards.length>1){ - player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ - if(ui.selected.buttons.length==0) return 1; - return 0; - }); - } - else if(event.cards.length==1){ - event._result={links:event.cards.slice(0),bool:true}; - } - else{ - event.goto(5); - } - "step 3" - if(result.bool){ - for(var i=0;i0){ - return att/(1+target.countCards('h')); - } - else{ - return att/100; - } - }).set('enemy',get.value(event.togive[0],player,'raw')<0); - } - "step 4" - if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); - player.line(result.targets[0],'green'); - game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); - event.goto(2); - } - "step 5" - if(event.count>0) player.chooseBool(get.prompt2(event.name)).set('frequentSkill',event.name); - else event.finish(); - "step 6" - if(result.bool){ - player.logSkill(event.name); - event.goto(1); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - var num=1; - if(get.attitude(player,target)>0){ - if(player.needsToDiscard()){ - num=0.7; - } - else{ - num=0.5; - } - } - if(target.hp>=4) return [1,num*2]; - if(target.hp==3) return [1,num*1.5]; - if(target.hp==2) return [1,num*0.5]; - } - } - } - } - }, - luoshen:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - frequent:true, - content:function(){ - "step 0" - if(event.cards==undefined) event.cards=[]; - var next=player.judge(function(card){ - if(get.color(card)=='black') return 1.5; - return -1.5; - }); - if(get.mode()!='guozhan'&&!player.hasSkillTag('rejudge')) next.set('callback',function(){ - if(event.judgeResult.color=='black'&&get.position(card,true)=='o') player.gain(card,'gain2'); - }); - else next.set('callback',function(){ - if(event.judgeResult.color=='black') event.getParent().orderingCards.remove(card); - }); - "step 1" - if(result.judge>0){ - event.cards.push(result.card); - player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','luoshen'); - } - else{ - for(var i=0;i0){ - event.cards.push(result.card); - if(lib.config.autoskilllist.contains('luoshen')){ - player.chooseBool('是否再次发动【洛神】?'); - } - else{ - event._result={bool:true}; - } - } - else{ - for(var i=0;i1) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(!ui.selected.cards.length&&card.name=='du') return 20; - var player=get.owner(card); - var num=0; - var evt2=_status.event.getParent(); - var num=0; - player.getHistory('lose',function(evt){ - if(evt.getParent().skill=='rende'&&evt.getParent(3)==evt2) num+=evt.cards.length; - }); - if(player.hp==player.maxHp||num>1||player.countCards('h')<=1){ - if(ui.selected.cards.length){ - return -1; - } - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - target.gain(cards,player,'giveAuto'); - var evt2=event.getParent(3); - var num=0; - player.getHistory('lose',function(evt){ - if(evt.getParent(2).name=='rende'&&evt.getParent(5)==evt2) num+=evt.cards.length; - }); - if(num<2&&num+cards.length>1) player.recover(); - }, - ai:{ - order:function(skill,player){ - if(player.hp1){ - return 10; - } - return 1; - }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return -10; - } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); - } - }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - var players=game.filterPlayer(); - for(var i=0;i0){ - return 0; - } - } - } - } - } - }, - threaten:0.8 - } - }, - rende1:{ - trigger:{player:'phaseUseBegin'}, - silent:true, - content:function(){ - player.storage.rende=0; - } - }, - jijiang:{ - audio:'jijiang1', - audioname:['liushan','re_liubei','re_liushan','ol_liushan'], - unique:true, - group:['jijiang1','jijiang2'], - zhuSkill:true, - }, - jijiang1:{ - audio:2, - audioname:['liushan','re_liubei','re_liushan','ol_liushan'], - trigger:{player:'chooseToRespondBegin'}, - check:function(event){ - if(event.jijiang) return false; - return true; - }, - filter:function(event,player){ - if(event.responded) return false; - if(player.storage.jijianging) return false; - if(!player.hasZhuSkill('jijiang')) return false; - if(!event.filterCard({name:'sha'},player,event)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='shu'){ - player.storage.jijianging=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.source)-2); - }); - next.set('source',player); - next.set('jijiang',true); - next.set('skillwarn','替'+get.translation(player)+'打出一张杀'); - next.noOrdering=true; - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - player.storage.jijianging=false; - if(result.bool){ - event.finish(); - trigger.result=result; - trigger.responded=true; - trigger.animate=false; - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - } - }, - jijiang2:{ - audio:'jijiang1', - audioname:['liushan','re_liubei','re_liushan','ol_liushan'], - enable:'chooseToUse', - prompt:'选择一名目标角色。若有其他蜀势力角色打出【杀】响应,则视为你对其使用此【杀】。', - filter:function(event,player){ - if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; - if(!player.hasZhuSkill('jijiang')) return false; - if(player.hasSkill('jijiang3')) return false; - if(!lib.filter.cardUsable({name:'sha'},player)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - filterTarget:function(card,player,target){ - if(_status.event._backup&& - typeof _status.event._backup.filterTarget=='function'&& - !_status.event._backup.filterTarget({name:'sha'},player,target)){ - return false; - } - return player.canUse({name:'sha'},target); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - player.addSkill('jijiang3'); - event.getParent(2).step=0; - event.finish(); - } - else if(event.current.group=='shu'){ - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', - function(card,player,event){ - event=event||_status.event; - return card.name=='sha'&&event.source.canUse(card,event.target); - }); - next.set('ai',function(card){ - var event=_status.event; - return get.effect(event.target,card,event.source,event.player); - }); - next.set('source',player); - next.set('target',target); - next.set('jijiang',true); - next.set('skillwarn','替'+get.translation(player)+'打出一张杀'); - next.noOrdering=true; - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - if(result.bool){ - event.finish(); - if(result.cards&&result.cards.length){ - player.useCard({name:'sha',isCard:true},result.cards,target).animate=false; - } - else{ - player.useCard({name:'sha',isCard:true},target).animate=false; - } - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - if(!player.hasZhuSkill('jijiang')) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - result:{ - target:function(player,target){ - if(player.hasSkill('jijiang3')) return 0; - return get.effect(target,{name:'sha'},player,target); - } - }, - order:function(){ - return get.order({name:'sha'})-0.1; - }, - } - }, - jijiang3:{ - trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, - silent:true, - filter:function(event){ - return event.skill!='jijiang2'&&event.skill!='qinwang2'; - }, - content:function(){ - player.removeSkill('jijiang3'); - } - }, - wusheng:{ - audio:2, - audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], - enable:['chooseToRespond','chooseToUse'], - filterCard:function(card,player){ - if(get.zhu(player,'shouyue')) return true; - return get.color(card)=='red'; - }, - position:'he', - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; - } - else{ - if(!player.countCards('he',{color:'red'})) return false; - } - }, - prompt:'将一张红色牌当杀使用或打出', - check:function(card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; - } - else{ - if(!player.countCards('he',{color:'red'})) return false; - } - }, - respondSha:true, - } - }, - zhongyi:{ - audio:2, - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'orange', - filterCard:true, - position:'he', - filter:function(event,player){ - return player.countCards('he')>0; - }, - toStorage:true, - discard:false, - content:function(){ - player.awakenSkill('zhongyi'); - player.addTempSkill('zhongyi2','roundStart'); - player.markAuto('zhongyi2',cards); - }, - }, - zhongyi2:{ - trigger:{global:'damageBegin1'}, - forced:true, - popup:false, - logTarget:'source', - filter:function(event,player){ - return event.getParent().name=='sha'&&event.source&&event.source.isFriendOf(player); - }, - content:function(){trigger.num++}, - intro:{content:'cards',onunmark:'throw'}, - }, - paoxiao:{ - audio:2, - firstDo:true, - audioname:['re_zhangfei','guanzhang','xiahouba'], - trigger:{player:'useCard1'}, - forced:true, - filter:function(event,player){ - return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase'; - }, - content:function(){ - trigger.audioed=true; - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return Infinity; - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(!get.zhu(player,'shouyue')) return false; - if(arg&&arg.name=='sha') return true; - return false; - } - } - }, - xinguanxing:{ - audio:'guanxing', - // alter:true, - trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, - frequent:true, - filter:function(event,player,name){ - if(name=='phaseJieshuBegin'){ - return player.hasSkill('xinguanxing_on'); - } - return true; - }, - content:function(){ - 'step 0' - if(get.is.altered('xinguanxing')){ - event.num=game.countPlayer()<4?3:5; - } - else{ - event.num=Math.min(5,game.countPlayer()); - } - event.cards=get.cards(event.num); - event.chosen=[]; - event.num1=0; - event.num2=0; - event.bottom=-1; - 'step 1' - var js=player.getCards('j'); - var pos; - var choice=-1; - var getval=function(card,pos){ - if(js[pos]){ - return (get.judge(js[pos]))(card); - } - else if(event.triggername=='phaseJieshuBegin'&&get.attitude(player,player.getNext())<=0){ - return 11.5-get.value(card,player); - } - else{ - return get.value(card,player); - } - }; - event.discard=false; - var minval=6; - for(pos=0;posmax){ - choice=j; - max=current; - } - } - if(event.bottom<0){ - if(!js[pos]){ - if(max=0&&event.bottom<=pos){ - choice=pos; - event.discard=true;break; - } - if(choice!=-1){ - break; - } - } - player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){ - return !_status.event.chosen.contains(button.link); - }).set('chosen',event.chosen).set('ai',function(button){ - return button.link==_status.event.choice?1:0; - }).set('choice',event.cards[choice]); - event.pos=pos; - 'step 2' - if(result.bool){ - var card=result.links[0]; - var index=event.cards.indexOf(card); - event.card=card; - event.chosen.push(card); - event.cards.remove(event.card); - var controlai=event.pos||0; - if(event.discard){ - controlai=event.cards.length+1; - } - var buttons=event.cards.slice(0); - player.chooseControl(function(){ - return _status.event.controlai; - }).set('controlai',controlai).set('sortcard',buttons).set('tosort',card); - } - else{ - event.goto(4); - } - 'step 3' - if(typeof result.index=='number'){ - if(result.index>event.cards.length){ - ui.cardPile.appendChild(event.card); - event.num2++; - } - else{ - event.cards.splice(result.index,0,event.card); - } - event.num--; - if(event.num>0){ - event.goto(1); - } - } - 'step 4' - while(event.cards.length){ - ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); - event.num1++; - } - var js=player.getCards('j'); - if(js.length==1){ - if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ - player.addTempSkill('guanxing_fail'); - } - } - player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下'); - game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底'); - if(event.triggername=='phaseZhunbeiBegin'&&get.is.altered('xinguanxing')&&event.num1==0){ - player.addTempSkill('xinguanxing_on'); - } - }, - subSkill:{ - on:{} - } - }, - guanxing_oldnew:{ - audio:2, - audioname:['jiangwei'], - trigger:{player:'phaseZhunbeiBegin'}, - frequent:true, - content:function(){ - 'step 0' - event.num=Math.min(5,game.countPlayer()); - if(event.name!='yizhi'&&player.hasSkill('yizhi')) event.num=5; - event.cards=get.cards(event.num); - event.chosen=[]; - event.num1=0; - event.num2=0; - 'step 1' - var js=player.getCards('j'); - var pos; - var choice=-1; - var getval=function(card,pos){ - if(js[pos]){ - return (get.judge(js[pos]))(card); - } - else{ - return get.value(card); - } - }; - for(pos=0;posmax){ - choice=j; - max=current; - } - } - if(choice!=-1){ - break; - } - } - player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){ - return !_status.event.chosen.contains(button.link); - }).set('chosen',event.chosen).set('ai',function(button){ - return button.link==_status.event.choice?1:0; - }).set('choice',event.cards[choice]); - event.pos=pos; - 'step 2' - if(result.bool){ - var card=result.links[0]; - var index=event.cards.indexOf(card); - event.card=card; - event.chosen.push(card); - event.cards.remove(event.card); - var buttons=event.cards.slice(0); - player.chooseControl(function(){ - return _status.event.controlai; - }).set('controlai',event.pos||0).set('sortcard',buttons).set('tosort',card); - } - else{ - event.goto(4); - } - 'step 3' - if(typeof result.index=='number'){ - if(result.index>event.cards.length){ - ui.cardPile.appendChild(event.card); - event.num2++; - } - else{ - event.cards.splice(result.index,0,event.card); - } - event.num--; - if(event.num>0){ - event.goto(1); - } - } - 'step 4' - while(event.cards.length){ - ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); - event.num1++; - } - var js=player.getCards('j'); - if(js.length==1){ - if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ - player.addTempSkill('guanxing_fail'); - } - } - player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下'); - game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底'); - }, - ai:{ - guanxing:true - } - }, - guanxing_fail:{}, - guanxing:{ - audio:2, - audioname:['jiangwei','re_jiangwei','re_zhugeliang'], - trigger:{player:'phaseZhunbeiBegin'}, - frequent:true, - content:function(){ - "step 0" - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var num=Math.min(5,game.countPlayer()); - if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){ - num=5; - } - var cards=get.cards(num); - event.cards=cards; - var switchToAuto=function(){ - _status.imchoosing=false; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - var top=[]; - var judges=player.getCards('j'); - var stopped=false; - if(!player.hasWuxie()){ - for(var i=0;i=8; - })){ - return 8-get.value(card); - } - return 6-get.value(card) - }, - delay:0, - content:function(){ - 'step 0' - if(!player.hasSkill('xinzhiheng_delay')) game.delayx(); - 'step 1' - player.draw(cards.length); - }, - group:'xinzhiheng_draw', - subSkill:{ - draw:{ - trigger:{player:'loseEnd'}, - silent:true, - filter:function(event,player){ - if(event.getParent(2).skill!='xinzhiheng') return false; - if(!get.is.altered('xinzhiheng')) return false; - if(player.countCards('h')) return false; - for(var i=0;i0) return false; - if(event.player.group!='wu') return false; - return true; - }, - content:function(){ - player.recover(); - }, - global:'xinjiuyuan2', - }, - xinjiuyuan2:{ - audio:'jiuyuan', - forceaudio:true, - trigger:{player:'taoBegin'}, - filter:function(event,player){ - if(!get.is.altered('xinjiuyuan')) return false; - if(player.group!='wu') return false; - return game.hasPlayer(function(target){ - return player!=target&&target.isDamaged()&&target.hp0); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.logSkill('xinjiuyuan',event.current); - event.current.recover(); - player.draw(); - } - event.goto(1); - } - }, - qixi:{ - audio:2, - audioname:['re_ganning','re_heqi'], - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - position:'he', - viewAs:{name:'guohe'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - prompt:'将一张黑色牌当过河拆桥使用', - check:function(card){return 4-get.value(card)} - }, - keji:{ - audio:2, - audioname:['re_lvmeng','sp_lvmeng'], - trigger:{player:'phaseDiscardBefore'}, - frequent:function(event,player){ - return player.needsToDiscard(); - }, - filter:function(event,player){ - if(player.getHistory('skipped').contains('phaseUse')) return true; - var history=player.getHistory('useCard').concat(player.getHistory('respond')); - for(var i=0;i=player.hp-1) return -1; - if(player.hp<3) return -1; - return 1; - } - } - } - }, - yingzi:{ - audio:2, - audioname:['sp_lvmeng'], - trigger:{player:'phaseDrawBegin2'}, - frequent:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num++; - }, - ai:{ - threaten:1.3 - } - }, - fanjian:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - "step 0" - target.chooseControl('heart2','diamond2','club2','spade2').set('ai',function(event){ - switch(Math.floor(Math.random()*6)){ - case 0:return 'heart2'; - case 1:case 4:case 5:return 'diamond2'; - case 2:return 'club2'; - case 3:return 'spade2'; - } - }); - "step 1" - game.log(target,'选择了'+get.translation(result.control)); - event.choice=result.control; - target.popup(event.choice); - event.card=player.getCards('h').randomGet(); - target.gain(event.card,player,'give'); - game.delay(); - "step 2" - if(get.suit(event.card)+'2'!=event.choice) target.damage('nocard'); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player); - if(eff>=0) return 1+eff; - var value=0,i; - var cards=player.getCards('h'); - for(i=0;i0; - }, - enable:'chooseToUse', - filterCard:function(card){ - return get.suit(card)=='diamond'; - }, - position:'he', - viewAs:{name:'lebu'}, - prompt:'将一张方片牌当乐不思蜀使用', - check:function(card){return 6-get.value(card)}, - ai:{ - threaten:1.5 - } - }, - liuli:{ - audio:2, - audioname:['re_daqiao','daxiaoqiao'], - trigger:{target:'useCardToTarget'}, - direct:true, - filter:function(event,player){ - if(event.card.name!='sha') return false; - if(player.countCards('he')==0) return false; - return game.hasPlayer(function(current){ - return player.inRange(current)&¤t!=event.player&& - current!=player&&lib.filter.targetEnabled(event.card,event.player,current); - }); - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var trigger=_status.event; - if(player.inRange(target)&&target!=trigger.source){ - if(lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true; - } - return false; - }, - ai1:function(card){ - return get.unuseful(card)+9; - }, - ai2:function(target){ - if(_status.event.player.countCards('h','shan')){ - return -get.attitude(_status.event.player,target); - } - if(get.attitude(_status.event.player,target)<5){ - return 6-get.attitude(_status.event.player,target); - } - if(_status.event.player.hp==1&&player.countCards('h','shan')==0){ - return 10-get.attitude(_status.event.player,target); - } - if(_status.event.player.hp==2&&player.countCards('h','shan')==0){ - return 8-get.attitude(_status.event.player,target); - } - return -1; - }, - prompt:get.prompt('liuli'), - prompt2:'弃置一张牌,将此【杀】转移给攻击范围内的一名其他角色', - source:trigger.player, - card:trigger.card, - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill(event.name,target); - player.discard(result.cards); - var evt=trigger.getParent(); - evt.triggeredTargets2.remove(player); - evt.targets.remove(player); - evt.targets.push(target); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(target.countCards('he')==0) return; - if(card.name!='sha') return; - var min=1; - var friend=get.attitude(player,target)>0; - var vcard={name:'shacopy',nature:card.nature,suit:card.suit}; - var players=game.filterPlayer(); - for(var i=0;i0){ - if(!player.canUse(card,players[0])){ - return [0,0.1]; - } - min=0; - } - } - } - return min; - } - } - } - }, - qianxun:{ - mod:{ - targetEnabled:function(card,player,target,now){ - if(card.name=='shunshou'||card.name=='lebu') return false; - } - }, - audio:2, - }, - lianying:{ - audio:2, - trigger:{player:'loseAfter'}, - frequent:true, - filter:function(event,player){ - if(player.countCards('h')) return false; - return event.hs&&event.hs.length>0; - }, - content:function(){ - player.draw(); - }, - ai:{ - threaten:0.8, - effect:{ - target:function(card){ - if(card.name=='guohe'||card.name=='liuxinghuoyu') return 0.5; - } - }, - noh:true, - skillTagFilter:function(player,tag){ - if(tag=='noh'){ - if(player.countCards('h')!=1) return false; - } - } - } - }, - xiaoji:{ - audio:2, - audioname:['sp_sunshangxiang','re_sunshangxiang'], - trigger:{player:'loseAfter'}, - frequent:true, - filter:function(event,player){ - return event.es&&event.es.length>0; - }, - content:function(){ - "step 0" - event.count=trigger.es.length; - "step 1" - event.count--; - player.draw(2); - "step 2" - if(event.count>0){ - player.chooseBool(get.prompt2('xiaoji')).set('frequentSkill','xiaoji').ai=lib.filter.all; - } - "step 3" - if(result.bool){ - player.logSkill('xiaoji'); - event.goto(1); - } - }, - ai:{ - noe:true, - reverseEquip:true, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; - } - } - } - }, - jieyin:{ - audio:2, - enable:'phaseUse', - filterCard:true, - usable:1, - selectCard:2, - check:function(card){ - var player=get.owner(card); - if(player.countCards('h')>player.hp) - return 8-get.value(card) - if(player.hp=target.maxHp) return false; - if(target==player) return false; - return true; - }, - content:function(){ - player.recover(); - target.recover(); - }, - ai:{ - order:5.5, - result:{ - player:function(player){ - if(player.hpplayer.hp) return 0 - return -1; - }, - target:4 - }, - threaten:2, - } - }, - xinjieyin:{ - group:['xinjieyin_old','xinjieyin_new'], - // alter:true, - subSkill:{ - new:{ - audio:'jieyin', - enable:'phaseUse', - filterCard:true, - usable:1, - position:'he', - filter:function(event,player){ - if(!get.is.altered('xinjieyin')) return false; - return player.countCards('he')>0; - }, - check:function(card){ - var player=_status.event.player; - if(get.position(card)=='e'){ - var subtype=get.subtype(card); - if(!game.hasPlayer(function(current){ - return current!=player&¤t.hp!=player.hp&&get.attitude(player,current)>0&&!current.countCards('e',{subtype:subtype}); - })){ - return 0; - } - if(player.countCards('h',{subtype:subtype})) return 20-get.value(card); - return 10-get.value(card); - } - else{ - if(player.countCards('e')) return 0; - if(player.countCards('h',{type:'equip'})) return 0; - return 8-get.value(card); - } - }, - filterTarget:function(card,player,target){ - if(target.sex!='male') return false; - var card=ui.selected.cards[0]; - if(!card) return false; - if(get.position(card)=='e'&&target.countCards('e',{subtype:get.subtype(card)})) return false; - return true; - }, - discard:false, - delay:0, - lose:false, - content:function(){ - 'step 0' - if(get.position(cards[0])=='e'){ - player.$give(cards,target); - target.equip(cards[0]); - } - else{ - player.discard(cards); - } - 'step 1' - if(player.hp>target.hp){ - player.draw(); - if(target.isDamaged()) target.recover(); - } - else if(player.hptarget.hp){ - if(target.isHealthy()){ - if(!player.needsToDiscard(1)||goon()) return 0.1; - return 0; - } - return 1; - } - return 0; - } - } - } - }, - old:{ - audio:'jieyin', - enable:'phaseUse', - filterCard:true, - usable:1, - selectCard:2, - filter:function(event,player){ - if(get.is.altered('xinjieyin')) return false; - return player.countCards('h')>=2; - }, - check:function(card){ - var player=get.owner(card); - if(player.countCards('h')>player.hp) - return 8-get.value(card) - if(player.hp=target.maxHp) return false; - if(target==player) return false; - return true; - }, - content:function(){ - player.recover(); - target.recover(); - }, - ai:{ - order:5.5, - result:{ - player:function(player){ - if(player.hpplayer.hp) return 0 - return -1; - }, - target:4 - } - } - } - }, - ai:{ - threaten:2.3 - } - }, - qingnang:{ - audio:2, - enable:'phaseUse', - filterCard:true, - usable:1, - check:function(card){ - return 9-get.value(card) - }, - filterTarget:function(card,player,target){ - if(target.hp>=target.maxHp) return false; - return true; - }, - content:function(){ - target.recover(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(target.hp==1) return 5; - if(player==target&&player.countCards('h')>player.hp) return 5; - return 2; - } - }, - threaten:2 - } - }, - jijiu:{ - audio:2, - audioname:['re_huatuo'], - enable:'chooseToUse', - filter:function(event,player){ - return _status.currentPhase!=player; - }, - filterCard:function(card){ - return get.color(card)=='red'; - }, - position:'he', - viewAs:{name:'tao'}, - prompt:'将一张红色牌当桃使用', - check:function(card){return 15-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player; - }, - threaten:1.5, - save:true, - respondTao:true, - } - }, - wushuang:{ - shaRelated:true, - audio:2, - audioname:['re_lvbu','shen_lvbu'], - forced:true, - locked:true, - group:['wushuang1','wushuang2'] - }, - wushuang1:{ - audio:'wushuang', - audioname:['re_lvbu','shen_lvbu'], - trigger:{player:'useCardToPlayered'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&!event.getParent().directHit.contains(event.target); - }, - //priority:-1, - logTarget:'target', - content:function(){ - var id=trigger.target.playerid; - var map=trigger.getParent().customArgs; - if(!map[id]) map[id]={}; - if(typeof map[id].shanRequired=='number'){ - map[id].shanRequired++; - } - else{ - map[id].shanRequired=2; - } - } - }, - wushuang2:{ - audio:'wushuang', - audioname:['re_lvbu','shen_lvbu'], - trigger:{player:'useCardToPlayered',target:'useCardToTargeted'}, - forced:true, - logTarget:function(trigger,player){ - return player==trigger.player?trigger.target:trigger.player - }, - filter:function(event,player){ - return event.card.name=='juedou'; - }, - //priority:-1, - content:function(){ - var id=(player==trigger.player?trigger.target:trigger.player)['playerid']; - var idt=trigger.target.playerid; - var map=trigger.getParent().customArgs; - if(!map[idt]) map[idt]={}; - if(!map[idt].shaReq) map[idt].shaReq={}; - if(!map[idt].shaReq[id]) map[idt].shaReq[id]=1; - map[idt].shaReq[id]++; - }, - ai:{ - result:{ - target:function(card,player,target){ - if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; - } - } - } - }, - zhanshen:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - skillAnimation:true, - animationColor:'gray', - filter:function(event,player){ - return player.isDamaged()&&game.dead.filter(function(target){ - return target.isFriendOf(player); - }).length>0 - }, - content:function(){ - player.awakenSkill('zhanshen'); - var card=player.getEquip(1); - if(card) player.discard(card); - player.loseMaxHp(); - player.addSkill('mashu'); - player.addSkill('shenji'); - }, - derivation:['mashu','shenji'], - }, - shenji:{ - mod:{ - selectTarget:function(card,player,range){ - if(range[1]==-1) return; - if(card.name=='sha') range[1]+=2; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - }, - }, - lijian:{ - audio:2, - audioname:['re_diaochan'], - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.countPlayer(function(current){ - return current!=player&¤t.sex=='male'; - })>1; - }, - check:function(card){return 10-get.value(card)}, - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.sex!='male') return false; - if(ui.selected.targets.length==1){ - return target.canUse({name:'juedou'},ui.selected.targets[0]); - } - return true; - }, - targetprompt:['先出杀','后出杀'], - selectTarget:2, - multitarget:true, - content:function(){ - targets[1].useCard({name:'juedou',isCard:true},'nowuxie',targets[0],'noai').animate=false; - game.delay(0.5); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(ui.selected.targets.length==0){ - return -3; - } - else{ - return get.effect(target,{name:'juedou'},ui.selected.targets[0],target); - } - } - }, - expose:0.4, - threaten:3, - } - }, - biyue:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - content:function(){ - player.draw(); - }, - }, - xinbiyue:{ - audio:'biyue', - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - // alter:true, - content:function(){ - var num=1; - if(get.is.altered('xinbiyue')&&!player.countCards('h')){ - num=2; - } - player.draw(num); - }, - }, - yaowu:{ - trigger:{player:'damageBegin3'}, - //priority:1, - audio:2, - filter:function(event){ - if(event.card&&(event.card.name=='sha')){ - if(get.color(event.card)=='red') return true; - } - return false; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - trigger.source.chooseDrawRecover(true); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&(get.color(card)=='red')){ - return [1,-2]; - } - } - } - } - }, - "new_jiangchi":{ - audio:"jiangchi", - trigger:{ - player:"phaseDrawEnd", - }, - direct:true, - content:function (){ - "step 0" - var list=['弃牌','摸牌','取消']; - if(!player.countCards('he')) list.remove('弃牌'); - player.chooseControl(list,function(){ - var player=_status.event.player; - if(list.contains('弃牌')){ - if(player.countCards('h')>3&&player.countCards('h','sha')>1){ - return '弃牌'; - } - if(player.countCards('h','sha')>2){ - return '弃牌'; - } - } - if(!player.countCards('h','sha')){ - return '摸牌'; - } - return 'cancel2'; - }).set('prompt',get.prompt('new_jiangchi')).set('prompt2',get.translation('new_jiangchi_info')); - "step 1" - if(result.control=='弃牌'){ - player.chooseToDiscard(true,'he'); - player.addTempSkill('jiangchi2','phaseUseEnd'); - player.logSkill('new_jiangchi'); - } - else if(result.control=='摸牌'){ - player.draw(); - player.addTempSkill('jiangchi3','phaseUseEnd'); - player.logSkill('new_jiangchi'); - } - }, - }, - "xinfu_jijie":{ - enable:"phaseUse", - usable:1, - audio:2, - //filter:function(){ - //return ui.cardPile.hasChildNodes(); - //}, - content:function (){ - 'step 0' - //event.card=ui.cardPile.lastChild; - event.card=get.bottomCards()[0]; - var content=['牌堆底的一张牌',[event.card]]; - game.log(player,'观看了牌堆底的一张牌'); - player.chooseControl('ok').set('dialog',content); - 'step 1' - player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du){ - if(target.hasSkillTag('nodu')) return 0.5; - return -att; - } - if(att>0){ - if(_status.event.player!=target) att+=2; - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }).set('du',event.card.name=='du').set('same',event.same); - 'step 2' - if(result.bool){ - event.target=result.targets[0]; - player.line(event.target,'green'); - player.give(event.card,event.target); - } - else ui.cardPile.appendChild(event.card); - game.updateRoundNumber(); - }, - ai:{ - order:7.2, - result:{ - player:1, - }, - }, - }, - "xinfu_jiyuan":{ - trigger:{ - global:"dying", - source:"gainAfter", - }, - //priority:6, - audio:2, - filter:function (event,player){ - if(event.name=='dying') return true; - return event.player!=player&&event.bySelf!=true; - }, - check:function (event,player){ - return get.attitude(player,event.player)>0; - }, - logTarget:"player", - content:function (){ - trigger.player.draw(); - }, - }, - }, - translate:{ - caocao:'曹操', - hujia:'护驾', - hujia_info:'主公技,当你需要使用或打出一张【闪】时,你可以令其他魏势力角色选择是否打出一张【闪】。若有角色响应,则你视为使用或打出了一张【闪】。', - jianxiong:'奸雄', - jianxiong_info:'当你受到伤害后,你可以获得对你造成伤害的牌。', - - simayi:'司马懿', - fankui:'反馈', - fankui_info:'当你受到伤害后,你可以获得伤害来源的一张牌。', - guicai:'鬼才', - guicai_info:'一名角色的判定牌生效前,你可以打出一张手牌代替之。', - guicai_info_guozhan:'一名角色的判定牌生效前,你可以打出一张牌代替之。', - - xiahoudun:'夏侯惇', - zhangliao:'张辽', - xuzhu:'许褚', - guojia:'郭嘉', - zhenji:'甄姬', - liubei:'刘备', - guanyu:'关羽', - zhangfei:'张飞', - zhugeliang:'诸葛亮', - zhaoyun:'赵云', - machao:'马超', - huangyueying:'黄月英', - sunquan:'孙权', - ganning:'甘宁', - lvmeng:'吕蒙', - huanggai:'黄盖', - zhouyu:'周瑜', - daqiao:'大乔', - luxun:'陆逊', - sunshangxiang:'孙尚香', - huatuo:'华佗', - lvbu:'吕布', - diaochan:'貂蝉', - huaxiong:'华雄', - "xf_yiji":"伊籍", - re_yuanshu:'袁术', - caozhang:'曹彰', - - ganglie:'刚烈', - tuxi:'突袭', - luoyi:'裸衣', - luoyi2:'裸衣', - tiandu:'天妒', - yiji:'遗计', - luoshen:'洛神', - xinluoshen:'洛神', - qingguo:'倾国', - rende:'仁德', - jijiang:'激将', - jijiang1:'激将', - jijiang2:'激将', - wusheng:'武圣', - paoxiao:'咆哮', - guanxing:'观星', - kongcheng:'空城', - kongcheng1:'空城', - longdan:'龙胆', - longdan1:'龙胆', - longdan2:'龙胆', - mashu:'马术', - mashu2:'马术', - feiying:'飞影', - tieji:'铁骑', - jizhi:'集智', - qicai:'奇才', - zhiheng:'制衡', - jiuyuan:'救援', - qixi:'奇袭', - keji:'克己', - kurou:'苦肉', - yingzi:'英姿', - fanjian:'反间', - guose:'国色', - liuli:'流离', - qianxun:'谦逊', - lianying:'连营', - xiaoji:'枭姬', - jieyin:'结姻', - xinjieyin:'结姻', - qingnang:'青囊', - jijiu:'急救', - wushuang:'无双', - wushuang1:'无双', - wushuang2:'无双', - lijian:'离间', - biyue:'闭月', - xinbiyue:'闭月', - pileTop:'牌堆顶', - pileBottom:'牌堆底', - ganglie_info:'当你受到伤害后,你可以进行判定。若结果不为红桃,则伤害来源须弃置两张手牌,否则受到来自你的一点伤害。', - tuxi_info:'摸牌阶段,你可以改为获得至多两名其他角色的各一张手牌。', - luoyi_info:'摸牌阶段,你可以少摸一张牌。若如此做,当你本回合内使用【杀】或【决斗】造成伤害时,此伤害+1。', - tiandu_info:'当你的判定牌生效后,你可以获得之。', - yiji_info:'当你受到一点伤害后,你可以观看牌堆顶的两张牌,然后将其分配给任意角色。', - luoshen_info:'准备阶段,你可以进行判定。若结果为黑色,你获得判定牌。你可重复此流程,直到出现红色的判定结果。', - luoshen_info_guozhan:'准备阶段,你可以进行一次判定。若结果为黑色,则可以继续判定,直到出现红色的判定牌。然后你获得所有黑色的判定牌。(判定结果为黑色的牌在此过程中不会进入弃牌堆)', - xinluoshen_info:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌', - xinluoshen_info_alter:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌。你通过洛神获得的牌,不计入当前回合的手牌上限', - qingguo_info:'你可以将一张黑色手牌当做【闪】使用或打出。', - rende_info:'出牌阶段,你可以将任意张手牌交给其他角色。当你以此法于一回合内给出第二张牌时,你回复1点体力。', - jijiang_info:'主公技,当你需要使用或打出【杀】时,你可以令其他蜀势力角色依次选择是否打出一张【杀】。若有角色响应,则你视为使用或打出了此【杀】。', - wusheng_info:'你可以将一张红色牌当做【杀】使用或打出。', - paoxiao_info:'锁定技,出牌阶段,你使用【杀】没有数量限制。', - guanxing_info:'准备阶段,你可以观看牌堆顶的X张牌,并将其以任意顺序置于牌堆项或牌堆底。(X为存活角色数且至多为5)', - xinguanxing:'观星', - xinguanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5', - xinguanxing_info_alter:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,如果你把观星的牌都放在牌堆底,你可以在结束阶段再进行1次观星', - kongcheng_info:'锁定技,当你没有手牌时,你不能成为【杀】或【决斗】的目标。', - longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【杀】使用或打出。', - mashu_info:'锁定技,你计算与其他角色的距离时-1。', - mashu2_info:'锁定技,你计算与其他角色的距离时-1。', - feiying_info:'锁定技,其他角色计算与你的距离时+1。', - tieji_info:'当你使用【杀】指定目标后,你可以进行判定。若结果为红色,则此【杀】不可被闪避。', - jizhi_info:'当你使用非转化的普通锦囊牌时,你可以摸一张牌。', - xinjizhi:'集智', - xinjizhi_info:'当你使用非转化的普通锦囊牌时,你可以摸一张牌。', - xinjizhi_info_alter:'每当你使用一张非转化的锦囊牌,可以摸一张牌,如果摸到的是基本牌,你可以弃置这张牌,然后本回合手牌上限+1', - xinqicai:'奇才', - xinqicai_info:'锁定技,你使用锦囊牌无距离限制。', - xinqicai_info_alter:'锁定技,你使用的锦囊牌无距离限制,你装备区内的牌不能被弃置', - qicai_info:'锁定技,你使用锦囊牌无距离限制。', - zhiheng_info:'出牌阶段一次,你可以弃置任意张牌,然后摸等量的牌。', - xinzhiheng:'制衡', - xinzhiheng_info:'出牌阶段限1次,你可以弃置任意张牌并摸等量的牌', - xinzhiheng_info_alter:'出牌阶段限1次,你可以弃置任意张牌并摸等量的牌,如果在发动制衡时弃置了所有手牌,你额外摸一张牌', - jiuyuan_info:'主公技,锁定技,其他吴势力角色对你使用的【桃】的回复值+1。', - xinjiuyuan:'救援', - xinjiuyuan_info:'主公技,锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力', - xinjiuyuan_info_alter:'主公技,其他吴国角色对自己使用【桃】时,如果他的体力值大于你,他可以选择让你回复1点体力,然后他摸1张牌', - qixi_info:'你可以将一张黑色牌当做【过河拆桥】使用。', - keji_info:'弃牌阶段开始时,若你于本回合的出牌阶段内没有过使用或打出过【杀】,则你可以跳过此阶段。', - kurou_info:'出牌阶段,你可以失去一点体力,然后摸两张牌。', - yingzi_info:'摸牌阶段,你可以多摸一张牌。', - fanjian_info:'出牌阶段限一次,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。然后该角色获得展示的牌。', - guose_info:'你可以将一张方片手牌当做【乐不思蜀】使用。', - liuli_info:'当你成为【杀】的目标时,你可以弃置一张牌并将此【杀】转移给攻击范围内的一名其他角色(不能是此【杀】的使用者)。', - qianxun_info:'锁定技,你不能成为【顺手牵羊】和【乐不思蜀】的目标。', - lianying_info:'当你失去最后的手牌时,你可以摸一张牌。', - xiaoji_info:'当你失去一张装备区内的牌后,你可以摸两张牌。', - jieyin_info:'出牌阶段限一次,你可以弃置两张手牌并选择一名已经受伤的男性角色。你与其各回复一点体力。', - xinjieyin_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力,每阶段限一次', - xinjieyin_old_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力。每阶段限一次。', - xinjieyin_new_info:'出牌阶段限1次,你可以选择一名男性角色,弃置一张手牌或将一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力', - xinjieyin_info_alter:'出牌阶段限1次,你可以选择一名男性角色,弃置一张手牌或将一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力', - qingnang_info:'出牌阶段限一次,你可以弃置一张手牌并令一名角色回复一点体力。', - jijiu_info:'你的回合外,你可以将一张红色牌当做【桃】使用。', - wushuang_info:'锁定技,当你使用【杀】或【决斗】指定目标后,你令此牌需要依次使用或打出两张【闪】或【杀】响应。', - lijian_info:'出牌阶段限一次,你可以弃置一张牌,视为一名男性角色对另一名男性角色使用一张【决斗】(不可被【无懈可击】响应)。', - biyue_info:'结束阶段,你可以摸一张牌。', - xinbiyue_info:'结束阶段,你可以摸一张牌', - xinbiyue_info_alter:'结束阶段,你可以摸一张牌,如果你没有手牌,改为摸2张牌', - yaowu:'耀武', - yaowu_info:'锁定技,一名角色使用红色【杀】对你造成伤害时,该角色回复1点体力或摸一张牌。', - "new_jiangchi":"将驰", - "new_jiangchi_info":"摸牌阶段结束时,你可以选择一项:1、摸一张牌,若如此做,你本回合内不能使用或打出【杀】。 2、弃置一张牌,若如此做,出牌阶段你使用【杀】无距离限制且你可以额外使用一张【杀】,直到回合结束。", - "xinfu_jijie":"机捷", - "xinfu_jijie_info":"出牌阶段限一次。你可以观看牌堆底的一张牌,然后将其交给一名角色。", - "xinfu_jiyuan":"急援", - "xinfu_jiyuan_info":"当一名角色进入濒死状态时,或你交给一名其他角色牌时,你可以令其摸一张牌。", - ganglie_three:'刚烈', - ganglie_three_info:'当你受到伤害后,你可令一名敌方角色判定。若结果不为♥,其弃置两张牌或受到来自你的1点伤害。', - zhongyi:'忠义', - zhongyi2:'忠义', - zhongyi_info:'限定技,出牌阶段,你可以将一张牌置于武将牌上。你的武将牌上有〖忠义〗牌时,己方角色使用【杀】造成的伤害+1。下轮游戏开始时,你将〖忠义〗牌置入弃牌堆。', - zhanshen:'战神', - zhanshen_info:'觉醒技,准备阶段,若场上有已死亡的其他己方角色且你已受伤,则你弃置装备区的武器牌,减1点体力上限,获得技能〖马术〗和〖神戟〗', - shenji:'神戟', - shenji_info:'锁定技,你使用【杀】指定的目标数上限+2,次数上限+1', - - standard_2008:"2008版标准包", - standard_2013:"2013版标准包", - standard_2019:"2019版标准包", - }, - }; -}); +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'standard', + connect:true, + characterSort:{ + standard:{ + standard_2008:["caocao","simayi","xiahoudun","zhangliao","xuzhu","guojia","zhenji","liubei","guanyu","zhangfei","zhugeliang","zhaoyun","machao","huangyueying","sunquan","ganning","lvmeng","huanggai","zhouyu","daqiao","luxun","sunshangxiang","huatuo","lvbu","diaochan",], + standard_2013:["huaxiong","re_yuanshu"], + standard_2019:["gongsunzan","xf_yiji"], + }, + }, + character:{ + caocao:['male','wei',4,['jianxiong','hujia'],['zhu']], + simayi:['male','wei',3,['fankui','guicai']], + xiahoudun:['male','wei',4,['ganglie']], + zhangliao:['male','wei',4,['tuxi']], + xuzhu:['male','wei',4,['luoyi']], + guojia:['male','wei',3,['tiandu','yiji']], + zhenji:['female','wei',3,['luoshen','qingguo']], + liubei:['male','shu',4,['rende','jijiang'],['zhu']], + guanyu:['male','shu',4,['wusheng']], + zhangfei:['male','shu',4,['paoxiao']], + zhugeliang:['male','shu',3,['guanxing','kongcheng']], + zhaoyun:['male','shu',4,['longdan']], + machao:['male','shu',4,['mashu','tieji']], + huangyueying:['female','shu',3,['jizhi','qicai']], + sunquan:['male','wu',4,['zhiheng','jiuyuan'],['zhu']], + ganning:['male','wu',4,['qixi']], + lvmeng:['male','wu',4,['keji']], + huanggai:['male','wu',4,['kurou']], + zhouyu:['male','wu',3,['yingzi','fanjian']], + daqiao:['female','wu',3,['guose','liuli']], + luxun:['male','wu',3,['qianxun','lianying']], + sunshangxiang:['female','wu',3,['xiaoji','jieyin']], + huatuo:['male','qun',3,['qingnang','jijiu']], + lvbu:['male','qun',4,['wushuang']], + diaochan:['female','qun',3,['lijian','biyue']], + huaxiong:['male','qun',6,['yaowu']], + gongsunzan:['male','qun',4,['yicong']], + + xf_yiji:["male","shu",3,["xinfu_jijie","xinfu_jiyuan"],[]], + re_yuanshu:['male','qun',4,['wangzun','tongji']], + }, + characterIntro:{ + liubei:'先主姓刘,讳备,字玄德,涿郡涿县人,汉景帝子中山靖王胜之后也。以仁德治天下。', + guanyu:'字云长,本字长生,并州河东解州人。五虎上将之首,爵至汉寿亭侯,谥曰“壮缪侯”。被奉为“关圣帝君”,崇为“武圣”。', + zhangfei:'字翼德,涿郡人,燕颔虎须,豹头环眼。有诗云:“长坂坡头杀气生,横枪立马眼圆睁。一声好似轰雷震,独退曹家百万兵”。', + zhugeliang:'字孔明,号卧龙,琅琊阳都人,蜀汉丞相。在世时被封为武乡侯,谥曰忠武侯。著有《出师表》、《诫子书》等。怀不世之才,以空城戏司马,能观星象而通鬼神。', + zhaoyun:'字子龙,常山真定人。身长八尺,姿颜雄伟。长坂坡单骑救阿斗,先主云:“子龙一身都是胆也。”', + machao:'字孟起,扶风茂陵人。面如冠玉,目如流星,虎体猿臂,彪腹狼腰,声雄力猛。因衣着讲究,举止非凡,故人称“锦马超”。麾铁骑,捻金枪。', + huangyueying:'荆州沔南白水人,沔阳名士黄承彦之女,诸葛亮之妻,诸葛瞻之母。容貌甚丑,而有奇才:上通天文,下察地理,韬略近于诸书无所不晓,诸葛亮在南阳闻其贤而迎娶。', + sunquan:'吴大帝,字仲谋,吴郡富春县人。统领吴与蜀魏三足鼎立,制衡天下。', + ganning:'字兴霸,巴郡临江人,祖籍荆州南阳郡。为人勇猛刚强,忠心耿耿,勇往无前。曾带兵百人于二更奇袭曹营,大挫其锐气。', + lvmeng:'字子明,汝南富陂人。陈寿评曰:“吕蒙勇而有谋断,识军计,谲郝普,擒关羽,最其妙者。初虽轻果妄杀,终于克己,有国士之量,岂徒武将而已乎!”', + huanggai:'字公覆,零陵郡泉陵县人。官至偏将军、武陵太守。以苦肉计骗曹孟德,亲往诈降,火烧战船,重创敌军。', + zhouyu:'字公瑾,庐江舒县人,任东吴三军大都督,雄姿英发,人称“美周郎”。赤壁之战前,巧用反间计杀了精通水战的叛将蔡瑁、张允。', + daqiao:'庐江皖县人,为乔公长女,孙策之妻,小乔之姊。与小乔并称为“江东二乔”,容貌国色流离。', + luxun:'本名陆议,字伯言,吴郡吴县人。历任东吴大都督、丞相。吴大帝孙权兄孙策之婿,世代为江东大族。以谦逊之书麻痹关羽,夺取荆州,又有火烧连营大破蜀军。', + sunshangxiang:'孙夫人,乃孙权之妹。刘备定荆州,孙权进妹与其结姻,重固盟好。孙夫人才捷刚猛,有诸兄之风。后人为其立庙,号曰“枭姬庙”。', + caocao:'魏武帝曹操,字孟德,小名阿瞒、吉利,沛国谯人。精兵法,善诗歌,乃治世之能臣,乱世之奸雄也。', + simayi:'晋宣帝,字仲达,河内温人。曾任职过曹魏的大都督,太尉,太傅。少有奇节,聪明多大略,博学洽闻,伏膺儒教,世之鬼才也。', + xiahoudun:'字元让,沛国谯人。有拔矢啖睛之勇,性格勇猛刚烈。', + zhangliao:'字文远,魏雁门马邑人。官至前将军、征东将军、晋阳侯。武功高强,又谋略过人,多次建立奇功,以800人突袭孙权十万大军,皆望风披靡。', + xuzhu:'字仲康,谯国谯县人。和典韦一同统率着曹操的亲卫队“虎卫军”。因为他十分勇猛,所以有“虎痴”的绰号。曾有裸衣斗马超之举。', + guojia:'字奉孝,颍川阳翟人,官至军师祭酒。惜天妒英才,英年早逝。有诗云:“良计环环不遗策,每临制变满座惊”。', + zhenji:'中山无极人,别称甄洛或甄宓,庙号文昭甄皇后。魏文帝曹丕的正室。懂诗文,有倾国倾城之貌,《洛神赋》即是曹植为她所作。', + huatuo:'字元化,一名旉,沛国谯人,“建安三神医”之一。集平生之所得著《青囊经》,现已失传。', + lvbu:'字奉先,五原郡九原县人。三国第一猛将,曾独力战刘关张三人,其武力世之无双。时人语曰:“人中有吕布,马中有赤兔。”', + diaochan:'中国古代四大美女之一,有闭月羞花之貌。司徒王允之义女,由王允授意施行连环计,离间董卓、吕布,借布手除卓。后貂蝉成为吕布的妾。', + huaxiong:'董卓旗下名将,自荐抵抗山东地区反对董卓的诸侯联军于汜水关前,他先后斩杀济北相鲍信之弟鲍忠和孙坚部将祖茂、以及袁术部将俞涉和韩馥手下潘凤等人,最后关东联军派出关羽与之一对一决斗而被杀。', + + xf_yiji:"伊籍,字机伯,生卒年不详,兖州山阳郡(今山东金乡县)人,三国时期蜀汉官员。年少时依附于同乡刘表。刘备落难到荆州时,伊籍时常拜访,托请刘备照顾。建安十三年(208年),刘表病死,伊籍便转投刘备,一起渡江南下。建安十六年(211年),刘备入蜀帮助刘璋,伊籍亦有跟随。随后刘备和刘璋双方决裂。建安十九年(214年),刘备平定益州,任命伊籍为左将军从事中郎,其待遇次于简雍、孙乾等。后升任昭文将军,并与诸葛亮、法正、刘巴、李严共同编制《蜀科》。", + }, + perfectPair:{ + xiahoudun:['xiahouyuan'], + zhenji:['caopi'], + caocao:['xuzhu','dianwei','bianfuren'], + huangzhong:['weiyan'], + zhugeliang:['huangyueying','jiangwei','jiangfei'], + liubei:['guanyu','zhangfei','ganfuren'], + zhaoyun:['liushan'], + daqiao:['xiaoqiao'], + zhouyu:['huanggai','xiaoqiao'], + sunquan:['zhoutai'], + lvbu:['diaochan'], + machao:['madai','mayunlu'], + zhangliao:['zangba'], + ganning:['lingtong'], + }, + skill:{ + hujia:{ + audio:2, + audioname:['re_caocao'], + unique:true, + zhuSkill:true, + trigger:{player:['chooseToRespondBefore','chooseToUseBefore']}, + filter:function(event,player){ + if(event.responded) return false; + if(player.storage.hujiaing) return false; + if(!player.hasZhuSkill('hujia')) return false; + if(!event.filterCard({name:'shan'},player,event)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + check:function(event,player){ + if(get.damageEffect(player,event.player,player)>=0) return false; + return true; + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); + } + else if(event.current.group=='wei'){ + if((event.current==game.me&&!_status.auto)||( + get.attitude(event.current,player)>2)|| + event.current.isOnline()){ + player.storage.hujiaing=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.source)-2); + }); + next.set('skillwarn','替'+get.translation(player)+'打出一张闪'); + next.autochoose=lib.filter.autoRespondShan; + next.set('source',player); + } + } + "step 1" + player.storage.hujiaing=false; + if(result.bool){ + event.finish(); + trigger.result={bool:true,card:{name:'shan',isCard:true}}; + trigger.responded=true; + trigger.animate=false; + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + }, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(player.storage.hujiaing) return false; + if(!player.hasZhuSkill('hujia')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + }, + }, + jianxiong:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0],true)=='o'; + }, + content:function(){ + player.gain(trigger.cards,'gain2'); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')) return [1,0.55]; + } + } + } + }, + fankui:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return (event.source&&event.source.countGainableCards(player,'he')&&event.num>0&&event.source!=player); + }, + content:function(){ + player.gainPlayerCard(get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); + }, + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.countCards('he')>1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; + if(get.attitude(target,player)<0) return [1,1]; + } + } + } + } + }, + guicai:{ + audio:2, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards(get.mode()=='guozhan'?'he':'h')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),get.mode()=='guozhan'?'he':'h',function(card){ + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'guicai','highlight','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + } + } + }, + ganglie:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return (event.source!=undefined); + }, + check:function(event,player){ + return (get.attitude(player,event.source)<=0); + }, + logTarget:'source', + content:function(){ + "step 0" + player.judge(function(card){ + if(get.suit(card)=='heart') return -2; + return 2; + }) + "step 1" + if(result.judge<2){ + event.finish();return; + } + trigger.source.chooseToDiscard(2).set('ai',function(card){ + if(card.name=='tao') return -10; + if(card.name=='jiu'&&_status.event.player.hp==1) return -10; + return get.unuseful(card)+2.5*(5-get.owner(card).hp); + }); + "step 2" + if(result.bool==false){ + trigger.source.damage(); + } + }, + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + return 0.8; + // if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; + } + } + } + }, + ganglie_three:{ + audio:'ganglie', + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('ganglie_three'),function(card,player,target){ + return target.isEnemyOf(player); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)/(1+target.countCards('h')); + }); + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('ganglie_three',target); + } + else event.finish(); + "step 2" + player.judge(function(card){ + if(get.suit(card)=='heart') return -2; + return 2; + }) + "step 3" + if(result.judge<2){ + event.finish();return; + } + target.chooseToDiscard(2).set('ai',function(card){ + if(card.name=='tao') return -10; + if(card.name=='jiu'&&_status.event.player.hp==1) return -10; + return get.unuseful(card)+2.5*(5-get.owner(card).hp); + }); + "step 4" + if(result.bool==false){ + target.damage(); + } + }, + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + return 0.8; + // if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; + } + } + } + }, + tuxi:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + direct:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + "step 0" + var check; + var i,num=game.countPlayer(function(current){ + return current!=player&¤t.countCards('h')&&get.attitude(player,current)<=0; + }); + check=(num>=2); + player.chooseTarget(get.prompt('tuxi'),'获得其他一至两名角色的各一张手牌',[1,2],function(card,player,target){ + return target.countCards('h')>0&&player!=target; + },function(target){ + if(!_status.event.aicheck) return 0; + var att=get.attitude(_status.event.player,target); + if(target.hasSkill('tuntian')) return att/10; + return 1-att; + }).set('aicheck',check); + "step 1" + if(result.bool){ + player.logSkill('tuxi',result.targets); + player.gainMultiple(result.targets); + trigger.changeToZero(); + } + else{ + event.finish(); + } + "step 2" + game.delay(); + }, + ai:{ + threaten:2, + expose:0.3 + } + }, + luoyi:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + check:function(event,player){ + if(player.countCards('h')<3) return false; + if(!player.hasSha()) return false; + return game.hasPlayer(function(current){ + return get.attitude(player,current)<0&&player.canUse('sha',current); + }); + }, + filter:function(event,player){ + return !event.numFixed&&event.num>0; + }, + content:function(){ + player.addTempSkill('luoyi2','phaseJieshuBegin'); + trigger.num--; + } + }, + luoyi2:{ + trigger:{source:'damageBegin1'}, + filter:function(event){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); + }, + forced:true, + content:function(){ + trigger.num++; + }, + ai:{ + damageBonus:true + } + }, + tiandu:{ + audio:2, + audioname:['re_guojia','xizhicai','gz_nagisa'], + trigger:{player:'judgeEnd'}, + frequent:function(event){ + if(event.result.card.name=='du') return false; + //if(get.mode()=='guozhan') return false; + return true; + }, + check:function(event){ + if(event.result.card.name=='du') return false; + return true; + }, + filter:function(event,player){ + return get.position(event.result.card,true)=='o'; + }, + content:function(){ + player.gain(trigger.result.card,'gain2'); + } + }, + yiji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + filter:function(event){ + return (event.num>0) + }, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + event.count--; + event.cards=get.cards(2); + "step 2" + if(event.cards.length>1){ + player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.goto(5); + } + "step 3" + if(result.bool){ + for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0],player,'raw')<0); + } + "step 4" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); + event.goto(2); + } + "step 5" + if(event.count>0) player.chooseBool(get.prompt2(event.name)).set('frequentSkill',event.name); + else event.finish(); + "step 6" + if(result.bool){ + player.logSkill(event.name); + event.goto(1); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + var num=1; + if(get.attitude(player,target)>0){ + if(player.needsToDiscard()){ + num=0.7; + } + else{ + num=0.5; + } + } + if(target.hp>=4) return [1,num*2]; + if(target.hp==3) return [1,num*1.5]; + if(target.hp==2) return [1,num*0.5]; + } + } + } + } + }, + luoshen:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + content:function(){ + "step 0" + if(event.cards==undefined) event.cards=[]; + var next=player.judge(function(card){ + if(get.color(card)=='black') return 1.5; + return -1.5; + }); + if(get.mode()!='guozhan'&&!player.hasSkillTag('rejudge')) next.set('callback',function(){ + if(event.judgeResult.color=='black'&&get.position(card,true)=='o') player.gain(card,'gain2'); + }); + else next.set('callback',function(){ + if(event.judgeResult.color=='black') event.getParent().orderingCards.remove(card); + }); + "step 1" + if(result.judge>0){ + event.cards.push(result.card); + player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','luoshen'); + } + else{ + for(var i=0;i0){ + event.cards.push(result.card); + if(lib.config.autoskilllist.contains('luoshen')){ + player.chooseBool('是否再次发动【洛神】?'); + } + else{ + event._result={bool:true}; + } + } + else{ + for(var i=0;i1) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + if(!ui.selected.cards.length&&card.name=='du') return 20; + var player=get.owner(card); + var num=0; + var evt2=_status.event.getParent(); + var num=0; + player.getHistory('lose',function(evt){ + if(evt.getParent().skill=='rende'&&evt.getParent(3)==evt2) num+=evt.cards.length; + }); + if(player.hp==player.maxHp||num>1||player.countCards('h')<=1){ + if(ui.selected.cards.length){ + return -1; + } + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); + } + } + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); + return -1; + } + return 10-get.value(card); + }, + content:function(){ + target.gain(cards,player,'giveAuto'); + var evt2=event.getParent(3); + var num=0; + player.getHistory('lose',function(evt){ + if(evt.getParent(2).name=='rende'&&evt.getParent(5)==evt2) num+=evt.cards.length; + }); + if(num<2&&num+cards.length>1) player.recover(); + }, + ai:{ + order:function(skill,player){ + if(player.hp1){ + return 10; + } + return 1; + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + var players=game.filterPlayer(); + for(var i=0;i0){ + return 0; + } + } + } + } + } + }, + threaten:0.8 + } + }, + rende1:{ + trigger:{player:'phaseUseBegin'}, + silent:true, + content:function(){ + player.storage.rende=0; + } + }, + jijiang:{ + audio:'jijiang1', + audioname:['liushan','re_liubei','re_liushan','ol_liushan'], + unique:true, + group:['jijiang1','jijiang2'], + zhuSkill:true, + }, + jijiang1:{ + audio:2, + audioname:['liushan','re_liubei','re_liushan','ol_liushan'], + trigger:{player:'chooseToRespondBegin'}, + check:function(event){ + if(event.jijiang) return false; + return true; + }, + filter:function(event,player){ + if(event.responded) return false; + if(player.storage.jijianging) return false; + if(!player.hasZhuSkill('jijiang')) return false; + if(!event.filterCard({name:'sha'},player,event)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); + } + else if(event.current.group=='shu'){ + player.storage.jijianging=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.source)-2); + }); + next.set('source',player); + next.set('jijiang',true); + next.set('skillwarn','替'+get.translation(player)+'打出一张杀'); + next.noOrdering=true; + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 1" + player.storage.jijianging=false; + if(result.bool){ + event.finish(); + trigger.result=result; + trigger.responded=true; + trigger.animate=false; + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + } + }, + jijiang2:{ + audio:'jijiang1', + audioname:['liushan','re_liubei','re_liushan','ol_liushan'], + enable:'chooseToUse', + prompt:'选择一名目标角色。若有其他蜀势力角色打出【杀】响应,则视为你对其使用此【杀】。', + filter:function(event,player){ + if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; + if(!player.hasZhuSkill('jijiang')) return false; + if(player.hasSkill('jijiang3')) return false; + if(!lib.filter.cardUsable({name:'sha'},player)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + filterTarget:function(card,player,target){ + if(_status.event._backup&& + typeof _status.event._backup.filterTarget=='function'&& + !_status.event._backup.filterTarget({name:'sha'},player,target)){ + return false; + } + return player.canUse({name:'sha'},target); + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + player.addSkill('jijiang3'); + event.getParent(2).step=0; + event.finish(); + } + else if(event.current.group=='shu'){ + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', + function(card,player,event){ + event=event||_status.event; + return card.name=='sha'&&event.source.canUse(card,event.target); + }); + next.set('ai',function(card){ + var event=_status.event; + return get.effect(event.target,card,event.source,event.player); + }); + next.set('source',player); + next.set('target',target); + next.set('jijiang',true); + next.set('skillwarn','替'+get.translation(player)+'打出一张杀'); + next.noOrdering=true; + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 1" + if(result.bool){ + event.finish(); + if(result.cards&&result.cards.length){ + player.useCard({name:'sha',isCard:true},result.cards,target).animate=false; + } + else{ + player.useCard({name:'sha',isCard:true},target).animate=false; + } + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + }, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + if(!player.hasZhuSkill('jijiang')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + result:{ + target:function(player,target){ + if(player.hasSkill('jijiang3')) return 0; + return get.effect(target,{name:'sha'},player,target); + } + }, + order:function(){ + return get.order({name:'sha'})-0.1; + }, + } + }, + jijiang3:{ + trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, + silent:true, + filter:function(event){ + return event.skill!='jijiang2'&&event.skill!='qinwang2'; + }, + content:function(){ + player.removeSkill('jijiang3'); + } + }, + wusheng:{ + audio:2, + audioname2:{old_guanzhang:'old_fuhun'}, + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], + enable:['chooseToRespond','chooseToUse'], + filterCard:function(card,player){ + if(get.zhu(player,'shouyue')) return true; + return get.color(card)=='red'; + }, + position:'he', + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(get.zhu(player,'shouyue')){ + if(!player.countCards('he')) return false; + } + else{ + if(!player.countCards('he',{color:'red'})) return false; + } + }, + prompt:'将一张红色牌当杀使用或打出', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(get.zhu(player,'shouyue')){ + if(!player.countCards('he')) return false; + } + else{ + if(!player.countCards('he',{color:'red'})) return false; + } + }, + respondSha:true, + } + }, + zhongyi:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'orange', + filterCard:true, + position:'he', + filter:function(event,player){ + return player.countCards('he')>0; + }, + toStorage:true, + discard:false, + content:function(){ + player.awakenSkill('zhongyi'); + player.addTempSkill('zhongyi2','roundStart'); + player.markAuto('zhongyi2',cards); + }, + }, + zhongyi2:{ + trigger:{global:'damageBegin1'}, + forced:true, + popup:false, + logTarget:'source', + filter:function(event,player){ + return event.getParent().name=='sha'&&event.source&&event.source.isFriendOf(player); + }, + content:function(){trigger.num++}, + intro:{content:'cards',onunmark:'throw'}, + }, + paoxiao:{ + audio:2, + firstDo:true, + audioname2:{old_guanzhang:'old_fuhun'}, + audioname:['re_zhangfei','guanzhang','xiahouba'], + trigger:{player:'useCard1'}, + forced:true, + filter:function(event,player){ + return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase'; + }, + content:function(){ + trigger.audioed=true; + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return Infinity; + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!get.zhu(player,'shouyue')) return false; + if(arg&&arg.name=='sha') return true; + return false; + } + } + }, + xinguanxing:{ + audio:'guanxing', + // alter:true, + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + frequent:true, + filter:function(event,player,name){ + if(name=='phaseJieshuBegin'){ + return player.hasSkill('xinguanxing_on'); + } + return true; + }, + content:function(){ + 'step 0' + if(get.is.altered('xinguanxing')){ + event.num=game.countPlayer()<4?3:5; + } + else{ + event.num=Math.min(5,game.countPlayer()); + } + event.cards=get.cards(event.num); + event.chosen=[]; + event.num1=0; + event.num2=0; + event.bottom=-1; + 'step 1' + var js=player.getCards('j'); + var pos; + var choice=-1; + var getval=function(card,pos){ + if(js[pos]){ + return (get.judge(js[pos]))(card); + } + else if(event.triggername=='phaseJieshuBegin'&&get.attitude(player,player.getNext())<=0){ + return 11.5-get.value(card,player); + } + else{ + return get.value(card,player); + } + }; + event.discard=false; + var minval=6; + for(pos=0;posmax){ + choice=j; + max=current; + } + } + if(event.bottom<0){ + if(!js[pos]){ + if(max=0&&event.bottom<=pos){ + choice=pos; + event.discard=true;break; + } + if(choice!=-1){ + break; + } + } + player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){ + return !_status.event.chosen.contains(button.link); + }).set('chosen',event.chosen).set('ai',function(button){ + return button.link==_status.event.choice?1:0; + }).set('choice',event.cards[choice]); + event.pos=pos; + 'step 2' + if(result.bool){ + var card=result.links[0]; + var index=event.cards.indexOf(card); + event.card=card; + event.chosen.push(card); + event.cards.remove(event.card); + var controlai=event.pos||0; + if(event.discard){ + controlai=event.cards.length+1; + } + var buttons=event.cards.slice(0); + player.chooseControl(function(){ + return _status.event.controlai; + }).set('controlai',controlai).set('sortcard',buttons).set('tosort',card); + } + else{ + event.goto(4); + } + 'step 3' + if(typeof result.index=='number'){ + if(result.index>event.cards.length){ + ui.cardPile.appendChild(event.card); + event.num2++; + } + else{ + event.cards.splice(result.index,0,event.card); + } + event.num--; + if(event.num>0){ + event.goto(1); + } + } + 'step 4' + while(event.cards.length){ + ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); + event.num1++; + } + var js=player.getCards('j'); + if(js.length==1){ + if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ + player.addTempSkill('guanxing_fail'); + } + } + player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下'); + game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底'); + if(event.triggername=='phaseZhunbeiBegin'&&get.is.altered('xinguanxing')&&event.num1==0){ + player.addTempSkill('xinguanxing_on'); + } + }, + subSkill:{ + on:{} + } + }, + guanxing_oldnew:{ + audio:2, + audioname:['jiangwei'], + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + content:function(){ + 'step 0' + event.num=Math.min(5,game.countPlayer()); + if(event.name!='yizhi'&&player.hasSkill('yizhi')) event.num=5; + event.cards=get.cards(event.num); + event.chosen=[]; + event.num1=0; + event.num2=0; + 'step 1' + var js=player.getCards('j'); + var pos; + var choice=-1; + var getval=function(card,pos){ + if(js[pos]){ + return (get.judge(js[pos]))(card); + } + else{ + return get.value(card); + } + }; + for(pos=0;posmax){ + choice=j; + max=current; + } + } + if(choice!=-1){ + break; + } + } + player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){ + return !_status.event.chosen.contains(button.link); + }).set('chosen',event.chosen).set('ai',function(button){ + return button.link==_status.event.choice?1:0; + }).set('choice',event.cards[choice]); + event.pos=pos; + 'step 2' + if(result.bool){ + var card=result.links[0]; + var index=event.cards.indexOf(card); + event.card=card; + event.chosen.push(card); + event.cards.remove(event.card); + var buttons=event.cards.slice(0); + player.chooseControl(function(){ + return _status.event.controlai; + }).set('controlai',event.pos||0).set('sortcard',buttons).set('tosort',card); + } + else{ + event.goto(4); + } + 'step 3' + if(typeof result.index=='number'){ + if(result.index>event.cards.length){ + ui.cardPile.appendChild(event.card); + event.num2++; + } + else{ + event.cards.splice(result.index,0,event.card); + } + event.num--; + if(event.num>0){ + event.goto(1); + } + } + 'step 4' + while(event.cards.length){ + ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild); + event.num1++; + } + var js=player.getCards('j'); + if(js.length==1){ + if((get.judge(js[0]))(ui.cardPile.firstChild)<0){ + player.addTempSkill('guanxing_fail'); + } + } + player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下'); + game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底'); + }, + ai:{ + guanxing:true + } + }, + guanxing_fail:{}, + guanxing:{ + audio:2, + audioname:['jiangwei','re_jiangwei','re_zhugeliang'], + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + content:function(){ + "step 0" + if(player.isUnderControl()){ + game.modeSwapPlayer(player); + } + var num=Math.min(5,game.countPlayer()); + if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){ + num=5; + } + var cards=get.cards(num); + event.cards=cards; + var switchToAuto=function(){ + _status.imchoosing=false; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + var top=[]; + var judges=player.getCards('j'); + var stopped=false; + if(!player.hasWuxie()){ + for(var i=0;i=8; + })){ + return 8-get.value(card); + } + return 6-get.value(card) + }, + delay:0, + content:function(){ + 'step 0' + if(!player.hasSkill('xinzhiheng_delay')) game.delayx(); + 'step 1' + player.draw(cards.length); + }, + group:'xinzhiheng_draw', + subSkill:{ + draw:{ + trigger:{player:'loseEnd'}, + silent:true, + filter:function(event,player){ + if(event.getParent(2).skill!='xinzhiheng') return false; + if(!get.is.altered('xinzhiheng')) return false; + if(player.countCards('h')) return false; + for(var i=0;i0) return false; + if(event.player.group!='wu') return false; + return true; + }, + content:function(){ + player.recover(); + }, + global:'xinjiuyuan2', + }, + xinjiuyuan2:{ + audio:'jiuyuan', + forceaudio:true, + trigger:{player:'taoBegin'}, + filter:function(event,player){ + if(!get.is.altered('xinjiuyuan')) return false; + if(player.group!='wu') return false; + return game.hasPlayer(function(target){ + return player!=target&&target.isDamaged()&&target.hp0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('xinjiuyuan',event.current); + event.current.recover(); + player.draw(); + } + event.goto(1); + } + }, + qixi:{ + audio:2, + audioname:['re_ganning','re_heqi'], + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + position:'he', + viewAs:{name:'guohe'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + prompt:'将一张黑色牌当过河拆桥使用', + check:function(card){return 4-get.value(card)} + }, + keji:{ + audio:2, + audioname:['re_lvmeng','sp_lvmeng'], + trigger:{player:'phaseDiscardBefore'}, + frequent:function(event,player){ + return player.needsToDiscard(); + }, + filter:function(event,player){ + if(player.getHistory('skipped').contains('phaseUse')) return true; + var history=player.getHistory('useCard').concat(player.getHistory('respond')); + for(var i=0;i=player.hp-1) return -1; + if(player.hp<3) return -1; + return 1; + } + } + } + }, + yingzi:{ + audio:2, + audioname:['sp_lvmeng'], + trigger:{player:'phaseDrawBegin2'}, + frequent:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num++; + }, + ai:{ + threaten:1.3 + } + }, + fanjian:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + "step 0" + target.chooseControl('heart2','diamond2','club2','spade2').set('ai',function(event){ + switch(Math.floor(Math.random()*6)){ + case 0:return 'heart2'; + case 1:case 4:case 5:return 'diamond2'; + case 2:return 'club2'; + case 3:return 'spade2'; + } + }); + "step 1" + game.log(target,'选择了'+get.translation(result.control)); + event.choice=result.control; + target.popup(event.choice); + event.card=player.getCards('h').randomGet(); + target.gain(event.card,player,'give'); + game.delay(); + "step 2" + if(get.suit(event.card)+'2'!=event.choice) target.damage('nocard'); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player); + if(eff>=0) return 1+eff; + var value=0,i; + var cards=player.getCards('h'); + for(i=0;i0; + }, + enable:'chooseToUse', + filterCard:function(card){ + return get.suit(card)=='diamond'; + }, + position:'he', + viewAs:{name:'lebu'}, + prompt:'将一张方片牌当乐不思蜀使用', + check:function(card){return 6-get.value(card)}, + ai:{ + threaten:1.5 + } + }, + liuli:{ + audio:2, + audioname:['re_daqiao','daxiaoqiao'], + trigger:{target:'useCardToTarget'}, + direct:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(player.countCards('he')==0) return false; + return game.hasPlayer(function(current){ + return player.inRange(current)&¤t!=event.player&& + current!=player&&lib.filter.targetEnabled(event.card,event.player,current); + }); + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var trigger=_status.event; + if(player.inRange(target)&&target!=trigger.source){ + if(lib.filter.targetEnabled(trigger.card,trigger.source,target)) return true; + } + return false; + }, + ai1:function(card){ + return get.unuseful(card)+9; + }, + ai2:function(target){ + if(_status.event.player.countCards('h','shan')){ + return -get.attitude(_status.event.player,target); + } + if(get.attitude(_status.event.player,target)<5){ + return 6-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==1&&player.countCards('h','shan')==0){ + return 10-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==2&&player.countCards('h','shan')==0){ + return 8-get.attitude(_status.event.player,target); + } + return -1; + }, + prompt:get.prompt('liuli'), + prompt2:'弃置一张牌,将此【杀】转移给攻击范围内的一名其他角色', + source:trigger.player, + card:trigger.card, + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill(event.name,target); + player.discard(result.cards); + var evt=trigger.getParent(); + evt.triggeredTargets2.remove(player); + evt.targets.remove(player); + evt.targets.push(target); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(target.countCards('he')==0) return; + if(card.name!='sha') return; + var min=1; + var friend=get.attitude(player,target)>0; + var vcard={name:'shacopy',nature:card.nature,suit:card.suit}; + var players=game.filterPlayer(); + for(var i=0;i0){ + if(!player.canUse(card,players[0])){ + return [0,0.1]; + } + min=0; + } + } + } + return min; + } + } + } + }, + qianxun:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(card.name=='shunshou'||card.name=='lebu') return false; + } + }, + audio:2, + }, + lianying:{ + audio:2, + trigger:{player:'loseAfter'}, + frequent:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + return event.hs&&event.hs.length>0; + }, + content:function(){ + player.draw(); + }, + ai:{ + threaten:0.8, + effect:{ + target:function(card){ + if(card.name=='guohe'||card.name=='liuxinghuoyu') return 0.5; + } + }, + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.countCards('h')!=1) return false; + } + } + } + }, + xiaoji:{ + audio:2, + audioname:['sp_sunshangxiang','re_sunshangxiang'], + trigger:{player:'loseAfter'}, + frequent:true, + filter:function(event,player){ + return event.es&&event.es.length>0; + }, + content:function(){ + "step 0" + event.count=trigger.es.length; + "step 1" + event.count--; + player.draw(2); + "step 2" + if(event.count>0){ + player.chooseBool(get.prompt2('xiaoji')).set('frequentSkill','xiaoji').ai=lib.filter.all; + } + "step 3" + if(result.bool){ + player.logSkill('xiaoji'); + event.goto(1); + } + }, + ai:{ + noe:true, + reverseEquip:true, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; + } + } + } + }, + jieyin:{ + audio:2, + enable:'phaseUse', + filterCard:true, + usable:1, + selectCard:2, + check:function(card){ + var player=get.owner(card); + if(player.countCards('h')>player.hp) + return 8-get.value(card) + if(player.hp=target.maxHp) return false; + if(target==player) return false; + return true; + }, + content:function(){ + player.recover(); + target.recover(); + }, + ai:{ + order:5.5, + result:{ + player:function(player){ + if(player.hpplayer.hp) return 0 + return -1; + }, + target:4 + }, + threaten:2, + } + }, + xinjieyin:{ + group:['xinjieyin_old','xinjieyin_new'], + // alter:true, + subSkill:{ + new:{ + audio:'jieyin', + enable:'phaseUse', + filterCard:true, + usable:1, + position:'he', + filter:function(event,player){ + if(!get.is.altered('xinjieyin')) return false; + return player.countCards('he')>0; + }, + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='e'){ + var subtype=get.subtype(card); + if(!game.hasPlayer(function(current){ + return current!=player&¤t.hp!=player.hp&&get.attitude(player,current)>0&&!current.countCards('e',{subtype:subtype}); + })){ + return 0; + } + if(player.countCards('h',{subtype:subtype})) return 20-get.value(card); + return 10-get.value(card); + } + else{ + if(player.countCards('e')) return 0; + if(player.countCards('h',{type:'equip'})) return 0; + return 8-get.value(card); + } + }, + filterTarget:function(card,player,target){ + if(target.sex!='male') return false; + var card=ui.selected.cards[0]; + if(!card) return false; + if(get.position(card)=='e'&&target.countCards('e',{subtype:get.subtype(card)})) return false; + return true; + }, + discard:false, + delay:0, + lose:false, + content:function(){ + 'step 0' + if(get.position(cards[0])=='e'){ + player.$give(cards,target); + target.equip(cards[0]); + } + else{ + player.discard(cards); + } + 'step 1' + if(player.hp>target.hp){ + player.draw(); + if(target.isDamaged()) target.recover(); + } + else if(player.hptarget.hp){ + if(target.isHealthy()){ + if(!player.needsToDiscard(1)||goon()) return 0.1; + return 0; + } + return 1; + } + return 0; + } + } + } + }, + old:{ + audio:'jieyin', + enable:'phaseUse', + filterCard:true, + usable:1, + selectCard:2, + filter:function(event,player){ + if(get.is.altered('xinjieyin')) return false; + return player.countCards('h')>=2; + }, + check:function(card){ + var player=get.owner(card); + if(player.countCards('h')>player.hp) + return 8-get.value(card) + if(player.hp=target.maxHp) return false; + if(target==player) return false; + return true; + }, + content:function(){ + player.recover(); + target.recover(); + }, + ai:{ + order:5.5, + result:{ + player:function(player){ + if(player.hpplayer.hp) return 0 + return -1; + }, + target:4 + } + } + } + }, + ai:{ + threaten:2.3 + } + }, + qingnang:{ + audio:2, + enable:'phaseUse', + filterCard:true, + usable:1, + check:function(card){ + return 9-get.value(card) + }, + filterTarget:function(card,player,target){ + if(target.hp>=target.maxHp) return false; + return true; + }, + content:function(){ + target.recover(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.hp==1) return 5; + if(player==target&&player.countCards('h')>player.hp) return 5; + return 2; + } + }, + threaten:2 + } + }, + jijiu:{ + audio:2, + audioname:['re_huatuo'], + enable:'chooseToUse', + filter:function(event,player){ + return _status.currentPhase!=player; + }, + filterCard:function(card){ + return get.color(card)=='red'; + }, + position:'he', + viewAs:{name:'tao'}, + prompt:'将一张红色牌当桃使用', + check:function(card){return 15-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player; + }, + threaten:1.5, + save:true, + respondTao:true, + } + }, + wushuang:{ + shaRelated:true, + audio:2, + audioname:['re_lvbu','shen_lvbu'], + forced:true, + locked:true, + group:['wushuang1','wushuang2'] + }, + wushuang1:{ + audio:'wushuang', + audioname:['re_lvbu','shen_lvbu'], + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.getParent().directHit.contains(event.target); + }, + //priority:-1, + logTarget:'target', + content:function(){ + var id=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[id]) map[id]={}; + if(typeof map[id].shanRequired=='number'){ + map[id].shanRequired++; + } + else{ + map[id].shanRequired=2; + } + } + }, + wushuang2:{ + audio:'wushuang', + audioname:['re_lvbu','shen_lvbu'], + trigger:{player:'useCardToPlayered',target:'useCardToTargeted'}, + forced:true, + logTarget:function(trigger,player){ + return player==trigger.player?trigger.target:trigger.player + }, + filter:function(event,player){ + return event.card.name=='juedou'; + }, + //priority:-1, + content:function(){ + var id=(player==trigger.player?trigger.target:trigger.player)['playerid']; + var idt=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[idt]) map[idt]={}; + if(!map[idt].shaReq) map[idt].shaReq={}; + if(!map[idt].shaReq[id]) map[idt].shaReq[id]=1; + map[idt].shaReq[id]++; + }, + ai:{ + result:{ + target:function(card,player,target){ + if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; + } + } + } + }, + zhanshen:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return player.isDamaged()&&game.dead.filter(function(target){ + return target.isFriendOf(player); + }).length>0 + }, + content:function(){ + player.awakenSkill('zhanshen'); + var card=player.getEquip(1); + if(card) player.discard(card); + player.loseMaxHp(); + player.addSkill('mashu'); + player.addSkill('shenji'); + }, + derivation:['mashu','shenji'], + }, + shenji:{ + mod:{ + selectTarget:function(card,player,range){ + if(range[1]==-1) return; + if(card.name=='sha') range[1]+=2; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + }, + lijian:{ + audio:2, + audioname:['re_diaochan'], + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.countPlayer(function(current){ + return current!=player&¤t.sex=='male'; + })>1; + }, + check:function(card){return 10-get.value(card)}, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + if(target.sex!='male') return false; + if(ui.selected.targets.length==1){ + return target.canUse({name:'juedou'},ui.selected.targets[0]); + } + return true; + }, + targetprompt:['先出杀','后出杀'], + selectTarget:2, + multitarget:true, + content:function(){ + targets[1].useCard({name:'juedou',isCard:true},'nowuxie',targets[0],'noai').animate=false; + game.delay(0.5); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(ui.selected.targets.length==0){ + return -3; + } + else{ + return get.effect(target,{name:'juedou'},ui.selected.targets[0],target); + } + } + }, + expose:0.4, + threaten:3, + } + }, + biyue:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + content:function(){ + player.draw(); + }, + }, + xinbiyue:{ + audio:'biyue', + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + // alter:true, + content:function(){ + var num=1; + if(get.is.altered('xinbiyue')&&!player.countCards('h')){ + num=2; + } + player.draw(num); + }, + }, + yaowu:{ + trigger:{player:'damageBegin3'}, + //priority:1, + audio:2, + filter:function(event){ + if(event.card&&(event.card.name=='sha')){ + if(get.color(event.card)=='red') return true; + } + return false; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + trigger.source.chooseDrawRecover(true); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&(get.color(card)=='red')){ + return [1,-2]; + } + } + } + } + }, + "new_jiangchi":{ + audio:"jiangchi", + trigger:{ + player:"phaseDrawEnd", + }, + direct:true, + content:function (){ + "step 0" + var list=['弃牌','摸牌','取消']; + if(!player.countCards('he')) list.remove('弃牌'); + player.chooseControl(list,function(){ + var player=_status.event.player; + if(list.contains('弃牌')){ + if(player.countCards('h')>3&&player.countCards('h','sha')>1){ + return '弃牌'; + } + if(player.countCards('h','sha')>2){ + return '弃牌'; + } + } + if(!player.countCards('h','sha')){ + return '摸牌'; + } + return 'cancel2'; + }).set('prompt',get.prompt('new_jiangchi')).set('prompt2',get.translation('new_jiangchi_info')); + "step 1" + if(result.control=='弃牌'){ + player.chooseToDiscard(true,'he'); + player.addTempSkill('jiangchi2','phaseUseEnd'); + player.logSkill('new_jiangchi'); + } + else if(result.control=='摸牌'){ + player.draw(); + player.addTempSkill('jiangchi3','phaseUseEnd'); + player.logSkill('new_jiangchi'); + } + }, + }, + "xinfu_jijie":{ + enable:"phaseUse", + usable:1, + audio:2, + //filter:function(){ + //return ui.cardPile.hasChildNodes(); + //}, + content:function (){ + 'step 0' + //event.card=ui.cardPile.lastChild; + event.card=get.bottomCards()[0]; + var content=['牌堆底的一张牌',[event.card]]; + game.log(player,'观看了牌堆底的一张牌'); + player.chooseControl('ok').set('dialog',content); + 'step 1' + player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0.5; + return -att; + } + if(att>0){ + if(_status.event.player!=target) att+=2; + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du').set('same',event.same); + 'step 2' + if(result.bool){ + event.target=result.targets[0]; + player.line(event.target,'green'); + player.give(event.card,event.target); + } + else ui.cardPile.appendChild(event.card); + game.updateRoundNumber(); + }, + ai:{ + order:7.2, + result:{ + player:1, + }, + }, + }, + "xinfu_jiyuan":{ + trigger:{ + global:"dying", + source:"gainAfter", + }, + //priority:6, + audio:2, + filter:function (event,player){ + if(event.name=='dying') return true; + return event.player!=player&&event.bySelf!=true; + }, + check:function (event,player){ + return get.attitude(player,event.player)>0; + }, + logTarget:"player", + content:function (){ + trigger.player.draw(); + }, + }, + }, + translate:{ + caocao:'曹操', + hujia:'护驾', + hujia_info:'主公技,当你需要使用或打出一张【闪】时,你可以令其他魏势力角色选择是否打出一张【闪】。若有角色响应,则你视为使用或打出了一张【闪】。', + jianxiong:'奸雄', + jianxiong_info:'当你受到伤害后,你可以获得对你造成伤害的牌。', + + simayi:'司马懿', + fankui:'反馈', + fankui_info:'当你受到伤害后,你可以获得伤害来源的一张牌。', + guicai:'鬼才', + guicai_info:'一名角色的判定牌生效前,你可以打出一张手牌代替之。', + guicai_info_guozhan:'一名角色的判定牌生效前,你可以打出一张牌代替之。', + + xiahoudun:'夏侯惇', + zhangliao:'张辽', + xuzhu:'许褚', + guojia:'郭嘉', + zhenji:'甄姬', + liubei:'刘备', + guanyu:'关羽', + zhangfei:'张飞', + zhugeliang:'诸葛亮', + zhaoyun:'赵云', + machao:'马超', + huangyueying:'黄月英', + sunquan:'孙权', + ganning:'甘宁', + lvmeng:'吕蒙', + huanggai:'黄盖', + zhouyu:'周瑜', + daqiao:'大乔', + luxun:'陆逊', + sunshangxiang:'孙尚香', + huatuo:'华佗', + lvbu:'吕布', + diaochan:'貂蝉', + huaxiong:'华雄', + "xf_yiji":"伊籍", + re_yuanshu:'袁术', + caozhang:'曹彰', + + ganglie:'刚烈', + tuxi:'突袭', + luoyi:'裸衣', + luoyi2:'裸衣', + tiandu:'天妒', + yiji:'遗计', + luoshen:'洛神', + xinluoshen:'洛神', + qingguo:'倾国', + rende:'仁德', + jijiang:'激将', + jijiang1:'激将', + jijiang2:'激将', + wusheng:'武圣', + paoxiao:'咆哮', + guanxing:'观星', + kongcheng:'空城', + kongcheng1:'空城', + longdan:'龙胆', + longdan1:'龙胆', + longdan2:'龙胆', + mashu:'马术', + mashu2:'马术', + feiying:'飞影', + tieji:'铁骑', + jizhi:'集智', + qicai:'奇才', + zhiheng:'制衡', + jiuyuan:'救援', + qixi:'奇袭', + keji:'克己', + kurou:'苦肉', + yingzi:'英姿', + fanjian:'反间', + guose:'国色', + liuli:'流离', + qianxun:'谦逊', + lianying:'连营', + xiaoji:'枭姬', + jieyin:'结姻', + xinjieyin:'结姻', + qingnang:'青囊', + jijiu:'急救', + wushuang:'无双', + wushuang1:'无双', + wushuang2:'无双', + lijian:'离间', + biyue:'闭月', + xinbiyue:'闭月', + pileTop:'牌堆顶', + pileBottom:'牌堆底', + ganglie_info:'当你受到伤害后,你可以进行判定。若结果不为红桃,则伤害来源须弃置两张手牌,否则受到来自你的一点伤害。', + tuxi_info:'摸牌阶段,你可以改为获得至多两名其他角色的各一张手牌。', + luoyi_info:'摸牌阶段,你可以少摸一张牌。若如此做,当你本回合内使用【杀】或【决斗】造成伤害时,此伤害+1。', + tiandu_info:'当你的判定牌生效后,你可以获得之。', + yiji_info:'当你受到一点伤害后,你可以观看牌堆顶的两张牌,然后将其分配给任意角色。', + luoshen_info:'准备阶段,你可以进行判定。若结果为黑色,你获得判定牌。你可重复此流程,直到出现红色的判定结果。', + luoshen_info_guozhan:'准备阶段,你可以进行一次判定。若结果为黑色,则可以继续判定,直到出现红色的判定牌。然后你获得所有黑色的判定牌。(判定结果为黑色的牌在此过程中不会进入弃牌堆)', + xinluoshen_info:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌', + xinluoshen_info_alter:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌。你通过洛神获得的牌,不计入当前回合的手牌上限', + qingguo_info:'你可以将一张黑色手牌当做【闪】使用或打出。', + rende_info:'出牌阶段,你可以将任意张手牌交给其他角色。当你以此法于一回合内给出第二张牌时,你回复1点体力。', + jijiang_info:'主公技,当你需要使用或打出【杀】时,你可以令其他蜀势力角色依次选择是否打出一张【杀】。若有角色响应,则你视为使用或打出了此【杀】。', + wusheng_info:'你可以将一张红色牌当做【杀】使用或打出。', + paoxiao_info:'锁定技,出牌阶段,你使用【杀】没有数量限制。', + guanxing_info:'准备阶段,你可以观看牌堆顶的X张牌,并将其以任意顺序置于牌堆项或牌堆底。(X为存活角色数且至多为5)', + xinguanxing:'观星', + xinguanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5', + xinguanxing_info_alter:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,如果你把观星的牌都放在牌堆底,你可以在结束阶段再进行1次观星', + kongcheng_info:'锁定技,当你没有手牌时,你不能成为【杀】或【决斗】的目标。', + longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【杀】使用或打出。', + mashu_info:'锁定技,你计算与其他角色的距离时-1。', + mashu2_info:'锁定技,你计算与其他角色的距离时-1。', + feiying_info:'锁定技,其他角色计算与你的距离时+1。', + tieji_info:'当你使用【杀】指定目标后,你可以进行判定。若结果为红色,则此【杀】不可被闪避。', + jizhi_info:'当你使用非转化的普通锦囊牌时,你可以摸一张牌。', + xinjizhi:'集智', + xinjizhi_info:'当你使用非转化的普通锦囊牌时,你可以摸一张牌。', + xinjizhi_info_alter:'每当你使用一张非转化的锦囊牌,可以摸一张牌,如果摸到的是基本牌,你可以弃置这张牌,然后本回合手牌上限+1', + xinqicai:'奇才', + xinqicai_info:'锁定技,你使用锦囊牌无距离限制。', + xinqicai_info_alter:'锁定技,你使用的锦囊牌无距离限制,你装备区内的牌不能被弃置', + qicai_info:'锁定技,你使用锦囊牌无距离限制。', + zhiheng_info:'出牌阶段一次,你可以弃置任意张牌,然后摸等量的牌。', + xinzhiheng:'制衡', + xinzhiheng_info:'出牌阶段限1次,你可以弃置任意张牌并摸等量的牌', + xinzhiheng_info_alter:'出牌阶段限1次,你可以弃置任意张牌并摸等量的牌,如果在发动制衡时弃置了所有手牌,你额外摸一张牌', + jiuyuan_info:'主公技,锁定技,其他吴势力角色对你使用的【桃】的回复值+1。', + xinjiuyuan:'救援', + xinjiuyuan_info:'主公技,锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力', + xinjiuyuan_info_alter:'主公技,其他吴国角色对自己使用【桃】时,如果他的体力值大于你,他可以选择让你回复1点体力,然后他摸1张牌', + qixi_info:'你可以将一张黑色牌当做【过河拆桥】使用。', + keji_info:'弃牌阶段开始时,若你于本回合的出牌阶段内没有过使用或打出过【杀】,则你可以跳过此阶段。', + kurou_info:'出牌阶段,你可以失去一点体力,然后摸两张牌。', + yingzi_info:'摸牌阶段,你可以多摸一张牌。', + fanjian_info:'出牌阶段限一次,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。然后该角色获得展示的牌。', + guose_info:'你可以将一张方片手牌当做【乐不思蜀】使用。', + liuli_info:'当你成为【杀】的目标时,你可以弃置一张牌并将此【杀】转移给攻击范围内的一名其他角色(不能是此【杀】的使用者)。', + qianxun_info:'锁定技,你不能成为【顺手牵羊】和【乐不思蜀】的目标。', + lianying_info:'当你失去最后的手牌时,你可以摸一张牌。', + xiaoji_info:'当你失去一张装备区内的牌后,你可以摸两张牌。', + jieyin_info:'出牌阶段限一次,你可以弃置两张手牌并选择一名已经受伤的男性角色。你与其各回复一点体力。', + xinjieyin_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力,每阶段限一次', + xinjieyin_old_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力。每阶段限一次。', + xinjieyin_new_info:'出牌阶段限1次,你可以选择一名男性角色,弃置一张手牌或将一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力', + xinjieyin_info_alter:'出牌阶段限1次,你可以选择一名男性角色,弃置一张手牌或将一张装备牌置于其装备区,你与其体力较高的角色摸一张牌,体力值较低的角色回复1点体力', + qingnang_info:'出牌阶段限一次,你可以弃置一张手牌并令一名角色回复一点体力。', + jijiu_info:'你的回合外,你可以将一张红色牌当做【桃】使用。', + wushuang_info:'锁定技,当你使用【杀】或【决斗】指定目标后,你令此牌需要依次使用或打出两张【闪】或【杀】响应。', + lijian_info:'出牌阶段限一次,你可以弃置一张牌,视为一名男性角色对另一名男性角色使用一张【决斗】(不可被【无懈可击】响应)。', + biyue_info:'结束阶段,你可以摸一张牌。', + xinbiyue_info:'结束阶段,你可以摸一张牌', + xinbiyue_info_alter:'结束阶段,你可以摸一张牌,如果你没有手牌,改为摸2张牌', + yaowu:'耀武', + yaowu_info:'锁定技,一名角色使用红色【杀】对你造成伤害时,该角色回复1点体力或摸一张牌。', + "new_jiangchi":"将驰", + "new_jiangchi_info":"摸牌阶段结束时,你可以选择一项:1、摸一张牌,若如此做,你本回合内不能使用或打出【杀】。 2、弃置一张牌,若如此做,出牌阶段你使用【杀】无距离限制且你可以额外使用一张【杀】,直到回合结束。", + "xinfu_jijie":"机捷", + "xinfu_jijie_info":"出牌阶段限一次。你可以观看牌堆底的一张牌,然后将其交给一名角色。", + "xinfu_jiyuan":"急援", + "xinfu_jiyuan_info":"当一名角色进入濒死状态时,或你交给一名其他角色牌时,你可以令其摸一张牌。", + ganglie_three:'刚烈', + ganglie_three_info:'当你受到伤害后,你可令一名敌方角色判定。若结果不为♥,其弃置两张牌或受到来自你的1点伤害。', + zhongyi:'忠义', + zhongyi2:'忠义', + zhongyi_info:'限定技,出牌阶段,你可以将一张牌置于武将牌上。你的武将牌上有〖忠义〗牌时,己方角色使用【杀】造成的伤害+1。下轮游戏开始时,你将〖忠义〗牌置入弃牌堆。', + zhanshen:'战神', + zhanshen_info:'觉醒技,准备阶段,若场上有已死亡的其他己方角色且你已受伤,则你弃置装备区的武器牌,减1点体力上限,获得技能〖马术〗和〖神戟〗', + shenji:'神戟', + shenji_info:'锁定技,你使用【杀】指定的目标数上限+2,次数上限+1', + + standard_2008:"2008版标准包", + standard_2013:"2013版标准包", + standard_2019:"2019版标准包", + }, + }; +}); diff --git a/character/yijiang.js b/character/yijiang.js index 62521d63b..f7f67f308 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1,12379 +1,12503 @@ -'use strict'; -game.import('character',function(lib,game,ui,get,ai,_status){ - return { - name:'yijiang', - connect:true, - //connectBanned:['qinmi'], - characterSort:{ - yijiang:{ - yijiang_2011:['caozhi','re_yujin','zhangchunhua','xin_fazheng','xin_masu','xin_xushu','xusheng','lingtong','wuguotai','chengong','gaoshun'], - yijiang_2012:['wangyi','xunyou','zhonghui','madai','liaohua','guanzhang','bulianshi','handang','chengpu','liubiao','old_huaxiong','caozhang'], - yijiang_2013:['manchong','guohuai','caochong','guanping','liufeng','jianyong','yufan','panzhangmazhong','zhuran','xin_liru','fuhuanghou'], - yijiang_2014:['hanhaoshihuan','chenqun','caozhen','zhangsong','wuyi','zhoucang','zhuhuan','guyong','sunluban','yj_jushou','caifuren'], - yijiang_2015:['caoxiu','caorui','zhongyao','xiahoushi','liuchen','zhangyi','zhuzhi','quancong','sunxiu','gongsunyuan','guotufengji'], - yijiang_2016:['guohuanghou','sunziliufang','huanghao','liyan','sundeng','cenhun','zhangrang','liuyu'], - yijiang_2017:['xinxianying','jikang','wuxian','qinmi','xuezong','xushi','caiyong','caojie',], - }, - }, - character:{ - caozhang:['male','wei',4,['jiangchi']], - guohuai:['male','wei',4,['jingce']], - zhangchunhua:['female','wei',3,['jueqing','shangshi']], - caozhi:['male','wei',3,['luoying','jiushi']], - caochong:['male','wei',3,['chengxiang','renxin']], - xunyou:['male','wei',3,['qice','zhiyu']], - xin_xushu:['male','shu',3,['xinwuyan','xinjujian']], - xin_masu:['male','shu',3,['olsanyao','rezhiman']], - xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo'],['die_audio']], - zhuran:['male','wu',4,['danshou']], - xusheng:['male','wu',4,['xinpojun']], - wuguotai:['female','wu',3,['ganlu','buyi']], - lingtong:['male','wu',4,['xuanfeng']], - liubiao:['male','qun',3,['zishou','zongshi']], - wangyi:['female','wei',3,['zhenlie','miji']], - yufan:['male','wu',3,['zhiyan','zongxuan']], - chengong:['male','qun',3,['mingce','zhichi']], - bulianshi:['female','wu',3,['old_anxu','zhuiyi']], - handang:['male','wu',4,['gongji','jiefan']], - fuhuanghou:['female','qun',3,['qiuyuan','zhuikong']], - zhonghui:['male','wei',4,['quanji','zili']], - jianyong:['male','shu',3,['qiaoshui','jyzongshi']], - madai:['male','shu',4,['mashu','qianxi']], - liufeng:['male','shu',4,['xiansi']], - manchong:['male','wei',3,['xinjunxing','yuce']], - guanzhang:['male','shu',4,['fuhun']], - chenqun:['male','wei',3,['pindi','faen']], - sunluban:['female','wu',3,['chanhui','jiaojin']], - guyong:['male','wu',3,['shenxing','bingyi']], - caifuren:['female','qun',3,['qieting','xianzhou']], - yj_jushou:['male','qun',3,['jianying','shibei']], - zhangsong:['male','shu',3,['qiangzhi','xiantu']], - zhuhuan:['male','wu',4,['fenli','pingkou']], - xiahoushi:['female','shu',3,['qiaoshi','yanyu']], - - panzhangmazhong:['male','wu',4,['reduodao','reanjian']], - zhoucang:['male','shu',4,['xinzhongyong']], - guanping:['male','shu',4,['longyin']], - liaohua:['male','shu',4,['dangxian','fuli']], - chengpu:['male','wu',4,['lihuo','chunlao']], - gaoshun:['male','qun',4,['xinxianzhen','jinjiu']], - caozhen:['male','wei',4,['xinsidi']], - wuyi:['male','shu',4,['benxi']], - hanhaoshihuan:['male','wei',4,['reshenduan','reyonglve']], - - caorui:['male','wei',3,['huituo','mingjian','xingshuai'],['zhu']], - caoxiu:['male','wei',4,['reqianju','reqingxi']], - zhongyao:['male','wei',3,['huomo','zuoding']], - liuchen:['male','shu',4,['zhanjue','qinwang'],['zhu']], - zhangyi:['male','shu',4,['wurong','shizhi']], - sunxiu:['male','wu',3,['reyanzhu','rexingxue','rezhaofu'],['zhu']], - zhuzhi:['male','wu',4,['xinanguo']], - quancong:['male','wu',4,['yaoming']], - gongsunyuan:['male','qun',4,['huaiyi']], - guotufengji:['male','qun',3,['jigong','shifei']], - - xin_liru:['male','qun',3,['xinjuece','xinmieji','xinfencheng']], - - guohuanghou:['female','wei',3,['jiaozhao','danxin']], - liuyu:['male','qun',2,['xinzhige','xinzongzuo']], - liyan:['male','shu',3,['duliang','fulin']], - sundeng:['male','wu',4,['kuangbi']], - - cenhun:['male','wu',3,['jishe','lianhuo']], - huanghao:['male','shu',3,['qinqing','huisheng']], - zhangrang:['male','qun',3,['taoluan']], - sunziliufang:['male','wei',3,['guizao','jiyu']], - - xinxianying:['female','wei',3,['xinzhongjian','xincaishi']], - wuxian:['female','shu',3,['fumian','daiyan']], - xushi:['female','wu',3,['wengua','fuzhu']], - caojie:['female','qun',3,['shouxi','huimin']], - - caiyong:['male','qun',3,['bizhuan','tongbo']], - jikang:['male','wei',3,['qingxian','juexiang']], - qinmi:['male','shu',3,['jianzheng','zhuandui','tianbian']], - xuezong:['male','wu',3,['funan','jiexun']], - - old_huaxiong:['male','qun',6,['shiyong']], - - re_yujin:["male","wei",4,["xinzhenjun"],[]], - }, - characterIntro:{ - caozhi:'字子建,沛国谯人,三国曹魏著名文学家,建安文学代表人物。魏武帝曹操之子,魏文帝曹丕之弟,生前曾为陈王,去世后谥号“思”,因此又称陈思王。南朝宋文学家谢灵运更有“天下才有一石,曹子建独占八斗”的评价。王士祯尝论汉魏以来二千年间诗家堪称“仙才”者,曹植、李白、苏轼三人耳。', - gaoshun:'中国东汉末年将领,吕布帐下中郎将。史载高顺为人清白有威严,不好饮酒,所统率的部队精锐非常,号称“陷阵营”。屡进忠言于吕布,吕布虽知其忠而不能用。曹操击破吕布后,高顺被曹操所杀。', - chengong:'字公台,东汉末年吕布帐下谋士,东郡东武阳人。性情刚直,足智多谋,年少时与海内知名之士相互结交。192年,陈宫等人主张曹操接任兖州牧。但此后陈宫因曹操杀害边让而与曹操反目,并游说张邈等人背叛曹操迎吕布入兖州,辅助吕布攻打曹操。吕布战败后,随吕布等一同被曹操所擒,决意赴死。', - lingtong:'字公绩,吴郡馀杭人,三国时期吴国名将。凌操之子,官至偏将军。', - masu:'字幼常,襄阳宜城人,三国时期蜀汉大臣,侍中马良之弟。初以荆州从事跟随刘备取蜀入川,曾任绵竹、成都令、越嶲太守。诸葛亮北伐时因作战失误而失守街亭,因而被诸葛亮所斩。', - wuguotai:'吴国太,小说《三国演义》中的人物,不见于正史记载。在小说中,吴国太被描述为孙坚的次妻,孙坚正妻武烈皇后(小说中写作吴太夫人)的妹妹,孙朗、孙仁(孙尚香)的母亲。', - xusheng:'字文向,琅邪莒县人。三国时期吴将。徐盛最初因讨伐山贼有功而被加为中郎将,后于濡须口之战中表现出色,得到孙权的赞赏。魏文帝曹丕伐吴时,徐盛以疑城之计退去魏军。', - yujin:'字文则,泰山钜平人。三国时期曹魏武将。本为鲍信部将,后属曹操,曹操称赞他可与古代名将相比。然而在建安二十四年的襄樊之战中,于禁在败给关羽后投降,致使一代名将晚节不保。', - zhangchunhua:'西晋宣穆皇后张春华(189-247),河内平皋(今河南温县)人。她是晋宣帝司马懿之妻,晋景帝司马师、晋文帝司马昭的母亲。后被追尊为皇后。', - fazheng:'字孝直,本为刘璋部下,刘备围成都时劝说刘璋投降,而后又与刘备进取汉中,献计将曹操大将夏侯渊斩首。法正善奇谋,深受刘备信任和敬重。', - xushu:'字元直,与司马徽、诸葛亮等人为友。先化名单福仕官于新野的刘备,后因曹操囚禁其母而不得不弃备投操,临行前向刘备推荐诸葛亮之才。入曹营后,一言不发,不曾为曹操进献过一计半策。后人形容徐庶“身在曹营心在汉”。', - caozhang:'字子文,是曹操与武宣卞皇后所生第二子,曹丕之弟,曹植之兄,曹魏任城王。曹彰武艺过人,曹操问诸子志向时自言“好为将”,因此得到曹操的赞赏。其胡须黄色,被曹操称为“黄须儿”。', - xunyou:'字公达,颍川颍阴人。东汉末年曹操的五谋臣之一,荀彧从子,被曹操称为“谋主”。官至尚书令。正始五年被追谥为敬侯。', - liaohua:'本名淳,字元俭,襄阳中卢(今湖北襄樊)人。三国时期蜀国后期将领,以勇敢果断著称。廖化是三国时代中经历了魏、蜀、吴整个兴衰过程极少数人中的一个,与严颜、黄忠共称为蜀汉三老将。', - bulianshi:'步夫人(?-238),讳练师,临淮淮阴人。东吴丞相步骘同族,吴大帝孙权之妃,在孙权众夫人中最受孙权的宠爱(宠冠后庭),生有二女:孙鲁班、孙鲁育。赤乌元年卒,追封为皇后,葬于蒋陵。', - chengpu:'字德谋,右北平土垠人。历仕孙坚、孙策、孙权三任君主。孙策死后,他与张昭等人共同辅佐孙权,并讨伐江东境内的山贼,功勋卓著。被人们尊称为“程公”。', - handang:'字义公,辽西令支(今河北迁安)人,吴国将领。韩当因为长于弓箭、骑术并且膂力过人而被孙坚赏识,追随他四处征伐周旋,数次冒险犯难,攻陷敌人、擒拿俘虏。对江东基业的逐渐稳固和吴国的建立有着重要影响。', - liubiao:'刘表,字景升,山阳郡高平(今山东微山)人。东汉末年名士,汉室宗亲,荆州牧,汉末群雄之一。', - zhonghui:'字士季。魏名将,太傅钟繇之子。公元263年,他与邓艾带兵攻打蜀国,最终导致蜀国灭亡。之后钟会设计害死邓艾,联合姜维准备自立,最终因部下反叛失败,与姜维一同死于兵变。', - wangyi:'益州刺史赵昂之妻,赵英、赵月之母。马超作乱凉州时,王异协助丈夫守城,多有功勋,自马超攻冀城至祁山坚守,赵昂曾出奇计九条,王异皆有参与。', - guanzhang:'关兴,名将关羽之子,继承了父亲汉寿亭侯的爵位。年少时即受诸葛亮器重,在蜀汉担任侍中、中监军之职,后在夷陵之战中报了杀父之仇。张苞,张飞的长子,使用父亲的家传蛇矛为兵器,勇猛剽悍不弱其父。', - madai:'名将马超的从弟。早年他曾经从曹操手中死里逃生,后跟随马超大战曹操。后在诸葛亮病逝后受杨仪派遣斩杀了蜀将魏延。曾率领军队出师北伐,被魏将牛金击败而退还。', - caochong:'字仓舒,曹操之子。从小聪明仁爱,与众不同,深受曹操喜爱。留有“曹冲称象”的典故。曹操几次对群臣夸耀他,有让他继嗣之意。可惜曹冲在建安十三病逝,年仅13岁。', - guohuai:'魏国名将,夏侯渊战死时郭淮收集残兵,与杜袭共推张郃为主将而得以稳定局势。曹丕称帝后,赐郭淮爵关内侯,又任镇西长史。诸葛亮伐魏时,郭淮料敌准确,多立战功,而后亦曾击退姜维。', - manchong:'初在曹操手下任许县县令,掌管司法,以执法严格著称;转任汝南太守,开始参与军事,曾参与赤壁之战。后关羽围攻樊城,满宠协助曹仁守城,劝阻了弃城而逃的计划,成功坚持到援军到来。曹丕在位期间,满宠驻扎在新野,负责荆州侧的对吴作战。曹叡在位期间,满宠转任到扬州,接替曹休负责东侧对吴作战,屡有功劳。', - guanping:'关平是关羽在战乱中所收之义子。关羽脱离曹军后,与刘备于关定家中重逢,关定欲使年仅十八岁的关平随关羽同行,刘备便主张让关羽与关平结为义父子。自此后关平随侍在关羽身边,一生东征西讨。他武勇过人,不逊乃父,曾跟随刘备出征西川,立下战功,后来又与曹魏猛将庞德大战三十回合,不分胜负。', - jianyong:'简雍为刘备同乡,年少时与刘备相识。黄巾之乱时,刘备加入对抗黄巾军的战争,简雍便跟随他奔走。常作为谈客,往来使命,刘备围成都时简雍作为刘备使臣成功劝说刘璋投降。简雍擅于辩论、议事。性情简单直接、不拘小节。', - liufeng:'刘备义子。性格刚猛,气力过人。随赵云、张飞等扫荡西川,颇有战功,而后又统领孟达攻取上庸,深为刘备信任。但是后来关羽北伐曹魏,多次要求刘封起兵相助,刘封不从。而后又侵凌孟达,迫其降魏。孟达与魏徐晃共袭刘封,并劝刘封投降,刘封不降,又遭部下叛变,败归成都。刘备在诸葛亮的建议下赐死刘封,刘封自裁,刘备深表痛惜。', - panzhangmazhong:'马忠为潘璋部将。于麦城之战中设伏擒获关羽及关平。刘备伐吴时,马忠随潘璋等往拒,突袭射伤蜀将黄忠,导致黄忠阵亡。不久,潘璋为关兴所杀,马忠领兵围击,击退张苞援军。后降将糜、傅发动兵变,刺杀了马忠,将首级献于刘备。', - yufan:'虞翻初在会稽被太守王朗任命为功曹,曾劝谏王朗躲开孙策未果。后孙策占江东仍任命他为功曹。吕蒙袭取荆州时,虞翻提醒其躲过了埋伏,成功占领城池。后因为直言进谏被孙权发配到交州。', - zhuran:'吴国著名将领,吕蒙白衣渡江取荆州,朱然协助潘璋捉住了关羽。黄武元年,刘备兵伐东吴,朱然与孙桓抵抗刘备大军。后又参加夷陵之战,追击刘备,被前来接应的赵云一枪刺死。', - fuhuanghou:'执金吾伏完之女,汉献帝的皇后,后因怨恨曹操诛董承,与父伏完密谋曹操,事情泄漏,曹将伏皇后禁闭冷宫逼其自缢,所生二位皇子亦被鸩杀。', - liru:'董卓的首席谋士,为董卓所亲信,大小事宜皆与其商议。董卓趁乱进京、说降吕布、废立皇帝、迁都长安等举动,均离不开李儒的参谋之功,并奉命毒杀皇帝刘辩。李傕被曹操击败后,李儒从此不知所踪,消失在历史长河中。', - caozhen:'曹操族子,官至大将军、大司马。其父为曹操招募人马时被州郡所杀,曹操因怜悯曹真少年丧父而待其如亲子一般,因赞赏曹真的勇猛而让他率领虎豹骑。曹真在镇守曹魏西北边境时表现突出,魏文帝时期督众将大破羌胡联军,平定河西;魏明帝时期屡次对抗诸葛亮的北伐。', - hanhaoshihuan:'韩浩和史涣都以忠勇著称,两人皆是曹操心腹将领,共同掌管禁兵。', - chenqun:'陈群一直位居要职,先后受曹操、曹丕托孤,成为魏国重臣,官至司空。其子陈泰,亦是魏国后期名将。最大的贡献为创立了九品中正制,为后期的人才选拔和管理打好了基础。', - wuyi:'初为益州牧刘璋的部将,刘备进攻益州时,泠苞在雒城大败,吴懿自告奋勇,领兵前往救援。不料被赵云和张飞生擒,吴懿于是归降。刘备自称汉中王,迎娶吴懿之妹。诸葛亮出师北伐,吴懿以左将军、高阳侯的身份跟随出征,屡立战功。诸葛亮逝世后,吴懿随姜维一并镇守汉中。', - zhoucang:'原为张宝部将。关羽千里走单骑时,周仓投降关羽,成为了关羽的贴身护卫。建安十六年(公元211年),刘备攻打成都时,周仓跟随关羽镇守荆州。关羽水淹七军时,周仓曾生擒魏军的立义将军庞德,关羽被孙权斩首之后,周仓在麦城大哭失声,拔剑自刎而死。', - zhangsong:'刘璋的部下,长相丑陋但有过目不忘的本领。张松奉命出使许都被曹操赶出,归蜀时为刘备所厚待,于是将西川地理图献予刘备,劝刘备取益州,愿为内应,并派好友孟达、法正帮助刘备。', - sunluban:'孙权之女。孙鲁班与孙权二子孙和不睦。孙权长子孙登死后,孙和被立为太子。孙鲁班向孙权进谗言废孙和太子之位,孙和被废后忧愤而死。', - zhuhuan:'字休穆,吴郡吴县(今江苏苏州)人,吴国名将,官至前将军、青州牧,假节,封为嘉兴侯。有一子朱异。', - guyong:'为蔡邕之徒。其为人少言语,不饮酒,严厉正大,被张纮推荐仕于孙权。孙权任命他为会稽郡丞,行太守事,后不断升迁,官至吴国丞相。顾雍为官,多进良言,有功于吴。', - jushou:'袁绍帐下谋士。史载他“少有大志,擅于谋略”。曾为冀州别驾,举茂才,并当过两次县令。后来又当韩馥别驾,被韩馥表为骑都尉。袁绍占据冀州后任用沮授为从事。经常对袁绍提出良策,但很多时候袁绍并不听从。官渡之战时袁绍大败,沮授未及逃走,被曹操所获,因拒降被曹操处死。', - caifuren:'原是刘表的小妾,正室死后,成为了刘表的后妻。因刘琮娶了自己的侄女所以对其偏爱有加。刘备客居荆州时险些受其所害。刘表死后为了让刘琮即位不惜献州于曹操。', - caorui:'魏文帝曹丕长子,曹魏第二位皇帝。在位期间指挥曹真、司马懿等人成功防御了吴、蜀的多次攻伐,并且平定鲜卑,攻灭公孙渊,颇有建树。', - caoxiu:'曹操族子,曹操大宴铜雀台之时,射箭夺袍。曹休随曹操四处征伐,在攻蜀汉中之战,伐吴濡须口之战均有登场,曾放冷箭射倒凌统的马匹,后又协助夏侯惇平息洛阳纵火叛乱,总管御林兵马,协助曹丕代汉。', - zhongyao:'初为长安郡守,马超反叛时,引军攻打长安,钟繇率军防卫。后城破,钟繇从东门弃城而走,退守潼关。后奉献帝令繇草拟诏令,册立曹操为魏王,曹操以钟繇为相国。明帝即位时,钟繇为太傅。诸葛亮北伐,钟繇举荐司马懿前往抵御。', - liuchen:'刘禅第五子,自幼聪明,英敏过人。魏军兵临城下时,刘禅准备投降,刘谌劝阻刘禅投降不成后悲愤不已,遂自杀于昭烈庙。', - xiahoushi:'夏侯渊从女,夏侯霸从妹,出城拾柴时被张飞所得,取其为妻。后生有二女,其中一人为星彩。', - zhangyi:'曾随诸葛亮南征孟获,七擒孟获的战斗中立下赫赫战功,与祝融夫人单挑。诸葛亮病死五丈原,告诉姜维张嶷忠贞勇猛,经验丰富,是可以依靠的武将,后于征伐魏国时为掩护姜维撤退阵亡。', - sunxiu:'孙权第六子,孙綝发动政变罢黜孙亮后,迎立孙休为帝。后孙綝专权,孙休遣使丁奉等人将其诛杀。孙休在位期间,颁布良制,嘉惠百姓,促进了东吴的繁荣。', - zhuzhi:'孙坚旧将,朱然嗣父,孙坚阵亡后,孙策附袁术,朱治、吕范为之定计,用玉玺向袁术借兵夺取江东。孙策平定东路后,任命朱治为吴郡太守,收军返回江东。后来赤壁之战,大都督周瑜令朱治、吕范为四方巡警使,催督六郡官军。', - quancong:'吴国名将,孙策进兵江东时归顺之,深得孙权赏识,孙权甚至将孙鲁班许配之。', - gongsunyuan:'辽东太守公孙度之孙,辽东割据首领。趁魏、吴骚乱之际自称燕王,发动叛乱,与魏对抗。败给司马懿率领的讨伐大军,被围困后乞降不被接受,与子修在欲出城逃跑时被斩杀。', - guotufengji:'两人均是袁绍帐下谋士。曾联手献计,利用公孙瓒攻击韩馥,又劝说韩馥请袁绍抵挡公孙瓒,终替袁绍拿下冀州。官渡之战期间,两人进谗逼反张郃高览,逼死田丰。使得袁绍的实力大损。', - guohuanghou:'明元郭皇后(并非郭女王),在三国志有正传。曹叡夫人,曹丕的儿媳妇,曹芳,曹髦,曹奂三朝太后,是唯一经历了曹魏全部皇帝时代的贵族女性。曹魏后三帝时期,由于皇帝年少,太后与重臣一同处理政务。史书上对郭皇后有两种截然不同的记载,一种是曹芳被废和曹髦死后郭太后发诏书斥责他们不配人君,另一种却提及曹芳被夺权期间,太后与曹芳相拥而泣,曹髦讨伐司马昭前,曾向太后禀报。', - liyan:'字正方,蜀汉重臣。初为刘表部下,曹操入主荆州时,李严西奔入蜀。刘备入川,李严率众投降,深得刘备器重,受命与诸葛亮、法正等人一同编制《蜀科》,又率军平定了蜀中盗贼。白帝城托孤,与诸葛亮共受遗诏同扶幼主。其人性格矜高难近,终因督粮不利且谎报实情而被流放,后在当地去世。', - sundeng:'字子高,孙权长子。孙权称帝后其被立为太子,受诸葛恪等人辅佐。其人性情温和而能礼贤下士,加之爱民如子,因此深受爱戴。曾劝服孙权在孙虑之死时节哀,并劝谏孙权勿用吕壹苛政。后不幸早逝,临终前上书建言,推荐了多位良臣。其亡故令孙权极为悲伤,也为南鲁党争的祸乱埋下了伏笔。', - liuyu:'伯安,幽州牧,汉室宗亲。在幽州两度任职,颇有威望。张纯、张举叛乱,刘虞恩威并施将其平定,又鼓励农商,大大改善了当地经济民生,青徐二州流民纷纷前来避难。后坚拒袁绍等人立其为帝的请求,派兵迎接献帝,却为袁术所扣,并因此事激化了与公孙瓒的矛盾,最终被击败,为其所害。', - cenhun:'岑昏为宦官,官列中常侍,孙皓即位后得到宠幸。280年,晋龙骧将军王濬率军伐吴,岑昏建议以铁锁链封锁长江,阻挡晋军进攻。王濬以火船烧锁链破其计,沿途东吴将士或死或降。群臣上奏东吴衰败之因在于岑昏,将他与蜀汉的黄皓并列为误国之奸臣。', - sunziliufang:'孙资在曹操手下历任县令,参丞相军事;刘放曾有劝王松归顺曹操之举,为曹操所欣赏,遂招为司空府官,又外放历任几处县令。魏国初建之际,孙资与刘放俱任秘书郎。曹丕继位后,二人一同掌握机密。曹睿病危时,二人力荐曹爽,又推荐招回司马懿辅政。最后,曹睿独召曹爽、司马懿、刘放、孙资同受诏命,而免去曹宇、夏侯献、曹肇、秦朗的官职。', - huanghao:'宦官。为后主刘禅所宠,专秉朝政。黄皓与大将军姜维不睦,维启后主杀之,后主不从。皓阴以心腹阎宇替维。景耀六年,蜀亡,邓艾预欲杀之,皓贿赂左右得免。及后主迁洛阳,皓为司马昭凌迟处死。', - zhangrang:'汉中常侍。同赵忠、曹节、段珪等为“十常侍”,为灵帝所宠。让等专权乱政、卖官索财,朝野皆痛恨之。郎中张钧上书奏请诛杀十常侍,帝不允,让等阴杀钧。及灵帝崩,大将军何进欲杀让等,让阴结何太后,招进入宫,斩杀之。部将袁绍引兵攻让,让等劫帝走河上。追急,让投水自尽。', - jikang:'嵇(jī)康(224年-263年,一作223年-262年),字叔夜。谯国铚县(今安徽省濉溪县)人。三国时期曹魏思想家、音乐家、文学家。
    嵇康幼年聪颖,博览群书,广习诸艺,又喜爱老庄学说。身长七尺八寸,容止出众。后娶魏武帝曹操曾孙女长乐亭主为妻,拜郎中,调中散大夫,世称“嵇中散”。后隐居不仕,屡拒为官。因得罪司隶校尉钟会,遭其构陷,而被掌权的大将军司马昭处死,时年四十岁。', - xinxianying:'辛氏(191年—269年),字宪英,祖籍陇西,颍川阳翟(今河南禹州)人。魏晋时期著名才女,曹魏侍中辛毗之女,卫尉羊耽之妻。辛宪英聪朗有才鉴,曾劝弟辛敞尽忠职守,预言钟会将会叛乱。泰始五年(公元269年),辛宪英逝世,享年七十九岁。', - wuxian:'穆皇后吴氏(?—245年),陈留(今河南开封)人,车骑将军吴懿之妹,三国时期蜀汉昭烈帝刘备的皇后。
    吴氏早年丧父,其父生前与刘焉交情深厚,所以全家跟随刘焉来到蜀地。后刘焉听相面者说吴氏有大贵之相,于是为儿子刘瑁迎娶吴氏。刘瑁死后,吴氏成为寡妇。
    建安十九年(214年),刘备平定益州,纳吴氏为夫人。建安二十四年(219年),刘备自称汉中王,立吴氏为汉中王后。章武元年(221年),刘备称帝,建立蜀汉,立吴氏为皇后。章武三年(223年),刘备去世,太子刘禅即位,尊嫡母吴氏为皇太后。延熙八年(245年),吴氏去世,谥号穆皇后,葬入刘备的惠陵。', - qinmi:'秦宓(?-226年),字子敕。广汉郡绵竹县(今四川德阳北)人。三国蜀汉时大臣、学者。秦宓善舌辩。早年仕于益州牧刘璋麾下,后降刘备。刘备伐吴时,秦宓劝阻,刘备大怒,欲杀秦宓。因诸葛亮及时求情,才保住性命,仅被下狱,后被释放,拜左中郎将、长水校尉。吴蜀同盟后,孙权派张温至成都回访。酒宴之上,秦宓与张温舌战,说得张温无言以对。后官至大司农。建兴四年(226年),秦宓病逝。', - xushi:'徐氏,孙权之弟孙翊的妻子,著名烈女。孙翊的部下妫览、戴员买通家将边鸿将孙翊杀死,并将全部罪责推给边鸿,又谋杀了前来查问的太守孙河。徐夫人一面用美人计色诱妫览、戴员,令其放松警惕;一面对孙翊生前亲信孙高、傅婴说明真相并晓以大义,最终成功地在内室中将杀夫凶手妫览、戴员诛杀。', - xuezong:'薛综(?―243年),字敬文,沛郡竹邑(今安徽濉溪)人,三国时期吴国名臣。少时避乱至交州,师从刘熙。士燮归附孙权,召其为五官中郎将,出任合浦、交阯太守。后从征至九真,回朝任谒者仆射。232年,升任尚书仆射。240年,改任选曹尚书。242年,担任太子少傅,兼任选部职任。243年,薛综去世。薛综是当时名儒,著有诗赋难论数万言,集为《私载》,并著有《五宗图述》、《二京解》。', - caiyong:'蔡邕(133年-192年),字伯喈。陈留郡圉县(今河南杞县南)人。东汉时期名臣,文学家、书法家,才女蔡文姬之父。蔡邕早年拒朝廷征召之命,后被征辟为司徒掾属,任河平长、郎中、议郎等职,曾参与续写《东观汉记》及刻印熹平石经。后因罪被流放朔方,几经周折,避难江南十二年。董卓掌权时,强召蔡邕为祭酒。三日之内,历任侍御史、治书侍御史、尚书、侍中、左中郎将等职,封高阳乡侯,世称“蔡中郎”。董卓被诛杀后,蔡邕因在王允座上感叹而被下狱,不久便死于狱中,年六十。', - caojie:'曹节(196年―260年),沛国谯县(今安徽亳州)人,汉献帝刘协第二任皇后,魏武帝曹操的女儿。建安十八年(213年),曹操将女儿曹宪、曹节、曹华三姐妹同时入宫中,封为夫人。建安十九年(214年),并封为贵人。曹操废掉汉献帝第一位皇后伏寿,将她囚禁而死。曹操要汉献帝立曹节为皇后,汉献帝只得依从。建安二十五年(220年),曹操去世,曹丕袭封魏王位。曹丕授意华歆去逼汉献帝让位。曹节怒斥华歆,华歆只好退出宫去。第二天又逼汉献帝将帝位禅让给曹丕。并以武力威胁,向曹节索要玺印,曹节无奈,将玺印掷于栏板之下。面对曹丕篡位,她极为愤怒,高喊:“老天有眼,决不让你长久!”汉献帝被废为山阳公,曹节为山阳公夫人。景元元年(260年),曹节病逝,仍以汉朝礼仪合葬于献帝的禅陵,谥号献穆皇后。', - }, - perfectPair:{ - wuguotai:['sunjian','sunshangxiang'], - zhangchunhua:['simayi'], - caozhi:['zhenji'], - xunyou:['xunyu'], - xushu:['liubei'], - lingtong:['ganning'], - chengong:['lvbu'], - bulianshi:['sunquan'], - fuhuanghou:['liuxie'], - sunluban:['quancong'], - caifuren:['liubiao'], - xiahoushi:['zhangfei'], - zhoucang:['guanyu'], - guanping:['guanyu'], - sundeng:['sunquan','zhoufei'], - liru:['dongzhuo'], - liuchen:['liushan'], - yujin:['xiahoudun'], - fazheng:['liubei'], - }, - skill:{ - shiyong:{ - audio:2, - trigger:{player:'damageEnd'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.getParent(2).jiu==true); - }, - content:function(){ - player.loseMaxHp(); - } - }, - xindanshou:{ - audio:'danshou', - trigger:{ - global:'phaseJieshuBegin', - target:'useCardToTargeted', - }, - direct:true, - filter:function(event,player,name){ - return ((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))|| - (event.targets&&event.targets.contains(player)&&['basic','trick'].contains(get.type(event.card,'trick')))) - &&!player.hasSkill('xindanshou_as'); - }, - content:function(){ - 'step 0' - if(event.triggername=='phaseJieshuBegin'){ - var num=trigger.player.countCards('h'); - if(num>0) player.chooseToDiscard(get.prompt('xindanshou',trigger.player),num,'弃置'+get.cnNumber(num)+'张牌并对'+get.translation(trigger.player)+'造成1点伤害','he').set('logSkill',['xindanshou',trigger.player]).set('ai',function(card){ - if(get.damageEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0) return 6-get.value(card); - return -1; - }); - else player.chooseBool(get.prompt('xindanshou',trigger.player),'对'+get.translation(trigger.player)+'造成1点伤害').ai=function(){ - return get.damageEffect(trigger.player,player,player)>0 - }; - } - else{ - var num=0; - game.countPlayer2(function(current){ - var history=current.getHistory('useCard'); - for(var j=0;j1; - }); - }, - filterx:function(event,player){ - var info=get.info(event.card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); - })){ - return true; - } - } - return false; - }, - content:function(){ - "step 0" - event.videoId=lib.status.videoId++; - var func=function(card,id,bool){ - var list=[ - '为XXX多指定一个目标', - '令XXX无视防具', - '令XXX不可被抵消', - '当XXX造成伤害时摸一张牌', - ]; - var choiceList=ui.create.dialog('【奔袭】:请选择一至两项','forcebutton'); - choiceList.videoId=id; - for(var i=0;i0; - })) return 1.2+Math.random(); - return 0; - } - case 1:{ - return Math.random(); - } - case 2:{ - if(event.card.name=='sha'||event.card.name=='juedou'||get.type(event.type)=='trick'&&game.hasPlayer(function(current){ - return get.attitude(current,player)<0&¤t.hasWuxie(); - })) return 1+Math.random(); - return Math.random(); - } - case 3:{ - return get.tag(event.card,'damage')+Math.random(); - } - } - }); - "step 1" - if(player.isOnline2()){ - player.send('closeDialog',event.videoId); - } - event.dialog.close(); - var map=[ - function(trigger,player,event){ - player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',true,function(card,player,target){ - var player=_status.event.player; - if(_status.event.targets.contains(target)) return false; - return lib.filter.targetEnabled2(_status.event.card,player,target); - }).set('targets',trigger.targets).set('card',trigger.card).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }); - }, - function(trigger,player,event){ - player.storage.xinbenxi_unequip.add(trigger.card); - }, - function(trigger,player,event){ - player.storage.xinbenxi_directHit.add(trigger.card); - trigger.nowuxie=true; - trigger.customArgs.default.directHit2=true; - }, - function(trigger,player,event){ - player.storage.xinbenxi_damage.add(trigger.card); - } - ]; - for(var i=0;ite) return false; - if((s.contains('等于')||target.countCards('he')==0)&&pe==te) return false; - if(s.contains('小于')&&peth){ - player.storage.xinyaoming.push('大于'); - target.draw(); - event.finish(); - } - else if(ph==th){ - player.storage.xinyaoming.push('等于'); - target.chooseToDiscard('he','弃置一到两张牌,然后摸等量的牌',true,[1,2]).ai=lib.skill.zhiheng.check; - } - else{ - player.storage.xinyaoming.push('小于'); - player.discardPlayerCard(target,'h',true); - event.finish(); - } - } - else event.finish(); - 'step 2' - if(result.bool) target.draw(result.cards.length); - }, - group:'xinyaoming_kanon', - subSkill:{ - kanon:{ - trigger:{global:'phaseAfter'}, - silent:true, - sub:true, - content:function(){lib.skill.xinyaoming.init(player)} - }, - }, - }, - xinzhenjun:{ - audio:'jieyue', - trigger:{ - player:'phaseUseBegin' - }, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterCard:true, - filterTarget:lib.filter.notMe, - position:'he', - prompt:get.prompt2('xinzhenjun'), - ai1:function(card){ - var player=_status.event.player; - if(card.name=='sha'&&get.color(card)=='red'){ - for(var i=0;i0&¤t.hasValueTarget(card)) return 7; - } - return 0; - } - return 7-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player; - var card=ui.selected.cards[0]; - var att=get.attitude(player,target); - if(get.value(card)<0) return -att*2; - if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&target.hasValueTarget(card))) return att*2; - var eff=0; - game.countPlayer(function(current){ - if(target!=current&&get.distance(target,current,'attack')>1) return; - var eff2=get.damageEffect(current,player,player); - if(eff2>eff) eff=eff2; - }); - if(att>0&&eff>0) eff+=2*att; - return eff; - }, - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xinzhenjun',target); - target.gain(result.cards,player,'giveAuto') - } - else event.finish(); - 'step 2' - target.chooseToUse({ - filterCard:function(card){ - return get.name(card)=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments); - }, - prompt:'请使用一张不为黑色的【杀】,否则'+get.translation(player)+'可以对你或你攻击范围内的一名其他角色造成1点伤害', - }); - 'step 3' - if(result.bool){ - var num=1; - game.countPlayer2(function(current){ - current.getHistory('damage',function(evt){ - if(evt.getParent(evt.notLink()?4:8)==event) num+=evt.num; - }); - }); - player.draw(num); - event.finish(); - } - else{ - player.chooseTarget('是否对'+get.translation(target)+'或其攻击范围内的一名角色造成1点伤害?',function(card,player,target){ - return target==_status.event.targetx||_status.event.targetx.inRange(target); - }).set('targetx',event.target).ai=function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player) - }; - } - 'step 4' - if(result.bool){ - player.line(result.targets); - result.targets[0].damage('nocard'); - } - }, - //group:['xinzhenjun_damage'], - subSkill:{ - damage:{ - trigger:{global:'damage'}, - forced:true, - silent:true, - popup:false, - filter:function(event,player){ - var evt=event.getParent(event.notLink()?4:8); - return evt&&evt.name=='xinzhenjun'&&evt.player==player; - }, - content:function(){ - player.draw(trigger.num); - }, - }, - }, - }, - xinfuli:{ - audio:'fuli', - skillAnimation:true, - animationColor:'soil', - audio:2, - unique:true, - limited:true, - enable:'chooseToUse', - init:function(player){ - player.storage.xinfuli=false; - }, - mark:true, - filter:function(event,player){ - if(event.type!='dying') return false; - if(player!=event.dying) return false; - if(player.storage.xinfuli) return false; - return true; - }, - content:function(){ - "step 0" - player.awakenSkill('xinfuli'); - event.num=game.countGroup(); - player.recover(event.num-player.hp); - "step 1" - var num2=num-player.countCards('h'); - if(num2) player.draw(num2); - "step 2" - if(num>2) player.turnOver(); - player.storage.xinfuli=true; - }, - ai:{ - save:true, - skillTagFilter:function(player){ - return player.hp<=0&&player.storage.xinfuli!=true; - }, - result:{ - player:10 - }, - threaten:function(player,target){ - if(!target.storage.xinfuli) return 0.9; - } - }, - intro:{ - content:'limited' - } - }, - xindangxian:{ - trigger:{player:'phaseBegin'}, - forced:true, - audio:'dangxian', - audioname:['guansuo'], - content:function(){ - 'step 0' - player.phaseUse().xindangxian=true; - 'step 1' - var stat=player.getStat(); - stat.card={}; - for(var i in stat.skill){ - var bool=false; - var info=lib.skill[i]; - if(info.enable!=undefined){ - if(typeof info.enable=='string'&&info.enable=='phaseUse') bool=true; - else if(typeof info.enable=='object'&&info.enable.contains('phaseUse')) bool=true; - } - if(bool) stat.skill[i]=0; - } - }, - group:'xindangxian_rewrite', - subSkill:{ - rewrite:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - filter:function(kagari){ - return kagari.xindangxian==true; - }, - content:function(){ - 'step 0' - if(player.storage.xinfuli){ - player.chooseBool('是否失去1点体力并获得一张【杀】?').ai=function(){ - return player.hp>2&&!player.hasSha(); - }; - } - else event._result={bool:true}; - 'step 1' - if(!result.bool){ - event.finish(); - return; - } - player.loseHp(); - 'step 2' - var card=get.cardPile(function(card){ - return card.name=='sha'; - }); - if(card) player.gain(card,'gain2'); - 'step 3' - game.updateRoundNumber(); - }, - }, - }, - }, - xinjunxing:{ - inherit:'junxing', - audio:'junxing', - content:function(){ - "step 0" - var types=[]; - for(var i=0;i=0?-1:(9-get.value(card)); - }; - "step 1" - if(result.bool){ - player.gain(result.cards,targets[0],'give'); - } - else{ - if(targets[0].canUse('sha',targets[1])) targets[0].useCard({name:'sha',isCard:true},targets[1]); - } - }, - ai:{ - result:{ - target:function(player,target){ - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - return get.effect(target,{name:'sha'},from,target); - } - var effs=[0,0]; - game.countPlayer(function(current){ - if(current!=target&&target.canUse('sha',current)){ - var eff=get.effect(current,{name:'sha'},target,target); - if(eff>effs[0]) effs[0]=eff; - if(eff0?0:1]; - } - }, - order:8.5, - expose:0.2 - } - }, - xinzongzuo:{ - trigger:{global:'phaseBefore'}, - forced:true, - priority:10, - audio:'zongzuo', - filter:function(event,player){ - return !player.storage.xinzongzuo; - }, - content:function(){ - 'step 0' - player.storage.xinzongzuo=true; - var num=game.countGroup(); - player.gainMaxHp(num); - event.num=num; - 'step 1' - player.recover(event.num); - //player.update(); - }, - group:'xinzongzuo_lose', - subSkill:{ - lose:{ - trigger:{global:'dieAfter'}, - forced:true, - audio:'zongzuo', - filter:function(event,player){ - if(!lib.group.contains(event.player.group)) return false; - if(game.hasPlayer(function(current){ - return current.group==event.player.group; - })){ - return false; - } - return true; - }, - content:function(){ - 'step 0' - player.loseMaxHp(); - 'step 1' - player.draw(2); - } - } - } - }, - xintaoluan:{ - audio:'taoluan', - enable:'chooseToUse', - filter:function(event,player){ - return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('xintaoluan3')&&player.countCards('he')>0&&!_status.dying.length; - }, - init:function(player){ - if(!player.storage.xintaoluan) player.storage.xintaoluan=[]; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var i=0;i0) return 0; - if(button.link[2]=='wugu') return; - var effect=player.getUseValue(button.link[2]); - if(effect>0) return effect; - return 0; - }, - backup:function(links,player){ - return { - filterCard:true, - audio:'taoluan', - selectCard:1, - popname:true, - check:function(card){ - return 6-get.value(card); - }, - position:'he', - viewAs:{name:links[0][2],nature:links[0][3]}, - 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(result.card.name); - }, - } - }, - prompt:function(links,player){ - return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:4, - result:{ - player:function(player){ - if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0; - var players=game.filterPlayer(); - for(var i=0;i((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){ - return 1; - } - } - return 0; - } - }, - threaten:1.9, - }, - group:['xintaoluan2','xintaoluan4','xintaoluan5'] - }, - xintaoluan2:{ - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='xintaoluan_backup'||event.skill=='xintaoluan5'||event.skill=='xintaoluan4'; - }, - 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.chooseTarget(true,function(card,player,target){ - return target!=player; - },'滔乱

    令一名其他角色选择一项:1.交给你'+get.cnNumber(event.num)+'张与你以此法使用的牌类别相同的牌;2.你失去'+get.cnNumber(event.num)+'点体力').set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0){ - if(get.attitude(target,player)>0){ - return target.countCards('h'); - } - return target.countCards('h')/2; - } - return 0; - }); - 'step 1' - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - var type=get.type(trigger.card,'trick'); - target.chooseCard('滔乱

    交给'+get.translation(player)+get.cnNumber(num)+'张不为'+get.translation(type)+'牌的牌,或令其失去'+get.cnNumber(num)+'点体力且滔乱无效直到回合结束','he',num,function(card,player,target){ - return get.type(card,'trick')!=_status.event.cardType; - }).set('cardType',type).set('ai',function(card){ - if(_status.event.att){ - return 11-get.value(card); - } - return 0; - }).set('att',get.attitude(target,player)>0); - 'step 2' - var target=event.target; - if(result.bool){ - player.gain(result.cards,target,'give'); - } - else{ - player.addTempSkill('xintaoluan3'); - player.loseHp(num); - } - } - }, - xintaoluan3:{}, - xintaoluan4:{ - audio:'taoluan', - prompt:'将一张牌当做闪使用', - enable:'chooseToUse', - filter:function(event,player){ - return player.countCards('he')&&!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:'he', - 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((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('he')&&!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('he')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; - }, - viewAsFilter:function(player){ - return player.countCards('he')&&(!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:'he', - 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((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){ - return 6-get.value(card); - } - } - return 0; - }, - }, - xintaoluan6:{ - trigger:{global:'phaseAfter'}, - silent:true, - content:function(){ - player.storage.xintaoluan=[]; - player.storage.xintaoluan2=0; - }, - }, - xintaoluan_backup:{}, - xincaishi:{ - trigger:{ - player:'phaseDrawBegin2' - }, - audio:'caishi', - direct:true, - content:function(){ - 'step 0' - var choiceList=[ - '手牌上限-1且发动【忠鉴】时可以多展示对方的一张牌' - ]; - if(!trigger.numFixed){ - choiceList.push('摸牌阶段多摸两张牌,然后本回合内不能发动【忠鉴】'); - if(trigger.num>0){ - choiceList.unshift('摸牌阶段少摸一张牌,发动【忠鉴】时可以多展示自己的一张牌直到回合结束'); - event.first=true; - } - } - var next=player.chooseControl('cancel2'); - next.set('choiceList',choiceList); - next.set('prompt',get.prompt('xincaishi')); - next.set('ai',function(){return 2}); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('xincaishi'); - if(!event.first) result.index++; - trigger.num+=(result.index>1?2:(result.index-1)); - player.addTempSkill('xincaishi_'+result.index); - } - }, - subSkill:{ - '0':{ - mark:true, - intro:{ - content:'发动【忠鉴】时可以多展示自己的一张牌', - }, - }, - '1':{ - mark:true, - intro:{ - content:'发动【忠鉴】时可以多展示目标角色的一张牌', - }, - mod:{ - maxHandcard:function(player,num){ - return num-1; - }, - }, - }, - '2':{ - mark:true, - intro:{ - content:'不能发动【忠鉴】直到回合结束', - }, - }, - }, - }, - xinzhongjian:{ - audio:'zhongjian', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return (!player.hasSkill('xincaishi_2'))&&player.countCards('h')>0; - }, - filterTarget:function(event,player,target){ - return target!=player&&target.countCards('h')>0; - }, - filterCard:true, - selectCard:function(){ - return _status.event.player.hasSkill('xincaishi_0')?[1,2]:[1,1]; - }, - check:function(){return 1}, - discard:false, - lose:false, - content:function(){ - 'step 0' - event.suits=[]; - event.nums=[]; - for(var i=0;ite&&target.isDamaged()&&get.attitude(player,target)>2) return true; - else if(pe==te&&get.attitude(player,target)>2) return true; - else if(pete) return "回复体力"; - else if(pe==te) return "摸一张牌"; - else if(pete) target.recover(); - else if(pe==te) target.draw(); - else if(pete&&target.isDamaged()) return 2; - else if(pe==te) return 1; - else if(pe0){ - for(var i=0;i
  • 已对'+str+'发动过〖残韵〗'); - } - return str2; - }, - }, - mark:true, - enable:"phaseUse", - usable:1, - check:function (cardx){ - var player=_status.event.player; - var number=game.countPlayer(function(target){ - if(player==target) return false; - var pe=player.countCards('e',function(card){ - return card!=cardx&&ui.selected.cards.contains(card)==false; - }); - var te=target.countCards('e'); - if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true; - else if(pete) return "回复体力"; - else if(pe==te) return "摸一张牌"; - else if(pete) target.recover(); - else if(pe==te) target.draw(); - else if(pete&&target.isDamaged()) return 2; - else if(pe==te) return 1; - else if(pecurrent.hp; - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('zhenjun'),function(card,player,target){ - return target.countCards('h')>target.hp; - }).ai=function(target){ - return -get.attitude(_status.event.player,target)*(target.countCards('e')+1); - }; - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - var num=target.countCards('h')-target.hp; - player.line(target,'thunder'); - player.logSkill('zhenjun',target); - player.discardPlayerCard(num,target,true); - } - 'step 2' - if(result.cards&&result.cards.length){ - event.num=0; - event.num2=result.cards.length; - for(var i=0;i0){ - var prompt='弃置'+get.cnNumber(event.num)+'张牌,或令'+get.translation(event.target)+'摸'+get.cnNumber(event.num2)+'张牌'; - player.chooseToDiscard(event.num,prompt,'he').ai=function(card){ - return 5-get.value(card); - } - } - else event.finish(); - } - else event.finish(); - 'step 3' - if(!result.bool){ - event.target.draw(event.num2); - } - }, - }, - rezhenjun:{ - audio:"jieyue", - trigger:{ - player:"phaseZhunbeiBegin", - }, - filter:function (event,player){ - return game.hasPlayer(function(current){ - return current.countCards('h')>0; - }); - }, - direct:true, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt2('rezhenjun')).ai=function(target){ - return -get.attitude(_status.event.player,target)*(target.countCards('e')+1); - }; - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - var num=Math.max(target.countCards('h')-target.hp,1); - player.logSkill('rezhenjun',target); - player.discardPlayerCard(num,target,true); - } - 'step 2' - if(result.cards&&result.cards.length){ - event.num=0; - for(var i=0;i0){ - var prompt='弃置'+get.cnNumber(event.num)+'张牌,或令'+get.translation(event.target)+'摸'+get.cnNumber(event.num)+'张牌'; - player.chooseToDiscard(event.num,prompt,'he').ai=function(card){ - return 5-get.value(card); - } - } - else event.finish(); - } - else event.finish(); - 'step 3' - if(!result.bool){ - event.target.draw(event.num); - } - }, - }, - fenli:{ - audio:2, - group:['fenli_draw','fenli_use','fenli_discard'], - subfrequent:['discard'], - subSkill:{ - draw:{ - audio:'fenli', - trigger:{player:'phaseDrawBefore'}, - prompt:'是否发动【奋励】跳过摸牌阶段?', - filter:function(event,player){ - return player.isMaxHandcard(); - }, - check:function(event,player){ - if(player.getHistory('skipped').length>0) return false; - return game.hasPlayer(function(current){ - return get.attitude(player,current)<0&¤t.hp==1&&get.damageEffect(current,player,player)>0; - }); - }, - content:function(){ - trigger.cancel(); - } - }, - use:{ - audio:'fenli', - trigger:{player:'phaseUseBefore'}, - prompt:'是否发动【奋励】跳过出牌阶段?', - filter:function(event,player){ - return player.isMaxHp(); - }, - check:function(event,player){ - if(!player.needsToDiscard()||(player.countCards('e')&&player.isMaxEquip())) return true; - if(player.getHistory('skipped').length>0) return false; - return game.hasPlayer(function(current){ - return get.attitude(player,current)<0&¤t.hp==1&&get.damageEffect(current,player,player)>0; - }); - }, - content:function(){ - trigger.cancel(); - } - }, - discard:{ - audio:'fenli', - trigger:{player:'phaseDiscardBefore'}, - prompt:'是否发动【奋励】跳过弃牌阶段?', - frequent:true, - filter:function(event,player){ - return player.isMaxEquip()&&player.countCards('e'); - }, - content:function(){ - trigger.cancel(); - } - } - }, - ai:{ - combo:'pingkou' - } - }, - pingkou:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.getHistory('skipped').length>0; - }, - content:function(){ - 'step 0' - player.chooseTarget([1,player.getHistory('skipped').length],get.prompt2('pingkou'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - player.logSkill('pingkou',result.targets); - event.targets=result.targets.slice(0).sortBySeat(); - } - else{ - event.finish(); - } - 'step 2' - if(event.targets&&event.targets.length){ - event.targets.shift().damage(); - event.redo(); - } - }, - ai:{ - combo:'fenli', - effect:{ - target:function(card){ - if(card.name=='lebu'||card.name=='bingliang') return 0.5; - } - } - } - }, - xinanguo:{ - audio:'anguo', - enable:'phaseUse', - usable:1, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - if(target.isMinHandcard()){ - target.draw(); - event.h=true; - } - 'step 1' - if(target.isMinHp()&&target.isDamaged()){ - target.recover(); - event.hp=true; - } - 'step 2' - var equip=get.cardPile(function(card){ - return get.type(card)=='equip'&&target.hasUseTarget(card); - }); - if(target.isMinEquip()&&equip){ - target.chooseUseTarget(equip,'noanimate','nopopup',true); - event.e=true; - } - 'step 3' - game.updateRoundNumber(); - if(!event.h&&player.isMinHandcard()){ - player.draw(); - } - 'step 4' - if(!event.hp&&player.isMinHp()&&player.isDamaged()){ - player.recover(); - } - 'step 5' - if(!event.e&&player.isMinEquip()){ - var equip=get.cardPile(function(card){ - return get.type(card)=='equip'&&target.hasUseTarget(card); - }); - if(equip) player.chooseUseTarget(equip,'noanimate','nopopup',true); - } - 'step 6' - game.updateRoundNumber(); - }, - ai:{ - threaten:1.6, - order:9, - result:{ - player:function(player,target){ - if(get.attitude(player,target)<=0){ - if(target.isMinHandcard()||target.isMinEquip()||target.isMinHp()) return -1; - } - var num=0; - if(player.isMinHandcard()||target.isMinHandcard()) num++; - if(player.isMinEquip()||target.isMinEquip()) num++; - if((player.isMinHp()&&player.isDamaged())||(target.isMinHp()&&target.isDamaged())) num+=2.1; - return num; - } - } - } - }, - pindi:{ - audio:2, - enable:'phaseUse', - filterTarget:function(card,player,target){ - if(player==target) return false; - if(player.storage.pindi_target&& - player.storage.pindi_target.contains(target)){ - return false; - } - return true; - }, - filterCard:function(card,player){ - if(player.storage.pindi_type&& - player.storage.pindi_type.contains(get.type2(card))){ - return false; - } - return true; - }, - subSkill:{ - clear:{ - trigger:{player:'phaseAfter'}, - silent:true, - content:function(){ - delete player.storage.pindi_target; - delete player.storage.pindi_type; - } - } - }, - //group:'pindi_clear', - check:function(card){ - var num=_status.event.player.getStat('skill').pindi||0; - return 6+num-get.value(card); - }, - position:'he', - content:function(){ - 'step 0' - if(!player.storage.pindi_target){ - player.storage.pindi_target=[]; - } - if(!player.storage.pindi_type){ - player.storage.pindi_type=[]; - } - player.storage.pindi_target.push(target); - player.storage.pindi_type.push(get.type2(cards[0],cards[0].original=='h'?player:false)); - event.num=player.getStat('skill').pindi; - var evt=_status.event.getParent('phase'); - if(evt&&evt.name=='phase'&&!evt.pindi){ - var next=game.createEvent('rerende_clear'); - _status.event.next.remove(next); - evt.after.push(next); - evt.pindi=true; - next.player=player; - next.setContent(lib.skill.pindi_clear.content); - } - player.syncStorage(); - if(target.countCards('he')==0) event._result={index:0}; - else{ - player.chooseControlList([ - '令'+get.translation(target)+'摸'+get.cnNumber(event.num)+'张牌', - '令'+get.translation(target)+'弃置'+get.cnNumber(event.num)+'张牌' - ],function(){ - return _status.event.choice; - }).set('choice',get.attitude(player,target)>0?0:1); - } - 'step 1' - if(result.index==0){ - target.draw(event.num); - } - else{ - target.chooseToDiscard(event.num,'he',true); - } - 'step 2' - if(target.isDamaged()){ - player.link(true); - } - }, - ai:{ - order:8, - threaten:1.8, - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - var num=(player.getStat('skill').pindi||0)+1; - if(att<=0&&target.countCards('he')0; - } - else return event.cards.filterInD('od').length>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - if(!player.hasSkill('funan_jiexun')){ - var cards=[] - if(get.itemtype(trigger.respondTo[1])=='card') cards.push(trigger.respondTo[1]); - else if(trigger.respondTo[1].cards) cards.addArray(trigger.respondTo[1].cards); - cards=cards.filterInD('od'); - trigger.player.gain(cards,'gain2','log'); - trigger.player.addTempSkill('funan_use'); - if(!trigger.player.storage.funan_use){ - trigger.player.storage.funan_use=[]; - } - trigger.player.storage.funan_use.addArray(cards); - } - 'step 1' - var cards=trigger.cards.filterInD('od'); - player.gain(cards,'log','gain2'); - }, - subSkill:{ - jiexun:{ - charlotte:true, - mark:true, - intro:{ - content:'你发动“复难”时,无须令其他角色获得你使用的牌' - }, - }, - use:{ - onremove:true, - mod:{ - cardEnabled2:function(card,player){ - if(player.storage.funan_use&&player.storage.funan_use.contains(card)){ - return false; - } - } - } - } - } - }, - jiexun:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - onremove:true, - direct:true, - content:function(){ - 'step 0' - var num1=game.countPlayer(function(current){ - return current.countCards('ej',{suit:'diamond'}); - }); - var num2=player.countMark('jiexun'); - event.num1=num1; - event.num2=num2; - var str='令目标摸'+get.cnNumber(num1)+'张牌'; - if(num2){ - str+=',然后弃置'+get.cnNumber(num2)+'张牌;若目标因此法弃置了所有牌,则你失去“诫训”,然后你发动“复难”时,无须令其获得你使用的牌'; - } - player.chooseTarget(get.prompt('jiexun'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return _status.event.coeff*get.attitude(_status.event.player,target); - }).set('coeff',num1>=num2?1:-1).set('prompt2',str); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('jiexun',target); - if(event.num1){ - target.draw(event.num1); - } - player.addMark('jiexun',1,false); - } - else{ - event.finish(); - } - 'step 2' - if(event.num2){ - event.target.chooseToDiscard(event.num2,true,'he'); - } - else{ - event.finish(); - } - 'step 3' - if(result.bool&&result.autochoose&&result.cards.length==result.rawcards.length){ - player.removeSkill('jiexun'); - player.addSkill('funan_jiexun'); - } - } - }, - zhuandui:{ - shaRelated:true, - audio:2, - group:['zhuandui_respond','zhuandui_use'], - subSkill:{ - use:{ - audio:"zhuandui", - trigger:{player:'useCardToPlayered'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - filter:function(event,player){ - return event.card.name=='sha'&&player.canCompare(event.target); - }, - logTarget:'target', - content:function(){ - 'step 0' - player.chooseToCompare(trigger.target); - 'step 1' - if(result.bool){ - trigger.getParent().directHit.add(trigger.target); - } - } - }, - respond:{ - audio:"zhuandui", - trigger:{target:'useCardToTargeted'}, - check:function(event,player){ - return get.effect(player,event.card,event.player,player)<0; - }, - filter:function(event,player){ - return event.card.name=='sha'&&player.canCompare(event.player); - }, - logTarget:'player', - content:function(){ - 'step 0' - player.chooseToCompare(trigger.player); - 'step 1' - if(result.bool){ - trigger.getParent().excluded.add(player); - } - } - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&¤t<0) return 0.7; - } - } - } - }, - tianbian:{ - audio:2, - enable:"chooseCard", - check:function(event,player){ - var player=_status.event.player; - return (!player.hasCard(function(card){ - var val=get.value(card); - return val<0||(val<=4&&card.number>=11); - },'h'))?20:0; - }, - filter:function(event){ - return event.type=='compare'&&!event.directresult; - }, - onCompare:function(player){ - return game.cardsGotoOrdering(get.cards()).cards; - }, - group:'tianbian_number', - subSkill:{ - number:{ - trigger:{player:'compare',target:'compare'}, - filter:function(event,player){ - if(event.iwhile) return false; - if(event.player==player){ - return get.suit(event.card1)=='heart';//&&event.card1.vanishtag.contains('tianbian'); - } - else{ - return get.suit(event.card2)=='heart';//&&event.card2.vanishtag.contains('tianbian'); - } - }, - silent:true, - content:function(){ - game.log(player,'拼点牌点数视为','#yK'); - if(player==trigger.player){ - trigger.num1=13; - } - else{ - trigger.num2=13; - } - } - } - } - }, - jianzheng:{ - audio:2, - trigger:{global:'useCardToPlayer'}, - filter:function(event,player){ - if(!player.countCards('h')) return false; - return event.player!=player&&event.card.name=='sha'&&!event.targets.contains(player)&& - event.player.inRange(player); - }, - direct:true, - content:function(){ - "step 0" - var effect=0; - for(var i=0;i0){ - if(get.color(trigger.card)!='black'){ - effect=0; - } - else{ - effect=1; - } - if(trigger.targets.length==1){ - if(trigger.targets[0].hp==1){ - effect++; - } - if(effect>0&&trigger.targets[0].countCards('h')0){ - effect+=6; - } - } - player.chooseCard('h',get.prompt2('jianzheng',trigger.player)).set('ai',function(card){ - if(_status.event.effect>=0){ - var val=get.value(card); - if(val<0) return 10-val; - return _status.event.effect-val; - } - return 0; - }).set('effect',effect).set('logSkill',['jianzheng',trigger.player]); - "step 1" - if(result.bool&&result.cards){ - event.card=result.cards[0]; - trigger.targets.length=0; - trigger.getParent().triggeredTargets1.length=0; - } - else{ - event.finish(); - } - "step 2" - if(!event.isMine()) game.delayx(); - "step 3" - if(event.card){ - player.logSkill('jianzheng',trigger.player); - player.lose(event.card,ui.special,'visible'); - player.$throw(event.card,1000); - } - "step 4" - if(event.card){ - event.card.fix(); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - game.updateRoundNumber(); - game.log(player,'将',card,'置于牌堆顶'); - } - "step 5" - if(get.color(trigger.card)!='black'){ - trigger.getParent().targets.push(player); - trigger.player.line(player); - game.delay(); - } - } - }, - qingxian:{ - audio:2, - group:['qingxian_jilie','qingxian_rouhe','qingxian_dying'], - ai:{ - threaten:0.8, - maixie:true, - maixie_hp:true, - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(target.hp>1&&target.hasFriend()) return 0.8; - } - } - } - }, - subSkill:{ - dying:{ - audio:'qingxian', - trigger:{global:'dyingAfter'}, - filter:function(event,player){ - return player.storage.qingxian&&player.storage.qingxian>0&&!_status.dying.length; - }, - direct:true, - content:function(){ - 'step 0' - player.storage.qingxian--; - player.chooseTarget(get.prompt('qingxian'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.isHealthy()&&att>0) return 0; - if(target.hp==1&&att!=0){ - if(att>0) return 9; - else return 10; - } - else{ - return Math.sqrt(Math.abs(att)); - } - }).set('prompt2','当你回复体力后,你可以令一名其他角色执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力'); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('qingxian',target); - event.insert(lib.skill.qingxian.content_choose,{target:target,player:player}); - } - 'step 2' - if(lib.skill.qingxian_dying.filter(trigger,player)) event.goto(0); - } - }, - rouhe:{ - audio:'qingxian', - trigger:{player:'recoverEnd'}, - direct:true, - content:function(){ - 'step 0' - if(_status.dying.length){ - if(!player.storage.qingxian) player.storage.qingxian=0; - player.storage.qingxian++; - event.finish(); - return; - } - player.chooseTarget(get.prompt('qingxian'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.isHealthy()&&att>0) return 0; - if(target.hp==1&&att!=0){ - if(att>0) return 9; - else return 10; - } - else{ - return Math.sqrt(Math.abs(att)); - } - }).set('prompt2','当你回复体力后,你可以令一名其他角色执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力'); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('qingxian',target); - event.insert(lib.skill.qingxian.content_choose,{target:target,player:player}); - } - } - }, - jilie:{ - audio:'qingxian', - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isIn(); - }, - check:function(event,player){ - if(get.attitude(player,event.source)>0&&event.source.isHealthy()){ - return false; - } - return true; - }, - logTarget:'source', - prompt2:'当你受到伤害后,你可以令伤害来源执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力', - content:function(){ - event.insert(lib.skill.qingxian.content_choose,{target:trigger.source,player:player}); - } - } - }, - content_choose:function(){ - 'step 0' - if(target.isHealthy()){ - event._result={index:0} - } - else{ - var index; - if(get.attitude(player,target)>0){ - index=1; - } - else{ - index=0; - } - player.chooseControlList( - ['令'+get.translation(target)+'失去1点体力,随机使用一张装备牌', - '令'+get.translation(target)+'回复1点体力,弃置一张装备牌'], - true,function(event,player){ - return _status.event.index; - }).set('index',index); - } - 'step 1' - if(result.index==0){ - target.loseHp(); - event.card=get.cardPile(function(card){ - return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card)); - }); - if(event.card){ - target.chooseUseTarget(event.card,'noanimate','nopopup',true); - event.goto(3); - } - else{ - event.finish(); - } - } - else{ - target.recover(); - if(target.countCards('he',{type:'equip'})){ - target.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ - return get.type(card)=='equip'; - }).set('ai',function(card){ - var val=-get.value(card); - if(get.suit(card)=='club'){ - val+=_status.event.att*10; - } - return val; - }).set('att',get.sgnAttitude(target,player)); - } - else{ - event.finish(); - } - } - 'step 2' - if(result&&result.cards){ - event.card=result.cards[0]; - } - 'step 3' - if(event.card&&get.suit(event.card)=='club'){ - player.draw(); - } - } - }, - juexiang:{ - audio:2, - trigger:{player:'die'}, - direct:true, - forceDie:true, - skillAnimation:true, - animationColor:'thunder', - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('juexiang'),function(card,player,target){ - return target!=player; - }).set('forceDie',true).set('ai',function(target){ - return get.attitude(_status.event.player,target)/Math.sqrt(target.hp+1); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0] - player.logSkill('juexiang',target); - target.addSkill(lib.skill.juexiang.derivation.randomGet()); - target.addTempSkill('juexiang_club',{player:'phaseZhunbeiBegin'}); - } - }, - derivation:['juexiang_ji','juexiang_lie','juexiang_rou','juexiang_he'], - subSkill:{ - ji:{ - audio:1, - mark:true, - nopop:true, - intro:{ - content:'info' - }, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isIn()&&event.source!=player; - }, - check:function(event,player){ - return get.attitude(player,event.source)<0; - }, - logTarget:'source', - content:function(){ - trigger.source.loseHp(); - var card=get.cardPile(function(card){ - return get.type(card)=='equip'; - }); - if(card){ - trigger.source.chooseUseTarget(card,'noanimate','nopopup',true); - } - }, - ai:{ - maixie_defend:true, - } - }, - lie:{ - audio:1, - mark:true, - nopop:true, - intro:{ - content:'info' - }, - trigger:{ - player:'recoverEnd', - global:'dyingAfter', - }, - direct:true, - content:function(){ - 'step 0' - if(_status.dying.length){ - if(event.triggername=='recoverEnd'){ - if(!player.storage.juexiang_lie) player.storage.juexiang_lie=0; - player.storage.juexiang_lie++; - } - event.finish(); - return; - } - if(event.triggername=='dyingAfter'){ - if(!player.storage.juexiang_lie){ - event.finish(); - return; - }; - player.storage.juexiang_lie--; - } - player.chooseTarget(get.prompt2('juexiang_lie'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return -get.attitude(player,target)/(1+target.hp); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('juexiang_lie',target); - target.loseHp(); - var card=get.cardPile(function(card){ - return get.type(card)=='equip'; - }); - if(card){ - target.chooseUseTarget(card,true,'noanimate','nopopup',true); - } - } - if(event.triggername=='dyingAfter'&&player.storage.juexiang_lie>0) event.goto(0); - } - }, - rou:{ - audio:1, - mark:true, - nopop:true, - intro:{ - content:'info' - }, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isIn()&&event.source!=player; - }, - check:function(event,player){ - var att=get.attitude(player,event.source); - if(player.isHealthy()){ - return att<0; - } - else{ - return att>0 - } - }, - logTarget:'source', - content:function(){ - trigger.source.recover(); - if(trigger.source.countCards('he',{type:'equip'})){ - trigger.source.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ - return get.type(card)=='equip'; - }); - } - }, - ai:{ - maixie_defend:true, - } - }, - he:{ - audio:1, - mark:true, - nopop:true, - intro:{ - content:'info' - }, - trigger:{player:'recoverEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('juexiang_he'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.isHealthy()&&target.countCards('he')){ - return -att; - } - else{ - return 10*att/(1+target.hp); - } - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('juexiang_he',target); - target.recover(); - if(target.countCards('he',{type:'equip'})){ - target.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ - return get.type(card)=='equip'; - }); - } - } - } - }, - club:{ - mark:true, - nopop:true, - intro:{ - content:'info' - }, - mod:{ - targetEnabled:function(card,player,target){ - if(get.suit(card)=='club'&&player!=target){ - return false; - } - } - } - } - } - }, - bizhuan:{ - audio:2, - trigger:{player:'useCard',target:'useCardToTargeted'}, - filter:function(event,player){ - if(event.name!='useCard'&&event.player==event.target) return false; - if(player.storage.bizhuan.length>=4) return false; - return get.suit(event.card)=='spade'; - }, - init:function(player){ - if(!player.storage.bizhuan) player.storage.bizhuan=[]; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - frequent:true, - content:function(){ - var card=game.cardsGotoSpecial(get.cards()).cards[0]; - player.$draw(card); - game.delay(); - player.storage.bizhuan.push(card); - player.markSkill('bizhuan'); - }, - mod:{ - maxHandcard:function(player,num){ - if(player.storage.bizhuan&&player.storage.bizhuan.length) return num+player.storage.bizhuan.length; - } - } - }, - tongbo:{ - trigger:{player:'phaseDrawAfter'}, - direct:true, - filter:function(event,player){ - return player.storage.bizhuan&&player.storage.bizhuan.length; - }, - locked:false, - content:function(){ - "step 0" - var four=false; - var nofour=!player.hasFriend(); - if(player.storage.bizhuan.length==4){ - var suits=['club','spade','heart','diamond']; - var list=player.getCards('he').concat(player.storage.bizhuan); - for(var i=0;i1){ - if(val<=0) return 0.01; - return val; - } - else{ - return 0; - } - } - } - else{ - if(val<0) return -10; - if(_status.event.player.skipList.contains('phaseUse')){ - return -val; - } - return val; - } - }).set('four',event.four).set('suits2',suits2).set('nofour',event.nofour); - if(player==game.me&&!event.isMine()){ - game.delay(0.5); - } - "step 3" - player.gain(result.links,'fromStorage'); - for(var i=0;i0){ - event.finish(); - } - "step 5" - event.cards=player.storage.bizhuan.slice(0); - player.storage.bizhuan.length=0; - player.unmarkSkill('bizhuan'); - "step 6" - if(event.cards.length>1){ - player.chooseCardButton('将所有“书”交给任意名其他角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ - if(ui.selected.buttons.length==0) return 1; - return 0; - }); - } - else if(event.cards.length==1){ - event._result={links:event.cards.slice(0),bool:true}; - } - else{ - event.finish(); - } - "step 7" - if(result.bool){ - for(var i=0;i0){ - return att/(1+target.countCards('h')); - } - else{ - return att/100; - } - }).set('enemy',get.value(event.togive[0],player,'raw')<0); - } - else{ - event.finish(); - } - "step 8" - if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); - player.line(result.targets[0],'green'); - game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张','#g“书”'); - event.goto(6); - } - }, - ai:{ - combo:'bizhuan' - } - }, - shouxi:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - direct:true, - init:function(player){ - if(!player.storage.shouxi) player.storage.shouxi=[]; - }, - filter:function(event,player){ - return event.card.name=='sha'&&event.player.isAlive(); - }, - content:function(){ - 'step 0' - var list=['sha','shan','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman','lebu','bingliang','shandian']; - for(var i=0;i=0; - }, - content:function(){ - 'step 0' - event.list=game.filterPlayer(function(current){ - return current.countCards('h')0; - }, - logTarget:'player', - skillAnimation:true, - animationColor:'wood', - onWash:function(){ - _status.event.getParent('fuzhu').washed=false; - return 'remove'; - }, - content:function(){ - 'step 0' - event.washed=false; - lib.onwash.push(lib.skill.fuzhu.onWash); - event.total=game.players.length+game.dead.length; - 'step 1' - event.total--; - var card=get.cardPile2(function(card){ - return card.name=='sha'&&player.canUse(card,trigger.player,false); - }); - if(card){ - card.remove(); - game.updateRoundNumber(); - player.useCard(card,trigger.player,false); - } - 'step 2' - if(event.total>0&&!event.washed&&ui.cardPile.childElementCount<=player.hp*10&&trigger.player.isAlive()) event.goto(1); - 'step 3' - lib.onwash.remove(lib.skill.fuzhu.onWash); - var cards=get.cards(ui.cardPile.childElementCount+1); - for(var i=0;i1) str+='中的一人'; - return str; - }, - check:function(card){ - if(card.name=='sha') return 5; - return 8-get.value(card); - }, - content:function(){ - "step 0" - var targets=game.filterPlayer(function(current){ - return current.hasSkill('wengua'); - }); - if(targets.length==1){ - event.target=targets[0]; - event.goto(2); - } - else if(targets.length>0){ - player.chooseTarget(true,'选择【问卦】的目标',function(card,player,target){ - return _status.event.list.contains(target); - }).set('list',targets).set('ai',function(target){ - var player=_status.event.player; - return get.attitude(player,target); - }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool&&result.targets.length){ - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - player.logSkill('wengua',event.target); - player.addTempSkill('wengua3','phaseUseEnd'); - event.card=cards[0]; - if(event.target!=player){ - player.give(cards,event.target); - } - } - else{ - event.finish(); - } - delete _status.noclearcountdown; - game.stopCountChoose(); - "step 3" - if(event.target.getCards('he').contains(event.card)){ - event.target.chooseControlList('问卦','将'+get.translation(event.card)+'置于牌堆顶','将'+get.translation(event.card)+'置于牌堆底',event.target==player,function(){ - if(get.attitude(event.target,player)<0) return 2; - return 1; - }); - } - else{ - event.finish(); - } - "step 4" - event.index=result.index; - if(event.index==0||event.index==1){ - event.target.lose(event.card,ui.special); - game.broadcastAll(function(player){ - var cardx=ui.create.card(); - cardx.classList.add('infohidden'); - cardx.classList.add('infoflip'); - player.$throw(cardx,1000,'nobroadcast'); - },event.target); - } - else event.finish(); - "step 5" - game.delay(); - "step 6" - event.card.fix(); - if(event.index==1){ - game.log(event.target,'将获得的牌置于牌堆底'); - ui.cardPile.appendChild(event.card); - if(ui.cardPile.childElementCount==1||player==event.target){ - player.draw(); - } - else{ - game.asyncDraw([player,target],null,null); - } - } - else if(event.index==0){ - game.log(player,'将获得的牌置于牌堆顶'); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - if(ui.cardPile.childElementCount==1||player==event.target){ - player.draw('bottom'); - } - else{ - game.asyncDraw([player,target],null,null,true); - } - } - }, - ai:{ - order:2, - threaten:1.5, - result:{ - player:function(player,target){ - var target=game.findPlayer(function(current){ - return current.hasSkill('wengua'); - }); - if(target){ - return get.attitude(player,target); - } - } - } - } - }, - wengua3:{}, - daiyan:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - init:function(){ - lib.onwash.push(function(){ - delete _status.daiyan_notao; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('daiyan'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att>0){ - if(_status.daiyan_notao){ - return 0; - } - else{ - if(target==player.storage.daiyan) return 0; - return 2*att/Math.sqrt(1+target.hp); - } - } - else{ - if(_status.daiyan_notao){ - if(target==player.storage.daiyan) return -3*att; - return -att; - } - else{ - return 0; - } - } - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('daiyan',target); - var tao=get.cardPile2(function(card){ - return get.suit(card)=='heart'&&get.type(card)=='basic'; - }); - if(tao){ - target.gain(tao,'gain2'); - } - else{ - _status.daiyan_notao=true; - } - if(target==player.storage.daiyan){ - target.loseHp(); - } - player.storage.daiyan=target; - } - else{ - delete player.storage.daiyan; - } - }, - ai:{ - threaten:1.5, - expose:0.2 - } - }, - fumian:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - content:function(){ - 'step 0' - if(player.storage.fumian_choice=='draw'){ - player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择两个目标(限一次)',function(event,player){ - if(player.hp==1||player.countCards('h')<=1) return 0; - return 1; - }); - } - else if(player.storage.fumian_choice=='red'){ - player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸两张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){ - return 0; - }); - } - else{ - player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){ - if(player.hp==1||player.countCards('h')0; - }, - content:function(){ - 'step 0' - player.showCards(cards); - 'step 1' - var num=target.countCards('h')-target.hp; - if(num<=0){ - num=1; - } - var hs=target.getCards('h').randomGets(num); - target.showCards(hs); - var colors=[]; - var numbers=[]; - for(var i=0;i=0||player.countCards('h')0) return '手牌上限+'+storage; - if(storage<0) return '手牌上限'+storage; - return '手牌上限无变化'; - }, - }, - content:function(){ - 'step 0' - if(player.isHealthy()){ - event.type=0; - player.chooseBool(get.prompt('caishi'),'手牌上限+1,然后本回合你的牌不能对其他角色使用',function(event,player){ - return player.skipList.contains('phaseUse')||!player.needsToDiscard(1); - }); - } - else{ - event.type=1; - player.chooseControlList(get.prompt('caishi'),'手牌上限+1,然后本回合你的牌不能对其他角色使用','回复1点体力,然后本回合你的牌不能对自己使用',function(){ - return 1; - }); - } - 'step 1' - if(event.type){ - if(result.control!='cancel2'){ - player.logSkill('caishi'); - if(result.index==0){ - player.addTempSkill('caishi2'); - player.storage.caishi++; - if(player.storage.caishi>=0){ - player.unmarkSkill('zhongjian'); - if(player.storage.caishi>0){ - player.markSkill('caishi'); - } - } - else{ - player.updateMarks(); - } - } - else if(result.index==1){ - player.recover(); - player.addTempSkill('caishi3'); - } - } - } - else{ - if(result.bool){ - player.logSkill('caishi'); - player.addTempSkill('caishi2'); - player.storage.caishi++; - if(player.storage.caishi>=0){ - player.unmarkSkill('zhongjian'); - if(player.storage.caishi>0){ - player.markSkill('caishi'); - } - } - else{ - player.updateMarks(); - } - } - } - }, - mod:{ - maxHandcard:function(player,num){ - if(typeof player.storage.caishi=='number') return num+player.storage.caishi; - }, - } - }, - caishi2:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - caishi3:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player==target) return false; - } - } - }, - ttt:{ - mod:{ - targetEnabled:function(card){ - if(card.name=='tao') return false; - } - } - }, - jyzongshi:{ - audio:2, - trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']}, - filter:function(event,player){ - if(event.preserve) return false; - if(player==event.player){ - if(event.num1>event.num2){ - return !get.owner(event.card2); - } - else{ - return !get.owner(event.card1); - } - } - else{ - if(event.num1event.num2){ - return event.card2.name!='du'; - } - else{ - return event.card1.name!='du'; - } - } - else{ - if(event.num1trigger.num2){ - player.gain(trigger.card2,'gain2','log'); - } - else{ - player.gain(trigger.card1,'gain2','log'); - } - } - else{ - if(trigger.num10; - }, - content:function(){ - 'step 0' - var goon=true; - if(get.attitude(player,trigger.player)>=-0.8) goon=false; - else if(trigger.player.countCards('h')<=3) goon=false; - else if(player.countCards('h','shan')==0) goon=false; - var es=player.getCards('e'); - var color=[]; - for(var i=0;i0;//&&!_status.dying.length; - }, - init:function(player){ - if(!player.storage.taoluan) player.storage.taoluan=[]; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var i=0;i0) return 0; - if(button.link[2]=='wugu') return 0; - var effect=player.getUseValue(button.link[2]); - if(effect>0) return effect; - return 0; - }, - backup:function(links,player){ - return { - filterCard:true, - audio:'taoluan', - selectCard:1, - popname:true, - check:function(card){ - return 6-get.value(card); - }, - position:'he', - viewAs:{name:links[0][2],nature:links[0][3]}, - onuse:function(result,player){ - player.storage.taoluan.add(result.card.name); - }, - } - }, - prompt:function(links,player){ - return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - save:true, - skillTagFilter:function(player){ - if(!player.countCards('he')||player.hasSkill('taoluan3')) return false; - if(!player.storage.taoluan.contains('tao')){} - else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){} - else return false; - }, - order:4, - result:{ - player:function(player){ - var allshown=true,players=game.filterPlayer(); - for(var i=0;i0){ - return 1; - } - } - if(allshown) return 1; - return 0; - } - }, - threaten:1.9, - }, - group:['taoluan2','taoluan4','taoluan5'] - }, - taoluan2:{ - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='taoluan_backup'||event.skill=='taoluan5'||event.skill=='taoluan4'; - }, - content:function(){ - 'step 0' - player.chooseTarget(true,function(card,player,target){ - return target!=player; - },'滔乱

    令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力').set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0){ - if(get.attitude(target,player)>0){ - return target.countCards('h'); - } - return target.countCards('h')/2; - } - return 0; - }); - 'step 1' - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - var type=get.type(trigger.card,'trick'); - target.chooseCard('滔乱

    交给'+get.translation(player)+'一张不为'+get.translation(type)+'牌的牌,或令其失去一点体力且滔乱无效直到回合结束','he',function(card,player,target){ - return get.type(card,'trick')!=_status.event.cardType; - }).set('cardType',type).set('ai',function(card){ - if(_status.event.att){ - return 11-get.value(card); - } - return 0; - }).set('att',get.attitude(target,player)>0); - 'step 2' - var target=event.target; - if(result.bool){ - player.gain(result.cards,target,'give'); - } - else{ - player.addTempSkill('taoluan3'); - var next=player.loseHp(); - event.next.remove(next); - event.getParent('phase').after.push(next); - } - } - }, - taoluan3:{}, - taoluan4:{ - prompt:'将一张牌当做闪使用', - enable:'chooseToUse', - filter:function(event,player){ - return !player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3')&&player.countCards('he');//&&!_status.dying.length; - }, - onuse:function(result,player){ - player.storage.taoluan.add('shan'); - }, - filterCard:true, - position:'he', - selectCard:1, - viewAs:{name:'shan'}, - ai:{ - skillTagFilter:function(player){ - return player.countCards('he')&&!player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3'); - }, - threaten:1.5, - respondShan:true, - } - }, - taoluan5:{ - audio:'taoluan', - enable:'chooseToUse', - prompt:'将一张牌当做无懈可击使用', - viewAsFilter:function(player){ - return !player.storage.taoluan.contains('wuxie')&&!player.hasSkill('taoluan3')&&player.countCards('he'); - }, - onuse:function(result,player){ - player.storage.taoluan.add('wuxie'); - }, - filterCard:true, - position:'he', - selectCard:1, - viewAs:{name:'wuxie'}, - }, - taoluan_backup:{}, - jishe:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.getHandcardLimit()>0; - }, - init:function(player){ - player.storage.jishe=0; - }, - usable:20, - content:function(){ - player.draw(); - player.storage.jishe++; - }, - ai:{ - order:10, - result:{ - player:function(player){ - if(!player.needsToDiscard(1)){ - return 1; - } - return 0; - } - } - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.storage.jishe; - } - }, - group:['jishe2','jishe3'] - }, - jishe2:{ - trigger:{player:'phaseAfter'}, - silent:true, - content:function(){ - player.storage.jishe=0; - } - }, - jishe3:{ - audio:'jishe', - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - if(player.countCards('h')) return false; - return game.hasPlayer(function(current){ - return !current.isLinked(); - }); - }, - content:function(){ - "step 0" - var num=game.countPlayer(function(current){ - return !current.isLinked(); - }); - player.chooseTarget(get.prompt('jishe'),'横置至多'+get.cnNumber(Math.min(num,player.hp))+'名未横置的角色',[1,Math.min(num,player.hp)],function(card,player,target){ - return !target.isLinked(); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - player.logSkill('jishe',result.targets); - event.targets=result.targets; - event.num=0; - } - else{ - event.finish(); - } - "step 2" - if(event.num0); - var goon=false; - if(player.hp==1){ - goon=true; - } - else{ - var he=player.getCards('he'); - var num=0; - for(var i=0;i=2){ - goon=true;break; - } - } - } - } - player.chooseCard('he',[1,player.countCards('he')],get.prompt2('huisheng',trigger.source)).set('ai',function(card){ - if(_status.event.att){ - return 10-get.value(card); - } - if(_status.event.goon){ - return 8-get.value(card); - } - if(!ui.selected.cards.length){ - return 7-get.value(card); - } - return 0; - }).set('goon',goon).set('att',att); - 'step 1' - if(result.bool){ - player.logSkill('huisheng',trigger.source); - game.delay(); - event.num=result.cards.length; - var goon=false; - if(event.num>2||get.attitude(trigger.source,player)>=0){ - goon=true; - } - var forced=false; - var str='获得其中一张牌并防止伤害'; - if(trigger.source.countCards('he')0){ - if(he==0) return 1; - if(target.countCards('h')>get.zhu(player).countCards('h')) return 1; - } - else{ - if(he>0) return 1; - } - return 0; - }); - 'step 1' - if(result.bool){ - event.targets=result.targets.slice(0).sortBySeat(); - event.list=event.targets.slice(0); - player.logSkill('qinqing',event.targets); - } - else{ - event.finish(); - } - 'step 2' - if(event.targets.length){ - var target=event.targets.shift(); - if(target.countCards('he')){ - player.discardPlayerCard(target,'he',true); - } - target.draw(); - event.redo(); - } - 'step 3' - var num=0; - var zhu=get.zhu(player); - if(zhu){ - var nh=zhu.countCards('h'); - for(var i=0;inh){ - num++; - } - } - if(num){ - player.draw(num); - } - } - }, - ai:{ - threaten:1.2 - } - }, - guizao:{ - audio:2, - trigger:{player:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - if(event.cards&&event.cards.length>1){ - var suits=[]; - for(var i=0;i0||target.hp<=2){ - spade=false; - } - target.chooseToDiscard('h',true).set('ai',function(card){ - if(get.suit(card)=='spade'){ - if(_status.event.spade){ - return 10-get.value(card); - } - else{ - return -10-get.value(card); - } - } - if(_status.event.getParent().player.storage.jiyu2&&_status.event.getParent().player.storage.jiyu2.contains(get.suit(card))){ - return -3-get.value(card); - } - return -get.value(card); - }).set('spade',spade); - 'step 1' - if(!result.cards||!result.cards.length) return; - var card=result.cards[0]; - if(get.suit(card,target)=='spade'){ - player.turnOver(); - target.loseHp(); - } - if(!player.storage.jiyu2) player.storage.jiyu2=[]; - player.storage.jiyu2.add(get.suit(card)); - }, - onremove:['jiyu','jiyu2'], - ai:{ - order:9, - result:{ - target:function(player,target){ - if(player.isTurnedOver()||target.countCards('h')<=3) return -1; - return 0; - } - } - }, - mod:{ - cardEnabled:function(card,player){ - if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; - } - } - }, - jiyu2:{ - trigger:{player:['phaseUseBegin','phaseUseAfter']}, - silent:true, - content:function(){ - player.storage.jiyu=[]; - player.storage.jiyu2=[]; - } - }, - jiaozhao:{ - enable:'phaseUse', - usable:1, - audio:2, - check:function(card){ - return 8-get.value(card); - }, - filterCard:true, - discard:false, - lose:false, - delay:false, - content:function(){ - 'step 0' - player.showCards(cards); - 'step 1' - if(player.storage.jiaozhao2){ - event.target=player; - } - else{ - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(function(a,b){ - return Math.max(1,get.distance(player,a))-Math.max(1,get.distance(player,b)); - }); - var distance=Math.max(1,get.distance(player,targets[0])); - for(var i=1;idistance){ - targets.splice(i);break; - } - } - player.chooseTarget(true,function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('targets',targets); - } - 'step 2' - if(!event.target){ - event.target=result.targets[0]; - player.line(result.targets,'green'); - } - if(!event.target){ - event.finish(); - return; - } - var list=['sha','sha','sha','shan','tao','jiu']; - if(player.storage.jiaozhao1){ - list=list.concat(['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']); - } - for(var i=0;i=5){ - choice='jiu'; - } - else if(nh<=2){ - choice='sha'; - } - else{ - choice=Math.random()<0.5?'sha':'jiu'; - } - } - else{ - var recover=0,lose=1,players=game.filterPlayer(); - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - } - if(lose>recover&&lose>0){ - choice=Math.random()<0.7?'nanman':'wanjian'; - } - else if(lose0){ - choice='taoyuan'; - } - else{ - choice=Math.random()<0.5?'guohe':'shunshou'; - } - } - } - event.target.chooseButton(['矫诏',[list,'vcard']],true).set('ai',function(button){ - return button.link[2]==_status.event.choice?1:0; - }).set('choice',choice); - 'step 3' - var chosen=result.links[0][2]; - var nature=result.links[0][3]; - var fakecard={name:chosen,suit:cards[0].suit,number:cards[0].number,nature:nature}; - event.target.showCards(game.createCard(fakecard),get.translation(event.target)+'声明了'+get.translation(chosen)); - player.storage.jiaozhao=cards[0]; - player.storage.jiaozhao_card=fakecard; - game.broadcastAll(function(name){ - lib.skill.jiaozhao2.viewAs=fakecard; - },fakecard); - var next=game.createEvent('jiaozhao3'); - event.next.remove(next); - event.getParent(3).after.push(next); - next.player=player; - next.setContent(lib.skill.jiaozhao3.content); - }, - ai:{ - order:9, - result:{ - player:1 - } - }, - intro:{ - content:function(storage,player){ - if(player.storage.jiaozhao2){ - return '出牌阶段限一次,你可以展示一张手牌,然后你声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; - } - else{ - return '出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; - } - } - }, - group:['jiaozhao2'] - }, - jiaozhao2:{ - enable:'phaseUse', - audio:'jiaozhao', - filter:function(event,player){ - if(!player.storage.jiaozhao) return false; - var name=player.storage.jiaozhao_card.name; - if(name=='tao'||name=='shan'||name=='wuzhong'||name=='jiu') return false; - return player.getCards('h').contains(player.storage.jiaozhao)&&game.checkMod(player.storage.jiaozhao,player,'unchanged','cardEnabled2',player)!==false; - }, - filterCard:function(card,player){ - return card==player.storage.jiaozhao; - }, - selectCard:-1, - popname:true, - filterTarget:function(card,player,target){ - var info=get.info(player.storage.jiaozhao_card); - if((!info.singleCard||!ui.selected.targets.length)&&player==target) return false; - return lib.filter.filterTarget(player.storage.jiaozhao_card,player,target); - }, - check:function(card){ - return 8-get.value(card); - }, - ai:{ - order:6 - } - }, - jiaozhao3:{ - trigger:{player:'phaseJieshuBegin'}, - silent:true, - content:function(){ - delete player.storage.jiaozhao; - delete player.storage.jiaozhao_card; - } - }, - danxin:{ - trigger:{player:'damageEnd'}, - frequent:true, - audio:2, - content:function(){ - 'step 0' - if(player.storage.jiaozhao1&&player.storage.jiaozhao2){ - player.draw(); - event.finish(); - } - else{ - var list=['draw_card','更改描述']; - var prompt; - if(player.storage.jiaozhao1){ - prompt='摸一张牌或更改矫诏的描述

    更改描述:将“选择距离最近的一名其他角色,该角色”改为“你”'; - } - else{ - prompt='摸一张牌或更改矫诏的描述

    更改描述:将“基本牌”改为“基本牌或普通锦囊牌”'; - } - player.chooseControl(list,function(){ - if(!_status.event.player.hasSkill('jiaozhao')) return 'draw_card'; - return '更改描述'; - }).set('prompt',prompt); - } - 'step 1' - if(result.control=='draw_card'){ - player.draw(); - } - else{ - game.log(player,'更改了','【矫诏】','的描述'); - player.popup('更改描述'); - player.markSkill('jiaozhao'); - if(player.storage.jiaozhao1){ - player.storage.jiaozhao2=true; - } - else{ - player.storage.jiaozhao1=true; - } - } - } - }, - zongzuo:{ - trigger:{global:'phaseBefore'}, - forced:true, - priority:10, - audio:2, - filter:function(event,player){ - return !player.storage.zongzuo; - }, - content:function(){ - 'step 0' - player.storage.zongzuo=true; - var num=game.countGroup(); - player.gainMaxHp(num); - event.num=num; - 'step 1' - player.recover(event.num); - //player.update(); - }, - group:'zongzuo_lose', - subSkill:{ - lose:{ - trigger:{global:'dieAfter'}, - forced:true, - audio:'zongzuo', - filter:function(event,player){ - if(!lib.group.contains(event.player.group)) return false; - if(game.hasPlayer(function(current){ - return current.group==event.player.group; - })){ - return false; - } - return true; - }, - content:function(){ - player.loseMaxHp(); - } - } - } - }, - zhige:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - filterTarget:function(card,player,target){ - return get.distance(target,player,'attack')<=1&&target.countCards('e')>0; - }, - content:function(){ - 'step 0' - target.chooseToUse({name:'sha'},'止戈:使用一张杀,或将其装备区里的一张牌交给'+get.translation(player)); - 'step 1' - if(!result.bool&&target.countCards('e')){ - target.chooseCard('e',true,'将其装备区里的一张牌交给'+get.translation(player)); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool&&result.cards&&result.cards.length){ - player.gain(result.cards,target,'give'); - } - }, - ai:{ - expose:0.2, - order:5, - result:{ - target:-1, - player:function(player,target){ - if(target.countCards('h')==0) return 0; - if(target.countCards('h')==1) return -0.1; - if(player.hp<=2) return -2; - if(player.countCards('h','shan')==0) return -1; - return -0.5; - } - } - } - }, - kuangbi:{ - enable:'phaseUse', - usable:1, - audio:2, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - content:function(){ - 'step 0' - target.chooseCard('he',[1,3],'匡弼:将1~3张牌置于'+get.translation(player)+'的武将牌上',true).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 7-get.value(card); - } - return -get.value(card); - }); - 'step 1' - if(result.bool){ - target.$give(result.cards.length,player,false); - target.lose(result.cards,ui.special,'toStorage'); - if(!player.storage.kuangbi_draw) player.storage.kuangbi_draw=[]; - player.storage.kuangbi_draw.push([result.cards,target]); - player.addSkill('kuangbi_draw'); - player.syncStorage('kuangbi_draw'); - player.updateMarks('kuangbi_draw'); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>0){ - return Math.sqrt(target.countCards('he')); - } - return 0; - }, - player:1 - } - }, - subSkill:{ - draw:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - mark:true, - charlotte:true, - audio:'kuangbi', - intro:{ - onunmark:function(storage,player){ - var cards=[]; - while(storage.length){ - cards.addArray(storage.shift()[0]); - } - if(cards.length){ - game.cardsDiscard(cards); - player.$throw(cards,1000); - game.log(cards,'被置入了弃牌堆'); - } - }, - markcount:function(content){ - var cards=[]; - for(var i=0;i0; - }, - audio:2, - content:function(){ - 'step 0' - player.gainPlayerCard(target,'h',true); - 'step 1' - var name=get.translation(target); - player.chooseControl(function(){ - return Math.random()<0.5?'选项一':'选项二'; - }).set('prompt','督粮').set('choiceList',['令'+name+'观看牌堆顶的两张牌,然后获得其中的基本牌','令'+name+'于下个摸牌阶段额外摸一张牌']); - 'step 2' - if(result.control=='选项一'){ - var cards=get.cards(2); - target.viewCards('督粮',cards); - event.cards2=[]; - event.tothrow=[]; - for(var i=0;i=_status.event.getParent().num) return -1; - if(_status.event.player.hasSkillTag('nofire')) return -1; - if(_status.event.res>=0) return 6-get.value(card); - if(get.type(card)!='basic'){ - return 10-get.value(card); - } - return 8-get.value(card); - }).set('res',res); - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ - event.target.damage(2,'fire'); - event.num=1; - } - else{ - event.num=result.cards.length+1; - } - event.goto(1); - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0,players=game.filterPlayer(); - for(var i=0;i0){ - num--; - } - else if(att<0){ - num++; - } - } - } - if(game.players.length<5){ - return num-1; - } - else{ - return num-2; - } - } - } - }, - init:function(player){ - player.storage.xinfencheng=false; - }, - intro:{ - content:'limited' - } - }, - xinjuece:{ - audio:'juece', - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(player){ - return player.countCards('h')==0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('xinjuece'),'对一名没有手牌的其他角色造成1点伤害',function(card,player,target){ - return target.countCards('h')==0; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - player.logSkill('xinjuece',result.targets); - result.targets[0].damage(); - } - } - }, - xinmieji:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h',{type:['trick','delay'],color:'black'}); - }, - filterCard:function(card){ - return get.color(card)=='black'&&get.type(card,'trick')=='trick'; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - discard:false, - delay:false, - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - 'step 0' - player.showCards(cards); - 'step 1' - cards[0].fix(); - ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); - game.updateRoundNumber(); - 'step 2' - target.chooseToDiscard('he',true).set('prompt','请弃置一张锦囊牌,或依次弃置两张非锦囊牌。'); - 'step 3' - if((!result.cards||get.type(result.cards[0],'trick',result.cards[0].original=='h'?target:false)!='trick')&&target.countCards('he',function(card){ - return get.type(card,'trick')!='trick'; - })){ - target.chooseToDiscard('he',true,function(card){ - return get.type(card,'trick')!='trick'; - }).set('prompt','请弃置第二张非锦囊牌'); - } - }, - ai:{ - order:9, - result:{ - target:-1 - } - } - }, - qianju:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance-(from.getDamagedHp()); - } - } - }, - reqianju:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance-(Math.max(1,from.getDamagedHp())); - } - } - }, - reqingxi:{ - audio:'qingxi', - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - 'step 0' - var num=game.countPlayer(function(current){ - return player.inRange(current); - }); - if(trigger.target.countCards('h')2){ - return 0; - } - return 8-get.value(card); - } - }); - } - 'step 1' - if(!event.directfalse&&result.bool){ - var e1=player.getEquip(1); - if(e1){ - player.discard(e1,'notBySelf'); - } - } - else{ - var storage=trigger.target.storage; - var id=trigger.target.playerid; - var map=trigger.customArgs; - if(!map[id]) map[id]={}; - if(!map[id].extraDamage) map[id].extraDamage=0; - map[id].extraDamage++; - if(!storage.reqingxi2) storage.reqingxi2=[]; - storage.reqingxi2.push(trigger.card); - trigger.target.addTempSkill('reqingxi2'); - } - } - }, - reqingxi2:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name=='shan'&&player.storage.reqingxi2&&player.storage.reqingxi2.filter(function(cd){ - return get.suit(cd)!=get.suit(card); - }).length) return false; - }, - }, - firstDo:true, - onremove:true, - trigger:{ - player:['damage','damageCancelled','damageZero'], - target:['shaMiss','useCardToExcluded'], - }, - charlotte:true, - filter:function(event,player){ - return player.storage.reqingxi2&&event.card&&player.storage.reqingxi2.contains(event.card); - }, - silent:true, - forced:true, - popup:false, - priority:12, - content:function(){ - player.storage.reqingxi2.remove(trigger.card); - if(!player.storage.reqingxi2.length) player.removeSkill('reqingxi2'); - }, - }, - qingxi:{ - audio:2, - trigger:{source:'damageBegin1'}, - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - filter:function(event,player){ - return event.getParent().name=='sha'&&player.getEquip(1); - }, - content:function(){ - 'step 0' - var num=1; - var info=get.info(player.getEquip(1)); - if(info&&info.distance&&info.distance.attackFrom){ - num-=info.distance.attackFrom; - } - if(trigger.player.countCards('h')2){ - return 0; - } - return 8-get.value(card); - } - }); - } - 'step 1' - if(!event.directfalse&&result.bool){ - var e1=player.getEquip(1); - if(e1){ - player.discard(e1,'notBySelf'); - } - } - else{ - trigger.num++; - } - } - }, - jieyue:{ - group:'jieyue1' - }, - jieyue1:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - filterCard:lib.filter.cardDiscardable, - ai1:function(card){ - return 7-get.useful(card); - }, - ai2:function(target){ - return 1-get.attitude(_status.event.player,target); - }, - prompt:get.prompt2('jieyue') - }); - 'step 1' - if(result.bool){ - player.logSkill('jieyue1',result.targets); - player.discard(result.cards); - var target=result.targets[0]; - event.target=target; - target.chooseCard('将一张牌置于'+get.translation(player)+'的武将牌上,或令其弃置你的一张牌','he').set('ai',function(card){ - if(card.name=='du') return 20; - var player=_status.event.player; - if(get.attitude(player,_status.event.getParent().player)>0){ - return 8-get.value(card); - } - var nh=player.countCards('h'); - if(nh<=2){ - return 6-get.value(card); - } - if(nh<=3){ - return 2-get.value(card); - } - return 0; - }); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool&&result.cards&&result.cards.length){ - event.target.$give(result.cards,player,false); - player.storage.jieyue2=result.cards[0]; - event.target.lose(result.cards[0],ui.special,'toStorage'); - player.syncStorage('jieyue2'); - player.addSkill('jieyue2'); - } - else if(event.target.countCards('he')){ - player.discardPlayerCard(event.target,true); - } - }, - ai:{ - expose:0.1 - } - }, - jieyue2:{ - mark:'card', - intro:{ - content:'card' - }, - audio:true, - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - viewAsFilter:function(player){ - return player.countCards('h',{color:'black'})>0; - }, - viewAs:{name:'wuxie'}, - prompt:'将一张黑色手牌当无懈可击使用', - check:function(card){return 8-get.value(card)}, - threaten:1.2, - group:['jieyue3','jieyue4'] - }, - jieyue3:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:function(card){ - return get.color(card)=='red'; - }, - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; - }, - audio:true, - prompt:'将一张红色手牌当闪使用或打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.8 - } - } - } - }, - jieyue4:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - player.gain(player.storage.jieyue2,'gain2','fromStorage'); - player.storage.jieyue2=null; - player.removeSkill('jieyue2'); - } - }, - jinjiu:{ - mod:{ - cardname:function(card,player){ - if(card.name=='jiu') return 'sha'; - }, - }, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h','jiu')) return false; - }, - respondSha:true, - }, - audio:2, - trigger:{player:['useCard1','respond']}, - firstDo:true, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&!event.skill&& - event.cards.length==1&&event.cards[0].name=='jiu'; - }, - content:function(){}, - }, - xinxianzhen:{ - audio:'xianzhen', - inherit:'xianzhen', - }, - xinxianzhen2:{ - audio:'xianzhen', - mod:{ - targetInRange:function(card,player,target){ - if(target==player.storage.xinxianzhen) return true; - }, - cardUsable:function(card,player,num){ - if(typeof num=='number') return num+100; - }, - playerEnabled:function(card,player,target){ - if(card.name=='sha'&&player.storage.xinxianzhen!=target&&!ui.selected.targets.contains(player.storage.xinxianzhen)){ - var num=player.getCardUsable(card)-100; - if(num<=0) return false; - } - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(arg.target!=player.storage.xinxianzhen) return false; - }, - effect:{ - player:function(card,player,target,current,isLink){ - if(isLink||!player.storage.xinxianzhen) return; - if(target!=player.storage.xinxianzhen&&['sha','guohe','shunshou','huogong','juedou'].contains(card.name)){ - if(get.effect(player.storage.xinxianzhen,card,player,player)>0){ - return [1,2]; - } - } - } - } - }, - trigger:{player:'useCard2'}, - filter:function(event,player){ - return (event.card.name=='sha'||get.type(event.card)=='trick')&& - event.targets&&event.targets.length==1&&!event.targets.contains(player.storage.xinxianzhen); - }, - check:function(event,player){ - return get.effect(player.storage.xinxianzhen,event.card,player,player)>0; - }, - logTarget:function(event,player){ - return player.storage.xinxianzhen; - }, - prompt2:'令该角色也成为此牌的目标', - content:function(){ - var target=player.storage.xinxianzhen; - trigger.targets.push(target); - game.log(target,'成为了',trigger.card,'的额外目标'); - }, - }, - xinxianzhen3:{ - charlotte:true, - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - }, - ignoredHandcard:function(card,player){ - if(get.name(card)=='sha'){ - return true; - } - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&get.name(card)=='sha'){ - return false; - } - }, - }, - }, - xianzhen:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.bool){ - player.storage[event.name]=target; - player.addTempSkill(event.name+2); - } - else{ - player.addTempSkill(event.name+3); - } - }, - ai:{ - order:function(name,player){ - var cards=player.getCards('h'); - if(player.countCards('h','sha')==0){ - return 1; - } - for(var i=0;i11&&get.value(cards[i])<7){ - return 9; - } - } - return get.order({name:'sha'})-1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')>0) return 0; - var num=player.countCards('h'); - if(num>player.hp) return 0; - if(num==1) return -2; - if(num==2) return -1; - return -0.7; - }, - target:function(player,target){ - var num=target.countCards('h'); - if(num==1) return -1; - if(num==2) return -0.7; - return -0.5 - }, - }, - threaten:1.3 - } - }, - xianzhen2:{ - charlotte:true, - mod:{ - targetInRange:function(card,player,target){ - if(target==player.storage.xianzhen) return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha'&&typeof num=='number') return num+100; - }, - playerEnabled:function(card,player,target){ - if(card.name=='sha'&&player.storage.xianzhen!=target&&!ui.selected.targets.contains(player.storage.xianzhen)){ - var num=player.getCardUsable(card)-100; - if(num<=0) return false; - } - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(arg.target!=player.storage.xianzhen) return false; - }, - } - }, - xianzhen3:{ - charlotte:true, - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - lihuo:{ - trigger:{player:'useCard1'}, - filter:function(event,player){ - if(event.card.name=='sha'&&!event.card.nature) return true; - return false; - }, - audio:2, - check:function(event,player){ - return false; - }, - content:function(){ - trigger.card.nature='fire'; - var next=game.createEvent('lihuo_clear'); - next.player=player; - next.card=trigger.card; - event.next.remove(next); - next.forceDie=true; - trigger.after.push(next); - next.setContent(function(){ - if(player.isAlive()&&player.getHistory('sourceDamage',function(evt){ - return evt.getParent(2)==event.parent; - }).length>0) player.loseHp(); - delete card.nature; - }); - }, - group:'lihuo2' - }, - lihuo2:{ - trigger:{player:'useCard2'}, - filter:function(event,player){ - if(event.card.name!='sha'||get.nature(event.card)!='fire') return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&player.canUse(event.card,current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('lihuo'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ - return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); - }).set('sourcex',trigger.targets).set('card',trigger.card).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,_status.event.card,player,player); - }); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!_status.connectMode) game.delayx(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('lihuo',event.target); - trigger.targets.push(event.target); - }, - }, - lihuo3:{ - trigger:{player:'useCardAfter'}, - vanish:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - forced:true, - audio:false, - content:function(){ - player.loseHp(); - player.removeSkill('lihuo3'); - } - }, - chunlao:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - audioname:['xin_chengpu'], - filter:function(event,player){ - return player.countCards('h')>0&&(_status.connectMode||player.countCards('h','sha')>0)&&!player.storage.chunlao.length; - }, - init:function(player){ - if(!player.storage.chunlao) player.storage.chunlao=[]; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - content:function(){ - 'step 0' - player.chooseCard([1,Math.max(1,player.countCards('h','sha'))],get.prompt('chunlao'),{name:'sha'}).set('ai',function(){ - return 1; - }); - 'step 1' - if(result.bool){ - player.logSkill('chunlao'); - player.storage.chunlao=player.storage.chunlao.concat(result.cards); - player.syncStorage('chunlao'); - player.markSkill('chunlao'); - player.lose(result.cards,ui.special,'toStorage'); - player.$give(result.cards,player,false); - } - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(_status.currentPhase!=player) return; - if(card.name=='sha'&&!player.needsToDiscard()&& - !player.storage.chunlao.length&&target.hp>1){ - return 'zeroplayertarget'; - } - } - }, - threaten:1.4 - }, - group:'chunlao2' - }, - chunlao2:{ - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&event.dying&&event.dying.hp<=0&&player.storage.chunlao.length>0; - }, - filterTarget:function(card,player,target){ - return target==_status.event.dying; - }, - direct:true, - clearTime:true, - delay:false, - selectTarget:-1, - content:function(){ - "step 0" - player.chooseCardButton(get.translation('chunlao'),player.storage.chunlao,true); - "step 1" - if(result.bool){ - player.logSkill('chunlao',target); - player.$throw(result.links); - player.storage.chunlao.remove(result.links[0]); - game.cardsDiscard(result.links[0]); - player.syncStorage('chunlao') - event.type='dying'; - target.useCard({name:'jiu',isCard:true},target); - if(!player.storage.chunlao.length){ - player.unmarkSkill('chunlao'); - } - else{ - player.markSkill('chunlao'); - } - } - }, - ai:{ - order:6, - skillTagFilter:function(player){ - return player.storage.chunlao.length>0; - }, - save:true, - result:{ - target:3 - }, - threaten:1.6 - }, - }, - chunlao2_old:{ - trigger:{global:'dying'}, - //priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.storage.chunlao.length>0; - }, - direct:true, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.player); - player.chooseCardButton(get.prompt('chunlao',trigger.player),player.storage.chunlao).set('ai',function(button){ - if(_status.event.att>0) return 1; - return 0; - }).set('att',att); - "step 1" - if(result.bool){ - player.logSkill('chunlao',trigger.player); - player.$throw(result.links); - player.storage.chunlao.remove(result.links[0]); - result.links[0].discard(); - player.syncStorage('chunlao'); - trigger.player.useCard({name:'jiu',isCard:true},trigger.player); - if(!player.storage.chunlao.length){ - player.unmarkSkill('chunlao'); - } - else{ - player.markSkill('chunlao'); - } - } - }, - ai:{ - expose:0.2 - } - }, - shenduan:{ - trigger:{player:'loseAfter'}, - filter:function(event,player){ - if(event.type!='discard') return; - for(var i=0;i1?'中的一张牌':'')+'当做【兵粮寸断】对一名其他角色使用',function(card,player,target){ - var cs=_status.event.cards; - for(var i=0;i1?'中的一张牌':'')+'当做【兵粮寸断】对一名其他角色使用',function(card,player,target){ - var cs=_status.event.cards; - for(var i=0;i0; - }, - content:function(){ - 'step 0' - var att=get.attitude(player,trigger.player); - var nh=trigger.player.countCards('h'); - var eff=get.effect(trigger.player,{name:'sha',isCard:true},player,player); - if(!player.canUse({name:'sha',isCard:true},trigger.player,false)) eff=0; - player.discardPlayerCard(get.prompt('yonglve',trigger.player),trigger.player,'j').set('ai',function(button){ - var name=button.link.viewAs||button.link.name; - var att=_status.event.att; - var nh=_status.event.nh; - var eff=_status.event.eff; - var trigger=_status.event.getTrigger(); - if(att>0&&eff>=0) return 1; - if(att>=0&&eff>0) return 1; - if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ - if(name=='lebu'&&nh>trigger.player.hp) return 1; - if(name=='bingliang'&&nh0&&player.inRange(event.player); - }, - content:function(){ - 'step 0' - var att=get.attitude(player,trigger.player); - var nh=trigger.player.countCards('h'); - var eff=get.effect(trigger.player,{name:'sha',isCard:true},player,player); - if(!player.canUse({name:'sha',isCard:true},trigger.player)) eff=0; - player.discardPlayerCard(get.prompt('yonglve',trigger.player),trigger.player,'j').set('ai',function(button){ - var name=button.link.viewAs||button.link.name; - var att=_status.event.att; - var nh=_status.event.nh; - var eff=_status.event.eff; - var trigger=_status.event.getTrigger(); - if(att>0&&eff>=0) return 1; - if(att>=0&&eff>0) return 1; - if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ - if(name=='lebu'&&nh>trigger.player.hp) return 1; - if(name=='bingliang'&&nh0; - })){ - player.draw(); - } - }, - //group:'yonglve2' - }, - yonglve2:{ - trigger:{source:'damage'}, - forced:true, - popup:false, - filter:function(event){ - return event.parent.skill=='yonglve'; - }, - content:function(){ - player.storage.yonglve=true; - } - }, - benxi:{ - audio:2, - trigger:{player:'useCard2'}, - forced:true, - filter:function(event,player){ - return player.isPhaseUsing(); - }, - content:function(){}, - mod:{ - globalFrom:function(from,to,distance){ - if(_status.currentPhase==from){ - return distance-from.countUsed(); - } - }, - selectTarget:function(card,player,range){ - if(_status.currentPhase==player){ - if(card.name=='sha'&&range[1]!=-1){ - if(!game.hasPlayer(function(current){ - return get.distance(player,current)>1; - })){ - range[1]++; - } - } - } - } - }, - ai:{ - unequip:true, - skillTagFilter:function(player){ - if(game.hasPlayer(function(current){ - return get.distance(player,current)>1; - })){ - return false; - } - } - } - }, - sidi:{ - audio:2, - trigger:{global:'useCard'}, - filter:function(event,player){ - if(event.card.name!='shan') return false; - if(event.player==player) return true; - return _status.currentPhase==player; - }, - frequent:true, - init:function(player){ - if(!player.storage.sidi) player.storage.sidi=[]; - }, - intro:{ - content:'cards', - onunmark:'throw', - }, - content:function(){ - var card=game.cardsGotoSpecial(get.cards()).cards[0]; - game.log(player,'将',card,'置于武将牌上'); - player.$gain2(card); - player.storage.sidi.add(card); - player.markSkill('sidi'); - player.syncStorage('sidi'); - }, - group:'sidi2' - }, - sidi2:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - if(event.player==player||event.player.isDead()) return false; - if(!player.storage.sidi||!player.storage.sidi.length) return false; - return true; - }, - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - if(event.player.getEquip('zhuge')) return false; - if(event.player.hasSkill('paoxiao')) return false; - var players=game.filterPlayer(); - for(var i=0;i0) break; - } - if(i==players.length) return false; - var nh=event.player.countCards('h'); - var nsha=event.player.countCards('h','sha'); - if(nh<2) return false; - switch(nh){ - case 2: - if(nsha) return Math.random()<0.4; - return Math.random()<0.2; - case 3: - if(nsha) return Math.random()<0.8; - return Math.random()<0.3; - case 4: - if(nsha>1) return true; - if(nsha) return Math.random()<0.9; - return Math.random()<0.5; - default:return true; - } - }, - logTarget:'player', - content:function(){ - 'step 0' - if(player.storage.sidi.length==1){ - event.directbutton=player.storage.sidi[0]; - } - else{ - player.chooseCardButton('弃置一张“司敌”牌',player.storage.sidi,true); - } - 'step 1' - var button; - if(event.directbutton){ - button=event.directbutton; - } - else if(result.bool&&result.links&&result.links.length){ - button=result.links[0]; - } - if(button){ - player.$throw([button]); - game.log(player,'将',button,'置于弃牌堆'); - game.cardsDiscard(button); - trigger.player.addTempSkill('sidi3'); - trigger.player.addMark('sidi3',1,false); - player.storage.sidi.remove(button); - player.syncStorage('sidi'); - if(player.storage.sidi.length==0){ - player.unmarkSkill('sidi'); - } - else{ - player.markSkill('sidi'); - } - game.delayx(); - } - } - }, - sidi3:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num-player.countMark('sidi3'); - } - }, - onremove:true, - }, - zhongyong:{ - audio:2, - trigger:{player:'shaMiss'}, - direct:true, - filter:function(event,player){ - return event.responded&&get.itemtype(event.responded.cards)=='cards'; - }, - content:function(){ - "step 0" - var cards=trigger.responded.cards; - event.cards=cards; - player.chooseTarget('忠勇:将'+get.translation(trigger.responded.cards)+'交给一名角色',function(card,player,target){ - return target!=_status.event.source; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.countCards('h','shan')&&target.countCards('h')>=2){ - att/=1.5; - } - return att; - }).set('source',trigger.target); - "step 1" - if(result.bool){ - player.logSkill('zhongyong',result.targets); - result.targets[0].gain(event.cards,'gain2'); - if(result.targets[0]==player){ - event.finish(); - } - } - else{ - event.finish(); - } - "step 2" - player.chooseToUse('是否对'+get.translation(trigger.target)+'再使用一张杀?', - {name:'sha'},trigger.target,-1).set('addCount',false); - } - }, - xinzhongyong:{ - trigger:{player:'useCardAfter'}, - audio:'zhongyong', - direct:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - content:function(){ - "step 0" - event.sha=trigger.cards.slice(0).filterInD(); - event.shan=[]; - game.countPlayer2(function(current){ - current.getHistory('useCard',function(evt){ - if(evt.card.name=='shan'&&evt.getParent(3)==trigger) event.shan.addArray(evt.cards); - }); - }); - event.shan.filterInD('d'); - if(!event.sha.length&&!event.shan.length) event.finish(); - player.chooseTarget(get.prompt2('zhongyong'),function(card,player,target){ - return !_status.event.source.contains(target)&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('source',trigger.targets); - "step 1" - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xinzhongyong',target); - if(event.sha.length&&event.shan.length){ - player.chooseControl().set('choiceList',[ - '将'+get.translation(event.sha)+'交给'+get.translation(target), - '将'+get.translation(event.shan)+'交给'+get.translation(target), - ]).set('ai',function(){ - return _status.event.choice; - }).set('choice',function(){ - if(get.color(event.sha)!='black') return 0; - return 1; - }()); - } - else event._result={index:event.sha.length?0:1}; - } - else{ - event.finish(); - } - "step 2" - var cards=result.index==0?event.sha:event.shan; - event.useSha=false; - target.gain(cards,'gain2'); - for(var i=0;i0&&event.player.isPhaseUsing(); - }, - content:function(){ - 'step 0' - var go=false; - if(get.attitude(player,trigger.player)>0){ - if(get.color(trigger.card)=='red'){ - go=true; - } - else if(trigger.addCount===false) go=false; - else if(!trigger.player.hasSkill('paoxiao')&& - !trigger.player.hasSkill('tanlin3')&& - !trigger.player.hasSkill('zhaxiang2')&& - !trigger.player.hasSkill('fengnu')&& - !trigger.player.getEquip('zhuge')){ - var nh=trigger.player.countCards('h'); - if(player==trigger.player){ - go=(player.countCards('h','sha')>0); - } - else if(nh>=4){ - go=true; - } - else if(player.countCards('h','sha')){ - if(nh==3){ - go=Math.random()<0.8; - } - else if(nh==2){ - go=Math.random()<0.5; - } - } - else if(nh>=3){ - if(nh==3){ - go=Math.random()<0.5; - } - else if(nh==2){ - go=Math.random()<0.2; - } - } - } - } - var next=player.chooseToDiscard(get.prompt('longyin'),'弃置一张牌'+(get.color(trigger.card)=='red'?'并摸一张牌':'')+',令'+get.translation(trigger.player)+'本次使用的【杀】不计入使用次数','he'); - next.logSkill=['longyin',trigger.player]; - next.set('ai',function(card){ - if(_status.event.go){ - return 6-get.value(card); - } - return 0; - }); - next.set('go',go); - 'step 1' - if(result.bool){ - if(trigger.addCount!==false){ - trigger.addCount=false; - trigger.player.getStat().card.sha--; - } - if(get.color(trigger.card)=='red'){ - player.draw(); - } - // player.logSkill('longyin',trigger.player); - } - }, - ai:{ - expose:0.2 - } - }, - jigong:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - check:function(event,player){ - var nh=player.countCards('h')-player.countCards('h',{type:'equip'}); - if(nh<=1) return true; - if(player.countCards('h','tao')) return false; - if(nh<=2) return Math.random()<0.7; - if(nh<=3) return Math.random()<0.4; - return false; - }, - content:function(){ - player.draw(2); - player.addTempSkill('jigong2'); - } - }, - jigong2:{ - mod:{ - maxHandcardBase:function(player,num){ - var damage=player.getStat().damage; - if(typeof damage=='number') return damage; - return 0; - } - } - }, - shifei:{ - audio:2, - trigger:{player:['chooseToRespondBegin','chooseToUseBegin']}, - filter:function(event,player){ - if(!_status.currentPhase) return false; - if(event.responded) return false; - if(!event.filterCard({name:'shan'},player,event)) return false; - if(event.name!='chooseToUse'&&!lib.filter.cardRespondable({name:'shan'},player,event)) return false; - return true; - }, - check:function(event,player){ - if(get.attitude(player,_status.currentPhase)>0) return true; - var nh=_status.currentPhase.countCards('h')+1; - var players=game.filterPlayer(); - for(var i=0;inh){ - if(!player.hasShan()||get.attitude(player,players[i])<=0) return true; - } - } - return false; - }, - content:function(){ - 'step 0' - player.line(_status.currentPhase,'green'); - _status.currentPhase.draw(); - 'step 1' - if(_status.currentPhase.isMaxHandcard(true)){ - event.finish(); - return; - } - var targets=game.filterPlayer(function(current){ - return current.isMaxHandcard(); - }) - if(targets.length==1){ - event.onlytarget=targets[0]; - } - else if(targets.length){ - player.chooseTarget('选择一名角色弃置其一张牌',true,function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }).set('targets',targets); - } - else{ - event.finish(); - } - 'step 2' - var target; - if(event.onlytarget){ - target=event.onlytarget; - } - else if(result.targets&&result.targets.length){ - target=result.targets[0]; - } - if(target){ - player.line(target,'green'); - player.discardPlayerCard(target,'he',true); - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan',isCard:true}} - } - }, - ai:{ - respondShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0){ - var nh=player.countCards('h'); - var players=game.filterPlayer(); - for(var i=0;inh) return 0.4; - } - } - } - } - } - }, - huaiyi:{ - audio:2, - enable:'phaseUse', - usable:1, - delay:false, - filter:function(event,player){ - return player.countCards('h',{color:'red'})&&player.countCards('h',{color:'black'}); - }, - content:function(){ - 'step 0' - player.showHandcards(); - 'step 1' - player.chooseControl('红色','黑色').set('ai',function(){ - var player=_status.event.player; - if(player.countCards('h',{color:'red'})==1&& - player.countCards('h',{color:'black'})>1) return '红色'; - return '黑色'; - }); - 'step 2' - event.control=result.control; - var cards; - if(event.control=='红色'){ - cards=player.getCards('h',{color:'red'}); - } - else{ - cards=player.getCards('h',{color:'black'}); - } - player.discard(cards); - event.num=cards.length; - 'step 3' - player.chooseTarget('请选择至多'+get.cnNumber(event.num)+'名有牌的其他角色,获得这些角色的各一张手牌。',[1,event.num],function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)+0.5; - }); - 'step 4' - if(result.bool&&result.targets){ - player.line(result.targets,'green'); - event.targets=result.targets; - event.targets.sort(lib.sort.seat); - event.gained=0; - } - else{ - event.finish(); - } - 'step 5' - if(player.isAlive()&&event.targets.length){ - player.gainPlayerCard(event.targets.shift(),'he',true); - } - else event.finish(); - 'step 6' - if(result.bool){ - event.gained+=result.cards.length; - } - if(event.targets.length) event.goto(5); - 'step 7' - if(event.gained>1) player.loseHp(); - }, - ai:{ - order:function(item,player){ - if(player.countCards('h',{color:'red'})==1) return 10; - if(player.countCards('h',{color:'black'})==1) return 10; - return 1; - }, - result:{ - player:1 - } - } - }, - yaoming:{ - audio:2, - trigger:{player:'damageEnd',source:'damageSource'}, - direct:true, - filter:function(event,player){ - if(player.hasSkill('yaoming2')) return false; - var nh=player.countCards('h'); - return game.hasPlayer(function(current){ - return current.countCards('h')!=nh; - }); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - player.chooseTarget(get.prompt2('yaoming'),function(card,player,target){ - return _status.event.nh!=target.countCards('h'); - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.countCards('h')>_status.event.nh) return -att; - return att; - }).set('nh',nh); - 'step 1' - if(result.bool){ - player.logSkill('yaoming',result.targets); - player.addTempSkill('yaoming2'); - var target=result.targets[0]; - if(target.countCards('h')0; - }, - content:function(){ - 'step 0' - player.choosePlayerCard(target,'e',true); - 'step 1' - if(result.links){ - var num=0,players=game.filterPlayer(); - for(var i=0;inum2){ - player.draw(); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return 1; - if(target.getEquip(1)||target.getEquip(4)) return -1; - if(target.getEquip(2)) return -0.7; - return -0.5; - } - } - } - }, - reyanzhu:{ - enable:'phaseUse', - audio:'yanzhu', - usable:1, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - if(!target.countCards('e')) event._result={bool:false}; - else target.chooseCard('e','将一张装备区的牌交给'+get.translation(target)+',或令下一次受到的伤害+1。'); - 'step 1' - if(result.bool) player.gain(result.cards,'giveAuto',target); - else{ - target.addSkill('reyanzhu2'); - target.addMark('reyanzhu2',1,false); - } - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(target.countCards('e',function(card){ - return card.name!='tengjia'&&get.value(card)<=0 - })) return -0.5; - return -1.5; - }, - }, - }, - }, - reyanzhu2:{ - trigger:{player:'damageBegin3'}, - forced:true, - onremove:true, - content:function(){ - trigger.num+=player.countMark('reyanzhu2'); - game.log(player,'受到的伤害+'+player.countMark('reyanzhu2')); - player.removeSkill('reyanzhu2'); - }, - intro:{ - content:'下次受到的伤害+#', - }, - }, - rexingxue:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:'xingxue', - filter:function(event,player){ - return player.maxHp>0; - }, - content:function(){ - 'step 0' - player.chooseTarget([1,player.maxHp],get.prompt2('rexingxue')).set('ai',function(target){ - var att=get.attitude(player,target); - if(target.countCards('h')==target.hp-1) att*=2; - return att; - }); - 'step 1' - if(result.bool){ - event.targets=result.targets.sortBySeat(); - player.logSkill('rexingxue',event.targets); - game.asyncDraw(result.targets); - } - else event.finish(); - 'step 2' - game.delay(); - 'step 3' - if(event.targets.length){ - event.target=event.targets.shift(); - if(event.target.isDead()) event.redo(); - } - else event.finish(); - 'step 4' - if(target.isAlive()&&target.countCards('h')&&target.countCards('h')!=target.hp) target.chooseCard('he',true,'将一张牌置于牌堆顶'); - else event.goto(3); - 'step 5' - if(result&&result.cards){ - event.card=result.cards[0]; - target.lose(result.cards,ui.special); - game.log(target,'将',(get.position(event.card)=='h'?'一张牌':get.translation(event.card)),'置于牌堆顶'); - game.broadcastAll(function(player){ - var cardx=ui.create.card(); - cardx.classList.add('infohidden'); - cardx.classList.add('infoflip'); - player.$throw(cardx,1000,'nobroadcast'); - },target); - } - else{ - event.card=null; - } - 'step 6' - if(event.card){ - event.card.fix(); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - game.delay(); - } - event.goto(3); - }, - }, - rezhaofu:{ - unique:true, - global:'rezhaofu2', - zhuSkill:true - }, - rezhaofu2:{ - mod:{ - inRangeOf:function(from,to){ - if(from.group!='wu') return; - var players=game.filterPlayer(); - for(var i=0;i0&&target!=player; - }, - content:function(){ - 'step 0' - if(target.countCards('e')){ - target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'?').set('ai',function(){ - if(_status.event.player.countCards('e')>=3) return false; - return true; - }); - } - else{ - target.chooseToDiscard(true,'he'); - event.finish(); - } - 'step 1' - if(result.bool){ - var es=target.getCards('e'); - player.gain(es,target,'give'); - player.removeSkill('yanzhu'); - } - else{ - target.chooseToDiscard(true,'he'); - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - var ne=target.countCards('e'); - if(!ne) return -2; - if(ne>=2) return -ne; - return 0; - } - } - } - }, - shizhi:{ - mod:{ - cardname:function(card,player,name){ - if(card.name=='shan'&&player.hp==1) return 'sha'; - }, - }, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h','shan')) return false; - if(player.hp!=1) return false; - }, - respondSha:true, - }, - audio:2, - trigger:{player:['useCard1','respond']}, - firstDo:true, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&!event.skill&& - event.cards.length==1&&event.cards[0].name=='shan'; - }, - content:function(){}, - }, - wurong:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target.countCards('h')>0&&target!=player; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - "step 1" - var sendback=function(){ - if(_status.event!=event){ - return function(){ - event.resultOL=_status.event.resultOL; - }; - } - }; - if(player.isOnline()){ - player.wait(sendback); - event.ol=true; - player.send(function(){ - game.me.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - game.resume(); - }); - } - else{ - event.localPlayer=true; - player.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - } - if(target.isOnline()){ - target.wait(sendback); - event.ol=true; - target.send(function(){ - var rand=Math.random()<0.4; - game.me.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - game.resume(); - }); - } - else{ - event.localTarget=true; - } - "step 2" - if(event.localPlayer){ - event.card1=result.cards[0]; - } - if(event.localTarget){ - var rand=Math.random()<0.4; - target.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - } - "step 3" - if(event.localTarget){ - event.card2=result.cards[0]; - } - if(!event.resultOL&&event.ol){ - game.pause(); - } - "step 4" - try{ - if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; - if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; - if(!event.card1||!event.card2){ - throw('err'); - } - } - catch(e){ - console.log(e); - event.finish(); - return; - } - if(event.card2.number>=10||event.card2.number<=4){ - if(target.countCards('h')>2){ - event.addToAI=true; - } - } - game.broadcastAll(function(card1,card2){ - card1.classList.remove('glow'); - card2.classList.remove('glow'); - },event.card1,event.card2); - "step 5" - game.broadcastAll(function(){ - ui.arena.classList.add('thrownhighlight'); - }); - game.addVideo('thrownhighlight1'); - player.$compare(event.card1,target,event.card2); - game.delay(4); - "step 6" - game.log(player,'展示了',event.card1); - game.log(target,'展示了',event.card2); - var name1=get.name(event.card1); - var name2=get.name(event.card2); - if(name1=='sha'&&name2!='shan'){ - player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - target.damage('nocard'); - } - else if(name1!='sha'&&name2=='shan'){ - player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - player.gainPlayerCard(target,true,'he'); - } - else{ - player.$gain2(event.card1); - target.$gain2(event.card2); - } - game.broadcastAll(function(){ - ui.arena.classList.remove('thrownhighlight'); - }); - game.addVideo('thrownhighlight2'); - }, - ai:{ - order:6, - result:{ - target:-1, - } - } - }, - zhanjue:{ - audio:2, - enable:'phaseUse', - filterCard:true, - selectCard:-1, - filter:function(event,player){ - if(player.getStat().skill.zhanjue_draw&&player.getStat().skill.zhanjue_draw>=2) return false; - var hs=player.getCards('h'); - if(!hs.length) return false; - for(var i=0;i=3||target.countCards('h')>=3) return 'zeroplayertarget'; - if(player.countCards('h','tao')) return 'zeroplayertarget'; - if(target.countCards('h','sha')>1) return 'zeroplayertarget'; - } - } - } - } - }, - zhanjue2:{ - audio:false, - trigger:{player:'phaseBefore'}, - silent:true, - content:function(){ - player.storage.zhanjue=0; - } - }, - zhanjue3:{ - audio:false, - trigger:{player:'damageAfter',source:'damageAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.parent.skill=='zhanjue'; - }, - content:function(){ - trigger.player.addTempSkill('zhanjue5'); - } - }, - zhanjue4:{ - audio:false, - trigger:{player:'useCardAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='zhanjue'; - }, - content:function(){ - "step 0" - var stat=player.getStat().skill; - if(!stat.zhanjue_draw) stat.zhanjue_draw=0; - stat.zhanjue_draw++; - player.draw('nodelay'); - var list=game.filterPlayer(function(current){ - if(current.getHistory('damage',function(evt){ - return evt.card==trigger.card; - }).length>0){ - if(current==player){ - stat.zhanjue_draw++; - } - return true; - } - return false; - }); - if(list.length){ - list.sortBySeat(); - game.asyncDraw(list); - } - "step 1" - game.delay(); - } - }, - zhanjue5:{}, - qinwang:{ - audio:'qinwang1', - unique:true, - group:['qinwang1','qinwang2'], - zhuSkill:true, - subSkill:{ - ai:{} - } - }, - qinwang1:{ - audio:2, - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!player.hasZhuSkill('qinwang')) return false; - if(!player.countCards('he')) return false; - if(!event.filterCard({name:'sha'},player,event)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - direct:true, - content:function(){ - "step 0" - var yep=false; - if(!player.storage.jijianging&&!trigger.jijiang){ - var players=game.filterPlayer(); - for(var i=0;i2&&(nh>=3&&players[i].countCards('h','sha'))){ - yep=true;break; - } - } - } - var next=player.chooseToDiscard(get.prompt('qinwang'),'弃置一张牌并发动【激将】','he'); - next.set('ai',function(card){ - if(_status.event.yep) return 5-get.value(card); - return 0; - }); - next.set('yep',yep); - next.logSkill='qinwang' - "step 1" - if(!result.bool){ - event.finish(); - } - "step 2" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='shu'){ - player.storage.jijianging=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.sourcex)-2); - }); - next.set('sourcex',player); - next.set('jijiang',true); - next.noOrdering=true; - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 3" - player.storage.jijianging=false; - if(result.bool){ - event.finish(); - trigger.result=result; - trigger.responded=true; - trigger.animate=false; - event.current.draw(); - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(2); - } - } - }, - qinwang2:{ - audio:'qinwang1', - enable:'chooseToUse', - filter:function(event,player){ - if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; - if(!player.hasZhuSkill('qinwang')) return false; - if(!lib.filter.cardUsable({name:'sha'},player)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - filterCard:true, - position:'he', - check:function(card){ - var player=_status.event.player,players=game.filterPlayer(); - for(var i=0;i2&&(nh>=3&&players[i].countCards('h','sha'))){ - return 5-get.value(card); - } - } - return 0; - }, - filterTarget:function(card,player,target){ - if(_status.event._backup&& - typeof _status.event._backup.filterTarget=='function'&& - !_status.event._backup.filterTarget({name:'sha'},player,target)){ - return false; - } - return player.canUse({name:'sha'},target); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - player.addSkill('jijiang3'); - player.addTempSkill('qinwang_ai'); - event.getParent(2).step=0; - event.finish(); - } - else if(event.current.group=='shu'){ - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', - function(card,player,event){ - var evt=event||_status.event; - return card.name=='sha'&&evt.source.canUse(card,evt.target); - }); - next.set('ai',function(card){ - var event=_status.event; - return get.effect(event.target,card,event.source,event.player); - }); - next.set('source',player); - next.set('target',target); - next.set('jijiang',true); - next.noOrdering=true; - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - if(result.bool){ - event.finish(); - event.current.draw(); - if(result.cards&&result.cards.length){ - player.useCard({name:'sha',isCard:true},result.cards,target).animate=false; - } - else{ - player.useCard({name:'sha',isCard:true},target).animate=false; - } - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - }, - ai:{ - respondSha:true, - result:{ - target:function(player,target){ - if(player.hasSkill('jijiang3')) return 0; - if(player.hasSkill('qinwang_ai')) return 0; - return get.effect(target,{name:'sha'},player,target); - } - }, - order:function(){ - return get.order({name:'sha'})-0.1; - }, - } - }, - zuoding:{ - trigger:{global:'useCardToPlayered'}, - filter:function(event,player){ - if(event.getParent().triggeredTargets3.length>1) return false; - return get.suit(event.card)=='spade'&& - _status.currentPhase==event.player&&event.targets&&event.targets.length&& - event.player!=player&&game.countPlayer2(function(current){ - return current.getHistory('damage').length>0; - })==0; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zuoding'),'令一名目标角色摸一张牌',function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('targets',trigger.targets); - 'step 1' - if(result.bool){ - player.logSkill('zuoding',result.targets); - result.targets[0].draw(); - } - }, - ai:{ - expose:0.2 - }, - //group:'zuoding3' - }, - zuoding2:{}, - zuoding3:{ - trigger:{global:'damage'}, - silent:true, - content:function(){ - player.addTempSkill('zuoding2'); - } - }, - huomo:{ - audio:2, - group:['huomo_count','huomo_count2','huomo_use'] - }, - huomo2:{}, - huomo_count:{ - init:function(player){ - player.storage.huomo={}; - }, - trigger:{global:'phaseBefore'}, - silent:true, - content:function(){ - player.storage.huomo={}; - } - }, - huomo_count2:{ - trigger:{player:['useCard1']}, - silent:true, - firstDo:true, - filter:function(event){ - return get.type(event.card)=='basic'; - }, - content:function(){ - if(!player.storage.huomo) player.storage.huomo={}; - player.storage.huomo[trigger.card.name]=true; - } - }, - huomo_use:{ - enable:'chooseToUse', - filter:function(event,player){ - if(!player.storage.huomo) player.storage.huomo={}; - if((!player.storage.huomo.sha&&event.filterCard({name:'sha'},player,event))|| - (!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event))|| - (!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event))|| - (!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event))){ - return player.hasCard(function(card){ - return get.color(card)=='black'&&get.type(card)!='basic'; - },'he'); - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - if(!player.storage.huomo.sha&&event.filterCard({name:'sha'},player,event)){ - list.push(['基本','','sha']); - list.push(['基本','','sha','fire']); - list.push(['基本','','sha','thunder']); - } - if(!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event)){ - list.push(['基本','','tao']); - } - if(!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event)){ - list.push(['基本','','shan']); - } - if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)){ - list.push(['基本','','jiu']); - } - return ui.create.dialog('活墨',[list,'vcard'],'hidden'); - }, - check:function(button){ - var player=_status.event.player; - var card={name:button.link[2],nature:button.link[3]}; - if(game.hasPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0; - })){ - switch(button.link[2]){ - case 'tao':return 5; - case 'jiu':return 3.01; - case 'shan':return 3.01; - case 'sha': - if(button.link[3]=='fire') return 2.95; - else if(button.link[3]=='fire') return 2.92; - else return 2.9; - } - } - return 0; - }, - backup:function(links,player){ - return { - check:function(card){ - return 1/Math.max(0.1,get.value(card)); - }, - filterCard:function(card){ - return get.type(card)!='basic'&&get.color(card)=='black'; - }, - viewAs:{name:links[0][2],nature:links[0][3],suit:null,number:null,isCard:true}, - position:'he', - popname:true, - ignoreMod:true, - precontent:function(){ - 'step 0' - player.logSkill('huomo'); - var card=event.result.cards[0]; - event.card=card; - player.$throw(card,1000); - game.log(player,'将',card,'置于牌堆顶'); - event.result.card={name:event.result.card.name,nature:event.result.card.nature}; - event.result.cards=[]; - player.lose(card,ui.special,'visible'); - 'step 1' - game.delay(); - 'step 2' - event.card.fix(); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - game.updateRoundNumber(); - }, - } - }, - prompt:function(links,player){ - return '将一张黑色非基本牌置于牌堆顶并视为使用一张'+get.translation(links[0][3]||'')+get.translation(links[0][2]); - } - }, - ai:{ - order:function(){ - var player=_status.event.player; - var event=_status.event; - if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0){ - return 3.1; - } - return 2.9; - }, - save:true, - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag,arg){ - if(player.hasCard(function(card){ - return get.color(card)=='black'&&get.type(card)!='basic'; - },'he')){ - if(!player.storage.huomo) player.storage.huomo={}; - if(tag=='respondSha'){ - if(arg!='use') return false; - if(player.storage.huomo.sha) return false; - } - else if(tag=='respondShan'){ - if(player.storage.huomo.shan) return false; - } - else{ - if(player.storage.huomo.tao&&player.storage.huomo.jiu) return false; - } - } - else{ - return false; - } - }, - result:{ - player:1 - } - } - }, - taoxi:{ - audio:2, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.targets.length==1&& - event.target.countCards('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - intro:{ - content:'card' - }, - content:function(){ - var card=trigger.target.getCards('h').randomGet(); - player.showCards([card]); - player.storage.taoxi=card; - player.storage.taoxi2=trigger.target; - player.syncStorage('taoxi'); - player.markSkill('taoxi'); - player.addTempSkill('taoxi4'); - }, - group:['taoxi2','taoxi3'] - }, - taoxi2:{ - audio:false, - enable:'phaseUse', - filter:function(event,player){ - if(player.storage.taoxi&&player.storage.taoxi2&& - get.owner(player.storage.taoxi)==player.storage.taoxi2&& - lib.filter.filterCard(player.storage.taoxi,player,event)){ - return true; - } - return false; - }, - filterTarget:function(card,player,target){ - return player.canUse(player.storage.taoxi,target); - }, - selectTarget:function(){ - var info=get.info(_status.event.player.storage.taoxi); - if(info.notarget) return -1; - return get.select(info.selectTarget); - }, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - var card=player.storage.taoxi; - if(!card){ - event.finish(); - return; - } - var owner=get.owner(card); - if(owner){ - owner.lose(card,ui.special); - } - event.card=card; - player.$throw(card); - 'step 1' - player.useCard(event.card,targets).animate=false; - delete player.storage.taoxi; - delete player.storage.taoxi2; - player.unmarkSkill('taoxi'); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - return get.effect(target,player.storage.taoxi,player,target); - }, - player:1 - } - } - }, - taoxi3:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.taoxi?true:false; - }, - content:function(){ - if(get.owner(player.storage.taoxi)==player.storage.taoxi2){ - player.loseHp(); - } - delete player.storage.taoxi; - delete player.storage.taoxi2; - player.unmarkSkill('taoxi'); - } - }, - taoxi4:{}, - xingshuai:{ - skillAnimation:true, - animationColor:'thunder', - audio:2, - trigger:{player:'dying'}, - //priority:6, - zhuSkill:true, - filter:function(event,player){ - if(player.storage.xingshuai) return false; - if(player.hp>0) return false; - if(!player.hasZhuSkill('xingshuai')) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='wei'; - }); - }, - init:function(player){ - if(player.hasZhuSkill('xingshuai')){ - player.markSkill('xingshuai'); - player.storage.xingshuai=false; - } - }, - intro:{ - content:'limited' - }, - unique:true, - limited:true, - mark:false, - content:function(){ - 'step 0' - player.storage.xingshuai=true; - player.awakenSkill('xingshuai'); - var targets=game.filterPlayer(); - targets.remove(player); - event.targets=targets; - event.damages=[]; - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - if(current.group=='wei'){ - current.chooseBool('是否令'+get.translation(player)+'回复一点体力?').set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)>2; - }).set('target',player); - event.current=current; - } - else{ - event.redo(); - } - } - else{ - event.goto(3); - } - 'step 2' - if(result.bool){ - event.damages.push(event.current); - event.current.line(player,'green'); - game.log(event.current,'令',player,'回复一点体力'); - player.recover(); - } - if(event.targets.length){ - event.goto(1); - } - 'step 3' - if(event.damages.length){ - var next=game.createEvent('xingshuaI_next'); - event.next.remove(next); - trigger.after.push(next); - next.targets=event.damages; - next.setContent(function(){ - targets.shift().damage(); - if(targets.length) event.redo(); - }); - } - } - }, - mingjian:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - selectCard:-1, - discard:false, - lose:false, - delay:false, - content:function(){ - target.gain(cards,player,'giveAuto'); - target.addTempSkill('mingjian2',{player:'phaseAfter'}); - target.storage.mingjian2++; - target.updateMarks('mingjian2'); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - if(player.countCards('h')==player.countCards('h','du')) return -1; - if(target.hasJudge('lebu')) return 0; - if(get.attitude(player,target)>3){ - var basis=get.threaten(target); - if(player==get.zhu(player)&&player.hp<=2&&player.countCards('h','shan')&&!game.hasPlayer(function(current){ - return get.attitude(current,player)>3&¤t.countCards('h','tao')>0; - })) return 0; - if(target.countCards('h')+player.countCards('h')>target.hp+2) return basis*0.8; - return basis; - } - return 0; - } - } - } - }, - mingjian2:{ - charlotte:true, - mark:true, - intro:{ - content:'手牌上限+#,出杀次数+#' - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=0; - }, - onremove:true, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.mingjian2; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.storage.mingjian2; - } - }, - }, - mingjian_old:{ - audio:2, - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - var go=Math.random()<0.5; - player.chooseTarget(get.prompt('mingjian_old'),function(card,player,target){ - return player!=target - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>3){ - if(player.countCards('h')>player.hp) return att; - if(go) return att; - } - return 0; - } - 'step 1' - if(result.bool){ - player.logSkill('mingjian_old',result.targets); - trigger.cancel(); - var target=result.targets[0]; - target.addSkill('mingjian2_old'); - var hs=player.getCards('h'); - target.gain(hs,player); - player.$give(hs.length,target); - } - } - }, - mingjian2_old:{ - audio:false, - trigger:{global:'phaseAfter'}, - forced:true, - popup:false, - charlotte:true, - content:function(){ - if(lib.config.glow_phase){ - if(_status.currentPhase){ - _status.currentPhase.classList.remove('glow_phase'); - } - player.classList.add('glow_phase'); - } - game.addVideo('phaseChange',player); - _status.currentPhase=player; - player.ai.tempIgnore=[]; - player.stat.push({card:{},skill:{}}); - player.phaseUse(); - player.removeSkill('mingjian2_old'); - } - }, - huituo:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('huituo')).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0){ - return get.recoverEffect(target,player,player)+1; - } - return 0; - }); - 'step 1' - if(result.bool){ - player.logSkill('huituo',result.targets); - var target=result.targets[0]; - event.target=target; - target.judge(function(card){ - if(target.hp==target.maxHp){ - if(get.color(card)=='red') return -1; - } - if(get.color(card)=='red') return 1; - return 0; - }); - } - else{ - event.finish(); - } - 'step 2' - if(result.color){ - if(result.color=='red'){ - if(event.target.hp0&&event.source&& - event.card&&event.card.name=='sha'; - }, - direct:true, - //priority:5, - audio:2, - content:function(){ - 'step 0' - var prompt='弃置一张牌' - if(trigger.source.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.source)+'装备区中的'+get.translation(trigger.source.getEquip(1))); - var next=player.chooseToDiscard('he',get.prompt('duodao',trigger.source),prompt); - next.logSkill=['duodao',trigger.source]; - next.set('ai',function(card){ - if(!_status.event.getTrigger().source.getEquip(1)) return 0; - if(get.attitude(_status.event.player,_status.event.getTrigger().source)<=0){ - return 6-get.value(card); - } - return 0; - }); - 'step 1' - if(result.bool&&trigger.source.getEquip(1)){ - player.gain(trigger.source.getEquip(1),trigger.source,'give','bySelf'); - } - }, - ai:{ - maixie_defend:true, - } - }, - reanjian:{ - trigger:{player:'useCardToPlayered'}, - forced:true, - audio:'anjian', - filter:function(event,player){ - return event.card.name=='sha'&&!event.target.inRange(player); - }, - logTarget:'target', - content:function(){ - trigger.getParent().reanjian_buffed=true; - var map=trigger.customArgs; - var id=trigger.target.playerid; - if(!map[id]) map[id]={}; - if(!map[id].extraDamage) map[id].extraDamage=0; - map[id].extraDamage++; - trigger.target.addTempSkill('reanjian2'); - trigger.target.addTempSkill('reanjian4'); - trigger.target.storage.reanjian2.add(trigger.card); - }, - ai:{ - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha'&&arg.target&&!arg.target.inRange(player)) return true; - return false; - } - }, - }, - reanjian2:{ - firstDo:true, - ai:{unequip2:true}, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - onremove:true, - trigger:{ - player:['damage','damageCancelled','damageZero'], - target:['shaMiss','useCardToExcluded'], - }, - charlotte:true, - filter:function(event,player){ - return player.storage.reanjian2&&event.card&&player.storage.reanjian2.contains(event.card); - }, - silent:true, - forced:true, - popup:false, - priority:12, - content:function(){ - player.storage.reanjian2.remove(trigger.card); - if(!player.storage.reanjian2.length) player.removeSkill('reanjian2'); - }, - }, - reanjian3:{ - mod:{ - cardSavable:function(card){ - if(card.name=='tao') return false; - }, - }, - }, - reanjian4:{ - trigger:{player:'dyingBegin'}, - forced:true, - silent:true, - firstDo:true, - filter:function(event,player){ - return event.getParent(2).reanjian_buffed=true; - }, - content:function(){ - player.addTempSkill('reanjian3',{global:['dyingEnd','phaseEnd']}); - }, - }, - reduodao:{ - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - return event.card.name=='sha'&&(get.color(event.card)=='red'?event.player.getEquip(1):player.countCards('he')>0); - }, - direct:true, - audio:'duodao', - content:function(){ - 'step 0' - if(get.color(trigger.card)!='red'){ - var prompt='弃置一张牌' - if(trigger.player.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.player)+'装备区中的'+get.translation(trigger.player.getEquip(1))); - var next=player.chooseToDiscard('he',get.prompt('reduodao',trigger.player),prompt); - next.logSkill=['reduodao',trigger.player]; - next.set('ai',function(card){ - if(!_status.event.getTrigger().player.getEquip(1)) return 0; - if(get.attitude(_status.event.player,_status.event.getTrigger().player)*get.value(_status.event.getTrigger().player.getEquip(1))<=0){ - return 6-get.value(card); - } - return 0; - }); - } - else{ - player.chooseBool('是否发动夺刀】,获得'+get.translation(trigger.player)+'装备区的'+get.translation(trigger.player.getEquip(1))+'?').set('ai',function(){ - var player=_status.event.player; - var source=_status.event.getTrigger().player; - return get.attitude(player,source)*get.value(source.getEquip(1))<=0; - }); - } - 'step 1' - if(result.bool&&trigger.player.getEquip(1)){ - if(!result.cards||!result.cards.length) player.logSkill('reduodao',trigger.player); - player.gain(trigger.player.getEquip(1),trigger.player,'give','bySelf'); - } - }, - }, - anjian:{ - audio:2, - trigger:{source:'damageBegin1'}, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - forced:true, - filter:function(event,player){ - return event.getParent().name=='sha'&&!event.player.inRange(player); - }, - content:function(){ - trigger.num++; - } - }, - xinpojun:{ - shaRelated:true, - trigger:{player:'useCardToPlayered'}, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&player.isPhaseUsing()&&event.target.hp>0&&event.target.countCards('he')>0; - }, - audio:2, - content:function(){ - 'step 0' - player.choosePlayerCard(trigger.target,'he', - [1,Math.min(trigger.target.countCards('he'),trigger.target.hp)],get.prompt('xinpojun',trigger.target)); - 'step 1' - if(result.bool&&result.links.length){ - player.logSkill('xinpojun',trigger.target); - if(trigger.target.storage.xinpojun2){ - trigger.target.storage.xinpojun2=trigger.target.storage.xinpojun2.concat(result.links); - } - else{ - trigger.target.storage.xinpojun2=result.links.slice(0); - } - game.addVideo('storage',trigger.target,['xinpojun2',get.cardsInfo(trigger.target.storage.xinpojun2),'cards']); - trigger.target.addSkill('xinpojun2'); - trigger.target.lose(result.links,ui.special,'toStorage'); - } - }, - ai:{ - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; - return false; - } - }, - }, - xinpojun2:{ - trigger:{global:'phaseEnd'}, - forced:true, - audio:false, - mark:true, - intro:{ - content:'cardCount', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - content:function(){ - if(player.storage.xinpojun2){ - player.gain(player.storage.xinpojun2,'fromStorage'); - delete player.storage.xinpojun2; - } - player.removeSkill('xinpojun2'); - }, - //group:'xinpojun3' - }, - xinpojun3:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - player.$throw(player.storage.xinpojun2,1000); - for(var i=0;i=0; - }, - //priority:-5, - logTarget:'player', - content:function(){ - game.asyncDraw([trigger.player,player]); - }, - ai:{ - expose:0.1 - } - }, - yanyu:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - filterCard:{name:'sha'}, - prepare:function(cards,player){ - player.$throw(cards,1000); - game.log(player,'将',cards,'置入了弃牌堆'); - }, - discard:false, - loseTo:'discardPile', - visible:true, - delay:0.5, - content:function(){ - player.draw(); - }, - ai:{ - basic:{ - order:1 - }, - result:{ - player:1, - }, - }, - group:'yanyu2' - }, - yanyu2:{ - trigger:{player:'phaseUseEnd'}, - direct:true, - filter:function(event,player){ - return player.getStat().skill.yanyu>=2; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('yanyu'),'令一名男性角色摸两张牌',function(card,player,target){ - return target.sex=='male'&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('yanyu',result.targets); - result.targets[0].draw(2); - } - } - }, - youdi:{ - audio:true, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('youdi'),function(card,player,target){ - return player!=target; - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - if(target.countCards('he')==0) return 0; - return -get.attitude(_status.event.player,target); - }).set('goon',player.countCards('h','sha')<=player.countCards('h')/3); - "step 1" - if(result.bool){ - game.delay(); - player.logSkill('youdi',result.targets); - event.target=result.targets[0]; - event.target.discardPlayerCard(player,'he',true); - } - else{ - event.finish(); - } - "step 2" - if(result.links[0].name!='sha'&&event.target.countCards('he')){ - player.gainPlayerCard('he',event.target,true); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - fuhun:{ - enable:['chooseToUse','chooseToRespond'], - filterCard:true, - selectCard:2, - position:'h', - audio:2, - derivation:['new_rewusheng','olpaoxiao'], - viewAs:{name:'sha'}, - prompt:'将两张手牌当杀使用或打出', - check:function(card){ - if(_status.event.player.hasSkill('new_rewusheng')&&get.color(card)=='red') return 0; - if(_status.event.name=='chooseToRespond'){ - if(card.name=='sha') return 0; - return 6-get.useful(card); - } - if(_status.event.player.countCards('h')<4) return 6-get.useful(card); - return 7-get.useful(card); - }, - ai:{ - respondSha:true, - order:function(item,player){ - if(player.hasSkill('new_rewusheng')&&player.hasSkill('olpaoxiao')){ - return 1; - } - if(player.countCards('h')<4){ - return 1; - } - return 4; - }, - }, - group:'fuhun2' - }, - fuhun2:{ - trigger:{source:'damageSource'}, - forced:true, - filter:function(event,player){ - if(player.hasSkill('fuhun3')) return false; - return event.getParent().skill=='fuhun'; - }, - content:function(){ - player.addTempSkill('new_rewusheng'); - player.addTempSkill('olpaoxiao'); - player.addTempSkill('fuhun3'); - } - }, - fuhun3:{}, - fencheng:{ - skillAnimation:'epic', - animationColor:'gray', - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.fencheng; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - unique:true, - limited:true, - selectTarget:-1, - mark:true, - line:'fire', - content:function(){ - "step 0" - player.storage.fencheng=true; - player.awakenSkill('fencheng'); - var res=get.damageEffect(target,player,target,'fire'); - var num=Math.max(1,target.countCards('e')); - target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌或受到1点火焰伤害').set('ai',function(card){ - var res=_status.event.res; - var num=_status.event.num; - var player=_status.event.player; - if(res>=0) return -1; - if(num>2&&player.hp>1) return -1; - if(num>1&&player.hp>2) return -1; - if(get.position(card)=='e'){ - return 10-get.value(card); - } - return 6-get.value(card); - }).set('res',res).set('num',num); - "step 1" - if(!result.bool){ - target.damage('fire'); - } - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0,players=game.filterPlayer(); - for(var i=0;i0){ - num-=Math.max(1,players[i].countCards('e')); - } - else if(att<0){ - num+=Math.max(1,players[i].countCards('e')); - } - } - } - if(players.length<5){ - return num-1; - } - else{ - return num-2; - } - } - } - }, - init:function(player){ - player.storage.fencheng=false; - }, - intro:{ - content:'limited' - } - }, - mieji:{ - trigger:{player:'useCard2'}, - direct:true, - audio:2, - filter:function(event,player){ - return event.targets.length==1&&get.type(event.card)=='trick'&&get.color(event.card)=='black'; - }, - position:'he', - content:function(){ - "step 0" - player.chooseTarget(get.prompt('mieji'),'为'+get.translation(trigger.card)+'增加一个额外目标',function(card,player,target){ - var trigger=_status.event; - return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0]; - }).set('autodelay',true).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }).set('targets',trigger.targets).set('card',trigger.card); - "step 1" - if(result.bool){ - trigger.targets.push(result.targets[0]); - player.logSkill('mieji',result.targets); - } - } - }, - junxing:{ - enable:'phaseUse', - audio:2, - usable:1, - filterCard:true, - selectCard:[1,Infinity], - filter:function(event,player){ - return player.countCards('h')>0; - }, - check:function(card){ - if(ui.selected.cards.length) return -1; - var val=get.value(card); - if(get.type(card)=='basic') return 8-get.value(card); - return 5-get.value(card); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - "step 0" - var types=[]; - for(var i=0;i0; - }, - filter:function(event,player){ - if(event.player.countCards('h')) return false; - if(_status.currentPhase!=player) return false; - if(event.player==player) return false; - return event.hs&&event.hs.length>0; - }, - content:function(){ - player.line(trigger.player,'green'); - trigger.player.damage(); - }, - ai:{ - threaten:1.1 - } - }, - jiefan:{ - skillAnimation:true, - animationColor:'wood', - audio:2, - audioname:['re_handang'], - unique:true, - limited:true, - mark:true, - init:function(player){ - player.storage.jiefan=false; - }, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.jiefan; - }, - intro:{ - content:'limited' - }, - filterTarget:true, - content:function(){ - "step 0" - player.awakenSkill('jiefan'); - player.storage.jiefan=true; - event.players=game.filterPlayer(function(current){ - return current!=target&¤t.inRange(target); - }); - event.players.sortBySeat(target); - "step 1" - if(event.players.length){ - event.current=event.players.shift(); - event.current.animate('target'); - player.line(event.current,'green'); - if(event.current.countCards('he')&&target.isAlive()){ - event.current.chooseToDiscard({subtype:'equip1'},'he','弃置一张武器牌或让'+ - get.translation(target)+'摸一张牌').set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.target)<0) return 7-get.value(card); - return -1; - }).set('target',target); - event.tempbool=false; - } - else{ - event.tempbool=true; - } - } - else{ - event.finish(); - } - "step 2" - if(event.tempbool||result.bool==false){ - target.draw(); - } - event.goto(1); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(player.hp>2){ - if(game.phaseNumber0&&event.player.countCards('j')) return true; - if(event.num>1){ - if(att<0) return false; - if(att>0) return true; - } - var cards=event.player.getGainableCards(player,'e'); - for(var i=0;i=6) return true; - } - return false; - }, - filter:function(event,player){ - return player!=event.player; - }, - logTarget:'player', - content:function(){ - if(trigger.player.countGainableCards(player,'ej')){ - player.gainPlayerCard(trigger.player,'ej',true); - } - trigger.cancel(); - } - }, - sanyao:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.isMaxHp(); - }, - filter:function(event,player){ - return player.countCards('he')>0; - }, - check:function(card){return 7-get.value(card);}, - position:'he', - filterCard:true, - content:function(){ - target.damage('nocard'); - }, - ai:{ - result:{ - target:function(player,target){ - if(target.countCards('j')&&get.attitude(player,target)>0){ - return 1; - } - if(target.countCards('e')){ - return -1; - } - return get.damageEffect(target,player); - }, - }, - order:7 - } - }, - olsanyao:{ - enable:'phaseUse', - audio:'sanyao', - filter:function(event,player){ - return player.countCards('he')>0&&(!player.hasSkill('olsanyao0')||!player.hasSkill('olsanyao1')); - }, - chooseButton:{ - dialog:function(event,player){ - var list=[ - '选择手牌数最多的一名角色', - '选择体力值最大的一名角色', - ]; - var choiceList=ui.create.dialog('散谣:请选择一项','forcebutton','hidden'); - for(var i=0;inum; - })&&get.effect(target,'sanyao',player,player)>0; - }, - function(target){ - var num=target.hp; - return !game.hasPlayer(function(current){ - return current!=target&¤t.hp>num; - })&&get.effect(target,'sanyao',player,player)>0; - }, - ][button.link])) return 1+button.link; - return 0; - }, - backup:function(links){ - return { - audio:'sanyao', - filterTarget:[ - function(card,player,target){ - var num=target.countCards('h'); - return !game.hasPlayer(function(current){ - return current!=target&¤t.countCards('h')>num; - }); - }, - function(card,player,target){ - return !game.hasPlayer(function(current){ - return current!=target&¤t.hp>target.hp; - }); - } - ][links[0]], - index:links[0], - filterCard:true, - check:function(card){ - return 7-get.value(card); - }, - position:'he', - content:function(){ - player.addTempSkill('olsanyao'+lib.skill[event.name].index) - target.damage('nocard'); - }, - ai:lib.skill.sanyao.ai, - } - }, - prompt:function(){ - return '请选择【散谣】的目标' - }, - }, - ai:{ - order:7, - result:{ - player:1, - }, - }, - }, - olsanyao0:{}, - olsanyao1:{}, - rezhiman:{ - audio:'zhiman', - audioname:['guansuo'], - trigger:{source:'damageBegin2'}, - check:function(event,player){ - if(get.damageEffect(event.player,player,player)<0) return true; - var att=get.attitude(player,event.player); - if(att>0&&event.player.countCards('j')) return true; - if(event.num>1){ - if(att<0) return false; - if(att>0) return true; - } - var cards=event.player.getGainableCards(player,'he'); - for(var i=0;i=6) return true; - } - return false; - }, - logTarget:'player', - content:function(){ - if(trigger.player.countGainableCards(player,'hej')){ - player.gainPlayerCard(trigger.player,'hej',true); - } - trigger.cancel(); - } - }, - resanyao:{ - audio:'sanyao', - enable:'phaseUse', - usable:1, - selectCard:function(){ - var player=_status.event.player; - return [Math.max(1,ui.selected.targets.length),game.countPlayer(function(target){ - return target!=player&&!game.hasPlayer(function(current){ - return current!=player&¤t.hp>target.hp - }); - })]; - }, - selectTarget:function(){ - return ui.selected.cards.length; - }, - filterTarget:function(card,player,target){ - return target!=player&&!game.hasPlayer(function(current){ - return current!=player&¤t.hp>target.hp - }); - }, - check:function(card){ - var player=_status.event.player; - if(game.countPlayer(function(target){ - return target!=player&&!game.hasPlayer(function(current){ - return current!=player&¤t.hp>target.hp - })&&get.effect(target,'sanyao',player,player)>0; - })<=ui.selected.cards.length) return 0; - return 7-get.value(card); - }, - position:'he', - filterCard:true, - content:function(){ - target.damage('nocard'); - }, - ai:{ - result:{ - target:function(player,target){ - var disbool=false; - if(player.hasSkill('rezhiman')){ - if(target.countCards('j')&&get.attitude(player,target)>0){ - return 1; - } - if(target.countCards('he',function(card){ - return card.name=='tengjia'||get.value(card)>0; - })){ - disbool=true; - } - } - var damage=get.damageEffect(target,player); - if(disbool&&get.attitude(player,target)<0) return Math.min(-1,damage); - return damage; - }, - }, - order:7 - } - }, - reqiaoshui:{ - audio:'qiaoshui', - enable:'phaseUse', - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool) player.addTempSkill('qiaoshui3','phaseUseEnd'); - else{ - player.addTempSkill('qiaoshui4'); - event.getParent(3).skipped=true; - } - }, - ai:{ - order:10, - result:{ - target:function (player,target){ - if(player.hasSkill('qiaoshui3')) return 0; - var nd=!player.needsToDiscard(); - if(player.hasCard(function(card){ - if(get.position(card)!="h") return false; - var val=get.value(card) - if(nd&&val<0) return true; - if(val<=5){ - return card.number>=12; - } - if(val<=6){ - return card.number>=13; - } - return false; - })) return -1; - return 0; - }, - }, - }, - }, - qiaoshui:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('qiaoshui'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)/target.countCards('h'); - }); - "step 1" - if(result.bool){ - player.logSkill('qiaoshui',result.targets[0]); - player.chooseToCompare(result.targets[0]); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.addTempSkill('qiaoshui3'); - } - else{ - player.addTempSkill('qiaoshui2'); - } - }, - ai:{ - expose:0.1 - } - }, - qiaoshui2:{ - mod:{ - cardEnabled:function(card){ - if(get.type(card,'trick')=='trick') return false; - } - } - }, - qiaoshui3:{ - trigger:{player:'useCard2'}, - direct:true, - filter:function(event,player){ - var type=get.type(event.card); - return type=='basic'||type=='trick'; - }, - content:function(){ - 'step 0' - player.removeSkill('qiaoshui3'); - var goon=false; - var info=get.info(trigger.card); - if(trigger.targets&&!info.multitarget){ - var players=game.filterPlayer(); - for(var i=0;i1){ - event.goto(3); - } - } - 'step 1' - if(result.bool){ - if(!event.isMine()) game.delayx(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - if(event.target){ - player.logSkill('qiaoshui',event.target); - trigger.targets.add(event.target); - } - event.finish(); - 'step 3' - player.chooseTarget('巧说:是否减少一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - }).set('targets',trigger.targets); - 'step 4' - if(result.bool){ - event.targets=result.targets; - if(event.isMine()){ - player.logSkill('qiaoshui',event.targets); - event.finish(); - } - for(var i=0;i1) return false; - return event.card&&get.type(event.card)=='trick'&&event.player!=player; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:function(card,player,target){ - if(get.type(card)=='trick') return [1,1]; - }, - } - }, - shenxing:{ - audio:2, - enable:'phaseUse', - position:'he', - filterCard:true, - selectCard:2, - prompt:'弃置两张牌并摸一张牌', - check:function(card){return 4-get.useful(card)}, - content:function(){ - player.draw(); - }, - ai:{ - order:1, - result:{ - player:1 - }, - }, - }, - bingyi:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterx:function(event,player){ - var cards=player.getCards('h'); - if(cards.length<1) return false; - var color=get.color(cards[0]); - for(var i=1;i=2) return false; - if(player.hp==1) return false; - if(player.hp==2&&player.countCards('h')<2) return false; - if(event.player.countCards('h')>=event.player.hp) return false; - return true; - }, - content:function(){ - "step 0" - player.draw(2); - "step 1" - player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){ - if(ui.selected.cards.length&&card.name==ui.selected.cards[0].name) return -1; - if(get.tag(card,'damage')) return 1; - if(get.type(card)=='equip') return 1; - return 0; - }); - "step 2" - trigger.player.gain(result.cards,player,'giveAuto'); - trigger.player.addSkill('xiantu4'); - trigger.player.storage.xiantu4.push(player); - }, - ai:{ - threaten:1.1, - expose:0.3 - } - }, - xiantu1:{audio:true}, - xiantu2:{audio:true}, - xiantu4:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - audio:false, - onremove:true, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - charlotte:true, - content:function(){ - while(player.storage.xiantu4.length){ - var current=player.storage.xiantu4.shift(); - if(current.isDead()) continue; - current.logSkill('xiantu2'); - current.loseHp(); - } - player.removeSkill('xiantu4'); - }, - group:'xiantu3' - }, - xiantu3:{ - trigger:{source:'dieAfter'}, - forced:true, - audio:false, - content:function(){ - player.removeSkill('xiantu4'); - } - }, - qiangzhi:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('qiangzhi'),function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }).set('ai',function(){ - return Math.random(); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('qiangzhi',target); - var card=target.getCards('h').randomGet(); - player.showCards(card); - player.storage.qiangzhi=get.type(card,'trick'); - game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]); - player.markSkill('qiangzhi'); - } - }, - intro:{ - content:function(type){ - return get.translation(type)+'牌'; - } - }, - group:['qiangzhi2','qiangzhi3'], - ai:{ - order:11, - result:{ - player:1 - } - } - }, - qiangzhi2:{ - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - // return (get.type(event.card,'trick')==player.storage.qiangzhi&&event.cards[0]&&event.cards[0]==event.card); - return get.type(event.card,'trick')==player.storage.qiangzhi; - }, - content:function(){ - player.draw(); - }, - ai:{ - threaten:1.4 - } - }, - qiangzhi3:{ - trigger:{player:'phaseUseEnd'}, - silent:true, - content:function(){ - delete player.storage.qiangzhi; - player.unmarkSkill('qiangzhi'); - } - }, - dingpin:{ - group:['dingpin3','dingpin4'], - enable:'phaseUse', - //usable:3, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target.hp0; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - expose:0.2 - } - }, - jiaojin:{ - audio:2, - trigger:{player:'damageBegin3'}, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male'; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令伤害-1?',function(card,player){ - return get.type(card)=='equip'; - }); - next.set('ai',function(card){ - var player=_status.event.player; - if(player.hp==1||_status.event.getTrigger().num>1){ - return 9-get.value(card); - } - if(player.hp==2){ - return 8-get.value(card); - } - return 7-get.value(card); - }); - next.logSkill='jiaojin'; - "step 1" - if(result.bool){ - game.delay(0.5); - trigger.num--; - } - } - }, - chanhui:{ - audio:2, - trigger:{player:'useCardToPlayer'}, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - if(player.hasSkill('chanhui2')) return false; - if(event.targets.length>1) return false; - var card=event.card; - if(card.name=='sha') return true; - if(get.color(card)=='black'&&get.type(card)=='trick') return true; - return false; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('chanhui'),function(card,player,target){ - if(player==target) return false; - var trigger=_status.event; - return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false; - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player)+0.01; - }).set('targets',trigger.targets).set('card',trigger.card); - "step 1" - if(result.bool){ - game.delay(0,200); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - game.delay(); - player.addSkill('chanhui2'); - player.logSkill('chanhui',event.target); - event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ - get.translation(trigger.card)+'的额外目标').set('ai',function(card){ - return 5-get.value(card); - }); - "step 3" - if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); - trigger.untrigger(); - trigger.getParent().player=event.target; - game.log(event.target,'成为了',trigger.card,'的使用者'); - } - else{ - game.log(event.target,'成为了',trigger.card,'的额外目标'); - trigger.getParent().targets.push(event.target); - } - } - }, - rechanhui:{ - audio:'chanhui', - trigger:{player:'useCardToPlayer'}, - filter:function(event,player){ - if(_status.currentPhase!=player||player.hasSkill('rechanhui2')) return false; - if(event.targets.length>1) return false; - var card=event.card; - if(card.name=='sha'||get.type(card)=='trick'&&get.color(card)=='black') return true; - return false; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('rechanhui'),function(card,player,target){ - if(player==target) return false; - var trigger=_status.event; - return player.canUse(trigger.card,target,false)&&trigger.targets.contains(target)==false; - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player)+0.01; - }).set('targets',trigger.targets).set('card',trigger.card); - "step 1" - if(result.bool){ - //game.delay(0,200); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - player.logSkill('rechanhui',event.target); - event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ - get.translation(trigger.card)+'的额外目标').set('ai',function(card){ - return 5-get.value(card); - }); - "step 3" - if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); - trigger.untrigger(); - trigger.getParent().player=event.target; - game.log(event.target,'成为了',trigger.card,'的使用者'); - } - else{ - game.log(event.target,'成为了',trigger.card,'的额外目标'); - trigger.getParent().targets.push(event.target); - player.addTempSkill('rechanhui2'); - } - } - }, - rechanhui2:{}, - rejiaojin:{ - audio:'jiaojin', - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - return (event.card.name=='sha'||get.type(event.card)=='trick')&&event.player&&event.player.sex=='male'&&player.countCards('he',function(card){ - return _status.connectMode||get.type(card)=='equip'; - }); - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令'+get.translation(trigger.card)+'对你无效?',function(card,player){ - return get.type(card)=='equip'; - }); - next.set('ai',function(card){ - if(_status.event.goon2){ - return 3+_status.event.val-get.value(card); - } - return 0; - }); - next.set('val',get.value(trigger.cards.filterInD())); - next.set('goon2',get.effect(player,trigger.card,trigger.player,player)<0) - next.logSkill='rejiaojin'; - "step 1" - if(result.bool){ - var cards=trigger.cards.filterInD(); - if(cards.length) player.gain(cards,'gain2','log'); - trigger.excluded.push(player); - } - } - }, - chanhui2:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - popup:false, - audio:false, - content:function(){ - player.removeSkill('chanhui2'); - } - }, - quanji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - locked:false, - notemp:true, - init:function(player){ - if(!player.storage.quanji) player.storage.quanji=[]; - }, - filter:function(event){ - return event.num>0; - }, - content:function(){ - "step 0" - event.count=trigger.num; - "step 1" - event.count--; - player.draw(); - "step 2" - if(player.countCards('h')){ - player.chooseCard('将一张手牌置于武将牌上作为“权”',true); - } - else{ - event.goto(4); - } - "step 3" - if(result.cards&&result.cards.length){ - player.lose(result.cards,ui.special,'toStorage'); - player.storage.quanji=player.storage.quanji.concat(result.cards); - player.syncStorage('quanji'); - player.markSkill('quanji'); - game.log(player,'将',result.cards,'置于武将牌上作为“权”'); - } - "step 4" - if(event.count>0){ - player.chooseBool(get.prompt2('quanji')).set('frequentSkill','quanji'); - } - else event.finish(); - "step 5" - if(result.bool){ - player.logSkill('quanji'); - event.goto(1); - } - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.quanji.length; - } - }, - ai:{ - maixie:true, - maixie_hp:true, - threaten:0.8, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; - if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - zili:{ - skillAnimation:true, - animationColor:'thunder', - audio:2, - audioname:['re_zhonghui'], - unique:true, - juexingji:true, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3; - }, - content:function(){ - "step 0" - player.chooseDrawRecover(2,true,function(event,player){ - if(player.hp==1&&player.isDamaged()) return 'recover_hp'; - return 'draw_card'; - }); - "step 1" - player.loseMaxHp(); - player.addSkill('paiyi'); - player.awakenSkill('zili'); - } - }, - paiyi:{ - enable:'phaseUse', - usable:1, - audio:2, - audioname:['re_zhonghui'], - filter:function(event,player){ - return player.storage.quanji&&player.storage.quanji.length>0; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('排异',player.storage.quanji,'hidden') - }, - backup:function(links,player){ - return { - audio:'paiyi', - audioname:['re_zhonghui'], - filterTarget:true, - filterCard:function(){return false}, - selectCard:-1, - card:links[0], - delay:false, - content:lib.skill.paiyi.contentx, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(player!=target) return 0; - if(player.hasSkill('requanji')||(player.countCards('h')+2<=player.hp+player.storage.quanji.length)) return 1; - return 0; - } - }, - }, - } - }, - prompt:function(){return '请选择〖排异〗的目标'}, - }, - contentx:function(){ - "step 0" - var card=lib.skill.paiyi_backup.card; - game.cardsDiscard(card); - player.$throw(card); - player.storage.quanji.remove(card); - game.log(card,'进入了弃牌堆'); - if(!player.storage.quanji.length){ - player.unmarkSkill('quanji'); - } - else{ - player.markSkill('quanji'); - } - player.syncStorage('quanji'); - game.delayx(); - "step 1" - target.draw(2); - "step 2" - if(target.countCards('h')>player.countCards('h')){ - target.damage(); - } - }, - ai:{ - order:1, - result:{ - player:1, - } - } - }, - xianzhou:{ - skillAnimation:true, - animationColor:'gray', - audio:2, - unique:true, - limited:true, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.xianzhou&&player.countCards('e')>0; - }, - init:function(player){ - player.storage.xianzhou=false; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - mark:true, - content:function(){ - "step 0" - player.awakenSkill('xianzhou'); - var cards=player.getCards('e'); - target.gain(cards,player,'give'); - event.num=cards.length; - player.storage.xianzhou=true; - game.delay(); - "step 1" - target.chooseTarget([1,event.num],'令'+get.translation(player)+'回复'+ - event.num+'点体力,或对攻击范围内的'+event.num+'名角色造成一点伤害',function(card,player,target2){ - return _status.event.player.inRange(target2); - }).set('ai',function(target2){ - var target=_status.event.player; - var player=_status.event.getParent().player; - if(get.attitude(target,player)>0){ - if(player.hp+event.num<=player.maxHp||player.hp==1) return -1; - } - return get.damageEffect(target2,target,target); - }); - "step 2" - if(result.bool){ - target.line(result.targets,'green'); - event.targets=result.targets; - event.num2=0; - } - else{ - player.recover(event.num); - event.finish(); - } - "step 3" - if(event.num22&&get.attitude(players[i],player)>2){ - bool=false;break; - } - } - if(bool) return -10; - if(player.hp==1) return 1; - if(game.phaseNumber0){ - return '移动装备'; - } - } - else{ - if(att<=0){ - return '移动装备'; - } - } - return 'draw_card'; - }).set('sourcex',trigger.player); - } - else{ - next=player.chooseControl('draw_card','cancel2',function(){ - return 'draw_card'; - }); - } - next.set('prompt',get.prompt('qieting',trigger.player)); - "step 1" - if(result.control=='移动装备'){ - player.logSkill('qieting',trigger.player); - player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区').set('filterButton',function(button){ - return _status.event.player.isEmpty(get.subtype(button.link)); - }); - } - else{ - if(result.control=='draw_card'){ - player.logSkill('qieting'); - player.draw(); - } - event.finish(); - } - "step 2" - if(result&&result.links&&result.links.length){ - game.delay(2); - trigger.player.$give(result.links[0],player,false); - player.equip(result.links[0]); - player.addExpose(0.2); - } - }, - }, - oldzhuikong:{ - audio:'zhuikong', - inherit:'zhuikong', - }, - zhuikong:{ - audio:2, - trigger:{global:'phaseZhunbeiBegin'}, - check:function(event,player){ - if(get.attitude(player,event.player)<-2){ - var cards=player.getCards('h'); - if(cards.length>player.hp) return true; - for(var i=0;i9&&useful<7) return true; - } - } - return false; - }, - logTarget:'player', - filter:function(event,player){ - return player.hp=0?1:-1; - }).set('sourcex',player); - game.delay(); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); - game.delay(); - } - else{ - trigger.getParent().targets.push(event.target); - trigger.getParent().triggeredTargets2.push(event.target); - game.log(event.target,'成为了额外目标'); - } - }, - ai:{ - expose:0.2, - effect:{ - target:function(card,player,target){ - if(card.name!='sha') return; - var players=game.filterPlayer(); - if(get.attitude(player,target)<=0){ - for(var i=0;i0&& - get.effect(target2,{name:'shacopy',nature:card.nature,suit:card.suit},player,player)<0){ - if(target.hp==target.maxHp) return 0.3; - return 0.6; - } - } - } - else{ - for(var i=0;i0){ - if(player.canUse(card,target2)) return; - if(target.hp==target.maxHp) return [0,1]; - return [0,0]; - } - } - } - } - } - } - }, - gongji:{ - enable:'phaseUse', - usable:1, - audio:2, - position:'he', - filterCard:true, - check:function(card){ - if(get.type(card)!='equip') return 0; - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - return 6-get.equipValue(card); - }, - content:function(){ - "step 0" - player.addTempSkill('gongji2'); - "step 1" - if(get.type(cards[0],null,cards[0].original=='h'?player:false)=='equip'){ - player.chooseTarget('是否弃置一名角色的一张牌?',function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)<0){ - return Math.max(0.5,get.effect(target,{name:'sha'},player,player)); - } - return 0; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.line(result.targets,'green'); - event.target=result.targets[0]; - player.discardPlayerCard(event.target,'he',true).ai=get.buttonValue; - } - }, - ai:{ - order:9, - result:{ - player:1 - } - } - }, - gongji2:{ - mod:{ - attackFrom:function(){ - return -Infinity; - }, - }, - }, - zhuiyi:{ - audio:2, - trigger:{player:'die'}, - direct:true, - skillAnimation:true, - animationColor:'wood', - forceDie:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('zhuiyi'),function(card,player,target){ - return player!=target&&_status.event.sourcex!=target; - }).set('forceDie',true).set('ai',function(target){ - var num=get.attitude(_status.event.player,target); - if(num>0){ - if(target.hp==1){ - num+=2; - } - if(target.hpplayers[i].countCards('h')) return true; - } - return false; - }, - selectTarget:2, - content:function(){ - 'step 0' - var gainner,giver; - if(targets[0].countCards('h')0) return -1; - var players=game.filterPlayer(); - for(var i=0;i0) return -3; - return -1; - } - } - return 0; - } - else{ - return 1; - } - }, - player:1, - } - } - }, - anxu:{ - enable:'phaseUse', - usable:1, - multitarget:true, - audio:2, - filterTarget:function(card,player,target){ - if(player==target) return false; - var num=target.countCards('h'); - if(ui.selected.targets.length){ - return numplayers[i].countCards('h')) return true; - } - return false; - }, - selectTarget:2, - content:function(){ - 'step 0' - var gainner,giver; - if(targets[0].countCards('h')0) return -1; - var players=game.filterPlayer(); - for(var i=0;i=0&&num20||player.countCards('he',{type:'equip'})>0; - }, - check:function(card){return 8-get.value(card)}, - selectTarget:2, - multitarget:true, - discard:false, - lose:false, - targetprompt:['得到牌','出杀目标'], - filterTarget:function(card,player,target){ - if(ui.selected.targets.length==0){ - return player!=target; - } - else{ - return ui.selected.targets[0].inRange(target); - } - }, - delay:false, - content:function(){ - "step 0" - targets[0].gain(cards,player,'give'); - "step 1" - if(!lib.filter.filterTarget({name:'sha',isCard:true},targets[0],targets[1])) event._result={control:'draw_card'}; - else targets[0].chooseControl('draw_card','出杀',function(){ - var player=_status.event.player; - var target=_status.event.target; - if(get.effect(_status.event.target,{name:'sha'},player,player)>0){ - return 1; - } - return 0; - }).set('target',targets[1]).set('prompt','对'+get.translation(targets[1])+'使用一张杀,或摸一张牌'); - "step 2" - if(result.control=='draw_card'){ - targets[0].draw(); - } - else{ - targets[0].useCard({name:'sha',isCard:true},targets[1]); - } - }, - ai:{ - result:{ - player:function(player){ - var players=game.filterPlayer(); - for(var i=0;i1&&get.attitude(players[i],player)>1){ - return 1; - } - } - return 0; - }, - target:function(player,target){ - if(ui.selected.targets.length){ - return -0.1; - } - return 1; - } - }, - order:8.5, - expose:0.2 - } - }, - xinxuanhuo:{ - audio:2, - trigger:{player:'phaseDrawBegin1'}, - direct:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('xinxuanhuo'),function(card,player,target){ - return player!=target; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0){ - if(target.countCards('h')1&&check<2) return 0; - return get.unuseful(card)+9; - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; - return att-2; - }, - prompt:'将'+get.cnNumber(event.num)+'张手牌交给一名其他角色', - }).set('check',check); - "step 2" - if(result.bool){ - result.targets[0].gain(result.cards,event.player,'giveAuto'); - player.line(result.targets,'green'); - } - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 3; - if(target.hp==2) return 1.5; - return 0.5; - }, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - zhenlie:{ - audio:2, - filter:function(event,player){ - return event.player!=player&&event.card&&(event.card.name=='sha'||get.type(event.card)=='trick'); - }, - logTarget:'player', - check:function(event,player){ - if(event.getParent().excluded.contains(player)) return false; - if(get.attitude(player,event.player)>0){ - return false; - } - if(get.tag(event.card,'respondSha')){ - if(player.countCards('h',{name:'sha'})==0){ - return true; - } - } - else if(get.tag(event.card,'respondShan')){ - if(player.countCards('h',{name:'shan'})==0){ - return true; - } - } - else if(get.tag(event.card,'damage')){ - if(player.countCards('h')<2) return true; - } - else if(event.card.name=='shunshou'&&player.hp>2){ - return true; - } - return false; - }, - trigger:{target:'useCardToTargeted'}, - content:function(){ - "step 0" - player.loseHp(); - "step 1" - trigger.getParent().excluded.add(player); - "step 2" - if(trigger.player.countCards('he')){ - player.discardPlayerCard(trigger.player,'he',true); - } - }, - ai:{ - expose:0.3 - } - }, - wuyan:{ - audio:2, - trigger:{target:'useCardToBefore',player:'useCardToBefore'}, - forced:true, - priority:15, - check:function(event,player){ - return get.effect(event.target,event.card,event.player,player)<0; - }, - filter:function(event,player){ - if(!event.target) return false; - if(event.player==player&&event.target==player) return false; - return (get.type(event.card)=='trick'); - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; - }, - player:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; - } - } - } - }, - xinwuyan:{ - audio:2, - trigger:{source:'damageBegin2',player:'damageBegin4'}, - forced:true, - //priority:15, - check:function(event,player){ - if(player==event.player) return true; - return false; - }, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'; - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - notrick:true, - notricksource:true, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='trick'&&get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - }, - player:function(card,player,target,current){ - if(get.type(card)=='trick'&&get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - } - } - } - }, - xinjujian:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('he')>player.countCards('he',{type:'basic'}); - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:function(card,player){ - return get.type(card)!='basic'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - if(get.tag(card,'damage')&&get.type(card)=='trick'){ - return 20; - } - return 9-get.value(card); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0){ - if(target.isTurnedOver()) att+=3; - if(target.hp==1) att+=3; - } - return att; - }, - position:'he', - prompt:get.prompt2('xinjujian') - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xinjujian',target); - player.discard(result.cards); - if(target.hp==target.maxHp&& - !target.isTurnedOver()&& - !target.isLinked()){ - target.draw(2); - event.finish(); - } - else{ - var controls=['draw_card']; - if(target.hp2){ - return 'recover_hp'; - } - else if(target.hp==2&&target.maxHp>2&&target.countCards('h')>1){ - return 'recover_hp'; - } - else{ - return 'draw_card'; - } - } - } - } - else{ - event.finish(); - } - "step 2" - event.control=result.control; - switch(event.control){ - case 'recover_hp':event.target.recover();event.finish();break; - case 'draw_card':event.target.draw(2);event.finish();break; - case 'reset_character':if(event.target.isTurnedOver()) event.target.turnOver();break; - } - "step 3" - if(event.control=='reset_character'&&event.target.isLinked()){ - event.target.link(); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - jujian:{ - enable:'phaseUse', - usable:1, - audio:2, - filterCard:true, - position:'he', - selectCard:[1,3], - check:function(card){ - var player=get.owner(card); - if(get.type(card)=='trick') return 10; - if(player.countCards('h')-player.hp-ui.selected.cards.length>0){ - return 8-get.value(card); - } - return 4-get.value(card); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - target.draw(cards.length); - if(cards.length==3){ - if(get.type(cards[0],'trick')==get.type(cards[1],'trick')&& - get.type(cards[0],'trick')==get.type(cards[2],'trick')){ - player.recover(); - } - } - }, - ai:{ - expose:0.2, - order:1, - result:{ - target:1 - } - } - }, - yizhong:{ - trigger:{target:'shaBefore'}, - forced:true, - audio:2, - filter:function(event,player){ - if(player.getEquip(2)) return false; - return (event.card.name=='sha'&&get.color(event.card)=='black') - }, - content:function(){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player==target&&get.subtype(card)=='equip2'){ - if(get.equipValue(card)<=8) return 0; - } - if(target.getEquip(2)) return; - if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; - } - } - } - }, - jueqing:{ - trigger:{source:'damageBefore'}, - forced:true, - audio:2, - //priority:16, - check:function(){return false;}, - content:function(){ - trigger.cancel(); - trigger.player.loseHp(trigger.num); - }, - ai:{ - jueqing:true - } - }, - shangshi:{ - audio:2, - trigger:{player:['loseAfter','changeHp']}, - frequent:true, - filter:function(event,player){ - return player.countCards('h')0) return 0; - if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; - if(!player.countCards('h','sha')) return 0; - var targets=[]; - var target; - var players=game.filterPlayer(); - for(var i=0;inum){ - target=targets[i]; - num=num2; - } - } - if(num<=0) return 0; - var e2=target.getEquip(2); - if(e2){ - if(e2.name=='tengjia'){ - if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; - } - if(e2.name=='renwang'){ - if(!player.countCards('h',{name:'sha',color:'red'})) return 0; - } - if(e2.name=='baiyin') return 0; - } - if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; - return target.countCards('h')>3?0:1; - } - if(player==_status.event.dying||player.isTurnedOver()) return 3; - } - }, - effect:{ - target:function(card,player,target){ - if(card.name=='guiyoujie') return [0,0.5]; - if(target.isTurnedOver()){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(target.hp==1) return; - return [1,target.countCards('h')/2]; - } - } - } - } - }, - }, - jiushi2:{ - trigger:{player:'damageBegin3'}, - silent:true, - firstDo:true, - filter:function(event,player){ - return player.classList.contains('turnedover'); - }, - content:function(){ - trigger.jiushi=true; - } - }, - jiushi3:{ - audio:'jiushi1', - trigger:{player:'damageEnd'}, - check:function(event,player){ - return player.isTurnedOver(); - }, - prompt:'是否发动【酒诗】,将武将牌翻面?', - filter:function(event,player){ - if(event.jiushi){ - return true; - } - return false; - }, - content:function(){ - delete trigger.jiushi; - player.turnOver(); - } - }, - zongshi:{ - audio:2, - mod:{ - maxHandcard:function(player,num){ - return num+game.countGroup(); - } - } - }, - zishou:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - check:function(event,player){ - return player.countCards('h')<=(player.hasSkill('zongshi')?player.maxHp:(player.hp-2))||player.skipList.contains('phaseUse'); - }, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num+=game.countGroup(); - player.addTempSkill('zishou2'); - }, - ai:{ - threaten:1.5 - } - }, - zishou2:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - olddanshou:{ - trigger:{source:'damageSource'}, - //priority:9, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - content:function(){ - "step 0" - player.draw(); - var cards=Array.from(ui.ordering.childNodes); - while(cards.length){ - cards.shift().discard(); - } - "step 1" - var evt=_status.event.getParent('phase'); - if(evt){ - game.resetSkills(); - _status.event=evt; - _status.event.finish(); - _status.event.untrigger(true); - } - }, - ai:{ - jueqing:true - } - }, - danshou:{ - enable:'phaseUse', - filterCard:true, - position:'he', - audio:2, - filter:function(event,player){ - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - return player.countCards('he')>=num; - }, - check:function(card){ - if(ui.selected.cards.length>=2){ - return 4-get.value(card); - } - return 6-get.value(card); - }, - selectCard:function(card){ - var num=_status.event.player.getStat().skill.danshou; - if(num) return num+1; - return 1; - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - if(num<=2&&!target.countCards('he')) return false; - return player.inRange(target); - }, - content:function(){ - 'step 0' - var num=player.getStat().skill.danshou; - switch(num){ - case 1:player.discardPlayerCard(target,true);break; - case 2:target.chooseCard('选择一张牌交给'+get.translation(player),'he',true);break; - case 3:target.damage('nocard');break; - default:game.asyncDraw([player,target],2); - } - if(num!=2) event.finish(); - 'step 1' - if(result.cards){ - player.gain(result.cards,target,'giveAuto'); - } - }, - ai:{ - order:8.6, - result:{ - target:function(player,target){ - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - if(num>3) return 0; - if(num==3) return get.damageEffect(target,player,target); - return -1; - } - } - } - }, - qice:{ - enable:'phaseUse', - usable:1, - audio:'qice_backup', - filter:function(event,player){ - var hs=player.getCards('h'); - if(!hs.length) return false; - for(var i=0;i0&&!players[i].hasSha()){ - return (button.link[2]=='juedou')?2:-1; - } - if(!players[i].isOut()){ - if(players[i].hp0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - } - if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1; - if(lose0) return (button.link[2]=='taoyuan')?1:-1; - return (button.link[2]=='wuzhong')?1:-1; - }, - backup:function(links,player){ - return { - filterCard:true, - selectCard:-1, - audio:2, - popname:true, - viewAs:{name:links[0][2]}, - } - }, - prompt:function(links,player){ - return '将全部手牌当作'+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0; - var cards=player.getCards('h'); - if(cards.length>=3&&player.hp>=3) return 0; - for(var i=0;i1; - } - else return event.es&&event.es.length>0; - }, - content:function(){ - "step 0" - event.count=2; - event.logged=false; - "step 1" - player.chooseTarget(get.prompt('xuanfeng'),'弃置一名其他角色的一张牌',function(card,player,target){ - if(player==target) return false; - return target.countDiscardableCards(player,'he'); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 2" - if(result.bool){ - if(!event.logged){ - player.logSkill('xuanfeng',result.targets); - event.logged=true; - } - else player.line(result.targets[0],'green'); - player.discardPlayerCard(result.targets[0],'he',true); - event.count--; - } - else event.finish(); - "step 3" - if(event.count) event.goto(1); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; - } - }, - reverseEquip:true, - noe:true - } - }, - jiangchi:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - direct:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - "step 0" - player.chooseControl('jiangchi_less','jiangchi_more','cancel2',function(){ - var player=_status.event.player; - if(player.countCards('h')>3&&player.countCards('h','sha')>1){ - return 'jiangchi_less'; - } - if(player.countCards('h','sha')>2){ - return 'jiangchi_less'; - } - if(player.hp-player.countCards('h')>1){ - return 'jiangchi_more'; - } - return 'cancel2'; - }); - "step 1" - if(result.control=='jiangchi_less'){ - trigger.num--; - player.addTempSkill('jiangchi2','phaseUseEnd'); - player.logSkill('jiangchi'); - } - else if(result.control=='jiangchi_more'){ - trigger.num++; - player.addTempSkill('jiangchi3','phaseUseEnd'); - player.logSkill('jiangchi'); - } - } - }, - jiangchi2:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha') return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - } - }, - jiangchi3:{ - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - xinzhan:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return true;//player.countCards('h')>player.maxHp; - }, - usable:1, - content:function(){ - "step 0" - var cards=get.cards(3); - event.cards=cards; - var next=player.chooseCardButton(cards,'选择获得的红桃牌',[1,Infinity]).set('filterButton',function(button){ - return get.suit(button.link)=='heart'; - }); - "step 1" - if(result.bool){ - player.gain(result.links); - player.$draw(result.links); - game.delay(2); - } - for(var i=event.cards.length-1;i>=0;i--){ - if(!result.bool||!result.links.contains(event.cards[i])){ - ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); - } - } - }, - ai:{ - order:11, - result:{ - player:1 - } - } - }, - huilei:{ - audio:2, - trigger:{player:'die'}, - forced:true, - forceDie:true, - filter:function(event){ - return event.source!=undefined; - }, - logTarget:'source', - skillAnimation:true, - animationColor:'thunder', - content:function(){ - trigger.source.discard(trigger.source.getCards('he')); - }, - ai:{ - threaten:0.7 - } - }, - xinenyuan:{ - audio:true, - trigger:{player:'damageEnd'}, - check:function(event,player){ - var att=get.attitude(player,event.source); - var num=event.source.countCards('h'); - if(att<=0) return true; - if(num>2) return true; - if(num) return att<4; - return false; - }, - filter:function(event,player){ - return event.source&&event.source!=player&&event.num>0&&event.source.isAlive(); - }, - content:function(){ - "step 0" - event.num=trigger.num; - "step 1" - trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌或流失一点体力').set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 11-get.value(card); - } - else{ - return 7-get.value(card); - } - }); - "step 2" - if(result.bool){ - player.gain(result.cards,trigger.source,'giveAuto'); - } - else{ - trigger.source.loseHp(); - } - if(event.num>1){ - event.num--; - event.goto(1); - } - }, - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; - if(!target.hasFriend()) return; - if(get.tag(card,'damage')) return [1,0,0,-0.7]; - } - } - }, - group:'xinenyuan2' - }, - xinenyuan2:{ - audio:true, - trigger:{player:'gainEnd'}, - filter:function(event,player){ - return event.source&&event.source.isAlive()&&event.source!=player&&event.cards.length>=2; - }, - logTarget:'source', - check:function(event,player){ - return get.attitude(player,event.source)>0; - }, - content:function(){ - trigger.source.draw(); - } - }, - enyuan:{ - audio:'enyuan1', - locked:true, - group:['enyuan1','enyuan2'], - ai:{ - maixie_defend:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - if(get.tag(card,'damage')) return [1,0,0,-1]; - } - } - } - }, - enyuan1:{ - trigger:{player:'recoverEnd'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.source&&event.source!=player; - }, - content:function(){ - trigger.source.draw(); - } - }, - enyuan2:{ - trigger:{player:'damageEnd'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.source&&event.source!=player; - }, - content:function(){ - "step 0" - trigger.source.chooseCard('交出一张红桃牌或流失一点体力',function(card){ - return get.suit(card)=='heart'; - }).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 11-get.value(card); - } - else{ - return 7-get.value(card); - } - }); - "step 1" - if(result.bool){ - player.gain(result.cards,'giveAuto',trigger.source); - } - else{ - trigger.source.loseHp(); - } - } - }, - xuanhuo:{ - audio:2, - enable:'phaseUse', - usable:1, - discard:false, - lose:false, - delay:0, - filter:function(event,player){ - return player.countCards('he',{suit:'heart'}); - }, - filterCard:function(card){ - return get.suit(card)=='heart'; - }, - filterTarget:function(card,player,target){ - if(game.countPlayer()==2) return false; - return player!=target; - }, - check:function(card){ - var player=get.owner(card); - var players=game.filterPlayer(); - for(var i=0;i3) break; - } - if(i==players.length) return -1; - return 5-get.value(card); - }, - content:function(){ - "step 0" - target.gain(cards,player,'give'); - // game.delay(); - "step 1" - player.gainPlayerCard(target,'he',true); - "step 2" - var source=target; - event.card=result.links[0]; - player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ - return target!=_status.event.sourcex&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('sourcex',target); - "step 3" - if(result.bool){ - result.targets[0].gain(card,player,'give'); - game.delay(); - } - }, - ai:{ - result:{ - target:-0.5, - }, - basic:{ - order:9, - } - } - }, - ganlu:{ - enable:'phaseUse', - usable:1, - audio:2, - selectTarget:2, - filterTarget:function(card,player,target){ - if(target.isMin()) return false; - if(ui.selected.targets.length==0) return true; - if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; - return Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; - }, - multitarget:true, - content:function(){ - targets[0].swapEquip(targets[1]); - }, - ai:{ - order:10, - threaten:function(player,target){ - return 0.8*Math.max(1+target.maxHp-target.hp); - }, - result:{ - target:function(player,target){ - var list1=[]; - var list2=[]; - var num=player.maxHp-player.hp; - var players=game.filterPlayer(); - for(var i=0;i0) list1.push(players[i]); - else if(get.attitude(player,players[i])<0) list2.push(players[i]); - } - list1.sort(function(a,b){ - return a.countCards('e')-b.countCards('e'); - }); - list2.sort(function(a,b){ - return b.countCards('e')-a.countCards('e'); - }); - var delta; - for(var i=0;i0; - }, - direct:true, - content:function(){ - "step 0" - var check; - if(trigger.player.isUnderControl(true,player)){ - check=player.hasCard(function(card){ - return get.type(card)!='basic'; - }); - } - else{ - check=(get.attitude(player,trigger.player)>0); - } - player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){ - if(!_status.event.check) return 0; - if(_status.event.target.isUnderControl(true,_status.event.player)){ - if(get.type(button.link)!='basic'){ - return 10-get.value(button.link); - } - return 0; - } - else{ - return Math.random(); - } - }).set('check',check).set('filterButton',function(button){ - if(_status.event.player==_status.event.target){ - return lib.filter.cardDiscardable(button.link,_status.event.player); - } - return true; - }); - "step 1" - if(result.bool){ - player.logSkill('buyi',trigger.player); - event.card=result.links[0]; - player.showCards([event.card],get.translation(player)+'展示的手牌'); - } - else{ - event.finish(); - } - "step 2" - if(get.type(event.card)!='basic'){ - trigger.player.recover(); - trigger.player.discard(event.card); - } - }, - ai:{ - threaten:1.4 - } - }, - pojun:{ - audio:2, - trigger:{source:'damageSource'}, - check:function(event,player){ - if(event.player.isTurnedOver()) return get.attitude(player,event.player)>0; - if(event.player.hp<3){ - return get.attitude(player,event.player)<0; - } - return get.attitude(player,event.player)>0; - }, - filter:function(event){ - if(event._notrigger.contains(event.player)) return false; - return event.card&&event.card.name=='sha'&&event.player.isAlive(); - }, - logTarget:'player', - content:function(){ - "step 0" - trigger.player.draw(Math.min(5,trigger.player.hp)); - "step 1" - trigger.player.turnOver(); - } - }, - jingce:{ - trigger:{player:'phaseUseEnd'}, - frequent:true, - filter:function(event,player){ - return player.countUsed(null,true)>=player.hp; - }, - content:function(){ - player.draw(2); - }, - audio:2, - }, - xinjingce:{ - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - filter:function(event,player){ - return player.countUsed(null,true)>=player.hp; - }, - content:function(){ - player.draw(2); - }, - audio:'jingce', - }, - oldchengxiang:{ - audio:'chengxiang', - inherit:'chengxiang', - }, - chengxiang:{ - trigger:{player:'damageEnd'}, - //direct:true, - frequent:true, - audio:2, - content:function(){ - "step 0" - event.cards=get.cards(4); - game.cardsGotoOrdering(event.cards); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards,num){ - var str; - if(player==game.me&&!_status.auto){ - str='称象:选择任意张点数不大于'+num+'的牌'; - } - else{ - str='称象'; - } - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards,event.name=='chengxiang'?13:12); - event.time=get.utc(); - game.addVideo('showCards',player,['称象',get.cardsInfo(event.cards)]); - game.addVideo('delay',null,2); - "step 1" - var next=player.chooseButton([0,4]); - next.set('dialog',event.videoId); - next.set('filterButton',function(button){ - var num=0 - for(var i=0;i0){ - game.delay(0,time); - } - "step 3" - game.broadcastAll('closeDialog',event.videoId); - var cards2=event.cards2; - player.gain(cards2,'log','gain2'); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [1,2]; - if(target.hp==3) return [1,1.5]; - if(target.hp==2) return [1,0.5]; - } - } - } - } - }, - oldrenxin:{ - trigger:{global:'dying'}, - //priority:6, - filter:function(event,player){ - return event.player!=player&&event.player.hp<=0&&player.countCards('h')>0; - }, - check:function(event,player){ - if(get.attitude(player,event.player)<0) return false; - if(player.countCards('h',{name:['tao','jiu']})+event.player.hp<0) return false; - return true; - }, - content:function(){ - 'step 0' - player.turnOver(); - 'step 1' - trigger.player.gain(player.getCards('h'),'give',player); - 'step 2' - trigger.player.recover(); - }, - }, - renxin:{ - trigger:{global:'damageBegin4'}, - audio:3, - //priority:6, - filter:function(event,player){ - return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('renxin',trigger.player),'弃置一张装备牌并将武将牌翻面,然后防止'+get.translation(trigger.player)+'受到的伤害',{type:'equip'},'he'); - next.logSkill=['renxin',trigger.player]; - next.set('ai',function(card){ - var player=_status.event.player; - if(get.attitude(player,_status.event.getTrigger().player)>3){ - return 11-get.value(card); - } - return -1; - }); - "step 1" - if(result.bool){ - player.turnOver(); - } - else{ - event.finish(); - } - "step 2" - trigger.cancel(); - }, - ai:{ - expose:0.5 - } - }, - yuce:{ - audio:2, - trigger:{player:'damageAfter'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&player.isDamaged(); - }, - content:function(){ - "step 0" - var next=player.chooseCard(get.prompt2('yuce')); - next.set('ai',function(card){ - if(get.type(card)=='basic') return 1; - return Math.abs(get.value(card))+1; - }); - "step 1" - if(result.bool){ - player.logSkill('yuce'); - player.showCards(result.cards); - var type=get.type(result.cards[0],'trick'); - if(trigger.source){ - trigger.source.chooseToDiscard('弃置一张不为'+get.translation(type)+'牌的牌或令'+get.translation(player)+'回复一点体力',function(card){ - return get.type(card,'trick')!=_status.event.type; - }).set('ai',function(card){ - if(get.recoverEffect(_status.event.getParent().player,_status.event.player,_status.event.player)<0){ - return 7-get.value(card); - } - return 0; - }).set('type',type); - } - else{ - event.recover=true; - } - } - else{ - event.finish(); - } - "step 2" - if(event.recover){ - player.recover(); - } - else if(result.bool){ - //player.draw(); - } - else{ - player.recover(); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage'&&target.countCards('h'))){ - return 0.8 - } - } - } - } - }, - xiansi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - init:function(player){ - if(!player.storage.xiansi) player.storage.xiansi=[]; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt2('xiansi'),[1,2],function(card,player,target){ - return target.countCards('he')>0; - },function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - result.targets.sortBySeat(); - player.logSkill('xiansi',result.targets); - event.targets=result.targets; - } - else{ - event.finish(); - } - "step 2" - if(event.targets.length){ - var target=event.targets.shift(); - event.current=target; - player.choosePlayerCard(target,true); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - player.storage.xiansi=player.storage.xiansi.concat(result.links); - player.markSkill('xiansi'); - player.syncStorage('xiansi'); - event.current.lose(result.links,ui.special,'toStorage'); - event.current.$give(result.links,player,false); - event.goto(2); - } - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - ai:{ - threaten:2 - }, - global:'xiansi2' - }, - xiansi2:{ - enable:'chooseToUse', - audio:2, - viewAs:{name:'sha',isCard:true}, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.hasSkill('xiansi')&¤t.storage.xiansi.length>1&&event.filterTarget({name:'sha'},player,current); - }); - }, - filterTarget:function(card,player,target){ - var bool=false; - var players=ui.selected.targets.slice(0); - for(var i=0;i1) bool=true;break; - } - if(!bool&&(!target.hasSkill('xiansi')||target.storage.xiansi.length<=1)) return false; - return _status.event._backup.filterTarget.apply(this,arguments); - }, - complexSelect:true, - selectCard:-1, - filterCard:function(){ - return false; - }, - forceaudio:true, - direct:true, - prompt:'弃置一名有【逆】的角色的两张【逆】,然后视为对包含其在内的角色使用【杀】。', - delay:false, - log:false, - precontent:function(){ - "step 0" - var targets=game.filterPlayer(function(current){ - if(event.result.targets.contains(current)&¤t.storage.xiansi){ - return current.storage.xiansi.length>1; - } - return false; - }); - if(targets.length==1){ - event.target=targets[0]; - event.goto(2); - } - else if(targets.length>0){ - player.chooseTarget(true,'选择【陷嗣】的目标',function(card,player,target){ - return _status.event.list.contains(target); - }).set('list',targets).set('ai',function(target){ - var player=_status.event.player; - return get.attitude(player,target); - }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool&&result.targets.length){ - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - if(event.target.storage.xiansi.length==2){ - event.directresult=event.target.storage.xiansi.slice(0); - } - else{ - player.chooseCardButton('移去两张“逆”',2,event.target.storage.xiansi,true); - } - } - else{ - event.finish(); - } - "step 3" - if(event.directresult||result.bool){ - player.logSkill('xiansi2',event.target); - var links=event.directresult||result.links; - for(var i=0;i0){ - player.loseHp(); - } - else{ - player.recover(); - } - }, - subSkill:{ - damaged:{}, - ai:{} - }, - ai:{ - maixie_defend:true, - threaten:0.9, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return; - if(target.hujia) return; - if(player._shibei_tmp) return; - if(target.hasSkill('shibei_ai')) return; - if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; - if(get.tag(card,'damage')){ - if(target.getHistory('damage').length>0){ - return [1,-2]; - } - else{ - if(get.attitude(player,target)>0&&target.hp>1){ - return 0; - } - if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ - if(card.name=='sha') return; - var sha=false; - player._shibei_tmp=true; - var num=player.countCards('h',function(card){ - if(card.name=='sha'){ - if(sha){ - return false; - } - else{ - sha=true; - } - } - return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,player)>0; - }); - delete player._shibei_tmp; - if(player.hasSkillTag('damage')){ - num++; - } - if(num<2){ - var enemies=player.getEnemies(); - if(enemies.length==1&&enemies[0]==target&&player.needsToDiscard()){ - return; - } - return 0; - } - } - } - } - } - } - } - }, - shibei_old:{ - audio:2, - trigger:{player:'damageAfter'}, - forced:true, - content:function(){ - "step 0" - player.judge(function(card){ - if(player.hasSkill('shibei2')){ - if(get.color(card)=='black') return -1; - } - else{ - if(get.color(card)=='red') return 1; - } - return 0; - }) - "step 1" - if(result.judge>0){ - player.recover(); - } - else if(result.judge<0){ - player.loseHp(); - } - if(!player.hasSkill('shibei2')){ - player.addTempSkill('shibei2'); - } - } - }, - shibei2:{}, - jianying:{ - audio:2, - locked:false, - mod:{ - aiOrder:function(player,card,num){ - if(typeof card=='object'&&player.isPhaseUsing()){ - var evt=player.getLastUsed(); - if(evt&&evt.card&&(get.suit(evt.card)&&get.suit(evt.card)==get.suit(card)||evt.card.number&&evt.card.number==card.number)){ - return num+10; - } - } - }, - }, - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - var evt=player.getLastUsed(1); - if(!evt||!evt.card) return false; - if(!player.isPhaseUsing()) return false; - var evt2=evt.getParent('phaseUse'); - if(!evt2||evt2.name!='phaseUse'||evt2.player!=player) return false; - return get.suit(evt.card)&&get.suit(evt.card)==get.suit(event.card)|| - evt.card.number&&evt.card.number==event.card.number; - }, - content:function(){ - player.draw(); - }, - }, - zzhenggong:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return event.source&&event.source.countCards('e')>0; - }, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.source); - player.choosePlayerCard('e',get.prompt('zzhenggong'),trigger.source).ai=function(button){ - if(att<=0){ - return get.equipValue(button.link); - } - return 0; - } - "step 1" - if(result.bool){ - player.logSkill('zzhenggong',trigger.source); - player.equip(result.links[0]); - trigger.source.$give(result.links[0],player,false); - } - }, - ai:{ - maixie_defend:true, - } - }, - zquanji:{ - trigger:{global:'phaseZhunbeiBefore'}, - //priority:15, - check:function(event,player){ - var att=get.attitude(player,event.player); - if(att<0){ - var nh1=event.player.countCards('h'); - var nh2=player.countCards('h'); - return nh1<=2&&nh2>nh1+1; - } - if(att>0&&event.player.hasJudge('lebu')&&event.player.countCards('h')>event.player.hp+1) return true; - return false; - }, - logTarget:'player', - filter:function(event,player){ - return player.canCompare(event.player); - }, - content:function(){ - "step 0" - player.chooseToCompare(trigger.player); - "step 1" - if(result.bool){ - trigger.player.skip('phaseJudge'); - trigger.cancel(); - } - }, - ai:{ - expose:0.2 - } - }, - zbaijiang:{ - skillAnimation:true, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - unique:true, - derivation:['zyexin','zzili'], - init:function(player){ - player.storage.zbaijiang=false; - }, - // intro:{ - // content:'limited' - // }, - filter:function(event,player){ - return !player.storage.zbaijiang&&player.countCards('e')>=2; - }, - content:function(){ - player.storage.zbaijiang=true; - player.removeSkill('zzhenggong'); - player.removeSkill('zquanji'); - player.removeSkill('zbaijiang'); - player.addSkill('zyexin'); - player.addSkill('zzili'); - player.gainMaxHp(); - } - }, - zyexin:{ - trigger:{player:'damageEnd',source:'damageSource'}, - frequent:true, - init:function(player){ - if(!player.storage.zyexin) player.storage.zyexin=[]; - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, - content:function(){ - var card=game.cardsGotoSpecial(get.cards()).cards[0]; - player.storage.zyexin.push(card); - player.$draw(card); - player.markSkill('zyexin'); - game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']); - }, - group:'zyexin2' - }, - zyexin2:{ - enable:'phaseUse', - usable:1, - lose:false, - delay:false, - selectCard:[1,Infinity], - filterCard:true, - filter:function(event,player){ - return player.storage.zyexin.length>0; - }, - prompt:'用任意数量的手牌与等量的“权”交换', - content:function(){ - "step 0" - player.lose(cards,ui.special,'toStorage'); - player.storage.zyexin=player.storage.zyexin.concat(cards); - player.chooseCardButton(player.storage.zyexin,'选择'+cards.length+'张牌作为手牌',cards.length,true).ai=function(button){ - return get.value(button.link); - } - if(player==game.me&&_status.auto){ - game.delay(); - } - "step 1" - player.gain(result.links,'toStorage'); - for(var i=0;i=4&&!player.storage.zzili; - }, - forced:true, - content:function(){ - player.storage.zzili=true; - player.loseMaxHp(); - player.addSkill('zpaiyi'); - player.removeSkill('zzili'); - }, - // intro:{ - // content:'limited' - // } - }, - zpaiyi:{ - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - for(var i=0;i嵇康幼年聪颖,博览群书,广习诸艺,又喜爱老庄学说。身长七尺八寸,容止出众。后娶魏武帝曹操曾孙女长乐亭主为妻,拜郎中,调中散大夫,世称“嵇中散”。后隐居不仕,屡拒为官。因得罪司隶校尉钟会,遭其构陷,而被掌权的大将军司马昭处死,时年四十岁。', + xinxianying:'辛氏(191年—269年),字宪英,祖籍陇西,颍川阳翟(今河南禹州)人。魏晋时期著名才女,曹魏侍中辛毗之女,卫尉羊耽之妻。辛宪英聪朗有才鉴,曾劝弟辛敞尽忠职守,预言钟会将会叛乱。泰始五年(公元269年),辛宪英逝世,享年七十九岁。', + wuxian:'穆皇后吴氏(?—245年),陈留(今河南开封)人,车骑将军吴懿之妹,三国时期蜀汉昭烈帝刘备的皇后。
    吴氏早年丧父,其父生前与刘焉交情深厚,所以全家跟随刘焉来到蜀地。后刘焉听相面者说吴氏有大贵之相,于是为儿子刘瑁迎娶吴氏。刘瑁死后,吴氏成为寡妇。
    建安十九年(214年),刘备平定益州,纳吴氏为夫人。建安二十四年(219年),刘备自称汉中王,立吴氏为汉中王后。章武元年(221年),刘备称帝,建立蜀汉,立吴氏为皇后。章武三年(223年),刘备去世,太子刘禅即位,尊嫡母吴氏为皇太后。延熙八年(245年),吴氏去世,谥号穆皇后,葬入刘备的惠陵。', + qinmi:'秦宓(?-226年),字子敕。广汉郡绵竹县(今四川德阳北)人。三国蜀汉时大臣、学者。秦宓善舌辩。早年仕于益州牧刘璋麾下,后降刘备。刘备伐吴时,秦宓劝阻,刘备大怒,欲杀秦宓。因诸葛亮及时求情,才保住性命,仅被下狱,后被释放,拜左中郎将、长水校尉。吴蜀同盟后,孙权派张温至成都回访。酒宴之上,秦宓与张温舌战,说得张温无言以对。后官至大司农。建兴四年(226年),秦宓病逝。', + xushi:'徐氏,孙权之弟孙翊的妻子,著名烈女。孙翊的部下妫览、戴员买通家将边鸿将孙翊杀死,并将全部罪责推给边鸿,又谋杀了前来查问的太守孙河。徐夫人一面用美人计色诱妫览、戴员,令其放松警惕;一面对孙翊生前亲信孙高、傅婴说明真相并晓以大义,最终成功地在内室中将杀夫凶手妫览、戴员诛杀。', + xuezong:'薛综(?―243年),字敬文,沛郡竹邑(今安徽濉溪)人,三国时期吴国名臣。少时避乱至交州,师从刘熙。士燮归附孙权,召其为五官中郎将,出任合浦、交阯太守。后从征至九真,回朝任谒者仆射。232年,升任尚书仆射。240年,改任选曹尚书。242年,担任太子少傅,兼任选部职任。243年,薛综去世。薛综是当时名儒,著有诗赋难论数万言,集为《私载》,并著有《五宗图述》、《二京解》。', + caiyong:'蔡邕(133年-192年),字伯喈。陈留郡圉县(今河南杞县南)人。东汉时期名臣,文学家、书法家,才女蔡文姬之父。蔡邕早年拒朝廷征召之命,后被征辟为司徒掾属,任河平长、郎中、议郎等职,曾参与续写《东观汉记》及刻印熹平石经。后因罪被流放朔方,几经周折,避难江南十二年。董卓掌权时,强召蔡邕为祭酒。三日之内,历任侍御史、治书侍御史、尚书、侍中、左中郎将等职,封高阳乡侯,世称“蔡中郎”。董卓被诛杀后,蔡邕因在王允座上感叹而被下狱,不久便死于狱中,年六十。', + caojie:'曹节(196年―260年),沛国谯县(今安徽亳州)人,汉献帝刘协第二任皇后,魏武帝曹操的女儿。建安十八年(213年),曹操将女儿曹宪、曹节、曹华三姐妹同时入宫中,封为夫人。建安十九年(214年),并封为贵人。曹操废掉汉献帝第一位皇后伏寿,将她囚禁而死。曹操要汉献帝立曹节为皇后,汉献帝只得依从。建安二十五年(220年),曹操去世,曹丕袭封魏王位。曹丕授意华歆去逼汉献帝让位。曹节怒斥华歆,华歆只好退出宫去。第二天又逼汉献帝将帝位禅让给曹丕。并以武力威胁,向曹节索要玺印,曹节无奈,将玺印掷于栏板之下。面对曹丕篡位,她极为愤怒,高喊:“老天有眼,决不让你长久!”汉献帝被废为山阳公,曹节为山阳公夫人。景元元年(260年),曹节病逝,仍以汉朝礼仪合葬于献帝的禅陵,谥号献穆皇后。', + }, + perfectPair:{ + wuguotai:['sunjian','sunshangxiang'], + zhangchunhua:['simayi'], + caozhi:['zhenji'], + xunyou:['xunyu'], + xushu:['liubei'], + lingtong:['ganning'], + chengong:['lvbu'], + bulianshi:['sunquan'], + fuhuanghou:['liuxie'], + sunluban:['quancong'], + caifuren:['liubiao'], + xiahoushi:['zhangfei'], + zhoucang:['guanyu'], + guanping:['guanyu'], + sundeng:['sunquan','zhoufei'], + liru:['dongzhuo'], + liuchen:['liushan'], + yujin:['xiahoudun'], + fazheng:['liubei'], + }, + skill:{ + oldzhenlie:{ + audio:2, + trigger:{player:'judge'}, + check:function(event,player){ + return event.judge(player.judging[0])<0; + }, + content:function(){ + "step 0" + var card=get.cards()[0]; + event.card=card; + game.cardsGotoOrdering(card).relatedEvent=trigger; + "step 1" + player.$throw(card); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=card; + game.log(trigger.player,'的判定牌改为',card); + game.delay(2); + }, + }, + oldmiji:{ + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + audio:2, + filter:function(event,player){ + return player.isDamaged(); + }, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.color(card)=='black'?1:-1; + }); + 'step 1' + if(result.bool&&player.maxHp>player.hp){ + var cards=get.cards(player.maxHp-player.hp); + event.cards=cards; + player.chooseTarget(true).set('ai',function(target){ + return get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); + }).set('createDialog',['请选择一名角色获得这些牌',event.cards]); + } + else{ + event.finish(); + } + 'step 2' + player.line(result.targets); + result.targets[0].gain(event.cards,'draw'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0]; + if(target.hasFriend()){ + if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1]; + } + } + }, + threaten:function(player,target){ + if(target.hp==1) return 3; + if(target.hp==2) return 2; + return 1; + }, + } + }, + oldqianxi:{ + audio:2, + trigger:{source:'damageBegin2'}, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(event.player.hp==event.player.maxHp) return att<0; + if(event.player.hp==event.player.maxHp-1&& + (event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0; + return att>0; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.judge(function(card){ + return get.suit(card)!='heart'?1:-1; + }); + 'step 1' + if(result.bool){ + trigger.cancel(); + trigger.player.loseMaxHp(true); + } + } + }, + old_fuhun:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + 'step 0' + trigger.changeToZero(); + 'step 1' + var cards=get.cards(2); + event.cards=cards; + player.showCards(cards,get.translation(player)+'发动了【父魂】'); + 'step 2' + player.gain(cards,'gain2'); + if(get.color(cards[0])!=get.color(cards[1])){ + player.addTempSkill('wusheng'); + player.addTempSkill('paoxiao'); + } + }, + }, + shiyong:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.getParent(2).jiu==true); + }, + content:function(){ + player.loseMaxHp(); + } + }, + xindanshou:{ + audio:'danshou', + trigger:{ + global:'phaseJieshuBegin', + target:'useCardToTargeted', + }, + direct:true, + filter:function(event,player,name){ + return ((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))|| + (event.targets&&event.targets.contains(player)&&['basic','trick'].contains(get.type(event.card,'trick')))) + &&!player.hasSkill('xindanshou_as'); + }, + content:function(){ + 'step 0' + if(event.triggername=='phaseJieshuBegin'){ + var num=trigger.player.countCards('h'); + if(num>0) player.chooseToDiscard(get.prompt('xindanshou',trigger.player),num,'弃置'+get.cnNumber(num)+'张牌并对'+get.translation(trigger.player)+'造成1点伤害','he').set('logSkill',['xindanshou',trigger.player]).set('ai',function(card){ + if(get.damageEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0) return 6-get.value(card); + return -1; + }); + else player.chooseBool(get.prompt('xindanshou',trigger.player),'对'+get.translation(trigger.player)+'造成1点伤害').ai=function(){ + return get.damageEffect(trigger.player,player,player)>0 + }; + } + else{ + var num=0; + game.countPlayer2(function(current){ + var history=current.getHistory('useCard'); + for(var j=0;j1; + }); + }, + filterx:function(event,player){ + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); + })){ + return true; + } + } + return false; + }, + content:function(){ + "step 0" + event.videoId=lib.status.videoId++; + var func=function(card,id,bool){ + var list=[ + '为XXX多指定一个目标', + '令XXX无视防具', + '令XXX不可被抵消', + '当XXX造成伤害时摸一张牌', + ]; + var choiceList=ui.create.dialog('【奔袭】:请选择一至两项','forcebutton'); + choiceList.videoId=id; + for(var i=0;i0; + })) return 1.2+Math.random(); + return 0; + } + case 1:{ + return Math.random(); + } + case 2:{ + if(event.card.name=='sha'||event.card.name=='juedou'||get.type(event.type)=='trick'&&game.hasPlayer(function(current){ + return get.attitude(current,player)<0&¤t.hasWuxie(); + })) return 1+Math.random(); + return Math.random(); + } + case 3:{ + return get.tag(event.card,'damage')+Math.random(); + } + } + }); + "step 1" + if(player.isOnline2()){ + player.send('closeDialog',event.videoId); + } + event.dialog.close(); + var map=[ + function(trigger,player,event){ + player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',true,function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.contains(target)) return false; + return lib.filter.targetEnabled2(_status.event.card,player,target); + }).set('targets',trigger.targets).set('card',trigger.card).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }); + }, + function(trigger,player,event){ + player.storage.xinbenxi_unequip.add(trigger.card); + }, + function(trigger,player,event){ + player.storage.xinbenxi_directHit.add(trigger.card); + trigger.nowuxie=true; + trigger.customArgs.default.directHit2=true; + }, + function(trigger,player,event){ + player.storage.xinbenxi_damage.add(trigger.card); + } + ]; + for(var i=0;ite) return false; + if((s.contains('等于')||target.countCards('he')==0)&&pe==te) return false; + if(s.contains('小于')&&peth){ + player.storage.xinyaoming.push('大于'); + target.draw(); + event.finish(); + } + else if(ph==th){ + player.storage.xinyaoming.push('等于'); + target.chooseToDiscard('he','弃置一到两张牌,然后摸等量的牌',true,[1,2]).ai=lib.skill.zhiheng.check; + } + else{ + player.storage.xinyaoming.push('小于'); + player.discardPlayerCard(target,'h',true); + event.finish(); + } + } + else event.finish(); + 'step 2' + if(result.bool) target.draw(result.cards.length); + }, + group:'xinyaoming_kanon', + subSkill:{ + kanon:{ + trigger:{global:'phaseAfter'}, + silent:true, + sub:true, + content:function(){lib.skill.xinyaoming.init(player)} + }, + }, + }, + xinzhenjun:{ + audio:'jieyue', + trigger:{ + player:'phaseUseBegin' + }, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterCard:true, + filterTarget:lib.filter.notMe, + position:'he', + prompt:get.prompt2('xinzhenjun'), + ai1:function(card){ + var player=_status.event.player; + if(card.name=='sha'&&get.color(card)=='red'){ + for(var i=0;i0&¤t.hasValueTarget(card)) return 7; + } + return 0; + } + return 7-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player; + var card=ui.selected.cards[0]; + var att=get.attitude(player,target); + if(get.value(card)<0) return -att*2; + if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&target.hasValueTarget(card))) return att*2; + var eff=0; + game.countPlayer(function(current){ + if(target!=current&&get.distance(target,current,'attack')>1) return; + var eff2=get.damageEffect(current,player,player); + if(eff2>eff) eff=eff2; + }); + if(att>0&&eff>0) eff+=2*att; + return eff; + }, + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xinzhenjun',target); + target.gain(result.cards,player,'giveAuto') + } + else event.finish(); + 'step 2' + target.chooseToUse({ + filterCard:function(card){ + return get.name(card)=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments); + }, + prompt:'请使用一张不为黑色的【杀】,否则'+get.translation(player)+'可以对你或你攻击范围内的一名其他角色造成1点伤害', + }); + 'step 3' + if(result.bool){ + var num=1; + game.countPlayer2(function(current){ + current.getHistory('damage',function(evt){ + if(evt.getParent(evt.notLink()?4:8)==event) num+=evt.num; + }); + }); + player.draw(num); + event.finish(); + } + else{ + player.chooseTarget('是否对'+get.translation(target)+'或其攻击范围内的一名角色造成1点伤害?',function(card,player,target){ + return target==_status.event.targetx||_status.event.targetx.inRange(target); + }).set('targetx',event.target).ai=function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player) + }; + } + 'step 4' + if(result.bool){ + player.line(result.targets); + result.targets[0].damage('nocard'); + } + }, + //group:['xinzhenjun_damage'], + subSkill:{ + damage:{ + trigger:{global:'damage'}, + forced:true, + silent:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent(event.notLink()?4:8); + return evt&&evt.name=='xinzhenjun'&&evt.player==player; + }, + content:function(){ + player.draw(trigger.num); + }, + }, + }, + }, + xinfuli:{ + audio:'fuli', + skillAnimation:true, + animationColor:'soil', + audio:2, + unique:true, + limited:true, + enable:'chooseToUse', + init:function(player){ + player.storage.xinfuli=false; + }, + mark:true, + filter:function(event,player){ + if(event.type!='dying') return false; + if(player!=event.dying) return false; + if(player.storage.xinfuli) return false; + return true; + }, + content:function(){ + "step 0" + player.awakenSkill('xinfuli'); + event.num=game.countGroup(); + player.recover(event.num-player.hp); + "step 1" + var num2=num-player.countCards('h'); + if(num2) player.draw(num2); + "step 2" + if(num>2) player.turnOver(); + player.storage.xinfuli=true; + }, + ai:{ + save:true, + skillTagFilter:function(player){ + return player.hp<=0&&player.storage.xinfuli!=true; + }, + result:{ + player:10 + }, + threaten:function(player,target){ + if(!target.storage.xinfuli) return 0.9; + } + }, + intro:{ + content:'limited' + } + }, + xindangxian:{ + trigger:{player:'phaseBegin'}, + forced:true, + audio:'dangxian', + audioname:['guansuo'], + content:function(){ + 'step 0' + player.phaseUse().xindangxian=true; + 'step 1' + var stat=player.getStat(); + stat.card={}; + for(var i in stat.skill){ + var bool=false; + var info=lib.skill[i]; + if(info.enable!=undefined){ + if(typeof info.enable=='string'&&info.enable=='phaseUse') bool=true; + else if(typeof info.enable=='object'&&info.enable.contains('phaseUse')) bool=true; + } + if(bool) stat.skill[i]=0; + } + }, + group:'xindangxian_rewrite', + subSkill:{ + rewrite:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + filter:function(kagari){ + return kagari.xindangxian==true; + }, + content:function(){ + 'step 0' + if(player.storage.xinfuli){ + player.chooseBool('是否失去1点体力并获得一张【杀】?').ai=function(){ + return player.hp>2&&!player.hasSha(); + }; + } + else event._result={bool:true}; + 'step 1' + if(!result.bool){ + event.finish(); + return; + } + player.loseHp(); + 'step 2' + var card=get.cardPile(function(card){ + return card.name=='sha'; + }); + if(card) player.gain(card,'gain2'); + 'step 3' + game.updateRoundNumber(); + }, + }, + }, + }, + xinjunxing:{ + inherit:'junxing', + audio:'junxing', + content:function(){ + "step 0" + var types=[]; + for(var i=0;i=0?-1:(9-get.value(card)); + }; + "step 1" + if(result.bool){ + player.gain(result.cards,targets[0],'give'); + } + else{ + if(targets[0].canUse('sha',targets[1])) targets[0].useCard({name:'sha',isCard:true},targets[1]); + } + }, + ai:{ + result:{ + target:function(player,target){ + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + return get.effect(target,{name:'sha'},from,target); + } + var effs=[0,0]; + game.countPlayer(function(current){ + if(current!=target&&target.canUse('sha',current)){ + var eff=get.effect(current,{name:'sha'},target,target); + if(eff>effs[0]) effs[0]=eff; + if(eff0?0:1]; + } + }, + order:8.5, + expose:0.2 + } + }, + xinzongzuo:{ + trigger:{global:'phaseBefore'}, + forced:true, + priority:10, + audio:'zongzuo', + filter:function(event,player){ + return !player.storage.xinzongzuo; + }, + content:function(){ + 'step 0' + player.storage.xinzongzuo=true; + var num=game.countGroup(); + player.gainMaxHp(num); + event.num=num; + 'step 1' + player.recover(event.num); + //player.update(); + }, + group:'xinzongzuo_lose', + subSkill:{ + lose:{ + trigger:{global:'dieAfter'}, + forced:true, + audio:'zongzuo', + filter:function(event,player){ + if(!lib.group.contains(event.player.group)) return false; + if(game.hasPlayer(function(current){ + return current.group==event.player.group; + })){ + return false; + } + return true; + }, + content:function(){ + 'step 0' + player.loseMaxHp(); + 'step 1' + player.draw(2); + } + } + } + }, + xintaoluan:{ + audio:'taoluan', + enable:'chooseToUse', + filter:function(event,player){ + return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('xintaoluan3')&&player.countCards('he')>0&&!_status.dying.length; + }, + init:function(player){ + if(!player.storage.xintaoluan) player.storage.xintaoluan=[]; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;i0) return 0; + if(button.link[2]=='wugu') return; + var effect=player.getUseValue(button.link[2]); + if(effect>0) return effect; + return 0; + }, + backup:function(links,player){ + return { + filterCard:true, + audio:'taoluan', + selectCard:1, + popname:true, + check:function(card){ + return 6-get.value(card); + }, + position:'he', + viewAs:{name:links[0][2],nature:links[0][3]}, + 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(result.card.name); + }, + } + }, + prompt:function(links,player){ + return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:4, + result:{ + player:function(player){ + if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0; + var players=game.filterPlayer(); + for(var i=0;i((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){ + return 1; + } + } + return 0; + } + }, + threaten:1.9, + }, + group:['xintaoluan2','xintaoluan4','xintaoluan5'] + }, + xintaoluan2:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='xintaoluan_backup'||event.skill=='xintaoluan5'||event.skill=='xintaoluan4'; + }, + 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.chooseTarget(true,function(card,player,target){ + return target!=player; + },'滔乱

    令一名其他角色选择一项:1.交给你'+get.cnNumber(event.num)+'张与你以此法使用的牌类别相同的牌;2.你失去'+get.cnNumber(event.num)+'点体力').set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0){ + if(get.attitude(target,player)>0){ + return target.countCards('h'); + } + return target.countCards('h')/2; + } + return 0; + }); + 'step 1' + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + var type=get.type(trigger.card,'trick'); + target.chooseCard('滔乱

    交给'+get.translation(player)+get.cnNumber(num)+'张不为'+get.translation(type)+'牌的牌,或令其失去'+get.cnNumber(num)+'点体力且滔乱无效直到回合结束','he',num,function(card,player,target){ + return get.type(card,'trick')!=_status.event.cardType; + }).set('cardType',type).set('ai',function(card){ + if(_status.event.att){ + return 11-get.value(card); + } + return 0; + }).set('att',get.attitude(target,player)>0); + 'step 2' + var target=event.target; + if(result.bool){ + player.gain(result.cards,target,'give'); + } + else{ + player.addTempSkill('xintaoluan3'); + player.loseHp(num); + } + } + }, + xintaoluan3:{}, + xintaoluan4:{ + audio:'taoluan', + prompt:'将一张牌当做闪使用', + enable:'chooseToUse', + filter:function(event,player){ + return player.countCards('he')&&!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:'he', + 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((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('he')&&!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('he')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; + }, + viewAsFilter:function(player){ + return player.countCards('he')&&(!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:'he', + 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((player.storage.xintaoluan2+1)*2)&&get.attitude(player,players[i])>0){ + return 6-get.value(card); + } + } + return 0; + }, + }, + xintaoluan6:{ + trigger:{global:'phaseAfter'}, + silent:true, + content:function(){ + player.storage.xintaoluan=[]; + player.storage.xintaoluan2=0; + }, + }, + xintaoluan_backup:{}, + xincaishi:{ + trigger:{ + player:'phaseDrawBegin2' + }, + audio:'caishi', + direct:true, + content:function(){ + 'step 0' + var choiceList=[ + '手牌上限-1且发动【忠鉴】时可以多展示对方的一张牌' + ]; + if(!trigger.numFixed){ + choiceList.push('摸牌阶段多摸两张牌,然后本回合内不能发动【忠鉴】'); + if(trigger.num>0){ + choiceList.unshift('摸牌阶段少摸一张牌,发动【忠鉴】时可以多展示自己的一张牌直到回合结束'); + event.first=true; + } + } + var next=player.chooseControl('cancel2'); + next.set('choiceList',choiceList); + next.set('prompt',get.prompt('xincaishi')); + next.set('ai',function(){return 2}); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('xincaishi'); + if(!event.first) result.index++; + trigger.num+=(result.index>1?2:(result.index-1)); + player.addTempSkill('xincaishi_'+result.index); + } + }, + subSkill:{ + '0':{ + mark:true, + intro:{ + content:'发动【忠鉴】时可以多展示自己的一张牌', + }, + }, + '1':{ + mark:true, + intro:{ + content:'发动【忠鉴】时可以多展示目标角色的一张牌', + }, + mod:{ + maxHandcard:function(player,num){ + return num-1; + }, + }, + }, + '2':{ + mark:true, + intro:{ + content:'不能发动【忠鉴】直到回合结束', + }, + }, + }, + }, + xinzhongjian:{ + audio:'zhongjian', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return (!player.hasSkill('xincaishi_2'))&&player.countCards('h')>0; + }, + filterTarget:function(event,player,target){ + return target!=player&&target.countCards('h')>0; + }, + filterCard:true, + selectCard:function(){ + return _status.event.player.hasSkill('xincaishi_0')?[1,2]:[1,1]; + }, + check:function(){return 1}, + discard:false, + lose:false, + content:function(){ + 'step 0' + event.suits=[]; + event.nums=[]; + for(var i=0;ite&&target.isDamaged()&&get.attitude(player,target)>2) return true; + else if(pe==te&&get.attitude(player,target)>2) return true; + else if(pete) return "回复体力"; + else if(pe==te) return "摸一张牌"; + else if(pete) target.recover(); + else if(pe==te) target.draw(); + else if(pete&&target.isDamaged()) return 2; + else if(pe==te) return 1; + else if(pe0){ + for(var i=0;i
  • 已对'+str+'发动过〖残韵〗'); + } + return str2; + }, + }, + mark:true, + enable:"phaseUse", + usable:1, + check:function (cardx){ + var player=_status.event.player; + var number=game.countPlayer(function(target){ + if(player==target) return false; + var pe=player.countCards('e',function(card){ + return card!=cardx&&ui.selected.cards.contains(card)==false; + }); + var te=target.countCards('e'); + if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true; + else if(pete) return "回复体力"; + else if(pe==te) return "摸一张牌"; + else if(pete) target.recover(); + else if(pe==te) target.draw(); + else if(pete&&target.isDamaged()) return 2; + else if(pe==te) return 1; + else if(pecurrent.hp; + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('zhenjun'),function(card,player,target){ + return target.countCards('h')>target.hp; + }).ai=function(target){ + return -get.attitude(_status.event.player,target)*(target.countCards('e')+1); + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + var num=target.countCards('h')-target.hp; + player.line(target,'thunder'); + player.logSkill('zhenjun',target); + player.discardPlayerCard(num,target,true); + } + 'step 2' + if(result.cards&&result.cards.length){ + event.num=0; + event.num2=result.cards.length; + for(var i=0;i0){ + var prompt='弃置'+get.cnNumber(event.num)+'张牌,或令'+get.translation(event.target)+'摸'+get.cnNumber(event.num2)+'张牌'; + player.chooseToDiscard(event.num,prompt,'he').ai=function(card){ + return 5-get.value(card); + } + } + else event.finish(); + } + else event.finish(); + 'step 3' + if(!result.bool){ + event.target.draw(event.num2); + } + }, + }, + rezhenjun:{ + audio:"jieyue", + trigger:{ + player:"phaseZhunbeiBegin", + }, + filter:function (event,player){ + return game.hasPlayer(function(current){ + return current.countCards('h')>0; + }); + }, + direct:true, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt2('rezhenjun')).ai=function(target){ + return -get.attitude(_status.event.player,target)*(target.countCards('e')+1); + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + var num=Math.max(target.countCards('h')-target.hp,1); + player.logSkill('rezhenjun',target); + player.discardPlayerCard(num,target,true); + } + 'step 2' + if(result.cards&&result.cards.length){ + event.num=0; + for(var i=0;i0){ + var prompt='弃置'+get.cnNumber(event.num)+'张牌,或令'+get.translation(event.target)+'摸'+get.cnNumber(event.num)+'张牌'; + player.chooseToDiscard(event.num,prompt,'he').ai=function(card){ + return 5-get.value(card); + } + } + else event.finish(); + } + else event.finish(); + 'step 3' + if(!result.bool){ + event.target.draw(event.num); + } + }, + }, + fenli:{ + audio:2, + group:['fenli_draw','fenli_use','fenli_discard'], + subfrequent:['discard'], + subSkill:{ + draw:{ + audio:'fenli', + trigger:{player:'phaseDrawBefore'}, + prompt:'是否发动【奋励】跳过摸牌阶段?', + filter:function(event,player){ + return player.isMaxHandcard(); + }, + check:function(event,player){ + if(player.getHistory('skipped').length>0) return false; + return game.hasPlayer(function(current){ + return get.attitude(player,current)<0&¤t.hp==1&&get.damageEffect(current,player,player)>0; + }); + }, + content:function(){ + trigger.cancel(); + } + }, + use:{ + audio:'fenli', + trigger:{player:'phaseUseBefore'}, + prompt:'是否发动【奋励】跳过出牌阶段?', + filter:function(event,player){ + return player.isMaxHp(); + }, + check:function(event,player){ + if(!player.needsToDiscard()||(player.countCards('e')&&player.isMaxEquip())) return true; + if(player.getHistory('skipped').length>0) return false; + return game.hasPlayer(function(current){ + return get.attitude(player,current)<0&¤t.hp==1&&get.damageEffect(current,player,player)>0; + }); + }, + content:function(){ + trigger.cancel(); + } + }, + discard:{ + audio:'fenli', + trigger:{player:'phaseDiscardBefore'}, + prompt:'是否发动【奋励】跳过弃牌阶段?', + frequent:true, + filter:function(event,player){ + return player.isMaxEquip()&&player.countCards('e'); + }, + content:function(){ + trigger.cancel(); + } + } + }, + ai:{ + combo:'pingkou' + } + }, + pingkou:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.getHistory('skipped').length>0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.getHistory('skipped').length],get.prompt2('pingkou'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + player.logSkill('pingkou',result.targets); + event.targets=result.targets.slice(0).sortBySeat(); + } + else{ + event.finish(); + } + 'step 2' + if(event.targets&&event.targets.length){ + event.targets.shift().damage(); + event.redo(); + } + }, + ai:{ + combo:'fenli', + effect:{ + target:function(card){ + if(card.name=='lebu'||card.name=='bingliang') return 0.5; + } + } + } + }, + xinanguo:{ + audio:'anguo', + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + if(target.isMinHandcard()){ + target.draw(); + event.h=true; + } + 'step 1' + if(target.isMinHp()&&target.isDamaged()){ + target.recover(); + event.hp=true; + } + 'step 2' + var equip=get.cardPile(function(card){ + return get.type(card)=='equip'&&target.hasUseTarget(card); + }); + if(target.isMinEquip()&&equip){ + target.chooseUseTarget(equip,'noanimate','nopopup',true); + event.e=true; + } + 'step 3' + game.updateRoundNumber(); + if(!event.h&&player.isMinHandcard()){ + player.draw(); + } + 'step 4' + if(!event.hp&&player.isMinHp()&&player.isDamaged()){ + player.recover(); + } + 'step 5' + if(!event.e&&player.isMinEquip()){ + var equip=get.cardPile(function(card){ + return get.type(card)=='equip'&&target.hasUseTarget(card); + }); + if(equip) player.chooseUseTarget(equip,'noanimate','nopopup',true); + } + 'step 6' + game.updateRoundNumber(); + }, + ai:{ + threaten:1.6, + order:9, + result:{ + player:function(player,target){ + if(get.attitude(player,target)<=0){ + if(target.isMinHandcard()||target.isMinEquip()||target.isMinHp()) return -1; + } + var num=0; + if(player.isMinHandcard()||target.isMinHandcard()) num++; + if(player.isMinEquip()||target.isMinEquip()) num++; + if((player.isMinHp()&&player.isDamaged())||(target.isMinHp()&&target.isDamaged())) num+=2.1; + return num; + } + } + } + }, + pindi:{ + audio:2, + enable:'phaseUse', + filterTarget:function(card,player,target){ + if(player==target) return false; + if(player.storage.pindi_target&& + player.storage.pindi_target.contains(target)){ + return false; + } + return true; + }, + filterCard:function(card,player){ + if(player.storage.pindi_type&& + player.storage.pindi_type.contains(get.type2(card))){ + return false; + } + return true; + }, + subSkill:{ + clear:{ + trigger:{player:'phaseAfter'}, + silent:true, + content:function(){ + delete player.storage.pindi_target; + delete player.storage.pindi_type; + } + } + }, + //group:'pindi_clear', + check:function(card){ + var num=_status.event.player.getStat('skill').pindi||0; + return 6+num-get.value(card); + }, + position:'he', + content:function(){ + 'step 0' + if(!player.storage.pindi_target){ + player.storage.pindi_target=[]; + } + if(!player.storage.pindi_type){ + player.storage.pindi_type=[]; + } + player.storage.pindi_target.push(target); + player.storage.pindi_type.push(get.type2(cards[0],cards[0].original=='h'?player:false)); + event.num=player.getStat('skill').pindi; + var evt=_status.event.getParent('phase'); + if(evt&&evt.name=='phase'&&!evt.pindi){ + var next=game.createEvent('rerende_clear'); + _status.event.next.remove(next); + evt.after.push(next); + evt.pindi=true; + next.player=player; + next.setContent(lib.skill.pindi_clear.content); + } + player.syncStorage(); + if(target.countCards('he')==0) event._result={index:0}; + else{ + player.chooseControlList([ + '令'+get.translation(target)+'摸'+get.cnNumber(event.num)+'张牌', + '令'+get.translation(target)+'弃置'+get.cnNumber(event.num)+'张牌' + ],function(){ + return _status.event.choice; + }).set('choice',get.attitude(player,target)>0?0:1); + } + 'step 1' + if(result.index==0){ + target.draw(event.num); + } + else{ + target.chooseToDiscard(event.num,'he',true); + } + 'step 2' + if(target.isDamaged()){ + player.link(true); + } + }, + ai:{ + order:8, + threaten:1.8, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + var num=(player.getStat('skill').pindi||0)+1; + if(att<=0&&target.countCards('he')0; + } + else return event.cards.filterInD('od').length>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + if(!player.hasSkill('funan_jiexun')){ + var cards=[] + if(get.itemtype(trigger.respondTo[1])=='card') cards.push(trigger.respondTo[1]); + else if(trigger.respondTo[1].cards) cards.addArray(trigger.respondTo[1].cards); + cards=cards.filterInD('od'); + trigger.player.gain(cards,'gain2','log'); + trigger.player.addTempSkill('funan_use'); + if(!trigger.player.storage.funan_use){ + trigger.player.storage.funan_use=[]; + } + trigger.player.storage.funan_use.addArray(cards); + } + 'step 1' + var cards=trigger.cards.filterInD('od'); + player.gain(cards,'log','gain2'); + }, + subSkill:{ + jiexun:{ + charlotte:true, + mark:true, + intro:{ + content:'你发动“复难”时,无须令其他角色获得你使用的牌' + }, + }, + use:{ + onremove:true, + mod:{ + cardEnabled2:function(card,player){ + if(player.storage.funan_use&&player.storage.funan_use.contains(card)){ + return false; + } + } + } + } + } + }, + jiexun:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + onremove:true, + direct:true, + content:function(){ + 'step 0' + var num1=game.countPlayer(function(current){ + return current.countCards('ej',{suit:'diamond'}); + }); + var num2=player.countMark('jiexun'); + event.num1=num1; + event.num2=num2; + var str='令目标摸'+get.cnNumber(num1)+'张牌'; + if(num2){ + str+=',然后弃置'+get.cnNumber(num2)+'张牌;若目标因此法弃置了所有牌,则你失去“诫训”,然后你发动“复难”时,无须令其获得你使用的牌'; + } + player.chooseTarget(get.prompt('jiexun'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return _status.event.coeff*get.attitude(_status.event.player,target); + }).set('coeff',num1>=num2?1:-1).set('prompt2',str); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('jiexun',target); + if(event.num1){ + target.draw(event.num1); + } + player.addMark('jiexun',1,false); + } + else{ + event.finish(); + } + 'step 2' + if(event.num2){ + event.target.chooseToDiscard(event.num2,true,'he'); + } + else{ + event.finish(); + } + 'step 3' + if(result.bool&&result.autochoose&&result.cards.length==result.rawcards.length){ + player.removeSkill('jiexun'); + player.addSkill('funan_jiexun'); + } + } + }, + zhuandui:{ + shaRelated:true, + audio:2, + group:['zhuandui_respond','zhuandui_use'], + subSkill:{ + use:{ + audio:"zhuandui", + trigger:{player:'useCardToPlayered'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + filter:function(event,player){ + return event.card.name=='sha'&&player.canCompare(event.target); + }, + logTarget:'target', + content:function(){ + 'step 0' + player.chooseToCompare(trigger.target); + 'step 1' + if(result.bool){ + trigger.getParent().directHit.add(trigger.target); + } + } + }, + respond:{ + audio:"zhuandui", + trigger:{target:'useCardToTargeted'}, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)<0; + }, + filter:function(event,player){ + return event.card.name=='sha'&&player.canCompare(event.player); + }, + logTarget:'player', + content:function(){ + 'step 0' + player.chooseToCompare(trigger.player); + 'step 1' + if(result.bool){ + trigger.getParent().excluded.add(player); + } + } + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&¤t<0) return 0.7; + } + } + } + }, + tianbian:{ + audio:2, + enable:"chooseCard", + check:function(event,player){ + var player=_status.event.player; + return (!player.hasCard(function(card){ + var val=get.value(card); + return val<0||(val<=4&&card.number>=11); + },'h'))?20:0; + }, + filter:function(event){ + return event.type=='compare'&&!event.directresult; + }, + onCompare:function(player){ + return game.cardsGotoOrdering(get.cards()).cards; + }, + group:'tianbian_number', + subSkill:{ + number:{ + trigger:{player:'compare',target:'compare'}, + filter:function(event,player){ + if(event.iwhile) return false; + if(event.player==player){ + return get.suit(event.card1)=='heart';//&&event.card1.vanishtag.contains('tianbian'); + } + else{ + return get.suit(event.card2)=='heart';//&&event.card2.vanishtag.contains('tianbian'); + } + }, + silent:true, + content:function(){ + game.log(player,'拼点牌点数视为','#yK'); + if(player==trigger.player){ + trigger.num1=13; + } + else{ + trigger.num2=13; + } + } + } + } + }, + jianzheng:{ + audio:2, + trigger:{global:'useCardToPlayer'}, + filter:function(event,player){ + if(!player.countCards('h')) return false; + return event.player!=player&&event.card.name=='sha'&&!event.targets.contains(player)&& + event.player.inRange(player); + }, + direct:true, + content:function(){ + "step 0" + var effect=0; + for(var i=0;i0){ + if(get.color(trigger.card)!='black'){ + effect=0; + } + else{ + effect=1; + } + if(trigger.targets.length==1){ + if(trigger.targets[0].hp==1){ + effect++; + } + if(effect>0&&trigger.targets[0].countCards('h')0){ + effect+=6; + } + } + player.chooseCard('h',get.prompt2('jianzheng',trigger.player)).set('ai',function(card){ + if(_status.event.effect>=0){ + var val=get.value(card); + if(val<0) return 10-val; + return _status.event.effect-val; + } + return 0; + }).set('effect',effect).set('logSkill',['jianzheng',trigger.player]); + "step 1" + if(result.bool&&result.cards){ + event.card=result.cards[0]; + trigger.targets.length=0; + trigger.getParent().triggeredTargets1.length=0; + } + else{ + event.finish(); + } + "step 2" + if(!event.isMine()) game.delayx(); + "step 3" + if(event.card){ + player.logSkill('jianzheng',trigger.player); + player.lose(event.card,ui.special,'visible'); + player.$throw(event.card,1000); + } + "step 4" + if(event.card){ + event.card.fix(); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + game.updateRoundNumber(); + game.log(player,'将',card,'置于牌堆顶'); + } + "step 5" + if(get.color(trigger.card)!='black'){ + trigger.getParent().targets.push(player); + trigger.player.line(player); + game.delay(); + } + } + }, + qingxian:{ + audio:2, + group:['qingxian_jilie','qingxian_rouhe','qingxian_dying'], + ai:{ + threaten:0.8, + maixie:true, + maixie_hp:true, + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(target.hp>1&&target.hasFriend()) return 0.8; + } + } + } + }, + subSkill:{ + dying:{ + audio:'qingxian', + trigger:{global:'dyingAfter'}, + filter:function(event,player){ + return player.storage.qingxian&&player.storage.qingxian>0&&!_status.dying.length; + }, + direct:true, + content:function(){ + 'step 0' + player.storage.qingxian--; + player.chooseTarget(get.prompt('qingxian'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.isHealthy()&&att>0) return 0; + if(target.hp==1&&att!=0){ + if(att>0) return 9; + else return 10; + } + else{ + return Math.sqrt(Math.abs(att)); + } + }).set('prompt2','当你回复体力后,你可以令一名其他角色执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力'); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('qingxian',target); + event.insert(lib.skill.qingxian.content_choose,{target:target,player:player}); + } + 'step 2' + if(lib.skill.qingxian_dying.filter(trigger,player)) event.goto(0); + } + }, + rouhe:{ + audio:'qingxian', + trigger:{player:'recoverEnd'}, + direct:true, + content:function(){ + 'step 0' + if(_status.dying.length){ + if(!player.storage.qingxian) player.storage.qingxian=0; + player.storage.qingxian++; + event.finish(); + return; + } + player.chooseTarget(get.prompt('qingxian'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.isHealthy()&&att>0) return 0; + if(target.hp==1&&att!=0){ + if(att>0) return 9; + else return 10; + } + else{ + return Math.sqrt(Math.abs(att)); + } + }).set('prompt2','当你回复体力后,你可以令一名其他角色执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力'); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('qingxian',target); + event.insert(lib.skill.qingxian.content_choose,{target:target,player:player}); + } + } + }, + jilie:{ + audio:'qingxian', + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.isIn(); + }, + check:function(event,player){ + if(get.attitude(player,event.source)>0&&event.source.isHealthy()){ + return false; + } + return true; + }, + logTarget:'source', + prompt2:'当你受到伤害后,你可以令伤害来源执行一项:失去1点体力,随机使用一张装备牌;回复1点体力,弃置一张装备牌。若其以此法使用或弃置的牌为梅花,你回复1点体力', + content:function(){ + event.insert(lib.skill.qingxian.content_choose,{target:trigger.source,player:player}); + } + } + }, + content_choose:function(){ + 'step 0' + if(target.isHealthy()){ + event._result={index:0} + } + else{ + var index; + if(get.attitude(player,target)>0){ + index=1; + } + else{ + index=0; + } + player.chooseControlList( + ['令'+get.translation(target)+'失去1点体力,随机使用一张装备牌', + '令'+get.translation(target)+'回复1点体力,弃置一张装备牌'], + true,function(event,player){ + return _status.event.index; + }).set('index',index); + } + 'step 1' + if(result.index==0){ + target.loseHp(); + event.card=get.cardPile(function(card){ + return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card)); + }); + if(event.card){ + target.chooseUseTarget(event.card,'noanimate','nopopup',true); + event.goto(3); + } + else{ + event.finish(); + } + } + else{ + target.recover(); + if(target.countCards('he',{type:'equip'})){ + target.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ + return get.type(card)=='equip'; + }).set('ai',function(card){ + var val=-get.value(card); + if(get.suit(card)=='club'){ + val+=_status.event.att*10; + } + return val; + }).set('att',get.sgnAttitude(target,player)); + } + else{ + event.finish(); + } + } + 'step 2' + if(result&&result.cards){ + event.card=result.cards[0]; + } + 'step 3' + if(event.card&&get.suit(event.card)=='club'){ + player.draw(); + } + } + }, + juexiang:{ + audio:2, + trigger:{player:'die'}, + direct:true, + forceDie:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('juexiang'),function(card,player,target){ + return target!=player; + }).set('forceDie',true).set('ai',function(target){ + return get.attitude(_status.event.player,target)/Math.sqrt(target.hp+1); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0] + player.logSkill('juexiang',target); + target.addSkill(lib.skill.juexiang.derivation.randomGet()); + target.addTempSkill('juexiang_club',{player:'phaseZhunbeiBegin'}); + } + }, + derivation:['juexiang_ji','juexiang_lie','juexiang_rou','juexiang_he'], + subSkill:{ + ji:{ + audio:1, + mark:true, + nopop:true, + intro:{ + content:'info' + }, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.isIn()&&event.source!=player; + }, + check:function(event,player){ + return get.attitude(player,event.source)<0; + }, + logTarget:'source', + content:function(){ + trigger.source.loseHp(); + var card=get.cardPile(function(card){ + return get.type(card)=='equip'; + }); + if(card){ + trigger.source.chooseUseTarget(card,'noanimate','nopopup',true); + } + }, + ai:{ + maixie_defend:true, + } + }, + lie:{ + audio:1, + mark:true, + nopop:true, + intro:{ + content:'info' + }, + trigger:{ + player:'recoverEnd', + global:'dyingAfter', + }, + direct:true, + content:function(){ + 'step 0' + if(_status.dying.length){ + if(event.triggername=='recoverEnd'){ + if(!player.storage.juexiang_lie) player.storage.juexiang_lie=0; + player.storage.juexiang_lie++; + } + event.finish(); + return; + } + if(event.triggername=='dyingAfter'){ + if(!player.storage.juexiang_lie){ + event.finish(); + return; + }; + player.storage.juexiang_lie--; + } + player.chooseTarget(get.prompt2('juexiang_lie'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return -get.attitude(player,target)/(1+target.hp); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('juexiang_lie',target); + target.loseHp(); + var card=get.cardPile(function(card){ + return get.type(card)=='equip'; + }); + if(card){ + target.chooseUseTarget(card,true,'noanimate','nopopup',true); + } + } + if(event.triggername=='dyingAfter'&&player.storage.juexiang_lie>0) event.goto(0); + } + }, + rou:{ + audio:1, + mark:true, + nopop:true, + intro:{ + content:'info' + }, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.isIn()&&event.source!=player; + }, + check:function(event,player){ + var att=get.attitude(player,event.source); + if(player.isHealthy()){ + return att<0; + } + else{ + return att>0 + } + }, + logTarget:'source', + content:function(){ + trigger.source.recover(); + if(trigger.source.countCards('he',{type:'equip'})){ + trigger.source.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ + return get.type(card)=='equip'; + }); + } + }, + ai:{ + maixie_defend:true, + } + }, + he:{ + audio:1, + mark:true, + nopop:true, + intro:{ + content:'info' + }, + trigger:{player:'recoverEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('juexiang_he'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.isHealthy()&&target.countCards('he')){ + return -att; + } + else{ + return 10*att/(1+target.hp); + } + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('juexiang_he',target); + target.recover(); + if(target.countCards('he',{type:'equip'})){ + target.chooseToDiscard('he',true,'弃置一张装备牌',function(card){ + return get.type(card)=='equip'; + }); + } + } + } + }, + club:{ + mark:true, + nopop:true, + intro:{ + content:'info' + }, + mod:{ + targetEnabled:function(card,player,target){ + if(get.suit(card)=='club'&&player!=target){ + return false; + } + } + } + } + } + }, + bizhuan:{ + audio:2, + trigger:{player:'useCard',target:'useCardToTargeted'}, + filter:function(event,player){ + if(event.name!='useCard'&&event.player==event.target) return false; + if(player.storage.bizhuan.length>=4) return false; + return get.suit(event.card)=='spade'; + }, + init:function(player){ + if(!player.storage.bizhuan) player.storage.bizhuan=[]; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + frequent:true, + content:function(){ + var card=game.cardsGotoSpecial(get.cards()).cards[0]; + player.$draw(card); + game.delay(); + player.storage.bizhuan.push(card); + player.markSkill('bizhuan'); + }, + mod:{ + maxHandcard:function(player,num){ + if(player.storage.bizhuan&&player.storage.bizhuan.length) return num+player.storage.bizhuan.length; + } + } + }, + tongbo:{ + trigger:{player:'phaseDrawAfter'}, + direct:true, + filter:function(event,player){ + return player.storage.bizhuan&&player.storage.bizhuan.length; + }, + locked:false, + content:function(){ + "step 0" + var four=false; + var nofour=!player.hasFriend(); + if(player.storage.bizhuan.length==4){ + var suits=['club','spade','heart','diamond']; + var list=player.getCards('he').concat(player.storage.bizhuan); + for(var i=0;i1){ + if(val<=0) return 0.01; + return val; + } + else{ + return 0; + } + } + } + else{ + if(val<0) return -10; + if(_status.event.player.skipList.contains('phaseUse')){ + return -val; + } + return val; + } + }).set('four',event.four).set('suits2',suits2).set('nofour',event.nofour); + if(player==game.me&&!event.isMine()){ + game.delay(0.5); + } + "step 3" + player.gain(result.links,'fromStorage'); + for(var i=0;i0){ + event.finish(); + } + "step 5" + event.cards=player.storage.bizhuan.slice(0); + player.storage.bizhuan.length=0; + player.unmarkSkill('bizhuan'); + "step 6" + if(event.cards.length>1){ + player.chooseCardButton('将所有“书”交给任意名其他角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.finish(); + } + "step 7" + if(result.bool){ + for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0],player,'raw')<0); + } + else{ + event.finish(); + } + "step 8" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张','#g“书”'); + event.goto(6); + } + }, + ai:{ + combo:'bizhuan' + } + }, + shouxi:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + direct:true, + init:function(player){ + if(!player.storage.shouxi) player.storage.shouxi=[]; + }, + filter:function(event,player){ + return event.card.name=='sha'&&event.player.isAlive(); + }, + content:function(){ + 'step 0' + var list=['sha','shan','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman','lebu','bingliang','shandian']; + for(var i=0;i=0; + }, + content:function(){ + 'step 0' + event.list=game.filterPlayer(function(current){ + return current.countCards('h')0; + }, + logTarget:'player', + skillAnimation:true, + animationColor:'wood', + onWash:function(){ + _status.event.getParent('fuzhu').washed=false; + return 'remove'; + }, + content:function(){ + 'step 0' + event.washed=false; + lib.onwash.push(lib.skill.fuzhu.onWash); + event.total=game.players.length+game.dead.length; + 'step 1' + event.total--; + var card=get.cardPile2(function(card){ + return card.name=='sha'&&player.canUse(card,trigger.player,false); + }); + if(card){ + card.remove(); + game.updateRoundNumber(); + player.useCard(card,trigger.player,false); + } + 'step 2' + if(event.total>0&&!event.washed&&ui.cardPile.childElementCount<=player.hp*10&&trigger.player.isAlive()) event.goto(1); + 'step 3' + lib.onwash.remove(lib.skill.fuzhu.onWash); + var cards=get.cards(ui.cardPile.childElementCount+1); + for(var i=0;i1) str+='中的一人'; + return str; + }, + check:function(card){ + if(card.name=='sha') return 5; + return 8-get.value(card); + }, + content:function(){ + "step 0" + var targets=game.filterPlayer(function(current){ + return current.hasSkill('wengua'); + }); + if(targets.length==1){ + event.target=targets[0]; + event.goto(2); + } + else if(targets.length>0){ + player.chooseTarget(true,'选择【问卦】的目标',function(card,player,target){ + return _status.event.list.contains(target); + }).set('list',targets).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target); + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool&&result.targets.length){ + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + player.logSkill('wengua',event.target); + player.addTempSkill('wengua3','phaseUseEnd'); + event.card=cards[0]; + if(event.target!=player){ + player.give(cards,event.target); + } + } + else{ + event.finish(); + } + delete _status.noclearcountdown; + game.stopCountChoose(); + "step 3" + if(event.target.getCards('he').contains(event.card)){ + event.target.chooseControlList('问卦','将'+get.translation(event.card)+'置于牌堆顶','将'+get.translation(event.card)+'置于牌堆底',event.target==player,function(){ + if(get.attitude(event.target,player)<0) return 2; + return 1; + }); + } + else{ + event.finish(); + } + "step 4" + event.index=result.index; + if(event.index==0||event.index==1){ + event.target.lose(event.card,ui.special); + game.broadcastAll(function(player){ + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + },event.target); + } + else event.finish(); + "step 5" + game.delay(); + "step 6" + event.card.fix(); + if(event.index==1){ + game.log(event.target,'将获得的牌置于牌堆底'); + ui.cardPile.appendChild(event.card); + if(ui.cardPile.childElementCount==1||player==event.target){ + player.draw(); + } + else{ + game.asyncDraw([player,target],null,null); + } + } + else if(event.index==0){ + game.log(player,'将获得的牌置于牌堆顶'); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + if(ui.cardPile.childElementCount==1||player==event.target){ + player.draw('bottom'); + } + else{ + game.asyncDraw([player,target],null,null,true); + } + } + }, + ai:{ + order:2, + threaten:1.5, + result:{ + player:function(player,target){ + var target=game.findPlayer(function(current){ + return current.hasSkill('wengua'); + }); + if(target){ + return get.attitude(player,target); + } + } + } + } + }, + wengua3:{}, + daiyan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + init:function(){ + lib.onwash.push(function(){ + delete _status.daiyan_notao; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('daiyan'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>0){ + if(_status.daiyan_notao){ + return 0; + } + else{ + if(target==player.storage.daiyan) return 0; + return 2*att/Math.sqrt(1+target.hp); + } + } + else{ + if(_status.daiyan_notao){ + if(target==player.storage.daiyan) return -3*att; + return -att; + } + else{ + return 0; + } + } + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('daiyan',target); + var tao=get.cardPile2(function(card){ + return get.suit(card)=='heart'&&get.type(card)=='basic'; + }); + if(tao){ + target.gain(tao,'gain2'); + } + else{ + _status.daiyan_notao=true; + } + if(target==player.storage.daiyan){ + target.loseHp(); + } + player.storage.daiyan=target; + } + else{ + delete player.storage.daiyan; + } + }, + ai:{ + threaten:1.5, + expose:0.2 + } + }, + fumian:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ + 'step 0' + if(player.storage.fumian_choice=='draw'){ + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择两个目标(限一次)',function(event,player){ + if(player.hp==1||player.countCards('h')<=1) return 0; + return 1; + }); + } + else if(player.storage.fumian_choice=='red'){ + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸两张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){ + return 0; + }); + } + else{ + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){ + if(player.hp==1||player.countCards('h')0; + }, + content:function(){ + 'step 0' + player.showCards(cards); + 'step 1' + var num=target.countCards('h')-target.hp; + if(num<=0){ + num=1; + } + var hs=target.getCards('h').randomGets(num); + target.showCards(hs); + var colors=[]; + var numbers=[]; + for(var i=0;i=0||player.countCards('h')0) return '手牌上限+'+storage; + if(storage<0) return '手牌上限'+storage; + return '手牌上限无变化'; + }, + }, + content:function(){ + 'step 0' + if(player.isHealthy()){ + event.type=0; + player.chooseBool(get.prompt('caishi'),'手牌上限+1,然后本回合你的牌不能对其他角色使用',function(event,player){ + return player.skipList.contains('phaseUse')||!player.needsToDiscard(1); + }); + } + else{ + event.type=1; + player.chooseControlList(get.prompt('caishi'),'手牌上限+1,然后本回合你的牌不能对其他角色使用','回复1点体力,然后本回合你的牌不能对自己使用',function(){ + return 1; + }); + } + 'step 1' + if(event.type){ + if(result.control!='cancel2'){ + player.logSkill('caishi'); + if(result.index==0){ + player.addTempSkill('caishi2'); + player.storage.caishi++; + if(player.storage.caishi>=0){ + player.unmarkSkill('zhongjian'); + if(player.storage.caishi>0){ + player.markSkill('caishi'); + } + } + else{ + player.updateMarks(); + } + } + else if(result.index==1){ + player.recover(); + player.addTempSkill('caishi3'); + } + } + } + else{ + if(result.bool){ + player.logSkill('caishi'); + player.addTempSkill('caishi2'); + player.storage.caishi++; + if(player.storage.caishi>=0){ + player.unmarkSkill('zhongjian'); + if(player.storage.caishi>0){ + player.markSkill('caishi'); + } + } + else{ + player.updateMarks(); + } + } + } + }, + mod:{ + maxHandcard:function(player,num){ + if(typeof player.storage.caishi=='number') return num+player.storage.caishi; + }, + } + }, + caishi2:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + caishi3:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player==target) return false; + } + } + }, + ttt:{ + mod:{ + targetEnabled:function(card){ + if(card.name=='tao') return false; + } + } + }, + jyzongshi:{ + audio:2, + trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']}, + filter:function(event,player){ + if(event.preserve) return false; + if(player==event.player){ + if(event.num1>event.num2){ + return !get.owner(event.card2); + } + else{ + return !get.owner(event.card1); + } + } + else{ + if(event.num1event.num2){ + return event.card2.name!='du'; + } + else{ + return event.card1.name!='du'; + } + } + else{ + if(event.num1trigger.num2){ + player.gain(trigger.card2,'gain2','log'); + } + else{ + player.gain(trigger.card1,'gain2','log'); + } + } + else{ + if(trigger.num10; + }, + content:function(){ + 'step 0' + var goon=true; + if(get.attitude(player,trigger.player)>=-0.8) goon=false; + else if(trigger.player.countCards('h')<=3) goon=false; + else if(player.countCards('h','shan')==0) goon=false; + var es=player.getCards('e'); + var color=[]; + for(var i=0;i0;//&&!_status.dying.length; + }, + init:function(player){ + if(!player.storage.taoluan) player.storage.taoluan=[]; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;i0) return 0; + if(button.link[2]=='wugu') return 0; + var effect=player.getUseValue(button.link[2]); + if(effect>0) return effect; + return 0; + }, + backup:function(links,player){ + return { + filterCard:true, + audio:'taoluan', + selectCard:1, + popname:true, + check:function(card){ + return 6-get.value(card); + }, + position:'he', + viewAs:{name:links[0][2],nature:links[0][3]}, + onuse:function(result,player){ + player.storage.taoluan.add(result.card.name); + }, + } + }, + prompt:function(links,player){ + return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + save:true, + skillTagFilter:function(player){ + if(!player.countCards('he')||player.hasSkill('taoluan3')) return false; + if(!player.storage.taoluan.contains('tao')){} + else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){} + else return false; + }, + order:4, + result:{ + player:function(player){ + var allshown=true,players=game.filterPlayer(); + for(var i=0;i0){ + return 1; + } + } + if(allshown) return 1; + return 0; + } + }, + threaten:1.9, + }, + group:['taoluan2','taoluan4','taoluan5'] + }, + taoluan2:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='taoluan_backup'||event.skill=='taoluan5'||event.skill=='taoluan4'; + }, + content:function(){ + 'step 0' + player.chooseTarget(true,function(card,player,target){ + return target!=player; + },'滔乱

    令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力').set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0){ + if(get.attitude(target,player)>0){ + return target.countCards('h'); + } + return target.countCards('h')/2; + } + return 0; + }); + 'step 1' + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + var type=get.type(trigger.card,'trick'); + target.chooseCard('滔乱

    交给'+get.translation(player)+'一张不为'+get.translation(type)+'牌的牌,或令其失去一点体力且滔乱无效直到回合结束','he',function(card,player,target){ + return get.type(card,'trick')!=_status.event.cardType; + }).set('cardType',type).set('ai',function(card){ + if(_status.event.att){ + return 11-get.value(card); + } + return 0; + }).set('att',get.attitude(target,player)>0); + 'step 2' + var target=event.target; + if(result.bool){ + player.gain(result.cards,target,'give'); + } + else{ + player.addTempSkill('taoluan3'); + var next=player.loseHp(); + event.next.remove(next); + event.getParent('phase').after.push(next); + } + } + }, + taoluan3:{}, + taoluan4:{ + prompt:'将一张牌当做闪使用', + enable:'chooseToUse', + filter:function(event,player){ + return !player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3')&&player.countCards('he');//&&!_status.dying.length; + }, + onuse:function(result,player){ + player.storage.taoluan.add('shan'); + }, + filterCard:true, + position:'he', + selectCard:1, + viewAs:{name:'shan'}, + ai:{ + skillTagFilter:function(player){ + return player.countCards('he')&&!player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3'); + }, + threaten:1.5, + respondShan:true, + } + }, + taoluan5:{ + audio:'taoluan', + enable:'chooseToUse', + prompt:'将一张牌当做无懈可击使用', + viewAsFilter:function(player){ + return !player.storage.taoluan.contains('wuxie')&&!player.hasSkill('taoluan3')&&player.countCards('he'); + }, + onuse:function(result,player){ + player.storage.taoluan.add('wuxie'); + }, + filterCard:true, + position:'he', + selectCard:1, + viewAs:{name:'wuxie'}, + }, + taoluan_backup:{}, + jishe:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.getHandcardLimit()>0; + }, + init:function(player){ + player.storage.jishe=0; + }, + usable:20, + content:function(){ + player.draw(); + player.storage.jishe++; + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(!player.needsToDiscard(1)){ + return 1; + } + return 0; + } + } + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.jishe; + } + }, + group:['jishe2','jishe3'] + }, + jishe2:{ + trigger:{player:'phaseAfter'}, + silent:true, + content:function(){ + player.storage.jishe=0; + } + }, + jishe3:{ + audio:'jishe', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + return game.hasPlayer(function(current){ + return !current.isLinked(); + }); + }, + content:function(){ + "step 0" + var num=game.countPlayer(function(current){ + return !current.isLinked(); + }); + player.chooseTarget(get.prompt('jishe'),'横置至多'+get.cnNumber(Math.min(num,player.hp))+'名未横置的角色',[1,Math.min(num,player.hp)],function(card,player,target){ + return !target.isLinked(); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + player.logSkill('jishe',result.targets); + event.targets=result.targets; + event.num=0; + } + else{ + event.finish(); + } + "step 2" + if(event.num0); + var goon=false; + if(player.hp==1){ + goon=true; + } + else{ + var he=player.getCards('he'); + var num=0; + for(var i=0;i=2){ + goon=true;break; + } + } + } + } + player.chooseCard('he',[1,player.countCards('he')],get.prompt2('huisheng',trigger.source)).set('ai',function(card){ + if(_status.event.att){ + return 10-get.value(card); + } + if(_status.event.goon){ + return 8-get.value(card); + } + if(!ui.selected.cards.length){ + return 7-get.value(card); + } + return 0; + }).set('goon',goon).set('att',att); + 'step 1' + if(result.bool){ + player.logSkill('huisheng',trigger.source); + game.delay(); + event.num=result.cards.length; + var goon=false; + if(event.num>2||get.attitude(trigger.source,player)>=0){ + goon=true; + } + var forced=false; + var str='获得其中一张牌并防止伤害'; + if(trigger.source.countCards('he')0){ + if(he==0) return 1; + if(target.countCards('h')>get.zhu(player).countCards('h')) return 1; + } + else{ + if(he>0) return 1; + } + return 0; + }); + 'step 1' + if(result.bool){ + event.targets=result.targets.slice(0).sortBySeat(); + event.list=event.targets.slice(0); + player.logSkill('qinqing',event.targets); + } + else{ + event.finish(); + } + 'step 2' + if(event.targets.length){ + var target=event.targets.shift(); + if(target.countCards('he')){ + player.discardPlayerCard(target,'he',true); + } + target.draw(); + event.redo(); + } + 'step 3' + var num=0; + var zhu=get.zhu(player); + if(zhu){ + var nh=zhu.countCards('h'); + for(var i=0;inh){ + num++; + } + } + if(num){ + player.draw(num); + } + } + }, + ai:{ + threaten:1.2 + } + }, + guizao:{ + audio:2, + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + if(event.cards&&event.cards.length>1){ + var suits=[]; + for(var i=0;i0||target.hp<=2){ + spade=false; + } + target.chooseToDiscard('h',true).set('ai',function(card){ + if(get.suit(card)=='spade'){ + if(_status.event.spade){ + return 10-get.value(card); + } + else{ + return -10-get.value(card); + } + } + if(_status.event.getParent().player.storage.jiyu2&&_status.event.getParent().player.storage.jiyu2.contains(get.suit(card))){ + return -3-get.value(card); + } + return -get.value(card); + }).set('spade',spade); + 'step 1' + if(!result.cards||!result.cards.length) return; + var card=result.cards[0]; + if(get.suit(card,target)=='spade'){ + player.turnOver(); + target.loseHp(); + } + if(!player.storage.jiyu2) player.storage.jiyu2=[]; + player.storage.jiyu2.add(get.suit(card)); + }, + onremove:['jiyu','jiyu2'], + ai:{ + order:9, + result:{ + target:function(player,target){ + if(player.isTurnedOver()||target.countCards('h')<=3) return -1; + return 0; + } + } + }, + mod:{ + cardEnabled:function(card,player){ + if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; + } + } + }, + jiyu2:{ + trigger:{player:['phaseUseBegin','phaseUseAfter']}, + silent:true, + content:function(){ + player.storage.jiyu=[]; + player.storage.jiyu2=[]; + } + }, + jiaozhao:{ + enable:'phaseUse', + usable:1, + audio:2, + check:function(card){ + return 8-get.value(card); + }, + filterCard:true, + discard:false, + lose:false, + delay:false, + content:function(){ + 'step 0' + player.showCards(cards); + 'step 1' + if(player.storage.jiaozhao2){ + event.target=player; + } + else{ + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(function(a,b){ + return Math.max(1,get.distance(player,a))-Math.max(1,get.distance(player,b)); + }); + var distance=Math.max(1,get.distance(player,targets[0])); + for(var i=1;idistance){ + targets.splice(i);break; + } + } + player.chooseTarget(true,function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('targets',targets); + } + 'step 2' + if(!event.target){ + event.target=result.targets[0]; + player.line(result.targets,'green'); + } + if(!event.target){ + event.finish(); + return; + } + var list=['sha','sha','sha','shan','tao','jiu']; + if(player.storage.jiaozhao1){ + list=list.concat(['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']); + } + for(var i=0;i=5){ + choice='jiu'; + } + else if(nh<=2){ + choice='sha'; + } + else{ + choice=Math.random()<0.5?'sha':'jiu'; + } + } + else{ + var recover=0,lose=1,players=game.filterPlayer(); + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + } + if(lose>recover&&lose>0){ + choice=Math.random()<0.7?'nanman':'wanjian'; + } + else if(lose0){ + choice='taoyuan'; + } + else{ + choice=Math.random()<0.5?'guohe':'shunshou'; + } + } + } + event.target.chooseButton(['矫诏',[list,'vcard']],true).set('ai',function(button){ + return button.link[2]==_status.event.choice?1:0; + }).set('choice',choice); + 'step 3' + var chosen=result.links[0][2]; + var nature=result.links[0][3]; + var fakecard={name:chosen,suit:cards[0].suit,number:cards[0].number,nature:nature}; + event.target.showCards(game.createCard(fakecard),get.translation(event.target)+'声明了'+get.translation(chosen)); + player.storage.jiaozhao=cards[0]; + player.storage.jiaozhao_card=fakecard; + game.broadcastAll(function(name){ + lib.skill.jiaozhao2.viewAs=fakecard; + },fakecard); + var next=game.createEvent('jiaozhao3'); + event.next.remove(next); + event.getParent(3).after.push(next); + next.player=player; + next.setContent(lib.skill.jiaozhao3.content); + }, + ai:{ + order:9, + result:{ + player:1 + } + }, + intro:{ + content:function(storage,player){ + if(player.storage.jiaozhao2){ + return '出牌阶段限一次,你可以展示一张手牌,然后你声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; + } + else{ + return '出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; + } + } + }, + group:['jiaozhao2'] + }, + jiaozhao2:{ + enable:'phaseUse', + audio:'jiaozhao', + filter:function(event,player){ + if(!player.storage.jiaozhao) return false; + var name=player.storage.jiaozhao_card.name; + if(name=='tao'||name=='shan'||name=='wuzhong'||name=='jiu') return false; + return player.getCards('h').contains(player.storage.jiaozhao)&&game.checkMod(player.storage.jiaozhao,player,'unchanged','cardEnabled2',player)!==false; + }, + filterCard:function(card,player){ + return card==player.storage.jiaozhao; + }, + selectCard:-1, + popname:true, + filterTarget:function(card,player,target){ + var info=get.info(player.storage.jiaozhao_card); + if((!info.singleCard||!ui.selected.targets.length)&&player==target) return false; + return lib.filter.filterTarget(player.storage.jiaozhao_card,player,target); + }, + check:function(card){ + return 8-get.value(card); + }, + ai:{ + order:6 + } + }, + jiaozhao3:{ + trigger:{player:'phaseJieshuBegin'}, + silent:true, + content:function(){ + delete player.storage.jiaozhao; + delete player.storage.jiaozhao_card; + } + }, + danxin:{ + trigger:{player:'damageEnd'}, + frequent:true, + audio:2, + content:function(){ + 'step 0' + if(player.storage.jiaozhao1&&player.storage.jiaozhao2){ + player.draw(); + event.finish(); + } + else{ + var list=['draw_card','更改描述']; + var prompt; + if(player.storage.jiaozhao1){ + prompt='摸一张牌或更改矫诏的描述

    更改描述:将“选择距离最近的一名其他角色,该角色”改为“你”'; + } + else{ + prompt='摸一张牌或更改矫诏的描述

    更改描述:将“基本牌”改为“基本牌或普通锦囊牌”'; + } + player.chooseControl(list,function(){ + if(!_status.event.player.hasSkill('jiaozhao')) return 'draw_card'; + return '更改描述'; + }).set('prompt',prompt); + } + 'step 1' + if(result.control=='draw_card'){ + player.draw(); + } + else{ + game.log(player,'更改了','【矫诏】','的描述'); + player.popup('更改描述'); + player.markSkill('jiaozhao'); + if(player.storage.jiaozhao1){ + player.storage.jiaozhao2=true; + } + else{ + player.storage.jiaozhao1=true; + } + } + } + }, + zongzuo:{ + trigger:{global:'phaseBefore'}, + forced:true, + priority:10, + audio:2, + filter:function(event,player){ + return !player.storage.zongzuo; + }, + content:function(){ + 'step 0' + player.storage.zongzuo=true; + var num=game.countGroup(); + player.gainMaxHp(num); + event.num=num; + 'step 1' + player.recover(event.num); + //player.update(); + }, + group:'zongzuo_lose', + subSkill:{ + lose:{ + trigger:{global:'dieAfter'}, + forced:true, + audio:'zongzuo', + filter:function(event,player){ + if(!lib.group.contains(event.player.group)) return false; + if(game.hasPlayer(function(current){ + return current.group==event.player.group; + })){ + return false; + } + return true; + }, + content:function(){ + player.loseMaxHp(); + } + } + } + }, + zhige:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + filterTarget:function(card,player,target){ + return get.distance(target,player,'attack')<=1&&target.countCards('e')>0; + }, + content:function(){ + 'step 0' + target.chooseToUse({name:'sha'},'止戈:使用一张杀,或将其装备区里的一张牌交给'+get.translation(player)); + 'step 1' + if(!result.bool&&target.countCards('e')){ + target.chooseCard('e',true,'将其装备区里的一张牌交给'+get.translation(player)); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool&&result.cards&&result.cards.length){ + player.gain(result.cards,target,'give'); + } + }, + ai:{ + expose:0.2, + order:5, + result:{ + target:-1, + player:function(player,target){ + if(target.countCards('h')==0) return 0; + if(target.countCards('h')==1) return -0.1; + if(player.hp<=2) return -2; + if(player.countCards('h','shan')==0) return -1; + return -0.5; + } + } + } + }, + kuangbi:{ + enable:'phaseUse', + usable:1, + audio:2, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + target.chooseCard('he',[1,3],'匡弼:将1~3张牌置于'+get.translation(player)+'的武将牌上',true).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 7-get.value(card); + } + return -get.value(card); + }); + 'step 1' + if(result.bool){ + target.$give(result.cards.length,player,false); + target.lose(result.cards,ui.special,'toStorage'); + if(!player.storage.kuangbi_draw) player.storage.kuangbi_draw=[]; + player.storage.kuangbi_draw.push([result.cards,target]); + player.addSkill('kuangbi_draw'); + player.syncStorage('kuangbi_draw'); + player.updateMarks('kuangbi_draw'); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0){ + return Math.sqrt(target.countCards('he')); + } + return 0; + }, + player:1 + } + }, + subSkill:{ + draw:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + mark:true, + charlotte:true, + audio:'kuangbi', + intro:{ + onunmark:function(storage,player){ + var cards=[]; + while(storage.length){ + cards.addArray(storage.shift()[0]); + } + if(cards.length){ + game.cardsDiscard(cards); + player.$throw(cards,1000); + game.log(cards,'被置入了弃牌堆'); + } + }, + markcount:function(content){ + var cards=[]; + for(var i=0;i0; + }, + audio:2, + content:function(){ + 'step 0' + player.gainPlayerCard(target,'h',true); + 'step 1' + var name=get.translation(target); + player.chooseControl(function(){ + return Math.random()<0.5?'选项一':'选项二'; + }).set('prompt','督粮').set('choiceList',['令'+name+'观看牌堆顶的两张牌,然后获得其中的基本牌','令'+name+'于下个摸牌阶段额外摸一张牌']); + 'step 2' + if(result.control=='选项一'){ + var cards=get.cards(2); + target.viewCards('督粮',cards); + event.cards2=[]; + event.tothrow=[]; + for(var i=0;i=_status.event.getParent().num) return -1; + if(_status.event.player.hasSkillTag('nofire')) return -1; + if(_status.event.res>=0) return 6-get.value(card); + if(get.type(card)!='basic'){ + return 10-get.value(card); + } + return 8-get.value(card); + }).set('res',res); + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + event.target.damage(2,'fire'); + event.num=1; + } + else{ + event.num=result.cards.length+1; + } + event.goto(1); + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0,players=game.filterPlayer(); + for(var i=0;i0){ + num--; + } + else if(att<0){ + num++; + } + } + } + if(game.players.length<5){ + return num-1; + } + else{ + return num-2; + } + } + } + }, + init:function(player){ + player.storage.xinfencheng=false; + }, + intro:{ + content:'limited' + } + }, + xinjuece:{ + audio:'juece', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(player){ + return player.countCards('h')==0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('xinjuece'),'对一名没有手牌的其他角色造成1点伤害',function(card,player,target){ + return target.countCards('h')==0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + player.logSkill('xinjuece',result.targets); + result.targets[0].damage(); + } + } + }, + xinmieji:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h',{type:['trick','delay'],color:'black'}); + }, + filterCard:function(card){ + return get.color(card)=='black'&&get.type(card,'trick')=='trick'; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + discard:false, + delay:false, + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + 'step 0' + player.showCards(cards); + 'step 1' + cards[0].fix(); + ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); + game.updateRoundNumber(); + 'step 2' + target.chooseToDiscard('he',true).set('prompt','请弃置一张锦囊牌,或依次弃置两张非锦囊牌。'); + 'step 3' + if((!result.cards||get.type(result.cards[0],'trick',result.cards[0].original=='h'?target:false)!='trick')&&target.countCards('he',function(card){ + return get.type(card,'trick')!='trick'; + })){ + target.chooseToDiscard('he',true,function(card){ + return get.type(card,'trick')!='trick'; + }).set('prompt','请弃置第二张非锦囊牌'); + } + }, + ai:{ + order:9, + result:{ + target:-1 + } + } + }, + qianju:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-(from.getDamagedHp()); + } + } + }, + reqianju:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-(Math.max(1,from.getDamagedHp())); + } + } + }, + reqingxi:{ + audio:'qingxi', + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + 'step 0' + var num=game.countPlayer(function(current){ + return player.inRange(current); + }); + if(trigger.target.countCards('h')2){ + return 0; + } + return 8-get.value(card); + } + }); + } + 'step 1' + if(!event.directfalse&&result.bool){ + var e1=player.getEquip(1); + if(e1){ + player.discard(e1,'notBySelf'); + } + } + else{ + var storage=trigger.target.storage; + var id=trigger.target.playerid; + var map=trigger.customArgs; + if(!map[id]) map[id]={}; + if(!map[id].extraDamage) map[id].extraDamage=0; + map[id].extraDamage++; + if(!storage.reqingxi2) storage.reqingxi2=[]; + storage.reqingxi2.push(trigger.card); + trigger.target.addTempSkill('reqingxi2'); + } + } + }, + reqingxi2:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name=='shan'&&player.storage.reqingxi2&&player.storage.reqingxi2.filter(function(cd){ + return get.suit(cd)!=get.suit(card); + }).length) return false; + }, + }, + firstDo:true, + onremove:true, + trigger:{ + player:['damage','damageCancelled','damageZero'], + target:['shaMiss','useCardToExcluded'], + }, + charlotte:true, + filter:function(event,player){ + return player.storage.reqingxi2&&event.card&&player.storage.reqingxi2.contains(event.card); + }, + silent:true, + forced:true, + popup:false, + priority:12, + content:function(){ + player.storage.reqingxi2.remove(trigger.card); + if(!player.storage.reqingxi2.length) player.removeSkill('reqingxi2'); + }, + }, + qingxi:{ + audio:2, + trigger:{source:'damageBegin1'}, + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + filter:function(event,player){ + return event.getParent().name=='sha'&&player.getEquip(1); + }, + content:function(){ + 'step 0' + var num=1; + var info=get.info(player.getEquip(1)); + if(info&&info.distance&&info.distance.attackFrom){ + num-=info.distance.attackFrom; + } + if(trigger.player.countCards('h')2){ + return 0; + } + return 8-get.value(card); + } + }); + } + 'step 1' + if(!event.directfalse&&result.bool){ + var e1=player.getEquip(1); + if(e1){ + player.discard(e1,'notBySelf'); + } + } + else{ + trigger.num++; + } + } + }, + jieyue:{ + group:'jieyue1' + }, + jieyue1:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + filterCard:lib.filter.cardDiscardable, + ai1:function(card){ + return 7-get.useful(card); + }, + ai2:function(target){ + return 1-get.attitude(_status.event.player,target); + }, + prompt:get.prompt2('jieyue') + }); + 'step 1' + if(result.bool){ + player.logSkill('jieyue1',result.targets); + player.discard(result.cards); + var target=result.targets[0]; + event.target=target; + target.chooseCard('将一张牌置于'+get.translation(player)+'的武将牌上,或令其弃置你的一张牌','he').set('ai',function(card){ + if(card.name=='du') return 20; + var player=_status.event.player; + if(get.attitude(player,_status.event.getParent().player)>0){ + return 8-get.value(card); + } + var nh=player.countCards('h'); + if(nh<=2){ + return 6-get.value(card); + } + if(nh<=3){ + return 2-get.value(card); + } + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool&&result.cards&&result.cards.length){ + event.target.$give(result.cards,player,false); + player.storage.jieyue2=result.cards[0]; + event.target.lose(result.cards[0],ui.special,'toStorage'); + player.syncStorage('jieyue2'); + player.addSkill('jieyue2'); + } + else if(event.target.countCards('he')){ + player.discardPlayerCard(event.target,true); + } + }, + ai:{ + expose:0.1 + } + }, + jieyue2:{ + mark:'card', + intro:{ + content:'card' + }, + audio:true, + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + viewAsFilter:function(player){ + return player.countCards('h',{color:'black'})>0; + }, + viewAs:{name:'wuxie'}, + prompt:'将一张黑色手牌当无懈可击使用', + check:function(card){return 8-get.value(card)}, + threaten:1.2, + group:['jieyue3','jieyue4'] + }, + jieyue3:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:function(card){ + return get.color(card)=='red'; + }, + viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{color:'red'})) return false; + }, + audio:true, + prompt:'将一张红色手牌当闪使用或打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('h',{color:'red'})) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.8 + } + } + } + }, + jieyue4:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ + player.gain(player.storage.jieyue2,'gain2','fromStorage'); + player.storage.jieyue2=null; + player.removeSkill('jieyue2'); + } + }, + jinjiu:{ + mod:{ + cardname:function(card,player){ + if(card.name=='jiu') return 'sha'; + }, + }, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h','jiu')) return false; + }, + respondSha:true, + }, + audio:2, + trigger:{player:['useCard1','respond']}, + firstDo:true, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.skill&& + event.cards.length==1&&event.cards[0].name=='jiu'; + }, + content:function(){}, + }, + xinxianzhen:{ + audio:'xianzhen', + inherit:'xianzhen', + }, + xinxianzhen2:{ + audio:'xianzhen', + mod:{ + targetInRange:function(card,player,target){ + if(target==player.storage.xinxianzhen) return true; + }, + cardUsable:function(card,player,num){ + if(typeof num=='number') return num+100; + }, + playerEnabled:function(card,player,target){ + if(card.name=='sha'&&player.storage.xinxianzhen!=target&&!ui.selected.targets.contains(player.storage.xinxianzhen)){ + var num=player.getCardUsable(card)-100; + if(num<=0) return false; + } + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(arg.target!=player.storage.xinxianzhen) return false; + }, + effect:{ + player:function(card,player,target,current,isLink){ + if(isLink||!player.storage.xinxianzhen) return; + if(target!=player.storage.xinxianzhen&&['sha','guohe','shunshou','huogong','juedou'].contains(card.name)){ + if(get.effect(player.storage.xinxianzhen,card,player,player)>0){ + return [1,2]; + } + } + } + } + }, + trigger:{player:'useCard2'}, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card)=='trick')&& + event.targets&&event.targets.length==1&&!event.targets.contains(player.storage.xinxianzhen); + }, + check:function(event,player){ + return get.effect(player.storage.xinxianzhen,event.card,player,player)>0; + }, + logTarget:function(event,player){ + return player.storage.xinxianzhen; + }, + prompt2:'令该角色也成为此牌的目标', + content:function(){ + var target=player.storage.xinxianzhen; + trigger.targets.push(target); + game.log(target,'成为了',trigger.card,'的额外目标'); + }, + }, + xinxianzhen3:{ + charlotte:true, + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + ignoredHandcard:function(card,player){ + if(get.name(card)=='sha'){ + return true; + } + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&get.name(card)=='sha'){ + return false; + } + }, + }, + }, + xianzhen:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.bool){ + player.storage[event.name]=target; + player.addTempSkill(event.name+2); + } + else{ + player.addTempSkill(event.name+3); + } + }, + ai:{ + order:function(name,player){ + var cards=player.getCards('h'); + if(player.countCards('h','sha')==0){ + return 1; + } + for(var i=0;i11&&get.value(cards[i])<7){ + return 9; + } + } + return get.order({name:'sha'})-1; + }, + result:{ + player:function(player){ + if(player.countCards('h','sha')>0) return 0; + var num=player.countCards('h'); + if(num>player.hp) return 0; + if(num==1) return -2; + if(num==2) return -1; + return -0.7; + }, + target:function(player,target){ + var num=target.countCards('h'); + if(num==1) return -1; + if(num==2) return -0.7; + return -0.5 + }, + }, + threaten:1.3 + } + }, + xianzhen2:{ + charlotte:true, + mod:{ + targetInRange:function(card,player,target){ + if(target==player.storage.xianzhen) return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha'&&typeof num=='number') return num+100; + }, + playerEnabled:function(card,player,target){ + if(card.name=='sha'&&player.storage.xianzhen!=target&&!ui.selected.targets.contains(player.storage.xianzhen)){ + var num=player.getCardUsable(card)-100; + if(num<=0) return false; + } + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(arg.target!=player.storage.xianzhen) return false; + }, + } + }, + xianzhen3:{ + charlotte:true, + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + lihuo:{ + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(event.card.name=='sha'&&!event.card.nature) return true; + return false; + }, + audio:2, + check:function(event,player){ + return false; + }, + content:function(){ + trigger.card.nature='fire'; + var next=game.createEvent('lihuo_clear'); + next.player=player; + next.card=trigger.card; + event.next.remove(next); + next.forceDie=true; + trigger.after.push(next); + next.setContent(function(){ + if(player.isAlive()&&player.getHistory('sourceDamage',function(evt){ + return evt.getParent(2)==event.parent; + }).length>0) player.loseHp(); + delete card.nature; + }); + }, + group:'lihuo2' + }, + lihuo2:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha'||get.nature(event.card)!='fire') return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&player.canUse(event.card,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('lihuo'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ + return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); + }).set('sourcex',trigger.targets).set('card',trigger.card).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!_status.connectMode) game.delayx(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('lihuo',event.target); + trigger.targets.push(event.target); + }, + }, + lihuo3:{ + trigger:{player:'useCardAfter'}, + vanish:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + forced:true, + audio:false, + content:function(){ + player.loseHp(); + player.removeSkill('lihuo3'); + } + }, + chunlao:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + audioname:['xin_chengpu'], + filter:function(event,player){ + return player.countCards('h')>0&&(_status.connectMode||player.countCards('h','sha')>0)&&!player.storage.chunlao.length; + }, + init:function(player){ + if(!player.storage.chunlao) player.storage.chunlao=[]; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + content:function(){ + 'step 0' + player.chooseCard([1,Math.max(1,player.countCards('h','sha'))],get.prompt('chunlao'),{name:'sha'}).set('ai',function(){ + return 1; + }); + 'step 1' + if(result.bool){ + player.logSkill('chunlao'); + player.storage.chunlao=player.storage.chunlao.concat(result.cards); + player.syncStorage('chunlao'); + player.markSkill('chunlao'); + player.lose(result.cards,ui.special,'toStorage'); + player.$give(result.cards,player,false); + } + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(_status.currentPhase!=player) return; + if(card.name=='sha'&&!player.needsToDiscard()&& + !player.storage.chunlao.length&&target.hp>1){ + return 'zeroplayertarget'; + } + } + }, + threaten:1.4 + }, + group:'chunlao2' + }, + chunlao2:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&event.dying&&event.dying.hp<=0&&player.storage.chunlao.length>0; + }, + filterTarget:function(card,player,target){ + return target==_status.event.dying; + }, + direct:true, + clearTime:true, + delay:false, + selectTarget:-1, + content:function(){ + "step 0" + player.chooseCardButton(get.translation('chunlao'),player.storage.chunlao,true); + "step 1" + if(result.bool){ + player.logSkill('chunlao',target); + player.$throw(result.links); + player.storage.chunlao.remove(result.links[0]); + game.cardsDiscard(result.links[0]); + player.syncStorage('chunlao') + event.type='dying'; + target.useCard({name:'jiu',isCard:true},target); + if(!player.storage.chunlao.length){ + player.unmarkSkill('chunlao'); + } + else{ + player.markSkill('chunlao'); + } + } + }, + ai:{ + order:6, + skillTagFilter:function(player){ + return player.storage.chunlao.length>0; + }, + save:true, + result:{ + target:3 + }, + threaten:1.6 + }, + }, + chunlao2_old:{ + trigger:{global:'dying'}, + //priority:6, + filter:function(event,player){ + return event.player.hp<=0&&player.storage.chunlao.length>0; + }, + direct:true, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.player); + player.chooseCardButton(get.prompt('chunlao',trigger.player),player.storage.chunlao).set('ai',function(button){ + if(_status.event.att>0) return 1; + return 0; + }).set('att',att); + "step 1" + if(result.bool){ + player.logSkill('chunlao',trigger.player); + player.$throw(result.links); + player.storage.chunlao.remove(result.links[0]); + result.links[0].discard(); + player.syncStorage('chunlao'); + trigger.player.useCard({name:'jiu',isCard:true},trigger.player); + if(!player.storage.chunlao.length){ + player.unmarkSkill('chunlao'); + } + else{ + player.markSkill('chunlao'); + } + } + }, + ai:{ + expose:0.2 + } + }, + shenduan:{ + trigger:{player:'loseAfter'}, + filter:function(event,player){ + if(event.type!='discard') return; + for(var i=0;i1?'中的一张牌':'')+'当做【兵粮寸断】对一名其他角色使用',function(card,player,target){ + var cs=_status.event.cards; + for(var i=0;i1?'中的一张牌':'')+'当做【兵粮寸断】对一名其他角色使用',function(card,player,target){ + var cs=_status.event.cards; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var att=get.attitude(player,trigger.player); + var nh=trigger.player.countCards('h'); + var eff=get.effect(trigger.player,{name:'sha',isCard:true},player,player); + if(!player.canUse({name:'sha',isCard:true},trigger.player,false)) eff=0; + player.discardPlayerCard(get.prompt('yonglve',trigger.player),trigger.player,'j').set('ai',function(button){ + var name=button.link.viewAs||button.link.name; + var att=_status.event.att; + var nh=_status.event.nh; + var eff=_status.event.eff; + var trigger=_status.event.getTrigger(); + if(att>0&&eff>=0) return 1; + if(att>=0&&eff>0) return 1; + if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ + if(name=='lebu'&&nh>trigger.player.hp) return 1; + if(name=='bingliang'&&nh0&&player.inRange(event.player); + }, + content:function(){ + 'step 0' + var att=get.attitude(player,trigger.player); + var nh=trigger.player.countCards('h'); + var eff=get.effect(trigger.player,{name:'sha',isCard:true},player,player); + if(!player.canUse({name:'sha',isCard:true},trigger.player)) eff=0; + player.discardPlayerCard(get.prompt('yonglve',trigger.player),trigger.player,'j').set('ai',function(button){ + var name=button.link.viewAs||button.link.name; + var att=_status.event.att; + var nh=_status.event.nh; + var eff=_status.event.eff; + var trigger=_status.event.getTrigger(); + if(att>0&&eff>=0) return 1; + if(att>=0&&eff>0) return 1; + if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ + if(name=='lebu'&&nh>trigger.player.hp) return 1; + if(name=='bingliang'&&nh0; + })){ + player.draw(); + } + }, + //group:'yonglve2' + }, + yonglve2:{ + trigger:{source:'damage'}, + forced:true, + popup:false, + filter:function(event){ + return event.parent.skill=='yonglve'; + }, + content:function(){ + player.storage.yonglve=true; + } + }, + benxi:{ + audio:2, + trigger:{player:'useCard2'}, + forced:true, + filter:function(event,player){ + return player.isPhaseUsing(); + }, + content:function(){}, + mod:{ + globalFrom:function(from,to,distance){ + if(_status.currentPhase==from){ + return distance-from.countUsed(); + } + }, + selectTarget:function(card,player,range){ + if(_status.currentPhase==player){ + if(card.name=='sha'&&range[1]!=-1){ + if(!game.hasPlayer(function(current){ + return get.distance(player,current)>1; + })){ + range[1]++; + } + } + } + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player){ + if(game.hasPlayer(function(current){ + return get.distance(player,current)>1; + })){ + return false; + } + } + } + }, + sidi:{ + audio:2, + trigger:{global:'useCard'}, + filter:function(event,player){ + if(event.card.name!='shan') return false; + if(event.player==player) return true; + return _status.currentPhase==player; + }, + frequent:true, + init:function(player){ + if(!player.storage.sidi) player.storage.sidi=[]; + }, + intro:{ + content:'cards', + onunmark:'throw', + }, + content:function(){ + var card=game.cardsGotoSpecial(get.cards()).cards[0]; + game.log(player,'将',card,'置于武将牌上'); + player.$gain2(card); + player.storage.sidi.add(card); + player.markSkill('sidi'); + player.syncStorage('sidi'); + }, + group:'sidi2' + }, + sidi2:{ + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + if(event.player==player||event.player.isDead()) return false; + if(!player.storage.sidi||!player.storage.sidi.length) return false; + return true; + }, + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(event.player.getEquip('zhuge')) return false; + if(event.player.hasSkill('paoxiao')) return false; + var players=game.filterPlayer(); + for(var i=0;i0) break; + } + if(i==players.length) return false; + var nh=event.player.countCards('h'); + var nsha=event.player.countCards('h','sha'); + if(nh<2) return false; + switch(nh){ + case 2: + if(nsha) return Math.random()<0.4; + return Math.random()<0.2; + case 3: + if(nsha) return Math.random()<0.8; + return Math.random()<0.3; + case 4: + if(nsha>1) return true; + if(nsha) return Math.random()<0.9; + return Math.random()<0.5; + default:return true; + } + }, + logTarget:'player', + content:function(){ + 'step 0' + if(player.storage.sidi.length==1){ + event.directbutton=player.storage.sidi[0]; + } + else{ + player.chooseCardButton('弃置一张“司敌”牌',player.storage.sidi,true); + } + 'step 1' + var button; + if(event.directbutton){ + button=event.directbutton; + } + else if(result.bool&&result.links&&result.links.length){ + button=result.links[0]; + } + if(button){ + player.$throw([button]); + game.log(player,'将',button,'置于弃牌堆'); + game.cardsDiscard(button); + trigger.player.addTempSkill('sidi3'); + trigger.player.addMark('sidi3',1,false); + player.storage.sidi.remove(button); + player.syncStorage('sidi'); + if(player.storage.sidi.length==0){ + player.unmarkSkill('sidi'); + } + else{ + player.markSkill('sidi'); + } + game.delayx(); + } + } + }, + sidi3:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num-player.countMark('sidi3'); + } + }, + onremove:true, + }, + zhongyong:{ + audio:2, + trigger:{player:'shaMiss'}, + direct:true, + filter:function(event,player){ + return event.responded&&get.itemtype(event.responded.cards)=='cards'; + }, + content:function(){ + "step 0" + var cards=trigger.responded.cards; + event.cards=cards; + player.chooseTarget('忠勇:将'+get.translation(trigger.responded.cards)+'交给一名角色',function(card,player,target){ + return target!=_status.event.source; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.countCards('h','shan')&&target.countCards('h')>=2){ + att/=1.5; + } + return att; + }).set('source',trigger.target); + "step 1" + if(result.bool){ + player.logSkill('zhongyong',result.targets); + result.targets[0].gain(event.cards,'gain2'); + if(result.targets[0]==player){ + event.finish(); + } + } + else{ + event.finish(); + } + "step 2" + player.chooseToUse('是否对'+get.translation(trigger.target)+'再使用一张杀?', + {name:'sha'},trigger.target,-1).set('addCount',false); + } + }, + xinzhongyong:{ + trigger:{player:'useCardAfter'}, + audio:'zhongyong', + direct:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + "step 0" + event.sha=trigger.cards.slice(0).filterInD(); + event.shan=[]; + game.countPlayer2(function(current){ + current.getHistory('useCard',function(evt){ + if(evt.card.name=='shan'&&evt.getParent(3)==trigger) event.shan.addArray(evt.cards); + }); + }); + event.shan.filterInD('d'); + if(!event.sha.length&&!event.shan.length) event.finish(); + player.chooseTarget(get.prompt2('zhongyong'),function(card,player,target){ + return !_status.event.source.contains(target)&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('source',trigger.targets); + "step 1" + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xinzhongyong',target); + if(event.sha.length&&event.shan.length){ + player.chooseControl().set('choiceList',[ + '将'+get.translation(event.sha)+'交给'+get.translation(target), + '将'+get.translation(event.shan)+'交给'+get.translation(target), + ]).set('ai',function(){ + return _status.event.choice; + }).set('choice',function(){ + if(get.color(event.sha)!='black') return 0; + return 1; + }()); + } + else event._result={index:event.sha.length?0:1}; + } + else{ + event.finish(); + } + "step 2" + var cards=result.index==0?event.sha:event.shan; + event.useSha=false; + target.gain(cards,'gain2'); + for(var i=0;i0&&event.player.isPhaseUsing(); + }, + content:function(){ + 'step 0' + var go=false; + if(get.attitude(player,trigger.player)>0){ + if(get.color(trigger.card)=='red'){ + go=true; + } + else if(trigger.addCount===false) go=false; + else if(!trigger.player.hasSkill('paoxiao')&& + !trigger.player.hasSkill('tanlin3')&& + !trigger.player.hasSkill('zhaxiang2')&& + !trigger.player.hasSkill('fengnu')&& + !trigger.player.getEquip('zhuge')){ + var nh=trigger.player.countCards('h'); + if(player==trigger.player){ + go=(player.countCards('h','sha')>0); + } + else if(nh>=4){ + go=true; + } + else if(player.countCards('h','sha')){ + if(nh==3){ + go=Math.random()<0.8; + } + else if(nh==2){ + go=Math.random()<0.5; + } + } + else if(nh>=3){ + if(nh==3){ + go=Math.random()<0.5; + } + else if(nh==2){ + go=Math.random()<0.2; + } + } + } + } + var next=player.chooseToDiscard(get.prompt('longyin'),'弃置一张牌'+(get.color(trigger.card)=='red'?'并摸一张牌':'')+',令'+get.translation(trigger.player)+'本次使用的【杀】不计入使用次数','he'); + next.logSkill=['longyin',trigger.player]; + next.set('ai',function(card){ + if(_status.event.go){ + return 6-get.value(card); + } + return 0; + }); + next.set('go',go); + 'step 1' + if(result.bool){ + if(trigger.addCount!==false){ + trigger.addCount=false; + trigger.player.getStat().card.sha--; + } + if(get.color(trigger.card)=='red'){ + player.draw(); + } + // player.logSkill('longyin',trigger.player); + } + }, + ai:{ + expose:0.2 + } + }, + jigong:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + check:function(event,player){ + var nh=player.countCards('h')-player.countCards('h',{type:'equip'}); + if(nh<=1) return true; + if(player.countCards('h','tao')) return false; + if(nh<=2) return Math.random()<0.7; + if(nh<=3) return Math.random()<0.4; + return false; + }, + content:function(){ + player.draw(2); + player.addTempSkill('jigong2'); + } + }, + jigong2:{ + mod:{ + maxHandcardBase:function(player,num){ + var damage=player.getStat().damage; + if(typeof damage=='number') return damage; + return 0; + } + } + }, + shifei:{ + audio:2, + trigger:{player:['chooseToRespondBegin','chooseToUseBegin']}, + filter:function(event,player){ + if(!_status.currentPhase) return false; + if(event.responded) return false; + if(!event.filterCard({name:'shan'},player,event)) return false; + if(event.name!='chooseToUse'&&!lib.filter.cardRespondable({name:'shan'},player,event)) return false; + return true; + }, + check:function(event,player){ + if(get.attitude(player,_status.currentPhase)>0) return true; + var nh=_status.currentPhase.countCards('h')+1; + var players=game.filterPlayer(); + for(var i=0;inh){ + if(!player.hasShan()||get.attitude(player,players[i])<=0) return true; + } + } + return false; + }, + content:function(){ + 'step 0' + player.line(_status.currentPhase,'green'); + _status.currentPhase.draw(); + 'step 1' + if(_status.currentPhase.isMaxHandcard(true)){ + event.finish(); + return; + } + var targets=game.filterPlayer(function(current){ + return current.isMaxHandcard(); + }) + if(targets.length==1){ + event.onlytarget=targets[0]; + } + else if(targets.length){ + player.chooseTarget('选择一名角色弃置其一张牌',true,function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }).set('targets',targets); + } + else{ + event.finish(); + } + 'step 2' + var target; + if(event.onlytarget){ + target=event.onlytarget; + } + else if(result.targets&&result.targets.length){ + target=result.targets[0]; + } + if(target){ + player.line(target,'green'); + player.discardPlayerCard(target,'he',true); + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan',isCard:true}} + } + }, + ai:{ + respondShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0){ + var nh=player.countCards('h'); + var players=game.filterPlayer(); + for(var i=0;inh) return 0.4; + } + } + } + } + } + }, + huaiyi:{ + audio:2, + enable:'phaseUse', + usable:1, + delay:false, + filter:function(event,player){ + return player.countCards('h',{color:'red'})&&player.countCards('h',{color:'black'}); + }, + content:function(){ + 'step 0' + player.showHandcards(); + 'step 1' + player.chooseControl('红色','黑色').set('ai',function(){ + var player=_status.event.player; + if(player.countCards('h',{color:'red'})==1&& + player.countCards('h',{color:'black'})>1) return '红色'; + return '黑色'; + }); + 'step 2' + event.control=result.control; + var cards; + if(event.control=='红色'){ + cards=player.getCards('h',{color:'red'}); + } + else{ + cards=player.getCards('h',{color:'black'}); + } + player.discard(cards); + event.num=cards.length; + 'step 3' + player.chooseTarget('请选择至多'+get.cnNumber(event.num)+'名有牌的其他角色,获得这些角色的各一张手牌。',[1,event.num],function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)+0.5; + }); + 'step 4' + if(result.bool&&result.targets){ + player.line(result.targets,'green'); + event.targets=result.targets; + event.targets.sort(lib.sort.seat); + event.gained=0; + } + else{ + event.finish(); + } + 'step 5' + if(player.isAlive()&&event.targets.length){ + player.gainPlayerCard(event.targets.shift(),'he',true); + } + else event.finish(); + 'step 6' + if(result.bool){ + event.gained+=result.cards.length; + } + if(event.targets.length) event.goto(5); + 'step 7' + if(event.gained>1) player.loseHp(); + }, + ai:{ + order:function(item,player){ + if(player.countCards('h',{color:'red'})==1) return 10; + if(player.countCards('h',{color:'black'})==1) return 10; + return 1; + }, + result:{ + player:1 + } + } + }, + yaoming:{ + audio:2, + trigger:{player:'damageEnd',source:'damageSource'}, + direct:true, + filter:function(event,player){ + if(player.hasSkill('yaoming2')) return false; + var nh=player.countCards('h'); + return game.hasPlayer(function(current){ + return current.countCards('h')!=nh; + }); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + player.chooseTarget(get.prompt2('yaoming'),function(card,player,target){ + return _status.event.nh!=target.countCards('h'); + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.countCards('h')>_status.event.nh) return -att; + return att; + }).set('nh',nh); + 'step 1' + if(result.bool){ + player.logSkill('yaoming',result.targets); + player.addTempSkill('yaoming2'); + var target=result.targets[0]; + if(target.countCards('h')0; + }, + content:function(){ + 'step 0' + player.choosePlayerCard(target,'e',true); + 'step 1' + if(result.links){ + var num=0,players=game.filterPlayer(); + for(var i=0;inum2){ + player.draw(); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return 1; + if(target.getEquip(1)||target.getEquip(4)) return -1; + if(target.getEquip(2)) return -0.7; + return -0.5; + } + } + } + }, + reyanzhu:{ + enable:'phaseUse', + audio:'yanzhu', + usable:1, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + if(!target.countCards('e')) event._result={bool:false}; + else target.chooseCard('e','将一张装备区的牌交给'+get.translation(target)+',或令下一次受到的伤害+1。'); + 'step 1' + if(result.bool) player.gain(result.cards,'giveAuto',target); + else{ + target.addSkill('reyanzhu2'); + target.addMark('reyanzhu2',1,false); + } + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(target.countCards('e',function(card){ + return card.name!='tengjia'&&get.value(card)<=0 + })) return -0.5; + return -1.5; + }, + }, + }, + }, + reyanzhu2:{ + trigger:{player:'damageBegin3'}, + forced:true, + onremove:true, + content:function(){ + trigger.num+=player.countMark('reyanzhu2'); + game.log(player,'受到的伤害+'+player.countMark('reyanzhu2')); + player.removeSkill('reyanzhu2'); + }, + intro:{ + content:'下次受到的伤害+#', + }, + }, + rexingxue:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:'xingxue', + filter:function(event,player){ + return player.maxHp>0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.maxHp],get.prompt2('rexingxue')).set('ai',function(target){ + var att=get.attitude(player,target); + if(target.countCards('h')==target.hp-1) att*=2; + return att; + }); + 'step 1' + if(result.bool){ + event.targets=result.targets.sortBySeat(); + player.logSkill('rexingxue',event.targets); + game.asyncDraw(result.targets); + } + else event.finish(); + 'step 2' + game.delay(); + 'step 3' + if(event.targets.length){ + event.target=event.targets.shift(); + if(event.target.isDead()) event.redo(); + } + else event.finish(); + 'step 4' + if(target.isAlive()&&target.countCards('h')&&target.countCards('h')!=target.hp) target.chooseCard('he',true,'将一张牌置于牌堆顶'); + else event.goto(3); + 'step 5' + if(result&&result.cards){ + event.card=result.cards[0]; + target.lose(result.cards,ui.special); + game.log(target,'将',(get.position(event.card)=='h'?'一张牌':get.translation(event.card)),'置于牌堆顶'); + game.broadcastAll(function(player){ + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + },target); + } + else{ + event.card=null; + } + 'step 6' + if(event.card){ + event.card.fix(); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + game.delay(); + } + event.goto(3); + }, + }, + rezhaofu:{ + unique:true, + global:'rezhaofu2', + zhuSkill:true + }, + rezhaofu2:{ + mod:{ + inRangeOf:function(from,to){ + if(from.group!='wu') return; + var players=game.filterPlayer(); + for(var i=0;i0&&target!=player; + }, + content:function(){ + 'step 0' + if(target.countCards('e')){ + target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'?').set('ai',function(){ + if(_status.event.player.countCards('e')>=3) return false; + return true; + }); + } + else{ + target.chooseToDiscard(true,'he'); + event.finish(); + } + 'step 1' + if(result.bool){ + var es=target.getCards('e'); + player.gain(es,target,'give'); + player.removeSkill('yanzhu'); + } + else{ + target.chooseToDiscard(true,'he'); + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + var ne=target.countCards('e'); + if(!ne) return -2; + if(ne>=2) return -ne; + return 0; + } + } + } + }, + shizhi:{ + mod:{ + cardname:function(card,player,name){ + if(card.name=='shan'&&player.hp==1) return 'sha'; + }, + }, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h','shan')) return false; + if(player.hp!=1) return false; + }, + respondSha:true, + }, + audio:2, + trigger:{player:['useCard1','respond']}, + firstDo:true, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.skill&& + event.cards.length==1&&event.cards[0].name=='shan'; + }, + content:function(){}, + }, + wurong:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&target!=player; + }, + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + "step 1" + var sendback=function(){ + if(_status.event!=event){ + return function(){ + event.resultOL=_status.event.resultOL; + }; + } + }; + if(player.isOnline()){ + player.wait(sendback); + event.ol=true; + player.send(function(){ + game.me.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + game.resume(); + }); + } + else{ + event.localPlayer=true; + player.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + } + if(target.isOnline()){ + target.wait(sendback); + event.ol=true; + target.send(function(){ + var rand=Math.random()<0.4; + game.me.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + game.resume(); + }); + } + else{ + event.localTarget=true; + } + "step 2" + if(event.localPlayer){ + event.card1=result.cards[0]; + } + if(event.localTarget){ + var rand=Math.random()<0.4; + target.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + } + "step 3" + if(event.localTarget){ + event.card2=result.cards[0]; + } + if(!event.resultOL&&event.ol){ + game.pause(); + } + "step 4" + try{ + if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; + if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; + if(!event.card1||!event.card2){ + throw('err'); + } + } + catch(e){ + console.log(e); + event.finish(); + return; + } + if(event.card2.number>=10||event.card2.number<=4){ + if(target.countCards('h')>2){ + event.addToAI=true; + } + } + game.broadcastAll(function(card1,card2){ + card1.classList.remove('glow'); + card2.classList.remove('glow'); + },event.card1,event.card2); + "step 5" + game.broadcastAll(function(){ + ui.arena.classList.add('thrownhighlight'); + }); + game.addVideo('thrownhighlight1'); + player.$compare(event.card1,target,event.card2); + game.delay(4); + "step 6" + game.log(player,'展示了',event.card1); + game.log(target,'展示了',event.card2); + var name1=get.name(event.card1); + var name2=get.name(event.card2); + if(name1=='sha'&&name2!='shan'){ + player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + target.damage('nocard'); + } + else if(name1!='sha'&&name2=='shan'){ + player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + player.gainPlayerCard(target,true,'he'); + } + else{ + player.$gain2(event.card1); + target.$gain2(event.card2); + } + game.broadcastAll(function(){ + ui.arena.classList.remove('thrownhighlight'); + }); + game.addVideo('thrownhighlight2'); + }, + ai:{ + order:6, + result:{ + target:-1, + } + } + }, + zhanjue:{ + audio:2, + enable:'phaseUse', + filterCard:true, + selectCard:-1, + filter:function(event,player){ + if(player.getStat().skill.zhanjue_draw&&player.getStat().skill.zhanjue_draw>=2) return false; + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var i=0;i=3||target.countCards('h')>=3) return 'zeroplayertarget'; + if(player.countCards('h','tao')) return 'zeroplayertarget'; + if(target.countCards('h','sha')>1) return 'zeroplayertarget'; + } + } + } + } + }, + zhanjue2:{ + audio:false, + trigger:{player:'phaseBefore'}, + silent:true, + content:function(){ + player.storage.zhanjue=0; + } + }, + zhanjue3:{ + audio:false, + trigger:{player:'damageAfter',source:'damageAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.parent.skill=='zhanjue'; + }, + content:function(){ + trigger.player.addTempSkill('zhanjue5'); + } + }, + zhanjue4:{ + audio:false, + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='zhanjue'; + }, + content:function(){ + "step 0" + var stat=player.getStat().skill; + if(!stat.zhanjue_draw) stat.zhanjue_draw=0; + stat.zhanjue_draw++; + player.draw('nodelay'); + var list=game.filterPlayer(function(current){ + if(current.getHistory('damage',function(evt){ + return evt.card==trigger.card; + }).length>0){ + if(current==player){ + stat.zhanjue_draw++; + } + return true; + } + return false; + }); + if(list.length){ + list.sortBySeat(); + game.asyncDraw(list); + } + "step 1" + game.delay(); + } + }, + zhanjue5:{}, + qinwang:{ + audio:'qinwang1', + unique:true, + group:['qinwang1','qinwang2'], + zhuSkill:true, + subSkill:{ + ai:{} + } + }, + qinwang1:{ + audio:2, + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!player.hasZhuSkill('qinwang')) return false; + if(!player.countCards('he')) return false; + if(!event.filterCard({name:'sha'},player,event)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + direct:true, + content:function(){ + "step 0" + var yep=false; + if(!player.storage.jijianging&&!trigger.jijiang){ + var players=game.filterPlayer(); + for(var i=0;i2&&(nh>=3&&players[i].countCards('h','sha'))){ + yep=true;break; + } + } + } + var next=player.chooseToDiscard(get.prompt('qinwang'),'弃置一张牌并发动【激将】','he'); + next.set('ai',function(card){ + if(_status.event.yep) return 5-get.value(card); + return 0; + }); + next.set('yep',yep); + next.logSkill='qinwang' + "step 1" + if(!result.bool){ + event.finish(); + } + "step 2" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); + } + else if(event.current.group=='shu'){ + player.storage.jijianging=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.sourcex)-2); + }); + next.set('sourcex',player); + next.set('jijiang',true); + next.noOrdering=true; + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 3" + player.storage.jijianging=false; + if(result.bool){ + event.finish(); + trigger.result=result; + trigger.responded=true; + trigger.animate=false; + event.current.draw(); + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(2); + } + } + }, + qinwang2:{ + audio:'qinwang1', + enable:'chooseToUse', + filter:function(event,player){ + if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; + if(!player.hasZhuSkill('qinwang')) return false; + if(!lib.filter.cardUsable({name:'sha'},player)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + filterCard:true, + position:'he', + check:function(card){ + var player=_status.event.player,players=game.filterPlayer(); + for(var i=0;i2&&(nh>=3&&players[i].countCards('h','sha'))){ + return 5-get.value(card); + } + } + return 0; + }, + filterTarget:function(card,player,target){ + if(_status.event._backup&& + typeof _status.event._backup.filterTarget=='function'&& + !_status.event._backup.filterTarget({name:'sha'},player,target)){ + return false; + } + return player.canUse({name:'sha'},target); + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + player.addSkill('jijiang3'); + player.addTempSkill('qinwang_ai'); + event.getParent(2).step=0; + event.finish(); + } + else if(event.current.group=='shu'){ + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', + function(card,player,event){ + var evt=event||_status.event; + return card.name=='sha'&&evt.source.canUse(card,evt.target); + }); + next.set('ai',function(card){ + var event=_status.event; + return get.effect(event.target,card,event.source,event.player); + }); + next.set('source',player); + next.set('target',target); + next.set('jijiang',true); + next.noOrdering=true; + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 1" + if(result.bool){ + event.finish(); + event.current.draw(); + if(result.cards&&result.cards.length){ + player.useCard({name:'sha',isCard:true},result.cards,target).animate=false; + } + else{ + player.useCard({name:'sha',isCard:true},target).animate=false; + } + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + }, + ai:{ + respondSha:true, + result:{ + target:function(player,target){ + if(player.hasSkill('jijiang3')) return 0; + if(player.hasSkill('qinwang_ai')) return 0; + return get.effect(target,{name:'sha'},player,target); + } + }, + order:function(){ + return get.order({name:'sha'})-0.1; + }, + } + }, + zuoding:{ + trigger:{global:'useCardToPlayered'}, + filter:function(event,player){ + if(event.getParent().triggeredTargets3.length>1) return false; + return get.suit(event.card)=='spade'&& + _status.currentPhase==event.player&&event.targets&&event.targets.length&& + event.player!=player&&game.countPlayer2(function(current){ + return current.getHistory('damage').length>0; + })==0; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zuoding'),'令一名目标角色摸一张牌',function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('targets',trigger.targets); + 'step 1' + if(result.bool){ + player.logSkill('zuoding',result.targets); + result.targets[0].draw(); + } + }, + ai:{ + expose:0.2 + }, + //group:'zuoding3' + }, + zuoding2:{}, + zuoding3:{ + trigger:{global:'damage'}, + silent:true, + content:function(){ + player.addTempSkill('zuoding2'); + } + }, + huomo:{ + audio:2, + group:['huomo_count','huomo_count2','huomo_use'] + }, + huomo2:{}, + huomo_count:{ + init:function(player){ + player.storage.huomo={}; + }, + trigger:{global:'phaseBefore'}, + silent:true, + content:function(){ + player.storage.huomo={}; + } + }, + huomo_count2:{ + trigger:{player:['useCard1']}, + silent:true, + firstDo:true, + filter:function(event){ + return get.type(event.card)=='basic'; + }, + content:function(){ + if(!player.storage.huomo) player.storage.huomo={}; + player.storage.huomo[trigger.card.name]=true; + } + }, + huomo_use:{ + enable:'chooseToUse', + filter:function(event,player){ + if(!player.storage.huomo) player.storage.huomo={}; + if((!player.storage.huomo.sha&&event.filterCard({name:'sha'},player,event))|| + (!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event))|| + (!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event))|| + (!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event))){ + return player.hasCard(function(card){ + return get.color(card)=='black'&&get.type(card)!='basic'; + },'he'); + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + if(!player.storage.huomo.sha&&event.filterCard({name:'sha'},player,event)){ + list.push(['基本','','sha']); + list.push(['基本','','sha','fire']); + list.push(['基本','','sha','thunder']); + } + if(!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event)){ + list.push(['基本','','tao']); + } + if(!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event)){ + list.push(['基本','','shan']); + } + if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)){ + list.push(['基本','','jiu']); + } + return ui.create.dialog('活墨',[list,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })){ + switch(button.link[2]){ + case 'tao':return 5; + case 'jiu':return 3.01; + case 'shan':return 3.01; + case 'sha': + if(button.link[3]=='fire') return 2.95; + else if(button.link[3]=='fire') return 2.92; + else return 2.9; + } + } + return 0; + }, + backup:function(links,player){ + return { + check:function(card){ + return 1/Math.max(0.1,get.value(card)); + }, + filterCard:function(card){ + return get.type(card)!='basic'&&get.color(card)=='black'; + }, + viewAs:{name:links[0][2],nature:links[0][3],suit:null,number:null,isCard:true}, + position:'he', + popname:true, + ignoreMod:true, + precontent:function(){ + 'step 0' + player.logSkill('huomo'); + var card=event.result.cards[0]; + event.card=card; + player.$throw(card,1000); + game.log(player,'将',card,'置于牌堆顶'); + event.result.card={name:event.result.card.name,nature:event.result.card.nature}; + event.result.cards=[]; + player.lose(card,ui.special,'visible'); + 'step 1' + game.delay(); + 'step 2' + event.card.fix(); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + game.updateRoundNumber(); + }, + } + }, + prompt:function(links,player){ + return '将一张黑色非基本牌置于牌堆顶并视为使用一张'+get.translation(links[0][3]||'')+get.translation(links[0][2]); + } + }, + ai:{ + order:function(){ + var player=_status.event.player; + var event=_status.event; + if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0){ + return 3.1; + } + return 2.9; + }, + save:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + if(player.hasCard(function(card){ + return get.color(card)=='black'&&get.type(card)!='basic'; + },'he')){ + if(!player.storage.huomo) player.storage.huomo={}; + if(tag=='respondSha'){ + if(arg!='use') return false; + if(player.storage.huomo.sha) return false; + } + else if(tag=='respondShan'){ + if(player.storage.huomo.shan) return false; + } + else{ + if(player.storage.huomo.tao&&player.storage.huomo.jiu) return false; + } + } + else{ + return false; + } + }, + result:{ + player:1 + } + } + }, + taoxi:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.targets.length==1&& + event.target.countCards('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + intro:{ + content:'card' + }, + content:function(){ + var card=trigger.target.getCards('h').randomGet(); + player.showCards([card]); + player.storage.taoxi=card; + player.storage.taoxi2=trigger.target; + player.syncStorage('taoxi'); + player.markSkill('taoxi'); + player.addTempSkill('taoxi4'); + }, + group:['taoxi2','taoxi3'] + }, + taoxi2:{ + audio:false, + enable:'phaseUse', + filter:function(event,player){ + if(player.storage.taoxi&&player.storage.taoxi2&& + get.owner(player.storage.taoxi)==player.storage.taoxi2&& + lib.filter.filterCard(player.storage.taoxi,player,event)){ + return true; + } + return false; + }, + filterTarget:function(card,player,target){ + return player.canUse(player.storage.taoxi,target); + }, + selectTarget:function(){ + var info=get.info(_status.event.player.storage.taoxi); + if(info.notarget) return -1; + return get.select(info.selectTarget); + }, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + var card=player.storage.taoxi; + if(!card){ + event.finish(); + return; + } + var owner=get.owner(card); + if(owner){ + owner.lose(card,ui.special); + } + event.card=card; + player.$throw(card); + 'step 1' + player.useCard(event.card,targets).animate=false; + delete player.storage.taoxi; + delete player.storage.taoxi2; + player.unmarkSkill('taoxi'); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + return get.effect(target,player.storage.taoxi,player,target); + }, + player:1 + } + } + }, + taoxi3:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.taoxi?true:false; + }, + content:function(){ + if(get.owner(player.storage.taoxi)==player.storage.taoxi2){ + player.loseHp(); + } + delete player.storage.taoxi; + delete player.storage.taoxi2; + player.unmarkSkill('taoxi'); + } + }, + taoxi4:{}, + xingshuai:{ + skillAnimation:true, + animationColor:'thunder', + audio:2, + trigger:{player:'dying'}, + //priority:6, + zhuSkill:true, + filter:function(event,player){ + if(player.storage.xingshuai) return false; + if(player.hp>0) return false; + if(!player.hasZhuSkill('xingshuai')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + init:function(player){ + if(player.hasZhuSkill('xingshuai')){ + player.markSkill('xingshuai'); + player.storage.xingshuai=false; + } + }, + intro:{ + content:'limited' + }, + unique:true, + limited:true, + mark:false, + content:function(){ + 'step 0' + player.storage.xingshuai=true; + player.awakenSkill('xingshuai'); + var targets=game.filterPlayer(); + targets.remove(player); + event.targets=targets; + event.damages=[]; + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + if(current.group=='wei'){ + current.chooseBool('是否令'+get.translation(player)+'回复一点体力?').set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)>2; + }).set('target',player); + event.current=current; + } + else{ + event.redo(); + } + } + else{ + event.goto(3); + } + 'step 2' + if(result.bool){ + event.damages.push(event.current); + event.current.line(player,'green'); + game.log(event.current,'令',player,'回复一点体力'); + player.recover(); + } + if(event.targets.length){ + event.goto(1); + } + 'step 3' + if(event.damages.length){ + var next=game.createEvent('xingshuaI_next'); + event.next.remove(next); + trigger.after.push(next); + next.targets=event.damages; + next.setContent(function(){ + targets.shift().damage(); + if(targets.length) event.redo(); + }); + } + } + }, + mingjian:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + selectCard:-1, + discard:false, + lose:false, + delay:false, + content:function(){ + target.gain(cards,player,'giveAuto'); + target.addTempSkill('mingjian2',{player:'phaseAfter'}); + target.storage.mingjian2++; + target.updateMarks('mingjian2'); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(player.countCards('h')==player.countCards('h','du')) return -1; + if(target.hasJudge('lebu')) return 0; + if(get.attitude(player,target)>3){ + var basis=get.threaten(target); + if(player==get.zhu(player)&&player.hp<=2&&player.countCards('h','shan')&&!game.hasPlayer(function(current){ + return get.attitude(current,player)>3&¤t.countCards('h','tao')>0; + })) return 0; + if(target.countCards('h')+player.countCards('h')>target.hp+2) return basis*0.8; + return basis; + } + return 0; + } + } + } + }, + mingjian2:{ + charlotte:true, + mark:true, + intro:{ + content:'手牌上限+#,出杀次数+#' + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=0; + }, + onremove:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.mingjian2; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.storage.mingjian2; + } + }, + }, + mingjian_old:{ + audio:2, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + var go=Math.random()<0.5; + player.chooseTarget(get.prompt('mingjian_old'),function(card,player,target){ + return player!=target + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>3){ + if(player.countCards('h')>player.hp) return att; + if(go) return att; + } + return 0; + } + 'step 1' + if(result.bool){ + player.logSkill('mingjian_old',result.targets); + trigger.cancel(); + var target=result.targets[0]; + target.addSkill('mingjian2_old'); + var hs=player.getCards('h'); + target.gain(hs,player); + player.$give(hs.length,target); + } + } + }, + mingjian2_old:{ + audio:false, + trigger:{global:'phaseAfter'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + if(lib.config.glow_phase){ + if(_status.currentPhase){ + _status.currentPhase.classList.remove('glow_phase'); + } + player.classList.add('glow_phase'); + } + game.addVideo('phaseChange',player); + _status.currentPhase=player; + player.ai.tempIgnore=[]; + player.stat.push({card:{},skill:{}}); + player.phaseUse(); + player.removeSkill('mingjian2_old'); + } + }, + huituo:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('huituo')).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0){ + return get.recoverEffect(target,player,player)+1; + } + return 0; + }); + 'step 1' + if(result.bool){ + player.logSkill('huituo',result.targets); + var target=result.targets[0]; + event.target=target; + target.judge(function(card){ + if(target.hp==target.maxHp){ + if(get.color(card)=='red') return -1; + } + if(get.color(card)=='red') return 1; + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(result.color){ + if(result.color=='red'){ + if(event.target.hp0&&event.source&& + event.card&&event.card.name=='sha'; + }, + direct:true, + //priority:5, + audio:2, + content:function(){ + 'step 0' + var prompt='弃置一张牌' + if(trigger.source.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.source)+'装备区中的'+get.translation(trigger.source.getEquip(1))); + var next=player.chooseToDiscard('he',get.prompt('duodao',trigger.source),prompt); + next.logSkill=['duodao',trigger.source]; + next.set('ai',function(card){ + if(!_status.event.getTrigger().source.getEquip(1)) return 0; + if(get.attitude(_status.event.player,_status.event.getTrigger().source)<=0){ + return 6-get.value(card); + } + return 0; + }); + 'step 1' + if(result.bool&&trigger.source.getEquip(1)){ + player.gain(trigger.source.getEquip(1),trigger.source,'give','bySelf'); + } + }, + ai:{ + maixie_defend:true, + } + }, + reanjian:{ + trigger:{player:'useCardToPlayered'}, + forced:true, + audio:'anjian', + filter:function(event,player){ + return event.card.name=='sha'&&!event.target.inRange(player); + }, + logTarget:'target', + content:function(){ + trigger.getParent().reanjian_buffed=true; + var map=trigger.customArgs; + var id=trigger.target.playerid; + if(!map[id]) map[id]={}; + if(!map[id].extraDamage) map[id].extraDamage=0; + map[id].extraDamage++; + trigger.target.addTempSkill('reanjian2'); + trigger.target.addTempSkill('reanjian4'); + trigger.target.storage.reanjian2.add(trigger.card); + }, + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&arg.target&&!arg.target.inRange(player)) return true; + return false; + } + }, + }, + reanjian2:{ + firstDo:true, + ai:{unequip2:true}, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + onremove:true, + trigger:{ + player:['damage','damageCancelled','damageZero'], + target:['shaMiss','useCardToExcluded'], + }, + charlotte:true, + filter:function(event,player){ + return player.storage.reanjian2&&event.card&&player.storage.reanjian2.contains(event.card); + }, + silent:true, + forced:true, + popup:false, + priority:12, + content:function(){ + player.storage.reanjian2.remove(trigger.card); + if(!player.storage.reanjian2.length) player.removeSkill('reanjian2'); + }, + }, + reanjian3:{ + mod:{ + cardSavable:function(card){ + if(card.name=='tao') return false; + }, + }, + }, + reanjian4:{ + trigger:{player:'dyingBegin'}, + forced:true, + silent:true, + firstDo:true, + filter:function(event,player){ + return event.getParent(2).reanjian_buffed=true; + }, + content:function(){ + player.addTempSkill('reanjian3',{global:['dyingEnd','phaseEnd']}); + }, + }, + reduodao:{ + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + return event.card.name=='sha'&&(get.color(event.card)=='red'?event.player.getEquip(1):player.countCards('he')>0); + }, + direct:true, + audio:'duodao', + content:function(){ + 'step 0' + if(get.color(trigger.card)!='red'){ + var prompt='弃置一张牌' + if(trigger.player.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.player)+'装备区中的'+get.translation(trigger.player.getEquip(1))); + var next=player.chooseToDiscard('he',get.prompt('reduodao',trigger.player),prompt); + next.logSkill=['reduodao',trigger.player]; + next.set('ai',function(card){ + if(!_status.event.getTrigger().player.getEquip(1)) return 0; + if(get.attitude(_status.event.player,_status.event.getTrigger().player)*get.value(_status.event.getTrigger().player.getEquip(1))<=0){ + return 6-get.value(card); + } + return 0; + }); + } + else{ + player.chooseBool('是否发动夺刀】,获得'+get.translation(trigger.player)+'装备区的'+get.translation(trigger.player.getEquip(1))+'?').set('ai',function(){ + var player=_status.event.player; + var source=_status.event.getTrigger().player; + return get.attitude(player,source)*get.value(source.getEquip(1))<=0; + }); + } + 'step 1' + if(result.bool&&trigger.player.getEquip(1)){ + if(!result.cards||!result.cards.length) player.logSkill('reduodao',trigger.player); + player.gain(trigger.player.getEquip(1),trigger.player,'give','bySelf'); + } + }, + }, + anjian:{ + audio:2, + trigger:{source:'damageBegin1'}, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + forced:true, + filter:function(event,player){ + return event.getParent().name=='sha'&&!event.player.inRange(player); + }, + content:function(){ + trigger.num++; + } + }, + xinpojun:{ + shaRelated:true, + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&player.isPhaseUsing()&&event.target.hp>0&&event.target.countCards('he')>0; + }, + audio:2, + content:function(){ + 'step 0' + player.choosePlayerCard(trigger.target,'he', + [1,Math.min(trigger.target.countCards('he'),trigger.target.hp)],get.prompt('xinpojun',trigger.target)); + 'step 1' + if(result.bool&&result.links.length){ + player.logSkill('xinpojun',trigger.target); + if(trigger.target.storage.xinpojun2){ + trigger.target.storage.xinpojun2=trigger.target.storage.xinpojun2.concat(result.links); + } + else{ + trigger.target.storage.xinpojun2=result.links.slice(0); + } + game.addVideo('storage',trigger.target,['xinpojun2',get.cardsInfo(trigger.target.storage.xinpojun2),'cards']); + trigger.target.addSkill('xinpojun2'); + trigger.target.lose(result.links,ui.special,'toStorage'); + } + }, + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true; + return false; + } + }, + }, + xinpojun2:{ + trigger:{global:'phaseEnd'}, + forced:true, + audio:false, + mark:true, + intro:{ + content:'cardCount', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + content:function(){ + if(player.storage.xinpojun2){ + player.gain(player.storage.xinpojun2,'fromStorage'); + delete player.storage.xinpojun2; + } + player.removeSkill('xinpojun2'); + }, + //group:'xinpojun3' + }, + xinpojun3:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + player.$throw(player.storage.xinpojun2,1000); + for(var i=0;i=0; + }, + //priority:-5, + logTarget:'player', + content:function(){ + game.asyncDraw([trigger.player,player]); + }, + ai:{ + expose:0.1 + } + }, + yanyu:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + filterCard:{name:'sha'}, + prepare:function(cards,player){ + player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); + }, + discard:false, + loseTo:'discardPile', + visible:true, + delay:0.5, + content:function(){ + player.draw(); + }, + ai:{ + basic:{ + order:1 + }, + result:{ + player:1, + }, + }, + group:'yanyu2' + }, + yanyu2:{ + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event,player){ + return player.getStat().skill.yanyu>=2; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yanyu'),'令一名男性角色摸两张牌',function(card,player,target){ + return target.sex=='male'&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('yanyu',result.targets); + result.targets[0].draw(2); + } + } + }, + youdi:{ + audio:true, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('youdi'),function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + if(target.countCards('he')==0) return 0; + return -get.attitude(_status.event.player,target); + }).set('goon',player.countCards('h','sha')<=player.countCards('h')/3); + "step 1" + if(result.bool){ + game.delay(); + player.logSkill('youdi',result.targets); + event.target=result.targets[0]; + event.target.discardPlayerCard(player,'he',true); + } + else{ + event.finish(); + } + "step 2" + if(result.links[0].name!='sha'&&event.target.countCards('he')){ + player.gainPlayerCard('he',event.target,true); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + fuhun:{ + enable:['chooseToUse','chooseToRespond'], + filterCard:true, + selectCard:2, + position:'h', + audio:2, + derivation:['new_rewusheng','olpaoxiao'], + viewAs:{name:'sha'}, + prompt:'将两张手牌当杀使用或打出', + check:function(card){ + if(_status.event.player.hasSkill('new_rewusheng')&&get.color(card)=='red') return 0; + if(_status.event.name=='chooseToRespond'){ + if(card.name=='sha') return 0; + return 6-get.useful(card); + } + if(_status.event.player.countCards('h')<4) return 6-get.useful(card); + return 7-get.useful(card); + }, + ai:{ + respondSha:true, + order:function(item,player){ + if(player.hasSkill('new_rewusheng')&&player.hasSkill('olpaoxiao')){ + return 1; + } + if(player.countCards('h')<4){ + return 1; + } + return 4; + }, + }, + group:'fuhun2' + }, + fuhun2:{ + trigger:{source:'damageSource'}, + forced:true, + filter:function(event,player){ + if(player.hasSkill('fuhun3')) return false; + return event.getParent().skill=='fuhun'; + }, + content:function(){ + player.addTempSkill('new_rewusheng'); + player.addTempSkill('olpaoxiao'); + player.addTempSkill('fuhun3'); + } + }, + fuhun3:{}, + fencheng:{ + skillAnimation:'epic', + animationColor:'gray', + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.fencheng; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + unique:true, + limited:true, + selectTarget:-1, + mark:true, + line:'fire', + content:function(){ + "step 0" + player.storage.fencheng=true; + player.awakenSkill('fencheng'); + var res=get.damageEffect(target,player,target,'fire'); + var num=Math.max(1,target.countCards('e')); + target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌或受到1点火焰伤害').set('ai',function(card){ + var res=_status.event.res; + var num=_status.event.num; + var player=_status.event.player; + if(res>=0) return -1; + if(num>2&&player.hp>1) return -1; + if(num>1&&player.hp>2) return -1; + if(get.position(card)=='e'){ + return 10-get.value(card); + } + return 6-get.value(card); + }).set('res',res).set('num',num); + "step 1" + if(!result.bool){ + target.damage('fire'); + } + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0,players=game.filterPlayer(); + for(var i=0;i0){ + num-=Math.max(1,players[i].countCards('e')); + } + else if(att<0){ + num+=Math.max(1,players[i].countCards('e')); + } + } + } + if(players.length<5){ + return num-1; + } + else{ + return num-2; + } + } + } + }, + init:function(player){ + player.storage.fencheng=false; + }, + intro:{ + content:'limited' + } + }, + mieji:{ + trigger:{player:'useCard2'}, + direct:true, + audio:2, + filter:function(event,player){ + return event.targets.length==1&&get.type(event.card)=='trick'&&get.color(event.card)=='black'; + }, + position:'he', + content:function(){ + "step 0" + player.chooseTarget(get.prompt('mieji'),'为'+get.translation(trigger.card)+'增加一个额外目标',function(card,player,target){ + var trigger=_status.event; + return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0]; + }).set('autodelay',true).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }).set('targets',trigger.targets).set('card',trigger.card); + "step 1" + if(result.bool){ + trigger.targets.push(result.targets[0]); + player.logSkill('mieji',result.targets); + } + } + }, + junxing:{ + enable:'phaseUse', + audio:2, + usable:1, + filterCard:true, + selectCard:[1,Infinity], + filter:function(event,player){ + return player.countCards('h')>0; + }, + check:function(card){ + if(ui.selected.cards.length) return -1; + var val=get.value(card); + if(get.type(card)=='basic') return 8-get.value(card); + return 5-get.value(card); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + "step 0" + var types=[]; + for(var i=0;i0; + }, + filter:function(event,player){ + if(event.player.countCards('h')) return false; + if(_status.currentPhase!=player) return false; + if(event.player==player) return false; + return event.hs&&event.hs.length>0; + }, + content:function(){ + player.line(trigger.player,'green'); + trigger.player.damage(); + }, + ai:{ + threaten:1.1 + } + }, + jiefan:{ + skillAnimation:true, + animationColor:'wood', + audio:2, + audioname:['re_handang'], + unique:true, + limited:true, + mark:true, + init:function(player){ + player.storage.jiefan=false; + }, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.jiefan; + }, + intro:{ + content:'limited' + }, + filterTarget:true, + content:function(){ + "step 0" + player.awakenSkill('jiefan'); + player.storage.jiefan=true; + event.players=game.filterPlayer(function(current){ + return current!=target&¤t.inRange(target); + }); + event.players.sortBySeat(target); + "step 1" + if(event.players.length){ + event.current=event.players.shift(); + event.current.animate('target'); + player.line(event.current,'green'); + if(event.current.countCards('he')&&target.isAlive()){ + event.current.chooseToDiscard({subtype:'equip1'},'he','弃置一张武器牌或让'+ + get.translation(target)+'摸一张牌').set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.target)<0) return 7-get.value(card); + return -1; + }).set('target',target); + event.tempbool=false; + } + else{ + event.tempbool=true; + } + } + else{ + event.finish(); + } + "step 2" + if(event.tempbool||result.bool==false){ + target.draw(); + } + event.goto(1); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(player.hp>2){ + if(game.phaseNumber0&&event.player.countCards('j')) return true; + if(event.num>1){ + if(att<0) return false; + if(att>0) return true; + } + var cards=event.player.getGainableCards(player,'e'); + for(var i=0;i=6) return true; + } + return false; + }, + filter:function(event,player){ + return player!=event.player; + }, + logTarget:'player', + content:function(){ + if(trigger.player.countGainableCards(player,'ej')){ + player.gainPlayerCard(trigger.player,'ej',true); + } + trigger.cancel(); + } + }, + sanyao:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.isMaxHp(); + }, + filter:function(event,player){ + return player.countCards('he')>0; + }, + check:function(card){return 7-get.value(card);}, + position:'he', + filterCard:true, + content:function(){ + target.damage('nocard'); + }, + ai:{ + result:{ + target:function(player,target){ + if(target.countCards('j')&&get.attitude(player,target)>0){ + return 1; + } + if(target.countCards('e')){ + return -1; + } + return get.damageEffect(target,player); + }, + }, + order:7 + } + }, + olsanyao:{ + enable:'phaseUse', + audio:'sanyao', + filter:function(event,player){ + return player.countCards('he')>0&&(!player.hasSkill('olsanyao0')||!player.hasSkill('olsanyao1')); + }, + chooseButton:{ + dialog:function(event,player){ + var list=[ + '选择手牌数最多的一名角色', + '选择体力值最大的一名角色', + ]; + var choiceList=ui.create.dialog('散谣:请选择一项','forcebutton','hidden'); + for(var i=0;inum; + })&&get.effect(target,'sanyao',player,player)>0; + }, + function(target){ + var num=target.hp; + return !game.hasPlayer(function(current){ + return current!=target&¤t.hp>num; + })&&get.effect(target,'sanyao',player,player)>0; + }, + ][button.link])) return 1+button.link; + return 0; + }, + backup:function(links){ + return { + audio:'sanyao', + filterTarget:[ + function(card,player,target){ + var num=target.countCards('h'); + return !game.hasPlayer(function(current){ + return current!=target&¤t.countCards('h')>num; + }); + }, + function(card,player,target){ + return !game.hasPlayer(function(current){ + return current!=target&¤t.hp>target.hp; + }); + } + ][links[0]], + index:links[0], + filterCard:true, + check:function(card){ + return 7-get.value(card); + }, + position:'he', + content:function(){ + player.addTempSkill('olsanyao'+lib.skill[event.name].index) + target.damage('nocard'); + }, + ai:lib.skill.sanyao.ai, + } + }, + prompt:function(){ + return '请选择【散谣】的目标' + }, + }, + ai:{ + order:7, + result:{ + player:1, + }, + }, + }, + olsanyao0:{}, + olsanyao1:{}, + rezhiman:{ + audio:'zhiman', + audioname:['guansuo'], + trigger:{source:'damageBegin2'}, + check:function(event,player){ + if(get.damageEffect(event.player,player,player)<0) return true; + var att=get.attitude(player,event.player); + if(att>0&&event.player.countCards('j')) return true; + if(event.num>1){ + if(att<0) return false; + if(att>0) return true; + } + var cards=event.player.getGainableCards(player,'he'); + for(var i=0;i=6) return true; + } + return false; + }, + logTarget:'player', + content:function(){ + if(trigger.player.countGainableCards(player,'hej')){ + player.gainPlayerCard(trigger.player,'hej',true); + } + trigger.cancel(); + } + }, + resanyao:{ + audio:'sanyao', + enable:'phaseUse', + usable:1, + selectCard:function(){ + var player=_status.event.player; + return [Math.max(1,ui.selected.targets.length),game.countPlayer(function(target){ + return target!=player&&!game.hasPlayer(function(current){ + return current!=player&¤t.hp>target.hp + }); + })]; + }, + selectTarget:function(){ + return ui.selected.cards.length; + }, + filterTarget:function(card,player,target){ + return target!=player&&!game.hasPlayer(function(current){ + return current!=player&¤t.hp>target.hp + }); + }, + check:function(card){ + var player=_status.event.player; + if(game.countPlayer(function(target){ + return target!=player&&!game.hasPlayer(function(current){ + return current!=player&¤t.hp>target.hp + })&&get.effect(target,'sanyao',player,player)>0; + })<=ui.selected.cards.length) return 0; + return 7-get.value(card); + }, + position:'he', + filterCard:true, + content:function(){ + target.damage('nocard'); + }, + ai:{ + result:{ + target:function(player,target){ + var disbool=false; + if(player.hasSkill('rezhiman')){ + if(target.countCards('j')&&get.attitude(player,target)>0){ + return 1; + } + if(target.countCards('he',function(card){ + return card.name=='tengjia'||get.value(card)>0; + })){ + disbool=true; + } + } + var damage=get.damageEffect(target,player); + if(disbool&&get.attitude(player,target)<0) return Math.min(-1,damage); + return damage; + }, + }, + order:7 + } + }, + reqiaoshui:{ + audio:'qiaoshui', + enable:'phaseUse', + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool) player.addTempSkill('qiaoshui3','phaseUseEnd'); + else{ + player.addTempSkill('qiaoshui4'); + event.getParent(3).skipped=true; + } + }, + ai:{ + order:10, + result:{ + target:function (player,target){ + if(player.hasSkill('qiaoshui3')) return 0; + var nd=!player.needsToDiscard(); + if(player.hasCard(function(card){ + if(get.position(card)!="h") return false; + var val=get.value(card) + if(nd&&val<0) return true; + if(val<=5){ + return card.number>=12; + } + if(val<=6){ + return card.number>=13; + } + return false; + })) return -1; + return 0; + }, + }, + }, + }, + qiaoshui:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('qiaoshui'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)/target.countCards('h'); + }); + "step 1" + if(result.bool){ + player.logSkill('qiaoshui',result.targets[0]); + player.chooseToCompare(result.targets[0]); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.addTempSkill('qiaoshui3'); + } + else{ + player.addTempSkill('qiaoshui2'); + } + }, + ai:{ + expose:0.1 + } + }, + qiaoshui2:{ + mod:{ + cardEnabled:function(card){ + if(get.type(card,'trick')=='trick') return false; + } + } + }, + qiaoshui3:{ + trigger:{player:'useCard2'}, + direct:true, + filter:function(event,player){ + var type=get.type(event.card); + return type=='basic'||type=='trick'; + }, + content:function(){ + 'step 0' + player.removeSkill('qiaoshui3'); + var goon=false; + var info=get.info(trigger.card); + if(trigger.targets&&!info.multitarget){ + var players=game.filterPlayer(); + for(var i=0;i1){ + event.goto(3); + } + } + 'step 1' + if(result.bool){ + if(!event.isMine()) game.delayx(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + if(event.target){ + player.logSkill('qiaoshui',event.target); + trigger.targets.add(event.target); + } + event.finish(); + 'step 3' + player.chooseTarget('巧说:是否减少一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + }).set('targets',trigger.targets); + 'step 4' + if(result.bool){ + event.targets=result.targets; + if(event.isMine()){ + player.logSkill('qiaoshui',event.targets); + event.finish(); + } + for(var i=0;i1) return false; + return event.card&&get.type(event.card)=='trick'&&event.player!=player; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:function(card,player,target){ + if(get.type(card)=='trick') return [1,1]; + }, + } + }, + shenxing:{ + audio:2, + enable:'phaseUse', + position:'he', + filterCard:true, + selectCard:2, + prompt:'弃置两张牌并摸一张牌', + check:function(card){return 4-get.useful(card)}, + content:function(){ + player.draw(); + }, + ai:{ + order:1, + result:{ + player:1 + }, + }, + }, + bingyi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterx:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<1) return false; + var color=get.color(cards[0]); + for(var i=1;i=2) return false; + if(player.hp==1) return false; + if(player.hp==2&&player.countCards('h')<2) return false; + if(event.player.countCards('h')>=event.player.hp) return false; + return true; + }, + content:function(){ + "step 0" + player.draw(2); + "step 1" + player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){ + if(ui.selected.cards.length&&card.name==ui.selected.cards[0].name) return -1; + if(get.tag(card,'damage')) return 1; + if(get.type(card)=='equip') return 1; + return 0; + }); + "step 2" + trigger.player.gain(result.cards,player,'giveAuto'); + trigger.player.addSkill('xiantu4'); + trigger.player.storage.xiantu4.push(player); + }, + ai:{ + threaten:1.1, + expose:0.3 + } + }, + xiantu1:{audio:true}, + xiantu2:{audio:true}, + xiantu4:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + audio:false, + onremove:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + charlotte:true, + content:function(){ + while(player.storage.xiantu4.length){ + var current=player.storage.xiantu4.shift(); + if(current.isDead()) continue; + current.logSkill('xiantu2'); + current.loseHp(); + } + player.removeSkill('xiantu4'); + }, + group:'xiantu3' + }, + xiantu3:{ + trigger:{source:'dieAfter'}, + forced:true, + audio:false, + content:function(){ + player.removeSkill('xiantu4'); + } + }, + qiangzhi:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('qiangzhi'),function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }).set('ai',function(){ + return Math.random(); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('qiangzhi',target); + var card=target.getCards('h').randomGet(); + player.showCards(card); + player.storage.qiangzhi=get.type(card,'trick'); + game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]); + player.markSkill('qiangzhi'); + } + }, + intro:{ + content:function(type){ + return get.translation(type)+'牌'; + } + }, + group:['qiangzhi2','qiangzhi3'], + ai:{ + order:11, + result:{ + player:1 + } + } + }, + qiangzhi2:{ + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + // return (get.type(event.card,'trick')==player.storage.qiangzhi&&event.cards[0]&&event.cards[0]==event.card); + return get.type(event.card,'trick')==player.storage.qiangzhi; + }, + content:function(){ + player.draw(); + }, + ai:{ + threaten:1.4 + } + }, + qiangzhi3:{ + trigger:{player:'phaseUseEnd'}, + silent:true, + content:function(){ + delete player.storage.qiangzhi; + player.unmarkSkill('qiangzhi'); + } + }, + dingpin:{ + group:['dingpin3','dingpin4'], + enable:'phaseUse', + //usable:3, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target.hp0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + expose:0.2 + } + }, + jiaojin:{ + audio:2, + trigger:{player:'damageBegin3'}, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male'; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令伤害-1?',function(card,player){ + return get.type(card)=='equip'; + }); + next.set('ai',function(card){ + var player=_status.event.player; + if(player.hp==1||_status.event.getTrigger().num>1){ + return 9-get.value(card); + } + if(player.hp==2){ + return 8-get.value(card); + } + return 7-get.value(card); + }); + next.logSkill='jiaojin'; + "step 1" + if(result.bool){ + game.delay(0.5); + trigger.num--; + } + } + }, + chanhui:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + if(player.hasSkill('chanhui2')) return false; + if(event.targets.length>1) return false; + var card=event.card; + if(card.name=='sha') return true; + if(get.color(card)=='black'&&get.type(card)=='trick') return true; + return false; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('chanhui'),function(card,player,target){ + if(player==target) return false; + var trigger=_status.event; + return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false; + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player)+0.01; + }).set('targets',trigger.targets).set('card',trigger.card); + "step 1" + if(result.bool){ + game.delay(0,200); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + game.delay(); + player.addSkill('chanhui2'); + player.logSkill('chanhui',event.target); + event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ + get.translation(trigger.card)+'的额外目标').set('ai',function(card){ + return 5-get.value(card); + }); + "step 3" + if(result.bool){ + player.gain(result.cards,event.target,'giveAuto'); + trigger.untrigger(); + trigger.getParent().player=event.target; + game.log(event.target,'成为了',trigger.card,'的使用者'); + } + else{ + game.log(event.target,'成为了',trigger.card,'的额外目标'); + trigger.getParent().targets.push(event.target); + } + } + }, + rechanhui:{ + audio:'chanhui', + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + if(_status.currentPhase!=player||player.hasSkill('rechanhui2')) return false; + if(event.targets.length>1) return false; + var card=event.card; + if(card.name=='sha'||get.type(card)=='trick'&&get.color(card)=='black') return true; + return false; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('rechanhui'),function(card,player,target){ + if(player==target) return false; + var trigger=_status.event; + return player.canUse(trigger.card,target,false)&&trigger.targets.contains(target)==false; + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player)+0.01; + }).set('targets',trigger.targets).set('card',trigger.card); + "step 1" + if(result.bool){ + //game.delay(0,200); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + player.logSkill('rechanhui',event.target); + event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ + get.translation(trigger.card)+'的额外目标').set('ai',function(card){ + return 5-get.value(card); + }); + "step 3" + if(result.bool){ + player.gain(result.cards,event.target,'giveAuto'); + trigger.untrigger(); + trigger.getParent().player=event.target; + game.log(event.target,'成为了',trigger.card,'的使用者'); + } + else{ + game.log(event.target,'成为了',trigger.card,'的额外目标'); + trigger.getParent().targets.push(event.target); + player.addTempSkill('rechanhui2'); + } + } + }, + rechanhui2:{}, + rejiaojin:{ + audio:'jiaojin', + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card)=='trick')&&event.player&&event.player.sex=='male'&&player.countCards('he',function(card){ + return _status.connectMode||get.type(card)=='equip'; + }); + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令'+get.translation(trigger.card)+'对你无效?',function(card,player){ + return get.type(card)=='equip'; + }); + next.set('ai',function(card){ + if(_status.event.goon2){ + return 3+_status.event.val-get.value(card); + } + return 0; + }); + next.set('val',get.value(trigger.cards.filterInD())); + next.set('goon2',get.effect(player,trigger.card,trigger.player,player)<0) + next.logSkill='rejiaojin'; + "step 1" + if(result.bool){ + var cards=trigger.cards.filterInD(); + if(cards.length) player.gain(cards,'gain2','log'); + trigger.excluded.push(player); + } + } + }, + chanhui2:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + popup:false, + audio:false, + content:function(){ + player.removeSkill('chanhui2'); + } + }, + quanji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + locked:false, + notemp:true, + init:function(player){ + if(!player.storage.quanji) player.storage.quanji=[]; + }, + filter:function(event){ + return event.num>0; + }, + content:function(){ + "step 0" + event.count=trigger.num; + "step 1" + event.count--; + player.draw(); + "step 2" + if(player.countCards('h')){ + player.chooseCard('将一张手牌置于武将牌上作为“权”',true); + } + else{ + event.goto(4); + } + "step 3" + if(result.cards&&result.cards.length){ + player.lose(result.cards,ui.special,'toStorage'); + player.storage.quanji=player.storage.quanji.concat(result.cards); + player.syncStorage('quanji'); + player.markSkill('quanji'); + game.log(player,'将',result.cards,'置于武将牌上作为“权”'); + } + "step 4" + if(event.count>0){ + player.chooseBool(get.prompt2('quanji')).set('frequentSkill','quanji'); + } + else event.finish(); + "step 5" + if(result.bool){ + player.logSkill('quanji'); + event.goto(1); + } + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.quanji.length; + } + }, + ai:{ + maixie:true, + maixie_hp:true, + threaten:0.8, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; + if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + zili:{ + skillAnimation:true, + animationColor:'thunder', + audio:2, + audioname:['re_zhonghui'], + unique:true, + juexingji:true, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3; + }, + content:function(){ + "step 0" + player.chooseDrawRecover(2,true,function(event,player){ + if(player.hp==1&&player.isDamaged()) return 'recover_hp'; + return 'draw_card'; + }); + "step 1" + player.loseMaxHp(); + player.addSkill('paiyi'); + player.awakenSkill('zili'); + } + }, + paiyi:{ + enable:'phaseUse', + usable:1, + audio:2, + audioname:['re_zhonghui'], + filter:function(event,player){ + return player.storage.quanji&&player.storage.quanji.length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('排异',player.storage.quanji,'hidden') + }, + backup:function(links,player){ + return { + audio:'paiyi', + audioname:['re_zhonghui'], + filterTarget:true, + filterCard:function(){return false}, + selectCard:-1, + card:links[0], + delay:false, + content:lib.skill.paiyi.contentx, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(player!=target) return 0; + if(player.hasSkill('requanji')||(player.countCards('h')+2<=player.hp+player.storage.quanji.length)) return 1; + return 0; + } + }, + }, + } + }, + prompt:function(){return '请选择〖排异〗的目标'}, + }, + contentx:function(){ + "step 0" + var card=lib.skill.paiyi_backup.card; + game.cardsDiscard(card); + player.$throw(card); + player.storage.quanji.remove(card); + game.log(card,'进入了弃牌堆'); + if(!player.storage.quanji.length){ + player.unmarkSkill('quanji'); + } + else{ + player.markSkill('quanji'); + } + player.syncStorage('quanji'); + game.delayx(); + "step 1" + target.draw(2); + "step 2" + if(target.countCards('h')>player.countCards('h')){ + target.damage(); + } + }, + ai:{ + order:1, + result:{ + player:1, + } + } + }, + xianzhou:{ + skillAnimation:true, + animationColor:'gray', + audio:2, + unique:true, + limited:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.xianzhou&&player.countCards('e')>0; + }, + init:function(player){ + player.storage.xianzhou=false; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + mark:true, + content:function(){ + "step 0" + player.awakenSkill('xianzhou'); + var cards=player.getCards('e'); + target.gain(cards,player,'give'); + event.num=cards.length; + player.storage.xianzhou=true; + game.delay(); + "step 1" + target.chooseTarget([1,event.num],'令'+get.translation(player)+'回复'+ + event.num+'点体力,或对攻击范围内的'+event.num+'名角色造成一点伤害',function(card,player,target2){ + return _status.event.player.inRange(target2); + }).set('ai',function(target2){ + var target=_status.event.player; + var player=_status.event.getParent().player; + if(get.attitude(target,player)>0){ + if(player.hp+event.num<=player.maxHp||player.hp==1) return -1; + } + return get.damageEffect(target2,target,target); + }); + "step 2" + if(result.bool){ + target.line(result.targets,'green'); + event.targets=result.targets; + event.num2=0; + } + else{ + player.recover(event.num); + event.finish(); + } + "step 3" + if(event.num22&&get.attitude(players[i],player)>2){ + bool=false;break; + } + } + if(bool) return -10; + if(player.hp==1) return 1; + if(game.phaseNumber0){ + return '移动装备'; + } + } + else{ + if(att<=0){ + return '移动装备'; + } + } + return 'draw_card'; + }).set('sourcex',trigger.player); + } + else{ + next=player.chooseControl('draw_card','cancel2',function(){ + return 'draw_card'; + }); + } + next.set('prompt',get.prompt('qieting',trigger.player)); + "step 1" + if(result.control=='移动装备'){ + player.logSkill('qieting',trigger.player); + player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区').set('filterButton',function(button){ + return _status.event.player.isEmpty(get.subtype(button.link)); + }); + } + else{ + if(result.control=='draw_card'){ + player.logSkill('qieting'); + player.draw(); + } + event.finish(); + } + "step 2" + if(result&&result.links&&result.links.length){ + game.delay(2); + trigger.player.$give(result.links[0],player,false); + player.equip(result.links[0]); + player.addExpose(0.2); + } + }, + }, + oldzhuikong:{ + audio:'zhuikong', + inherit:'zhuikong', + }, + zhuikong:{ + audio:2, + trigger:{global:'phaseZhunbeiBegin'}, + check:function(event,player){ + if(get.attitude(player,event.player)<-2){ + var cards=player.getCards('h'); + if(cards.length>player.hp) return true; + for(var i=0;i9&&useful<7) return true; + } + } + return false; + }, + logTarget:'player', + filter:function(event,player){ + return player.hp=0?1:-1; + }).set('sourcex',player); + game.delay(); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.gain(result.cards,event.target,'giveAuto'); + game.delay(); + } + else{ + trigger.getParent().targets.push(event.target); + trigger.getParent().triggeredTargets2.push(event.target); + game.log(event.target,'成为了额外目标'); + } + }, + ai:{ + expose:0.2, + effect:{ + target:function(card,player,target){ + if(card.name!='sha') return; + var players=game.filterPlayer(); + if(get.attitude(player,target)<=0){ + for(var i=0;i0&& + get.effect(target2,{name:'shacopy',nature:card.nature,suit:card.suit},player,player)<0){ + if(target.hp==target.maxHp) return 0.3; + return 0.6; + } + } + } + else{ + for(var i=0;i0){ + if(player.canUse(card,target2)) return; + if(target.hp==target.maxHp) return [0,1]; + return [0,0]; + } + } + } + } + } + } + }, + gongji:{ + enable:'phaseUse', + usable:1, + audio:2, + position:'he', + filterCard:true, + check:function(card){ + if(get.type(card)!='equip') return 0; + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + return 6-get.equipValue(card); + }, + content:function(){ + "step 0" + player.addTempSkill('gongji2'); + "step 1" + if(get.type(cards[0],null,cards[0].original=='h'?player:false)=='equip'){ + player.chooseTarget('是否弃置一名角色的一张牌?',function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)<0){ + return Math.max(0.5,get.effect(target,{name:'sha'},player,player)); + } + return 0; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.line(result.targets,'green'); + event.target=result.targets[0]; + player.discardPlayerCard(event.target,'he',true).ai=get.buttonValue; + } + }, + ai:{ + order:9, + result:{ + player:1 + } + } + }, + gongji2:{ + mod:{ + attackFrom:function(){ + return -Infinity; + }, + }, + }, + zhuiyi:{ + audio:2, + trigger:{player:'die'}, + direct:true, + skillAnimation:true, + animationColor:'wood', + forceDie:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('zhuiyi'),function(card,player,target){ + return player!=target&&_status.event.sourcex!=target; + }).set('forceDie',true).set('ai',function(target){ + var num=get.attitude(_status.event.player,target); + if(num>0){ + if(target.hp==1){ + num+=2; + } + if(target.hpplayers[i].countCards('h')) return true; + } + return false; + }, + selectTarget:2, + content:function(){ + 'step 0' + var gainner,giver; + if(targets[0].countCards('h')0) return -1; + var players=game.filterPlayer(); + for(var i=0;i0) return -3; + return -1; + } + } + return 0; + } + else{ + return 1; + } + }, + player:1, + } + } + }, + anxu:{ + enable:'phaseUse', + usable:1, + multitarget:true, + audio:2, + filterTarget:function(card,player,target){ + if(player==target) return false; + var num=target.countCards('h'); + if(ui.selected.targets.length){ + return numplayers[i].countCards('h')) return true; + } + return false; + }, + selectTarget:2, + content:function(){ + 'step 0' + var gainner,giver; + if(targets[0].countCards('h')0) return -1; + var players=game.filterPlayer(); + for(var i=0;i=0&&num20||player.countCards('he',{type:'equip'})>0; + }, + check:function(card){return 8-get.value(card)}, + selectTarget:2, + multitarget:true, + discard:false, + lose:false, + targetprompt:['得到牌','出杀目标'], + filterTarget:function(card,player,target){ + if(ui.selected.targets.length==0){ + return player!=target; + } + else{ + return ui.selected.targets[0].inRange(target); + } + }, + delay:false, + content:function(){ + "step 0" + targets[0].gain(cards,player,'give'); + "step 1" + if(!lib.filter.filterTarget({name:'sha',isCard:true},targets[0],targets[1])) event._result={control:'draw_card'}; + else targets[0].chooseControl('draw_card','出杀',function(){ + var player=_status.event.player; + var target=_status.event.target; + if(get.effect(_status.event.target,{name:'sha'},player,player)>0){ + return 1; + } + return 0; + }).set('target',targets[1]).set('prompt','对'+get.translation(targets[1])+'使用一张杀,或摸一张牌'); + "step 2" + if(result.control=='draw_card'){ + targets[0].draw(); + } + else{ + targets[0].useCard({name:'sha',isCard:true},targets[1]); + } + }, + ai:{ + result:{ + player:function(player){ + var players=game.filterPlayer(); + for(var i=0;i1&&get.attitude(players[i],player)>1){ + return 1; + } + } + return 0; + }, + target:function(player,target){ + if(ui.selected.targets.length){ + return -0.1; + } + return 1; + } + }, + order:8.5, + expose:0.2 + } + }, + xinxuanhuo:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + direct:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('xinxuanhuo'),function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0){ + if(target.countCards('h')1&&check<2) return 0; + return get.unuseful(card)+9; + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; + return att-2; + }, + prompt:'将'+get.cnNumber(event.num)+'张手牌交给一名其他角色', + }).set('check',check); + "step 2" + if(result.bool){ + result.targets[0].gain(result.cards,event.player,'giveAuto'); + player.line(result.targets,'green'); + } + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 3; + if(target.hp==2) return 1.5; + return 0.5; + }, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + zhenlie:{ + audio:2, + filter:function(event,player){ + return event.player!=player&&event.card&&(event.card.name=='sha'||get.type(event.card)=='trick'); + }, + logTarget:'player', + check:function(event,player){ + if(event.getParent().excluded.contains(player)) return false; + if(get.attitude(player,event.player)>0){ + return false; + } + if(get.tag(event.card,'respondSha')){ + if(player.countCards('h',{name:'sha'})==0){ + return true; + } + } + else if(get.tag(event.card,'respondShan')){ + if(player.countCards('h',{name:'shan'})==0){ + return true; + } + } + else if(get.tag(event.card,'damage')){ + if(player.countCards('h')<2) return true; + } + else if(event.card.name=='shunshou'&&player.hp>2){ + return true; + } + return false; + }, + trigger:{target:'useCardToTargeted'}, + content:function(){ + "step 0" + player.loseHp(); + "step 1" + trigger.getParent().excluded.add(player); + "step 2" + if(trigger.player.countCards('he')){ + player.discardPlayerCard(trigger.player,'he',true); + } + }, + ai:{ + expose:0.3 + } + }, + wuyan:{ + audio:2, + trigger:{target:'useCardToBefore',player:'useCardToBefore'}, + forced:true, + priority:15, + check:function(event,player){ + return get.effect(event.target,event.card,event.player,player)<0; + }, + filter:function(event,player){ + if(!event.target) return false; + if(event.player==player&&event.target==player) return false; + return (get.type(event.card)=='trick'); + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; + }, + player:function(card,player,target,current){ + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; + } + } + } + }, + xinwuyan:{ + audio:2, + trigger:{source:'damageBegin2',player:'damageBegin4'}, + forced:true, + //priority:15, + check:function(event,player){ + if(player==event.player) return true; + return false; + }, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'; + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + notrick:true, + notricksource:true, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + }, + player:function(card,player,target,current){ + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + } + } + } + }, + xinjujian:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('he')>player.countCards('he',{type:'basic'}); + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:function(card,player){ + return get.type(card)!='basic'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + if(get.tag(card,'damage')&&get.type(card)=='trick'){ + return 20; + } + return 9-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0){ + if(target.isTurnedOver()) att+=3; + if(target.hp==1) att+=3; + } + return att; + }, + position:'he', + prompt:get.prompt2('xinjujian') + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xinjujian',target); + player.discard(result.cards); + if(target.hp==target.maxHp&& + !target.isTurnedOver()&& + !target.isLinked()){ + target.draw(2); + event.finish(); + } + else{ + var controls=['draw_card']; + if(target.hp2){ + return 'recover_hp'; + } + else if(target.hp==2&&target.maxHp>2&&target.countCards('h')>1){ + return 'recover_hp'; + } + else{ + return 'draw_card'; + } + } + } + } + else{ + event.finish(); + } + "step 2" + event.control=result.control; + switch(event.control){ + case 'recover_hp':event.target.recover();event.finish();break; + case 'draw_card':event.target.draw(2);event.finish();break; + case 'reset_character':if(event.target.isTurnedOver()) event.target.turnOver();break; + } + "step 3" + if(event.control=='reset_character'&&event.target.isLinked()){ + event.target.link(); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + jujian:{ + enable:'phaseUse', + usable:1, + audio:2, + filterCard:true, + position:'he', + selectCard:[1,3], + check:function(card){ + var player=get.owner(card); + if(get.type(card)=='trick') return 10; + if(player.countCards('h')-player.hp-ui.selected.cards.length>0){ + return 8-get.value(card); + } + return 4-get.value(card); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + target.draw(cards.length); + if(cards.length==3){ + if(get.type(cards[0],'trick')==get.type(cards[1],'trick')&& + get.type(cards[0],'trick')==get.type(cards[2],'trick')){ + player.recover(); + } + } + }, + ai:{ + expose:0.2, + order:1, + result:{ + target:1 + } + } + }, + yizhong:{ + trigger:{target:'shaBefore'}, + forced:true, + audio:2, + filter:function(event,player){ + if(player.getEquip(2)) return false; + return (event.card.name=='sha'&&get.color(event.card)=='black') + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player==target&&get.subtype(card)=='equip2'){ + if(get.equipValue(card)<=8) return 0; + } + if(target.getEquip(2)) return; + if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; + } + } + } + }, + jueqing:{ + trigger:{source:'damageBefore'}, + forced:true, + audio:2, + //priority:16, + check:function(){return false;}, + content:function(){ + trigger.cancel(); + trigger.player.loseHp(trigger.num); + }, + ai:{ + jueqing:true + } + }, + shangshi:{ + audio:2, + trigger:{player:['loseAfter','changeHp']}, + frequent:true, + filter:function(event,player){ + return player.countCards('h')0) return 0; + if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; + if(!player.countCards('h','sha')) return 0; + var targets=[]; + var target; + var players=game.filterPlayer(); + for(var i=0;inum){ + target=targets[i]; + num=num2; + } + } + if(num<=0) return 0; + var e2=target.getEquip(2); + if(e2){ + if(e2.name=='tengjia'){ + if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; + } + if(e2.name=='renwang'){ + if(!player.countCards('h',{name:'sha',color:'red'})) return 0; + } + if(e2.name=='baiyin') return 0; + } + if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; + return target.countCards('h')>3?0:1; + } + if(player==_status.event.dying||player.isTurnedOver()) return 3; + } + }, + effect:{ + target:function(card,player,target){ + if(card.name=='guiyoujie') return [0,0.5]; + if(target.isTurnedOver()){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(target.hp==1) return; + return [1,target.countCards('h')/2]; + } + } + } + } + }, + }, + jiushi2:{ + trigger:{player:'damageBegin3'}, + silent:true, + firstDo:true, + filter:function(event,player){ + return player.classList.contains('turnedover'); + }, + content:function(){ + trigger.jiushi=true; + } + }, + jiushi3:{ + audio:'jiushi1', + trigger:{player:'damageEnd'}, + check:function(event,player){ + return player.isTurnedOver(); + }, + prompt:'是否发动【酒诗】,将武将牌翻面?', + filter:function(event,player){ + if(event.jiushi){ + return true; + } + return false; + }, + content:function(){ + delete trigger.jiushi; + player.turnOver(); + } + }, + zongshi:{ + audio:2, + mod:{ + maxHandcard:function(player,num){ + return num+game.countGroup(); + } + } + }, + zishou:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + check:function(event,player){ + return player.countCards('h')<=(player.hasSkill('zongshi')?player.maxHp:(player.hp-2))||player.skipList.contains('phaseUse'); + }, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num+=game.countGroup(); + player.addTempSkill('zishou2'); + }, + ai:{ + threaten:1.5 + } + }, + zishou2:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + olddanshou:{ + trigger:{source:'damageSource'}, + //priority:9, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + "step 0" + player.draw(); + var cards=Array.from(ui.ordering.childNodes); + while(cards.length){ + cards.shift().discard(); + } + "step 1" + var evt=_status.event.getParent('phase'); + if(evt){ + game.resetSkills(); + _status.event=evt; + _status.event.finish(); + _status.event.untrigger(true); + } + }, + ai:{ + jueqing:true + } + }, + danshou:{ + enable:'phaseUse', + filterCard:true, + position:'he', + audio:2, + filter:function(event,player){ + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + return player.countCards('he')>=num; + }, + check:function(card){ + if(ui.selected.cards.length>=2){ + return 4-get.value(card); + } + return 6-get.value(card); + }, + selectCard:function(card){ + var num=_status.event.player.getStat().skill.danshou; + if(num) return num+1; + return 1; + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + if(num<=2&&!target.countCards('he')) return false; + return player.inRange(target); + }, + content:function(){ + 'step 0' + var num=player.getStat().skill.danshou; + switch(num){ + case 1:player.discardPlayerCard(target,true);break; + case 2:target.chooseCard('选择一张牌交给'+get.translation(player),'he',true);break; + case 3:target.damage('nocard');break; + default:game.asyncDraw([player,target],2); + } + if(num!=2) event.finish(); + 'step 1' + if(result.cards){ + player.gain(result.cards,target,'giveAuto'); + } + }, + ai:{ + order:8.6, + result:{ + target:function(player,target){ + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + if(num>3) return 0; + if(num==3) return get.damageEffect(target,player,target); + return -1; + } + } + } + }, + qice:{ + enable:'phaseUse', + usable:1, + audio:'qice_backup', + filter:function(event,player){ + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var i=0;i0&&!players[i].hasSha()){ + return (button.link[2]=='juedou')?2:-1; + } + if(!players[i].isOut()){ + if(players[i].hp0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + } + if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1; + if(lose0) return (button.link[2]=='taoyuan')?1:-1; + return (button.link[2]=='wuzhong')?1:-1; + }, + backup:function(links,player){ + return { + filterCard:true, + selectCard:-1, + audio:2, + popname:true, + viewAs:{name:links[0][2]}, + } + }, + prompt:function(links,player){ + return '将全部手牌当作'+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0; + var cards=player.getCards('h'); + if(cards.length>=3&&player.hp>=3) return 0; + for(var i=0;i1; + } + else return event.es&&event.es.length>0; + }, + content:function(){ + "step 0" + event.count=2; + event.logged=false; + "step 1" + player.chooseTarget(get.prompt('xuanfeng'),'弃置一名其他角色的一张牌',function(card,player,target){ + if(player==target) return false; + return target.countDiscardableCards(player,'he'); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 2" + if(result.bool){ + if(!event.logged){ + player.logSkill('xuanfeng',result.targets); + event.logged=true; + } + else player.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],'he',true); + event.count--; + } + else event.finish(); + "step 3" + if(event.count) event.goto(1); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; + } + }, + reverseEquip:true, + noe:true + } + }, + jiangchi:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + direct:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + "step 0" + player.chooseControl('jiangchi_less','jiangchi_more','cancel2',function(){ + var player=_status.event.player; + if(player.countCards('h')>3&&player.countCards('h','sha')>1){ + return 'jiangchi_less'; + } + if(player.countCards('h','sha')>2){ + return 'jiangchi_less'; + } + if(player.hp-player.countCards('h')>1){ + return 'jiangchi_more'; + } + return 'cancel2'; + }); + "step 1" + if(result.control=='jiangchi_less'){ + trigger.num--; + player.addTempSkill('jiangchi2','phaseUseEnd'); + player.logSkill('jiangchi'); + } + else if(result.control=='jiangchi_more'){ + trigger.num++; + player.addTempSkill('jiangchi3','phaseUseEnd'); + player.logSkill('jiangchi'); + } + } + }, + jiangchi2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha') return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + } + }, + jiangchi3:{ + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + xinzhan:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return true;//player.countCards('h')>player.maxHp; + }, + usable:1, + content:function(){ + "step 0" + var cards=get.cards(3); + event.cards=cards; + var next=player.chooseCardButton(cards,'选择获得的红桃牌',[1,Infinity]).set('filterButton',function(button){ + return get.suit(button.link)=='heart'; + }); + "step 1" + if(result.bool){ + player.gain(result.links); + player.$draw(result.links); + game.delay(2); + } + for(var i=event.cards.length-1;i>=0;i--){ + if(!result.bool||!result.links.contains(event.cards[i])){ + ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + } + } + }, + ai:{ + order:11, + result:{ + player:1 + } + } + }, + huilei:{ + audio:2, + trigger:{player:'die'}, + forced:true, + forceDie:true, + filter:function(event){ + return event.source!=undefined; + }, + logTarget:'source', + skillAnimation:true, + animationColor:'thunder', + content:function(){ + trigger.source.discard(trigger.source.getCards('he')); + }, + ai:{ + threaten:0.7 + } + }, + xinenyuan:{ + audio:true, + trigger:{player:'damageEnd'}, + check:function(event,player){ + var att=get.attitude(player,event.source); + var num=event.source.countCards('h'); + if(att<=0) return true; + if(num>2) return true; + if(num) return att<4; + return false; + }, + filter:function(event,player){ + return event.source&&event.source!=player&&event.num>0&&event.source.isAlive(); + }, + content:function(){ + "step 0" + event.num=trigger.num; + "step 1" + trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌或流失一点体力').set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 11-get.value(card); + } + else{ + return 7-get.value(card); + } + }); + "step 2" + if(result.bool){ + player.gain(result.cards,trigger.source,'giveAuto'); + } + else{ + trigger.source.loseHp(); + } + if(event.num>1){ + event.num--; + event.goto(1); + } + }, + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; + if(!target.hasFriend()) return; + if(get.tag(card,'damage')) return [1,0,0,-0.7]; + } + } + }, + group:'xinenyuan2' + }, + xinenyuan2:{ + audio:true, + trigger:{player:'gainEnd'}, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&event.source!=player&&event.cards.length>=2; + }, + logTarget:'source', + check:function(event,player){ + return get.attitude(player,event.source)>0; + }, + content:function(){ + trigger.source.draw(); + } + }, + enyuan:{ + audio:'enyuan1', + locked:true, + group:['enyuan1','enyuan2'], + ai:{ + maixie_defend:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + if(get.tag(card,'damage')) return [1,0,0,-1]; + } + } + } + }, + enyuan1:{ + trigger:{player:'recoverEnd'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.source&&event.source!=player; + }, + content:function(){ + trigger.source.draw(); + } + }, + enyuan2:{ + trigger:{player:'damageEnd'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.source&&event.source!=player; + }, + content:function(){ + "step 0" + trigger.source.chooseCard('交出一张红桃牌或流失一点体力',function(card){ + return get.suit(card)=='heart'; + }).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 11-get.value(card); + } + else{ + return 7-get.value(card); + } + }); + "step 1" + if(result.bool){ + player.gain(result.cards,'giveAuto',trigger.source); + } + else{ + trigger.source.loseHp(); + } + } + }, + xuanhuo:{ + audio:2, + enable:'phaseUse', + usable:1, + discard:false, + lose:false, + delay:0, + filter:function(event,player){ + return player.countCards('he',{suit:'heart'}); + }, + filterCard:function(card){ + return get.suit(card)=='heart'; + }, + filterTarget:function(card,player,target){ + if(game.countPlayer()==2) return false; + return player!=target; + }, + check:function(card){ + var player=get.owner(card); + var players=game.filterPlayer(); + for(var i=0;i3) break; + } + if(i==players.length) return -1; + return 5-get.value(card); + }, + content:function(){ + "step 0" + target.gain(cards,player,'give'); + // game.delay(); + "step 1" + player.gainPlayerCard(target,'he',true); + "step 2" + var source=target; + event.card=result.links[0]; + player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ + return target!=_status.event.sourcex&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('sourcex',target); + "step 3" + if(result.bool){ + result.targets[0].gain(card,player,'give'); + game.delay(); + } + }, + ai:{ + result:{ + target:-0.5, + }, + basic:{ + order:9, + } + } + }, + ganlu:{ + enable:'phaseUse', + usable:1, + audio:2, + selectTarget:2, + filterTarget:function(card,player,target){ + if(target.isMin()) return false; + if(ui.selected.targets.length==0) return true; + if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; + return Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; + }, + multitarget:true, + content:function(){ + targets[0].swapEquip(targets[1]); + }, + ai:{ + order:10, + threaten:function(player,target){ + return 0.8*Math.max(1+target.maxHp-target.hp); + }, + result:{ + target:function(player,target){ + var list1=[]; + var list2=[]; + var num=player.maxHp-player.hp; + var players=game.filterPlayer(); + for(var i=0;i0) list1.push(players[i]); + else if(get.attitude(player,players[i])<0) list2.push(players[i]); + } + list1.sort(function(a,b){ + return a.countCards('e')-b.countCards('e'); + }); + list2.sort(function(a,b){ + return b.countCards('e')-a.countCards('e'); + }); + var delta; + for(var i=0;i0; + }, + direct:true, + content:function(){ + "step 0" + var check; + if(trigger.player.isUnderControl(true,player)){ + check=player.hasCard(function(card){ + return get.type(card)!='basic'; + }); + } + else{ + check=(get.attitude(player,trigger.player)>0); + } + player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){ + if(!_status.event.check) return 0; + if(_status.event.target.isUnderControl(true,_status.event.player)){ + if(get.type(button.link)!='basic'){ + return 10-get.value(button.link); + } + return 0; + } + else{ + return Math.random(); + } + }).set('check',check).set('filterButton',function(button){ + if(_status.event.player==_status.event.target){ + return lib.filter.cardDiscardable(button.link,_status.event.player); + } + return true; + }); + "step 1" + if(result.bool){ + player.logSkill('buyi',trigger.player); + event.card=result.links[0]; + player.showCards([event.card],get.translation(player)+'展示的手牌'); + } + else{ + event.finish(); + } + "step 2" + if(get.type(event.card)!='basic'){ + trigger.player.recover(); + trigger.player.discard(event.card); + } + }, + ai:{ + threaten:1.4 + } + }, + pojun:{ + audio:2, + trigger:{source:'damageSource'}, + check:function(event,player){ + if(event.player.isTurnedOver()) return get.attitude(player,event.player)>0; + if(event.player.hp<3){ + return get.attitude(player,event.player)<0; + } + return get.attitude(player,event.player)>0; + }, + filter:function(event){ + if(event._notrigger.contains(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.player.isAlive(); + }, + logTarget:'player', + content:function(){ + "step 0" + trigger.player.draw(Math.min(5,trigger.player.hp)); + "step 1" + trigger.player.turnOver(); + } + }, + jingce:{ + trigger:{player:'phaseUseEnd'}, + frequent:true, + filter:function(event,player){ + return player.countUsed(null,true)>=player.hp; + }, + content:function(){ + player.draw(2); + }, + audio:2, + }, + xinjingce:{ + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + filter:function(event,player){ + return player.countUsed(null,true)>=player.hp; + }, + content:function(){ + player.draw(2); + }, + audio:'jingce', + }, + oldchengxiang:{ + audio:'chengxiang', + inherit:'chengxiang', + }, + chengxiang:{ + trigger:{player:'damageEnd'}, + //direct:true, + frequent:true, + audio:2, + content:function(){ + "step 0" + event.cards=get.cards(4); + game.cardsGotoOrdering(event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards,num){ + var str; + if(player==game.me&&!_status.auto){ + str='称象:选择任意张点数不大于'+num+'的牌'; + } + else{ + str='称象'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards,event.name=='chengxiang'?13:12); + event.time=get.utc(); + game.addVideo('showCards',player,['称象',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([0,4]); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + var num=0 + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var cards2=event.cards2; + player.gain(cards2,'log','gain2'); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [1,2]; + if(target.hp==3) return [1,1.5]; + if(target.hp==2) return [1,0.5]; + } + } + } + } + }, + oldrenxin:{ + trigger:{global:'dying'}, + //priority:6, + filter:function(event,player){ + return event.player!=player&&event.player.hp<=0&&player.countCards('h')>0; + }, + check:function(event,player){ + if(get.attitude(player,event.player)<0) return false; + if(player.countCards('h',{name:['tao','jiu']})+event.player.hp<0) return false; + return true; + }, + content:function(){ + 'step 0' + player.turnOver(); + 'step 1' + trigger.player.gain(player.getCards('h'),'give',player); + 'step 2' + trigger.player.recover(); + }, + }, + renxin:{ + trigger:{global:'damageBegin4'}, + audio:3, + //priority:6, + filter:function(event,player){ + return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('renxin',trigger.player),'弃置一张装备牌并将武将牌翻面,然后防止'+get.translation(trigger.player)+'受到的伤害',{type:'equip'},'he'); + next.logSkill=['renxin',trigger.player]; + next.set('ai',function(card){ + var player=_status.event.player; + if(get.attitude(player,_status.event.getTrigger().player)>3){ + return 11-get.value(card); + } + return -1; + }); + "step 1" + if(result.bool){ + player.turnOver(); + } + else{ + event.finish(); + } + "step 2" + trigger.cancel(); + }, + ai:{ + expose:0.5 + } + }, + yuce:{ + audio:2, + trigger:{player:'damageAfter'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&player.isDamaged(); + }, + content:function(){ + "step 0" + var next=player.chooseCard(get.prompt2('yuce')); + next.set('ai',function(card){ + if(get.type(card)=='basic') return 1; + return Math.abs(get.value(card))+1; + }); + "step 1" + if(result.bool){ + player.logSkill('yuce'); + player.showCards(result.cards); + var type=get.type(result.cards[0],'trick'); + if(trigger.source){ + trigger.source.chooseToDiscard('弃置一张不为'+get.translation(type)+'牌的牌或令'+get.translation(player)+'回复一点体力',function(card){ + return get.type(card,'trick')!=_status.event.type; + }).set('ai',function(card){ + if(get.recoverEffect(_status.event.getParent().player,_status.event.player,_status.event.player)<0){ + return 7-get.value(card); + } + return 0; + }).set('type',type); + } + else{ + event.recover=true; + } + } + else{ + event.finish(); + } + "step 2" + if(event.recover){ + player.recover(); + } + else if(result.bool){ + //player.draw(); + } + else{ + player.recover(); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage'&&target.countCards('h'))){ + return 0.8 + } + } + } + } + }, + xiansi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + init:function(player){ + if(!player.storage.xiansi) player.storage.xiansi=[]; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt2('xiansi'),[1,2],function(card,player,target){ + return target.countCards('he')>0; + },function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + result.targets.sortBySeat(); + player.logSkill('xiansi',result.targets); + event.targets=result.targets; + } + else{ + event.finish(); + } + "step 2" + if(event.targets.length){ + var target=event.targets.shift(); + event.current=target; + player.choosePlayerCard(target,true); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + player.storage.xiansi=player.storage.xiansi.concat(result.links); + player.markSkill('xiansi'); + player.syncStorage('xiansi'); + event.current.lose(result.links,ui.special,'toStorage'); + event.current.$give(result.links,player,false); + event.goto(2); + } + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + ai:{ + threaten:2 + }, + global:'xiansi2' + }, + xiansi2:{ + enable:'chooseToUse', + audio:2, + viewAs:{name:'sha',isCard:true}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.hasSkill('xiansi')&¤t.storage.xiansi.length>1&&event.filterTarget({name:'sha'},player,current); + }); + }, + filterTarget:function(card,player,target){ + var bool=false; + var players=ui.selected.targets.slice(0); + for(var i=0;i1) bool=true;break; + } + if(!bool&&(!target.hasSkill('xiansi')||target.storage.xiansi.length<=1)) return false; + return _status.event._backup.filterTarget.apply(this,arguments); + }, + complexSelect:true, + selectCard:-1, + filterCard:function(){ + return false; + }, + forceaudio:true, + direct:true, + prompt:'弃置一名有【逆】的角色的两张【逆】,然后视为对包含其在内的角色使用【杀】。', + delay:false, + log:false, + precontent:function(){ + "step 0" + var targets=game.filterPlayer(function(current){ + if(event.result.targets.contains(current)&¤t.storage.xiansi){ + return current.storage.xiansi.length>1; + } + return false; + }); + if(targets.length==1){ + event.target=targets[0]; + event.goto(2); + } + else if(targets.length>0){ + player.chooseTarget(true,'选择【陷嗣】的目标',function(card,player,target){ + return _status.event.list.contains(target); + }).set('list',targets).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target); + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool&&result.targets.length){ + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + if(event.target.storage.xiansi.length==2){ + event.directresult=event.target.storage.xiansi.slice(0); + } + else{ + player.chooseCardButton('移去两张“逆”',2,event.target.storage.xiansi,true); + } + } + else{ + event.finish(); + } + "step 3" + if(event.directresult||result.bool){ + player.logSkill('xiansi2',event.target); + var links=event.directresult||result.links; + for(var i=0;i0){ + player.loseHp(); + } + else{ + player.recover(); + } + }, + subSkill:{ + damaged:{}, + ai:{} + }, + ai:{ + maixie_defend:true, + threaten:0.9, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return; + if(target.hujia) return; + if(player._shibei_tmp) return; + if(target.hasSkill('shibei_ai')) return; + if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; + if(get.tag(card,'damage')){ + if(target.getHistory('damage').length>0){ + return [1,-2]; + } + else{ + if(get.attitude(player,target)>0&&target.hp>1){ + return 0; + } + if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ + if(card.name=='sha') return; + var sha=false; + player._shibei_tmp=true; + var num=player.countCards('h',function(card){ + if(card.name=='sha'){ + if(sha){ + return false; + } + else{ + sha=true; + } + } + return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,player)>0; + }); + delete player._shibei_tmp; + if(player.hasSkillTag('damage')){ + num++; + } + if(num<2){ + var enemies=player.getEnemies(); + if(enemies.length==1&&enemies[0]==target&&player.needsToDiscard()){ + return; + } + return 0; + } + } + } + } + } + } + } + }, + shibei_old:{ + audio:2, + trigger:{player:'damageAfter'}, + forced:true, + content:function(){ + "step 0" + player.judge(function(card){ + if(player.hasSkill('shibei2')){ + if(get.color(card)=='black') return -1; + } + else{ + if(get.color(card)=='red') return 1; + } + return 0; + }) + "step 1" + if(result.judge>0){ + player.recover(); + } + else if(result.judge<0){ + player.loseHp(); + } + if(!player.hasSkill('shibei2')){ + player.addTempSkill('shibei2'); + } + } + }, + shibei2:{}, + jianying:{ + audio:2, + locked:false, + mod:{ + aiOrder:function(player,card,num){ + if(typeof card=='object'&&player.isPhaseUsing()){ + var evt=player.getLastUsed(); + if(evt&&evt.card&&(get.suit(evt.card)&&get.suit(evt.card)==get.suit(card)||evt.card.number&&evt.card.number==card.number)){ + return num+10; + } + } + }, + }, + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + var evt=player.getLastUsed(1); + if(!evt||!evt.card) return false; + if(!player.isPhaseUsing()) return false; + var evt2=evt.getParent('phaseUse'); + if(!evt2||evt2.name!='phaseUse'||evt2.player!=player) return false; + return get.suit(evt.card)&&get.suit(evt.card)==get.suit(event.card)|| + evt.card.number&&evt.card.number==event.card.number; + }, + content:function(){ + player.draw(); + }, + }, + zzhenggong:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source.countCards('e')>0; + }, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.source); + player.choosePlayerCard('e',get.prompt('zzhenggong'),trigger.source).ai=function(button){ + if(att<=0){ + return get.equipValue(button.link); + } + return 0; + } + "step 1" + if(result.bool){ + player.logSkill('zzhenggong',trigger.source); + player.equip(result.links[0]); + trigger.source.$give(result.links[0],player,false); + } + }, + ai:{ + maixie_defend:true, + } + }, + zquanji:{ + trigger:{global:'phaseZhunbeiBefore'}, + //priority:15, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(att<0){ + var nh1=event.player.countCards('h'); + var nh2=player.countCards('h'); + return nh1<=2&&nh2>nh1+1; + } + if(att>0&&event.player.hasJudge('lebu')&&event.player.countCards('h')>event.player.hp+1) return true; + return false; + }, + logTarget:'player', + filter:function(event,player){ + return player.canCompare(event.player); + }, + content:function(){ + "step 0" + player.chooseToCompare(trigger.player); + "step 1" + if(result.bool){ + trigger.player.skip('phaseJudge'); + trigger.cancel(); + } + }, + ai:{ + expose:0.2 + } + }, + zbaijiang:{ + skillAnimation:true, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + unique:true, + derivation:['zyexin','zzili'], + init:function(player){ + player.storage.zbaijiang=false; + }, + // intro:{ + // content:'limited' + // }, + filter:function(event,player){ + return !player.storage.zbaijiang&&player.countCards('e')>=2; + }, + content:function(){ + player.storage.zbaijiang=true; + player.removeSkill('zzhenggong'); + player.removeSkill('zquanji'); + player.removeSkill('zbaijiang'); + player.addSkill('zyexin'); + player.addSkill('zzili'); + player.gainMaxHp(); + } + }, + zyexin:{ + trigger:{player:'damageEnd',source:'damageSource'}, + frequent:true, + init:function(player){ + if(!player.storage.zyexin) player.storage.zyexin=[]; + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + player.$throw(storage,1000); + game.cardsDiscard(storage); + game.log(storage,'被置入了弃牌堆'); + storage.length=0; + } + }, + }, + content:function(){ + var card=game.cardsGotoSpecial(get.cards()).cards[0]; + player.storage.zyexin.push(card); + player.$draw(card); + player.markSkill('zyexin'); + game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']); + }, + group:'zyexin2' + }, + zyexin2:{ + enable:'phaseUse', + usable:1, + lose:false, + delay:false, + selectCard:[1,Infinity], + filterCard:true, + filter:function(event,player){ + return player.storage.zyexin.length>0; + }, + prompt:'用任意数量的手牌与等量的“权”交换', + content:function(){ + "step 0" + player.lose(cards,ui.special,'toStorage'); + player.storage.zyexin=player.storage.zyexin.concat(cards); + player.chooseCardButton(player.storage.zyexin,'选择'+cards.length+'张牌作为手牌',cards.length,true).ai=function(button){ + return get.value(button.link); + } + if(player==game.me&&_status.auto){ + game.delay(); + } + "step 1" + player.gain(result.links,'toStorage'); + for(var i=0;i=4&&!player.storage.zzili; + }, + forced:true, + content:function(){ + player.storage.zzili=true; + player.loseMaxHp(); + player.addSkill('zpaiyi'); + player.removeSkill('zzili'); + }, + // intro:{ + // content:'limited' + // } + }, + zpaiyi:{ + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + for(var i=0;i=lib.configOL.number-1){ + alert('至少要有两名玩家才能开始游戏!'); + return; + } game.resume(); } button.delete(); diff --git a/game/update.js b/game/update.js index 1489720b6..4c600f213 100644 --- a/game/update.js +++ b/game/update.js @@ -1,74 +1,75 @@ -window.noname_update={ - version:'1.9.102.1', - update:'1.9.102', - changeLog:[ - '朱鹭户沙耶语音', - '开黑斗地主模式', - 'OL张昌蒲、OL士燮、界简雍、界徐盛', - 'bug修复', - - ], - files:[ - //'card/extra.js', - //'card/huanlekapai.js', - //'card/sp.js', - //'card/standard.js', - //'card/swd.js', - //'card/mtg.js', - //'card/gujian.js', - 'card/guozhan.js', - //'card/gwent.js', - //'card/yunchou.js', - //'card/zhenfa.js', - //'card/zhulu.js', - 'character/diy.js', - //'character/extra.js', - //'character/hearth.js', - //'character/gujian.js', - //'character/gwent.js', - //'character/hearth.js', - 'character/mobile.js', - //'character/mtg.js', - 'character/old.js', - 'character/refresh.js', - //'character/shenhua.js', - 'character/sp.js', - 'character/sp2.js', - //'character/tw.js', - //'character/standard.js', - //'character/swd.js', - //'character/xianjian.js', - //'character/xinghuoliaoyuan.js', - 'character/yijiang.js', - //'character/yxs.js', - //'extension/boss/extension.js', - //'layout/default/layout.css', - //'layout/nova/layout.css', - //'mode/identity.js', - 'mode/doudizhu.js', - 'mode/guozhan.js', - //'mode/chess.js', - //'mode/tafang.js', - //'mode/single.js', - //'mode/stone.js', - //'mode/brawl.js', - //'mode/versus.js', - //'mode/boss.js', - 'game/game.js', - //'game/NoSleep.js', - //'game/config.js', - //'game/package.js', - //'game/asset.js', - //'game/source.js', - //'theme/style/hp/xinglass.css', - //'theme/style/hp/xinround.css', - //'theme/style/hp/image/xinglass1.png', - //'theme/style/hp/image/xinglass2.png', - //'theme/style/hp/image/xinglass3.png', - //'theme/style/hp/image/xinglass4.png', - //'theme/style/hp/image/xinround1.png', - //'theme/style/hp/image/xinround2.png', - //'theme/style/hp/image/xinround3.png', - //'theme/style/hp/image/xinround4.png', - ] -}; +window.noname_update={ + version:'1.9.103.1', + update:'1.9.103', + changeLog:[ + 'SP仲村由理', + '美坂栞、美坂香里', + '新神关羽', + '武将分包调整', + 'bug修复', + + ], + files:[ + //'card/extra.js', + //'card/huanlekapai.js', + //'card/sp.js', + //'card/standard.js', + //'card/swd.js', + //'card/mtg.js', + //'card/gujian.js', + //'card/guozhan.js', + //'card/gwent.js', + //'card/yunchou.js', + //'card/zhenfa.js', + //'card/zhulu.js', + //'character/diy.js', + 'character/extra.js', + //'character/hearth.js', + //'character/gujian.js', + //'character/gwent.js', + //'character/hearth.js', + //'character/mobile.js', + //'character/mtg.js', + //'character/old.js', + //'character/refresh.js', + 'character/shenhua.js', + //'character/sp.js', + //'character/sp2.js', + //'character/tw.js', + //'character/standard.js', + //'character/swd.js', + //'character/xianjian.js', + //'character/xinghuoliaoyuan.js', + //'character/yijiang.js', + //'character/yxs.js', + //'extension/boss/extension.js', + //'layout/default/layout.css', + //'layout/nova/layout.css', + //'mode/identity.js', + //'mode/doudizhu.js', + //'mode/guozhan.js', + //'mode/chess.js', + //'mode/tafang.js', + //'mode/single.js', + //'mode/stone.js', + //'mode/brawl.js', + //'mode/versus.js', + //'mode/boss.js', + 'game/game.js', + //'game/NoSleep.js', + //'game/config.js', + //'game/package.js', + //'game/asset.js', + //'game/source.js', + //'theme/style/hp/xinglass.css', + //'theme/style/hp/xinround.css', + //'theme/style/hp/image/xinglass1.png', + //'theme/style/hp/image/xinglass2.png', + //'theme/style/hp/image/xinglass3.png', + //'theme/style/hp/image/xinglass4.png', + //'theme/style/hp/image/xinround1.png', + //'theme/style/hp/image/xinround2.png', + //'theme/style/hp/image/xinround3.png', + //'theme/style/hp/image/xinround4.png', + ] +}; diff --git a/image/character/key_kaori.jpg b/image/character/key_kaori.jpg new file mode 100644 index 000000000..6e21f9136 Binary files /dev/null and b/image/character/key_kaori.jpg differ diff --git a/image/character/key_shiori.jpg b/image/character/key_shiori.jpg new file mode 100644 index 000000000..fcee33d05 Binary files /dev/null and b/image/character/key_shiori.jpg differ diff --git a/mode/stone.js b/mode/stone.js index 1ca3994b3..1a2b1a673 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -1207,7 +1207,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ stone_fennuxiaoji:['male','qun',1,['stone_fennuxiaoji1'],['minskin','stone'],[1,2]], stone_juxingchanchu:['male','qun',2,['stone_juxingchanchu1'],['minskin','stone'],[2,1]], - stone_wuyi:['male','qun',1,['jijiu'],['minskin','stone'],[2,2]], + stone_wuyi:['male','qun',1,['jijiu'],['minskin','stone','die_audio'],[2,2]], stone_langren:['male','qun',1,['stone_qianxing'],['minskin','stone'],[1,2]], stone_shishigui:['male','qun',2,['stone_shishigui1'],['minskin','stone'],[2,1]],