From 4dfddbbc7026b2e2dbe06502ea2b8793a723192c Mon Sep 17 00:00:00 2001 From: Jikun <929970065@qq.com> Date: Fri, 23 Feb 2024 03:09:55 +0800 Subject: [PATCH] Revert "fix: change skill name addskils to addskills" This reverts commit 21700e296cc060bfa48d6ec6c56496f8055ce1e2. --- character/sp.js | 35817 +++++++++++++++++++++++----------------------- character/tw.js | 21244 +++++++++++++-------------- 2 files changed, 28531 insertions(+), 28530 deletions(-) diff --git a/character/sp.js b/character/sp.js index af480abd8..23cf7522d 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1,1094 +1,1094 @@ import { game } from '../noname.js'; -game.import('character', function (lib, game, ui, get, ai, _status) { +game.import('character',function(lib,game,ui,get,ai,_status){ return { - name: 'sp', - connect: true, - characterSort: { - sp: { - sp_tianji: ["sunhao", "liuxie", "caoang", "hetaihou", "sunluyu", 'ol_wangrong', "zuofen", "ol_bianfuren", "qinghegongzhu", "tengfanglan", "ruiji", 'caoxiancaohua'], - sp_sibi: ["yangxiu", "chenlin", "chengyu", "shixie", "fuwan", "wangyun", "zhugejin", "simalang", "maliang", "buzhi", "dongyun", "kanze", "sunqian", "xizhicai", "sunshao", 'duxi', "jianggan", 'ol_dengzhi', 'ol_yangyi', 'ol_dongzhao', 'ol_chendeng', 'jin_yanghu', 'wangyan', 'xiahouxuan', 'quhuang', 'zhanghua', 'wangguan', 'sunhong', 'caoxi'], - sp_tianzhu: ['liyi', 'zhangyan', 'niujin', 'hejin', 'hansui', "wutugu", "yanbaihu", "shamoke", "zhugedan", 'huangzu', 'gaogan', "tadun", "fanjiangzhangda", "ahuinan", "dongtuna", 'ol_wenqin'], - sp_nvshi: ['ol_dingshangwan', "lingju", "guanyinping", "zhangxingcai", "mayunlu", "dongbai", "zhaoxiang", 'ol_zhangchangpu', "daxiaoqiao", "jin_guohuai"], - sp_shaowei: ["simahui", "zhangbao", "zhanglu", "zhugeguo", "xujing", "zhangling", 'huangchengyan', 'zhangzhi', 'lushi'], - sp_huben: ['duanjiong', 'ol_mengda', "caohong", "xiahouba", "zhugeke", "zumao", "wenpin", "litong", "mazhong", "heqi", "quyi", "luzhi", "zangba", "yuejin", "dingfeng", "wuyan", "ol_zhuling", "tianyu", "huojun", 'zhaoyǎn', 'dengzhong', 'ol_furong', 'macheng', 'ol_zhangyì', 'ol_zhujun', 'maxiumatie', 'luoxian', 'ol_huban', 'haopu', 'ol_qianzhao'], - sp_liesi: ['lvboshe', 'mizhu', 'weizi', 'ol_liuba', 'zhangshiping'], - sp_default: ["sp_diaochan", "sp_zhaoyun", "sp_sunshangxiang", "sp_caoren", "sp_jiangwei", "sp_machao", "sp_caiwenji", "jsp_guanyu", "jsp_huangyueying", "sp_pangde", "sp_jiaxu", "yuanshu", 'sp_zhangliao', 'sp_ol_zhanghe', 'sp_menghuo'], - sp_qifu: ['ol_feiyi', "caoying", 'panshu', "caochun", "yuantanyuanshang", 'caoshuang', 'wolongfengchu', 'guansuo', 'baosanniang', 'fengfangnv', 'jin_zhouchu'], - sp_wanglang: ['ol_wanglang', 'ol_puyuan', 'ol_zhouqun'], - sp_zhongdan: ["cuiyan", "huangfusong"], - sp_guozhan2: ["sp_dongzhuo", "liqueguosi", "zhangren"], - sp_others: ["hanba", "caiyang"], - sp_waitforsort: ['ol_luyusheng', 'ol_pengyang', 'ol_tw_zhangji', 'ol_liwan', 'ol_liuyan', 'caoyu', 'tianchou', 'ol_hujinding'], + name:'sp', + connect:true, + characterSort:{ + sp:{ + sp_tianji:["sunhao","liuxie","caoang","hetaihou","sunluyu",'ol_wangrong',"zuofen","ol_bianfuren","qinghegongzhu","tengfanglan","ruiji",'caoxiancaohua'], + sp_sibi:["yangxiu","chenlin","chengyu","shixie","fuwan","wangyun","zhugejin","simalang","maliang","buzhi","dongyun","kanze","sunqian","xizhicai","sunshao",'duxi',"jianggan",'ol_dengzhi','ol_yangyi','ol_dongzhao','ol_chendeng','jin_yanghu','wangyan','xiahouxuan','quhuang','zhanghua','wangguan','sunhong','caoxi'], + sp_tianzhu:['liyi','zhangyan','niujin','hejin','hansui',"wutugu","yanbaihu","shamoke","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna",'ol_wenqin'], + sp_nvshi:['ol_dingshangwan',"lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu',"daxiaoqiao","jin_guohuai"], + sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','zhangzhi','lushi'], + sp_huben:['duanjiong','ol_mengda',"caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_huban','haopu','ol_qianzhao'], + sp_liesi:['lvboshe','mizhu','weizi','ol_liuba','zhangshiping'], + sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo'], + sp_qifu:['ol_feiyi',"caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'], + sp_wanglang:['ol_wanglang','ol_puyuan','ol_zhouqun'], + sp_zhongdan:["cuiyan","huangfusong"], + sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"], + sp_others:["hanba","caiyang"], + sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','tianchou','ol_hujinding'], }, }, - characterFilter: { - tianyu: function (mode) { - return mode != 'chess' && mode != 'tafang' && mode != 'stone'; + characterFilter:{ + tianyu:function(mode){ + return mode!='chess'&&mode!='tafang'&&mode!='stone'; }, - ol_dongzhao: function (mode) { - return mode == 'identity' && ['normal', 'zhong'].includes(_status.mode); + ol_dongzhao:function(mode){ + return mode=='identity'&&['normal','zhong'].includes(_status.mode); }, }, - character: { - ol_hujinding: ['female', 'shu', 3, ['olqingyuan', 'olchongshen']], - tianchou: ['male', 'qun', 4, ['olshandao']], - liyi: ['male', 'wu', 4, ['olchanshuang', 'olzhanjin']], - caoyu: ['male', 'wei', 3, ['olgongjie', 'olxiangxv', 'olxiangzuo']], - ol_liwan: ['female', 'wei', 3, ['ollianju', 'olsilv']], - ol_dingshangwan: ['female', 'wei', 3, ['olfudao', 'olfengyan']], - zhangyan: ['male', 'qun', 4, ['olsuji', 'ollangdao']], - ol_tw_zhangji: ['male', 'wei', 3, ['skill_zhangji_A', 'skill_zhangji_B'], ['unseen']], - ol_feiyi: ['male', 'shu', 3, ['yanru', 'hezhong']], - lvboshe: ['male', 'qun', 4, ['olfushi', 'oldongdao']], - ol_luyusheng: ['female', 'wu', 3, ['olcangxin', 'olrunwei']], - caoxi: ['male', 'wei', 3, ['olgangshu', 'oljianxuan']], - ol_pengyang: ['male', 'shu', 3, ['olqifan', 'oltuishi', 'nzry_cunmu']], - ol_qianzhao: ['male', 'wei', 4, ['olweifu', 'olkuansai']], - niujin: ['male', 'wei', 4, ['olcuorui', 'liewei']], - hejin: ['male', 'qun', 4, ['mouzhu', 'olyanhuo']], - hansui: ['male', 'qun', 4, ['olniluan', 'olxiaoxi']], - duanjiong: ['male', 'qun', 4, ['olsaogu']], - ol_zhouqun: ['male', 'shu', 4, ['oltianhou', 'olchenshuo']], - ol_wenqin: ['male', 'wei', 4, ['olguangao', 'olhuiqi']], - haopu: ['male', 'shu', 4, ['olzhenying']], - ol_mengda: ['male', 'shu', 4, ['olgoude']], - ol_wanglang: ['male', 'wei', 3, ['gushe', 'oljici']], - ol_liuyan: ['male', 'qun', '4/6', ['olpianan', 'olyinji', 'olkuisi']], - lushi: ['female', 'qun', 3, ['olzhuyan', 'olleijie']], - zhangshiping: ['male', 'shu', 3, ['olhongji', 'olxinggu']], - sunhong: ['male', 'wu', 3, ['olxianbi', 'olzenrun']], - luoxian: ['male', 'shu', 4, ['oldaili']], - ol_huban: ['male', 'wei', 4, ['olhuiyun']], - wangguan: ['male', 'wei', 3, ['olmiuyan', 'olshilu']], - ol_zhangyì: ['male', 'shu', 4, ['oldianjun', 'olkangrui']], - ol_zhujun: ['male', 'qun', 4, ['olcuipo']], - maxiumatie: ['male', 'qun', 4, ['mashu', 'rekenshang']], - dongtuna: ['male', 'qun', 4, ['oljianman']], - zhanghua: ['male', 'jin', 3, ['olbihun', 'oljianhe', 'olchuanwu']], - quhuang: ['male', 'wu', 3, ['olqiejian', 'olnishou']], - macheng: ['male', 'shu', 4, ['mashu', 'olchenglie']], - zhangzhi: ['male', 'qun', 3, ['olbixin', 'olximo']], - ol_liuba: ['male', 'shu', 3, ['oltongduo', 'olzhubi']], - ol_furong: ['male', 'shu', 4, ['olxiaosi']], - ahuinan: ['male', 'qun', 4, ['jueman']], - jin_guohuai: ['female', 'jin', 3, ['zhefu', 'yidu']], - xiahouxuan: ['male', 'wei', 3, ['olhuanfu', 'olqingyi', 'olzeyue']], - dengzhong: ['male', 'wei', 4, ['dzkanpo', 'dzgengzhan']], - wangyan: ['male', 'jin', 3, ['yangkuang', 'cihuang', 'sanku']], - huojun: ['male', 'shu', 4, ['qiongshou', 'fenrui']], - caoxiancaohua: ['female', 'qun', 3, ['huamu', 'qianmeng', 'liangyuan', 'jisi']], - jin_zhouchu: ['male', 'jin', 4, ['shanduan', 'yilie']], - zhaoyǎn: ['male', 'wei', 4, ['tongxie']], - ol_puyuan: ['male', 'shu', 4, ['olshengong', 'olqisi']], - ruiji: ['female', 'wu', 3, ['qiaoli', 'qingliang']], - weizi: ['male', 'qun', 3, ['yuanzi', 'liejie']], - tengfanglan: ['female', 'wu', 3, ['luochong', 'aichen']], - sp_menghuo: ['male', 'qun', 4, ['spmanwang']], - jin_yanghu: ['male', 'jin', 4, ['huaiyuan', 'chongxin', 'dezhang']], - qinghegongzhu: ['female', 'wei', 3, ['zengou', 'qhzhangji']], - fanjiangzhangda: ['male', 'wu', 4, ['yuanchou', 'juesheng']], - tianyu: ['male', 'wei', 4, ['saodi', 'zhuitao']], - ol_chendeng: ['male', 'qun', 4, ['olfengji']], - ol_zhuling: ['male', 'wei', 4, ['jixian']], - wuyan: ['male', 'wu', 4, ['lanjiang']], - sp_ol_zhanghe: ['male', 'qun', 4, ['spolzhouxuan']], - ol_dongzhao: ['male', 'wei', 3, ['olxianlve', 'olzaowang']], - fengfangnv: ['female', 'qun', 3, ['zhuangshu', 'chuiti']], - ol_yangyi: ['male', 'shu', 3, ['oljuanxia', 'oldingcuo']], - zuofen: ['female', 'jin', 3, ['zhaosong', 'lisi']], - ol_wangrong: ['female', 'qun', 3, ['olfengzi', 'oljizhan', 'olfusong']], - ol_dengzhi: ['male', 'shu', 3, ['olxiuhao', 'olsujian']], - ol_bianfuren: ['female', 'wei', 3, ['fuwei', 'yuejian']], - duxi: ['male', 'wei', 3, ['quxi', 'bixiong']], - gaogan: ['male', 'qun', 4, ['juguan']], - huangchengyan: ['male', 'qun', 3, ['guanxu', 'yashi']], - huangzu: ['male', 'qun', 4, ['wangong']], - panshu: ['female', 'wu', 3, ['weiyi', 'jinzhi']], - wolongfengchu: ['male', 'shu', 4, ['youlong', 'luanfeng']], - sp_zhangliao: ['male', 'qun', 4, ['mubing', 'ziqu', 'diaoling']], - caoshuang: ['male', 'wei', 4, ['retuogu', 'shanzhuan']], - ol_zhangchangpu: ['female', 'wei', 3, ['yanjiao', 'olxingshen']], - zhangling: ['male', 'qun', 3, ['zlhuji', 'zlshoufu']], - caiyang: ['male', 'qun', 1, ['yinka', 'zhuixi'], ['forbidai', 'unseen']], - sunshao: ['male', 'wu', 3, ['bizheng', 'yidian']], + character:{ + ol_hujinding:['female','shu',3,['olqingyuan','olchongshen']], + tianchou:['male','qun',4,['olshandao']], + liyi:['male','wu',4,['olchanshuang','olzhanjin']], + caoyu:['male','wei',3,['olgongjie','olxiangxv','olxiangzuo']], + ol_liwan:['female','wei',3,['ollianju','olsilv']], + ol_dingshangwan:['female','wei',3,['olfudao','olfengyan']], + zhangyan:['male','qun',4,['olsuji','ollangdao']], + ol_tw_zhangji:['male','wei',3,['skill_zhangji_A','skill_zhangji_B'],['unseen']], + ol_feiyi:['male','shu',3,['yanru','hezhong']], + lvboshe:['male','qun',4,['olfushi','oldongdao']], + ol_luyusheng:['female','wu',3,['olcangxin','olrunwei']], + caoxi:['male','wei',3,['olgangshu','oljianxuan']], + ol_pengyang:['male','shu',3,['olqifan','oltuishi','nzry_cunmu']], + ol_qianzhao:['male','wei',4,['olweifu','olkuansai']], + niujin:['male','wei',4,['olcuorui','liewei']], + hejin:['male','qun',4,['mouzhu','olyanhuo']], + hansui:['male','qun',4,['olniluan','olxiaoxi']], + duanjiong:['male','qun',4,['olsaogu']], + ol_zhouqun:['male','shu',4,['oltianhou','olchenshuo']], + ol_wenqin:['male','wei',4,['olguangao','olhuiqi']], + haopu:['male','shu',4,['olzhenying']], + ol_mengda:['male','shu',4,['olgoude']], + ol_wanglang:['male','wei',3,['gushe','oljici']], + ol_liuyan:['male','qun','4/6',['olpianan','olyinji','olkuisi']], + lushi:['female','qun',3,['olzhuyan','olleijie']], + zhangshiping:['male','shu',3,['olhongji','olxinggu']], + sunhong:['male','wu',3,['olxianbi','olzenrun']], + luoxian:['male','shu',4,['oldaili']], + ol_huban:['male','wei',4,['olhuiyun']], + wangguan:['male','wei',3,['olmiuyan','olshilu']], + ol_zhangyì:['male','shu',4,['oldianjun','olkangrui']], + ol_zhujun:['male','qun',4,['olcuipo']], + maxiumatie:['male','qun',4,['mashu','rekenshang']], + dongtuna:['male','qun',4,['oljianman']], + zhanghua:['male','jin',3,['olbihun','oljianhe','olchuanwu']], + quhuang:['male','wu',3,['olqiejian','olnishou']], + macheng:['male','shu',4,['mashu','olchenglie']], + zhangzhi:['male','qun',3,['olbixin','olximo']], + ol_liuba:['male','shu',3,['oltongduo','olzhubi']], + ol_furong:['male','shu',4,['olxiaosi']], + ahuinan:['male','qun',4,['jueman']], + jin_guohuai:['female','jin',3,['zhefu','yidu']], + xiahouxuan:['male','wei',3,['olhuanfu','olqingyi','olzeyue']], + dengzhong:['male','wei',4,['dzkanpo','dzgengzhan']], + wangyan:['male','jin',3,['yangkuang','cihuang','sanku']], + huojun:['male','shu',4,['qiongshou','fenrui']], + caoxiancaohua:['female','qun',3,['huamu','qianmeng','liangyuan','jisi']], + jin_zhouchu:['male','jin',4,['shanduan','yilie']], + zhaoyǎn:['male','wei',4,['tongxie']], + ol_puyuan:['male','shu',4,['olshengong','olqisi']], + ruiji:['female','wu',3,['qiaoli','qingliang']], + weizi:['male','qun',3,['yuanzi','liejie']], + tengfanglan:['female','wu',3,['luochong','aichen']], + sp_menghuo:['male','qun',4,['spmanwang']], + jin_yanghu:['male','jin',4,['huaiyuan','chongxin','dezhang']], + qinghegongzhu:['female','wei',3,['zengou','qhzhangji']], + fanjiangzhangda:['male','wu',4,['yuanchou','juesheng']], + tianyu:['male','wei',4,['saodi','zhuitao']], + ol_chendeng:['male','qun',4,['olfengji']], + ol_zhuling:['male','wei',4,['jixian']], + wuyan:['male','wu',4,['lanjiang']], + sp_ol_zhanghe:['male','qun',4,['spolzhouxuan']], + ol_dongzhao:['male','wei',3,['olxianlve','olzaowang']], + fengfangnv:['female','qun',3,['zhuangshu','chuiti']], + ol_yangyi:['male','shu',3,['oljuanxia','oldingcuo']], + zuofen:['female','jin',3,['zhaosong','lisi']], + ol_wangrong:['female','qun',3,['olfengzi','oljizhan','olfusong']], + ol_dengzhi:['male','shu',3,['olxiuhao','olsujian']], + ol_bianfuren:['female','wei',3,['fuwei','yuejian']], + duxi:['male','wei',3,['quxi','bixiong']], + gaogan:['male','qun',4,['juguan']], + huangchengyan:['male','qun',3,['guanxu','yashi']], + huangzu:['male','qun',4,['wangong']], + panshu:['female','wu',3,['weiyi','jinzhi']], + wolongfengchu:['male','shu',4,['youlong','luanfeng']], + sp_zhangliao:['male','qun',4,['mubing','ziqu','diaoling']], + caoshuang:['male','wei',4,['retuogu','shanzhuan']], + ol_zhangchangpu:['female','wei',3,['yanjiao','olxingshen']], + zhangling:['male','qun',3,['zlhuji','zlshoufu']], + caiyang:['male','qun',1,['yinka','zhuixi'],['forbidai','unseen']], + sunshao:['male','wu',3,['bizheng','yidian']], - huangfusong: ['male', 'qun', 4, ['fenyue']], - yuantanyuanshang: ['male', 'qun', 4, ['neifa']], - xujing: ['male', 'shu', 3, ['yuxu', 'xjshijian']], + huangfusong:['male','qun',4,['fenyue']], + yuantanyuanshang:['male','qun',4,['neifa']], + xujing:['male','shu',3,['yuxu','xjshijian']], - jianggan: ["male", "wei", 3, ["weicheng", "daoshu"]], + jianggan:["male","wei",3,["weicheng","daoshu"]], - caoying: ["female", "wei", 4, ["xinfu_lingren", "xinfu_fujian"], []], - simahui: ["male", "qun", 3, ["jianjie", "xinfu_chenghao", "xinfu_yinshi"], []], - baosanniang: ["female", "shu", 4, ["olwuniang", "olxushen"], []], + caoying:["female","wei",4,["xinfu_lingren","xinfu_fujian"],[]], + simahui:["male","qun",3,["jianjie","xinfu_chenghao","xinfu_yinshi"],[]], + baosanniang:["female","shu",4,["olwuniang","olxushen"],[]], - 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']], - liuxie: ['male', 'qun', 3, ['tianming', 'mizhao', 'twzhuiting'], ['zhu']], - zhugejin: ['male', 'wu', 3, ['olhuanshi', 'olhongyuan', 'olmingzhe']], - 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, ['dcmoukui']], - 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']], - maliang: ['male', 'shu', 3, ['zishu', 'yingyuan']], - zhugedan: ['male', 'wei', 4, ['gongao', 'juyi']], - sp_jiangwei: ['male', 'wei', 4, ['kunfen', 'fengliang']], - sp_machao: ['male', 'qun', 4, ['olzhuiji', 'ol_shichou']], - sunhao: ['male', 'wu', 5, ['recanshi', 'rechouhai', 'guiming'], ['zhu']], - shixie: ['male', 'qun', 3, ['olbiluan', 'relixia']], - mayunlu: ['female', 'shu', 4, ['fengpo', 'mashu']], - zhanglu: ['male', 'qun', 3, ['yishe', 'bushi', 'midao', 'twshijun'], ['zhu']], - wutugu: ['male', 'qun', 15, ['ranshang', 'hanyong']], - sp_caiwenji: ['female', 'wei', 3, ['chenqing', 'mozhi']], - zhugeguo: ['female', 'shu', 3, ['qirang', 'yuhua']], + 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']], + liuxie:['male','qun',3,['tianming','mizhao','twzhuiting'],['zhu']], + zhugejin:['male','wu',3,['olhuanshi','olhongyuan','olmingzhe']], + 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,['dcmoukui']], + 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']], + maliang:['male','shu',3,['zishu','yingyuan']], + zhugedan:['male','wei',4,['gongao','juyi']], + sp_jiangwei:['male','wei',4,['kunfen','fengliang']], + sp_machao:['male','qun',4,['olzhuiji','ol_shichou']], + sunhao:['male','wu',5,['recanshi','rechouhai','guiming'],['zhu']], + shixie:['male','qun',3,['olbiluan','relixia']], + mayunlu:['female','shu',4,['fengpo','mashu']], + zhanglu:['male','qun',3,['yishe','bushi','midao','twshijun'],['zhu']], + wutugu:['male','qun',15,['ranshang','hanyong']], + sp_caiwenji:['female','wei',3,['chenqing','mozhi']], + zhugeguo:['female','shu',3,['qirang','yuhua']], - lingju: ['female', 'qun', 3, ['jieyuan', 'fenxin']], + lingju:['female','qun',3,['jieyuan','fenxin']], - cuiyan: ['male', 'wei', 3, ['yawang', 'xunzhi']], - 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']], + cuiyan:['male','wei',3,['yawang','xunzhi']], + 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']], - guansuo: ['male', 'shu', 4, ['zhengnan', 'xiefang']], - tadun: ['male', 'qun', 4, ['reluanzhan']], - yanbaihu: ['male', 'qun', 4, ['zhidao', 'jili']], - chengyu: ['male', 'wei', 3, ['shefu', 'benyu']], + guansuo:['male','shu',4,['zhengnan','xiefang']], + tadun:['male','qun',4,['reluanzhan']], + yanbaihu:['male','qun',4,['zhidao','jili']], + chengyu:['male','wei',3,['shefu','benyu']], - sp_pangde: ['male', 'wei', 4, ['mashu', 'juesi']], - sp_jiaxu: ['male', 'wei', 3, ['zhenlue', 'jianshu', 'yongdi']], + 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']], + litong:['male','wei',4,['tuifeng']], + mizhu:['male','shu',3,['ziyuan','jugu']], + buzhi:['male','wu',3,['hongde','dingpan']], - caochun: ['male', 'wei', 4, ['xinshanjia']], + caochun:['male','wei',4,['xinshanjia']], - dongbai: ['female', 'qun', 3, ['lianzhu', 'xiehui']], + dongbai:['female','qun',3,['lianzhu','xiehui']], - zhaoxiang: ['female', 'shu', 4, ['fanghun', 'fuhan']], - mazhong: ['male', 'shu', 4, ['fuman']], - dongyun: ['male', 'shu', 3, ['bingzheng', 'sheyan']], - kanze: ['male', 'wu', 3, ['xiashu', 'kuanshi']], - heqi: ['male', 'wu', 4, ['olqizhou', 'olshanxi']], + zhaoxiang:['female','shu',4,['fanghun','fuhan']], + mazhong:['male','shu',4,['fuman']], + dongyun:['male','shu',3,['bingzheng','sheyan']], + kanze:['male','wu',3,['xiashu','kuanshi']], + heqi:['male','wu',4,['olqizhou','olshanxi']], //mifuren:['female','shu',3,['guixiu','cunsi']], - yuejin: ['male', 'wei', 4, ['xiaoguo']], - sp_dongzhuo: ['male', 'qun', 5, ['hengzheng']], - hetaihou: ['female', 'qun', 3, ['zhendu', 'qiluan']], - dingfeng: ['male', 'wu', 4, ['reduanbing', 'refenxun']], - shamoke: ['male', 'shu', 4, ['gzjili']], + yuejin:['male','wei',4,['xiaoguo']], + sp_dongzhuo:['male','qun',5,['hengzheng']], + hetaihou:['female','qun',3,['zhendu','qiluan']], + dingfeng:['male','wu',4,['reduanbing','refenxun']], + shamoke:['male','shu',4,['gzjili']], //liqueguosi:['male','qun',4,['xiongsuan']], //cuimao:['male','wei',3,['zhengbi','fengying']], - zangba: ['male', 'wei', 4, ['rehengjiang']], - zhangren: ['male', 'qun', 4, ['chuanxin', 'zfengshi']], + zangba:['male','wei',4,['rehengjiang']], + zhangren:['male','qun',4,['chuanxin','zfengshi']], - wangyun: ['male', 'qun', 4, ['xinlianji', 'xinmoucheng'], ['clan:太原王氏']], - sunqian: ['male', 'shu', 3, ['qianya', 'shuimeng']], - xizhicai: ['male', 'wei', 3, ['tiandu', 'xianfu', 'chouce']], - quyi: ['male', 'qun', 4, ['fuqi', 'jiaozi']], + wangyun:['male','qun',4,['xinlianji','xinmoucheng'],['clan:太原王氏']], + sunqian:['male','shu',3,['qianya','shuimeng']], + xizhicai:['male','wei',3,['tiandu','xianfu','chouce']], + quyi:['male','qun',4,['fuqi','jiaozi']], - luzhi: ['male', 'wei', 3, ['qingzhong', 'weijing']] + luzhi:['male','wei',3,['qingzhong','weijing']] }, - characterIntro: { - tianchou: '田畴(169年或170年-214年或216年),字子泰,东汉右北平郡无终人,东汉末年隐士。田畴好文习武。汉初平年间,其受刘虞派遣去长安,呈送指控公孙赞奏章,献帝大悦,封为骑都尉,田畴不受。携诏返回时,刘虞已被公孙所杀,田畴到刘墓祭拜,被公孙所提,不久释放。田畴回故乡后率家族及随从数百人隐居徐无山,致力农桑,数年间增至5000家。制定法条,兴建学校,一时民风良好,乌桓、鲜卑纷纷与其结交。汉建安二十年(207年),曹操北征乌桓,田畴请为向导。上徐无山、出卢龙、过平冈、登白狼堆、至柳城,曹军大胜,封田畴为亭侯,坚辞不受。曹念田功,四次封赏,终不受,乃拜为议郎。建安二十一年(216年),田畴去世。', - liyi: '李异(生卒年不详),三国时期东吴将领。建安末,与谢旌率水陆三千,击破刘备军将领詹晏、陈凤。刘备领兵攻孙权时,李异与陆逊等人屯巫、秭归,为蜀将所破。黄武元年(222年),陆逊破刘备于猇亭,李异追踪蜀军,屯驻南山。清代学者赵一清认为此李异与刘璋部将李异为同一人。', - caoyu: '曹宇(?-278年),字彭祖,沛国谯县(今安徽亳州)人。三国时期魏国宗室,魏武帝曹操与环夫人之子,邓哀王曹冲同母兄弟。太和六年,封为燕王。魏明帝病危,欲以大将军辅政,不果。其子常道乡公曹奂,是魏国末代皇帝,史称魏元帝。晋朝建立后,降封燕公。咸宁四年(278年),曹宇去世。', - zhangyan: '张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。', - lushi: '卢氏,五斗米教主张衡妻,张鲁母,擅长驻颜之术,常年令自己保持少女的容颜。常拜访刘焉,与其交好。', - lvboshe: '吕伯奢,东汉成皋(今河南荥阳)人,曹操父亲曹嵩的故友。曹操与陈宫在逃离董卓避祸,返回乡里的途中借宿于吕伯奢家,未伤其人,有贼八人欲捉曹操,曹操杀之,明罗贯中在历史小说《三国演义》中将这段历史进行了丑化加工,也成为小说中曹操名言“宁教我负天下人,休教天下人负我”的出处。', - caoxi: '曹羲(?-249年),字昭叔。曹真之子,曹爽之弟。为人有学识,明律法。司马懿曾组织朝议改革九品中正制废除九品而留中正,曹羲认为此举并无区别,最终都是决定于人的人治。曹爽掌权后,受封中领军,掌握禁兵,封安乡侯。曹爽及诸兄弟轻视司马懿,恣意妄为,经常外出狩猎,曹羲屡次劝谏,不被采纳。249年,司马懿发动高平陵政变,被夷三族。', - duanjiong: '段颎(?-179年),字纪明,武威姑臧(今甘肃省武威市)人。东汉名将,西域都护段会宗从曾孙,与皇甫规(字威明)、张奂(字然明)并称“凉州三明”。段颎少时学习骑射,有文武智略,最初被举为孝廉,为宪陵园丞、阳陵令,有治理之才。汉桓帝时入军旅,先破鲜卑,后讨平东郭窦、公孙举起事,以功封列侯。延熹二年(159年)起戍边征战十余年,百战羌人,至永康元年(167年)平定西羌,建宁二年(169年)平定东羌,前后斩东西羌六万余级。累功封新丰县侯。建宁三年(170年),段颎被征入朝,历任侍中、执金吾、河南尹、司隶校尉等职,他党附宦官、捕杀太学生,因而得保富贵,两度出任太尉。光和二年(179年),权宦王甫罪行被揭发,段颎受牵连下狱,其后在狱中饮鸩而死。', - haopu: '郝普,字子太,义阳(治所在今湖北枣阳东南)人。刘备入川后,郝普为零陵太守。建安二十年(215年),吴将吕蒙进攻荆州三郡,唯有郝普坚守待援。但援兵久久不至,其挚友邓玄之又被吕蒙所骗,郝普也因此上当,投降吴国。湘水划界后,郝普回归刘备。建安二十四年(219年),吕蒙再次袭击荆州,击败关羽,郝普再次投降,最终归顺吴国并官至廷尉。郝普与隐蕃亲善,隐蕃蓄谋叛变事情败露,他受到牵连,因此自杀。在刘备集团的5个荆州郡守中,郝普是唯一一个抵抗过东吴的荆州郡守。', - ol_zhanghe: '字儁乂,河间鄚人。三国时期魏国名将。官渡之战时,本为袁绍部将的张郃投降了曹操,并在曹操帐下多立功勋,于曹魏建立后加封为征西车骑将军。诸葛亮六出祁山之间,张郃多次抵御蜀军的进攻,于公元231年在木门道被诸葛亮设伏射死。后谥曰壮侯。为曹魏“五子良将”之一。', - zhangshiping: '张世平是东汉末期的中山商人,曾与苏双同路,资助刘备组织武装、建立政权。于《三国演义》第一回出场,刘关张桃园三结义时资助刘备良马五十匹,金银五百两,镔铁一千斤。刘备所使用的“双股剑”、关羽所使用的“青龙偃月刀(又名‘冷艳锯’)”、张飞所使用的“丈八点钢矛(又名‘丈八蛇矛’)”皆由这一千斤上好镔铁打造而成。', - luoxian: '罗宪(218年—270年),字令则,荆州襄阳(今湖北襄阳)人。西晋开国将领,巴东太守(郡府在永安白帝城)。于蜀汉灭亡后降魏,成功抵御孙吴的入侵,守住入魏国的要冲永安。后仕晋官至冠军将军、假节,封西鄂县侯。泰始六年(270年)去世,谥烈侯。', - sunhong: '孙弘(?—252年),三国时期吴国大臣,扬州会稽(今浙江省绍兴市)人。官至吴国中书令、少傅。鲁王孙霸与太子孙和各植党羽,孙弘即依附孙霸。孙权病笃,而太子年少,于是以孙弘领少傅。孙权临终,召他与诸葛恪、孙峻等嘱以后事,孙弘与诸葛恪同为顾命大臣。孙权死后,孙弘因素来与诸葛恪不和,怕为所治,故而隐瞒了孙权的死讯,欲矫诏除掉诸葛恪,被孙峻告发。后诸葛恪请孙弘议事,于座中将其诛杀。', - wangguan: '《三国演义》中虚构人物,历史上不曾记载。在114回出场,曾为邓艾手下参谋,献反间计与邓艾,被姜维识破,兵败自投江而死。', - maxiumatie: '马休(?-212年),马铁(?-212年)。两人均为扶风茂陵(今陕西兴平)人,马腾之子,马超之弟。马腾遭韩遂进攻,乃携马休、马铁等入京受职。马休被封为奉车都尉,马铁被封为骑都尉。后在邺城居住。因兄马超反,两人被曹操夷灭。', - dongtuna: '董荼那,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第二洞元帅;与阿会喃等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同阿会喃共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', - zhanghua: '张华(232年-300年),字茂先。范阳郡方城县(今河北固安)人。西晋时期政治家、文学家、藏书家,西汉留侯张良的十六世孙。张华出身范阳张氏,自少贫苦,因才学过人而受同乡名臣卢钦、刘放、阮籍等人的赞赏。在曹魏时,他历任太常博士、河南尹丞、佐著作郎、中书郎等职。西晋建立后,拜黄门侍郎,封关内侯,逐渐受到晋武帝的重用。后拜中书令,加散骑常侍,与大将杜预坚决支持武帝伐吴,于战时任度支尚书。吴国灭亡后,以功进封广武县侯。其后遭到排挤,出镇幽州,政绩卓然。之后返朝任太常,终武帝之世未得参与政事。晋惠帝继位后,累官至司空,封壮武郡公,被皇后贾南风委以朝政。张华尽忠辅佐,使天下仍然保持相对安宁。永康元年(300年),♯♯司马伦发动政变,张华惨遭杀害,年六十九。太安二年(303年),获得♯♯,追复官爵。张华工于诗赋,词藻华丽,又雅爱书籍,精于目录学,编纂有中国第一部博物学著作《博物志》;还曾与荀勖等人依照刘向《别录》整理典籍。《宣和书谱》载有其草书《得书帖》及行书《闻时帖》。《隋书·经籍志》有《张华集》十卷,今已佚。明人张溥辑有《张茂先集》。', - quhuang: '屈晃(?—251),祖籍汝南(今河南省汝南县),汉末避乱南下,三国吴时居章安(今属椒江区)。初为郡吏,在职清廉,颇有政声。赤乌初年,擢为尚书仆射。', - macheng: '马承,蜀汉骠骑将军马超之子。仕蜀汉,马超死后继承其斄乡侯爵位。', - zhangzhi: '张芝(?—192年),字伯英,敦煌郡渊泉县(今甘肃省瓜州县)人。东汉书法家、“草书之祖”,大司农张奂的儿子。出身名门,拒绝朝廷征召,潜心研习书法。擅长草书中的章草,将古代当时字字区别、笔画分离的草法,改为上下牵连富于变化的新写法,富有独创性,在当时影响很大。李志敏评价:“张芝创造了草书问世以来的第一座高峰,精熟神妙,兼善章今”。 没有真迹传世,仅存《八月帖》等刻帖。汉献帝初平三年,去世于家中,著有《笔心论》,与钟繇、王羲之和王献之并称“书中四贤”。', - ahuinan: '阿会喃,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第三洞元帅;与董荼那等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同董荼那共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', - xiahouxuan: '夏侯玄(209年~254年),字泰初(《三国志》等作太初),沛国谯县(今安徽省亳州市)人。三国时期曹魏大臣、思想家、文学家,征南大将军夏侯尚之子,大将军曹爽的表弟。夏侯玄少年有名望,仪表出众,时人称为“朗朗如日月之入怀”。魏文帝黄初六年(225年),袭封昌陵乡侯。魏明帝时,历任散骑黄门侍郎、羽林监。少帝曹芳继位后,拜散骑常侍、中护军,保卫皇宫。后任征西将军,任内与曹爽策划骆谷之役,大失人心。高平陵政变后,被夺去兵权,改任大鸿胪、太常卿。嘉平六年(254年),中书令李丰与外戚张缉密谋杀死大将军司马师,改以夏侯玄执政。事泄被杀,夷灭三族,夏侯玄死时年仅四十六岁。著有文集三卷,如今已佚。政治上,提出了“审官择人”、“除重官”、“改服制”等制度,被太傅司马懿评价“皆大善”。博学多识,才华出众,精通玄学,成为“四聪”之一,与何晏等人开创了魏晋玄学的先河,是早期的玄学领袖人物。', - dengzhong: '邓忠(不详-264年),三国时期曹魏名将邓艾之子。景元五年(264年),钟会谋反事败,士兵哗变,钟会被杀,邓艾部将想追还邓艾父子,但卫瓘却派田续追邓艾,于绵竹西相遇,将邓艾和邓忠等人杀死。直至泰始九年(273年)才恢复名节。', - wangyan: '王衍(256年~311年),字夷甫,琅邪郡临沂县(今山东省临沂市)人。西晋末年重臣,玄学清谈领袖,曹魏幽州刺史王雄之孙、平北将军王乂之子、司徒王戎堂弟。王衍出身琅琊王氏。外表清明俊秀,风姿安详文雅,笃好老庄学说,颇有时名。步入仕途后,历任黄门侍郎、中领军、尚书令、尚书仆射等职。光熙元年(307年),升任司空。次年,又任司徒。王衍位高权重,却不思为国,为保全自己,还让弟弟王澄、族弟王敦分任荆州、青州刺史,遭时人鄙夷。王弥进攻洛阳时,王衍率军抵抗。其后转任太尉兼尚书令,又兼领太傅军司。永嘉五年(311年),东海王司马越去世,王衍奉其灵柩返回东海,途中为羯人石勒所俘获。王衍在与石勒交谈时,仍推脱责任,并劝其称帝,石勒大怒,将其与西晋旧臣一同活埋,时年五十六岁。王衍工书法,尤擅行书,《宣和书谱》有其作品《尊夫人帖》。', - caoxiancaohua: '请分别查询参考「曹宪」和「曹华」的部武将介绍。', - zhaoyǎn: '赵俨(171~245年),字伯然,颍川阳翟(今河南禹州市)。东汉末年颍川“四大名士”之一,三国时期魏国名臣。熟读经史,精明强干。建安二年,投靠大将军曹操之后,起家朗陵县令,历任司空府掾、司空主薄、都督护军、扶风太守等职。魏文帝曹丕继位后,历任魏国侍中、驸马都尉、河东太守、典农中郎将、度支尚书,封宜土亭侯。魏明帝曹睿时期,历任大司农、骠骑将军、大司空等职。正始六年,去世,时年七十五,谥号为穆。', - ruiji: '芮姬,芮玄之女,太子孙登妃,黄武五年卒。', - weizi: '卫兹(?-190年),字子许,(《三国演义》中其名为卫弘,当为误记),陈留襄邑(今河南睢县)人。曾举孝廉,先后被车骑将军何苗、司徒杨赐等召辟。中平六年(189年)十二月,曹操在陈留己吾募兵,而卫兹以家财资助曹操,使曹操顺利募得五千士兵。此后,卫兹与曹操共同讨伐董卓。初平元年(190年),卫兹在跟随曹操讨伐董卓途中,于荥阳汴水遭遇董卓军徐荣,力战终日,失利身亡。', - tengfanglan: '滕芳兰,生卒年不详,北海剧县(今山东省寿光市)人,太常滕胤的族女,滕牧的女儿,吴末帝孙皓的皇后。永安元年(258年),孙皓为乌程侯时被聘为妃。元兴元年(264年),孙皓登基后被立为皇后。孙吴灭亡后,随孙皓迁居洛阳。', - qinghegongzhu: '清河长公主,沛国谯县人,曹操长女(按其与曹操长子曹昂同出于刘夫人,而刘夫人又早死,故其年龄应长于曹丕等其他曹操诸子女,又按长公主亦有年最长之意,故应为曹操之长女)。母刘夫人,得到曹操喜爱。清河公主后来下嫁夏侯楙。曹操初欲嫁丁仪,曹丕劝其嫁与夏侯楙。后与小叔子设计欲谋害丈夫,未果。', - fanjiangzhangda: '范强,在明朝小说《三国演义》里叫做范疆。二人均为张飞手下部将。蜀汉章武元年,刘备伐吴,张飞率军从阆中前往江州,出发前,范强和张达杀死张飞,带着张飞的首级投奔了东吴。', - tianyu: '田豫(171年~252年),字国让,渔阳雍奴(今天津市武清区)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。后来田豫常年镇守曹魏北疆,从征代郡乌桓、斩骨进、破轲比能,多有功勋;也曾参与对孙吴的作战,在成山斩杀周贺,于新城击败孙权。官至太中大夫,封长乐亭侯。有一子田彭祖。', - wuyan: '吴国及西晋初年将领。初任通江县吏,后得到大司马陆抗的提拔重用,逐渐升至建平太守。', - fengfangnv: '冯方之女,司隶人,袁术妻妾。在史书中被记载为天姿国色的美人。钱大昭在《三国志辨疑》中认为冯方当为冯芳误字,冯方女实为是西园八校尉之一的冯芳的女儿。然而,在曹丕《典论》、《九州春秋》等书籍都有提及她,皆作冯方女字样,并无一书写作冯芳女或是明提是冯芳之女。最关键的一点是,冯芳是荆州西陵县人,她女儿不可能是司隶籍,冯芳也没担任过任何与司隶有关的官职。同时期名字为“○女”的并不少见,如施绩女儿施淑女,曹植女儿曹行女,夏侯令女等。', - zuofen: '左芬(约253年-300年4月23日),出土墓志作左棻,字兰芝,齐国临淄(今山东临淄)人,西晋诗人。少好学,善属文。为晋武帝贵人。今存诗、赋、颂、赞、诔等20余篇,大都为应诏而作,《离思赋》最著名。原有集,已失传。', - duxi: '杜袭(生卒年不详),字子绪,颍川郡定陵县(今河南省襄城县)人。三国时期魏国重臣,东汉末年颍川“四大名士”之一,济阴太守杜根的孙子。建安初年,投奔司空曹操,历任西鄂县令、议郎、丞相军咨祭酒、魏王侍中、丞相长史、驸马都尉。魏文帝时期,出任督军粮御史、尚书,累封武平亭侯。魏明帝时期,担任大将军曹真和司马懿的军师,抵御蜀国进攻,拜太中大夫,受封平阳乡侯。卒于任上,获赠少府,谥号为定。', - gaogan: '高干(?~206年),字元才,陈留郡圉县(今河南杞县圉镇)人。东汉末年并州割据将领,蜀郡太守高躬之子、大将军袁绍外甥。出身陈留高氏,才志弘邈,文武秀出。早年联合荀谌游说韩馥让出冀州牧。袁绍平定河北后,以为并州牧。官渡之战时,在西线配合作战。因曹操早有准备,没有实质进展。袁绍死后,袁谭、袁尚与曹操大战于黎阳郡时,联合郭援攻打平阳郡,为马腾为首关中将领所败,郭援为庞德所斩。袁尚败走中山郡后,出降于曹操,仍为并州刺史。建安十年,兴兵反曹,固守壶关,成功抵挡乐进进攻。得知曹操亲征后,留下别将守城,亲往匈奴呼厨泉求救,没有成功。引兵攻略河东郡,屡为钟繇、张既所败。建安十一年,投奔荆州刘表。途经上洛时,为上洛都尉捕斩之。', - huangchengyan: '黄承彦,生卒年不详,汉末三国时期沔阳名士,诸葛亮岳父,黄月英之父。南郡大士蔡讽的女婿,与襄阳名士上层社会圈子:庞统(凤雏)、庞德公、司马徽、徐庶等人交好。《襄阳记》:黄承彦者,高爽开列,为沔阳名士,谓诸葛孔明曰:“闻君择妇,身有丑女,黄头黑色,而才堪配。”孔明许,即载送之。时人以为笑乐,乡里为之谚曰:“莫作孔明择妇,正得阿承丑女。”', - panshu: '潘淑(?-252年),会稽句章(今浙江省宁波市)人,是吴大帝孙权的皇后,吴少帝孙亮的母亲。和孙权是中国历代帝后中年龄差距较大的一对。潘淑少时与姐姐俱没入织室,容媚有宠,拜为夫人,生有一子孙亮。赤乌十三年(250年),孙权立孙亮为皇太子,翌年(251年)立潘淑为皇后。神凤元年(252年)暴崩,合葬蒋陵。世称潘淑为江东绝色,有神女之称。', - zongyu: '宗预(?-264年),字德艳 ,荆州南阳郡安众县(今河南省南阳市)人。三国时期蜀汉官员、将领。曾随张飞入蜀助平益州,又受辟为丞相诸葛亮手下主簿,升任参军、右中郎将。诸葛亮逝世后,宗预受命出使孙吴,得到孙权的赞赏。迁后将军,出督永安,又升任征西大将军,并受封关内侯。公元258年(景耀元年),因病回成都,受任镇军大将军。蜀汉灭亡后,宗预随后主刘禅徙往洛阳,在中途病逝。宗预为人坦率耿直,多次出使孙吴并深得孙权的敬重,为吴、汉两国同盟的巩固作出了一定的贡献。', - mengda: '孟达(?-228),字子度,本字子敬,因刘备的叔父名叫刘子敬,为避讳而改字。扶风郡郿人,三国时期人物。本为刘璋属下,后降刘备。关羽围樊城、襄阳时因不发兵救关羽而触怒刘备,于是投奔曹魏。此后,劝降刘封,未果。在魏官至散骑常侍、建武将军,封平阳亭侯。此后又欲反曹魏而归蜀汉,事败而死。', - wolongfengchu: '沙比武将,懒得复制粘贴,自己去看诸葛亮和庞统的介绍吧。', - caoshuang: '曹爽(?-249年2月9日),字昭伯,沛国谯县(今安徽亳州市)人。三国时期魏国权臣,大司马曹真长子。曹爽体态肥胖,凭借宗室身份,出入宫廷,交好太子曹叡。魏明帝即位,起家员外散骑侍郎,累迁城门校尉、散骑常侍,转武卫将军。太和五年(231年),袭封邵陵侯。景初三年(239年),魏明帝曹叡病危,拜大将军、假黄钺,与司马懿并为托孤大臣。少帝曹芳即位,加侍中,改封武安侯。势倾四海,声震天下。任用私人,专权乱政,侵吞公产。伐蜀失败,虚耗国力。起居逾制,软禁郭太后。正始十年,太傅司马懿发动高平陵政变,掌握魏国大权。曹爽失去大将军职务,以谋反之罪处死,夷灭三族。', - 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: "蒋干,字子翼,汉末三国时期的人物,九江(治今安徽寿县)人。历史上的蒋干是当时的名士、辩论家。而罗贯中在历史小说《三国演义》中则将蒋干刻画成了被周瑜所愚弄的小丑形象。", + characterIntro:{ + tianchou:'田畴(169年或170年-214年或216年),字子泰,东汉右北平郡无终人,东汉末年隐士。田畴好文习武。汉初平年间,其受刘虞派遣去长安,呈送指控公孙赞奏章,献帝大悦,封为骑都尉,田畴不受。携诏返回时,刘虞已被公孙所杀,田畴到刘墓祭拜,被公孙所提,不久释放。田畴回故乡后率家族及随从数百人隐居徐无山,致力农桑,数年间增至5000家。制定法条,兴建学校,一时民风良好,乌桓、鲜卑纷纷与其结交。汉建安二十年(207年),曹操北征乌桓,田畴请为向导。上徐无山、出卢龙、过平冈、登白狼堆、至柳城,曹军大胜,封田畴为亭侯,坚辞不受。曹念田功,四次封赏,终不受,乃拜为议郎。建安二十一年(216年),田畴去世。', + liyi:'李异(生卒年不详),三国时期东吴将领。建安末,与谢旌率水陆三千,击破刘备军将领詹晏、陈凤。刘备领兵攻孙权时,李异与陆逊等人屯巫、秭归,为蜀将所破。黄武元年(222年),陆逊破刘备于猇亭,李异追踪蜀军,屯驻南山。清代学者赵一清认为此李异与刘璋部将李异为同一人。', + caoyu:'曹宇(?-278年),字彭祖,沛国谯县(今安徽亳州)人。三国时期魏国宗室,魏武帝曹操与环夫人之子,邓哀王曹冲同母兄弟。太和六年,封为燕王。魏明帝病危,欲以大将军辅政,不果。其子常道乡公曹奂,是魏国末代皇帝,史称魏元帝。晋朝建立后,降封燕公。咸宁四年(278年),曹宇去世。', + zhangyan:'张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。', + lushi:'卢氏,五斗米教主张衡妻,张鲁母,擅长驻颜之术,常年令自己保持少女的容颜。常拜访刘焉,与其交好。', + lvboshe:'吕伯奢,东汉成皋(今河南荥阳)人,曹操父亲曹嵩的故友。曹操与陈宫在逃离董卓避祸,返回乡里的途中借宿于吕伯奢家,未伤其人,有贼八人欲捉曹操,曹操杀之,明罗贯中在历史小说《三国演义》中将这段历史进行了丑化加工,也成为小说中曹操名言“宁教我负天下人,休教天下人负我”的出处。', + caoxi:'曹羲(?-249年),字昭叔。曹真之子,曹爽之弟。为人有学识,明律法。司马懿曾组织朝议改革九品中正制废除九品而留中正,曹羲认为此举并无区别,最终都是决定于人的人治。曹爽掌权后,受封中领军,掌握禁兵,封安乡侯。曹爽及诸兄弟轻视司马懿,恣意妄为,经常外出狩猎,曹羲屡次劝谏,不被采纳。249年,司马懿发动高平陵政变,被夷三族。', + duanjiong:'段颎(?-179年),字纪明,武威姑臧(今甘肃省武威市)人。东汉名将,西域都护段会宗从曾孙,与皇甫规(字威明)、张奂(字然明)并称“凉州三明”。段颎少时学习骑射,有文武智略,最初被举为孝廉,为宪陵园丞、阳陵令,有治理之才。汉桓帝时入军旅,先破鲜卑,后讨平东郭窦、公孙举起事,以功封列侯。延熹二年(159年)起戍边征战十余年,百战羌人,至永康元年(167年)平定西羌,建宁二年(169年)平定东羌,前后斩东西羌六万余级。累功封新丰县侯。建宁三年(170年),段颎被征入朝,历任侍中、执金吾、河南尹、司隶校尉等职,他党附宦官、捕杀太学生,因而得保富贵,两度出任太尉。光和二年(179年),权宦王甫罪行被揭发,段颎受牵连下狱,其后在狱中饮鸩而死。', + haopu:'郝普,字子太,义阳(治所在今湖北枣阳东南)人。刘备入川后,郝普为零陵太守。建安二十年(215年),吴将吕蒙进攻荆州三郡,唯有郝普坚守待援。但援兵久久不至,其挚友邓玄之又被吕蒙所骗,郝普也因此上当,投降吴国。湘水划界后,郝普回归刘备。建安二十四年(219年),吕蒙再次袭击荆州,击败关羽,郝普再次投降,最终归顺吴国并官至廷尉。郝普与隐蕃亲善,隐蕃蓄谋叛变事情败露,他受到牵连,因此自杀。在刘备集团的5个荆州郡守中,郝普是唯一一个抵抗过东吴的荆州郡守。', + ol_zhanghe:'字儁乂,河间鄚人。三国时期魏国名将。官渡之战时,本为袁绍部将的张郃投降了曹操,并在曹操帐下多立功勋,于曹魏建立后加封为征西车骑将军。诸葛亮六出祁山之间,张郃多次抵御蜀军的进攻,于公元231年在木门道被诸葛亮设伏射死。后谥曰壮侯。为曹魏“五子良将”之一。', + zhangshiping:'张世平是东汉末期的中山商人,曾与苏双同路,资助刘备组织武装、建立政权。于《三国演义》第一回出场,刘关张桃园三结义时资助刘备良马五十匹,金银五百两,镔铁一千斤。刘备所使用的“双股剑”、关羽所使用的“青龙偃月刀(又名‘冷艳锯’)”、张飞所使用的“丈八点钢矛(又名‘丈八蛇矛’)”皆由这一千斤上好镔铁打造而成。', + luoxian:'罗宪(218年—270年),字令则,荆州襄阳(今湖北襄阳)人。西晋开国将领,巴东太守(郡府在永安白帝城)。于蜀汉灭亡后降魏,成功抵御孙吴的入侵,守住入魏国的要冲永安。后仕晋官至冠军将军、假节,封西鄂县侯。泰始六年(270年)去世,谥烈侯。', + sunhong:'孙弘(?—252年),三国时期吴国大臣,扬州会稽(今浙江省绍兴市)人。官至吴国中书令、少傅。鲁王孙霸与太子孙和各植党羽,孙弘即依附孙霸。孙权病笃,而太子年少,于是以孙弘领少傅。孙权临终,召他与诸葛恪、孙峻等嘱以后事,孙弘与诸葛恪同为顾命大臣。孙权死后,孙弘因素来与诸葛恪不和,怕为所治,故而隐瞒了孙权的死讯,欲矫诏除掉诸葛恪,被孙峻告发。后诸葛恪请孙弘议事,于座中将其诛杀。', + wangguan:'《三国演义》中虚构人物,历史上不曾记载。在114回出场,曾为邓艾手下参谋,献反间计与邓艾,被姜维识破,兵败自投江而死。', + maxiumatie:'马休(?-212年),马铁(?-212年)。两人均为扶风茂陵(今陕西兴平)人,马腾之子,马超之弟。马腾遭韩遂进攻,乃携马休、马铁等入京受职。马休被封为奉车都尉,马铁被封为骑都尉。后在邺城居住。因兄马超反,两人被曹操夷灭。', + dongtuna:'董荼那,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第二洞元帅;与阿会喃等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同阿会喃共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', + zhanghua:'张华(232年-300年),字茂先。范阳郡方城县(今河北固安)人。西晋时期政治家、文学家、藏书家,西汉留侯张良的十六世孙。张华出身范阳张氏,自少贫苦,因才学过人而受同乡名臣卢钦、刘放、阮籍等人的赞赏。在曹魏时,他历任太常博士、河南尹丞、佐著作郎、中书郎等职。西晋建立后,拜黄门侍郎,封关内侯,逐渐受到晋武帝的重用。后拜中书令,加散骑常侍,与大将杜预坚决支持武帝伐吴,于战时任度支尚书。吴国灭亡后,以功进封广武县侯。其后遭到排挤,出镇幽州,政绩卓然。之后返朝任太常,终武帝之世未得参与政事。晋惠帝继位后,累官至司空,封壮武郡公,被皇后贾南风委以朝政。张华尽忠辅佐,使天下仍然保持相对安宁。永康元年(300年),♯♯司马伦发动政变,张华惨遭杀害,年六十九。太安二年(303年),获得♯♯,追复官爵。张华工于诗赋,词藻华丽,又雅爱书籍,精于目录学,编纂有中国第一部博物学著作《博物志》;还曾与荀勖等人依照刘向《别录》整理典籍。《宣和书谱》载有其草书《得书帖》及行书《闻时帖》。《隋书·经籍志》有《张华集》十卷,今已佚。明人张溥辑有《张茂先集》。', + quhuang:'屈晃(?—251),祖籍汝南(今河南省汝南县),汉末避乱南下,三国吴时居章安(今属椒江区)。初为郡吏,在职清廉,颇有政声。赤乌初年,擢为尚书仆射。', + macheng:'马承,蜀汉骠骑将军马超之子。仕蜀汉,马超死后继承其斄乡侯爵位。', + zhangzhi:'张芝(?—192年),字伯英,敦煌郡渊泉县(今甘肃省瓜州县)人。东汉书法家、“草书之祖”,大司农张奂的儿子。出身名门,拒绝朝廷征召,潜心研习书法。擅长草书中的章草,将古代当时字字区别、笔画分离的草法,改为上下牵连富于变化的新写法,富有独创性,在当时影响很大。李志敏评价:“张芝创造了草书问世以来的第一座高峰,精熟神妙,兼善章今”。 没有真迹传世,仅存《八月帖》等刻帖。汉献帝初平三年,去世于家中,著有《笔心论》,与钟繇、王羲之和王献之并称“书中四贤”。', + ahuinan:'阿会喃,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第三洞元帅;与董荼那等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同董荼那共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', + xiahouxuan:'夏侯玄(209年~254年),字泰初(《三国志》等作太初),沛国谯县(今安徽省亳州市)人。三国时期曹魏大臣、思想家、文学家,征南大将军夏侯尚之子,大将军曹爽的表弟。夏侯玄少年有名望,仪表出众,时人称为“朗朗如日月之入怀”。魏文帝黄初六年(225年),袭封昌陵乡侯。魏明帝时,历任散骑黄门侍郎、羽林监。少帝曹芳继位后,拜散骑常侍、中护军,保卫皇宫。后任征西将军,任内与曹爽策划骆谷之役,大失人心。高平陵政变后,被夺去兵权,改任大鸿胪、太常卿。嘉平六年(254年),中书令李丰与外戚张缉密谋杀死大将军司马师,改以夏侯玄执政。事泄被杀,夷灭三族,夏侯玄死时年仅四十六岁。著有文集三卷,如今已佚。政治上,提出了“审官择人”、“除重官”、“改服制”等制度,被太傅司马懿评价“皆大善”。博学多识,才华出众,精通玄学,成为“四聪”之一,与何晏等人开创了魏晋玄学的先河,是早期的玄学领袖人物。', + dengzhong:'邓忠(不详-264年),三国时期曹魏名将邓艾之子。景元五年(264年),钟会谋反事败,士兵哗变,钟会被杀,邓艾部将想追还邓艾父子,但卫瓘却派田续追邓艾,于绵竹西相遇,将邓艾和邓忠等人杀死。直至泰始九年(273年)才恢复名节。', + wangyan:'王衍(256年~311年),字夷甫,琅邪郡临沂县(今山东省临沂市)人。西晋末年重臣,玄学清谈领袖,曹魏幽州刺史王雄之孙、平北将军王乂之子、司徒王戎堂弟。王衍出身琅琊王氏。外表清明俊秀,风姿安详文雅,笃好老庄学说,颇有时名。步入仕途后,历任黄门侍郎、中领军、尚书令、尚书仆射等职。光熙元年(307年),升任司空。次年,又任司徒。王衍位高权重,却不思为国,为保全自己,还让弟弟王澄、族弟王敦分任荆州、青州刺史,遭时人鄙夷。王弥进攻洛阳时,王衍率军抵抗。其后转任太尉兼尚书令,又兼领太傅军司。永嘉五年(311年),东海王司马越去世,王衍奉其灵柩返回东海,途中为羯人石勒所俘获。王衍在与石勒交谈时,仍推脱责任,并劝其称帝,石勒大怒,将其与西晋旧臣一同活埋,时年五十六岁。王衍工书法,尤擅行书,《宣和书谱》有其作品《尊夫人帖》。', + caoxiancaohua:'请分别查询参考「曹宪」和「曹华」的部武将介绍。', + zhaoyǎn:'赵俨(171~245年),字伯然,颍川阳翟(今河南禹州市)。东汉末年颍川“四大名士”之一,三国时期魏国名臣。熟读经史,精明强干。建安二年,投靠大将军曹操之后,起家朗陵县令,历任司空府掾、司空主薄、都督护军、扶风太守等职。魏文帝曹丕继位后,历任魏国侍中、驸马都尉、河东太守、典农中郎将、度支尚书,封宜土亭侯。魏明帝曹睿时期,历任大司农、骠骑将军、大司空等职。正始六年,去世,时年七十五,谥号为穆。', + ruiji:'芮姬,芮玄之女,太子孙登妃,黄武五年卒。', + weizi:'卫兹(?-190年),字子许,(《三国演义》中其名为卫弘,当为误记),陈留襄邑(今河南睢县)人。曾举孝廉,先后被车骑将军何苗、司徒杨赐等召辟。中平六年(189年)十二月,曹操在陈留己吾募兵,而卫兹以家财资助曹操,使曹操顺利募得五千士兵。此后,卫兹与曹操共同讨伐董卓。初平元年(190年),卫兹在跟随曹操讨伐董卓途中,于荥阳汴水遭遇董卓军徐荣,力战终日,失利身亡。', + tengfanglan:'滕芳兰,生卒年不详,北海剧县(今山东省寿光市)人,太常滕胤的族女,滕牧的女儿,吴末帝孙皓的皇后。永安元年(258年),孙皓为乌程侯时被聘为妃。元兴元年(264年),孙皓登基后被立为皇后。孙吴灭亡后,随孙皓迁居洛阳。', + qinghegongzhu:'清河长公主,沛国谯县人,曹操长女(按其与曹操长子曹昂同出于刘夫人,而刘夫人又早死,故其年龄应长于曹丕等其他曹操诸子女,又按长公主亦有年最长之意,故应为曹操之长女)。母刘夫人,得到曹操喜爱。清河公主后来下嫁夏侯楙。曹操初欲嫁丁仪,曹丕劝其嫁与夏侯楙。后与小叔子设计欲谋害丈夫,未果。', + fanjiangzhangda:'范强,在明朝小说《三国演义》里叫做范疆。二人均为张飞手下部将。蜀汉章武元年,刘备伐吴,张飞率军从阆中前往江州,出发前,范强和张达杀死张飞,带着张飞的首级投奔了东吴。', + tianyu:'田豫(171年~252年),字国让,渔阳雍奴(今天津市武清区)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。后来田豫常年镇守曹魏北疆,从征代郡乌桓、斩骨进、破轲比能,多有功勋;也曾参与对孙吴的作战,在成山斩杀周贺,于新城击败孙权。官至太中大夫,封长乐亭侯。有一子田彭祖。', + wuyan:'吴国及西晋初年将领。初任通江县吏,后得到大司马陆抗的提拔重用,逐渐升至建平太守。', + fengfangnv:'冯方之女,司隶人,袁术妻妾。在史书中被记载为天姿国色的美人。钱大昭在《三国志辨疑》中认为冯方当为冯芳误字,冯方女实为是西园八校尉之一的冯芳的女儿。然而,在曹丕《典论》、《九州春秋》等书籍都有提及她,皆作冯方女字样,并无一书写作冯芳女或是明提是冯芳之女。最关键的一点是,冯芳是荆州西陵县人,她女儿不可能是司隶籍,冯芳也没担任过任何与司隶有关的官职。同时期名字为“○女”的并不少见,如施绩女儿施淑女,曹植女儿曹行女,夏侯令女等。', + zuofen:'左芬(约253年-300年4月23日),出土墓志作左棻,字兰芝,齐国临淄(今山东临淄)人,西晋诗人。少好学,善属文。为晋武帝贵人。今存诗、赋、颂、赞、诔等20余篇,大都为应诏而作,《离思赋》最著名。原有集,已失传。', + duxi:'杜袭(生卒年不详),字子绪,颍川郡定陵县(今河南省襄城县)人。三国时期魏国重臣,东汉末年颍川“四大名士”之一,济阴太守杜根的孙子。建安初年,投奔司空曹操,历任西鄂县令、议郎、丞相军咨祭酒、魏王侍中、丞相长史、驸马都尉。魏文帝时期,出任督军粮御史、尚书,累封武平亭侯。魏明帝时期,担任大将军曹真和司马懿的军师,抵御蜀国进攻,拜太中大夫,受封平阳乡侯。卒于任上,获赠少府,谥号为定。', + gaogan:'高干(?~206年),字元才,陈留郡圉县(今河南杞县圉镇)人。东汉末年并州割据将领,蜀郡太守高躬之子、大将军袁绍外甥。出身陈留高氏,才志弘邈,文武秀出。早年联合荀谌游说韩馥让出冀州牧。袁绍平定河北后,以为并州牧。官渡之战时,在西线配合作战。因曹操早有准备,没有实质进展。袁绍死后,袁谭、袁尚与曹操大战于黎阳郡时,联合郭援攻打平阳郡,为马腾为首关中将领所败,郭援为庞德所斩。袁尚败走中山郡后,出降于曹操,仍为并州刺史。建安十年,兴兵反曹,固守壶关,成功抵挡乐进进攻。得知曹操亲征后,留下别将守城,亲往匈奴呼厨泉求救,没有成功。引兵攻略河东郡,屡为钟繇、张既所败。建安十一年,投奔荆州刘表。途经上洛时,为上洛都尉捕斩之。', + huangchengyan:'黄承彦,生卒年不详,汉末三国时期沔阳名士,诸葛亮岳父,黄月英之父。南郡大士蔡讽的女婿,与襄阳名士上层社会圈子:庞统(凤雏)、庞德公、司马徽、徐庶等人交好。《襄阳记》:黄承彦者,高爽开列,为沔阳名士,谓诸葛孔明曰:“闻君择妇,身有丑女,黄头黑色,而才堪配。”孔明许,即载送之。时人以为笑乐,乡里为之谚曰:“莫作孔明择妇,正得阿承丑女。”', + panshu:'潘淑(?-252年),会稽句章(今浙江省宁波市)人,是吴大帝孙权的皇后,吴少帝孙亮的母亲。和孙权是中国历代帝后中年龄差距较大的一对。潘淑少时与姐姐俱没入织室,容媚有宠,拜为夫人,生有一子孙亮。赤乌十三年(250年),孙权立孙亮为皇太子,翌年(251年)立潘淑为皇后。神凤元年(252年)暴崩,合葬蒋陵。世称潘淑为江东绝色,有神女之称。', + zongyu:'宗预(?-264年),字德艳 ,荆州南阳郡安众县(今河南省南阳市)人。三国时期蜀汉官员、将领。曾随张飞入蜀助平益州,又受辟为丞相诸葛亮手下主簿,升任参军、右中郎将。诸葛亮逝世后,宗预受命出使孙吴,得到孙权的赞赏。迁后将军,出督永安,又升任征西大将军,并受封关内侯。公元258年(景耀元年),因病回成都,受任镇军大将军。蜀汉灭亡后,宗预随后主刘禅徙往洛阳,在中途病逝。宗预为人坦率耿直,多次出使孙吴并深得孙权的敬重,为吴、汉两国同盟的巩固作出了一定的贡献。', + mengda:'孟达(?-228),字子度,本字子敬,因刘备的叔父名叫刘子敬,为避讳而改字。扶风郡郿人,三国时期人物。本为刘璋属下,后降刘备。关羽围樊城、襄阳时因不发兵救关羽而触怒刘备,于是投奔曹魏。此后,劝降刘封,未果。在魏官至散骑常侍、建武将军,封平阳亭侯。此后又欲反曹魏而归蜀汉,事败而死。', + wolongfengchu:'沙比武将,懒得复制粘贴,自己去看诸葛亮和庞统的介绍吧。', + caoshuang:'曹爽(?-249年2月9日),字昭伯,沛国谯县(今安徽亳州市)人。三国时期魏国权臣,大司马曹真长子。曹爽体态肥胖,凭借宗室身份,出入宫廷,交好太子曹叡。魏明帝即位,起家员外散骑侍郎,累迁城门校尉、散骑常侍,转武卫将军。太和五年(231年),袭封邵陵侯。景初三年(239年),魏明帝曹叡病危,拜大将军、假黄钺,与司马懿并为托孤大臣。少帝曹芳即位,加侍中,改封武安侯。势倾四海,声震天下。任用私人,专权乱政,侵吞公产。伐蜀失败,虚耗国力。起居逾制,软禁郭太后。正始十年,太傅司马懿发动高平陵政变,掌握魏国大权。曹爽失去大将军职务,以谋反之罪处死,夷灭三族。', + 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:"蒋干,字子翼,汉末三国时期的人物,九江(治今安徽寿县)人。历史上的蒋干是当时的名士、辩论家。而罗贯中在历史小说《三国演义》中则将蒋干刻画成了被周瑜所愚弄的小丑形象。", - caoying: "曹婴是在电影《三国志之见龙卸甲》中登场的虚拟人物,由李美琪饰演。曹婴是曹操的孙女,弓马娴熟,文武双全,深得曹操的用兵之道及心术。于凤鸣山一战中担任魏军大都督阻止诸葛亮北伐并因罗平安的告密而全歼关兴、张苞、赵云率领的蜀军部队。", - simahui: "司马徽(约145—208年),字德操,颍川阳翟(今河南禹州)人。东汉末年名士,精通道学、奇门、兵法、经学。有“水镜先生”之称。 司马徽为人清雅,学识广博,有知人之明,并向刘备推荐了诸葛亮、庞统等人,受到世人的敬重。", - baosanniang: "鲍三娘是中国民间传说中的人物,事迹多见于《花关索传》。相传她是鲍家庄鲍员外的小女儿。后来与关索成亲,关羽自传授其武艺,因此也造就了鲍三娘的文武双全。荆州失守之后鲍三娘就跟随关索一同投奔蜀汉,并随诸葛亮征讨南蛮。平定了南蛮之后,夫妻二人就此一直替诸葛亮镇守着南中,他们也的确留下了许多脍炙人口的行侠仗义故事,在民间广为流传。", + 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年),王元姬崩逝,终年五十二岁。谥号文明皇后,与司马昭合葬于崇阳陵。", + 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: "请分别参考武将【李傕】和【郭汜】各自的介绍。", - maojie: "毛玠(?—216年),字孝先,陈留平丘(今河南封丘)人。东汉末年大臣。年少时为县吏,以清廉公正著称。因战乱而打算到荆州避乱,但中途知道刘表政令不严明,因而改往鲁阳。后来投靠曹操,提出“奉天子以令不臣,脩耕植,畜军资”的战略规划,得到曹操的欣赏。
毛玠与崔琰主持选举,所举用的都是清廉正直之士。而毛玠为人廉洁,激起天下廉洁之风,一改朝中奢华风气。曹操大为赞赏,曹丕也亲自去拜访他。
曹操获封魏公后,毛玠改任尚书仆射,再典选举。又密谏曹操应该立嫡长子曹丕为魏国太子。崔琰被杀后,毛玠十分不快。后来有人诬告毛玠,曹操大怒,将毛玠收于狱中。及后在桓阶、和洽营救下,只被免职,不久逝世于家中。曹操在他死后赐他棺材和钱帛。", + 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:"请分别参考武将【李傕】和【郭汜】各自的介绍。", + maojie:"毛玠(?—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)随兄起义,号称“人公将军”。遭到朝廷所派左中郎将皇甫嵩进攻时,他率军在广宗(今河北威县)进行反击。后因警戒疏忽,遭到汉军夜袭,兵败身亡。', + 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', 'sunquan'], - 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', 'zhugeke'], - caohong: ['caoren'], - daxiaoqiao: ['zhouyu', 'sunce'], - cuiyan: ['caocao'], - guansuo: ['guanyu'], - mateng: ['machao', 'madai', 'mayunlu'], - chengpu: ['zhouyu'], - hanba: ['swd_muyun'], - dongbai: ['dongzhuo'], - cuimao: ['caopi'], - simazhao: ['wangyuanji'], + characterTitle:{}, + perfectPair:{ + yuejin:['re_lidian'], + zhugejin:['zhugeke','sunquan'], + 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','zhugeke'], + 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: { + card:{ //蒲元衍生 - sanlve: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip5", - ai: { - basic: { - equipValue: 5, + sanlve:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip5", + ai:{ + basic:{ + equipValue:5, }, }, - skills: ["sanlve_skill"], - fullskin: true, + skills:["sanlve_skill"], + fullskin:true, }, - zhaogujing: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip5", - ai: { - basic: { - equipValue: 6.5, + zhaogujing:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip5", + ai:{ + basic:{ + equipValue:6.5, }, }, - skills: ["zhaogujing_skill"], - fullskin: true, + skills:["zhaogujing_skill"], + fullskin:true, }, - shufazijinguan: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip5", - modeimage: 'boss', - ai: { - basic: { - equipValue: 8, + shufazijinguan:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip5", + modeimage:'boss', + ai:{ + basic:{ + equipValue:8, }, }, - skills: ["shufazijinguan_skill"], - fullskin: true, + skills:["shufazijinguan_skill"], + fullskin:true, }, - xuwangzhimian: { - derivation: 'ol_puyuan', - type: 'equip', - fullskin: true, - subtype: 'equip5', - modeimage: 'boss', - skills: ['xuwangzhimian'], - ai: { - equipValue: 7, + xuwangzhimian:{ + derivation:'ol_puyuan', + type:'equip', + fullskin:true, + subtype:'equip5', + modeimage:'boss', + skills:['xuwangzhimian'], + ai:{ + equipValue:7, } }, - hongmianbaihuapao: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip2", - modeimage: 'boss', - ai: { - basic: { - equipValue: 4, + hongmianbaihuapao:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip2", + modeimage:'boss', + ai:{ + basic:{ + equipValue:4, }, }, - skills: ["hongmianbaihuapao_skill"], - fullskin: true, + skills:["hongmianbaihuapao_skill"], + fullskin:true, }, - guofengyupao: { - derivation: 'ol_puyuan', - type: 'equip', - fullskin: true, - modeimage: 'boss', - subtype: 'equip2', - skills: ['guofengyupao'], - ai: { - equipValue: 7 + guofengyupao:{ + derivation:'ol_puyuan', + type:'equip', + fullskin:true, + modeimage:'boss', + subtype:'equip2', + skills:['guofengyupao'], + ai:{ + equipValue:7 } }, - qimenbagua: { - derivation: 'ol_puyuan', - type: 'equip', - fullskin: true, - modeimage: 'boss', - subtype: 'equip2', - skills: ['qimenbagua'], - ai: { - equipValue: 7.5 + qimenbagua:{ + derivation:'ol_puyuan', + type:'equip', + fullskin:true, + modeimage:'boss', + subtype:'equip2', + skills:['qimenbagua'], + ai:{ + equipValue:7.5 } }, - linglongshimandai: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip2", - modeimage: 'boss', - ai: { - basic: { - equipValue: 5, + linglongshimandai:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip2", + modeimage:'boss', + ai:{ + basic:{ + equipValue:5, }, }, - skills: ["linglongshimandai_skill"], - fullskin: true, + skills:["linglongshimandai_skill"], + fullskin:true, }, - chixueqingfeng: { - derivation: 'ol_puyuan', - type: 'equip', - fullskin: true, - modeimage: 'boss', - subtype: 'equip1', - distance: { attackFrom: -1 }, - skills: ['chixueqingfeng'], - ai: { - equipValue: 6.7 + chixueqingfeng:{ + derivation:'ol_puyuan', + type:'equip', + fullskin:true, + modeimage:'boss', + subtype:'equip1', + distance:{attackFrom:-1}, + skills:['chixueqingfeng'], + ai:{ + equipValue:6.7 } }, - guilongzhanyuedao: { - derivation: 'ol_puyuan', - type: 'equip', - fullskin: true, - modeimage: 'boss', - subtype: 'equip1', - distance: { attackFrom: -2 }, - skills: ['guilongzhanyuedao'], - nomod: true, - nopower: true, - unique: true, - ai: { - equipValue: 4 + guilongzhanyuedao:{ + derivation:'ol_puyuan', + type:'equip', + fullskin:true, + modeimage:'boss', + subtype:'equip1', + distance:{attackFrom:-2}, + skills:['guilongzhanyuedao'], + nomod:true, + nopower:true, + unique:true, + ai:{ + equipValue:4 } }, - wushuangfangtianji: { - derivation: 'ol_puyuan', - type: "equip", - modeimage: 'boss', - subtype: "equip1", - distance: { - attackFrom: -3, + wushuangfangtianji:{ + derivation:'ol_puyuan', + type:"equip", + modeimage:'boss', + subtype:"equip1", + distance:{ + attackFrom:-3, }, - ai: { - basic: { - equipValue: 3, + ai:{ + basic:{ + equipValue:3, }, }, - skills: ["wushuangfangtianji_skill"], - fullskin: true, + skills:["wushuangfangtianji_skill"], + fullskin:true, }, - bintieshuangji: { - derivation: 'ol_puyuan', - type: "equip", - subtype: "equip1", - distance: { - attackFrom: -2, + bintieshuangji:{ + derivation:'ol_puyuan', + type:"equip", + subtype:"equip1", + distance:{ + attackFrom:-2, }, - ai: { - basic: { - equipValue: 4.5, + ai:{ + basic:{ + equipValue:4.5, }, }, - skills: ["bintieshuangji_skill"], - fullskin: true, + skills:["bintieshuangji_skill"], + fullskin:true, }, //王允 - wy_meirenji: { - fullskin: true, - vanish: true, - derivation: 'wangyun', - type: 'trick', - enable: true, - filterTarget: function (card, player, target) { - return target.countCards('h') && target != player && target.hasSex('male'); + wy_meirenji:{ + fullskin:true, + vanish:true, + derivation:'wangyun', + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')&&target!=player&&target.hasSex('male'); }, - content: function () { + content:function(){ 'step 0' - event.list = game.filterPlayer(function (current) { - return current != player && current != target && current.hasSex('female'); + event.list=game.filterPlayer(function(current){ + return current!=player&¤t!=target&¤t.hasSex('female'); }).sortBySeat(); 'step 1' - if (target.countCards('h') && event.list.length) { - event.current = event.list.shift(); - event.current.gainPlayerCard(target, true, 'h'); - target.line2([event.current, player]); + if(target.countCards('h')&&event.list.length){ + event.current=event.list.shift(); + event.current.gainPlayerCard(target,true,'h'); + target.line2([event.current,player]); } - else { + else{ event.goto(4); } 'step 2' - event.current.chooseCard('h', true, '将一张手牌交给' + get.translation(player)); + event.current.chooseCard('h',true,'将一张手牌交给'+get.translation(player)); 'step 3' - if (result.bool) { - event.current.give(result.cards, player); + 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) { + var n1=target.countCards('h'); + var n2=player.countCards('h'); + if(n1>n2){ target.damage(player); player.line(target); } - else if (n1 < n2) { + else if(n1= 3) return 0; - if (!target.hasSkillTag('maixie_hp')) { + result:{ + target:function(player,target){ + var num=Math.min(5,target.maxHp-target.hp); + if(target.hp==1){ + if(num>=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); + if(num==2) return 0; + return -2+num+(Math.pow(target.hp,0.2)-1); } } } }, - zhuangshu_basic: { - fullskin: true, - vanish: true, - derivation: 'fengfangnv', - type: 'equip', - suit: 'spade', - subtype: 'equip5', - skills: ['zhuangshu_basic'], - forceDie: true, - onLose: function () { - if ((!event.getParent(2) || event.getParent(2).name != 'swapEquip') && (event.getParent().type != 'equip' || event.getParent().swapEquip)) { + zhuangshu_basic:{ + fullskin:true, + vanish:true, + derivation:'fengfangnv', + type:'equip', + suit:'spade', + subtype:'equip5', + skills:['zhuangshu_basic'], + forceDie:true, + onLose:function(){ + if((!event.getParent(2)||event.getParent(2).name!='swapEquip')&&(event.getParent().type!='equip'||event.getParent().swapEquip)){ card.fix(); card.remove(); - card.destroyed = true; - game.log(card, '被销毁了'); + card.destroyed=true; + game.log(card,'被销毁了'); } }, - equipDelay: false, - loseDelay: false, - ai: { - equipValue: 5, - basic: { - equipValue: 5 + equipDelay:false, + loseDelay:false, + ai:{ + equipValue:5, + basic:{ + equipValue:5 } } }, - zhuangshu_trick: { - fullskin: true, - vanish: true, - derivation: 'fengfangnv', - type: 'equip', - suit: 'club', - subtype: 'equip5', - forceDie: true, - skills: ['zhuangshu_trick'], - onLose: function () { - if ((!event.getParent(2) || event.getParent(2).name != 'swapEquip') && (event.getParent().type != 'equip' || event.getParent().swapEquip)) { + zhuangshu_trick:{ + fullskin:true, + vanish:true, + derivation:'fengfangnv', + type:'equip', + suit:'club', + subtype:'equip5', + forceDie:true, + skills:['zhuangshu_trick'], + onLose:function(){ + if((!event.getParent(2)||event.getParent(2).name!='swapEquip')&&(event.getParent().type!='equip'||event.getParent().swapEquip)){ card.fix(); card.remove(); - card.destroyed = true; - game.log(card, '被销毁了'); + card.destroyed=true; + game.log(card,'被销毁了'); } }, - equipDelay: false, - loseDelay: false, + equipDelay:false, + loseDelay:false, }, - zhuangshu_equip: { - fullskin: true, - vanish: true, - derivation: 'fengfangnv', - type: 'equip', - suit: 'heart', - subtype: 'equip5', - skills: ['zhuangshu_equip'], - forceDie: true, - inherit: 'zhuangshu_basic', - onLose: function () { - if ((!event.getParent(2) || event.getParent(2).name != 'swapEquip') && (event.getParent().type != 'equip' || event.getParent().swapEquip)) { + zhuangshu_equip:{ + fullskin:true, + vanish:true, + derivation:'fengfangnv', + type:'equip', + suit:'heart', + subtype:'equip5', + skills:['zhuangshu_equip'], + forceDie:true, + inherit:'zhuangshu_basic', + onLose:function(){ + if((!event.getParent(2)||event.getParent(2).name!='swapEquip')&&(event.getParent().type!='equip'||event.getParent().swapEquip)){ card.fix(); card.remove(); - card.destroyed = true; - game.log(card, '被销毁了'); + card.destroyed=true; + game.log(card,'被销毁了'); } }, - equipDelay: false, - loseDelay: false, + equipDelay:false, + loseDelay:false, }, }, - skill: { + skill:{ //胡金定 - olqingyuan: { - audio: 2, - trigger: { - global: ['phaseBefore', 'gainAfter', 'loseAsyncAfter'], - player: ['enterGame', 'damageEnd'], + olqingyuan:{ + audio:2, + trigger:{ + global:['phaseBefore','gainAfter','loseAsyncAfter'], + player:['enterGame','damageEnd'], }, - filter(event, player) { - const storage = player.getStorage('olqingyuan'); - if (event.name == 'gain' || event.name == 'loseAsync') { - if (player.hasSkill('olqingyuan_used')) return false; - return storage.some(target => event.getg(target).length) && storage.some(target => target.hasCard(card => lib.filter.canBeGained(card, target, player), 'he')); + filter(event,player){ + const storage=player.getStorage('olqingyuan'); + if(event.name=='gain'||event.name=='loseAsync'){ + if(player.hasSkill('olqingyuan_used')) return false; + return storage.some(target=>event.getg(target).length)&&storage.some(target=>target.hasCard(card=>lib.filter.canBeGained(card,target,player),'he')); } - if (!game.hasPlayer(target => !storage.includes(target) && target != player)) return false; - if (event.name == 'damage' && player.getAllHistory('damage').indexOf(event) != 0) return false; - return event.name != 'phase' || game.phaseNumber == 0; + if(!game.hasPlayer(target=>!storage.includes(target)&&target!=player)) return false; + if(event.name=='damage'&&player.getAllHistory('damage').indexOf(event)!=0) return false; + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - async content(event, trigger, player) { - if (trigger.name == 'gain' || trigger.name == 'loseAsync') { - const target = player.getStorage('olqingyuan').filter(target => target.hasCard(card => lib.filter.canBeGained(card, target, player), 'he')).randomGet(); + forced:true, + async content(event,trigger,player){ + if(trigger.name=='gain'||trigger.name=='loseAsync'){ + const target=player.getStorage('olqingyuan').filter(target=>target.hasCard(card=>lib.filter.canBeGained(card,target,player),'he')).randomGet(); player.line(target); player.addTempSkill('olqingyuan_used'); - player.gain(target.getCards('he', card => { - return lib.filter.canBeGained(card, target, player); - }).randomGet(), target, 'giveAuto'); + player.gain(target.getCards('he',card=>{ + return lib.filter.canBeGained(card,target,player); + }).randomGet(),target,'giveAuto'); } - else { - const { result: { bool, targets } } = await player.chooseTarget((card, player, target) => { - return target != player && !player.getStorage('olqingyuan').includes(target); - }, true).set('prompt2', '每回合限一次,当你以此法选择的角色获得牌后,你随机获得其中一名角色的一张牌') - .set('prompt', '请选择【轻缘】的目标').set('ai', target => { - const player = get.event('player'); - return get.effect(target, new lib.element.VCard({ name: 'shunshou_copy2' }), player, player); - }); - if (bool) { - const target = targets[0]; + else{ + const {result:{bool,targets}}=await player.chooseTarget((card,player,target)=>{ + return target!=player&&!player.getStorage('olqingyuan').includes(target); + },true).set('prompt2','每回合限一次,当你以此法选择的角色获得牌后,你随机获得其中一名角色的一张牌') + .set('prompt','请选择【轻缘】的目标').set('ai',target=>{ + const player=get.event('player'); + return get.effect(target,new lib.element.VCard({name:'shunshou_copy2'}),player,player); + }); + if(bool){ + const target=targets[0]; player.line(target); - game.log(player, '选择了', target); - player.markAuto('olqingyuan', [target]); + game.log(player,'选择了',target); + player.markAuto('olqingyuan',[target]); } } }, - subSkill: { used: { charlotte: true } }, - intro: { content: '已选择$为目标' }, - ai: { - expose: 0.3, + subSkill:{used:{charlotte:true}}, + intro:{content:'已选择$为目标'}, + ai:{ + expose:0.3, }, }, - olchongshen: { - audio: 2, - locked: false, - enable: 'chooseToUse', - filterCard(card) { - return get.itemtype(card) == 'card' && card.hasGaintag('olchongshen'); + olchongshen:{ + audio:2, + locked:false, + enable:'chooseToUse', + filterCard(card){ + return get.itemtype(card)=='card'&&card.hasGaintag('olchongshen'); }, - position: 'h', - viewAs: { name: 'shan' }, - viewAsFilter(player) { - if (!player.countCards('h', card => card.hasGaintag('olchongshen'))) return false; + position:'h', + viewAs:{name:'shan'}, + viewAsFilter(player){ + if(!player.countCards('h',card=>card.hasGaintag('olchongshen'))) return false; }, - prompt: '将本轮得到的牌当作【闪】使用', - check(card) { - return 7 - get.value(card); + prompt:'将本轮得到的牌当作【闪】使用', + check(card){ + return 7-get.value(card); }, - ai: { - order: 2, - respondShan: true, - skillTagFilter(player, tag, arg) { - if (arg == 'respond' || !player.countCards('h', card => _status.connectMode || card.hasGaintag('olchongshen'))) return false; + ai:{ + order:2, + respondShan:true, + skillTagFilter(player,tag,arg){ + if(arg=='respond'||!player.countCards('h',card=>_status.connectMode||card.hasGaintag('olchongshen'))) return false; }, - effect: { - target(card, player, target, current) { - if (get.tag(card, 'respondShan') && current < 0) return 0.6; + effect:{ + target(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6; }, }, }, - group: 'olchongshen_mark', - mod: { - aiValue(player, card, num) { - if (get.name(card) != 'shan' && (get.itemtype(card) == 'card' && !card.hasGaintag('olchongshen'))) return; - let cards = player.getCards('hs', card => get.name(card) == 'shan' || card.hasGaintag('olchongshen')); - cards.sort((a, b) => (get.name(b) == 'shan' ? 1 : 2) - (get.name(a) == 'shan' ? 1 : 2)); - const geti = () => { - if (cards.includes(card)) return cards.indexOf(card); + group:'olchongshen_mark', + mod:{ + aiValue(player,card,num){ + if(get.name(card)!='shan'&&(get.itemtype(card)=='card'&&!card.hasGaintag('olchongshen'))) return; + let cards=player.getCards('hs',card=>get.name(card)=='shan'||card.hasGaintag('olchongshen')); + cards.sort((a,b)=>(get.name(b)=='shan'?1:2)-(get.name(a)=='shan'?1:2)); + const geti=()=>{ + if(cards.includes(card)) return cards.indexOf(card); return cards.length; }; - if (get.name(card) == 'shan') return Math.min(num, [6, 4, 3][Math.min(geti(), 2)]) * 0.6; - return Math.max(num, [6.5, 4, 3][Math.min(geti(), 2)]); + if(get.name(card)=='shan') return Math.min(num,[6,4,3][Math.min(geti(),2)])*0.6; + return Math.max(num,[6.5,4,3][Math.min(geti(),2)]); }, - aiUseful() { - return lib.skill.olchongshen.mod.aiValue.apply(this, arguments); + aiUseful(){ + return lib.skill.olchongshen.mod.aiValue.apply(this,arguments); }, - ignoredHandcard(card, player) { - if (card.hasGaintag('olchongshen')) return true; + ignoredHandcard(card,player){ + if(card.hasGaintag('olchongshen')) return true; }, - cardDiscardable(card, player, name) { - if (name == 'phaseDiscard' && card.hasGaintag('olchongshen')) return false; + cardDiscardable(card,player,name){ + if(name=='phaseDiscard'&&card.hasGaintag('olchongshen')) return false; }, }, - init(player) { - if (game.phaseNumber > 0) { - const hs = player.getCards('h'), history = player.getAllHistory(); - let cards = []; - for (let i = history.length - 1; i >= 0; i--) { - for (const evt of history[i].gain) { + init(player){ + if(game.phaseNumber>0){ + const hs=player.getCards('h'),history=player.getAllHistory(); + let cards=[]; + for(let i=history.length-1;i>=0;i--){ + for(const evt of history[i].gain){ cards.addArray(evt.cards); } - if (history[i].isRound) break; + if(history[i].isRound) break; } - cards = cards.filter(i => hs.includes(i)); - if (cards.length) player.addGaintag(cards, 'olchongshen'); + cards=cards.filter(i=>hs.includes(i)); + if(cards.length) player.addGaintag(cards,'olchongshen'); } }, - onremove(player) { + onremove(player){ player.removeGaintag('olchongshen'); }, - subSkill: { - mark: { - charlotte: true, - trigger: { player: 'gainBegin', global: 'roundStart' }, - filter(event, player) { - return event.name == 'gain' || game.roundNumber > 1; + subSkill:{ + mark:{ + charlotte:true, + trigger:{player:'gainBegin',global:'roundStart'}, + filter(event,player){ + return event.name=='gain'||game.roundNumber>1; }, - forced: true, - popup: false, - content() { - if (trigger.name == 'gain') trigger.gaintag.add('olchongshen'); + forced:true, + popup:false, + content(){ + if(trigger.name=='gain') trigger.gaintag.add('olchongshen'); else player.removeGaintag('olchongshen'); }, }, }, }, //田畴 - olshandao: { - audio: 2, - enable: 'phaseUse', - filter(event, player) { - return game.hasPlayer(target => lib.skill.olshandao.filterTarget(null, player, target)); + olshandao:{ + audio:2, + enable:'phaseUse', + filter(event,player){ + return game.hasPlayer(target=>lib.skill.olshandao.filterTarget(null,player,target)); }, - filterTarget(card, player, target) { + filterTarget(card,player,target){ return target.countCards('he'); }, - usable: 1, - selectTarget: [1, Infinity], - multitarget: true, - multiline: true, - async content(event, trigger, player) { - const wugu = new lib.element.VCard({ name: 'wugu' }); - const wanjian = new lib.element.VCard({ name: 'wanjian' }); - const targets = game.filterPlayer(target => { - if (target == player) return false; - return !event.targets.includes(target) && player.canUse(wanjian, target, false); - }), targetx = event.targets.sortBySeat(); - let dialog = ['将这些角色的各一张牌置于牌堆顶,然后视为对这些角色使用【五谷丰登】']; - for (const target of targetx) { - const name = (target == player ? '你' : get.translation(target)); - if (target.countCards('h')) { - dialog.add('
' + name + '的手牌区
'); - if (player.hasSkillTag('viewHandcard', null, target, true) || player == target) dialog.push(target.getCards('h')); - else dialog.push([target.getCards('h'), 'blank']); + usable:1, + selectTarget:[1,Infinity], + multitarget:true, + multiline:true, + async content(event,trigger,player){ + const wugu=new lib.element.VCard({name:'wugu'}); + const wanjian=new lib.element.VCard({name:'wanjian'}); + const targets=game.filterPlayer(target=>{ + if(target==player) return false; + return !event.targets.includes(target)&&player.canUse(wanjian,target,false); + }),targetx=event.targets.sortBySeat(); + let dialog=['将这些角色的各一张牌置于牌堆顶,然后视为对这些角色使用【五谷丰登】']; + for(const target of targetx){ + const name=(target==player?'你':get.translation(target)); + if(target.countCards('h')){ + dialog.add('
'+name+'的手牌区
'); + if(player.hasSkillTag('viewHandcard',null,target,true)||player==target) dialog.push(target.getCards('h')); + else dialog.push([target.getCards('h'),'blank']); } - if (target.countCards('e')) dialog.addArray(['
' + name + '的装备区
', target.getCards('e')]); + if(target.countCards('e')) dialog.addArray(['
'+name+'的装备区
',target.getCards('e')]); } - const { result: { bool, links } } = await player.chooseButton(dialog, event.targets.length, true).set('filterButton', button => { - return !ui.selected.buttons.some(but => get.owner(but.link) == get.owner(button.link)); - }).set('ai', button => 1 / (get.value(button.link, get.owner(button.link)) || 0.5)); - if (bool) { - const cards = links.sort((a, b) => targetx.indexOf(get.owner(a)) - targetx.indexOf(get.owner(b))); - for (const card of cards) { - const target = get.owner(card); - target.$throw(1, 1000); - await target.lose([card], ui.cardPile, 'insert'); + const {result:{bool,links}}=await player.chooseButton(dialog,event.targets.length,true).set('filterButton',button=>{ + return !ui.selected.buttons.some(but=>get.owner(but.link)==get.owner(button.link)); + }).set('ai',button=>1/(get.value(button.link,get.owner(button.link))||0.5)); + if(bool){ + const cards=links.sort((a,b)=>targetx.indexOf(get.owner(a))-targetx.indexOf(get.owner(b))); + for(const card of cards){ + const target=get.owner(card); + target.$throw(1,1000); + await target.lose([card],ui.cardPile,'insert'); } - const targety = targetx.filter(target => player.canUse(wugu, target, false)); - if (targety.length) await player.useCard(wugu, targety, false); - if (targets.length) await player.useCard(wanjian, targets, false); + const targety=targetx.filter(target=>player.canUse(wugu,target,false)); + if(targety.length) await player.useCard(wugu,targety,false); + if(targets.length) await player.useCard(wanjian,targets,false); } }, - ai: { - order: 9, - result: { target: 1 }, + ai:{ + order:9, + result:{target:1}, }, }, //李异 - olchanshuang: { - audio: 2, - enable: 'phaseUse', - filterTarget: lib.filter.notMe, - usable: 1, - content: function* (event, map) { - const player = map.player, target = event.target; - const choiceList = [ + olchanshuang:{ + audio:2, + enable:'phaseUse', + filterTarget:lib.filter.notMe, + usable:1, + content:function*(event,map){ + const player=map.player,target=event.target; + const choiceList=[ '重铸一张牌', '使用一张【杀】', '弃置两张牌', - ], list = ['重铸', '出杀', '弃牌', '无法选择']; - let result = []; - for (let current of [player, target]) { - let list1 = list.slice(), choiceList1 = choiceList.slice(); - list1 = list1.filter(control => { - if (control == '无法选择') return false; - if (control == '重铸') return current.countCards('he', card => current.canRecast(card)); - if (control == '出杀') return current.countCards('he', card => card.name == 'sha' && current.hasUseTarget(card)); - if (control == '弃牌') return current.countCards('he', card => lib.filter.cardDiscardable(card, current)) > 1; + ],list=['重铸','出杀','弃牌','无法选择']; + let result=[]; + for(let current of [player,target]){ + let list1=list.slice(),choiceList1=choiceList.slice(); + list1=list1.filter(control=>{ + if(control=='无法选择') return false; + if(control=='重铸') return current.countCards('he',card=>current.canRecast(card)); + if(control=='出杀') return current.countCards('he',card=>card.name=='sha'&¤t.hasUseTarget(card)); + if(control=='弃牌') return current.countCards('he',card=>lib.filter.cardDiscardable(card,current))>1; }); - choiceList1 = choiceList.filter(control => { - if (choiceList.indexOf(control) == 0) return current.countCards('he', card => current.canRecast(card)); - if (choiceList.indexOf(control) == 1) return current.countCards('he', card => card.name == 'sha' && current.hasUseTarget(card)); - if (choiceList.indexOf(control) == 2) return current.countCards('he', card => lib.filter.cardDiscardable(card, current)) > 1; + choiceList1=choiceList.filter(control=>{ + if(choiceList.indexOf(control)==0) return current.countCards('he',card=>current.canRecast(card)); + if(choiceList.indexOf(control)==1) return current.countCards('he',card=>card.name=='sha'&¤t.hasUseTarget(card)); + if(choiceList.indexOf(control)==2) return current.countCards('he',card=>lib.filter.cardDiscardable(card,current))>1; }); - if (list1.length) { - if (list1.length == 1) result.push(list.indexOf(list1[0])); - else { - let result1 = yield current.chooseControl(list1).set('ai', () => { - const current = _status.event.player; - const controls = _status.event.controls.slice(); - if (controls.includes('出杀') && current.countCards('hs', card => card.name == 'sha' && current.hasValueTarget(card))) return '出杀'; - if (controls.includes('重铸')) return '重铸'; + if(list1.length){ + if(list1.length==1) result.push(list.indexOf(list1[0])); + else{ + let result1=yield current.chooseControl(list1).set('ai',()=>{ + const current=_status.event.player; + const controls=_status.event.controls.slice(); + if(controls.includes('出杀')&¤t.countCards('hs',card=>card.name=='sha'&¤t.hasValueTarget(card))) return '出杀'; + if(controls.includes('重铸')) return '重铸'; return '弃牌'; - }).set('choiceList', choiceList1); - if (result1.control) result.push(list.indexOf(result1.control)); + }).set('choiceList',choiceList1); + if(result1.control) result.push(list.indexOf(result1.control)); } } else result.push(3); } player.popup(list[result[0]]); target.popup(list[result[1]]); - for (let current of [player, target]) { - switch (list[result[current == player ? 0 : 1]]) { + for(let current of [player,target]){ + switch(list[result[current==player?0:1]]){ case '重铸': - let result2 = yield current.chooseCard('he', '请重铸一张牌', (card, player) => player.canRecast(card), true); - if (result2.bool) current.recast(result2.cards); + let result2=yield current.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true); + if(result2.bool) current.recast(result2.cards); break; case '出杀': current.chooseToUse({ - prompt: '请使用一张【杀】', - filterCard: function (card, player) { - if (card.name != 'sha') return false; - return lib.filter.filterCard.apply(this, arguments); + prompt:'请使用一张【杀】', + filterCard:function(card,player){ + if(card.name!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); }, - forced: true, - ai1: function (card) { + forced:true, + ai1:function(card){ return _status.event.player.getUseValue(card); }, }); break; case '弃牌': - current.chooseToDiscard('he', 2, true); + current.chooseToDiscard('he',2,true); break; } } }, - ai: { - order: function (item, player) { - return get.order({ name: 'sha' }, player) - 0.1; + ai:{ + order:function(item,player){ + return get.order({name:'sha'},player)-0.1; }, - result: { - target: function (player, target) { - const att = get.attitude(player, target); - if (target.countCards('hs', card => { - return card.name == 'sha' && game.hasPlayer(current => { - return target.canUse(card, current) && get.effect(current, card, target, target) > 0 && get.effect(current, card, target, player) > 0; + result:{ + target:function(player,target){ + const att=get.attitude(player,target); + if(target.countCards('hs',card=>{ + return card.name=='sha'&&game.hasPlayer(current=>{ + return target.canUse(card,current)&&get.effect(current,card,target,target)>0&&get.effect(current,card,target,player)>0; }); })) return 3; - if (att > 0) return 2; - if (!target.countCards('h')) return get.sgn(att) + (att == 0 ? 1 : 0); + if(att>0) return 2; + if(!target.countCards('h')) return get.sgn(att)+(att==0?1:0); return 0; }, }, }, - group: 'olchanshuang_end', - subSkill: { - end: { - audio: 'olchanshuang', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return player.getHistory('lose', evt => { - if (evt.type == 'discard') { - var evtx = evt.getl(player); - return evtx && evtx.cards2.length == 2; + group:'olchanshuang_end', + subSkill:{ + end:{ + audio:'olchanshuang', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.getHistory('lose',evt=>{ + if(evt.type=='discard'){ + var evtx=evt.getl(player); + return evtx&&evtx.cards2.length==2; } - return evt.getParent(2).name == 'recast'; - }).length || player.getHistory('useCard', evt => evt.card.name == 'sha').length; + return evt.getParent(2).name=='recast'; + }).length||player.getHistory('useCard',evt=>evt.card.name=='sha').length; }, - forced: true, - locked: false, - content: function* (event, map) { - let num = 0, player = map.player; - if (player.getHistory('lose', evt => evt.getParent(2).name == 'recast').length) num++; - if (player.getHistory('useCard', evt => evt.card.name == 'sha').length) num++; - if (player.getHistory('lose', evt => { - if (evt.type == 'discard') { - var evtx = evt.getl(player); - return evtx && evtx.cards2.length == 2; + forced:true, + locked:false, + content:function*(event,map){ + let num=0,player=map.player; + if(player.getHistory('lose',evt=>evt.getParent(2).name=='recast').length) num++; + if(player.getHistory('useCard',evt=>evt.card.name=='sha').length) num++; + if(player.getHistory('lose',evt=>{ + if(evt.type=='discard'){ + var evtx=evt.getl(player); + return evtx&&evtx.cards2.length==2; } }).length) num++; - if (num && player.countCards('he', card => player.canRecast(card))) { - let result = yield player.chooseCard('he', '请重铸一张牌', (card, player) => player.canRecast(card), true); - if (result.bool) yield player.recast(result.cards); + if(num&&player.countCards('he',card=>player.canRecast(card))){ + let result=yield player.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true); + if(result.bool) yield player.recast(result.cards); } - if (num > 1 && player.countCards('he', card => card.name == 'sha' && player.hasUseTarget(card))) { + if(num>1&&player.countCards('he',card=>card.name=='sha'&&player.hasUseTarget(card))){ yield player.chooseToUse({ - prompt: '请使用一张【杀】', - filterCard: function (card, player) { - if (card.name != 'sha') return false; - return lib.filter.filterCard.apply(this, arguments); + prompt:'请使用一张【杀】', + filterCard:function(card,player){ + if(card.name!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); }, - forced: true, - ai1: function (card) { + forced:true, + ai1:function(card){ return _status.event.player.getUseValue(card); }, }); } - if (num > 2 && player.countCards('he', card => lib.filter.cardDiscardable(card, player))) yield player.chooseToDiscard('he', 2, true); + if(num>2&&player.countCards('he',card=>lib.filter.cardDiscardable(card,player))) yield player.chooseToDiscard('he',2,true); }, }, }, }, - olzhanjin: { - audio: 2, - locked: true, - group: 'olzhanjin_guanshi', - subSkill: { - guanshi: { - audio: 'olzhanjin', - nobracket: true, - equipSkill: true, - trigger: { player: ['shaMiss', 'eventNeutralized'] }, - filter: function (event, player) { - if (!player.hasEmptySlot(1) || !lib.card.guanshi || player.hasSkillTag('unequip_equip1')) return false; - if (event.type != 'card' || event.card.name != 'sha' || !event.target.isIn()) return false; - return player.countCards('he') >= 2; + olzhanjin:{ + audio:2, + locked:true, + group:'olzhanjin_guanshi', + subSkill:{ + guanshi:{ + audio:'olzhanjin', + nobracket:true, + equipSkill:true, + trigger:{player:['shaMiss','eventNeutralized']}, + filter:function(event,player){ + if(!player.hasEmptySlot(1)||!lib.card.guanshi||player.hasSkillTag('unequip_equip1')) return false; + if(event.type!='card'||event.card.name!='sha'||!event.target.isIn()) return false; + return player.countCards('he')>=2; }, - direct: true, - locked: false, - content: function () { + direct:true, + locked:false, + content:function(){ "step 0" - player.chooseToDiscard(get.prompt('olzhanjin_guanshi'), '弃置两张牌,令' + get.translation(trigger.card) + '强制命中', 2, 'he').set('ai', function (card) { - var evt = _status.event.getTrigger(); - if (get.attitude(evt.player, evt.target) < 0) { - if (player.needsToDiscard()) return 15 - get.value(card); - if (evt.baseDamage + evt.extraDamage >= Math.min(2, evt.target.hp)) return 8 - get.value(card); - return 5 - get.value(card); + player.chooseToDiscard(get.prompt('olzhanjin_guanshi'),'弃置两张牌,令'+get.translation(trigger.card)+'强制命中',2,'he').set('ai',function(card){ + var evt=_status.event.getTrigger(); + if(get.attitude(evt.player,evt.target)<0){ + if(player.needsToDiscard()) return 15-get.value(card); + if(evt.baseDamage+evt.extraDamage>=Math.min(2,evt.target.hp)) return 8-get.value(card); + return 5-get.value(card); } return -1; - }).set('complexCard', true).logSkill = 'olzhanjin_guanshi'; + }).set('complexCard',true).logSkill='olzhanjin_guanshi'; 'step 1' - if (result.bool) { - if (event.triggername == 'shaMiss') { + if(result.bool){ + if(event.triggername=='shaMiss'){ trigger.untrigger(); trigger.trigger('shaHit'); - trigger._result.bool = false; - trigger._result.result = null; + trigger._result.bool=false; + trigger._result.result=null; } else trigger.unneutralize(); } }, - mod: { - attackRange: function (player, num) { - if (lib.card.guanshi && player.hasEmptySlot(1)) return num - lib.card.guanshi.distance.attackFrom; + mod:{ + attackRange:function(player,num){ + if(lib.card.guanshi&&player.hasEmptySlot(1)) return num-lib.card.guanshi.distance.attackFrom; }, }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - if (player._olzhanjin_guanshi_temp || !player.hasEmptySlot(1) || !lib.card.guanshi || player.hasSkillTag('unequip_equip1')) return; - player._guanshi_temp = true; - var bool = (get.attitude(player, arg.target) < 0 && arg.card && arg.card.name == 'sha' && player.countCards('he', card => { - return card != arg.card && (!arg.card.cards || !arg.card.cards.includes(card)) && get.value(card) < 5; - }) > 1); + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(player._olzhanjin_guanshi_temp||!player.hasEmptySlot(1)||!lib.card.guanshi||player.hasSkillTag('unequip_equip1')) return; + player._guanshi_temp=true; + var bool=(get.attitude(player,arg.target)<0&&arg.card&&arg.card.name=='sha'&&player.countCards('he',card=>{ + return card!=arg.card&&(!arg.card.cards||!arg.card.cards.includes(card))&&get.value(card)<5; + })>1); delete player._olzhanjin_guanshi_temp; return bool; }, - effect: { - target: function (card, player, target) { - if (player.hasSkillTag('unequip_equip1')) return; - if (player == target && get.subtype(card) == 'equip1') { - if (get.equipValue(card) <= get.equipValue({ name: 'guanshi' })) return 0; + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('unequip_equip1')) return; + if(player==target&&get.subtype(card)=='equip1'){ + if(get.equipValue(card)<=get.equipValue({name:'guanshi'})) return 0; } }, }, @@ -1097,698 +1097,699 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //曹宇 - olgongjie: { - audio: 2, - trigger: { global: 'phaseBegin' }, - filter(event, player) { - if (!player.countCards('he')) return false; - return !game.hasPlayer(current => { - var history = current.actionHistory; - for (var num = history.length - 1; num >= 0; num--) { - if (history[num].isRound) break; - if (history[num].isSkipped) continue; + olgongjie:{ + audio:2, + trigger:{global:'phaseBegin'}, + filter(event,player){ + if(!player.countCards('he')) return false; + return !game.hasPlayer(current=>{ + var history=current.actionHistory; + for(var num=history.length-1;num>=0;num--){ + if(history[num].isRound) break; + if(history[num].isSkipped) continue; return true; } return false; }); }, - direct: true, - async content(event, trigger, player) { - var num = player.countCards('he'), draws = []; - var { result: { bool, targets } } = await player.chooseTarget(get.prompt2('olgongjie'), [1, num], lib.filter.notMe).set('ai', target => get.attitude(_status.event.player, target)); - if (!bool) return; - targets = targets.sortBySeat(); - player.logSkill('olgongjie', targets); - for (var target of targets) { - var { result: { bool, cards } } = await target.gainPlayerCard(player, true, 'he'); - if (bool) draws.add(get.suit(cards[0], player)); + direct:true, + async content(event,trigger,player){ + var num=player.countCards('he'),draws=[]; + var {result:{bool,targets}}=await player.chooseTarget(get.prompt2('olgongjie'),[1,num],lib.filter.notMe).set('ai',target=>get.attitude(_status.event.player,target)); + if(!bool) return; + targets=targets.sortBySeat(); + player.logSkill('olgongjie',targets); + for(var target of targets){ + var {result:{bool,cards}}=await target.gainPlayerCard(player,true,'he'); + if(bool) draws.add(get.suit(cards[0],player)); } player.draw(draws.length); }, }, - olxiangxv: { - audio: 2, - trigger: { - player: 'loseAfter', - global: ['gainAfter', 'equipAfter', 'addJudgeAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + olxiangxv:{ + audio:2, + trigger:{ + player:'loseAfter', + global:['gainAfter','equipAfter','addJudgeAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter(event, player) { - if (!_status.currentPhase || !_status.currentPhase.isIn()) return false; - if (!player.isMinHandcard()) return false; - var evt = event.getl(player); - if (evt && evt.player == player && evt.hs && evt.hs.length > 0) return true; - if (event.getg) return game.hasPlayer(current => { - var cards = event.getg(current); - if (!cards.length) return false; - return current.countCards('h') >= player.countCards('h') && current.countCards('h') - cards.length < player.countCards('h'); + filter(event,player){ + if(!_status.currentPhase||!_status.currentPhase.isIn()) return false; + if(!player.isMinHandcard()) return false; + var evt=event.getl(player); + if(evt&&evt.player==player&&evt.hs&&evt.hs.length>0) return true; + if(event.getg) return game.hasPlayer(current=>{ + var cards=event.getg(current); + if(!cards.length) return false; + return current.countCards('h')>=player.countCards('h')&¤t.countCards('h')-cards.length get.name(card) == 'sha'); - cardx.sort((a, b) => target.getUseValue(b) - target.getUseValue(a)); - cardx = cardx.slice(Math.min(cardx.length, target.getCardUsable('sha')), cardx.length); + check(event,player){ + var target=_status.currentPhase; + var cards=target.getCards('h'); + if(target.isPhaseUsing()){ + var cardx=cards.filter(card=>get.name(card)=='sha'); + cardx.sort((a,b)=>target.getUseValue(b)-target.getUseValue(a)); + cardx=cardx.slice(Math.min(cardx.length,target.getCardUsable('sha')),cardx.length); cards.removeArray(cardx); } - return cards.length - player.countCards('h') > 0; + return cards.length-player.countCards('h')>0; }, - usable: 1, - logTarget: () => _status.currentPhase, - async content(event, trigger, player) { - player.when({ global: 'phaseEnd' }).then(() => { - if (target && target.isIn()) { - var num = target.countCards('h') - player.countCards('h'); - if (num) { - if (num > 0) { - if (player.countCards('h') < 5) player.draw(Math.min(5 - player.countCards('h'), num)); + usable:1, + logTarget:()=>_status.currentPhase, + async content(event,trigger,player){ + player.when({global:'phaseEnd'}).then(()=>{ + if(target&&target.isIn()){ + var num=target.countCards('h')-player.countCards('h'); + if(num){ + if(num>0){ + if(player.countCards('h')<5) player.draw(Math.min(5-player.countCards('h'),num)); } - else player.chooseToDiscard(-num, 'h', true); + else player.chooseToDiscard(-num,'h',true); } } - }).vars({ target: _status.currentPhase }); + }).vars({target:_status.currentPhase}); }, }, - olxiangzuo: { - audio: 2, - trigger: { player: 'dying' }, - filter(event, player) { - if (!_status.currentPhase || !_status.currentPhase.isIn()) return false; + olxiangzuo:{ + audio:2, + trigger:{player:'dying'}, + filter(event,player){ + if(!_status.currentPhase||!_status.currentPhase.isIn()) return false; return player.countCards('he'); }, - direct: true, - limited: true, - skillAnimation: true, - animationColor: 'water', - async content(event, trigger, player) { - var target = _status.currentPhase, num = player.countCards('he'); - var { result: { bool, cards } } = await player.chooseToGive(get.prompt2('olxiangzuo', target), [1, num], 'he').set('ai', card => { - var player = _status.event.player, target = _status.event.target; - if (player.getHistory('useSkill', evt => { - return (evt.skill == 'olgongjie' || evt.skill == 'olxiangxv') && evt.targets.includes(target); - }).length) { - if (get.attitude(player, target) > 0) return 1; - if (player.canSaveCard(card, player)) return 0; - if (ui.selected.cards.length + player.hp == player.maxHp) return 0; - return 20 - get.value(card); + direct:true, + limited:true, + skillAnimation:true, + animationColor:'water', + async content(event,trigger,player){ + var target=_status.currentPhase,num=player.countCards('he'); + var {result:{bool,cards}}=await player.chooseToGive(get.prompt2('olxiangzuo',target),[1,num],'he').set('ai',card=>{ + var player=_status.event.player,target=_status.event.target; + if(player.getHistory('useSkill',evt=>{ + return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target); + }).length){ + if(get.attitude(player,target)>0) return 1; + if(player.canSaveCard(card,player)) return 0; + if(ui.selected.cards.length+player.hp==player.maxHp) return 0; + return 20-get.value(card); } - else { - if (get.attitude(player, target) > 0 && !player.countCards('he', cardx => player.canSaveCard(cardx, player))) return 1; + else{ + if(get.attitude(player,target)>0&&!player.countCards('he',cardx=>player.canSaveCard(cardx,player))) return 1; return 0; } - }).set('target', target).set('complexCard', true).set('logSkill', ['olxiangzuo', target]); - if (!bool) return; + }).set('target',target).set('complexCard',true).set('logSkill',['olxiangzuo',target]); + if(!bool) return; player.awakenSkill('olxiangzuo'); - if (player.getHistory('useSkill', evt => { - return (evt.skill == 'olgongjie' || evt.skill == 'olxiangxv') && evt.targets.includes(target); + if(player.getHistory('useSkill',evt=>{ + return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target); }).length) player.recover(cards.length); }, }, //OL飞扬 - olfeiyang: { - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return player.countCards('he', card => { - if (_status.connectMode && get.position(card) == 'h') return true; - return lib.filter.cardDiscardable(card, player); - }) >= 3 && player.countCards('j'); + olfeiyang:{ + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.countCards('he',card=>{ + if(_status.connectMode&&get.position(card)=='h') return true; + return lib.filter.cardDiscardable(card,player); + })>=3&&player.countCards('j'); }, - direct: true, + direct:true, //limited:true, //skillAnimation:true, //animationColor:'orange', - content: function () { + content:function(){ 'step 0' - player.chooseToDiscard(get.prompt2('olfeiyang'), 'he', 3).set('ai', function (card) { - var player = _status.event.player; - if (player.hasCard(function (card) { - return get.effect(player, { - name: card.viewAs || card.name, - cards: [card], - }, player, player) < 0; - }, 'j')) return 6 - get.value(card); + player.chooseToDiscard(get.prompt2('olfeiyang'),'he',3).set('ai',function(card){ + var player=_status.event.player; + if(player.hasCard(function(card){ + return get.effect(player,{ + name:card.viewAs||card.name, + cards:[card], + },player,player)<0; + },'j')) return 6-get.value(card); return 0; - }).set('logSkill', 'olfeiyang'); + }).set('logSkill','olfeiyang'); 'step 1' - if (result.bool) { + if(result.bool){ //player.awakenSkill('olfeiyang'); - player.discardPlayerCard(player, 'j', true); + player.discardPlayerCard(player,'j',true); } }, }, //李婉 - ollianju: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - var history = player.getHistory('useCard'); - if (!history.length) return false; - var evt = history[history.length - 1]; - return evt.cards && evt.cards.filterInD('d').length; + ollianju:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + var history=player.getHistory('useCard'); + if(!history.length) return false; + var evt=history[history.length-1]; + return evt.cards&&evt.cards.filterInD('d').length; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var history = player.getHistory('useCard'); - var evt = history[history.length - 1]; - event.evt = evt; - player.chooseTarget(get.prompt('ollianju'), '令一名角色获得' + get.translation(evt.cards.filterInD('d')) + '并记录' + get.translation(evt.card.name), lib.filter.notMe).set('ai', target => { - var player = _status.event.player, att = get.attitude(player, target); - var cards = _status.event.cards; - if (cards.filter(card => get.name(card, false) == 'du').length >= Math.ceil(cards.length / 2)) att *= -1; - if (target.skipList.includes('phaseUse') || target.hasJudge('lebu')) return att / 20; + var history=player.getHistory('useCard'); + var evt=history[history.length-1]; + event.evt=evt; + player.chooseTarget(get.prompt('ollianju'),'令一名角色获得'+get.translation(evt.cards.filterInD('d'))+'并记录'+get.translation(evt.card.name),lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player,att=get.attitude(player,target); + var cards=_status.event.cards; + if(cards.filter(card=>get.name(card,false)=='du').length>=Math.ceil(cards.length/2)) att*=-1; + if(target.skipList.includes('phaseUse')||target.hasJudge('lebu')) return att/20; return att; - }).set('cards', evt.cards.filterInD('d')); + }).set('cards',evt.cards.filterInD('d')); 'step 1' - if (result.bool) { - var evt = event.evt; - var target = result.targets[0]; - player.logSkill('oliandui', target); - target.gain(evt.cards.filterInD('d'), 'gain2'); + if(result.bool){ + var evt=event.evt; + var target=result.targets[0]; + player.logSkill('oliandui',target); + target.gain(evt.cards.filterInD('d'),'gain2'); player.addSkill('ollianju_effect'); - player.storage.ollianju = evt.card.name; + player.storage.ollianju=evt.card.name; player.markSkill('ollianju'); - if (!player.storage.ollianju_effect[target.playerid]) player.storage.ollianju_effect[target.playerid] = []; + if(!player.storage.ollianju_effect[target.playerid]) player.storage.ollianju_effect[target.playerid]=[]; player.storage.ollianju_effect[target.playerid].add(evt.card.name); } }, - onunmark: true, - intro: { - content: function (storage, player) { - var str = '当前最后一次记录牌名:' + get.translation(storage); - if (player.storage.ollianju_effect) { - for (var i in player.storage.ollianju_effect) { - var target = game.findPlayer(target => target.playerid == i); - if (!i) continue; - str += '
'; - str += get.translation(target) + '的下个结束阶段,其可令你获得其本回合使用的最后一张牌对应的所有位于弃牌堆的实体牌'; - str += ',然后若此牌名为' + get.translation(player.storage.ollianju_effect[i]) + ',则你失去1点体力,否则你可以视为使用' + get.translation(player.storage.ollianju_effect[i]); + onunmark:true, + intro:{ + content:function(storage,player){ + var str='当前最后一次记录牌名:'+get.translation(storage); + if(player.storage.ollianju_effect){ + for(var i in player.storage.ollianju_effect){ + var target=game.findPlayer(target=>target.playerid==i); + if(!i) continue; + str+='
'; + str+=get.translation(target)+'的下个结束阶段,其可令你获得其本回合使用的最后一张牌对应的所有位于弃牌堆的实体牌'; + str+=',然后若此牌名为'+get.translation(player.storage.ollianju_effect[i])+',则你失去1点体力,否则你可以视为使用'+get.translation(player.storage.ollianju_effect[i]); } } return str; }, }, - subSkill: { - effect: { - init: function (player) { - if (!player.storage.ollianju_effect) player.storage.ollianju_effect = {}; + subSkill:{ + effect:{ + init:function(player){ + if(!player.storage.ollianju_effect) player.storage.ollianju_effect={}; }, - charlotte: true, - trigger: { global: ['phaseJieshuBegin', 'die'] }, - filter: function (event, player) { + charlotte:true, + trigger:{global:['phaseJieshuBegin','die']}, + filter:function(event,player){ return player.storage.ollianju_effect[event.player.playerid]; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - if (trigger.name == 'phaseJieshu') event.list = player.storage.ollianju_effect[trigger.player.playerid]; + if(trigger.name=='phaseJieshu') event.list=player.storage.ollianju_effect[trigger.player.playerid]; delete player.storage.ollianju_effect[trigger.player.playerid]; - var history = trigger.player.getHistory('useCard'); - var evt = history[history.length - 1]; - event.evt = evt; - if (trigger.name == 'die' || !history.length || !evt.cards || !evt.cards.filterInD('d').length) event.finish(); + var history=trigger.player.getHistory('useCard'); + var evt=history[history.length-1]; + event.evt=evt; + if(trigger.name=='die'||!history.length||!evt.cards||!evt.cards.filterInD('d').length) event.finish(); 'step 1' - var evt = event.evt; - trigger.player.chooseBool(get.prompt('ollianju', player), '令' + get.translation(player) + '获得' + get.translation(evt.cards.filterInD('d')) + (event.list.includes(evt.card.name) ? ',然后' + get.translation(player) + '失去1点体力' : '')).set('choice', get.attitude(trigger.player, player) > 0 && (!event.list.includes(evt.card.name) || player.getHp() > 1)); + var evt=event.evt; + trigger.player.chooseBool(get.prompt('ollianju',player),'令'+get.translation(player)+'获得'+get.translation(evt.cards.filterInD('d'))+(event.list.includes(evt.card.name)?',然后'+get.translation(player)+'失去1点体力':'')).set('choice',get.attitude(trigger.player,player)>0&&(!event.list.includes(evt.card.name)||player.getHp()>1)); 'step 2' - if (result.bool) { - var evt = event.evt, cards = evt.cards.filterInD('d'); + if(result.bool){ + var evt=event.evt,cards=evt.cards.filterInD('d'); trigger.player.line(player); - player.gain(cards, 'gain2'); - if (event.list.includes(evt.card.name)) player.loseHp(); - else { - var card = { - name: evt.card.name, - isCard: true, + player.gain(cards,'gain2'); + if(event.list.includes(evt.card.name)) player.loseHp(); + else{ + var card={ + name:evt.card.name, + isCard:true, }; - if (player.hasUseTarget(card)) player.chooseUseTarget(card, false); + if(player.hasUseTarget(card)) player.chooseUseTarget(card,false); } } }, }, }, }, - olsilv: { - audio: 2, - trigger: { - player: ['loseAfter', 'gainAfter'], - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + olsilv:{ + audio:2, + trigger:{ + player:['loseAfter','gainAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - var name = player.storage.ollianju; - if (!name) return false; - if (event.getg) return event.getg(player).some(card => card.name == name) && !player.hasSkill('olsilv_gain'); - return event.getl(player).cards2.some(card => card.name == name) && !player.hasSkill('olsilv_lose'); + filter:function(event,player){ + var name=player.storage.ollianju; + if(!name) return false; + if(event.getg) return event.getg(player).some(card=>card.name==name)&&!player.hasSkill('olsilv_gain'); + return event.getl(player).cards2.some(card=>card.name==name)&&!player.hasSkill('olsilv_lose'); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - player.addTempSkill('olsilv_' + (trigger.getg ? 'gain' : 'lose')); - if (!trigger.visible) { - var cards, name = player.storage.ollianju; - if (trigger.getg) cards = trigger.getg(player).filter(card => card.name == name); - else cards = trigger.getl(player).cards2.filter(card => card.name == name); - if (cards.length) player.showCards(cards, get.translation(player) + '发动了【思闾】'); + player.addTempSkill('olsilv_'+(trigger.getg?'gain':'lose')); + if(!trigger.visible){ + var cards,name=player.storage.ollianju; + if(trigger.getg) cards=trigger.getg(player).filter(card=>card.name==name); + else cards=trigger.getl(player).cards2.filter(card=>card.name==name); + if(cards.length) player.showCards(cards,get.translation(player)+'发动了【思闾】'); } 'step 1' player.draw(); }, - ai: { combo: 'ollianju' }, - subSkill: { - gain: { charlotte: true }, - lose: { charlotte: true }, + ai:{combo:'ollianju'}, + subSkill:{ + gain:{charlotte:true}, + lose:{charlotte:true}, }, }, //丁尚涴 - olfudao: { - audio: 2, - trigger: { - global: 'phaseBefore', - player: 'enterGame', + olfudao:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - filter: function (event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ 'step 0' player.draw(3); 'step 1' - var num = player.countCards('h'); - if (num > 0) { + var num=player.countCards('h'); + if(num>0){ player.chooseCardTarget({ - prompt: '抚悼:将至多三张手张牌交给一名其他角色', - selectCard: [1, 3], - filterCard: true, - filterTarget: lib.filter.notMe, - position: 'h', - ai1: function (card) { - if (card.name == 'du') return 10; - else if (ui.selected.cards.length && ui.selected.cards[0].name == 'du') return 0; - var player = _status.event.player; - if (ui.selected.cards.length > 4 || !game.hasPlayer(function (current) { - return get.attitude(player, current) > 0 && !current.hasSkillTag('nogain'); + prompt:'抚悼:将至多三张手张牌交给一名其他角色', + selectCard:[1,3], + filterCard:true, + filterTarget:lib.filter.notMe, + position:'h', + ai1:function(card){ + if(card.name=='du') return 10; + else if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + var player=_status.event.player; + if(ui.selected.cards.length>4||!game.hasPlayer(function(current){ + return get.attitude(player,current)>0&&!current.hasSkillTag('nogain'); })) return 0; - return 1 / Math.max(0.1, get.value(card)); + return 1/Math.max(0.1,get.value(card)); }, - ai2: function (target) { - var player = _status.event.player, att = get.attitude(player, target); - if (ui.selected.cards[0].name == 'du') return -att; - if (target.hasSkillTag('nogain')) att /= 6; + ai2:function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(ui.selected.cards[0].name=='du') return -att; + if(target.hasSkillTag('nogain')) att/=6; return att; }, }); } else event.goto(3); 'step 2' - if (result.bool) { - player.give(result.cards, result.targets[0]); + if(result.bool){ + player.give(result.cards,result.targets[0]); } 'step 3' - var num = player.countCards('h'); - if (num > 0) player.chooseToDiscard('h', [1, num], '抚悼:弃置任意张手牌,然后记录手牌数'); + var num=player.countCards('h'); + if(num>0) player.chooseToDiscard('h',[1,num],'抚悼:弃置任意张手牌,然后记录手牌数'); 'step 4' - player.storage.olfudao = player.countCards('h'); + player.storage.olfudao=player.countCards('h'); player.markSkill('olfudao'); }, - intro: { - content: '一名角色的回合结束时,若其手牌数等于#,你可以与其各摸一张牌。', + intro:{ + content:'一名角色的回合结束时,若其手牌数等于#,你可以与其各摸一张牌。', }, - group: 'olfudao_qiaoshi', - subSkill: { - qiaoshi: { - audio: 'olfudao', - trigger: { global: 'phaseEnd' }, - filter: function (event, player) { - if (typeof player.storage.olfudao != 'number') return false; - return event.player.countCards('h') == player.storage.olfudao && event.player.isIn(); + group:'olfudao_qiaoshi', + subSkill:{ + qiaoshi:{ + audio:'olfudao', + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + if(typeof player.storage.olfudao!='number') return false; + return event.player.countCards('h')==player.storage.olfudao&&event.player.isIn(); }, - check: function (event, player) { - return get.attitude(player, event.player) >= 0; + check:function(event,player){ + return get.attitude(player,event.player)>=0; }, - logTarget: 'player', - prompt2: function (event, player) { - return '与' + get.translation(event.player) + '各摸一张牌'; + logTarget:'player', + prompt2:function(event,player){ + return '与'+get.translation(event.player)+'各摸一张牌'; }, - content: function () { - game.asyncDraw([trigger.player, player]); + content:function(){ + game.asyncDraw([trigger.player,player]); }, }, }, }, - olfengyan: { - audio: 2, - trigger: { player: ['damageEnd', 'useCard', 'respond'] }, - filter: function (event, player) { - if (event.name == 'damage') return event.source && event.source.isIn() && event.source != player; - return Array.isArray(event.respondTo) && event.respondTo[0] != player; + olfengyan:{ + audio:2, + trigger:{player:['damageEnd','useCard','respond']}, + filter:function(event,player){ + if(event.name=='damage') return event.source&&event.source.isIn()&&event.source!=player; + return Array.isArray(event.respondTo)&&event.respondTo[0]!=player; }, - logTarget: function (event, player) { - if (event.name == 'damage') return event.source; + logTarget:function(event,player){ + if(event.name=='damage') return event.source; return event.respondTo[0]; }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - var target = lib.skill.olfengyan.logTarget(trigger, player); - var str = get.translation(target); event.target = target; - player.chooseControl().set('choiceList', [ - '摸一张牌,然后交给' + str + '一张牌', - '令' + str + '摸一张牌,然后' + str + '弃置两张牌', - ]).set('ai', () => _status.event.att > 0 ? 0 : 1).set('att', get.attitude(player, target)); + var target=lib.skill.olfengyan.logTarget(trigger,player); + var str=get.translation(target);event.target=target; + player.chooseControl().set('choiceList',[ + '摸一张牌,然后交给'+str+'一张牌', + '令'+str+'摸一张牌,然后'+str+'弃置两张牌', + ]).set('ai',()=>_status.event.att>0?0:1).set('att',get.attitude(player,target)); 'step 1' - if (result.index == 0) { + if(result.index==0){ player.draw(); - player.chooseToGive(target, 'he', true); + player.chooseToGive(target,'he',true); } - else { + else{ target.draw(); - target.chooseToDiscard(2, 'he', true); + target.chooseToDiscard(2,'he',true); } }, }, //张燕 - olsuji: { - audio: 2, - trigger: { global: 'phaseUseBegin' }, - filter: function (event, player) { - if (!event.player.isDamaged()) return false; - return _status.connectMode && player.countCards('hes') || !_status.connectMode && player.hasCard(card => { - return get.color(card) == 'black'; - }, 'hes'); + olsuji:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + if(!event.player.isDamaged()) return false; + return _status.connectMode&&player.countCards('hes')||!_status.connectMode&&player.hasCard(card=>{ + return get.color(card)=='black'; + },'hes'); }, - direct: true, - content: [ - (event, map) => { - var player = map.player, trigger = map.trigger; - var next = player.chooseToUse(); - next.set('openskilldialog', `###${get.prompt('olsuji')}###将一张黑色牌当【杀】使用${player == trigger.player ? '' : `。若${get.translation(trigger.player)}受到了此【杀】的伤害,你获得其一张牌。` - }`); - next.set('norestore', true); - next.set('_backupevent', 'olsuji_backup'); - next.set('addCount', false); - next.set('logSkill', 'olsuji'); - next.set('custom', { - add: {}, - replace: { window: function () { } } + direct:true, + content:[ + (event,map)=>{ + var player=map.player,trigger=map.trigger; + var next=player.chooseToUse(); + next.set('openskilldialog',`###${get.prompt('olsuji')}###将一张黑色牌当【杀】使用${ + player==trigger.player?'':`。若${get.translation(trigger.player)}受到了此【杀】的伤害,你获得其一张牌。` + }`); + next.set('norestore',true); + next.set('_backupevent','olsuji_backup'); + next.set('addCount',false); + next.set('logSkill','olsuji'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} }); next.backup('olsuji_backup'); }, - (event, map) => { - if (map.result.bool) { - var player = map.player, trigger = map.trigger; - if (trigger.player.isIn() && trigger.player.hasHistory('damage', evt => { - return evt.card && evt.card.storage && evt.card.storage.olsuji; - }) && trigger.player.countGainableCards(player, 'he')) player.gainPlayerCard(trigger.player, 'he', true); + (event,map)=>{ + if(map.result.bool){ + var player=map.player,trigger=map.trigger; + if(trigger.player.isIn()&&trigger.player.hasHistory('damage',evt=>{ + return evt.card&&evt.card.storage&&evt.card.storage.olsuji; + })&&trigger.player.countGainableCards(player,'he')) player.gainPlayerCard(trigger.player,'he',true); } }, ], - subSkill: { - backup: { - filterCard: function (card) { - return get.itemtype(card) == 'card' && get.color(card) == 'black'; + subSkill:{ + backup:{ + filterCard:function(card){ + return get.itemtype(card)=='card'&&get.color(card)=='black'; }, - viewAs: { - name: 'sha', - storage: { olsuji: true }, + viewAs:{ + name:'sha', + storage:{olsuji:true}, }, - selectCard: 1, - position: 'hes', - ai1: function (card) { - return 5 - get.value(card); + selectCard:1, + position:'hes', + ai1:function(card){ + return 5-get.value(card); }, - precontent: function () { + precontent:function(){ delete event.result.skill; }, }, }, }, - ollangdao: { - audio: 2, - trigger: { player: 'useCardToPlayer' }, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - return event.isFirstTarget && event.targets.length == 1 && player.getStorage('ollangdao').length < 3; + ollangdao:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return event.isFirstTarget&&event.targets.length==1&&player.getStorage('ollangdao').length<3; }, - logTarget: 'target', - onremove: true, - check: function (event, player) { - if (get.attitude(player, event.target) > 0) { - if (player.getStorage('ollangdao').includes(1) && game.hasPlayer(current => { - return player.canUse(event.card, current) && get.effect(current, event.card, player, player) > 0; - })) return event.getRand() < 0.5; + logTarget:'target', + onremove:true, + check:function(event,player){ + if(get.attitude(player,event.target)>0){ + if(player.getStorage('ollangdao').includes(1)&&game.hasPlayer(current=>{ + return player.canUse(event.card,current)&&get.effect(current,event.card,player,player)>0; + })) return event.getRand()<0.5; return false; } - return event.target.getHp() <= 2 || player.getDamagedHp() > 1 || !player.hasCard({ color: 'black' }, 'hes'); + return event.target.getHp()<=2||player.getDamagedHp()>1||!player.hasCard({color:'black'},'hes'); }, - content: function* (event, map) { - var player = map.player, trigger = map.trigger, result = map.result; - var target = trigger.target; - var send = function (card, list) { - var next = game.createEvent('ollangdao_choose', false); + content:function*(event,map){ + var player=map.player,trigger=map.trigger,result=map.result; + var target=trigger.target; + var send=function(card,list){ + var next=game.createEvent('ollangdao_choose',false); next.setContent(lib.skill.ollangdao.contentx); - next.set('card', card); - next.set('list', list); + next.set('card',card); + next.set('list',list); game.resume(); }; - var sendback = function (result, player) { - if (!result) result = {}; - if (typeof result.index !== 'number' || result.index < 0) { - result.index = [0, 1, 2].find(i => !event.player.getStorage('ollangdao').includes(i)); + var sendback=function(result,player){ + if(!result) result={}; + if(typeof result.index!=='number'||result.index<0){ + result.index=[0,1,2].find(i=>!event.player.getStorage('ollangdao').includes(i)); } - results.push([player, result]); + results.push([player,result]); }; - var ai_targets = []; - var results = []; - var players = [player, target]; - var withme = false, withol = false, withai = false; - for (var i = 0; i < players.length; i++) { - if (_status.connectMode) players[i].showTimer(); - var card = trigger.card, list = player.getStorage('ollangdao'); - if (players[i].isOnline()) { - withol = true; - players[i].send(send, card, list); + var ai_targets=[]; + var results=[]; + var players=[player,target]; + var withme=false,withol=false,withai=false; + for(var i=0;i { - return !trigger.targets.includes(current) && player.canUse(trigger.card, current) && get.effect(current, trigger.card, player, target) < 0; - })) list.removeArray([0, 2]); - if (player.getStorage('ollangdao').includes(2)) list.remove(0); + if(ai_targets.length){ + for(var i=0;i{ + return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0; + })) list.removeArray([0,2]); + if(player.getStorage('ollangdao').includes(2)) list.remove(0); } - else { - if (!game.hasPlayer(current => { - return !trigger.targets.includes(current) && player.canUse(trigger.card, current) && get.effect(current, trigger.card, player, target) > 0; + else{ + if(!game.hasPlayer(current=>{ + return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0; })) list.remove(1); - if (!list.includes(1)) list.remove(0); + if(!list.includes(1)) list.remove(0); } - if (list.length) index = list.randomGet(); - sendback({ index: index }, target); - ai_targets.splice(i--, 1); + if(list.length) index=list.randomGet(); + sendback({index:index},target); + ai_targets.splice(i--,1); } } - if (ai_targets.length) { + if(ai_targets.length){ ai_targets.randomSort(); - setTimeout(function () { - event.interval = setInterval(function () { - var target = ai_targets.shift(); - var list = [0, 1, 2].removeArray(player.getStorage('ollangdao')); - var index = list[0]; - if (get.attitude(target, player) < 0) { - if (!game.hasPlayer(current => { - return !trigger.targets.includes(current) && player.canUse(trigger.card, current) && get.effect(current, trigger.card, player, target) < 0; - })) list.removeArray([0, 2]); - if (player.getStorage('ollangdao').includes(2)) list.remove(0); + setTimeout(function(){ + event.interval=setInterval(function(){ + var target=ai_targets.shift(); + var list=[0,1,2].removeArray(player.getStorage('ollangdao')); + var index=list[0]; + if(get.attitude(target,player)<0){ + if(!game.hasPlayer(current=>{ + return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0; + })) list.removeArray([0,2]); + if(player.getStorage('ollangdao').includes(2)) list.remove(0); } - else { - if (!game.hasPlayer(current => { - return !trigger.targets.includes(current) && player.canUse(trigger.card, current) && get.effect(current, trigger.card, player, target) > 0; + else{ + if(!game.hasPlayer(current=>{ + return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0; })) list.remove(1); - if (!list.includes(1)) list.remove(0); + if(!list.includes(1)) list.remove(0); } - if (list.length) index = list.randomGet(); - sendback({ index: index }, target); - if (!ai_targets.length) { + if(list.length) index=list.randomGet(); + sendback({index:index},target); + if(!ai_targets.length){ clearInterval(event.interval); - if (withai) game.resume(); + if(withai) game.resume(); } - }, _status.connectMode ? 750 : 75); - }, 500); + },_status.connectMode?750:75); + },500); } } - if (withme) { - result = yield next; - if (_status.connectMode) { - game.me.unwait(result, game.me); + if(withme){ + result=yield next; + if(_status.connectMode){ + game.me.unwait(result,game.me); } - else { - if (!result) result = {}; - if (typeof result.index !== 'number' || result.index < 0) { - result.index = [0, 1, 2].find(i => !event.player.getStorage('ollangdao').includes(i)); + else{ + if(!result) result={}; + if(typeof result.index!=='number'||result.index<0){ + result.index=[0,1,2].find(i=>!event.player.getStorage('ollangdao').includes(i)); } - results.push([player, result]); + results.push([player,result]); } } - if (withol && !event.resultOL) { + if(withol&&!event.resultOL){ game.pause(); yield null; } - if (ai_targets.length > 0) { - withai = true; + if(ai_targets.length>0){ + withai=true; game.pause(); yield null; } - if (_status.connectMode) { - for (var i of [player, target]) i.hideTimer(); + if(_status.connectMode){ + for(var i of [player,target]) i.hideTimer(); } - var chosenCount = [0, 0, 0]; - results.sort((a, b) => lib.sort.seat(a[0], b[0])); + var chosenCount=[0,0,0]; + results.sort((a,b)=>lib.sort.seat(a[0],b[0])); player.when('useCardAfter') .assign({ - card: trigger.card + card:trigger.card }) - .then(() => { - var card = get.info(event.name).card; - var dieEvts = game.getGlobalHistory('everything', evt => evt.name == 'die'); - if (trigger.card == card && !game.hasPlayer2(current => { - for (var evt of dieEvts) { - if (evt.player != current) continue; - var evtx = evt.getParent(2); - if (evtx.name != 'damage') continue; - if (evtx.card && evtx.card == card) return true; + .then(()=>{ + var card=get.info(event.name).card; + var dieEvts=game.getGlobalHistory('everything',evt=>evt.name=='die'); + if(trigger.card==card&&!game.hasPlayer2(current=>{ + for(var evt of dieEvts){ + if(evt.player!=current) continue; + var evtx=evt.getParent(2); + if(evtx.name!='damage') continue; + if(evtx.card&&evtx.card==card) return true; } return false; - }, true)) { - var toRemove = card.storage.ollangdao_remove; - var list = [0, 1, 2].filter(i => (toRemove >> i) & 1); - if (!list.length) return; - player.markAuto('ollangdao', list); - game.log(player, '移去了', '#g【狼蹈】', '的', '#y选项' + list.map(i => { - return get.cnNumber(i + 1, true); + },true)){ + var toRemove=card.storage.ollangdao_remove; + var list=[0,1,2].filter(i=>(toRemove>>i)&1); + if(!list.length) return; + player.markAuto('ollangdao',list); + game.log(player,'移去了','#g【狼蹈】','的','#y选项'+list.map(i=>{ + return get.cnNumber(i+1,true); }).join('、')); } }); - if (!trigger.card.storage) trigger.card.storage = {}; - if (!trigger.card.storage.ollangdao_remove) trigger.card.storage.ollangdao_remove = 0; - var config = [['伤害+1', 'fire'], ['目标+1', 'wood'], ['不能响应', 'water']]; - for (var res of results) { - var target = res[0], result = res[1]; - if (!target || !result) continue; - var ind = result.index; - var conf = config[ind]; - trigger.card.storage.ollangdao_remove |= 1 << ind; - target.popup(conf[0], conf[1]); - game.log(target, '选择令', trigger.card, `#g${conf[0]}`); + if(!trigger.card.storage) trigger.card.storage={}; + if(!trigger.card.storage.ollangdao_remove) trigger.card.storage.ollangdao_remove=0; + var config=[['伤害+1','fire'],['目标+1','wood'],['不能响应','water']]; + for(var res of results){ + var target=res[0],result=res[1]; + if(!target||!result) continue; + var ind=result.index; + var conf=config[ind]; + trigger.card.storage.ollangdao_remove|=1< { - return !_status.event.targets.includes(target) && player.canUse(_status.event.card, target); - }).set('targets', trigger.targets).set('ai', target => { - var player = _status.event.player; - return get.effect(target, _status.event.card, player, player); - }).set('card', trigger.card); - if (result.bool) { - if (!event.isMine() && !event.isOnline()) game.delayex(); - var targets = result.targets; + result=yield player.chooseTarget(`狼蹈:为${get.translation(trigger.card)}额外指定至多${get.cnNumber(extraTargetNum)}个目标`,(card,player,target)=>{ + return !_status.event.targets.includes(target)&&player.canUse(_status.event.card,target); + }).set('targets',trigger.targets).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',trigger.card); + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayex(); + var targets=result.targets; player.line(targets); trigger.targets.addArray(targets); - game.log(targets, '也成为了', trigger.card, '的目标'); + game.log(targets,'也成为了',trigger.card,'的目标'); } }, - contentx: function () { + contentx:function(){ 'step 0' - var name = get.translation(card); - var choices = [], choiceList = [ + var name=get.translation(card); + var choices=[],choiceList=[ `令${name}伤害基数+1`, `令${name}可以多选择一个目标`, `令${name}不可被响应` ]; - [0, 1, 2].forEach((item, index) => { - if (event.list.includes(item)) { - choiceList[index] = `${choiceList[index]}` + [0,1,2].forEach((item,index)=>{ + if(event.list.includes(item)){ + choiceList[index]=`${choiceList[index]}` } - else choices.push(`选项${get.cnNumber(index + 1, true)}`); + else choices.push(`选项${get.cnNumber(index+1,true)}`); }); - game.me.chooseControl(choices).set('prompt', '狼蹈:请选择一项').set('choiceList', choiceList).set('ai', () => { + game.me.chooseControl(choices).set('prompt','狼蹈:请选择一项').set('choiceList',choiceList).set('ai',()=>{ return _status.event.controls.randomGet(); }); 'step 1' - event.result = { index: ['选项一', '选项二', '选项三'].indexOf(result.control) }; + event.result={index:['选项一','选项二','选项三'].indexOf(result.control)}; }, - intro: { - content: (storage, player) => `已移除选项${storage.map(i => get.cnNumber(i + 1, true)).join('、')}`, + intro:{ + content:(storage,player)=>`已移除选项${storage.map(i=>get.cnNumber(i+1,true)).join('、')}`, }, }, //张既 - skill_zhangji_A: { - audio: 2, - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - if (player.countMark('skill_zhangji_A_count') >= player.hp) return false; - return event.target != player && event.target.countCards('h') && player.isPhaseUsing(); + skill_zhangji_A:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(player.countMark('skill_zhangji_A_count')>=player.hp) return false; + return event.target!=player&&event.target.countCards('h')&&player.isPhaseUsing(); }, - check: function (event, player) { - return get.attitude(player, event.target) < 0; + check:function(event,player){ + return get.attitude(player,event.target)<0; }, - logTarget: 'target', - content: function () { + logTarget:'target', + content:function(){ 'step 0' - player.addTempSkill('skill_zhangji_A_count', 'phaseUseAfter'); - player.addMark('skill_zhangji_A_count', 1, false); + player.addTempSkill('skill_zhangji_A_count','phaseUseAfter'); + player.addMark('skill_zhangji_A_count',1,false); player.viewHandcards(trigger.target); - var list = [], choiceList = [ - '弃置' + get.translation(trigger.target) + '的一张牌,然后若弃置的牌的是能造成火焰伤害的牌,你摸一张牌', - '重铸' + get.translation(trigger.target) + '手牌中的所有【杀】和【决斗】', - '你与' + get.translation(trigger.target) + '互相对对方造成1点伤害', + var list=[],choiceList=[ + '弃置'+get.translation(trigger.target)+'的一张牌,然后若弃置的牌的是能造成火焰伤害的牌,你摸一张牌', + '重铸'+get.translation(trigger.target)+'手牌中的所有【杀】和【决斗】', + '你与'+get.translation(trigger.target)+'互相对对方造成1点伤害', ]; list.push('选项一'); - if (trigger.target.countCards('h', { name: ['sha', 'juedou'] })) list.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - if (!trigger.target.countCards('h', { name: 'shan' })) list.push('选项三'); - else choiceList[2] = '' + choiceList[2] + ''; - player.chooseControl(list).set('prompt', get.prompt('tspowei', target)).set('choiceList', choiceList).set('ai', function () { - var player = _status.event.player, target = _status.event.target; - if (list.includes('选项三') && player.hp + player.countCards('hs', { name: 'tao' }) > 2) return '选项三'; - if (list.includes('选项二') && target.countCards('h', { name: ['sha', 'juedou'] }) > 1) return '选项二'; + if(trigger.target.countCards('h',{name:['sha','juedou']})) list.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(!trigger.target.countCards('h',{name:'shan'})) list.push('选项三'); + else choiceList[2]=''+choiceList[2]+''; + player.chooseControl(list).set('prompt',get.prompt('tspowei',target)).set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,target=_status.event.target; + if(list.includes('选项三')&&player.hp+player.countCards('hs',{name:'tao'})>2) return '选项三'; + if(list.includes('选项二')&&target.countCards('h',{name:['sha','juedou']})>1) return'选项二'; return '选项一'; - }).set('target', trigger.target); + }).set('target',trigger.target); 'step 1' - game.log(player, '选择了', '#y' + result.control); - switch (result.control) { + game.log(player,'选择了','#y'+result.control); + switch(result.control){ case '选项一': - player.discardPlayerCard('he', trigger.target, 'visible', true); + player.discardPlayerCard('he',trigger.target,'visible',true); break; case '选项二': - var cards = trigger.target.getCards('h', { name: ['sha', 'juedou'] }).filter(card => trigger.target.canRecast(card)); + var cards=trigger.target.getCards('h',{name:['sha','juedou']}).filter(card=>trigger.target.canRecast(card)); trigger.target.recast(cards); event.finish(); break; @@ -1799,150 +1800,150 @@ game.import('character', function (lib, game, ui, get, ai, _status) { break; } 'step 2' - if (result.bool && get.tag(result.cards[0], 'fireDamage')) player.draw(); + if(result.bool&&get.tag(result.cards[0],'fireDamage')) player.draw(); }, - subSkill: { - count: { - charlotte: true, - onremove: true, + subSkill:{ + count:{ + charlotte:true, + onremove:true, }, }, }, - skill_zhangji_B: { - getNum: function (name) { - var num = 0; - if (name == 'litong') num = 1; - else switch (game.getRarity(name)) { - case 'junk': num = 1; break; - case 'rare': num = 2; break; - case 'epic': num = 3; break; - case 'legend': num = 4; break; + skill_zhangji_B:{ + getNum:function(name){ + var num=0; + if(name=='litong') num=1; + else switch(game.getRarity(name)){ + case 'junk':num=1;break; + case 'rare':num=2;break; + case 'epic':num=3;break; + case 'legend':num=4;break; } return num; }, - getCharacter: function (list) { - var listx = [], num = 0; - for (var name of list) { - var numx = lib.skill.skill_zhangji_B.getNum(name); - if (numx > num) { - num = numx; - listx = [name]; + getCharacter:function(list){ + var listx=[],num=0; + for(var name of list){ + var numx=lib.skill.skill_zhangji_B.getNum(name); + if(numx>num){ + num=numx; + listx=[name]; } - else if (numx == num) listx.push(name); + else if(numx==num) listx.push(name); } return listx; }, - group: 'skill_zhangji_B_jieming', - audio: 2, - trigger: { player: 'dying' }, - skillAnimation: true, - animationColor: 'water', - direct: true, - content: function () { + group:'skill_zhangji_B_jieming', + audio:2, + trigger:{player:'dying'}, + skillAnimation:true, + animationColor:'water', + direct:true, + content:function(){ 'step 0' - if (!_status.characterlist) lib.skill.pingjian.initList(); - player.chooseTarget(get.prompt('skill_zhangji_B'), '令一名其他角色选择是否更换武将牌', lib.filter.notMe).set('ai', function (target) { - var att = get.attitude(_status.event.player, target); - var num = lib.skill.skill_zhangji_B.getNum(target.name); - if (target.name2 != undefined) num = Math.min(num, lib.skill.skill_zhangji_B.getNum(target.name2)); - return att * (4 - num); + if(!_status.characterlist) lib.skill.pingjian.initList(); + player.chooseTarget(get.prompt('skill_zhangji_B'),'令一名其他角色选择是否更换武将牌',lib.filter.notMe).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + var num=lib.skill.skill_zhangji_B.getNum(target.name); + if(target.name2!=undefined) num=Math.min(num,lib.skill.skill_zhangji_B.getNum(target.name2)); + return att*(4-num); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('skill_zhangji_B', target); - var list = []; - for (var i = 0; i < _status.characterlist.length; i++) { - if (lib.character[_status.characterlist[i]][1] == 'wei') list.push(_status.characterlist[i]); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('skill_zhangji_B',target); + var list=[]; + for(var i=0;i<_status.characterlist.length;i++){ + if(lib.character[_status.characterlist[i]][1]=='wei') list.push(_status.characterlist[i]); } - list = list.randomGets(5); - var bolDialog = ['请选择替换的武将', [list, 'character']]; - target.chooseButton(bolDialog).set('ai', function (button) { - var target = _status.event.player; - var num = lib.skill.skill_zhangji_B.getNum(target.name); - if (target.name2 != undefined) num = Math.min(num, lib.skill.skill_zhangji_B.getNum(target.name2)); - return lib.skill.skill_zhangji_B.getNum(button.link) - num; + list=list.randomGets(5); + var bolDialog=['请选择替换的武将',[list,'character']]; + target.chooseButton(bolDialog).set('ai',function(button){ + var target=_status.event.player; + var num=lib.skill.skill_zhangji_B.getNum(target.name); + if(target.name2!=undefined) num=Math.min(num,lib.skill.skill_zhangji_B.getNum(target.name2)); + return lib.skill.skill_zhangji_B.getNum(button.link)-num; }); } else event.finish(); 'step 2' - if (result.bool) { - event.character = result.links[0]; - if (target.name2 != undefined) target.chooseControl(target.name1, target.name2).set('prompt', '请选择要更换的武将牌').set('ai', function () { - return lib.skill.skill_zhangji_B.getNum(target.name) < lib.skill.skill_zhangji_B.getNum(target.name2) ? target.name : target.name2; + if(result.bool){ + event.character=result.links[0]; + if(target.name2!=undefined) target.chooseControl(target.name1,target.name2).set('prompt','请选择要更换的武将牌').set('ai',function(){ + return lib.skill.skill_zhangji_B.getNum(target.name) 2) return Math.min(5, target.maxHp) - target.countCards('h'); - return att / 3; + player.chooseTarget(get.prompt('skill_zhangji_B'),'令一名手牌数小于其体力上限的角色摸三张牌,然后其将手牌数调整至其体力上限值',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 target = result.targets[0]; - event.target = target; - player.logSkill('skill_zhangji_B_jieming', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('skill_zhangji_B_jieming',target); target.draw(3); } else event.finish(); 'step 3' - if (target.countCards('h') > target.maxHp) target.chooseToDiscard('h', target.countCards('h') - target.maxHp, true); - if (event.count > 0 && game.hasPlayer(function (current) { - return current.countCards('h') < current.maxHp; - }) && player.hasSkill('skill_zhangji_B')) event.goto(1); + if(target.countCards('h')>target.maxHp) target.chooseToDiscard('h',target.countCards('h')-target.maxHp,true); + if(event.count>0&&game.hasPlayer(function(current){ + return current.countCards('h') 1) { - if (player.hasSkillTag('jueqing', false, target)) return [1, -2]; - var max = 0; - var players = game.filterPlayer(); - for (var i = 0; i < players.length; i++) { - if (get.attitude(target, players[i]) > 0) { - max = Math.max(Math.min(5, players[i].hp) - players[i].countCards('h'), max); + 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]; + 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]; + if((card.name=='tao'||card.name=='caoyao')&& + target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; } }, }, @@ -1950,192 +1951,192 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //费祎 - yanru: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - if (!player.countCards('h')) return false; - var num = player.countCards('h') % 2; - return !player.hasSkill('yanru_' + num); + yanru:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + if(!player.countCards('h')) return false; + var num=player.countCards('h')%2; + return !player.hasSkill('yanru_'+num); }, - filterCard: function (card, player) { - if (player.countCards('h') && player.countCards('h') % 2 == 0) return lib.filter.cardDiscardable(card, player); + filterCard:function(card,player){ + if(player.countCards('h')&&player.countCards('h')%2==0) return lib.filter.cardDiscardable(card,player); return false; }, - selectCard: function () { - var player = _status.event.player; - if (player.countCards('h') && player.countCards('h') % 2 == 0) return [player.countCards('h') / 2, Infinity]; + selectCard:function(){ + var player=_status.event.player; + if(player.countCards('h')&&player.countCards('h')%2==0) return [player.countCards('h')/2,Infinity]; return -1; }, - prompt: function () { - var player = _status.event.player; + prompt:function(){ + var player=_status.event.player; return [ - (player.countCards('h') ? '弃置至少一半的手牌,然后' : '') + '摸三张牌', + (player.countCards('h')?'弃置至少一半的手牌,然后':'')+'摸三张牌', '摸三张牌,然后弃置至少一半的手牌', - ][player.countCards('h') % 2]; + ][player.countCards('h')%2]; }, - check: function (card) { - var player = _status.event.player; - if (player.hasSkill('hezhong')) { - if (player.countCards('h') - ui.selected.cards.length > 1) return 1 / (get.value(card) || 0.5); + check:function(card){ + var player=_status.event.player; + if(player.hasSkill('hezhong')){ + if(player.countCards('h')-ui.selected.cards.length>1) return 1/(get.value(card)||0.5); return 0; } - if (ui.selected.cards.length < player.countCards('h') / 2) return 5 - get.value(card); + if(ui.selected.cards.length { - var player = _status.event.player; - if (player.hasSkill('hezhong') && player.countCards('h') - ui.selected.cards.length > 1) return 1 / (get.value(card) || 0.5); - if (!player.hasSkill('hezhong') && ui.selected.cards.length < Math.floor(player.countCards('h') / 2)) return 1 / (get.value(card) || 0.5); + player.chooseToDiscard('h','宴如:弃置至少一半手牌',[Math.floor(player.countCards('h')/2),Infinity],true).set('ai',card=>{ + var player=_status.event.player; + if(player.hasSkill('hezhong')&&player.countCards('h')-ui.selected.cards.length>1) return 1/(get.value(card)||0.5); + if(!player.hasSkill('hezhong')&&ui.selected.cards.length { - var player = _status.event.player; - var num = _status.event.player; - if (player.getCards('h').reduce(function (num, card) { - return num + (get.number(card, player) || 0); - }, 0) > num * 2) return 0; + if(player.hasSkill('hezhong_0')) event._result={index:1}; + else if(player.hasSkill('hezhong_1')) event._result={index:0}; + else{ + player.chooseControl().set('choiceList',[ + '本回合使用点数大于'+num+'的普通锦囊牌额外结算一次', + '本回合使用点数小于'+num+'的普通锦囊牌额外结算一次', + ]).set('ai',()=>{ + var player=_status.event.player; + var num=_status.event.player; + if(player.getCards('h').reduce(function(num,card){ + return num+(get.number(card,player)||0); + },0)>num*2) return 0; return 1; - }).set('num', num); + }).set('num',num); } 'step 3' - var skill = 'hezhong_' + result.index; + var skill='hezhong_'+result.index; player.addTempSkill(skill); - player.markAuto(skill, [num]); + player.markAuto(skill,[num]); }, - subSkill: { - '0': { - charlotte: true, - onremove: true, - marktext: '>', - intro: { - markcount: (list) => { - var list2 = [1, 11, 12, 13]; - return list.reduce((str, num) => { - if (list2.includes(num)) return str + ['A', 'J', 'Q', 'K'][list2.indexOf(num)]; - return str + parseFloat(num); - }, ''); + subSkill:{ + '0':{ + charlotte:true, + onremove:true, + marktext:'>', + intro:{ + markcount:(list)=>{ + var list2=[1,11,12,13]; + return list.reduce((str,num)=>{ + if(list2.includes(num)) return str+['A','J','Q','K'][list2.indexOf(num)]; + return str+parseFloat(num); + },''); }, - content: '使用的下一张点数大于$的普通锦囊牌额外结算一次', + content:'使用的下一张点数大于$的普通锦囊牌额外结算一次', }, - audio: 'hezhong', - trigger: { player: 'useCard' }, - filter: function (event, player) { - if (get.type(event.card) != 'trick') return false; - if (!event.targets.length) return false; - var num = get.number(event.card, player); - return typeof num == 'number' && player.getStorage('hezhong_0').some(numx => num > numx); + audio:'hezhong', + trigger:{player:'useCard'}, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(!event.targets.length) return false; + var num=get.number(event.card,player); + return typeof num=='number'&&player.getStorage('hezhong_0').some(numx=>num>numx); }, - forced: true, - usable: 1, - content: function () { + forced:true, + usable:1, + content:function(){ player.unmarkSkill('hezhong_0'); trigger.effectCount++; - game.log(trigger.card, '额外结算一次'); + game.log(trigger.card,'额外结算一次'); }, - ai: { - effect: { - player: function (card, player, target) { - if (card.name == 'tiesuo' && (!player.storage.counttrigger || !player.storage.counttrigger.hezhong_0)) return 'zerotarget'; + ai:{ + effect:{ + player:function(card,player,target){ + if(card.name=='tiesuo'&&(!player.storage.counttrigger||!player.storage.counttrigger.hezhong_0)) return 'zerotarget'; }, }, }, }, - '1': { - charlotte: true, - onremove: true, - marktext: '<', - intro: { - markcount: (list) => { - var list2 = [1, 11, 12, 13]; - return list.reduce((str, num) => { - if (list2.includes(num)) return str + ['A', 'J', 'Q', 'K'][list2.indexOf(num)]; - return str + parseFloat(num); - }, ''); + '1':{ + charlotte:true, + onremove:true, + marktext:'<', + intro:{ + markcount:(list)=>{ + var list2=[1,11,12,13]; + return list.reduce((str,num)=>{ + if(list2.includes(num)) return str+['A','J','Q','K'][list2.indexOf(num)]; + return str+parseFloat(num); + },''); }, - content: '使用的下一张点数小于$的普通锦囊牌额外结算一次', + content:'使用的下一张点数小于$的普通锦囊牌额外结算一次', }, - audio: 'hezhong', - trigger: { player: 'useCard' }, - filter: function (event, player) { - if (get.type(event.card) != 'trick') return false; - if (!event.targets.length) return false; - var num = get.number(event.card, player); - return typeof num == 'number' && player.getStorage('hezhong_1').some(numx => num < numx); + audio:'hezhong', + trigger:{player:'useCard'}, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(!event.targets.length) return false; + var num=get.number(event.card,player); + return typeof num=='number'&&player.getStorage('hezhong_1').some(numx=>num将任意“缚豕”牌置入弃牌堆并摸等量的牌,视为使用一张【杀】并执行等量项', player.getExpansions('olfushi'), - [['额外目标', '伤害-1', '伤害+1'], 'tdnodes'], + [['额外目标','伤害-1','伤害+1'],'tdnodes'], 'hidden' ); }, - filter: function (button) { - const cards = ui.selected.buttons.filter(button => typeof button.link == 'object'); - if (cards.length >= 3 && typeof button.link == 'string') return false; + filter:function(button){ + const cards=ui.selected.buttons.filter(button=>typeof button.link=='object'); + if(cards.length>=3&&typeof button.link=='string') return false; return true; }, - select: [2, Infinity], - filterOk: () => { - if (!ui.selected.buttons.length) return false; - const controls = ui.selected.buttons.filter(button => typeof button.link == 'string'); - const cards = ui.selected.buttons.filter(button => typeof button.link == 'object'); - if (cards.length >= 3) { - const dialog = get.event().dialog; - if (dialog && dialog.buttons) { - dialog.buttons.forEach(button => { - if (typeof button.link != 'string') return; + select:[2,Infinity], + filterOk:()=>{ + if(!ui.selected.buttons.length) return false; + const controls=ui.selected.buttons.filter(button=>typeof button.link=='string'); + const cards=ui.selected.buttons.filter(button=>typeof button.link=='object'); + if(cards.length>=3){ + const dialog=get.event().dialog; + if(dialog&&dialog.buttons){ + dialog.buttons.forEach(button=>{ + if(typeof button.link!='string') return; button.classList.remove('selectable'); button.classList.remove('selected'); ui.selected.buttons.remove(button); @@ -2202,270 +2203,270 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } return true; } - return cards.length == controls.length; + return cards.length==controls.length; }, - check: function (button) { - const player = get.player(); - const card = new lib.element.VCard({ name: 'sha', isCard: true }); - const targets = game.filterPlayer(target => { - return player.canUse(card, target); + check:function(button){ + const player=get.player(); + const card=new lib.element.VCard({name:'sha',isCard:true}); + const targets=game.filterPlayer(target=>{ + return player.canUse(card,target); }); - const num0 = targets.filter(target => get.effect(target, card, player, player) > 0).length; - if (num0 <= 0) return 0; - const num1 = Math.max(0, num0 - 1); - const num2 = targets.length - num1; - const num3 = player.getExpansions('olfushi').length; + const num0=targets.filter(target=>get.effect(target,card,player,player)>0).length; + if(num0<=0) return 0; + const num1=Math.max(0,num0-1); + const num2=targets.length-num1; + const num3=player.getExpansions('olfushi').length; let list; - if ((num1 > 0 && num2 > 0) || (num1 == 0 && num2 == 0)) { - switch (num3) { + if((num1>0&&num2>0)||(num1==0&&num2==0)){ + switch(num3){ case 1: - list = [['额外目标', '伤害+1'].randomGet()]; + list=[['额外目标','伤害+1'].randomGet()]; break; case 2: - list = [['额外目标', '伤害+1'].randomGet(), '伤害-1']; + list=[['额外目标','伤害+1'].randomGet(),'伤害-1']; break; default: - list = ['额外目标', '伤害-1', '伤害+1']; + list=['额外目标','伤害-1','伤害+1']; break; } } - else if (num2 == 0) { - switch (num3) { + else if(num2==0){ + switch(num3){ case 1: - list = ['伤害+1']; + list=['伤害+1']; break; case 2: - list = ['额外目标', '伤害+1']; + list=['额外目标','伤害+1']; break; default: - list = ['额外目标', '伤害-1', '伤害+1']; + list=['额外目标','伤害-1','伤害+1']; break; } } - else if (num1 == 0) { - switch (num3) { + else if(num1==0){ + switch(num3){ case 1: - list = ['伤害+1']; + list=['伤害+1']; break; default: - list = ['伤害-1', '伤害+1']; + list=['伤害-1','伤害+1']; break; } } - if (typeof button.link == 'string') { - if (list.includes(button.link)) return 114514; + if(typeof button.link=='string'){ + if(list.includes(button.link)) return 114514; return -1; } - else { - const cards = ui.selected.buttons.filter(button => typeof button.link == 'object'); - if (list.length == 3 && (player.getHp() <= 2 || cards.length < num3 - 1) || cards.length < list.length) return 1 / (get.value(button.link) || 0.5); + else{ + const cards=ui.selected.buttons.filter(button=>typeof button.link=='object'); + if(list.length==3&&(player.getHp()<=2||cards.length typeof button == 'object'); - var controls = links.filter(button => typeof button == 'string'); - if (!controls.length) controls = ['额外目标', '伤害-1', '伤害+1']; + backup:function(links,player){ + var cards=links.filter(button=>typeof button=='object'); + var controls=links.filter(button=>typeof button=='string'); + if(!controls.length) controls=['额外目标','伤害-1','伤害+1']; return { - audio: 'olfushi', - selectCard: -1, - position: 'x', - cards: cards, - controls: controls, - filterCard: function (card) { + audio:'olfushi', + selectCard:-1, + position:'x', + cards:cards, + controls:controls, + filterCard:function(card){ return lib.skill.olfushi_wusheng_backup.cards.includes(card); }, - viewAs: { - name: 'sha', - isCard: true, + viewAs:{ + name:'sha', + isCard:true, }, - precontent: function () { - var cards = lib.skill.olfushi_wusheng_backup.cards.slice(); - var controls = lib.skill.olfushi_wusheng_backup.controls.slice(); + precontent:function(){ + var cards=lib.skill.olfushi_wusheng_backup.cards.slice(); + var controls=lib.skill.olfushi_wusheng_backup.controls.slice(); player.logSkill('olfushi'); delete event.result.skill; - event.result.card = new lib.element.VCard(lib.skill.olfushi_wusheng_backup.viewAs); - event.result.cards = []; + event.result.card=new lib.element.VCard(lib.skill.olfushi_wusheng_backup.viewAs); + event.result.cards=[]; player.loseToDiscardpile(cards); player.draw(cards.length); - event.result.card.storage.olfushi_buff = controls; + event.result.card.storage.olfushi_buff=controls; player.addTempSkill('olfushi_buff'); } } }, - prompt: function (links, player) { - let controls = links.filter(button => typeof button == 'string'); - if (!controls.length) controls = ['额外目标', '伤害-1', '伤害+1']; + prompt:function(links,player){ + let controls=links.filter(button=>typeof button=='string'); + if(!controls.length) controls=['额外目标','伤害-1','伤害+1']; return `请选择【杀】的目标(${controls.join('、')})`; } }, - ai: { - order: function (item, player) { - return get.order({ name: 'sha' }) + 0.1; + ai:{ + order:function(item,player){ + return get.order({name:'sha'})+0.1; }, - result: { player: 1 }, - respondSha: true, - skillTagFilter: function (player, tag, arg) { - if (arg == 'respond') return false; - if (!player.getExpansions('olfushi').length) return false; + result:{player:1}, + respondSha:true, + skillTagFilter:function(player,tag,arg){ + if(arg=='respond') return false; + if(!player.getExpansions('olfushi').length) return false; }, }, }, - buff: { - charlotte: true, - trigger: { player: ['useCard2', 'useCardToPlayered'] }, - filter: function (event, player, name) { - if (!event.card.storage || !event.card.storage.olfushi_buff) return false; - if (name == 'useCard2') return true; - return event.getParent().triggeredTargets3.length == event.targets.length && event.card.storage.olfushi_buff.length > 1 && event.card.storage.olfushi_buff.includes('伤害-1') && !event.targets.some(target => !event.targets.includes(target.getPrevious()) && !event.targets.includes(target.getNext())); + buff:{ + charlotte:true, + trigger:{player:['useCard2','useCardToPlayered']}, + filter:function(event,player,name){ + if(!event.card.storage||!event.card.storage.olfushi_buff) return false; + if(name=='useCard2') return true; + return event.getParent().triggeredTargets3.length==event.targets.length&&event.card.storage.olfushi_buff.length>1&&event.card.storage.olfushi_buff.includes('伤害-1')&&!event.targets.some(target=>!event.targets.includes(target.getPrevious())&&!event.targets.includes(target.getNext())); }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ 'step 0' - if (event.triggername == 'useCardToPlayered') { - if (trigger.getParent().addCount !== false) { - trigger.getParent().addCount = false; - if (player.stat[player.stat.length - 1].card.sha > 0) { - player.stat[player.stat.length - 1].card.sha--; + if(event.triggername=='useCardToPlayered'){ + if(trigger.getParent().addCount!==false){ + trigger.getParent().addCount=false; + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; } } - game.log(trigger.card, '不计入次数'); + game.log(trigger.card,'不计入次数'); event.finish(); return; } - var list = trigger.card.storage.olfushi_buff; - event.list = list; - var canBeAddedTargets = game.filterPlayer(target => { - return !trigger.targets.includes(target) && player.canUse(trigger.card, target); + var list=trigger.card.storage.olfushi_buff; + event.list=list; + var canBeAddedTargets=game.filterPlayer(target=>{ + return !trigger.targets.includes(target)&&player.canUse(trigger.card,target); }); - if (!list.includes('额外目标') || !canBeAddedTargets.length) event._result = { bool: false }; - else if (canBeAddedTargets.length == 1) event._result = { bool: true, targets: canBeAddedTargets }; - else player.chooseTarget('请选择' + get.translation(trigger.card) + '的额外目标', function (card, player, target) { - var trigger = _status.event.getTrigger(); - return !trigger.targets.includes(target) && player.canUse(trigger.card, target); - }, true).set('ai', function (target) { - var player = _status.event.player; - return get.attitude(player, target); + if(!list.includes('额外目标')||!canBeAddedTargets.length) event._result={bool:false}; + else if(canBeAddedTargets.length==1) event._result={bool:true,targets:canBeAddedTargets}; + else player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',function(card,player,target){ + var trigger=_status.event.getTrigger(); + return !trigger.targets.includes(target)&&player.canUse(trigger.card,target); + },true).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target); }); 'step 1' - if (result.bool) { - var targets = result.targets.sortBySeat(); + if(result.bool){ + var targets=result.targets.sortBySeat(); player.line(targets); trigger.targets.addArray(targets); - game.log(targets, '成为了', trigger.card, '的额外目标'); + game.log(targets,'成为了',trigger.card,'的额外目标'); } 'step 2' - if (!event.list.includes('伤害-1')) event._result = { bool: false }; - else if (trigger.targets.length == 1) event._result = { bool: true, targets: trigger.targets.slice() }; - else player.chooseTarget('请选择' + get.translation(trigger.card) + '伤害-1的目标', function (card, player, target) { - var trigger = _status.event.getTrigger(); + if(!event.list.includes('伤害-1')) event._result={bool:false}; + else if(trigger.targets.length==1) event._result={bool:true,targets:trigger.targets.slice()}; + else player.chooseTarget('请选择'+get.translation(trigger.card)+'伤害-1的目标',function(card,player,target){ + var trigger=_status.event.getTrigger(); return trigger.targets.includes(target); - }, true).set('ai', function (target) { - var player = _status.event.player; - return get.attitude(player, target); + },true).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target); }); 'step 3' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - game.log(trigger.card, '对', target, '的伤害-1'); + game.log(trigger.card,'对',target,'的伤害-1'); player.addTempSkill('olfushi_buff2'); - player.initStorage('olfushi_buff2', []); - player.getStorage('olfushi_buff2').push([target, trigger.card]); + player.initStorage('olfushi_buff2',[]); + player.getStorage('olfushi_buff2').push([target,trigger.card]); } 'step 4' - if (!event.list.includes('伤害+1')) event.finish(); - else if (trigger.targets.length == 1) event._result = { bool: true, targets: trigger.targets.slice() }; - else player.chooseTarget('请选择' + get.translation(trigger.card) + '伤害+1的目标', function (card, player, target) { - var trigger = _status.event.getTrigger(); + if(!event.list.includes('伤害+1')) event.finish(); + else if(trigger.targets.length==1) event._result={bool:true,targets:trigger.targets.slice()}; + else player.chooseTarget('请选择'+get.translation(trigger.card)+'伤害+1的目标',function(card,player,target){ + var trigger=_status.event.getTrigger(); return trigger.targets.includes(target); - }, true).set('ai', function (target) { - var player = _status.event.player; - return get.damageEffect(target, player, player); + },true).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); }); 'step 5' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - game.log(trigger.card, '对', target, '的伤害+1'); + game.log(trigger.card,'对',target,'的伤害+1'); player.addTempSkill('olfushi_buff3'); - player.initStorage('olfushi_buff3', []); - player.getStorage('olfushi_buff3').push([target, trigger.card]); + player.initStorage('olfushi_buff3',[]); + player.getStorage('olfushi_buff3').push([target,trigger.card]); } }, }, - buff2: { - charlotte: true, - onremove: true, - trigger: { source: 'damageBegin2' }, - filter: function (event, player) { - return event.card && player.getStorage('olfushi_buff2').some(info => info[0] == event.player && info[1] == event.card); + buff2:{ + charlotte:true, + onremove:true, + trigger:{source:'damageBegin2'}, + filter:function(event,player){ + return event.card&&player.getStorage('olfushi_buff2').some(info=>info[0]==event.player&&info[1]==event.card); }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ trigger.num--; }, - ai: { - effect: { - target: function (card, player, target) { - if (player.hasSkillTag('jueqing', false, target)) return; - if (!card || !player.getStorage('olfushi_buff2').includes(card)) return; - var num = get.tag(card, 'damage'); - if (num) { - if (num > 1) return 0.5; + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return; + if(!card||!player.getStorage('olfushi_buff2').includes(card)) return; + var num=get.tag(card,'damage'); + if(num){ + if(num>1) return 0.5; return 0; } }, }, }, }, - buff3: { - charlotte: true, - onremove: true, - trigger: { source: 'damageBegin1' }, - filter: function (event, player) { - return event.card && player.getStorage('olfushi_buff3').some(info => info[0] == event.player && info[1] == event.card); + buff3:{ + charlotte:true, + onremove:true, + trigger:{source:'damageBegin1'}, + filter:function(event,player){ + return event.card&&player.getStorage('olfushi_buff3').some(info=>info[0]==event.player&&info[1]==event.card); }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ trigger.num++; }, }, - wusheng_backup: {}, + wusheng_backup:{}, }, }, - oldongdao: { - mode: ['doudizhu'], - zhuanhuanji: true, - mark: true, - marktext: '☯', - intro: { - content: function (storage) { - if (storage) return '农民的回合结束时,其可以进行一个额外回合'; + oldongdao:{ + mode:['doudizhu'], + zhuanhuanji:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage){ + if(storage) return '农民的回合结束时,其可以进行一个额外回合'; return '农民的回合结束时,你可以令地主进行一个额外回合'; }, }, - audio: 2, - trigger: { global: 'phaseEnd' }, - filter: function (event, player) { - return event.player.identity == 'fan'; + audio:2, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return event.player.identity=='fan'; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var target = (player.storage.oldongdao ? trigger.player : game.zhu); - event.target = target; - var target2 = (player.storage.oldongdao ? trigger.player : player); - event.target2 = target2; - target2.chooseBool(get.prompt('oldongdao'), '令' + get.translation(target) + '进行一个额外回合').set('ai', () => { - var event = _status.event.getParent(); - return get.attitude(event.target2, event.target) > 0; + var target=(player.storage.oldongdao?trigger.player:game.zhu); + event.target=target; + var target2=(player.storage.oldongdao?trigger.player:player); + event.target2=target2; + target2.chooseBool(get.prompt('oldongdao'),'令'+get.translation(target)+'进行一个额外回合').set('ai',()=>{ + var event=_status.event.getParent(); + return get.attitude(event.target2,event.target)>0; }) 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('oldongdao'); event.target2.line(target); player.changeZhuanhuanji('oldongdao'); @@ -2474,1293 +2475,1293 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //OL陆郁生 - olcangxin: { - audio: 2, - trigger: { player: 'damageBegin4' }, - checkx: function (event, player) { - var target = event.source; - return get.damageEffect(player, target, target) <= 0; + olcangxin:{ + audio:2, + trigger:{player:'damageBegin4'}, + checkx:function(event,player){ + var target=event.source; + return get.damageEffect(player,target,target)<=0; }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - var cards = get.bottomCards(3, true); - player.chooseButton(['###藏心:请选择要弃置的牌###若以此法弃置了红桃牌,则防止此伤害', cards], [1, cards.length], true).set('ai', function (button) { - if (!_status.event.bool && get.suit(button.link, false) == 'heart') return 0; - if (get.suit(button.link, false) != 'heart') return 1; - if (!ui.selected.buttons.some(but => get.suit(but.link, false) == 'heart')) return 1; + var cards=get.bottomCards(3,true); + player.chooseButton(['###藏心:请选择要弃置的牌###若以此法弃置了红桃牌,则防止此伤害',cards],[1,cards.length],true).set('ai',function(button){ + if(!_status.event.bool&&get.suit(button.link,false)=='heart') return 0; + if(get.suit(button.link,false)!='heart') return 1; + if(!ui.selected.buttons.some(but=>get.suit(but.link,false)=='heart')) return 1; return 0; - }).set('bool', lib.skill.olcangxin.checkx(trigger, player)); + }).set('bool',lib.skill.olcangxin.checkx(trigger,player)); 'step 1' - if (result.bool) { - player.$throw(result.links, 1000); + if(result.bool){ + player.$throw(result.links,1000); game.cardsDiscard(result.links); - if (result.links.some(card => get.suit(card, false) == 'heart')) trigger.cancel(); + if(result.links.some(card=>get.suit(card,false)=='heart')) trigger.cancel(); } else event.finish(); 'step 2' game.delayx(); }, - group: 'olcangxin_yingzi', - subSkill: { - yingzi: { - audio: 'olcangxin', - trigger: { player: 'phaseDrawBegin' }, - forced: true, - content: function () { - var cards = get.bottomCards(3, true); - player.showCards(cards, get.translation(player) + '发动了【藏心】'); - var num = cards.filter(card => get.suit(card, false) == 'heart').length; - if (num) player.draw(num); + group:'olcangxin_yingzi', + subSkill:{ + yingzi:{ + audio:'olcangxin', + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + var cards=get.bottomCards(3,true); + player.showCards(cards,get.translation(player)+'发动了【藏心】'); + var num=cards.filter(card=>get.suit(card,false)=='heart').length; + if(num) player.draw(num); }, }, }, }, - olrunwei: { - audio: 2, - trigger: { global: 'phaseDiscardBegin' }, - filter: function (event, player) { - if (event.player == player) return false; + olrunwei:{ + audio:2, + trigger:{global:'phaseDiscardBegin'}, + filter:function(event,player){ + if(event.player==player) return false; return event.player.isDamaged(); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var str = get.translation(trigger.player); - player.chooseControl('弃牌,+1', '摸牌,-1', 'cancel2').set('choiceList', [ - '令' + str + '弃置一张牌,且其本回合手牌上限+1', - '令' + str + '摸一张牌,且其本回合手牌上限-1', - ]).set('ai', function () { - var player = _status.event.player; - var trigger = _status.event.getTrigger(); - var target = trigger.player; - var num1 = target.countCards('h'), num2 = target.getHandcardLimit(); - switch (get.sgn(get.attitude(player, target))) { + var str=get.translation(trigger.player); + player.chooseControl('弃牌,+1','摸牌,-1','cancel2').set('choiceList',[ + '令'+str+'弃置一张牌,且其本回合手牌上限+1', + '令'+str+'摸一张牌,且其本回合手牌上限-1', + ]).set('ai',function(){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + var target=trigger.player; + var num1=target.countCards('h'),num2=target.getHandcardLimit(); + switch(get.sgn(get.attitude(player,target))){ case 0: return 2; case 1: - if (num1 - 1 >= num2) return 0; - if (num1 + 1 <= num2) return 1; + if(num1-1>=num2) return 0; + if(num1+1<=num2) return 1; return 2; case -1: - if (num1 - 2 <= num2) return 0; - if (num1 + 3 >= num2) return 1; + if(num1-2<=num2) return 0; + if(num1+3>=num2) return 1; return 2; } - }).set('prompt', get.prompt('olrunwei', trigger.player)); + }).set('prompt',get.prompt('olrunwei',trigger.player)); 'step 1' - if (result.index != 2) { - player.logSkill('olrunwei', trigger.player); - if (result.index == 0) { - trigger.player.chooseToDiscard('he', true).set('ai', card => { - if (get.position(card) == 'e') return -get.value(card); - return 1 / (get.value(card) || 0.5); + if(result.index!=2){ + player.logSkill('olrunwei',trigger.player); + if(result.index==0){ + trigger.player.chooseToDiscard('he',true).set('ai',card=>{ + if(get.position(card)=='e') return -get.value(card); + return 1/(get.value(card)||0.5); }); trigger.player.addTempSkill('olrunwei_+'); - trigger.player.addMark('olrunwei_+', 1, false); + trigger.player.addMark('olrunwei_+',1,false); } - if (result.index == 1) { + if(result.index==1){ trigger.player.draw(); trigger.player.addTempSkill('olrunwei_-'); - trigger.player.addMark('olrunwei_-', 1, false); + trigger.player.addMark('olrunwei_-',1,false); } } }, - subSkill: { - '+': { - charlotte: true, - onremove: true, - marktext: '+', - intro: { content: '手牌上限+#' }, - mod: { - maxHandcard: function (player, num) { - return num + player.countMark('olrunwei_+'); + subSkill:{ + '+':{ + charlotte:true, + onremove:true, + marktext:'+', + intro:{content:'手牌上限+#'}, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('olrunwei_+'); }, }, }, - '-': { - charlotte: true, - onremove: true, - marktext: '-', - intro: { content: '手牌上限-#' }, - mod: { - maxHandcard: function (player, num) { - return num - player.countMark('olrunwei_-'); + '-':{ + charlotte:true, + onremove:true, + marktext:'-', + intro:{content:'手牌上限-#'}, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('olrunwei_-'); }, }, }, }, }, //曹羲 - olgangshu: { - audio: 2, - trigger: { - player: 'useCardAfter', + olgangshu:{ + audio:2, + trigger:{ + player:'useCardAfter', }, - filter: function (event, player) { - return get.type2(event.card, false) != 'basic'; + filter:function(event,player){ + return get.type2(event.card,false)!='basic'; }, - getInfo: (player) => { - if (!player.storage.olgangshu_buff) player.storage.olgangshu_buff = [0, 0, 0]; + getInfo:(player)=>{ + if(!player.storage.olgangshu_buff) player.storage.olgangshu_buff=[0,0,0]; return player.storage.olgangshu_buff; }, - direct: true, - group: 'olgangshu_reset', - content: function () { + direct:true, + group:'olgangshu_reset', + content:function(){ 'step 0' - var info = lib.skill.olgangshu.getInfo(player); - player.chooseControl('攻击范围(' + info[0] + ')', '摸牌数(' + info[1] + ')', '使用杀的上限(' + info[2] + ')', 'cancel2').set('prompt', get.prompt('olgangshu')).set('prompt2', '
令以下一个数值+1(每项至多+5):
1.攻击范围;
2.下个摸牌阶段的摸牌数;
3.使用【杀】的次数上限。
').set('ai', () => { + var info=lib.skill.olgangshu.getInfo(player); + player.chooseControl('攻击范围('+info[0]+')','摸牌数('+info[1]+')','使用杀的上限('+info[2]+')','cancel2').set('prompt',get.prompt('olgangshu')).set('prompt2','
令以下一个数值+1(每项至多+5):
1.攻击范围;
2.下个摸牌阶段的摸牌数;
3.使用【杀】的次数上限。
').set('ai',()=>{ return _status.event.choice; - }).set('choice', function () { - var info = lib.skill.olgangshu.getInfo(player); - if (info[1] == 0) return 1; - if (info[2] < 5 && player.hasCard(card => { - return get.name(card) == 'sha' && player.hasValueTarget(card); - }, 'hs') && !player.getCardUsable('sha')) return 2; - if (info[0] < 5 && !game.hasPlayer(current => { - return player.inRange(current) && get.effect(current, { name: 'sha' }, player, player) > 0; + }).set('choice',function(){ + var info=lib.skill.olgangshu.getInfo(player); + if(info[1]==0) return 1; + if(info[2]<5&&player.hasCard(card=>{ + return get.name(card)=='sha'&&player.hasValueTarget(card); + },'hs')&&!player.getCardUsable('sha')) return 2; + if(info[0]<5&&!game.hasPlayer(current=>{ + return player.inRange(current)&&get.effect(current,{name:'sha'},player,player)>0; })) return 0; - var rand = Math.random(); - var list = [0, 1, 2].filter(i => info[i] < 5); - if (!list.length) return 'cancel2'; - if (rand < 0.2 && list.includes(0)) return 0; - if (rand < 0.7 && list.includes(1)) return 1; - if (rand < 1.0 && list.includes(2)) return 2; + var rand=Math.random(); + var list=[0,1,2].filter(i=>info[i]<5); + if(!list.length) return 'cancel2'; + if(rand<0.2&&list.includes(0)) return 0; + if(rand<0.7&&list.includes(1)) return 1; + if(rand<1.0&&list.includes(2)) return 2; return list.randomGet(); }()); 'step 1' - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.logSkill('olgangshu'); player.addSkill('olgangshu_buff'); - var info = lib.skill.olgangshu.getInfo(player); - info[result.index] = Math.min(5, info[result.index] + 1); - game.log(player, '的', result.control.slice(0, result.control.indexOf('(')), '#y+1'); + var info=lib.skill.olgangshu.getInfo(player); + info[result.index]=Math.min(5,info[result.index]+1); + game.log(player,'的',result.control.slice(0,result.control.indexOf('(')),'#y+1'); player.markSkill('olgangshu_buff'); } }, - ai: { - threaten: 3, + ai:{ + threaten:3, }, - subSkill: { - buff: { - trigger: { player: 'phaseDrawBegin2' }, - charlotte: true, - onremove: true, - forced: true, - filter: function (event, player) { - var info = lib.skill.olgangshu.getInfo(player); - if (!info[1]) return false; + subSkill:{ + buff:{ + trigger:{player:'phaseDrawBegin2'}, + charlotte:true, + onremove:true, + forced:true, + filter:function(event,player){ + var info=lib.skill.olgangshu.getInfo(player); + if(!info[1]) return false; return !event.numFixed; }, - content: function () { - var info = lib.skill.olgangshu.getInfo(player); - trigger.num += info[1]; - info[1] = 0; + content:function(){ + var info=lib.skill.olgangshu.getInfo(player); + trigger.num+=info[1]; + info[1]=0; player.markSkill('olgangshu_buff'); }, - mod: { - attackRange: function (player, range) { - var info = lib.skill.olgangshu.getInfo(player); - if (info) return range + info[0]; + mod:{ + attackRange:function(player,range){ + var info=lib.skill.olgangshu.getInfo(player); + if(info) return range+info[0]; }, - cardUsable: function (card, player, num) { - if (card.name != 'sha') return; - var info = lib.skill.olgangshu.getInfo(player); - if (info) return num + info[2]; + cardUsable:function(card,player,num){ + if(card.name!='sha') return; + var info=lib.skill.olgangshu.getInfo(player); + if(info) return num+info[2]; }, }, - mark: true, - intro: { - markcount: function (storage, player) { - var info = lib.skill.olgangshu.getInfo(player); - var str = ''; - info.forEach(num => str += parseFloat(num)); + mark:true, + intro:{ + markcount:function(storage,player){ + var info=lib.skill.olgangshu.getInfo(player); + var str=''; + info.forEach(num=>str+=parseFloat(num)); return str; }, - content: function (storage, player) { - var info = lib.skill.olgangshu.getInfo(player); - var str = ''; - if (info[0] > 0) str += '
  • 攻击范围+' + info[0]; - if (info[1] > 0) str += '
  • 下个摸牌阶段摸牌数+' + info[1]; - if (info[2] > 0) str += '
  • 使用【杀】的次数上限+' + info[2]; + content:function(storage,player){ + var info=lib.skill.olgangshu.getInfo(player); + var str=''; + if(info[0]>0) str+='
  • 攻击范围+'+info[0]; + if(info[1]>0) str+='
  • 下个摸牌阶段摸牌数+'+info[1]; + if(info[2]>0) str+='
  • 使用【杀】的次数上限+'+info[2]; return str; }, }, }, - reset: { - audio: 'olgangshu', - trigger: { - global: ['shaMiss', 'eventNeutralized'], + reset:{ + audio:'olgangshu', + trigger:{ + global:['shaMiss','eventNeutralized'], }, - filter: function (event, player) { - if (event.type != 'card') return false; + filter:function(event,player){ + if(event.type!='card') return false; var responder; - if (event.name == 'sha') { - responder = event.target; + if(event.name=='sha'){ + responder=event.target; } - else { - responder = event._neutralize_event.player; + else{ + responder=event._neutralize_event.player; } - return player == responder; + return player==responder; }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ player.removeSkill('olgangshu_buff'); - game.log(player, '重置了', '#g【刚述】', '的数值'); + game.log(player,'重置了','#g【刚述】','的数值'); } } } }, - oljianxuan: { - audio: 2, - trigger: { - player: 'damageEnd', + oljianxuan:{ + audio:2, + trigger:{ + player:'damageEnd', }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var info = lib.skill.olgangshu.getInfo(player); - var list = []; + var info=lib.skill.olgangshu.getInfo(player); + var list=[]; list.add(player.getAttackRange()); - list.add(2 + info[1]); - list.add(player.getCardUsable('sha', true)); + list.add(2+info[1]); + list.add(player.getCardUsable('sha',true)); list.sort(); - var str = list.join('、').replace(/(.*)、/, '$1或'); - event.list = list; - player.chooseTarget(get.prompt('oljianxuan'), '令一名角色摸一张牌,然后若其手牌数为' + str + ',其重复此流程').set('ai', target => { - var list = _status.event.list; - var player = _status.event.player; - var att = get.attitude(player, target); - if (att <= 0) return 0; - var num = target.countCards('h') + 1; - var value = 1; - while (true) { - if (list.includes(num)) { + var str=list.join('、').replace(/(.*)、/, '$1或'); + event.list=list; + player.chooseTarget(get.prompt('oljianxuan'),'令一名角色摸一张牌,然后若其手牌数为'+str+',其重复此流程').set('ai',target=>{ + var list=_status.event.list; + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<=0) return 0; + var num=target.countCards('h')+1; + var value=1; + while(true){ + if(list.includes(num)){ value++; num++; } else break; } - return value + att / 10; - }).set('list', list); + return value+att/10; + }).set('list',list); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('oljianxuan', target); - if (player != target) player.addExpose(0.15); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('oljianxuan',target); + if(player!=target) player.addExpose(0.15); } else event.finish(); 'step 2' target.draw(); 'step 3' - if (event.list.includes(target.countCards('h'))) event.goto(2); + if(event.list.includes(target.countCards('h'))) event.goto(2); }, - ai: { - combo: 'olgangshu', - maixie: true, + ai:{ + combo:'olgangshu', + maixie:true, }, }, //OL彭羕 - olqifan: { - audio: 2, - enable: 'chooseToUse', - hiddenCard: function (player, name) { - if (name != 'wuxie' && lib.inpile.includes(name) && lib.skill.olqifan.getNum()) return true; + olqifan:{ + audio:2, + enable:'chooseToUse', + hiddenCard:function(player,name){ + if(name!='wuxie'&&lib.inpile.includes(name)&&lib.skill.olqifan.getNum()) return true; }, - getNum: () => game.getGlobalHistory('useCard').reduce((list, evt) => list.add(get.type2(evt.card)), []).length, - filter: function (event, player) { - if (event.responded || event.type == 'wuxie' || event.olqifan || !lib.skill.olqifan.getNum()) return false; - for (var i of lib.inpile) { - if (i != 'wuxie' && event.filterCard({ name: i }, player, event)) return true; + getNum:()=>game.getGlobalHistory('useCard').reduce((list,evt)=>list.add(get.type2(evt.card)),[]).length, + filter:function(event,player){ + if(event.responded||event.type=='wuxie'||event.olqifan||!lib.skill.olqifan.getNum()) return false; + for(var i of lib.inpile){ + if(i!='wuxie'&&event.filterCard({name:i},player,event)) return true; } return false; }, - delay: false, - content: function () { + delay:false, + content:function(){ 'step 0' - var evt = event.getParent(2); - evt.set('olqifan', true); - var cards = get.bottomCards(lib.skill.olqifan.getNum(), true); - var aozhan = player.hasSkill('aozhan'); - player.chooseButton(['嚣翻:选择要使用的牌', cards]).set('filterButton', function (button) { + var evt=event.getParent(2); + evt.set('olqifan',true); + var cards=get.bottomCards(lib.skill.olqifan.getNum(),true); + var aozhan=player.hasSkill('aozhan'); + player.chooseButton(['嚣翻:选择要使用的牌',cards]).set('filterButton',function(button){ return _status.event.cards.includes(button.link); - }).set('cards', cards.filter(function (card) { - if (aozhan && card.name == 'tao') { + }).set('cards',cards.filter(function(card){ + if(aozhan&&card.name=='tao'){ return evt.filterCard({ - name: 'sha', isCard: true, cards: [card], - }, evt.player, evt) || evt.filterCard({ - name: 'shan', isCard: true, cards: [card], - }, evt.player, evt); + name:'sha',isCard:true,cards:[card], + },evt.player,evt)||evt.filterCard({ + name:'shan',isCard:true,cards:[card], + },evt.player,evt); } - return evt.filterCard(card, evt.player, evt); - })).set('ai', function (button) { - if (get.type(button.link) == 'equip') return 0; - var evt = _status.event.getParent(3), player = _status.event.player; - if (evt.type == 'phase' && !player.hasValueTarget(button.link, null, true)) return 0; - if (evt && evt.ai) { - var tmp = _status.event; - _status.event = evt; - var result = (evt.ai || event.ai1)(button.link, _status.event.player, evt); - _status.event = tmp; + return evt.filterCard(card,evt.player,evt); + })).set('ai',function(button){ + if(get.type(button.link)=='equip') return 0; + var evt=_status.event.getParent(3),player=_status.event.player; + if(evt.type=='phase'&&!player.hasValueTarget(button.link,null,true)) return 0; + if(evt&&evt.ai){ + var tmp=_status.event; + _status.event=evt; + var result=(evt.ai||event.ai1)(button.link,_status.event.player,evt); + _status.event=tmp; return result; } return 1; }); 'step 1' - var evt = event.getParent(2); - if (result.bool && result.links && result.links.length) { - var card = result.links[0]; - var name = card.name, aozhan = (player.hasSkill('aozhan') && name == 'tao'); - if (aozhan) { - name = evt.filterCard({ - name: 'sha', isCard: true, cards: [card], - }, evt.player, evt) ? 'sha' : 'shan'; + var evt=event.getParent(2); + if(result.bool&&result.links&&result.links.length){ + var card=result.links[0]; + var name=card.name,aozhan=(player.hasSkill('aozhan')&&name=='tao'); + if(aozhan){ + name=evt.filterCard({ + name:'sha',isCard:true,cards:[card], + },evt.player,evt)?'sha':'shan'; } - game.broadcastAll(function (result, name) { - lib.skill.olqifan_backup.viewAs = { name: name, cards: [result], isCard: true }; - }, card, name); - evt.set('_backupevent', 'olqifan_backup'); - evt.set('openskilldialog', ('请选择' + get.translation(card) + '的目标')) + game.broadcastAll(function(result,name){ + lib.skill.olqifan_backup.viewAs={name:name,cards:[result],isCard:true}; + },card,name); + evt.set('_backupevent','olqifan_backup'); + evt.set('openskilldialog',('请选择'+get.translation(card)+'的目标')) evt.backup('olqifan_backup'); } evt.goto(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; + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')) return 0.7; + if(get.tag(card,'respondSha')) return 0.7; } }, - order: 12, - respondShan: true, - respondSha: true, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + order:12, + respondShan:true, + respondSha:true, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; } } }, }, - olqifan_backup: { - sourceSkill: 'olqifan', - precontent: function () { + olqifan_backup:{ + sourceSkill:'olqifan', + precontent:function(){ delete event.result.skill; - var name = event.result.card.name, cards = event.result.card.cards.slice(0); - event.result.cards = cards; - var rcard = cards[0], card; - if (rcard.name == name) card = get.autoViewAs(rcard); - else card = get.autoViewAs({ name, isCard: true }); - event.result.card = card; - var id = get.id(); - player.when('chooseToUseAfter').filter((evt) => evt == event.getParent()).then(() => { - var num = lib.skill.olqifan.getNum(), pos = ('jeh').slice(0, num); - if (num > 0 && player.countCards(pos) > 0) { - event.maxNum = Math.min(3, lib.skill.olqifan.getNum()); - event.num = 0; + var name=event.result.card.name,cards=event.result.card.cards.slice(0); + event.result.cards=cards; + var rcard=cards[0],card; + if(rcard.name==name) card=get.autoViewAs(rcard); + else card=get.autoViewAs({name,isCard:true}); + event.result.card=card; + var id=get.id(); + player.when('chooseToUseAfter').filter((evt)=>evt==event.getParent()).then(()=>{ + var num=lib.skill.olqifan.getNum(),pos=('jeh').slice(0,num); + if(num>0&&player.countCards(pos)>0){ + event.maxNum=Math.min(3,lib.skill.olqifan.getNum()); + event.num=0; } else event.finish(); - }).then(() => { - var pos = ('jeh')[event.num], hs = player.countCards(pos); - if (hs > 0) player.chooseToDiscard(hs, pos, true); + }).then(()=>{ + var pos=('jeh')[event.num],hs=player.countCards(pos); + if(hs>0) player.chooseToDiscard(hs,pos,true); event.num++; - if (event.num < event.maxNum) event.redo(); + if(event.num false, - wuxieEnabled: () => false, - cardEnabled: (card) => { - if (card.name == 'wuxie') return false; + oltuishi:{ + audio:2, + mod:{ + wuxieJudgeEnabled:()=>false, + wuxieEnabled:()=>false, + cardEnabled:(card)=>{ + if(card.name=='wuxie') return false; }, - targetInRange: (card) => { - if (card.storage && card.storage.oltuishi) return true; + targetInRange:(card)=>{ + if(card.storage&&card.storage.oltuishi) return true; }, - aiValue: (player, card, val) => { - if (card.name == 'wuxie') return 0; - var num = get.number(card); - if ([1, 11, 12, 13].includes(num)) return val * 1.1; + aiValue:(player,card,val)=>{ + if(card.name=='wuxie') return 0; + var num=get.number(card); + if([1,11,12,13].includes(num)) return val*1.1; }, - aiUseful: (player, card, val) => { - if (card.name == 'wuxie') return 0; - var num = get.number(card); - if ([1, 11, 12, 13].includes(num)) return val * 1.1; + aiUseful:(player,card,val)=>{ + if(card.name=='wuxie') return 0; + var num=get.number(card); + if([1,11,12,13].includes(num)) return val*1.1; }, - aiOrder: (player, card, order) => { - if (get.name(card) == 'sha' && player.hasSkill('oltuishi_unlimit')) order += 9; - var num = get.number(card); - if ([1, 11, 12, 13].includes(num)) order += 3; + aiOrder:(player,card,order)=>{ + if(get.name(card)=='sha'&&player.hasSkill('oltuishi_unlimit')) order+=9; + var num=get.number(card); + if([1,11,12,13].includes(num)) order+=3; return order; }, }, - trigger: { player: 'useCard' }, - filter: function (event) { - return [1, 11, 12, 13].includes(get.number(event.card)); + trigger:{player:'useCard'}, + filter:function(event){ + return [1,11,12,13].includes(get.number(event.card)); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - trigger.targets.length = 0; - trigger.all_excluded = true; - game.log(trigger.card, '被无效了'); + trigger.targets.length=0; + trigger.all_excluded=true; + game.log(trigger.card,'被无效了'); 'step 1' player.draw(); player.addSkill('oltuishi_unlimit'); }, - subSkill: { - unlimit: { - charlotte: true, - mod: { - cardUsableTarget: (card, player, target) => { - if (target.countCards('h') < player.countCards('h')) return true; + subSkill:{ + unlimit:{ + charlotte:true, + mod:{ + cardUsableTarget:(card,player,target)=>{ + if(target.countCards('h') { - if (target.countCards('h') < player.countCards('h')) return true; + targetInRange:(card,player,target)=>{ + if(target.countCards('h') player.countCards('h') + event.cards.length > target.countCards('h')); + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(!event.targets||!event.targets.length) return false; + return event.targets.some(target=>player.countCards('h')+event.cards.length>target.countCards('h')); }, - forced: true, - popup: false, - silent: true, - firstDo: true, - content: function () { + forced:true, + popup:false, + silent:true, + firstDo:true, + content:function(){ player.removeSkill('oltuishi_unlimit') - var card = trigger.card; - if (!card.storage) card.storage = {}; - card.storage.oltuishi = true; - if (trigger.addCount !== false) { - trigger.addCount = false; + var card=trigger.card; + if(!card.storage) card.storage={}; + card.storage.oltuishi=true; + if(trigger.addCount!==false){ + trigger.addCount=false; player.getStat('card')[card.name]--; } }, - mark: true, - intro: { content: '对手牌数小于你的角色使用的下一张牌无距离次数限制' }, + mark:true, + intro:{content:'对手牌数小于你的角色使用的下一张牌无距离次数限制'}, }, }, }, //OL牵招 - olweifu: { - audio: 2, - enable: 'phaseUse', - filterCard: lib.filter.cardDiscardable, - position: 'he', - filter: function (event, player) { - return player.hasCard(card => lib.filter.cardDiscardable(card, player), 'he'); + olweifu:{ + audio:2, + enable:'phaseUse', + filterCard:lib.filter.cardDiscardable, + position:'he', + filter:function(event,player){ + return player.hasCard(card=>lib.filter.cardDiscardable(card,player),'he'); }, - check: function (card) { - var player = _status.event.player; - return (5 - get.value(card)) / Math.pow(Math.max(0.1, player.getUseValue(card)), 0.33); + check:function(card){ + var player=_status.event.player; + return (5-get.value(card))/Math.pow(Math.max(0.1,player.getUseValue(card)),0.33); }, - content: function () { + content:function(){ 'step 0' - player.judge(card => { - var evt = _status.event.getParent(); - var cardx = evt.cards[0]; - if (get.type2(card) == get.type2(cardx)) return 0.5; + player.judge(card=>{ + var evt=_status.event.getParent(); + var cardx=evt.cards[0]; + if(get.type2(card)==get.type2(cardx)) return 0.5; return 0.1; - }).set('callback', function () { - var card = event.judgeResult.card; + }).set('callback',function(){ + var card=event.judgeResult.card; player.addTempSkill('olweifu_clear'); player.addTempSkill('olweifu_add'); - if (!get.is.object(player.storage.olweifu_add)) player.storage.olweifu_add = {}; - var type = get.type2(card, player); - if (typeof player.storage.olweifu_add[type] != 'number') player.storage.olweifu_add[type] = 0; + if(!get.is.object(player.storage.olweifu_add)) player.storage.olweifu_add={}; + var type=get.type2(card,player); + if(typeof player.storage.olweifu_add[type]!='number') player.storage.olweifu_add[type]=0; player.storage.olweifu_add[type]++; player.markSkill('olweifu_add'); - if (type == get.type2(event.getParent(2).cards[0], player)) player.draw(); - }).set('judge2', result => result.bool); + if(type==get.type2(event.getParent(2).cards[0],player)) player.draw(); + }).set('judge2',result=>result.bool); }, - ai: { - order: 7, - result: { - player: function (player) { - return player.hasCard(card => { - var type = get.type2(card); - if (type == 'equip') return false; - return player.hasUseTarget(card) && player.getUseValue(card) > 5 && game.countPlayer(current => { - return lib.filter.targetEnabled2(card, player, current) && get.effect(current, card, player, player) > 0; - }) + 1 > (get.is.object(player.storage.olweifu_add) ? (player.storage.olweifu_add[type] || 0) : 0); - }, 'hs') ? 1 : 0; + ai:{ + order:7, + result:{ + player:function(player){ + return player.hasCard(card=>{ + var type=get.type2(card); + if(type=='equip') return false; + return player.hasUseTarget(card)&&player.getUseValue(card)>5&&game.countPlayer(current=>{ + return lib.filter.targetEnabled2(card,player,current)&&get.effect(current,card,player,player)>0; + })+1>(get.is.object(player.storage.olweifu_add)?(player.storage.olweifu_add[type]||0):0); + },'hs')?1:0; }, }, }, - subSkill: { - clear: { - trigger: { player: 'useCard1' }, - filter: function (event, player) { - var type = get.type2(event.card); - if (get.is.object(player.storage.olweifu_add) && typeof player.storage.olweifu_add[type] == 'number') return true; + subSkill:{ + clear:{ + trigger:{player:'useCard1'}, + filter:function(event,player){ + var type=get.type2(event.card); + if(get.is.object(player.storage.olweifu_add)&&typeof player.storage.olweifu_add[type]=='number') return true; return false; }, - silent: true, - firstDo: true, - charlotte: true, - content: function () { - var type = get.type2(trigger.card); - var num = player.storage.olweifu_add[type]; + silent:true, + firstDo:true, + charlotte:true, + content:function(){ + var type=get.type2(trigger.card); + var num=player.storage.olweifu_add[type]; delete player.storage.olweifu_add[type]; - if (get.is.empty(player.storage.olweifu_add)) { + if(get.is.empty(player.storage.olweifu_add)){ delete player.storage.olweifu_add; player.unmarkSkill('olweifu_add'); } - trigger._olweifu_clear = num; + trigger._olweifu_clear=num; } }, - add: { - trigger: { player: 'useCard2' }, - filter: function (event, player) { - if (!event._olweifu_clear) return false; - var info = get.info(event.card); - if (info.allowMultiple == false) return false; - if (event.targets && !info.multitarget) { - if (game.hasPlayer(current => { - return !event.targets.includes(current) && lib.filter.targetEnabled2(event.card, player, current); + add:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(!event._olweifu_clear) return false; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(current=>{ + return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current); })) return true; } return false; }, - onremove: true, - charlotte: true, - direct: true, - content: function () { + onremove:true, + charlotte:true, + direct:true, + content:function(){ 'step 0' - var num = trigger._olweifu_clear; - player.chooseTarget(get.prompt('olweifu'), '为' + get.translation(trigger.card) + '额外指定' + get.cnNumber(num) + '个目标。', [1, num], (card, player, target) => { - return !_status.event.sourcex.includes(target) && lib.filter.targetEnabled2(_status.event.card, player, 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); + var num=trigger._olweifu_clear; + player.chooseTarget(get.prompt('olweifu'),'为'+get.translation(trigger.card)+'额外指定'+get.cnNumber(num)+'个目标。',[1,num],(card,player,target)=>{ + return !_status.event.sourcex.includes(target)&&lib.filter.targetEnabled2(_status.event.card,player,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) { - var targets = result.targets; - player.logSkill('olweifu_add', targets); + if(result.bool){ + var targets=result.targets; + player.logSkill('olweifu_add',targets); trigger.targets.addArray(targets); - game.log(targets, '也成为了', trigger.card, '的目标'); - if (!event.isMine() && !event.isOnline()) game.delayex(); + game.log(targets,'也成为了',trigger.card,'的目标'); + if(!event.isMine()&&!event.isOnline()) game.delayex(); } }, - intro: { - markcount: () => 0, - content: (storage, player) => { - if (!get.is.object(storage)) return; - var str = '使用下一张以下类型的牌无距离限制,且可以额外指定对应数量个目标:'; - for (var type in storage) { - str += '
  • ' + get.translation(type) + '牌:+' + storage[type]; + intro:{ + markcount:()=>0, + content:(storage,player)=>{ + if(!get.is.object(storage)) return; + var str='使用下一张以下类型的牌无距离限制,且可以额外指定对应数量个目标:'; + for(var type in storage){ + str+='
  • '+get.translation(type)+'牌:+'+storage[type]; } return str; } }, - mod: { - targetInRange: (card, player) => { - var type = get.type2(card); - if (get.is.object(player.storage.olweifu_add) && typeof player.storage.olweifu_add[type] == 'number') return true; + mod:{ + targetInRange:(card,player)=>{ + var type=get.type2(card); + if(get.is.object(player.storage.olweifu_add)&&typeof player.storage.olweifu_add[type]=='number') return true; }, } } }, }, - olkuansai: { - audio: 2, - trigger: { - global: 'useCardToPlayered', + olkuansai:{ + audio:2, + trigger:{ + global:'useCardToPlayered', }, - filter: function (event, player) { - return event.isFirstTarget && event.targets.length >= player.getHp(); + filter:function(event,player){ + return event.isFirstTarget&&event.targets.length>=player.getHp(); }, - direct: true, - usable: 1, - content: function () { + direct:true, + usable:1, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('olkuansai'), '令其中一个目标选择一项:1.交给你一张牌;2.令你回复1点体力。', (card, player, target) => { + player.chooseTarget(get.prompt('olkuansai'),'令其中一个目标选择一项:1.交给你一张牌;2.令你回复1点体力。',(card,player,target)=>{ return _status.event.targets.includes(target); - }).set('targets', trigger.targets).set('ai', target => { - var player = _status.event.player; - var att = get.attitude(player, target); - if (att > 0) return 1; - return (1 - att) / Math.sqrt(1 + target.countCards('he')); + }).set('targets',trigger.targets).set('ai',target=>{ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>0) return 1; + return (1-att)/Math.sqrt(1+target.countCards('he')); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('olkuansai', target); - var position = 'e'; - if (player != target) position += 'h'; - var forced = player.isHealthy(); - var str = '请交给其一张牌' + (forced ? '' : '或点击“取消”令其回复1点体力') + '。'; - if (!target.countCards(position)) event._result = { bool: false }; - else target.chooseCard(get.translation(player) + '对你发动了【款塞】', str, position, forced).set('ai', card => { - if (_status.event.recover) return 0; - var target = _status.event.player, player = _status.event.getParent().player; - if (get.attitude(target, player) > 0) { - return get.value(card, target) - get.value(card, player); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('olkuansai',target); + var position='e'; + if(player!=target) position+='h'; + var forced=player.isHealthy(); + var str='请交给其一张牌'+(forced?'':'或点击“取消”令其回复1点体力')+'。'; + if(!target.countCards(position)) event._result={bool:false}; + else target.chooseCard(get.translation(player)+'对你发动了【款塞】',str,position,forced).set('ai',card=>{ + if(_status.event.recover) return 0; + var target=_status.event.player,player=_status.event.getParent().player; + if(get.attitude(target,player)>0){ + return get.value(card,target)-get.value(card,player); } - if (get.tag(card, 'recover')) return -1; - return 6.5 - get.value(card); - }).set('recover', function () { - if (forced) return false; - var recoverEff = get.recoverEffect(player, target, target); - var att = get.attitude(target, player); - if (att < 0) { - if (recoverEff >= 0) return true; - if (target.hasCard(card => { - return get.value(card) < 6.5 && !get.tag(card, 'recover') || get.value(card) <= 0.05; - }, position)) return false; + if(get.tag(card,'recover')) return -1; + return 6.5-get.value(card); + }).set('recover',function(){ + if(forced) return false; + var recoverEff=get.recoverEffect(player,target,target); + var att=get.attitude(target,player); + if(att<0){ + if(recoverEff>=0) return true; + if(target.hasCard(card=>{ + return get.value(card)<6.5&&!get.tag(card,'recover')||get.value(card)<=0.05; + },position)) return false; } - else { - if (recoverEff > 0) return true; - if (target.hasCard(card => { - return get.value(card, target) < get.value(card, player); - }, position)) return false; + else{ + if(recoverEff>0) return true; + if(target.hasCard(card=>{ + return get.value(card,target) player.getUseValue({ name: 'juedou' }) ? 'sha' : 'juedou'; + var list=[]; + if(target.hasUseTarget({name:'sha'})) list.push('sha'); + if(target.hasUseTarget({name:'sha'})) list.push('juedou'); + if(!list.length) event.finish(); + else if(list.length==1) event._result={control:list[0]}; + else target.chooseControl(list).set('prompt','谋诛:视为使用一张【杀】或【决斗】').set('ai',function(){ + var player=_status.event.player; + return player.getUseValue({name:'sha'})>player.getUseValue({name:'juedou'})?'sha':'juedou'; }); 'step 3' - if (result.control) target.chooseUseTarget({ name: result.control }, true); + if(result.control) target.chooseUseTarget({name:result.control},true); }, - ai: { - order: 7, - result: { - target: function (player, target) { - if (get.attitude(target, player) > 0 && game.hasPlayer(function (current) { - if (current == target) return false; - for (var card of [{ name: 'sha' }, { name: 'juedou' }]) { - if (target.canUse(card, current) && get.effect(current, card, target, player) > 0 && get.effect(current, card, target, target) > 0) return true; + ai:{ + order:7, + result:{ + target:function(player,target){ + if(get.attitude(target,player)>0&&game.hasPlayer(function(current){ + if(current==target) return false; + for(var card of [{name:'sha'},{name:'juedou'}]){ + if(target.canUse(card,current)&&get.effect(current,card,target,player)>0&&get.effect(current,card,target,target)>0) return true; } return false; - }) && target.countCards('h') < player.countCards('h') + 2) return 3; - if (!target.hasValueTarget({ name: 'sha' }) && !target.hasValueTarget({ name: 'juedou' })) return -2; - if (target.countCards('h') + 1 > player.countCards('h')) return -2; - var canSave = function (player, target) { - return target.hp + player.countCards('hs', card => player.canSaveCard(card, target)) > 1 + ((get.mode() == 'identity' && target.identity == 'zhu') || (get.mode() == 'guozhan' && get.is.jun(target))); + })&&target.countCards('h')player.countCards('h')) return -2; + var canSave=function(player,target){ + return target.hp+player.countCards('hs',card=>player.canSaveCard(card,target))>1+((get.mode()=='identity'&&target.identity=='zhu')||(get.mode()=='guozhan'&&get.is.jun(target))); }; - if (target.hasValueTarget({ name: 'sha' })) { - var aimx = game.filterPlayer(current => { - return target.canUse({ name: 'sha' }, current) && get.effect(current, { name: 'sha' }, target, target) > 0; - }).sort((a, b) => get.effect(b, { name: 'sha' }, target, target) - get.effect(a, { name: 'sha' }, target, target))[0]; - if (aimx && get.effect(aimx, { name: 'sha' }, target, player) < 0 && get.effect(aimx, { name: 'sha' }, target, aimx) < 0 && !canSave(player, aimx)) return 0; + if(target.hasValueTarget({name:'sha'})){ + var aimx=game.filterPlayer(current=>{ + return target.canUse({name:'sha'},current)&&get.effect(current,{name:'sha'},target,target)>0; + }).sort((a,b)=>get.effect(b,{name:'sha'},target,target)-get.effect(a,{name:'sha'},target,target))[0]; + if(aimx&&get.effect(aimx,{name:'sha'},target,player)<0&&get.effect(aimx,{name:'sha'},target,aimx)<0&&!canSave(player,aimx)) return 0; } - if (target.hasValueTarget({ name: 'juedou' })) { - var aimy = game.filterPlayer(current => { - return target.canUse({ name: 'juedou' }, current) && get.effect(current, { name: 'juedou' }, target, target) > 0; - }).sort((a, b) => get.effect(b, { name: 'juedou' }, target, target) - get.effect(a, { name: 'juedou' }, target, target))[0]; - if (aimy && get.effect(aimy, { name: 'juedou' }, target, player) < 0 && get.effect(aimy, { name: 'sha' }, target, aimy) < 0 && !canSave(player, aimy)) return 0; + if(target.hasValueTarget({name:'juedou'})){ + var aimy=game.filterPlayer(current=>{ + return target.canUse({name:'juedou'},current)&&get.effect(current,{name:'juedou'},target,target)>0; + }).sort((a,b)=>get.effect(b,{name:'juedou'},target,target)-get.effect(a,{name:'juedou'},target,target))[0]; + if(aimy&&get.effect(aimy,{name:'juedou'},target,player)<0&&get.effect(aimy,{name:'sha'},target,aimy)<0&&!canSave(player,aimy)) return 0; } return -1; }, }, }, }, - olyanhuo: { - audio: 'yanhuo', - trigger: { player: 'die' }, - forceDie: true, - filter: function (event, player) { - if (!event.source || !event.source.isIn() || !event.source.countCards('he')) return false; - return player.countCards('he') > 0; + olyanhuo:{ + audio:'yanhuo', + trigger:{player:'die'}, + forceDie:true, + filter:function(event,player){ + if(!event.source||!event.source.isIn()||!event.source.countCards('he')) return false; + return player.countCards('he')>0; }, - check: function (event, player) { - return get.effect(event.source, { name: 'guohe_copy2' }, player, player) > 0; + check:function(event,player){ + return get.effect(event.source,{name:'guohe_copy2'},player,player)>0; }, - logTarget: 'source', - skillAnimation: true, - animationColor: 'thunder', - content: function () { - player.discardPlayerCard(trigger.source, 'he', [1, player.countCards('he')], true).set('forceDie', true); + logTarget:'source', + skillAnimation:true, + animationColor:'thunder', + content:function(){ + player.discardPlayerCard(trigger.source,'he',[1,player.countCards('he')],true).set('forceDie',true); }, }, //韩遂 - olniluan: { - audio: 'niluan', - trigger: { global: 'phaseJieshuBegin' }, - filter: function (event, player) { - return event.player.getHp() > player.getHp() && event.player.getHistory('useCard', function (card) { - return card.card.name == 'sha'; - }).length && player.countCards('hes', card => get.color(card, player) == 'black' && player.canUse(get.autoViewAs({ name: 'sha' }, [card]), event.player, false)); + olniluan:{ + audio:'niluan', + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player.getHp()>player.getHp()&&event.player.getHistory('useCard',function(card){ + return card.card.name=='sha'; + }).length&&player.countCards('hes',card=>get.color(card,player)=='black'&&player.canUse(get.autoViewAs({name:'sha'},[card]),event.player,false)); }, - direct: true, - content: function () { - var next = player.chooseToUse(); - next.set('openskilldialog', '逆乱:是否将一张黑色牌当作【杀】对' + get.translation(trigger.player) + '使用?'); - next.set('norestore', true); - next.set('_backupevent', 'niluanx'); - next.set('custom', { - add: {}, - replace: { window: function () { } } + direct:true, + content:function(){ + var next=player.chooseToUse(); + next.set('openskilldialog','逆乱:是否将一张黑色牌当作【杀】对'+get.translation(trigger.player)+'使用?'); + next.set('norestore',true); + next.set('_backupevent','niluanx'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} }); next.backup('niluanx'); - next.set('targetRequired', true); - next.set('complexSelect', true); - next.set('filterTarget', function (card, player, target) { - if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this, arguments); + next.set('targetRequired',true); + next.set('complexSelect',true); + next.set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); }); - next.set('sourcex', trigger.player); - next.set('addCount', false); - next.logSkill = 'olniluan'; + next.set('sourcex',trigger.player); + next.set('addCount',false); + next.logSkill='olniluan'; }, }, - olxiaoxi: { - audio: 'xiaoxi', - audioname: ['machao', 'hansui', 'pangde'], - trigger: { global: 'roundStart' }, - filter: function (event, player) { - return player.hasUseTarget({ name: 'sha' }, false); + olxiaoxi:{ + audio:'xiaoxi', + audioname:['machao','hansui','pangde'], + trigger:{global:'roundStart'}, + filter:function(event,player){ + return player.hasUseTarget({name:'sha'},false); }, - direct: true, - content: function () { - player.chooseUseTarget({ name: 'sha' }, get.prompt('olxiaoxi'), '视为使用一张无距离限制的【杀】', false, 'nodistance').logSkill = 'olxiaoxi'; + direct:true, + content:function(){ + player.chooseUseTarget({name:'sha'},get.prompt('olxiaoxi'),'视为使用一张无距离限制的【杀】',false,'nodistance').logSkill='olxiaoxi'; }, }, //段颎 - olsaogu: { - audio: 2, - zhuanhuanji: true, - mark: true, - marktext: '☯', - intro: { - content: function (storage) { - if (storage) return '转换技。①出牌阶段,你可以摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色摸一张牌。'; + olsaogu:{ + audio:2, + zhuanhuanji:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage){ + if(storage) return '转换技。①出牌阶段,你可以摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色摸一张牌。'; return '转换技。①出牌阶段,你可以弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】。②结束阶段,你可以弃置一张牌,令一名其他角色弃置两张牌,然后其使用弃置的【杀】。'; }, }, - onChooseToUse: function (event) { - if (!game.online && !event.olsaogu) { - var list = [], player = event.player; - var evtx = event.getParent('phaseUse'); - player.getHistory('lose', evt => { - if (evt.type == 'discard' && evt.getParent('phaseUse') == evtx) list.addArray(evt.cards2); + onChooseToUse:function(event){ + if(!game.online&&!event.olsaogu){ + var list=[],player=event.player; + var evtx=event.getParent('phaseUse'); + player.getHistory('lose',evt=>{ + if(evt.type=='discard'&&evt.getParent('phaseUse')==evtx) list.addArray(evt.cards2); }); - event.set('olsaogu', list); + event.set('olsaogu',list); } }, - enable: 'phaseUse', - filter: function (event, player) { - var storage = player.storage.olsaogu; - if (storage) return true; - return player.getDiscardableCards(player, 'he').filter(card => { - if (event.olsaogu && event.olsaogu.some(cardx => get.suit(cardx, false) == get.suit(card, player))) return false; + enable:'phaseUse', + filter:function(event,player){ + var storage=player.storage.olsaogu; + if(storage) return true; + return player.getDiscardableCards(player,'he').filter(card=>{ + if(event.olsaogu&&event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false; return true; - }).length > 1; + }).length>1; }, - filterCard: function (card, player) { - if (player.storage.olsaogu) return false; - if (_status.event.olsaogu && _status.event.olsaogu.some(cardx => get.suit(cardx, false) == get.suit(card, player))) return false; + filterCard:function(card,player){ + if(player.storage.olsaogu) return false; + if(_status.event.olsaogu&&_status.event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false; return true; }, - selectCard: function () { - var player = _status.event.player; - return player.storage.olsaogu ? -1 : 2; + selectCard:function(){ + var player=_status.event.player; + return player.storage.olsaogu?-1:2; }, - position: 'he', - check: function (card) { - var player = _status.event.player; - if (card.name == 'sha') return player.hasValueTarget(card) ? 10 : 0.001; - return 6 - get.value(card); + position:'he', + check:function(card){ + var player=_status.event.player; + if(card.name=='sha') return player.hasValueTarget(card)?10:0.001; + return 6-get.value(card); }, - prompt: function () { - var player = _status.event.player; - var storage = player.storage.olsaogu; - if (storage) return '摸一张牌'; - var list = _status.event.olsaogu, str = ''; - if (list && list.length) { - var text = '', suits = list.reduce(function (list, card) { - return list.add(get.suit(card, false)), list; - }, []).sort((a, b) => lib.suit.indexOf(b) - lib.suit.indexOf(a)); - for (var i = 0; i < suits.length; i++) text += get.translation(suits[i]); - str += '(不能弃置' + text + '花色的牌)'; + prompt:function(){ + var player=_status.event.player; + var storage=player.storage.olsaogu; + if(storage) return '摸一张牌'; + var list=_status.event.olsaogu,str=''; + if(list&&list.length){ + var text='',suits=list.reduce(function(list,card){ + return list.add(get.suit(card,false)),list; + },[]).sort((a,b)=>lib.suit.indexOf(b)-lib.suit.indexOf(a)); + for(var i=0;i card.name == 'sha'); - if (cardx.length) { - var next = game.createEvent('olsaogu_chooseToUseSha'); - next.player = player; - next.cards = cardx; + if(!cards.length) player.draw(); + else{ + var cardx=cards.filter(card=>card.name=='sha'); + if(cardx.length){ + var next=game.createEvent('olsaogu_chooseToUseSha'); + next.player=player; + next.cards=cardx; next.setContent(lib.skill.olsaogu.chooseToUseSha); } } }, - ai: { - order: function (item, player) { - return get.order({ name: 'sha' }, player) - 0.2; + ai:{ + order:function(item,player){ + return get.order({name:'sha'},player)-0.2; }, - result: { - player: function (player) { - var storage = player.storage.olsaogu; - if (storage) return 1; - if (player.getDiscardableCards(player, 'he').filter(card => { - if (card.name != 'sha') return false; - if (_status.event.olsaogu && _status.event.olsaogu.some(cardx => get.suit(cardx, false) == get.suit(card, player))) return false; + result:{ + player:function(player){ + var storage=player.storage.olsaogu; + if(storage) return 1; + if(player.getDiscardableCards(player,'he').filter(card=>{ + if(card.name!='sha') return false; + if(_status.event.olsaogu&&_status.event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false; return true; }).length) return 1; return 0; }, }, }, - group: 'olsaogu_effect', - subSkill: { - effect: { - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - if (_status.connectMode) return player.countCards('he'); - return player.countDiscardableCards(player, 'he'); + group:'olsaogu_effect', + subSkill:{ + effect:{ + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + if(_status.connectMode) return player.countCards('he'); + return player.countDiscardableCards(player,'he'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = []; - player.getHistory('lose', evt => { - if (evt.type == 'discard' && evt.getParent('phaseJieshu').name == 'phaseJieshu') list.addArray(evt.cards2); + var list=[]; + player.getHistory('lose',evt=>{ + if(evt.type=='discard'&&evt.getParent('phaseJieshu').name=='phaseJieshu') list.addArray(evt.cards2); }); - event.list = list; - var str, storage = player.storage.olsaogu; - if (storage) str = '弃置一张牌,令一名其他角色摸一张牌。'; - else { - str = '弃置一张牌,令一名其他角色弃置两张牌(不能包含你本阶段弃置过的花色),然后其使用弃置的【杀】。'; - if (list.length) { - var text = '', suits = list.reduce(function (list, card) { - return list.add(get.suit(card, false)), list; - }, []).sort((a, b) => lib.suit.indexOf(b) - lib.suit.indexOf(a)); - for (var i = 0; i < suits.length; i++) text += get.translation(suits[i]); - str += '
    本阶段已弃置过' + text + '花色的牌。'; + event.list=list; + var str,storage=player.storage.olsaogu; + if(storage) str='弃置一张牌,令一名其他角色摸一张牌。'; + else{ + str='弃置一张牌,令一名其他角色弃置两张牌(不能包含你本阶段弃置过的花色),然后其使用弃置的【杀】。'; + if(list.length){ + var text='',suits=list.reduce(function(list,card){ + return list.add(get.suit(card,false)),list; + },[]).sort((a,b)=>lib.suit.indexOf(b)-lib.suit.indexOf(a)); + for(var i=0;i 1; + prompt:get.prompt('olsaogu'), + prompt2:str, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('he')>1; }, - filterCard: lib.filter.cardDiscardable, - position: 'he', - complexCard: true, - complexSelect: true, - ai1: function (card) { - var player = _status.event.player; - if (!player.storage.olsaogu && _status.event.list.some(cardx => get.suit(cardx, false) == get.suit(card, player))) return 7 - get.value(card); - return 5 - get.value(card); + filterCard:lib.filter.cardDiscardable, + position:'he', + complexCard:true, + complexSelect:true, + ai1:function(card){ + var player=_status.event.player; + if(!player.storage.olsaogu&&_status.event.list.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return 7-get.value(card); + return 5-get.value(card); }, - ai2: function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (player.storage.olsaogu) return att; - var list = _status.event.list.slice(); - if (ui.selected.cards.length) list.addArray(ui.selected.cards); - var cards = target.getCards('he', card => { - if (card.name != 'sha' || list.some(cardx => get.suit(cardx, false) == get.suit(card, target))) return false; - return lib.filter.cardDiscardable(card, target) && game.hasPlayer(function (current) { - if (!current.canUse(card, target, false)) return false; - return get.effect(current, card, target, target) > 0 && get.effect(current, card, target, player) > 0; + ai2:function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(player.storage.olsaogu) return att; + var list=_status.event.list.slice(); + if(ui.selected.cards.length) list.addArray(ui.selected.cards); + var cards=target.getCards('he',card=>{ + if(card.name!='sha'||list.some(cardx=>get.suit(cardx,false)==get.suit(card,target))) return false; + return lib.filter.cardDiscardable(card,target)&&game.hasPlayer(function(current){ + if(!current.canUse(card,target,false)) return false; + return get.effect(current,card,target,target)>0&&get.effect(current,card,target,player)>0; }); }); - if (cards.length && att > 0) return Math.sqrt(Math.min(2, cards.length)) * cards.reduce(function (num, card) { - var players = game.filterPlayer(current => target.canUse(card, current, false)); - players.sort((a, b) => get.effect(b, card, target, target) * get.effect(b, card, target, player) - get.effect(a, card, target, target) * get.effect(a, card, target, player)); - return num = (get.effect(players[0], card, target, target) * get.effect(players[0], card, target, player)); - }, 0); - return get.effect(target, { name: 'guohe_copy2' }, player, player) * Math.sqrt(Math.min(2, target.getDiscardableCards(player, 'he').filter(card => { - return !list.some(cardx => get.suit(cardx, false) == get.suit(card, target)); + if(cards.length&&att>0) return Math.sqrt(Math.min(2,cards.length))*cards.reduce(function(num,card){ + var players=game.filterPlayer(current=>target.canUse(card,current,false)); + players.sort((a,b)=>get.effect(b,card,target,target)*get.effect(b,card,target,player)-get.effect(a,card,target,target)*get.effect(a,card,target,player)); + return num=(get.effect(players[0],card,target,target)*get.effect(players[0],card,target,player)); + },0); + return get.effect(target,{name:'guohe_copy2'},player,player)*Math.sqrt(Math.min(2,target.getDiscardableCards(player,'he').filter(card=>{ + return !list.some(cardx=>get.suit(cardx,false)==get.suit(card,target)); }).length)); }, - }).set('list', list); + }).set('list',list); 'step 1' - if (result.bool) { - var cards = result.cards, target = result.targets[0]; - player.logSkill('olsaogu', target); + if(result.bool){ + var cards=result.cards,target=result.targets[0]; + player.logSkill('olsaogu',target); player.discard(cards); - if (player.storage.olsaogu) { + if(player.storage.olsaogu){ target.draw(); event.finish(); } - else { - event.target = target; - var list = result.cards.slice(); - player.getHistory('lose', evt => { - if (evt.type == 'discard' && evt.getParent('phaseJieshu').name == 'phaseJieshu') list.addArray(evt.cards2); + else{ + event.target=target; + var list=result.cards.slice(); + player.getHistory('lose',evt=>{ + if(evt.type=='discard'&&evt.getParent('phaseJieshu').name=='phaseJieshu') list.addArray(evt.cards2); }); - var cards = target.getCards('he', card => { - return lib.filter.cardDiscardable(card, target) && !list.some(cardx => get.suit(cardx, false) == get.suit(card, target)); + var cards=target.getCards('he',card=>{ + return lib.filter.cardDiscardable(card,target)&&!list.some(cardx=>get.suit(cardx,false)==get.suit(card,target)); }); - if (cards.length) { - var text = '', suits = list.reduce(function (list, card) { - return list.add(get.suit(card, false)), list; - }, []).sort((a, b) => lib.suit.indexOf(b) - lib.suit.indexOf(a)); - for (var i = 0; i < suits.length; i++) text += get.translation(suits[i]); - target.chooseToDiscard('he', '扫谷:弃置两张牌(不能弃置' + text + '花色的牌),然后使用其中的【杀】', function (card, player) { - var list = _status.event.list; - return !list.some(cardx => get.suit(cardx, false) == get.suit(card, player)); - }, Math.min(cards.length, 2), true).set('ai', function (card) { - var player = _status.event.player; - if (card.name == 'sha' && player.hasValueTarget(card)) return 10; + if(cards.length){ + var text='',suits=list.reduce(function(list,card){ + return list.add(get.suit(card,false)),list; + },[]).sort((a,b)=>lib.suit.indexOf(b)-lib.suit.indexOf(a)); + for(var i=0;iget.suit(cardx,false)==get.suit(card,player)); + },Math.min(cards.length,2),true).set('ai',function(card){ + var player=_status.event.player; + if(card.name=='sha'&&player.hasValueTarget(card)) return 10; return -get.value(card); - }).set('list', list); + }).set('list',list); } else event.finish(); } } else event.finish(); 'step 2' - if (result.bool) { - var cards = result.cards.filter(card => card.name == 'sha'); - if (cards.length) { - var next = game.createEvent('olsaogu_chooseToUseSha'); - next.player = target; - next.cards = cards; + if(result.bool){ + var cards=result.cards.filter(card=>card.name=='sha'); + if(cards.length){ + var next=game.createEvent('olsaogu_chooseToUseSha'); + next.player=target; + next.cards=cards; next.setContent(lib.skill.olsaogu.chooseToUseSha); } } }, }, }, - chooseToUseSha: function () { + chooseToUseSha:function(){ 'step 0' - event.cards2 = cards.filter(i => get.position(i, true) == 'd' && player.hasUseTarget(i)); - if (!event.cards2.length) event.finish(); + event.cards2=cards.filter(i=>get.position(i,true)=='d'&&player.hasUseTarget(i)); + if(!event.cards2.length) event.finish(); 'step 1' - if (event.cards2.length == 1) event._result = { bool: true, links: event.cards2 }; - else player.chooseButton(['扫谷:请使用其中的【杀】', event.cards2], true).set('filterButton', button => { - return _status.event.player.hasUseTarget(button.link, false); - }).set('ai', button => { + if(event.cards2.length==1) event._result={bool:true,links:event.cards2}; + else player.chooseButton(['扫谷:请使用其中的【杀】',event.cards2],true).set('filterButton',button=>{ + return _status.event.player.hasUseTarget(button.link,false); + }).set('ai',button=>{ return _status.event.player.getUseValue(button.link); }); 'step 2' - if (result.bool) { - var card = result.links[0]; + if(result.bool){ + var card=result.links[0]; event.cards2.remove(card); - player.$gain2(card, false); + player.$gain2(card,false); game.delayx(); - player.chooseUseTarget(true, card, false); + player.chooseUseTarget(true,card,false); } else event.finish(); 'step 3' - if (event.cards2.length) event.goto(1); + if(event.cards2.length) event.goto(1); }, }, //OL周群 - oltianhou: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - content: function () { + oltianhou:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ 'step 0' - var card = get.cards()[0]; - event.card = card; + var card=get.cards()[0]; + event.card=card; game.cardsGotoOrdering(card); 'step 1' - if (player.countCards('he') > 0) { - player.chooseCard('he', '天候:是否用一张牌交换牌堆顶的' + get.translation(card) + '?').set('promptx', [[card]]).set('card', card).set('ai', cardx => { - let card = _status.event.card, val = get.value(card, player) - get.value(cardx, player); - if (val < 0) return -val; - let suit = get.suit(card); - if (suit === 'heart') return val + game.countPlayer((current) => { - if (player !== current && !game.hasPlayer((tar) => tar.hp - current.hp > 1)) return get.sgn(get.attitude(player, current)); + if(player.countCards('he')>0){ + player.chooseCard('he','天候:是否用一张牌交换牌堆顶的'+get.translation(card)+'?').set('promptx',[[card]]).set('card',card).set('ai',cardx=>{ + let card=_status.event.card,val=get.value(card,player)-get.value(cardx,player); + if(val<0) return -val; + let suit=get.suit(card); + if(suit==='heart') return val+game.countPlayer((current)=>{ + if(player!==current&&!game.hasPlayer((tar)=>tar.hp-current.hp>1)) return get.sgn(get.attitude(player,current)); return 0; }); - if (suit == 'club') return val + game.countPlayer((current) => { - if (player !== current && (current.hp < 2 || !game.hasPlayer((tar) => current.hp - tar.hp > 1))) return get.sgn(get.attitude(player, current)); + if(suit=='club') return val+game.countPlayer((current)=>{ + if(player!==current&&(current.hp<2||!game.hasPlayer((tar)=>current.hp-tar.hp>1))) return get.sgn(get.attitude(player,current)); return 0; }); - return val + 0.1; + return val+0.1; }); } - else { - event._result = { bool: false }; + else{ + event._result={bool:false}; } 'step 2' - if (result.bool) { - player.lose(result.cards, ui.cardPile, 'insert'); - player.gain(event.card, 'draw'); + if(result.bool){ + player.lose(result.cards,ui.cardPile,'insert'); + player.gain(event.card,'draw'); } - else { - ui.cardPile.insertBefore(event.card, ui.cardPile.firstChild); + else{ + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); } 'step 3' - var card = get.cards()[0]; - ui.cardPile.insertBefore(card, ui.cardPile.firstChild); - player.showCards(card, get.translation(player) + '发动了【天候】'); - var suit = get.suit(card, false), skill = 'oltianhou_' + suit; - if (!lib.skill.oltianhou.derivation.includes(skill)) event.finish(); - else { - event.weather_skill = skill; - player.chooseTarget(true, '令一名角色获得技能【' + get.translation(skill) + '】', get.translation(skill + '_info')).set('ai', function (target) { - return get.attitude(_status.event.player, target); + var card=get.cards()[0]; + ui.cardPile.insertBefore(card,ui.cardPile.firstChild); + player.showCards(card,get.translation(player)+'发动了【天候】'); + var suit=get.suit(card,false),skill='oltianhou_'+suit; + if(!lib.skill.oltianhou.derivation.includes(skill)) event.finish(); + else{ + event.weather_skill=skill; + player.chooseTarget(true,'令一名角色获得技能【'+get.translation(skill)+'】',get.translation(skill+'_info')).set('ai',function(target){ + return get.attitude(_status.event.player,target); }); } 'step 4' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'green'); - target.addAdditionalSkill('oltianhou_' + player.playerid, event.weather_skill); - player.addTempSkill('oltianhou_expire', { player: 'phaseZhunbeiBegin' }); - game.log(target, '获得了天气技能', '#g【' + get.translation(event.weather_skill) + '】'); - game.broadcastAll(function (bg) { - _status.tempBackground = bg; + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.addAdditionalSkill('oltianhou_'+player.playerid,event.weather_skill); + player.addTempSkill('oltianhou_expire',{player:'phaseZhunbeiBegin'}); + game.log(target,'获得了天气技能','#g【'+get.translation(event.weather_skill)+'】'); + game.broadcastAll(function(bg){ + _status.tempBackground=bg; game.updateBackground(); - }, event.weather_skill + '_bg'); - game.addVideo('skill', player, ['oltianhou', [true, event.weather_skill + '_bg']]) + },event.weather_skill+'_bg'); + game.addVideo('skill',player,['oltianhou',[true,event.weather_skill+'_bg']]) } }, - video: function (player, info) { - if (info[0]) { - _status.tempBackground = info[1]; + video:function(player,info){ + if(info[0]){ + _status.tempBackground=info[1]; } - else { + else{ delete _status.tempBackground; } game.updateBackground(); }, - derivation: ['oltianhou_spade', 'oltianhou_heart', 'oltianhou_club', 'oltianhou_diamond'], - subSkill: { - expire: { - charlotte: true, - onremove: function (player) { - var key = 'oltianhou_' + player.playerid, players = game.players.concat(game.dead); - for (var current of players) { + derivation:['oltianhou_spade','oltianhou_heart','oltianhou_club','oltianhou_diamond'], + subSkill:{ + expire:{ + charlotte:true, + onremove:function(player){ + var key='oltianhou_'+player.playerid,players=game.players.concat(game.dead); + for(var current of players){ current.removeAdditionalSkill(key); } - game.removeGlobalSkill('oltianhou_' + player.playerid + '_ai'); - game.broadcastAll(function () { + game.removeGlobalSkill('oltianhou_'+player.playerid+'_ai'); + game.broadcastAll(function(){ delete _status.tempBackground; game.updateBackground(); }); - game.addVideo('skill', player, ['oltianhou', [false]]) + game.addVideo('skill',player,['oltianhou',[false]]) }, }, - spade: { - audio: true, - mark: true, - marktext: '雨', - intro: { - content: '锁定技。其他角色造成火属性伤害时,取消之;一名角色受到雷属性伤害后,所有与其座次相邻的角色失去1点体力。', + spade:{ + audio:true, + mark:true, + marktext:'雨', + intro:{ + content:'锁定技。其他角色造成火属性伤害时,取消之;一名角色受到雷属性伤害后,所有与其座次相邻的角色失去1点体力。', }, - trigger: { global: 'damageEnd' }, - forced: true, - filter: function (event) { - return event.hasNature('thunder') && lib.skill.oltianhou_spade.logTarget(event).length > 0; + trigger:{global:'damageEnd'}, + forced:true, + filter:function(event){ + return event.hasNature('thunder')&&lib.skill.oltianhou_spade.logTarget(event).length>0; }, - logTarget: function (event) { - var list = []; - if (!event.player.isIn()) return []; - if (event.player.getNext().isIn()) list.push(event.player.getNext()); - if (event.player.getPrevious().isIn()) list.push(event.player.getPrevious()); + logTarget:function(event){ + var list=[]; + if(!event.player.isIn()) return []; + if(event.player.getNext().isIn()) list.push(event.player.getNext()); + if(event.player.getPrevious().isIn()) list.push(event.player.getPrevious()); return list.sortBySeat(_status.currentPhase); }, - content: function () { - var targets = lib.skill.oltianhou_spade.logTarget(trigger); - for (var i of targets) i.loseHp(); + content:function(){ + var targets=lib.skill.oltianhou_spade.logTarget(trigger); + for(var i of targets) i.loseHp(); game.delayex(); }, - group: 'oltianhou_miehuo', - global: 'oltianhou_spade_ai', + group:'oltianhou_miehuo', + global:'oltianhou_spade_ai', }, - spade_ai: { - ai: { - effect: { - player: function (card, player, target, current) { - if ((typeof card == 'object' && game.hasNature(card, 'fire') || get.tag(card, 'fireDamage')) && !player.hasSkill('oltianhou_spade')) return 'zeroplayertarget'; - if ((typeof card == 'object' && game.hasNature(card, 'thunder') || get.tag(card, 'thunderDamage'))) { - var list = lib.skill.oltianhou_spade.logTarget({ player: target }); - var eff = list.reduce(function (eff, current) { - eff += get.effect(current, { name: 'losehp' }, player, player) / get.attitude(player, player); - }, 0); - return [1, eff]; + spade_ai:{ + ai:{ + effect:{ + player:function(card,player,target,current){ + if((typeof card=='object'&&game.hasNature(card,'fire')||get.tag(card,'fireDamage'))&&!player.hasSkill('oltianhou_spade')) return 'zeroplayertarget'; + if((typeof card=='object'&&game.hasNature(card,'thunder')||get.tag(card,'thunderDamage'))){ + var list=lib.skill.oltianhou_spade.logTarget({player:target}); + var eff=list.reduce(function(eff,current){ + eff+=get.effect(current,{name:'losehp'},player,player)/get.attitude(player,player); + },0); + return [1,eff]; } } } } }, - miehuo: { - audio: 'oltianhou_spade', - trigger: { global: 'damageBegin2' }, - forced: true, - logTarget: 'source', - filter: function (event, player) { - return event.hasNature('fire') && event.source && event.source.isIn() && event.source != player; + miehuo:{ + audio:'oltianhou_spade', + trigger:{global:'damageBegin2'}, + forced:true, + logTarget:'source', + filter:function(event,player){ + return event.hasNature('fire')&&event.source&&event.source.isIn()&&event.source!=player; }, - content: function () { + content:function(){ trigger.cancel(); } }, - heart: { - audio: true, - mark: true, - marktext: '暑', - intro: { - content: '锁定技。其他角色的结束阶段开始时,若其体力值为全场最大,则其失去1点体力。', + heart:{ + audio:true, + mark:true, + marktext:'暑', + intro:{ + content:'锁定技。其他角色的结束阶段开始时,若其体力值为全场最大,则其失去1点体力。', }, - trigger: { global: 'phaseJieshuBegin' }, - forced: true, - filter: function (event, player) { - return player != event.player && event.player.isIn() && event.player.isMaxHp(); + trigger:{global:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player!=event.player&&event.player.isIn()&&event.player.isMaxHp(); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ trigger.player.loseHp(); }, - global: 'oltianhou_heart_ai' + global:'oltianhou_heart_ai' }, - heart_ai: { - mod: { - aiOrder: function (player, card, num) { - if (num > 0 && _status.event && _status.event.type == 'phase' && !player.hasSkill('oltianhou_heart') && get.tag(card, 'recover') && !player.isMaxHp() && player.needsToDiscard() <= 1 && !game.hasPlayer(function (current) { - return current.hp - player.hp > 1; - }) && get.effect(player, { name: 'losehp' }, player, player) < 0) return 0; + heart_ai:{ + mod:{ + aiOrder:function(player,card,num){ + if(num>0&&_status.event&&_status.event.type=='phase'&&!player.hasSkill('oltianhou_heart')&&get.tag(card,'recover')&&!player.isMaxHp()&&player.needsToDiscard()<=1&&!game.hasPlayer(function(current){ + return current.hp-player.hp>1; + })&&get.effect(player,{name:'losehp'},player,player)<0) return 0; } } }, - club: { - audio: true, - mark: true, - marktext: '霜', - intro: { - content: '锁定技。其他角色的结束阶段开始时,若其体力值为全场最小,则其失去1点体力。', + club:{ + audio:true, + mark:true, + marktext:'霜', + intro:{ + content:'锁定技。其他角色的结束阶段开始时,若其体力值为全场最小,则其失去1点体力。', }, - trigger: { global: 'phaseJieshuBegin' }, - forced: true, - filter: function (event, player) { - return player != event.player && event.player.isIn() && event.player.isMinHp(); + trigger:{global:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player!=event.player&&event.player.isIn()&&event.player.isMinHp(); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ trigger.player.loseHp(); }, - global: 'oltianhou_club_ai' + global:'oltianhou_club_ai' }, - club_ai: { - ai: { - nokeep: true, - skillTagFilter: function (player, tag, arg) { - return _status.event && _status.event.type == 'phase' && (!arg || arg.card && get.name(arg.card) === 'tao') && !player.hasSkill('oltianhou_club') && player.isMinHp() && get.effect(player, { name: 'losehp' }, player, player) < 0; + club_ai:{ + ai:{ + nokeep:true, + skillTagFilter:function(player,tag,arg){ + return _status.event&&_status.event.type=='phase'&&(!arg||arg.card&&get.name(arg.card)==='tao')&&!player.hasSkill('oltianhou_club')&&player.isMinHp()&&get.effect(player,{name:'losehp'},player,player)<0; } } }, - diamond: { - audio: true, - mark: true, - marktext: '雾', - intro: { - content: '锁定技。其他角色使用【杀】指定与其座次不相邻唯一目标时,则其判定。若判定结果的点数大于此【杀】,则此【杀】对其无效。', + diamond:{ + audio:true, + mark:true, + marktext:'雾', + intro:{ + content:'锁定技。其他角色使用【杀】指定与其座次不相邻唯一目标时,则其判定。若判定结果的点数大于此【杀】,则此【杀】对其无效。', }, - trigger: { global: 'useCardToPlayer' }, - forced: true, - filter: function (event, player) { - if (event.card.name != 'sha' || event.player == player || event.targets.length != 1 || !event.player.isIn()) return false; - return event.target != event.player.getNext() && event.target != event.player.getPrevious(); + trigger:{global:'useCardToPlayer'}, + forced:true, + filter:function(event,player){ + if(event.card.name!='sha'||event.player==player||event.targets.length!=1||!event.player.isIn()) return false; + return event.target!=event.player.getNext()&&event.target!=event.player.getPrevious(); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' - var num = get.number(trigger.card); - event.num = num; - trigger.player.judge(card => { - var num = get.number(card), num2 = _status.event.getParent('oltianhou_diamond').num; - return num > num2 ? -4 : 4; - }).set('judge2', result => { - if (result.bool == false) return true; + var num=get.number(trigger.card); + event.num=num; + trigger.player.judge(card=>{ + var num=get.number(card),num2=_status.event.getParent('oltianhou_diamond').num; + return num>num2?-4:4; + }).set('judge2',result=>{ + if(result.bool==false) return true; return false; }) 'step 1' - if (!result.bool) { - trigger.getParent().all_excluded = true; + if(!result.bool){ + trigger.getParent().all_excluded=true; trigger.untrigger(); } }, - global: 'oltianhou_diamond_ai', + global:'oltianhou_diamond_ai', }, - diamond_ai: { - ai: { - effect: { - player: function (card, player, target) { - if (get.name(card) == 'sha' && !player.hasSkill('oltianhou_diamond') && target != player.getNext() && target != player.getPrevious()) { - let num = get.number(card), max = _status.aiyh_MAXNUM || 13; - return [num / max, 0, num / max, 0]; + diamond_ai:{ + ai:{ + effect:{ + player:function(card,player,target){ + if(get.name(card)=='sha'&&!player.hasSkill('oltianhou_diamond')&&target!=player.getNext()&&target!=player.getPrevious()){ + let num=get.number(card),max=_status.aiyh_MAXNUM||13; + return [num/max,0,num/max,0]; } } } @@ -3768,1067 +3769,1067 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, } }, - olchenshuo: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - filter: function (event, player) { - return player.countCards('h') > 0; + olchenshuo:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; }, - hasSame: function (info, card) { - if (info.type == get.type2(card, false)) return true; - if (info.suit != 'none' && info.suit == get.suit(card, false)) return true; - if (typeof info.number == 'number' && info.number > 0 && info.number == get.number(card, false)) return true; - return info.length == get.cardNameLength(card) + hasSame:function(info,card){ + if(info.type==get.type2(card,false)) return true; + if(info.suit!='none'&&info.suit==get.suit(card,false)) return true; + if(typeof info.number=='number'&&info.number>0&&info.number==get.number(card,false)) return true; + return info.length==get.cardNameLength(card) }, - content: function () { + content:function(){ 'step 0' - player.chooseCard('h', get.prompt('olchenshuo'), '展示一张手牌,然后展示并获得牌堆顶的牌').set('ai', function (card) { - if (get.type(card) == 'basic') return 1 + Math.random(); + player.chooseCard('h',get.prompt('olchenshuo'),'展示一张手牌,然后展示并获得牌堆顶的牌').set('ai',function(card){ + if(get.type(card)=='basic') return 1+Math.random(); return Math.random(); }) 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('olchenshuo'); - player.showCards(result.cards, get.translation(player) + '发动了【谶说】'); - var card = result.cards[0]; - event.cardInfo = { - type: get.type2(card, player), - suit: get.suit(card, player), - number: get.number(card, player), - length: get.cardNameLength(card), + player.showCards(result.cards,get.translation(player)+'发动了【谶说】'); + var card=result.cards[0]; + event.cardInfo={ + type:get.type2(card,player), + suit:get.suit(card,player), + number:get.number(card,player), + length:get.cardNameLength(card), } - event.cards = []; - event.forceDie = true; - event.includeOut = true; + event.cards=[]; + event.forceDie=true; + event.includeOut=true; } else event.finish(); 'step 2' - var judgestr = get.translation(player) + '展示的第' + get.cnNumber(cards.length + 1, true) + '张【谶说】牌'; - event.videoId = lib.status.videoId++; - var card = get.cards()[0]; - event.card = card; + var judgestr=get.translation(player)+'展示的第'+get.cnNumber(cards.length+1,true)+'张【谶说】牌'; + event.videoId=lib.status.videoId++; + var card=get.cards()[0]; + event.card=card; cards.add(card); game.cardsGotoOrdering(card); - game.addVideo('judge1', player, [get.cardInfo(card), judgestr, event.videoId]); - game.broadcastAll(function (player, card, str, id, cardid) { + game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); + game.broadcastAll(function(player,card,str,id,cardid){ var event; - if (game.online) { - event = {}; + if(game.online){ + event={}; } - else { - event = _status.event; + else{ + event=_status.event; } - if (game.chess) { - event.node = card.copy('thrown', 'center', ui.arena).addTempClass('start'); + if(game.chess){ + event.node=card.copy('thrown','center',ui.arena).addTempClass('start'); } - else { - event.node = player.$throwordered(card.copy(), true); + else{ + event.node=player.$throwordered(card.copy(),true); } - if (lib.cardOL) lib.cardOL[cardid] = event.node; - event.node.cardid = cardid; + 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=ui.create.dialog(str); event.dialog.classList.add('center'); - event.dialog.videoId = id; - }, player, card, judgestr, event.videoId, get.id()); - game.log(player, '展示了牌堆顶的', card); + event.dialog.videoId=id; + },player,card,judgestr,event.videoId,get.id()); + game.log(player,'展示了牌堆顶的',card); game.delay(2); 'step 3' - game.broadcastAll(function (id) { - var dialog = get.idDialog(id); - if (dialog) { + game.broadcastAll(function(id){ + var dialog=get.idDialog(id); + if(dialog){ dialog.close(); } ui.arena.classList.remove('thrownhighlight'); - }, event.videoId); - game.addVideo('judge2', null, event.videoId); - if (cards.length < 3 && player.isIn() && lib.skill.olchenshuo.hasSame(event.cardInfo, card)) event.goto(2); - else { - game.broadcastAll(function () { ui.clear() }); - player.gain(cards, 'gain2'); + },event.videoId); + game.addVideo('judge2',null,event.videoId); + if(cards.length<3&&player.isIn()&&lib.skill.olchenshuo.hasSame(event.cardInfo,card)) event.goto(2); + else{ + game.broadcastAll(function(){ui.clear()}); + player.gain(cards,'gain2'); } }, }, //OL文钦 - olguangao: { - audio: 2, - trigger: { - global: 'useCard2', + olguangao:{ + audio:2, + trigger:{ + global:'useCard2', }, - filter: function (event, player) { - var card = event.card; - if (card.name != 'sha') return false; - if (event.player == player) { - return game.hasPlayer(current => { - return current.isIn() && !event.targets.includes(current) && player.canUse(card, current); + filter:function(event,player){ + var card=event.card; + if(card.name!='sha') return false; + if(event.player==player){ + return game.hasPlayer(current=>{ + return current.isIn()&&!event.targets.includes(current)&&player.canUse(card,current); }); } - return event.player.isIn() && !event.targets.includes(player) && event.player.canUse(card, player); + return event.player.isIn()&&!event.targets.includes(player)&&event.player.canUse(card,player); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - if (trigger.player == player) { - player.chooseTarget(get.prompt('olguangao'), '为' + get.translation(trigger.card) + '额外指定一个目标。然后若你手牌数为偶数,你摸一张牌并令此牌对任意目标无效。', (card, player, target) => { - return !_status.event.sourcex.includes(target) && player.canUse(_status.event.card, target); - }).set('sourcex', trigger.targets).set('ai', function (target) { - var player = _status.event.player; - if (player.countCards('h') % 2 == 0) return true; - var eff = get.effect(target, _status.event.card, player, player); - if (player.hasSkill('olxieju') && player.isPhaseUsing() && !player.getStat().skill.olxieju && get.attitude(player, target) > 0 && !game.hasGlobalHistory('useCard', evt => { - return evt.targets && evt.targets.includes(target); - })) return 6 + eff; + if(trigger.player==player){ + player.chooseTarget(get.prompt('olguangao'),'为'+get.translation(trigger.card)+'额外指定一个目标。然后若你手牌数为偶数,你摸一张牌并令此牌对任意目标无效。',(card,player,target)=>{ + return !_status.event.sourcex.includes(target)&&player.canUse(_status.event.card,target); + }).set('sourcex',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + if(player.countCards('h')%2==0) return true; + var eff=get.effect(target,_status.event.card,player,player); + if(player.hasSkill('olxieju')&&player.isPhaseUsing()&&!player.getStat().skill.olxieju&&get.attitude(player,target)>0&&!game.hasGlobalHistory('useCard',evt=>{ + return evt.targets&&evt.targets.includes(target); + })) return 6+eff; return eff; - }).set('card', trigger.card); + }).set('card',trigger.card); } - else { - trigger.player.chooseBool('是否发动' + get.translation(player) + '的【犷骜】?', '令其成为' + get.translation(trigger.card) + '的额外目标。然后若其手牌数为偶数,其摸一张牌并令此牌对任意目标无效。').set('ai', () => { + else{ + trigger.player.chooseBool('是否发动'+get.translation(player)+'的【犷骜】?','令其成为'+get.translation(trigger.card)+'的额外目标。然后若其手牌数为偶数,其摸一张牌并令此牌对任意目标无效。').set('ai',()=>{ return _status.event.bool; - }).set('bool', function () { - var att = get.attitude(trigger.player, player); - if (player.countCards('h') % 2 == 0) { - if (att > 0) return true; + }).set('bool',function(){ + var att=get.attitude(trigger.player,player); + if(player.countCards('h')%2==0){ + if(att>0) return true; return false; } - if (get.effect(player, trigger.card, trigger.player, trigger.player) > 0) return true; + if(get.effect(player,trigger.card,trigger.player,trigger.player)>0) return true; return false; }()); } 'step 1' - if (result.bool) { - var target = result.targets && result.targets[0]; - if (!target) { - target = player; - trigger.player.logSkill('olguangao', player); + if(result.bool){ + var target=result.targets&&result.targets[0]; + if(!target){ + target=player; + trigger.player.logSkill('olguangao',player); } - else { - player.logSkill('olguangao', target); + else{ + player.logSkill('olguangao',target); } trigger.targets.add(target); game.delayex(); } else event.finish(); 'step 2' - if (player.countCards('h') % 2 == 0) { + if(player.countCards('h')%2==0){ player.draw(); - player.chooseTarget('犷骜:令此杀对其任意个目标无效', [1, Infinity], (card, player, target) => { + player.chooseTarget('犷骜:令此杀对其任意个目标无效',[1,Infinity],(card,player,target)=>{ return _status.event.targetsx.includes(target); - }).set('ai', target => { - return 1 - get.effect(target, _status.event.getTrigger().card, _status.event.player, _status.event.player); - }).set('targetsx', trigger.targets); + }).set('ai',target=>{ + return 1-get.effect(target,_status.event.getTrigger().card,_status.event.player,_status.event.player); + }).set('targetsx',trigger.targets); } else event.finish(); 'step 3' - if (result.bool) { + if(result.bool){ player.line(result.targets); trigger.excluded.addArray(result.targets); } } }, - olhuiqi: { - audio: 2, - trigger: { - global: 'phaseEnd', + olhuiqi:{ + audio:2, + trigger:{ + global:'phaseEnd', }, - juexingji: true, - forced: true, - skillAnimation: true, - animationColor: 'thunder', - derivation: 'olxieju', - filter: function (event, player) { - var targets = []; - game.getGlobalHistory('useCard', evt => { - if (evt.targets && evt.targets.length) { + juexingji:true, + forced:true, + skillAnimation:true, + animationColor:'thunder', + derivation:'olxieju', + filter:function(event,player){ + var targets=[]; + game.getGlobalHistory('useCard',evt=>{ + if(evt.targets&&evt.targets.length){ targets.addArray(evt.targets); } }); - return targets.length == 3 && targets.includes(player); + return targets.length==3&&targets.includes(player); }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('olhuiqi'); player.addSkills('olxieju'); player.insertPhase(); } }, - olxieju: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return event.olxieju && event.olxieju.length; + olxieju:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return event.olxieju&&event.olxieju.length; }, - onChooseToUse: function (event) { - if (!event.olxieju && !game.online) { - var targets = []; - game.getGlobalHistory('useCard', evt => { - if (evt.targets && evt.targets.length) { + onChooseToUse:function(event){ + if(!event.olxieju&&!game.online){ + var targets=[]; + game.getGlobalHistory('useCard',evt=>{ + if(evt.targets&&evt.targets.length){ targets.addArray(evt.targets); } }) - event.set('olxieju', targets); + event.set('olxieju',targets); } }, - filterTarget: function (card, player, target) { - var event = _status.event; - if (event.olxieju.includes(target)) return true; + filterTarget:function(card,player,target){ + var event=_status.event; + if(event.olxieju.includes(target)) return true; return false; }, - selectTarget: [1, Infinity], - content: function () { - var card = { - name: 'sha', - isCard: true, + selectTarget:[1,Infinity], + content:function(){ + var card={ + name:'sha', + isCard:true, }; - if (target.hasUseTarget(card, true)) { - target.chooseUseTarget(card, true, false); + if(target.hasUseTarget(card,true)){ + target.chooseUseTarget(card,true,false); } }, - ai: { - order: 1, - result: { - target: function (player, target) { - var val = target.getUseValue({ name: 'sha' }, true); + ai:{ + order:1, + result:{ + target:function(player,target){ + var val=target.getUseValue({name:'sha'},true); return Math.sign(val); } } } }, //郝普 - olzhenying: { - audio: 2, - enable: 'phaseUse', - usable: 2, - filter: function (event, player) { - return game.hasPlayer(current => { - return lib.skill.olzhenying.filterTarget(null, player, current); + olzhenying:{ + audio:2, + enable:'phaseUse', + usable:2, + filter:function(event,player){ + return game.hasPlayer(current=>{ + return lib.skill.olzhenying.filterTarget(null,player,current); }); }, - filterTarget: function (card, player, target) { - return player != target && target.countCards('h') <= player.countCards('h'); + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')<=player.countCards('h'); }, - content: function () { + content:function(){ 'step 0' - var send = function () { - var next = game.createEvent('olzhenying_adjust', false); + var send=function(){ + var next=game.createEvent('olzhenying_adjust',false); next.setContent(lib.skill.olzhenying.contentx); game.resume(); }; - var sendback = function (result, player) { - if (!result && typeof result !== 'number') { - result = player.getCards('h'); - if (!result.length) result = 0; + var sendback=function(result,player){ + if(!result&&typeof result!=='number'){ + result=player.getCards('h'); + if(!result.length) result=0; } - event.results.push([player, result]); + event.results.push([player,result]); }; - event.ai_targets = []; - event.results = []; - var players = [player, target]; - for (var i = 0; i < players.length; i++) { - if (_status.connectMode) players[i].showTimer(); - if (players[i].isOnline()) { - event.withol = true; + event.ai_targets=[]; + event.results=[]; + var players=[player,target]; + for(var i=0;i { - return get.value(b) - get.value(a); + if(event.ai_targets.length){ + for(var i=0;i{ + return get.value(b)-get.value(a); }); - var beginInd = 1; - var endInd = 2; - var eff = get.effect(player, { name: 'juedou' }, target, target), eff2 = get.effect(target, { name: 'juedou' }, player, target); - var att = get.attitude(player, target); - if (att > 0 || eff2 > 0) { - if (cards.length <= 2) { - cards = 2 - cards.length; + var beginInd=1; + var endInd=2; + var eff=get.effect(player,{name:'juedou'},target,target),eff2=get.effect(target,{name:'juedou'},player,target); + var att=get.attitude(player,target); + if(att>0||eff2>0){ + if(cards.length<=2){ + cards=2-cards.length; } - else { - beginInd = 2; endInd = 2; + else{ + beginInd=2; endInd=2; } } - else { - if (get.value(cards, target) <= 5 && !target.isZhu) { - if (eff > 0 && Math.random() < 0.65) { - beginInd = 0; endInd = 1; + else{ + if(get.value(cards,target)<=5&&!target.isZhu){ + if(eff>0&&Math.random()<0.65){ + beginInd=0; endInd=1; } } } - if (typeof cards != 'number') { - cards = cards.slice([beginInd, endInd].randomGet(), cards.length); + if(typeof cards!='number'){ + cards=cards.slice([beginInd,endInd].randomGet(),cards.length); } - sendback(cards, target); - event.ai_targets.splice(i--, 1); + sendback(cards,target); + event.ai_targets.splice(i--,1); } } - if (event.ai_targets.length) { + if(event.ai_targets.length){ event.ai_targets.randomSort(); - setTimeout(function () { - event.interval = setInterval(function () { - var target = event.ai_targets.shift(); - var cards = target.getCards('h'); - cards = cards.sort((a, b) => { - return get.value(b) - get.value(a); + setTimeout(function(){ + event.interval=setInterval(function(){ + var target=event.ai_targets.shift(); + var cards=target.getCards('h'); + cards=cards.sort((a,b)=>{ + return get.value(b)-get.value(a); }); - var beginInd = 1; - var endInd = 2; - var eff = get.effect(player, { name: 'juedou' }, target, target), eff2 = get.effect(target, { name: 'juedou' }, player, target); - var att = get.attitude(player, target); - if (att > 0 || eff2 > 0) { - if (cards.length <= 2) { - cards = 2 - cards.length; + var beginInd=1; + var endInd=2; + var eff=get.effect(player,{name:'juedou'},target,target),eff2=get.effect(target,{name:'juedou'},player,target); + var att=get.attitude(player,target); + if(att>0||eff2>0){ + if(cards.length<=2){ + cards=2-cards.length; } - else { - beginInd = 2; endInd = 2; + else{ + beginInd=2; endInd=2; } } - else { - if (get.value(cards, target) <= 5 && !target.isZhu) { - if (eff > 0 && Math.random() < 0.65) { - beginInd = 0; endInd = 1; + else{ + if(get.value(cards,target)<=5&&!target.isZhu){ + if(eff>0&&Math.random()<0.65){ + beginInd=0; endInd=1; } } } - if (typeof cards != 'number') { - cards = cards.slice([beginInd, endInd].randomGet(), cards.length); + if(typeof cards!='number'){ + cards=cards.slice([beginInd,endInd].randomGet(),cards.length); } - sendback(cards, target); - if (!event.ai_targets.length) { + sendback(cards,target); + if(!event.ai_targets.length){ clearInterval(event.interval); - if (event.withai) game.resume(); + if(event.withai) game.resume(); } - }, _status.connectMode ? 750 : 75); - }, 500); + },_status.connectMode?750:75); + },500); } } 'step 1' - if (event.withme) { - if (_status.connectMode) game.me.unwait(result, game.me); - else { - if (!result && typeof result !== 'number') { - result = game.me.getCards('h'); - if (!result.length) result = 0; + if(event.withme){ + if(_status.connectMode) game.me.unwait(result,game.me); + else{ + if(!result&&typeof result!=='number'){ + result=game.me.getCards('h'); + if(!result.length) result=0; } - event.results.push([game.me, result]); + event.results.push([game.me,result]); } } 'step 2' - if (event.withol && !event.resultOL) { + if(event.withol&&!event.resultOL){ game.pause(); } 'step 3' - if (event.ai_targets.length > 0) { - event.withai = true; + if(event.ai_targets.length>0){ + event.withai=true; game.pause(); } 'step 4' - if (_status.connectMode) { - for (var i of [player, target]) i.hideTimer(); + if(_status.connectMode){ + for(var i of [player,target]) i.hideTimer(); } - var lose_list = []; - var draw_list = []; - event.results.sort((a, b) => lib.sort.seat(a[0], b[0])); - for (var res of event.results) { - var target = res[0], cardsx = res[1]; - if (!target || !cardsx) continue; - if (typeof cardsx === 'number') draw_list.push([target, cardsx]); - else if (cardsx.length) lose_list.push([target, cardsx]); + var lose_list=[]; + var draw_list=[]; + event.results.sort((a,b)=>lib.sort.seat(a[0],b[0])); + for(var res of event.results){ + var target=res[0],cardsx=res[1]; + if(!target||!cardsx) continue; + if(typeof cardsx==='number') draw_list.push([target,cardsx]); + else if(cardsx.length) lose_list.push([target,cardsx]); } - if (lose_list.length) { + if(lose_list.length){ game.loseAsync({ - lose_list: lose_list, + lose_list:lose_list, }).setContent('discardMultiple'); } - if (draw_list.length) { - for (var list of draw_list) { - var target = list[0], num = list[1]; - target.draw(num, 'nodelay'); + if(draw_list.length){ + for(var list of draw_list){ + var target=list[0],num=list[1]; + target.draw(num,'nodelay'); } } 'step 5' game.delay(); - var num1 = player.countCards('h'), num2 = target.countCards('h'); - if (num1 == num2) { + var num1=player.countCards('h'),num2=target.countCards('h'); + if(num1==num2){ event.finish(); return; } - var players = [player, target]; - if (num2 < num1) players.reverse(); - var card = { - name: 'juedou', - isCard: true, + var players=[player,target]; + if(num2= 2) { - var cards = player.getCards('h', card => { - return lib.filter.cardDiscardable(card, player, 'olzhenying'); + var player=game.me; + event.player=player; + var num=player.countCards('h'); + if(num>=2){ + var cards=player.getCards('h',card=>{ + return lib.filter.cardDiscardable(card,player,'olzhenying'); }); - if (cards.length < num - 2) event._result = { cards: cards }; - else player.chooseCard('镇荧:请将手牌弃置至至多两张', [num - 2, num], true, (card, player, target) => { - return lib.filter.cardDiscardable(card, player, 'olzhenying'); + if(cards.length{ + return lib.filter.cardDiscardable(card,player,'olzhenying'); }); event.goto(2); } - else { - var choices = ['〇', '一', '二']; - player.chooseControl(choices).set('prompt', '镇荧:请选择要将手牌调整至的张数').set('ai', () => { - return [0, 1, 2].randomGet(); + else{ + var choices=['〇','一','二']; + player.chooseControl(choices).set('prompt','镇荧:请选择要将手牌调整至的张数').set('ai',()=>{ + return [0,1,2].randomGet(); }); } 'step 1' - var num = result.index; - var len = player.countCards('h'); - if (len > num) { - var cards = player.getCards('h', card => { - return lib.filter.cardDiscardable(card, player, 'olzhenying'); + var num=result.index; + var len=player.countCards('h'); + if(len>num){ + var cards=player.getCards('h',card=>{ + return lib.filter.cardDiscardable(card,player,'olzhenying'); }); - if (num == 0 || cards.length < len - num) { - event._result = { cards: cards }; + if(num==0||cards.length { - return lib.filter.cardDiscardable(card, player, 'olzhenying'); + else player.chooseCard('镇荧:请将手牌弃置至'+get.cnNumber(num)+'张',len-num,true,(card,player,target)=>{ + return lib.filter.cardDiscardable(card,player,'olzhenying'); }); } - else event._result = { cards: num - len }; + else event._result={cards:num-len}; 'step 2' - if (result && result.cards) { - var cards = result.cards; + if(result&&result.cards){ + var cards=result.cards; } - event.result = cards; + event.result=cards; }, - ai: { - order: function (item, player) { - if (game.hasPlayer(current => { - return current.countCards('h') < player.countCards('h'); + ai:{ + order:function(item,player){ + if(game.hasPlayer(current=>{ + return current.countCards('h') 0 && target.countCards('h') + player.countCards('h') <= 3) return 1; - return get.sgn(get.effect(target, { name: 'juedou' }, player, target)) * 1.2; + target:function(player,target){ + if(get.attitude(player,target)>0&&target.countCards('h')+player.countCards('h')<=3) return 1; + return get.sgn(get.effect(target,{name:'juedou'},player,target))*1.2; } } }, }, //OL孟达 - olgoude: { - audio: 2, - trigger: { - global: 'phaseEnd', + olgoude:{ + audio:2, + trigger:{ + global:'phaseEnd', }, - filter: function (event, player) { - var list = []; - game.countPlayer(current => { - if (current.group != player.group) return false; - var listx = lib.skill.olgoude.getActed(current); + filter:function(event,player){ + var list=[]; + game.countPlayer(current=>{ + if(current.group!=player.group) return false; + var listx=lib.skill.olgoude.getActed(current); list.addArray(listx); }); - return list.length && list.length < 4; + return list.length&&list.length<4; }, - getActed: function (target) { - var list = []; - if (target.hasHistory('gain', evt => { - return evt.getParent().name == 'draw' && evt.cards.length == 1; - })) { + getActed:function(target){ + var list=[]; + if(target.hasHistory('gain',evt=>{ + return evt.getParent().name=='draw'&&evt.cards.length==1; + })){ list.push(1); } - if (game.hasPlayer2(current => { - return current.hasHistory('lose', evt => { - if (evt.type != 'discard') return false; - if ((evt.discarder || evt.getParent(2).player) != target) return false; - var evtx = evt.getl(current); - if (!evtx || evtx.hs.length != 1) return false; + if(game.hasPlayer2(current=>{ + return current.hasHistory('lose',evt=>{ + if(evt.type!='discard') return false; + if((evt.discarder||evt.getParent(2).player)!=target) return false; + var evtx=evt.getl(current); + if(!evtx||evtx.hs.length!=1) return false; return true; }); - })) { + })){ list.push(2); } - if (target.hasHistory('useCard', evt => { - if (evt.card.name == 'sha' && evt.cards && !evt.cards.length) return true; + if(target.hasHistory('useCard',evt=>{ + if(evt.card.name=='sha'&&evt.cards&&!evt.cards.length) return true; return false; - })) { + })){ list.push(3); } - if (target.hasHistory('custom', evt => { - return evt.name == 'changeGroup'; - })) { + if(target.hasHistory('custom',evt=>{ + return evt.name=='changeGroup'; + })){ list.push(4); } return list; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = [1, 2, 3, 4]; - game.countPlayer(current => { - if (current.group != player.group) return false; - var listx = lib.skill.olgoude.getActed(current); + var list=[1,2,3,4]; + game.countPlayer(current=>{ + if(current.group!=player.group) return false; + var listx=lib.skill.olgoude.getActed(current); list.removeArray(listx); }); - var list2 = list.slice(); - var nochai = false, nosha = false; - if (!game.hasPlayer(current => { - return current.countDiscardableCards(player, 'h'); - })) { - nochai = true; + var list2=list.slice(); + var nochai=false,nosha=false; + if(!game.hasPlayer(current=>{ + return current.countDiscardableCards(player,'h'); + })){ + nochai=true; list2.remove(2); } - if (!game.hasPlayer(current => { - return player.canUse({ name: 'sha', isCard: true }, current, true, false); - })) { - nosha = true; + if(!game.hasPlayer(current=>{ + return player.canUse({name:'sha',isCard:true},current,true,false); + })){ + nosha=true; list2.remove(3); } - var choices = list2.map(i => { - return '选项' + get.cnNumber(i, true); + var choices=list2.map(i=>{ + return '选项'+get.cnNumber(i,true); }); - var choiceList = [ + var choiceList=[ '摸一张牌', '弃置一名角色的一张手牌', '视为使用一张【杀】', '将势力改为任意一个势力' - ].map((text, ind) => { - var hint = ''; - if (list2.includes(ind + 1)) { + ].map((text,ind)=>{ + var hint=''; + if(list2.includes(ind+1)){ return text; } - else if (!list.includes(ind + 1)) { - hint += '已被执行过且'; + else if(!list.includes(ind+1)){ + hint+='已被执行过且'; } - if (ind == 1 && nochai && !list2.includes(ind + 1)) hint += '无有手牌角色且'; - if (ind == 2 && nosha && !list2.includes(ind + 1)) hint += '无可选目标且'; - hint = hint.slice(0, -1); - return '' + text + '(' + hint + ')'; + if(ind==1&&nochai&&!list2.includes(ind+1)) hint+='无有手牌角色且'; + if(ind==2&&nosha&&!list2.includes(ind+1)) hint+='无可选目标且'; + hint=hint.slice(0,-1); + return ''+text+'('+hint+')'; }); choices.push('cancel2'); - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - player.chooseControl(choices).set('choiceList', choiceList).set('prompt', get.prompt('olgoude')).set('ai', () => { + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + player.chooseControl(choices).set('choiceList',choiceList).set('prompt',get.prompt('olgoude')).set('ai',()=>{ return _status.event.choice; - }).set('choice', function () { - var fn = function (control) { - switch (control) { + }).set('choice',function(){ + var fn=function(control){ + switch(control){ case '选项一': - return player.getUseValue({ name: 'draw' }); + return player.getUseValue({name:'draw'}); case '选项二': - return Math.max.apply(Math, game.filterPlayer().map(current => { - if (current.hasSkillTag('noh')) return -1; - return -1.5 * get.attitude(player, current) - Math.max(0, current.countCards('h') - 2) / 3; + return Math.max.apply(Math,game.filterPlayer().map(current=>{ + if(current.hasSkillTag('noh')) return -1; + return -1.5*get.attitude(player,current)-Math.max(0,current.countCards('h')-2)/3; })); case '选项三': - return player.getUseValue({ name: 'sha' }); + return player.getUseValue({name:'sha'}); case '选项四': - var myPopulation = game.countPlayer(current => { - return current.group == player.group; - }) - 1; - var value = Math.max.apply(Math, lib.group.map(group => { - return game.countPlayer(current => { - return current.group == group && current != player; - }) - myPopulation; + var myPopulation=game.countPlayer(current=>{ + return current.group==player.group; + })-1; + var value=Math.max.apply(Math,lib.group.map(group=>{ + return game.countPlayer(current=>{ + return current.group==group&¤t!=player; + })-myPopulation; })); - return 10 * value + 0.1 * (Math.random() - 0.5); + return 10*value+0.1*(Math.random()-0.5); case 'cancel2': return 0; } } - var choicesx = choices.map(choice => { - return [choice, fn(choice)]; + var choicesx=choices.map(choice=>{ + return [choice,fn(choice)]; }); - choicesx = choicesx.sort((a, b) => { - return b[1] - a[1]; + choicesx=choicesx.sort((a,b)=>{ + return b[1]-a[1]; }); - var choice = choicesx[0]; - if (choice[1] < 0) return 'cancel2'; + var choice=choicesx[0]; + if(choice[1]<0) return 'cancel2'; return choice[0]; }()); 'step 1' - if (result.control == 'cancel2') { + if(result.control=='cancel2'){ event.finish(); return; } - var contents = { - 选项一: function () { + var contents={ + 选项一:function(){ player.logSkill('olgoude'); player.draw(); }, - 选项二: function () { + 选项二:function(){ 'step 0' - player.chooseTarget('苟得:弃置一名角色的一张手牌', true, (card, player, target) => { - return target.countDiscardableCards(player, 'h'); - }).set('ai', target => { - if (target.hasSkillTag('noh')) return 0; - return -get.attitude(_status.event.player, target); + player.chooseTarget('苟得:弃置一名角色的一张手牌',true,(card,player,target)=>{ + return target.countDiscardableCards(player,'h'); + }).set('ai',target=>{ + if(target.hasSkillTag('noh')) return 0; + return -get.attitude(_status.event.player,target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - if (_status.connectMode) { game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); } - player.logSkill('olgoude', target); - player.discardPlayerCard(target, true, 'h'); + if(result.bool){ + var target=result.targets[0]; + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + player.logSkill('olgoude',target); + player.discardPlayerCard(target,true,'h'); } }, - 选项三: function () { - player.chooseUseTarget('sha', true, false).set('logSkill', 'olgoude').set('prompt', '苟得:选择【杀】的目标'); + 选项三:function(){ + player.chooseUseTarget('sha',true,false).set('logSkill','olgoude').set('prompt','苟得:选择【杀】的目标'); }, - 选项四: function () { + 选项四:function(){ 'step 0' - var list = lib.group.slice(); - var maxGroup = list.slice().sort((a, b) => { - return game.countPlayer(current => { - return current.group == b && current != player; - }) - game.countPlayer(current => { - return current.group == a && current != player; + var list=lib.group.slice(); + var maxGroup=list.slice().sort((a,b)=>{ + return game.countPlayer(current=>{ + return current.group==b&¤t!=player; + })-game.countPlayer(current=>{ + return current.group==a&¤t!=player; }); })[0]; - player.chooseControl(list).set('prompt', '苟得:请选择要变更为的势力').set('ai', () => { + player.chooseControl(list).set('prompt','苟得:请选择要变更为的势力').set('ai',()=>{ return _status.event.choice; - }).set('choice', maxGroup); + }).set('choice',maxGroup); 'step 1' - if (_status.connectMode) { game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); } - var group = result.control; + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + var group=result.control; player.logSkill('olgoude'); player.changeGroup(group); - player.popup(group + '2', get.groupnature(group, 'raw')); + player.popup(group+'2',get.groupnature(group,'raw')); }, } - var next = game.createEvent('olgoude_' + result.control); - next.player = player; + var next=game.createEvent('olgoude_'+result.control); + next.player=player; next.setContent(contents[result.control]); }, - ai: { - threaten: 3, - effect: { - player_use: function (card, player, target) { - if (typeof card == 'object' && card.cards && card.cards.some(card => { - return get.position(card) == 'h'; - }) && !get.tag(card, 'draw') && !get.tag(card, 'gain') && !get.tag(card, 'discard') && - player == _status.currentPhase && player.needsToDiscard() == 1 && game.countPlayer(current => { - return current.group == player.group && current != player; - }) <= 1 && lib.group.some(group => { - return game.countPlayer(current => { - return current.group == group && current != player; - }) > 2; - })) return 'zeroplayertarget'; + ai:{ + threaten:3, + effect:{ + player_use:function(card,player,target){ + if(typeof card=='object'&&card.cards&&card.cards.some(card=>{ + return get.position(card)=='h'; + })&&!get.tag(card,'draw')&&!get.tag(card,'gain')&&!get.tag(card,'discard')&& + player==_status.currentPhase&&player.needsToDiscard()==1&&game.countPlayer(current=>{ + return current.group==player.group&¤t!=player; + })<=1&&lib.group.some(group=>{ + return game.countPlayer(current=>{ + return current.group==group&¤t!=player; + })>2; + })) return 'zeroplayertarget'; }, }, }, }, //OL新改王朗 - oljici: { - audio: 'jici', - trigger: { - player: 'compare', - target: 'compare', + oljici:{ + audio:'jici', + trigger:{ + player:'compare', + target:'compare', }, - filter: function (event, player) { - if (event.player == player) { - if (event.iwhile) return false; - return event.num1 <= player.countMark('gushe'); + filter:function(event,player){ + if(event.player==player){ + if(event.iwhile) return false; + return event.num1<=player.countMark('gushe'); } - return event.num2 <= player.countMark('gushe'); + return event.num2<=player.countMark('gushe'); }, - content: function () { - var num = player.countMark('gushe'); - if (player == trigger.player) { - trigger.num1 += num; - if (trigger.num1 > 13) trigger.num1 = 13; + content:function(){ + var num=player.countMark('gushe'); + if(player==trigger.player){ + trigger.num1+=num; + if(trigger.num1>13) trigger.num1=13; } - else { - trigger.num2 += num; - if (trigger.num2 > 13) trigger.num2 = 13; + else{ + trigger.num2+=num; + if(trigger.num2>13) trigger.num2=13; } - game.log(player, '的拼点牌点数+' + num); - var stat = player.getStat().skill; + game.log(player,'的拼点牌点数+'+num); + var stat=player.getStat().skill; delete stat.gushe; } }, //OL刘老板 - olpianan: { - audio: 2, - trigger: { - player: ['enterGame', 'phaseDiscardEnd'], - global: 'phaseBefore', + olpianan:{ + audio:2, + trigger:{ + player:['enterGame','phaseDiscardEnd'], + global:'phaseBefore', }, - forced: true, - filter: function (event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + forced:true, + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - content: function () { + content:function(){ 'step 0' - var hs = player.getCards('h', card => { - return get.name(card) != 'shan' && lib.filter.cardDiscardable(card, player, 'olpianan'); + var hs=player.getCards('h',card=>{ + return get.name(card)!='shan'&&lib.filter.cardDiscardable(card,player,'olpianan'); }); - if (hs.length) player.discard(hs); + if(hs.length) player.discard(hs); 'step 1' - var num = player.hp - player.countCards('h'); - if (num > 0) { - var cards = []; - for (var i = 0; i < ui.cardPile.childNodes.length; i++) { - var card = ui.cardPile.childNodes[i]; - if (card.name == 'shan') { + var num=player.hp-player.countCards('h'); + if(num>0){ + var cards=[]; + for(var i=0;i 0) { - for (var i = 0; i < ui.discardPile.childNodes.length; i++) { - var card = ui.discardPile.childNodes[i]; - if (card.name == 'shan') { + if(num>0){ + for(var i=0;i { - var player = _status.event.player; - if (!player.isDamaged() || player.hp > 3 && player.getDamagedHp() == 1 || player.maxHp < 3) return 1; + player.chooseControl('体力','体力上限').set('prompt','殷积:回复1点体力或加1点体力上限').set('ai',()=>{ + var player=_status.event.player; + if(!player.isDamaged()||player.hp>3&&player.getDamagedHp()==1||player.maxHp<3) return 1; return 0; }); 'step 1' - player[result.index == 0 ? 'recover' : 'gainMaxHp'](); + player[result.index==0?'recover':'gainMaxHp'](); } }, - olkuisi: { - audio: 2, - trigger: { player: 'phaseDrawBefore' }, - forced: true, - content: function () { + olkuisi:{ + audio:2, + trigger:{player:'phaseDrawBefore'}, + forced:true, + content:function(){ 'step 0' trigger.cancel(); - var cards = game.cardsGotoOrdering(get.cards(4)).cards; - event.cards = cards.slice(); + var cards=game.cardsGotoOrdering(get.cards(4)).cards; + event.cards=cards.slice(); 'step 1' - player.chooseButton(['窥伺:是否使用其中的一张牌?', cards]).set('filterButton', button => { + player.chooseButton(['窥伺:是否使用其中的一张牌?',cards]).set('filterButton',button=>{ return _status.event.player.hasUseTarget(button.link); - }).set('ai', button => { - var player = _status.event.player, card = button.link, cards = _status.event.getParent().cards; - var val = player.getUseValue(card) + 0.01; - if (val > 0 && cards.length > 1 || val > 4 && cards.length == 1 && (player.maxHp > 3 || player.isDamaged())) return get.order(card) + val / 5; + }).set('ai',button=>{ + var player=_status.event.player,card=button.link,cards=_status.event.getParent().cards; + var val=player.getUseValue(card)+0.01; + if(val>0&&cards.length>1||val>4&&cards.length==1&&(player.maxHp>3||player.isDamaged())) return get.order(card)+val/5; return 0; }); 'step 2' - if (result.bool) { - var card = result.links[0]; + if(result.bool){ + var card=result.links[0]; event.cards.remove(card); - player.$gain2(card, false); + player.$gain2(card,false); game.delayx(); - player.chooseUseTarget(true, card, false); + player.chooseUseTarget(true,card,false); } else event.goto(4); 'step 3' - if (cards.some(i => get.position(i, true) == 'o' && player.hasUseTarget(i))) event.goto(1); + if(cards.some(i=>get.position(i,true)=='o'&&player.hasUseTarget(i))) event.goto(1); 'step 4' - if (cards.length != 1 && cards.length != 2) { + if(cards.length!=1&&cards.length!=2){ player.loseMaxHp(); } } }, //卢氏 - olzhuyan: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - init: function (player) { + olzhuyan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + init:function(player){ player.addSkill('olzhuyan_record'); }, - onremove: ['olzhuyan_true', 'olzhuyan_false'], - direct: true, - filter: function (event, player) { - for (var bool of [true, false]) { - var targeted = player.getStorage('olzhuyan_' + bool); - if (game.hasPlayer(current => { - return !targeted.includes(current) && lib.skill.olzhuyan.getNum(current, bool); + onremove:['olzhuyan_true','olzhuyan_false'], + direct:true, + filter:function(event,player){ + for(var bool of [true,false]){ + var targeted=player.getStorage('olzhuyan_'+bool); + if(game.hasPlayer(current=>{ + return !targeted.includes(current)&&lib.skill.olzhuyan.getNum(current,bool); })) return true; } return false; }, - getNum: function (player, status) { - if (!_status.olzhuyan || !_status.olzhuyan[player.playerid]) return 0; - var num = _status.olzhuyan[player.playerid][status ? 1 : 0]; - if (status) { - num -= player.countCards('h'); - if (num + player.countCards('h') > 5) num = 5 - player.countCards('h'); + getNum:function(player,status){ + if(!_status.olzhuyan||!_status.olzhuyan[player.playerid]) return 0; + var num=_status.olzhuyan[player.playerid][status?1:0]; + if(status){ + num-=player.countCards('h'); + if(num+player.countCards('h')>5) num=5-player.countCards('h'); } - else { - num -= player.hp; - if (num + player.hp < 1) num = 1 - player.hp; + else{ + num-=player.hp; + if(num+player.hp<1) num=1-player.hp; } return num; }, - content: function () { + content:function(){ 'step 0' - var map = {}; - for (var bool of [true, false]) { - var targeted = player.getStorage('olzhuyan_' + bool); - game.countPlayer(current => { - if (targeted.includes(current)) return false; - if (!map[current.playerid]) map[current.playerid] = []; - map[current.playerid][bool ? 1 : 0] = lib.skill.olzhuyan.getNum(current, bool); + var map={}; + for(var bool of [true,false]){ + var targeted=player.getStorage('olzhuyan_'+bool); + game.countPlayer(current=>{ + if(targeted.includes(current)) return false; + if(!map[current.playerid]) map[current.playerid]=[]; + map[current.playerid][bool?1:0]=lib.skill.olzhuyan.getNum(current,bool); }); } - event.map = map; - player.chooseTarget(get.prompt('olzhuyan'), '令一名角色将{体力值/手牌数}调整至与其上个准备阶段相同(“--”表示已对其发动过该分支)', (card, player, target) => { - var list = _status.event.map[target.playerid]; - return list && (list[0] || list[1]); - }).set('map', map).set('targetprompt', target => { - var list = _status.event.map[target.playerid]; - var str = ''; - for (var i = 0; i < 2; i++) { - if (list[i] === undefined) str += '--'; - else { - str += (list[i] > 0 ? '+' : '') + list[i]; + event.map=map; + player.chooseTarget(get.prompt('olzhuyan'),'令一名角色将{体力值/手牌数}调整至与其上个准备阶段相同(“--”表示已对其发动过该分支)',(card,player,target)=>{ + var list=_status.event.map[target.playerid]; + return list&&(list[0]||list[1]); + }).set('map',map).set('targetprompt',target=>{ + var list=_status.event.map[target.playerid]; + var str=''; + for(var i=0;i<2;i++){ + if(list[i]===undefined) str+='--'; + else{ + str+=(list[i]>0?'+':'')+list[i]; } - str += '/'; + str+='/'; } - return str.slice(0, -1); - }).set('ai', target => { - var list = _status.event.map[target.playerid]; - var att = get.attitude(_status.event.player, target); - var v1 = list[0], v2 = get.sgn(list[1]) * Math.sqrt(Math.abs(list[1])); - return Math[att > 0 ? 'max' : 'min'](v1, v2) * att; + return str.slice(0,-1); + }).set('ai',target=>{ + var list=_status.event.map[target.playerid]; + var att=get.attitude(_status.event.player,target); + var v1=list[0],v2=get.sgn(list[1])*Math.sqrt(Math.abs(list[1])); + return Math[att>0?'max':'min'](v1,v2)*att; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('olzhuyan', target); - event.target = target; - var list = event.map[target.playerid]; - var choices = ['体力值', '手牌数']; - if (list[0] && list[1]) { - player.chooseControl(choices).set('choiceList', [ - '令' + get.translation(target) + (list[0] > 0 ? '回复' : '失去') + Math.abs(list[0]) + '点体力' + (list[0] < 0 ? '(至多失去至1)' : ''), - '令' + get.translation(target) + (list[1] > 0 ? '摸' : '弃置') + get.cnNumber(Math.abs(list[1])) + '张' + (list[1] > 0 ? '' : '手') + '牌' + (list[1] > 0 ? '(至多摸至5)' : ''), - ]).set('prompt', '驻颜:请选择一项').set('ai', () => _status.event.choice).set('choice', function () { - var v1 = list[0], v2 = get.sgn(list[1]) * Math.sqrt(Math.abs(list[1])); - if (get.attitude(player, target) > 0) { - return v1 > v2 ? 0 : 1; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('olzhuyan',target); + event.target=target; + var list=event.map[target.playerid]; + var choices=['体力值','手牌数']; + if(list[0]&&list[1]){ + player.chooseControl(choices).set('choiceList',[ + '令'+get.translation(target)+(list[0]>0?'回复':'失去')+Math.abs(list[0])+'点体力'+(list[0]<0?'(至多失去至1)':''), + '令'+get.translation(target)+(list[1]>0?'摸':'弃置')+get.cnNumber(Math.abs(list[1]))+'张'+(list[1]>0?'':'手')+'牌'+(list[1]>0?'(至多摸至5)':''), + ]).set('prompt','驻颜:请选择一项').set('ai',()=>_status.event.choice).set('choice',function(){ + var v1=list[0],v2=get.sgn(list[1])*Math.sqrt(Math.abs(list[1])); + if(get.attitude(player,target)>0){ + return v1>v2?0:1; } - return v1 > v2 ? 1 : 0; + return v1>v2?1:0; }()); } - else { - event._result = { index: list[0] ? 0 : 1 }; + else{ + event._result={index:list[0]?0:1}; } } else event.finish(); 'step 2' - var ind = result.index; - player.markAuto('olzhuyan_' + Boolean(ind), [target]); - var num = event.map[target.playerid][ind]; - if (ind == 0) { - if (num > 0) { + var ind=result.index; + player.markAuto('olzhuyan_'+Boolean(ind),[target]); + var num=event.map[target.playerid][ind]; + if(ind==0){ + if(num>0){ target.recover(num); } - else { - num = Math.min(target.hp - 1, -num); + else{ + num=Math.min(target.hp-1,-num); target.loseHp(num); } } - else { - if (num > 0) { - num = Math.min(5 - target.countCards('h'), num); - if (num > 0) target.draw(num); + else{ + if(num>0){ + num=Math.min(5-target.countCards('h'),num); + if(num>0) target.draw(num); } - else { - num = -num; - target.chooseToDiscard(num, true).set('prompt', '驻颜:请弃置' + get.cnNumber(Math.abs(num)) + '张手牌'); + else{ + num=-num; + target.chooseToDiscard(num,true).set('prompt','驻颜:请弃置'+get.cnNumber(Math.abs(num))+'张手牌'); } } }, - subSkill: { - record: { - trigger: { - global: ['phaseZhunbeiAfter', 'phaseBefore', 'enterGame'], + subSkill:{ + record:{ + trigger:{ + global:['phaseZhunbeiAfter','phaseBefore','enterGame'], }, - lastDo: true, - charlotte: true, - forced: true, - popup: false, - forceDie: true, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0); + lastDo:true, + charlotte:true, + forced:true, + popup:false, + forceDie:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); }, - content: function () { - if (!_status.olzhuyan) _status.olzhuyan = {}; - if (event.triggername == 'phaseBefore') { - game.countPlayer(current => { - _status.olzhuyan[current.playerid] = [current.hp, current.countCards('h')]; + content:function(){ + if(!_status.olzhuyan) _status.olzhuyan={}; + if(event.triggername=='phaseBefore'){ + game.countPlayer(current=>{ + _status.olzhuyan[current.playerid]=[current.hp,current.countCards('h')]; }) } - else { - _status.olzhuyan[trigger.player.playerid] = [trigger.player.hp, trigger.player.countCards('h')]; + else{ + _status.olzhuyan[trigger.player.playerid]=[trigger.player.hp,trigger.player.countCards('h')]; } }, } } }, - olleijie: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - content: function () { + olleijie:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('olleijie'), '令一名角色判定。若结果为♠2~9,其受到2点雷电伤害,否则其摸两张牌。').set('ai', target => { - var player = _status.event.player, sgn = _status.event.sgn; - if (sgn > 0) { - return get.damageEffect(target, target, player, 'thunder'); + player.chooseTarget(get.prompt('olleijie'),'令一名角色判定。若结果为♠2~9,其受到2点雷电伤害,否则其摸两张牌。').set('ai',target=>{ + var player=_status.event.player,sgn=_status.event.sgn; + if(sgn>0){ + return get.damageEffect(target,target,player,'thunder'); } - else if (sgn == 0) { - return get.attitude(player, target); + else if(sgn==0){ + return get.attitude(player,target); } return 0; - }).set('sgn', function () { - var sgn = 0; - game.countPlayer(current => { - if (!current.hasSkillTag('rejudge')) return; - sgn = get.sgnAttitude(player, current); + }).set('sgn',function(){ + var sgn=0; + game.countPlayer(current=>{ + if(!current.hasSkillTag('rejudge')) return; + sgn=get.sgnAttitude(player,current); }); return sgn; }()) 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('olleijie', target); - target.judge(card => { - var number = get.number(card); - if (get.suit(card) == 'spade' && number >= 2 && number <= 9) return -4; + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('olleijie',target); + target.judge(card=>{ + var number=get.number(card); + if(get.suit(card)=='spade'&&number>=2&&number<=9) return -4; return 2; - }).set('judge2', result => { - return result.bool === false ? true : false; + }).set('judge2',result=>{ + return result.bool===false?true:false; }); } else event.finish(); 'step 2' - if (result.bool) { + if(result.bool){ target.draw(2); } - else { - target.damage(2, 'thunder'); + else{ + target.damage(2,'thunder'); } } }, //张世平 - olhongji: { - audio: 2, - trigger: { global: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - if (event.player.isMinHandcard() && !player.hasSkill('olhongji_min')) return true; - if (event.player.isMaxHandcard() && !player.hasSkill('olhongji_max')) return true; + olhongji:{ + audio:2, + trigger:{global:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(event.player.isMinHandcard()&&!player.hasSkill('olhongji_min')) return true; + if(event.player.isMaxHandcard()&&!player.hasSkill('olhongji_max')) return true; return false; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var target = trigger.player; - event.target = target; - var bool1 = target.isMinHandcard() && !player.hasSkill('olhongji_min'), str1 = '其手牌数为全场最少。你可以令其于本回合摸牌阶段结束后执行一个额外的摸牌阶段,然后本轮你不能再发动该分支。'; - var bool2 = target.isMaxHandcard() && !player.hasSkill('olhongji_max'), str2 = '其手牌数为全场最多。你可以令其于本回合出牌阶段结束后执行一个额外的出牌阶段,然后本轮你不能再发动该分支。'; - if (bool1 && !bool2) { - event.branch = 0; - player.chooseBool(get.prompt('olhongji', target), str1).set('ai', () => { + var target=trigger.player; + event.target=target; + var bool1=target.isMinHandcard()&&!player.hasSkill('olhongji_min'),str1='其手牌数为全场最少。你可以令其于本回合摸牌阶段结束后执行一个额外的摸牌阶段,然后本轮你不能再发动该分支。'; + var bool2=target.isMaxHandcard()&&!player.hasSkill('olhongji_max'),str2='其手牌数为全场最多。你可以令其于本回合出牌阶段结束后执行一个额外的出牌阶段,然后本轮你不能再发动该分支。'; + if(bool1&&!bool2){ + event.branch=0; + player.chooseBool(get.prompt('olhongji',target),str1).set('ai',()=>{ return _status.event.bool; - }).set('bool', get.attitude(player, trigger.player) > 1); + }).set('bool',get.attitude(player,trigger.player)>1); } - else if (!bool1 && bool2) { - event.branch = 1; - player.chooseBool(get.prompt('olhongji', target), str2).set('ai', () => { + else if(!bool1&&bool2){ + event.branch=1; + player.chooseBool(get.prompt('olhongji',target),str2).set('ai',()=>{ return _status.event.bool; - }).set('bool', get.attitude(player, trigger.player) > 1); + }).set('bool',get.attitude(player,trigger.player)>1); } - else if (bool1 && bool2) { - player.chooseControl('摸牌阶段', '出牌阶段', 'cancel2').set('prompt', get.prompt('olhongji', target)).set('choiceList', [ + else if(bool1&&bool2){ + player.chooseControl('摸牌阶段','出牌阶段','cancel2').set('prompt',get.prompt('olhongji',target)).set('choiceList',[ str1.slice(13), str2.slice(13) - ]).set('ai', () => _status.event.bool).set('bool', () => get.attitude(player, trigger.player) > 1 ? [0, 1].randomGet() : 'cancel2'); + ]).set('ai',()=>_status.event.bool).set('bool',()=>get.attitude(player,trigger.player)>1?[0,1].randomGet():'cancel2'); } 'step 1' - var choice = -1; - if (event.branch == 0 && result.bool || result.control == '摸牌阶段') choice = 0; - if (event.branch == 1 && result.bool || result.control == '出牌阶段') choice = 1; - if (choice == 0) { - player.logSkill('olhongji', target); - player.addTempSkill('olhongji_min', 'roundStart'); + var choice=-1; + if(event.branch==0&&result.bool||result.control=='摸牌阶段') choice=0; + if(event.branch==1&&result.bool||result.control=='出牌阶段') choice=1; + if(choice==0){ + player.logSkill('olhongji',target); + player.addTempSkill('olhongji_min','roundStart'); target.addTempSkill('olhongji_draw'); } - else if (choice == 1) { - player.logSkill('olhongji', target); - player.addTempSkill('olhongji_max', 'roundStart'); + else if(choice==1){ + player.logSkill('olhongji',target); + player.addTempSkill('olhongji_max','roundStart'); target.addTempSkill('olhongji_use'); } }, - ai: { expose: 0.25 }, - subSkill: { - min: { charlotte: true }, - max: { charlotte: true }, - draw: { - trigger: { player: 'phaseDrawAfter' }, - charlotte: true, - forced: true, - popup: false, - content: function () { - var next = trigger.player.phaseDraw(); + ai:{expose:0.25}, + subSkill:{ + min:{charlotte:true}, + max:{charlotte:true}, + draw:{ + trigger:{player:'phaseDrawAfter'}, + charlotte:true, + forced:true, + popup:false, + content:function(){ + var next=trigger.player.phaseDraw(); event.next.remove(next); trigger.getParent('phase').next.push(next); player.removeSkill('olhongji_draw'); } }, - use: { - trigger: { player: 'phaseUseAfter' }, - charlotte: true, - forced: true, - popup: false, - content: function () { - var next = trigger.player.phaseUse(); + use:{ + trigger:{player:'phaseUseAfter'}, + charlotte:true, + forced:true, + popup:false, + content:function(){ + var next=trigger.player.phaseUse(); event.next.remove(next); trigger.getParent('phase').next.push(next); player.removeSkill('olhongji_use'); @@ -4836,102 +4837,102 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - olxinggu: { - audio: 2, - trigger: { global: 'phaseBefore', player: 'enterGame' }, - forced: true, - locked: false, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0); + olxinggu:{ + audio:2, + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - group: 'olxinggu_trade', - content: function () { + group:'olxinggu_trade', + content:function(){ 'step 0' - var cards = []; - for (var i = 0; i < 3; i++) { - var card = get.cardPile2(function (card) { - if (cards.includes(card)) return false; - var type = get.subtype(card); - return type == 'equip3' || type == 'equip4' || type == 'equip6'; + var cards=[]; + for(var i=0;i<3;i++){ + var card=get.cardPile2(function(card){ + if(cards.includes(card)) return false; + var type=get.subtype(card); + return type=='equip3'||type=='equip4'||type=='equip6'; }); - if (card) cards.add(card); + if(card) cards.add(card); else break; } - if (cards.length) player.addToExpansion(cards, 'draw').gaintag.add('olxinggu'); + if(cards.length) player.addToExpansion(cards,'draw').gaintag.add('olxinggu'); }, - marktext: '贾', - intro: { - markcount: 'expansion', - mark: function (dialog, content, player) { - var content = player.getExpansions('olxinggu'); - if (content && content.length) { - if (player == game.me || player.isUnderControl()) { + marktext:'贾', + intro:{ + markcount:'expansion', + mark:function(dialog,content,player){ + var content=player.getExpansions('olxinggu'); + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ dialog.addAuto(content); } - else { - return '剩余' + get.cnNumber(content.length) + '匹马'; + else{ + return '剩余'+get.cnNumber(content.length)+'匹马'; } } } }, - subSkill: { - trade: { - audio: 'olxinggu', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { + subSkill:{ + trade:{ + audio:'olxinggu', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ return player.getExpansions('olxinggu').length; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var cards = player.getExpansions('olxinggu'); - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - player.chooseButton([get.prompt('olxinggu'), cards]).set('ai', button => { - if (_status.event.toChoose == button.link) return 1; + var cards=player.getExpansions('olxinggu'); + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + player.chooseButton([get.prompt('olxinggu'),cards]).set('ai',button=>{ + if(_status.event.toChoose==button.link) return 1; return 0; - }).set('toChoose', !event.aiCancel && cards.find(card => { - return game.hasPlayer(current => { - if (!lib.skill.zhijian.filterTarget(card, player, current)) return false; - return get.effect(current, card, player, player) > 0; + }).set('toChoose',!event.aiCancel&&cards.find(card=>{ + return game.hasPlayer(current=>{ + if(!lib.skill.zhijian.filterTarget(card,player,current)) return false; + return get.effect(current,card,player,player)>0; }); })); 'step 1' - if (result.bool) { - var card = result.links[0]; - event.card = card; - player.chooseTarget('将' + get.translation(card) + '置入一名其他角色的装备区', lib.skill.zhijian.filterTarget).set('ai', target => { - var player = _status.event.player; - return get.effect(target, _status.event.card, player, player); - }).set('card', card); + if(result.bool){ + var card=result.links[0]; + event.card=card; + player.chooseTarget('将'+get.translation(card)+'置入一名其他角色的装备区',lib.skill.zhijian.filterTarget).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',card); } - else { - if (_status.connectMode) { game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); } + else{ + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} event.finish(); } 'step 2' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - if (_status.connectMode) { game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); } - player.logSkill('olxinggu', target); - player.$give(card, target, false); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + player.logSkill('olxinggu',target); + player.$give(card,target,false); } - else { - if (!event.isMine() && !event.isOnline()) event.aiCancel = true; + else{ + if(!event.isMine()&&!event.isOnline()) event.aiCancel=true; event.goto(0); } 'step 3' target.equip(card); 'step 4' - var card = get.cardPile2(cardx => { - return get.suit(cardx) == 'diamond'; + var card=get.cardPile2(cardx=>{ + return get.suit(cardx)=='diamond'; }); - if (card) player.gain(card, 'gain2'); - else { + if(card) player.gain(card,'gain2'); + else{ game.log('但是牌堆中并没有♦牌了!'); player.chat('做了个亏本买卖…'); } @@ -4940,281 +4941,281 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //孙弘 - olxianbi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return !player.getStorage('olzenrun').includes(target) && target.countCards('e') != player.countCards('h'); + olxianbi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return !player.getStorage('olzenrun').includes(target)&&target.countCards('e')!=player.countCards('h'); }, - content: function () { + content:function(){ 'step 0' - var del = target.countCards('e') - player.countCards('h'); - if (del == 0) event.finish(); - else if (del > 0) { - player.draw(Math.min(5, del)); + var del=target.countCards('e')-player.countCards('h'); + if(del==0) event.finish(); + else if(del>0){ + player.draw(Math.min(5,del)); } - else { - player.chooseToDiscard('险诐:弃置' + get.cnNumber(-del) + '张手牌', -del, 'h', true); + else{ + player.chooseToDiscard('险诐:弃置'+get.cnNumber(-del)+'张手牌',-del,'h',true); player.addTempSkill('olxianbi_gain'); } }, - ai: { - order: 5, - result: { - player: function (player, target) { - return player.countCards('h', card => { - return get.value(card) > 6; - }) >= target.countCards('e') ? 0 : 1; + ai:{ + order:5, + result:{ + player:function(player,target){ + return player.countCards('h',card=>{ + return get.value(card)>6; + })>=target.countCards('e')?0:1; } } }, - subSkill: { - gain: { - trigger: { - player: 'loseAfter', + subSkill:{ + gain:{ + trigger:{ + player:'loseAfter', }, - filter: function (event, player) { - return event.getParent(3).name == 'olxianbi'; + filter:function(event,player){ + return event.getParent(3).name=='olxianbi'; }, - forced: true, - charlotte: true, - popup: false, - content: function () { - var cards = [], cards2 = trigger.cards; - for (var cardx of cards2) { - var type = get.type2(cardx, player); - var card = get.discardPile(function (card) { - return get.type(card, false) == type && !cards2.includes(card) && !cards.includes(card); + forced:true, + charlotte:true, + popup:false, + content:function(){ + var cards=[],cards2=trigger.cards; + for(var cardx of cards2){ + var type=get.type2(cardx,player); + var card=get.discardPile(function(card){ + return get.type(card,false)==type&&!cards2.includes(card)&&!cards.includes(card); }); - if (card) cards.push(card); + if(card) cards.push(card); } - if (cards.length) player.gain(cards, 'gain2'); + if(cards.length) player.gain(cards,'gain2'); } } } }, - olzenrun: { - audio: 2, - trigger: { player: 'drawBefore' }, - filter: function (event, player) { - return !player.hasSkill('olzenrun_used') && game.hasPlayer(current => { - return !player.getStorage('olzenrun').includes(current) && current != player && current.hasCard(function (card) { - return lib.filter.canBeGained(card, player, current); - }, 'he') + olzenrun:{ + audio:2, + trigger:{player:'drawBefore'}, + filter:function(event,player){ + return !player.hasSkill('olzenrun_used')&&game.hasPlayer(current=>{ + return !player.getStorage('olzenrun').includes(current)&¤t!=player&¤t.hasCard(function(card){ + return lib.filter.canBeGained(card,player,current); + },'he') }); }, - direct: true, - check: function (event, player) { + direct:true, + check:function(event,player){ return true; }, - content: function () { + content:function(){ 'step 0' - var num = trigger.num; - player.chooseTarget(get.prompt('olzenrun'), '改为获得一名其他角色' + get.cnNumber(num) + '张牌', (card, player, target) => { - return !player.getStorage('olzenrun').includes(target) && target != player && target.hasCard(function (card) { - return lib.filter.canBeGained(card, player, target); - }, 'he') - }).set('ai', target => { - return get.attitude(_status.event.player, target) / 5 + Math.random() + 2.5; + var num=trigger.num; + player.chooseTarget(get.prompt('olzenrun'),'改为获得一名其他角色'+get.cnNumber(num)+'张牌',(card,player,target)=>{ + return !player.getStorage('olzenrun').includes(target)&&target!=player&&target.hasCard(function(card){ + return lib.filter.canBeGained(card,player,target); + },'he') + }).set('ai',target=>{ + return get.attitude(_status.event.player,target)/5+Math.random()+2.5; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('olzenrun', target); - player.addTempSkill('olzenrun_used', ['phaseZhunbeiAfter', 'phaseJudgeAfter', 'phaseDrawAfter', 'phaseUseAfter', 'phaseDiscardAfter', 'phaseJieshuAfter']); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('olzenrun',target); + player.addTempSkill('olzenrun_used',['phaseZhunbeiAfter','phaseJudgeAfter','phaseDrawAfter','phaseUseAfter','phaseDiscardAfter','phaseJieshuAfter']); trigger.cancel(); - player.gainPlayerCard(target, trigger.num, 'he', true); + player.gainPlayerCard(target,trigger.num,'he',true); } 'step 2' - if (result.bool) { - var cards = result.cards; - var num = cards.length; - event.num = num; - target.chooseControl().set('choiceList', [ - '摸' + get.cnNumber(num) + '张牌', + if(result.bool){ + var cards=result.cards; + var num=cards.length; + event.num=num; + target.chooseControl().set('choiceList',[ + '摸'+get.cnNumber(num)+'张牌', '令其不能再对你发动〖险诐〗和〖谮润〗' - ]).set('prompt', get.translation(player) + '对你发动了【谮润】,请选择一项').set('ai', () => { - if (_status.event.bool) return 0; + ]).set('prompt',get.translation(player)+'对你发动了【谮润】,请选择一项').set('ai',()=>{ + if(_status.event.bool) return 0; return 1; - }).set('bool', get.attitude(target, player) > 0 || num == 1 && Math.random() < 0.5 || num >= 2); + }).set('bool',get.attitude(target,player)>0||num==1&&Math.random()<0.5||num>=2); } else event.finish(); 'step 3' - game.log(target, '选择了', '#y' + result.control); - if (result.index == 0) { + game.log(target,'选择了','#y'+result.control); + if(result.index==0){ target.draw(num); } - else { - player.markAuto('olzenrun', [target]); + else{ + player.markAuto('olzenrun',[target]); } }, - subSkill: { - used: { - charlotte: true, + subSkill:{ + used:{ + charlotte:true, } } }, //罗宪 - oldaili: { - audio: 2, - trigger: { global: 'phaseEnd' }, - filter: function (event, player) { - return player.countCards('h', card => { + oldaili:{ + audio:2, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return player.countCards('h',card=>{ return card.hasGaintag('oldaili_tag'); - }) % 2 == 0; + })%2==0; }, - group: 'oldaili_record', - locked: false, - check: function (event, player) { - if (get.distance(event.player, player, 'absolute') == 1 && !player.isTurnedOver()) return false; + group:'oldaili_record', + locked:false, + check:function(event,player){ + if(get.distance(event.player,player,'absolute')==1&&!player.isTurnedOver()) return false; return true; }, - content: function () { + content:function(){ player.turnOver(); - player.draw(3, 'visible').gaintag = ['oldaili_tag']; + player.draw(3,'visible').gaintag=['oldaili_tag']; }, - mod: { - aiValue: function (player, card, num) { - if (num < 0 || get.itemtype(card) != 'card' || !card.hasGaintag('oldaili_tag')) return; - if (get.distance(_status.currentPhase, player, 'absolute') == 1 && !player.isTurnedOver()) return; + mod:{ + aiValue:function(player,card,num){ + if(num < 0 ||get.itemtype(card) != 'card' || !card.hasGaintag('oldaili_tag')) return; + if(get.distance(_status.currentPhase, player, 'absolute') == 1 && !player.isTurnedOver()) return; let dai = player.countCards('h', (card) => { return card.hasGaintag('oldaili_tag'); }); - if (ui.selected.cards && ui.selected.cards.length) dai += ui.selected.cards.filter((card) => { + if(ui.selected.cards && ui.selected.cards.length) dai += ui.selected.cards.filter((card) => { return card.hasGaintag('oldaili_tag'); }).length; - if (dai % 2) return Math.sqrt(num); + if(dai % 2) return Math.sqrt(num); return num + 6; }, - aiUseful: function () { - return lib.skill.oldaili.mod.aiValue.apply(this, arguments); + aiUseful:function(){ + return lib.skill.oldaili.mod.aiValue.apply(this,arguments); }, }, - mark: true, - marktext: '砺', - intro: { - markcount: function (storage, player) { - return player.countCards('h', card => card.hasGaintag('oldaili_tag')); + mark:true, + marktext:'砺', + intro:{ + markcount:function(storage,player){ + return player.countCards('h',card=>card.hasGaintag('oldaili_tag')); }, - mark: function (dialog, content, player) { - var cards = player.getCards('h', card => card.hasGaintag('oldaili_tag')); - if (cards.length) { + mark:function(dialog,content,player){ + var cards=player.getCards('h',card=>card.hasGaintag('oldaili_tag')); + if(cards.length){ dialog.addAuto(cards); } else return '无展示牌'; }, }, - subSkill: { - record: { - trigger: { global: 'showCardsEnd' }, - forced: true, - charlotte: true, - popup: false, - firstDo: true, - filter: function (event, player) { - return event.cards.some(i => get.owner(i) == player); + subSkill:{ + record:{ + trigger:{global:'showCardsEnd'}, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.cards.some(i=>get.owner(i)==player); }, - content: function () { - game.broadcastAll(function (cards) { - cards.forEach(card => card.addGaintag('oldaili_tag')); - }, trigger.cards.filter(i => get.owner(i) == player)); + content:function(){ + game.broadcastAll(function(cards){ + cards.forEach(card=>card.addGaintag('oldaili_tag')); + },trigger.cards.filter(i=>get.owner(i)==player)); player.markSkill('oldaili'); } }, } }, //胡班 - olhuiyun: { - audio: 2, - enable: 'phaseUse', - viewAs: { - name: 'huogong', - storage: { olhuiyun: true }, + olhuiyun:{ + audio:2, + enable:'phaseUse', + viewAs:{ + name:'huogong', + storage:{olhuiyun:true}, }, - filterCard: true, - position: 'hes', - onuse: function (links, player) { + filterCard:true, + position:'hes', + onuse:function(links,player){ player.addTempSkill('olhuiyun_after'); player.addTempSkill('olhuiyun_record'); }, - ai: { - effect: { - player: function (card, player, target) { - if (get.attitude(player, target) > 0 && card && card.name == 'huogong' && card.storage && card.storage.olhuiyun && !player.hasSkill('olhuiyun_3')) return [0, 0.5, 0, 0.5]; + ai:{ + effect:{ + player:function(card,player,target){ + if(get.attitude(player,target)>0&&card&&card.name=='huogong'&&card.storage&&card.storage.olhuiyun&&!player.hasSkill('olhuiyun_3')) return [0,0.5,0,0.5]; } } }, - subSkill: { - after: { - audio: 'olhuiyun', - trigger: { global: 'useCardAfter' }, - charlotte: true, - forced: true, - direct: true, - filter: function (event, player) { - return event.card.name == 'huogong' && event.card.storage && event.card.storage.olhuiyun && event.targets.some(i => i.isIn()); + subSkill:{ + after:{ + audio:'olhuiyun', + trigger:{global:'useCardAfter'}, + charlotte:true, + forced:true, + direct:true, + filter:function(event,player){ + return event.card.name=='huogong'&&event.card.storage&&event.card.storage.olhuiyun&&event.targets.some(i=>i.isIn()); }, - content: function () { + content:function(){ 'step 0' - var choices = []; - var choiceList = [ + var choices=[]; + var choiceList=[ '使用展示牌,然后重铸所有手牌', '使用一张手牌,然后重铸展示牌', '摸一张牌' ]; - for (var i = 1; i <= 3; i++) { - if (!player.hasSkill('olhuiyun_' + i)) choices.push('选项' + get.cnNumber(i, true)); - else choiceList[i - 1] = '' + choiceList[i - 1] + ''; + for(var i=1;i<=3;i++){ + if(!player.hasSkill('olhuiyun_'+i)) choices.push('选项'+get.cnNumber(i,true)); + else choiceList[i-1]=''+choiceList[i-1]+''; } - if (!choices.length) event.finish(); - else { + if(!choices.length) event.finish(); + else{ player.logSkill('olhuiyun_after'); - player.chooseControl(choices).set('choiceList', choiceList).set('prompt', '晖云:选择一项,令' + get.translation(trigger.targets) + '可以选择执行').set('ai', () => { + player.chooseControl(choices).set('choiceList',choiceList).set('prompt','晖云:选择一项,令'+get.translation(trigger.targets)+'可以选择执行').set('ai',()=>{ return _status.event.choice; - }).set('choice', function () { - if (choices.length == 1) return choices[0]; - var choicesx = choices.slice(); - if (get.attitude(player, trigger.targets[0]) > 0 && choices.includes('选项三')) return '选项三'; + }).set('choice',function(){ + if(choices.length==1) return choices[0]; + var choicesx=choices.slice(); + if(get.attitude(player,trigger.targets[0])>0&&choices.includes('选项三')) return '选项三'; choicesx.remove('选项三'); return choicesx.randomGet(); }()); } 'step 1' - if (result.control != 'cancel2') { - var index = ['选项一', '选项二', '选项三'].indexOf(result.control) + 1; - event.index = index; - game.log(player, '选择了', '#y' + result.control); - player.addTempSkill('olhuiyun_' + index, 'roundStart'); - event.targets = trigger.targets.slice(0); + if(result.control!='cancel2'){ + var index=['选项一','选项二','选项三'].indexOf(result.control)+1; + event.index=index; + game.log(player,'选择了','#y'+result.control); + player.addTempSkill('olhuiyun_'+index,'roundStart'); + event.targets=trigger.targets.slice(0); } else event.finish(); 'step 2' - var target = targets.shift(); - event.target = target; - if (target.isIn()) { - var cards = target.getCards('h', card => card.hasGaintag('olhuiyun_tag')); - if (event.index == 3) { - target.chooseBool('是否摸一张牌?').set('ai', () => true); + var target=targets.shift(); + event.target=target; + if(target.isIn()){ + var cards=target.getCards('h',card=>card.hasGaintag('olhuiyun_tag')); + if(event.index==3){ + target.chooseBool('是否摸一张牌?').set('ai',()=>true); event.goto(5); } - else if (event.index == 1 && cards.length) { + else if(event.index==1&&cards.length){ target.chooseToUse({ - filterCard: function (card) { - if (get.itemtype(card) != 'card' || !card.hasGaintag('olhuiyun_tag')) return false; - return lib.filter.filterCard.apply(this, arguments); + filterCard:function(card){ + if(get.itemtype(card)!='card'||!card.hasGaintag('olhuiyun_tag')) return false; + return lib.filter.filterCard.apply(this,arguments); }, - prompt: '是否使用一张展示牌,然后重铸所有手牌?' + prompt:'是否使用一张展示牌,然后重铸所有手牌?' }); } - else if (event.index == 2) { + else if(event.index==2){ target.chooseToUse({ - filterCard: function (card) { - if (get.itemtype(card) != 'card' || get.position(card) != 'h' && get.position(card) != 's') return false; - return lib.filter.filterCard.apply(this, arguments); + filterCard:function(card){ + if(get.itemtype(card)!='card'||get.position(card)!='h'&&get.position(card)!='s') return false; + return lib.filter.filterCard.apply(this,arguments); }, - prompt: '是否使用一张手牌,然后重铸展示牌?' + prompt:'是否使用一张手牌,然后重铸展示牌?' }); event.goto(4); } @@ -5222,351 +5223,351 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } else event.goto(6); 'step 3' - if (result.bool) { - var hs = target.getCards('h', lib.filter.cardRecastable); - if (hs.length) { + if(result.bool){ + var hs=target.getCards('h',lib.filter.cardRecastable); + if(hs.length){ target.recast(hs); } } event.goto(6); 'step 4' - if (result.bool) { - var hs = target.getCards('h', card => { - if (!card.hasGaintag('olhuiyun_tag')) return false; + if(result.bool){ + var hs=target.getCards('h',card=>{ + if(!card.hasGaintag('olhuiyun_tag')) return false; return target.canRecast(card); }); - if (hs.length) { + if(hs.length){ target.recast(hs); } } event.goto(6); 'step 5' - if (result.bool) { + if(result.bool){ target.draw(); } 'step 6' - if (targets.length) event.goto(2); + if(targets.length) event.goto(2); } }, - record: { - trigger: { global: 'showCardsEnd' }, - forced: true, - charlotte: true, - popup: false, - firstDo: true, - filter: function (event, player) { - if (event.getParent().name != 'huogong') return false; - var card = event.getParent(2).card; - if (card && card.storage && card.storage.olhuiyun) return true; + record:{ + trigger:{global:'showCardsEnd'}, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + filter:function(event,player){ + if(event.getParent().name!='huogong') return false; + var card=event.getParent(2).card; + if(card&&card.storage&&card.storage.olhuiyun) return true; return false; }, - content: function () { - game.broadcastAll(function (cards) { - cards.forEach(card => card.addGaintag('olhuiyun_tag')); - }, trigger.cards); + content:function(){ + game.broadcastAll(function(cards){ + cards.forEach(card=>card.addGaintag('olhuiyun_tag')); + },trigger.cards); } }, - 1: { charlotte: true }, - 2: { charlotte: true }, - 3: { charlotte: true }, + 1:{charlotte:true}, + 2:{charlotte:true}, + 3:{charlotte:true}, } }, //王瓘 - olmiuyan: { - audio: 2, - enable: 'chooseToUse', - viewAsFilter: function (player) { - return !player.hasSkill('olmiuyan_blocker') && player.hasCard(card => get.color(card) == 'black', 'hes') + olmiuyan:{ + audio:2, + enable:'chooseToUse', + viewAsFilter:function(player){ + return !player.hasSkill('olmiuyan_blocker')&&player.hasCard(card=>get.color(card)=='black','hes') }, - viewAs: { name: 'huogong' }, - filterCard: { color: 'black' }, - position: 'hes', - check: function (card) { - var player = _status.event.player, suits = lib.suit.slice(0); - if (player.countCards('h') > 4 && player.hasCard(function (card) { + viewAs:{name:'huogong'}, + filterCard:{color:'black'}, + position:'hes', + check:function(card){ + var player=_status.event.player,suits=lib.suit.slice(0); + if(player.countCards('h')>4&&player.hasCard(function(card){ suits.remove(get.suit(card)); - return suits.length == 0; - }, 'h')) return 8 - get.value(card); - return 4 - get.value(card); + return suits.length==0; + },'h')) return 8-get.value(card); + return 4-get.value(card); }, - promptfunc: function () { - if (_status.event.player.storage.olmiuyan) return '转换技。你可以将一张黑色牌当做【火攻】使用。若此牌未造成伤害,则你令此技能失效直到本轮结束。'; + promptfunc:function(){ + if(_status.event.player.storage.olmiuyan) return '转换技。你可以将一张黑色牌当做【火攻】使用。若此牌未造成伤害,则你令此技能失效直到本轮结束。'; return '转换技。你可以将一张黑色牌当做【火攻】使用。若此牌造成了伤害,则你获得此阶段内所有被展示过的牌。'; }, - precontent: function () { + precontent:function(){ player.changeZhuanhuanji('olmiuyan'); - var card = event.result.card; - if (!card.storage) card.storage = {}; - if (player.storage.olmiuyan) { - card.storage.olmiuyan_gain = true; + var card=event.result.card; + if(!card.storage) card.storage={}; + if(player.storage.olmiuyan){ + card.storage.olmiuyan_gain=true; player.addTempSkill('olmiuyan_gain'); } - else { - card.storage.olmiuyan_remove = true; + else{ + card.storage.olmiuyan_remove=true; player.addTempSkill('olmiuyan_remove'); } }, - init: function (player) { + init:function(player){ player.addSkill('olmiuyan_counter'); }, - onremove: function (player) { + onremove:function(player){ player.removeSkill('olmiuyan_counter'); }, - zhuanhuanji: true, - mark: true, - marktext: '☯', - ai: { - order: function (item, player) { - if (player.storage.olmiuyan) return 1; + zhuanhuanji:true, + mark:true, + marktext:'☯', + ai:{ + order:function(item,player){ + if(player.storage.olmiuyan) return 1; return 8; }, }, - intro: { - content: function (storage) { - if (storage) return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此牌未造成伤害,则你令此技能失效直到本轮结束。'; + intro:{ + content:function(storage){ + if(storage) return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此牌未造成伤害,则你令此技能失效直到本轮结束。'; return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此牌造成了伤害,则你获得此阶段内所有被展示过的牌。'; }, }, - subSkill: { - counter: { - trigger: { global: ['showCardsEnd', 'phaseZhunbeiBefore', 'phaseJudgeBefore', 'phaseDrawBefore', 'phaseUseBefore', 'phaseDiscardBefore', 'phaseJieshuBefore'] }, - forced: true, - charlotte: true, - popup: false, - firstDo: true, - filter: function (event, player) { - if (event.name == 'showCards') return get.itemtype(event.cards) == 'cards'; + subSkill:{ + counter:{ + trigger:{global:['showCardsEnd','phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseUseBefore','phaseDiscardBefore','phaseJieshuBefore']}, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + filter:function(event,player){ + if(event.name=='showCards') return get.itemtype(event.cards)=='cards'; return true; }, - content: function () { - if (trigger.name == 'showCards') { - game.broadcastAll(function (cards) { - cards.forEach(card => card.addGaintag('olmiuyan_tag')); - }, trigger.cards); + content:function(){ + if(trigger.name=='showCards'){ + game.broadcastAll(function(cards){ + cards.forEach(card=>card.addGaintag('olmiuyan_tag')); + },trigger.cards); } - else game.players.forEach(current => current.removeGaintag('olmiuyan_tag')); + else game.players.forEach(current=>current.removeGaintag('olmiuyan_tag')); }, }, - gain: { - trigger: { player: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - return event.card.storage && event.card.storage.olmiuyan_gain && player.hasHistory('sourceDamage', function (evt) { - return evt.card == event.card; - }) && game.hasPlayer(function (current) { - return current != player && current.hasCard(card => card.hasGaintag('olmiuyan_tag')) + gain:{ + trigger:{player:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return event.card.storage&&event.card.storage.olmiuyan_gain&&player.hasHistory('sourceDamage',function(evt){ + return evt.card==event.card; + })&&game.hasPlayer(function(current){ + return current!=player&¤t.hasCard(card=>card.hasGaintag('olmiuyan_tag')) }); }, - logTarget: function (event, player) { - return game.filterPlayer(function (current) { - return current != player && current.hasCard(card => card.hasGaintag('olmiuyan_tag')) + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + return current!=player&¤t.hasCard(card=>card.hasGaintag('olmiuyan_tag')) }); }, - content: function () { - var cards = [], players = game.filterPlayer(current => current != player).sortBySeat(); - players.forEach(current => { - var cardsx = current.getCards('h', function (card) { + content:function(){ + var cards=[],players=game.filterPlayer(current=>current!=player).sortBySeat(); + players.forEach(current=>{ + var cardsx=current.getCards('h',function(card){ return card.hasGaintag('olmiuyan_tag'); }); - if (cardsx.length) cards.addArray(cardsx); + if(cardsx.length) cards.addArray(cardsx); }); - player.gain(cards, 'give'); + player.gain(cards,'give'); }, }, - remove: { - trigger: { player: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - return event.card.storage && event.card.storage.olmiuyan_remove && !player.hasHistory('sourceDamage', function (evt) { - return evt.card == event.card; + remove:{ + trigger:{player:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return event.card.storage&&event.card.storage.olmiuyan_remove&&!player.hasHistory('sourceDamage',function(evt){ + return evt.card==event.card; }); }, - content: function () { - player.addTempSkill('olmiuyan_blocker', 'roundStart'); - game.log(player, '的', '#g【谬焰】', '失效了'); + content:function(){ + player.addTempSkill('olmiuyan_blocker','roundStart'); + game.log(player,'的','#g【谬焰】','失效了'); }, }, - blocker: { charlotte: true }, + blocker:{charlotte:true}, }, }, - olshilu: { - audio: 2, - trigger: { player: 'damageEnd' }, - forced: true, - filter: function (event, player) { - return player.hp > 0; + olshilu:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player.hp>0; }, - content: function () { + content:function(){ 'step 0' - player.draw(Math.min(5, player.hp)); + player.draw(Math.min(5,player.hp)); 'step 1' - var targets = game.filterPlayer(current => current != player && current.countCards('h') > 0 && player.inRange(current)); - if (targets.length > 0) { - if (targets.length == 1) event._result = { bool: true, targets: targets } - else player.chooseTarget(true, '请选择一名攻击范围内的角色', '然后你选择该角色的一张手牌,令此牌视为【杀】', function (card, player, target) { - return target != player && target.countCards('h') > 0 && player.inRange(target); - }).set('ai', function (target) { - return -get.attitude(_status.event.player, target); + var targets=game.filterPlayer(current=>current!=player&¤t.countCards('h')>0&&player.inRange(current)); + if(targets.length>0){ + if(targets.length==1) event._result={bool:true,targets:targets} + else player.chooseTarget(true,'请选择一名攻击范围内的角色','然后你选择该角色的一张手牌,令此牌视为【杀】',function(card,player,target){ + return target!=player&&target.countCards('h')>0&&player.inRange(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); }); } else event.finish(); 'step 2' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.line(target, 'green'); - player.choosePlayerCard(target, true, 'h'); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + player.choosePlayerCard(target,true,'h'); } 'step 3' - if (result.bool) { + if(result.bool){ target.addSkill('olshilu_viewas'); target.showCards(result.cards); - target.addGaintag(result.cards, 'olshilu'); + target.addGaintag(result.cards,'olshilu'); } }, - ai: { - maixie: true, + ai:{ + maixie:true, }, - subSkill: { - viewas: { - mod: { - cardname: function (card) { - if (get.itemtype(card) == 'card' && card.hasGaintag('olshilu')) return 'sha'; + subSkill:{ + viewas:{ + mod:{ + cardname:function(card){ + if(get.itemtype(card)=='card'&&card.hasGaintag('olshilu')) return 'sha'; }, }, - charlotte: true, + charlotte:true, }, }, }, //张翼 - oldianjun: { - audio: 2, - trigger: { player: 'phaseEnd' }, - forced: true, - content: function () { + oldianjun:{ + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ 'step 0' player.damage('nosource'); 'step 1' - trigger.phaseList.splice(trigger.num, 0, 'phaseUse|oldianjun'); + trigger.phaseList.splice(trigger.num,0,'phaseUse|oldianjun'); }, }, - olkangrui: { - audio: 2, - init: () => { + olkangrui:{ + audio:2, + init:()=>{ game.addGlobalSkill('olkangrui_ai'); }, - onremove: () => { - if (!game.hasPlayer(i => i.hasSkill('olkangrui'), true)) game.removeGlobalSkill('olkangrui_ai'); + onremove:()=>{ + if(!game.hasPlayer(i=>i.hasSkill('olkangrui'),true)) game.removeGlobalSkill('olkangrui_ai'); }, - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - return event.player == _status.currentPhase && event.player.getHistory('damage').indexOf(event) == 0; + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return event.player==_status.currentPhase&&event.player.getHistory('damage').indexOf(event)==0; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseControl('cancel2').set('choiceList', [ - '令' + get.translation(trigger.player) + '回复1点体力,且造成伤害时本回合手牌上限为0', - '令' + get.translation(trigger.player) + '于本回合下次造成的伤害+1,且造成伤害时本回合手牌上限为0', - ]).set('prompt', get.prompt('olkangrui', trigger.player)).set('ai', () => { + player.chooseControl('cancel2').set('choiceList',[ + '令'+get.translation(trigger.player)+'回复1点体力,且造成伤害时本回合手牌上限为0', + '令'+get.translation(trigger.player)+'于本回合下次造成的伤害+1,且造成伤害时本回合手牌上限为0', + ]).set('prompt',get.prompt('olkangrui',trigger.player)).set('ai',()=>{ return _status.event.choice; - }).set('choice', function () { - if (get.attitude(player, trigger.player) <= 0) return 'cancel2'; - if (!trigger.player.isDamaged()) return '选项二'; - var list = []; - if (trigger.player.hp + trigger.player.countCards('hs', 'tao') <= 2) list.push('选项一'); - if (trigger.player.hasCard(card => { - if (!get.tag(card, 'damage')) return false; - if (game.hasPlayer(current => { - return get.effect(current, card, trigger.player, player) > 0 && trigger.player.canUse(card, current) && - !current.hasSkillTag('filterDamage', null, { - player: trigger.player, - card: card + }).set('choice',function(){ + if(get.attitude(player,trigger.player)<=0) return 'cancel2'; + if(!trigger.player.isDamaged()) return '选项二'; + var list=[]; + if(trigger.player.hp+trigger.player.countCards('hs','tao')<=2) list.push('选项一'); + if(trigger.player.hasCard(card=>{ + if(!get.tag(card,'damage')) return false; + if(game.hasPlayer(current=>{ + return get.effect(current,card,trigger.player,player)>0&&trigger.player.canUse(card,current)&& + !current.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:card }); - }, 'hs')) { + },'hs')){ return true; } })) list.push('选项二'); - if (list.length) return list.randomGet(); + if(list.length) return list.randomGet(); return '选项一'; }()); 'step 1' - if (result.control != 'cancel2') { - player.logSkill('olkangrui', trigger.player); + if(result.control!='cancel2'){ + player.logSkill('olkangrui',trigger.player); player.draw(); - if (result.index == 0) { + if(result.index==0){ trigger.player.recover(); trigger.player.addTempSkill('olkangrui_nil'); } - else { + else{ trigger.player.addTempSkill('olkangrui_add'); - trigger.player.addMark('olkangrui_add', 1, false); + trigger.player.addMark('olkangrui_add',1,false); } } }, - ai: { - expose: 0.2, - threaten: 1.5, + ai:{ + expose:0.2, + threaten:1.5, }, - subSkill: { - add: { - trigger: { source: 'damageBegin1' }, - charlotte: true, - forced: true, - onremove: ['olkangrui_add', 'olkangrui_nil'], - filter: function (event, player) { + subSkill:{ + add:{ + trigger:{source:'damageBegin1'}, + charlotte:true, + forced:true, + onremove:['olkangrui_add','olkangrui_nil'], + filter:function(event,player){ return player.hasMark('olkangrui_add'); }, - content: function () { - trigger.num += player.countMark('olkangrui_add'); - player.removeMark('olkangrui_add', player.countMark('olkangrui_add'), false); - player.storage.olkangrui_nil = true; - game.log(player, '本回合手牌上限基数为', '#g0'); + content:function(){ + trigger.num+=player.countMark('olkangrui_add'); + player.removeMark('olkangrui_add',player.countMark('olkangrui_add'),false); + player.storage.olkangrui_nil=true; + game.log(player,'本回合手牌上限基数为','#g0'); }, - mod: { - maxHandcardBase: function (player, num) { - if (player.storage.olkangrui_nil) return 0; + mod:{ + maxHandcardBase:function(player,num){ + if(player.storage.olkangrui_nil) return 0; }, } }, - nil: { - trigger: { source: 'damageBegin1' }, - charlotte: true, - forced: true, - onremove: true, - filter: function (event, player) { + nil:{ + trigger:{source:'damageBegin1'}, + charlotte:true, + forced:true, + onremove:true, + filter:function(event,player){ return !player.storage.olkangrui_nil; }, - content: function () { - player.storage.olkangrui_nil = true; - game.log(player, '本回合手牌上限基数为', '#g0'); + content:function(){ + player.storage.olkangrui_nil=true; + game.log(player,'本回合手牌上限基数为','#g0'); }, - mod: { - maxHandcardBase: function (player, num) { - if (player.storage.olkangrui_nil) return 0; + mod:{ + maxHandcardBase:function(player,num){ + if(player.storage.olkangrui_nil) return 0; }, } }, - ai: { - trigger: { player: 'dieAfter' }, - filter: () => { - return !game.hasPlayer(i => i.hasSkill('olkangrui'), true); + ai:{ + trigger:{player:'dieAfter'}, + filter:()=>{ + return !game.hasPlayer(i=>i.hasSkill('olkangrui'),true); }, - silent: true, - forceDie: true, - content: () => { + silent:true, + forceDie:true, + content:()=>{ game.removeGlobalSkill('olkangrui_ai'); }, - ai: { - effect: { - target: function (card, player, target) { - if (target != player || !get.tag(card, 'damage')) return; - var list = game.filterPlayer(current => current.hasSkill('olkangrui') && get.attitude(current, player) > 0); - var history = player.getHistory('damage'); - if (!list.length || history.length != 0) return; - return [1, 2]; + ai:{ + effect:{ + target:function(card,player,target){ + if(target!=player||!get.tag(card,'damage')) return; + var list=game.filterPlayer(current=>current.hasSkill('olkangrui')&&get.attitude(current,player)>0); + var history=player.getHistory('damage'); + if(!list.length||history.length!=0) return; + return [1,2]; } } } @@ -5574,16 +5575,16 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //朱儁 - olcuipo: { - audio: 2, - trigger: { player: 'useCard' }, - forced: true, - filter: function (event, player) { - return get.cardNameLength(event.card) == player.getHistory('useCard').indexOf(event) + 1; + olcuipo:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.cardNameLength(event.card)==player.getHistory('useCard').indexOf(event)+1; }, - content: function () { - var card = trigger.card; - if (card.name == 'sha' || get.type(card) == 'trick' && get.tag(card, 'damage') > 0) trigger.baseDamage++; + content:function(){ + var card=trigger.card; + if(card.name=='sha'||get.type(card)=='trick'&&get.tag(card,'damage')>0) trigger.baseDamage++; else player.draw(); }, /* @@ -5597,253 +5598,253 @@ game.import('character', function (lib, game, ui, get, ai, _status) { content:function(){ trigger.num++; },*/ - mod: { - aiOrder: function (player, card, num) { - if (typeof card == 'object' && get.cardNameLength(card) == player.getHistory('useCard').length + 1) return num + 10; + mod:{ + aiOrder:function(player,card,num){ + if(typeof card=='object'&&get.cardNameLength(card)==player.getHistory('useCard').length+1) return num+10; }, } }, //马休马铁 - rekenshang: { - audio: 'olkenshang', - enable: 'chooseToUse', - filterCard: true, - selectCard: [2, Infinity], - viewAsFilter: function (player) { - return player.countCards('hes') > 1; + rekenshang:{ + audio:'olkenshang', + enable:'chooseToUse', + filterCard:true, + selectCard:[2,Infinity], + viewAsFilter:function(player){ + return player.countCards('hes')>1; }, - check: function (card) { + check:function(card){ var player = _status.event.player; - if (game.countPlayer(function (current) { - return current != player && player.canUse('sha', current) && get.effect(current, { name: 'sha' }, player, player) > 0; + if(game.countPlayer(function (current) { + return current != player && player.canUse('sha', current) && get.effect(current, {name: 'sha'}, player, player) > 0; }) <= ui.selected.cards.length) return 0; - if (_status.event.player.countCards('hes') >= 3) return 8 - ui.selected.cards.length - get.value(card); + if(_status.event.player.countCards('hes') >= 3) return 8 - ui.selected.cards.length - get.value(card); return 6 - ui.selected.cards.length - get.value(card); }, - position: 'hes', - viewAs: { - name: 'sha', - storage: { olkenshang: true } + position:'hes', + viewAs:{ + name:'sha', + storage:{olkenshang:true} }, - onuse: function (links, player) { + onuse:function(links,player){ player.addTempSkill('rekenshang_effect'); }, - ai: { - order: function (item, player) { - if (player.countCards('hes') >= 3) return 6; + ai:{ + order:function(item,player){ + if(player.countCards('hes') >= 3) return 6; return 4; }, - result: { - target: function (player, target, card, isLink) { - let eff = -1.5, odds = 1.35, num = 1; - if (isLink) { - let cache = _status.event.getTempCache('sha_result', 'eff'); - if (typeof cache !== 'object' || cache.card !== get.translation(card)) return eff; - if (cache.odds < 1.35 && cache.bool) return 1.35 * cache.eff; - return cache.odds * cache.eff; + result:{ + target:function(player,target,card,isLink){ + let eff=-1.5,odds=1.35,num=1; + if(isLink){ + let cache=_status.event.getTempCache('sha_result','eff'); + if(typeof cache!=='object'||cache.card!==get.translation(card)) return eff; + if(cache.odds<1.35&&cache.bool) return 1.35*cache.eff; + return cache.odds*cache.eff; } - if (player.hasSkill('jiu') || player.hasSkillTag('damageBonus', true, { - target: target, - card: card - })) { - if (target.hasSkillTag('filterDamage', null, { - player: player, - card: card, - jiu: true, - })) eff = -0.5; - else { - num = 2; - if (get.attitude(player, target) > 0) eff = -7; - else eff = -4; + if(player.hasSkill('jiu')||player.hasSkillTag('damageBonus',true,{ + target:target, + card:card + })){ + if(target.hasSkillTag('filterDamage',null,{ + player:player, + card:card, + jiu:true, + })) eff=-0.5; + else{ + num=2; + if(get.attitude(player,target)>0) eff=-7; + else eff=-4; } } - if (!player.hasSkillTag('directHit_ai', true, { - target: target, - card: card, - }, true)) odds -= 0.7 * target.mayHaveShan(player, 'use', target.getCards('h', i => { + if(!player.hasSkillTag('directHit_ai',true,{ + target:target, + card:card, + },true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - }), 'odds'); - _status.event.putTempCache('sha_result', 'eff', { - bool: target.hp > num && get.attitude(player, target) > 0, - card: get.translation(card), - eff: eff, - odds: odds + }),'odds'); + _status.event.putTempCache('sha_result','eff',{ + bool:target.hp>num&&get.attitude(player,target)>0, + card:get.translation(card), + eff:eff, + odds:odds }); - return odds * eff; + return odds*eff; } }, - respondSha: true, - skillTagFilter: player => player.countCards('hes') > 1, + respondSha:true, + skillTagFilter:player=>player.countCards('hes')>1, }, - subSkill: { - effect: { - audio: 'olkenshang', - trigger: { player: 'useCard2' }, - charlotte: true, - group: 'rekenshang_after', - direct: true, - filter: function (event, player) { - return event.card.storage && event.card.storage.olkenshang && game.countPlayer(function (current) { - return current != player && lib.filter.targetEnabled2(event.card, player, current) && lib.filter.targetInRange(event.card, player, current); - }) >= event.cards.length; + subSkill:{ + effect:{ + audio:'olkenshang', + trigger:{player:'useCard2'}, + charlotte:true, + group:'rekenshang_after', + direct:true, + filter:function(event,player){ + return event.card.storage&&event.card.storage.olkenshang&&game.countPlayer(function(current){ + return current!=player&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); + })>=event.cards.length; }, - content: function () { + content:function(){ 'step 0' player.chooseTarget( trigger.cards.length, - '是否更改' + get.translation(trigger.card) + '的目标?', - '选择' + get.cnNumber(trigger.cards.length) + '名角色作为' + get.translation(trigger.card) + '的目标,覆盖原先存在的目标', - function (card, player, target) { - var evt = _status.event.getTrigger(); - return target != player && lib.filter.targetEnabled2(evt.card, player, target) && lib.filter.targetInRange(evt.card, player, target); - }).set('ai', function (target) { - var evt = _status.event.getTrigger(); - return get.effect(target, evt.card, evt.player, evt.player); - }); + '是否更改'+get.translation(trigger.card)+'的目标?', + '选择'+get.cnNumber(trigger.cards.length)+'名角色作为'+get.translation(trigger.card)+'的目标,覆盖原先存在的目标', + function(card,player,target){ + var evt=_status.event.getTrigger(); + return target!=player&&lib.filter.targetEnabled2(evt.card,player,target)&&lib.filter.targetInRange(evt.card,player,target); + }).set('ai',function(target){ + var evt=_status.event.getTrigger(); + return get.effect(target,evt.card,evt.player,evt.player); + }); 'step 1' - if (result.bool) { - if (player != event.player && !player.isOnline()) game.delayx(); + if(result.bool){ + if(player!=event.player&&!player.isOnline()) game.delayx(); } else event.finish(); 'step 2' - var targets = result.targets; - player.logSkill('rekenshang_effect', targets); - trigger.targets.length = 0; + var targets=result.targets; + player.logSkill('rekenshang_effect',targets); + trigger.targets.length=0; trigger.targets.addArray(targets); - game.log(targets, '成为了', trigger.card, '的新目标'); + game.log(targets,'成为了',trigger.card,'的新目标'); }, }, - after: { - audio: 'olkenshang', - trigger: { player: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - if (event.card.name != 'sha' || !event.card.storage || !event.card.storage.olkenshang) return false; - var num = 0; - game.countPlayer2(current => { - current.getHistory('damage', evt => { - if (evt.card == event.card) num += evt.num; + after:{ + audio:'olkenshang', + trigger:{player:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + if(event.card.name!='sha'||!event.card.storage||!event.card.storage.olkenshang) return false; + var num=0; + game.countPlayer2(current=>{ + current.getHistory('damage',evt=>{ + if(evt.card==event.card) num+=evt.num; }) }); - return num < event.cards.length; + return num current != player && player.canUse(card, current, false) && !player.inRange(current)); - for (var target of targets) { - eff += get.effect(target, card, player, player); + ai:{ + order:1, + threaten:1.1, + effect:{ + player_use:function(card,player,target){ + if(_status._olkenshang_aiChecking||ui.selected.targets.length) return; + if(typeof card!='object'||!card.storage||!card.storage.olkenshang) return false; + _status._olkenshang_aiChecking=true; + var eff=0; + var targets=game.filterPlayer(current=>current!=player&&player.canUse(card,current,false)&&!player.inRange(current)); + for(var target of targets){ + eff+=get.effect(target,card,player,player); } delete _status._olkenshang_aiChecking; - if (eff > 0) return [0, eff / Math.max(0.01, get.attitude(player, player))]; + if(eff>0) return [0,eff/Math.max(0.01,get.attitude(player,player))]; }, }, }, - subSkill: { - effect: { - audio: 'olkenshang', - trigger: { player: 'useCard2' }, - charlotte: true, - logTarget: function (event, player) { - return game.filterPlayer(current => current != player && player.canUse(event.card, current, false) && !player.inRange(current)); + subSkill:{ + effect:{ + audio:'olkenshang', + trigger:{player:'useCard2'}, + charlotte:true, + logTarget:function(event,player){ + return game.filterPlayer(current=>current!=player&&player.canUse(event.card,current,false)&&!player.inRange(current)); }, - prompt2: '将此牌目标改为攻击范围外的所有其他角色', - group: 'olkenshang_after', - check: function (event, player) { - var eff1 = 0, eff2 = 0; - for (var target of event.targets) { - eff1 += get.effect(target, event.card, event.player, player); + prompt2:'将此牌目标改为攻击范围外的所有其他角色', + group:'olkenshang_after', + check:function(event,player){ + var eff1=0,eff2=0; + for(var target of event.targets){ + eff1+=get.effect(target,event.card,event.player,player); } - var targets = game.filterPlayer(current => current != player && player.canUse(event.card, current, false) && !player.inRange(current)); - for (var target of targets) { - eff2 += get.effect(target, event.card, event.player, player); + var targets=game.filterPlayer(current=>current!=player&&player.canUse(event.card,current,false)&&!player.inRange(current)); + for(var target of targets){ + eff2+=get.effect(target,event.card,event.player,player); } - return eff2 > eff1; + return eff2>eff1; }, - filter: function (event, player) { - return event.card.name == 'sha' && event.card.storage && event.card.storage.olkenshang && event.targets.length && game.filterPlayer(current => current != player && player.canUse(event.card, current, false) && !player.inRange(current)).length; + filter:function(event,player){ + return event.card.name=='sha'&&event.card.storage&&event.card.storage.olkenshang&&event.targets.length&&game.filterPlayer(current=>current!=player&&player.canUse(event.card,current,false)&&!player.inRange(current)).length; }, - content: function () { + content:function(){ 'step 0' trigger.targets.removeArray(trigger.targets); - var targets = game.filterPlayer(current => current != player && player.canUse(trigger.card, current, false) && !player.inRange(current)); - if (targets.length) trigger.targets.addArray(targets); + var targets=game.filterPlayer(current=>current!=player&&player.canUse(trigger.card,current,false)&&!player.inRange(current)); + if(targets.length) trigger.targets.addArray(targets); } }, - after: { - audio: 'olkenshang', - trigger: { player: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - if (event.card.name != 'sha' || !event.card.storage || !event.card.storage.olkenshang) return false; - var num = 0; - game.countPlayer2(current => { - current.getHistory('damage', evt => { - if (evt.card == event.card) num += evt.num; + after:{ + audio:'olkenshang', + trigger:{player:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + if(event.card.name!='sha'||!event.card.storage||!event.card.storage.olkenshang) return false; + var num=0; + game.countPlayer2(current=>{ + current.getHistory('damage',evt=>{ + if(evt.card==event.card) num+=evt.num; }) }); - return num > 0; + return num>0; }, - content: function () { + content:function(){ 'step 0' - var num = 0, len = trigger.cards.length; - game.countPlayer2(current => { - current.getHistory('damage', evt => { - if (evt.card == trigger.card) num += evt.num; + var num=0,len=trigger.cards.length; + game.countPlayer2(current=>{ + current.getHistory('damage',evt=>{ + if(evt.card==trigger.card) num+=evt.num; }) }); - if (len > num) { + if(len>num){ player.draw(num); event.finish(); } - else { - var skills = player.getSkills(null, false, false).filter(skill => { - var info = get.info(skill); - if (!info || info.charlotte || get.skillInfoTranslation(skill, player).length == 0) return false; + else{ + var skills=player.getSkills(null,false,false).filter(skill=>{ + var info=get.info(skill); + if(!info||info.charlotte||get.skillInfoTranslation(skill,player).length==0) return false; return true; }); - if (skills.length == 1) event._result = { control: skills[0] }; - else player.chooseControl(skills).set('choiceList', skills.map(i => { - return '
    【' + get.translation(lib.translate[i + '_ab'] || get.translation(i).slice(0, 2)) + '】
    ' + get.skillInfoTranslation(i, player) + '
    '; - })).set('displayIndex', false).set('prompt', '垦伤:选择失去一个技能').set('ai', () => { - var choices = _status.event.controls.slice(); - var negs = choices.filter(i => { - var info = get.info(i); - if (!info || !info.ai) return false; - return info.ai.neg || info.ai.halfneg; + if(skills.length==1) event._result={control:skills[0]}; + else player.chooseControl(skills).set('choiceList',skills.map(i=>{ + return '
    【'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'】
    '+get.skillInfoTranslation(i,player)+'
    '; + })).set('displayIndex',false).set('prompt','垦伤:选择失去一个技能').set('ai',()=>{ + var choices=_status.event.controls.slice(); + var negs=choices.filter(i=>{ + var info=get.info(i); + if(!info||!info.ai) return false; + return info.ai.neg||info.ai.halfneg; }); - if (negs.length) return negs.randomGet(); - if (choices.includes('mashu')) return 'mashu'; + if(negs.length) return negs.randomGet(); + if(choices.includes('mashu')) return 'mashu'; return choices.randomGet(); }); } @@ -5854,129 +5855,129 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //董荼那 - oljianman: { - audio: 2, - trigger: { global: 'phaseEnd' }, - forced: true, - direct: true, - filter: function (event, player) { - var history = game.getGlobalHistory('useCard', evt => { - return get.type(evt.card) == 'basic'; + oljianman:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + direct:true, + filter:function(event,player){ + var history=game.getGlobalHistory('useCard',evt=>{ + return get.type(evt.card)=='basic'; }); - if (history.length < 2) return false; - var users = history.slice(0, 2).map(i => i.player); - var list = users.filter(user => user == player); - if (list.length == 1) { - var target = users.filter(user => user != player)[0]; - return target && target.isIn() && target.countDiscardableCards(player, 'he'); + if(history.length<2) return false; + var users=history.slice(0,2).map(i=>i.player); + var list=users.filter(user=>user==player); + if(list.length==1){ + var target=users.filter(user=>user!=player)[0]; + return target&&target.isIn()&&target.countDiscardableCards(player,'he'); } - if (list.length == 2) { - return history.slice(0, 2).some(evt => { - var card = evt.card; - return player.hasUseTarget({ name: card.name, nature: card.nature, isCard: true }); + if(list.length==2){ + return history.slice(0,2).some(evt=>{ + var card=evt.card; + return player.hasUseTarget({name:card.name,nature:card.nature,isCard:true}); }); } return false; }, - content: function () { + content:function(){ 'step 0' - var history = game.getGlobalHistory('useCard', evt => { - return get.type(evt.card) == 'basic'; + var history=game.getGlobalHistory('useCard',evt=>{ + return get.type(evt.card)=='basic'; }); - var list = history.slice(0, 2).map(i => i.player).filter(user => user == player); - if (list.length == 1) { - var users = history.slice(0, 2).map(i => i.player); - var target = users.filter(user => user != player)[0]; - player.logSkill('oljianman', target); - player.discardPlayerCard(target, 'he', true); + var list=history.slice(0,2).map(i=>i.player).filter(user=>user==player); + if(list.length==1) { + var users=history.slice(0,2).map(i=>i.player); + var target=users.filter(user=>user!=player)[0]; + player.logSkill('oljianman',target); + player.discardPlayerCard(target,'he',true); event.finish(); } - else if (list.length == 2) { - var evts = history.slice(0, 2); - var vcard = []; - for (var evt of evts) { - var card = evt.card; - if (vcard.length && vcard[0][2] == card.name && vcard[0][3] == card.nature) continue; - if (player.hasUseTarget({ name: card.name, nature: card.nature, isCard: true })) { - vcard.push(['基本', '', card.name, card.nature]); + else if(list.length==2){ + var evts=history.slice(0,2); + var vcard=[]; + for(var evt of evts){ + var card=evt.card; + if(vcard.length&&vcard[0][2]==card.name&&vcard[0][3]==card.nature) continue; + if(player.hasUseTarget({name:card.name,nature:card.nature,isCard:true})){ + vcard.push(['基本','',card.name,card.nature]); } } - if (vcard.length == 1) event._result = { bool: true, links: [vcard[0]] }; - else { - player.chooseButton(['鹣蛮:视为使用其中一张牌', [vcard, 'vcard']]).set('ai', function (button) { - return _status.event.player.getUseValue({ name: button.link[2], nature: button.link[3] }); + if(vcard.length==1) event._result={bool:true,links:[vcard[0]]}; + else{ + player.chooseButton(['鹣蛮:视为使用其中一张牌',[vcard,'vcard']]).set('ai',function(button){ + return _status.event.player.getUseValue({name:button.link[2],nature:button.link[3]}); }); } } else event.finish(); 'step 1' - if (result.bool) { - var card = { name: result.links[0][2], nature: result.links[0][3], isCard: true }; - player.chooseUseTarget(card, true).set('logSkill', 'oljianman').set('prompt', '鹣蛮:选择' + get.translation(card) + '的目标'); + if(result.bool){ + var card={name:result.links[0][2],nature:result.links[0][3],isCard:true}; + player.chooseUseTarget(card,true).set('logSkill','oljianman').set('prompt','鹣蛮:选择'+get.translation(card)+'的目标'); } } }, //张华 - olbihun: { - audio: 2, - trigger: { player: 'useCardToPlayer' }, - forced: true, - filter: function (event, player) { - return event.isFirstTarget && player.countCards('h') > player.getHandcardLimit() && event.targets.some(target => target != player); + olbihun:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + forced:true, + filter:function(event,player){ + return event.isFirstTarget&&player.countCards('h')>player.getHandcardLimit()&&event.targets.some(target=>target!=player); }, //group:'olbihun_give', - content: function () { - if (trigger.targets.length == 1) { - var cards = trigger.cards.filterInD(); - if (cards.length) { + content:function(){ + if(trigger.targets.length==1){ + var cards=trigger.cards.filterInD(); + if(cards.length){ game.delayx(); - trigger.targets[0].gain(cards, 'gain2'); + trigger.targets[0].gain(cards,'gain2'); } } - var targets = trigger.targets.filter(target => target != player); + var targets=trigger.targets.filter(target=>target!=player); trigger.targets.removeArray(targets); trigger.getParent().triggeredTargets1.removeArray(targets); }, - ai: { - threaten: 0.8, - halfneg: true, - effect: { - player: function (card, player, target) { - if ((!card.isCard || !card.cards) && get.itemtype(card) != 'card') return; - let cs = 0; - if (target && player != target && player.countCards('h', i => { - if (card === i || card.cards && card.cards.includes(i)) { + ai:{ + threaten:0.8, + halfneg:true, + effect:{ + player:function(card,player,target){ + if((!card.isCard||!card.cards)&&get.itemtype(card)!='card') return; + let cs=0; + if(target&&player!=target&&player.countCards('h',i=>{ + if(card===i||card.cards&&card.cards.includes(i)){ cs++; return false; } return true; - }) > player.getHandcardLimit()) { - let targets = [], evt = _status.event.getParent('useCard'); + })>player.getHandcardLimit()){ + let targets=[],evt=_status.event.getParent('useCard'); targets.addArray(ui.selected.targets); - if (evt && evt.card == card) targets.addArray(evt.targets); - if (targets.length) { - if (targets.length > 1 || !targets.includes(target)) return 'zeroplayertarget'; + if(evt&&evt.card==card) targets.addArray(evt.targets); + if(targets.length){ + if(targets.length>1||!targets.includes(target)) return 'zeroplayertarget'; return; } - let info = get.info(card); - if (!info || info.notarget || !info.filterTarget) return; - let range, select = get.copy(info.selectTarget), filter; - 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); - if (info.singleCard) range = [1, 1]; - game.checkMod(card, player, range, 'selectTarget', player); - if (range[1] < -1) range = [1, 1]; - else if (range[0] < 0) { - if (info.filterTarget === true) filter = game.players.length; - else filter = game.countPlayer(current => { - return info.filterTarget(card, player, current); + let info=get.info(card); + if(!info||info.notarget||!info.filterTarget) return; + let range,select=get.copy(info.selectTarget),filter; + 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); + if(info.singleCard) range=[1,1]; + game.checkMod(card,player,range,'selectTarget',player); + if(range[1]<-1) range=[1, 1]; + else if(range[0]<0){ + if(info.filterTarget===true) filter=game.players.length; + else filter=game.countPlayer(current=>{ + return info.filterTarget(card,player,current); }); - range = [filter, filter]; + range=[filter,filter]; } - if (range && range[0] > 1 && range[1] > 1) return 'zeroplayertarget'; - return [0, 0, 0, 1]; + if(range&&range[0]>1&&range[1]>1) return 'zeroplayertarget'; + return [0,0,0,1]; } }, }, @@ -5995,284 +5996,284 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }*/ }, - olchuanwu: { - audio: 2, - trigger: { - player: 'damageEnd', - source: 'damageSource', + olchuanwu:{ + audio:2, + trigger:{ + player:'damageEnd', + source:'damageSource', }, - forced: true, - filter: function (event, player) { - return player.getAttackRange() > 0; + forced:true, + filter:function(event,player){ + return player.getAttackRange()>0; }, - content: function () { - var skills = game.filterSkills(player.getStockSkills(true, true), player); - var num = Math.min(player.getAttackRange(), skills.length); - skills = skills.slice(0, num); - player.disableSkill('olchuanwu', skills); + content:function(){ + var skills=game.filterSkills(player.getStockSkills(true,true),player); + var num=Math.min(player.getAttackRange(),skills.length); + skills=skills.slice(0,num); + player.disableSkill('olchuanwu',skills); player.addTempSkill('olchuanwu_restore'); - var str = ''; - for (var i of skills) { - str += '【' + get.translation(i) + '】、'; + var str=''; + for(var i of skills){ + str+='【'+get.translation(i)+'】、'; player.popup(i); } - str = str.slice(0, -1); - game.log(player, '的技能', '#g' + str, '失效了'); + str=str.slice(0,-1); + game.log(player,'的技能','#g'+str,'失效了'); player.draw(num); }, - subSkill: { - restore: { - charlotte: true, - forced: true, - popup: false, - onremove: function (player) { + subSkill:{ + restore:{ + charlotte:true, + forced:true, + popup:false, + onremove:function(player){ player.enableSkill('olchuanwu'); - game.log(player, '恢复了技能'); + game.log(player,'恢复了技能'); } } } }, - oljianhe: { - audio: 2, - enable: 'phaseUse', - filterTarget: function (card, player, target) { + oljianhe:{ + audio:2, + enable:'phaseUse', + filterTarget:function(card,player,target){ return !player.getStorage('oljianhe_chosen').includes(target); }, - filterCard: function (card, player) { - if (ui.selected.cards.length) { - var cardx = ui.selected.cards[0]; - if (get.type(cardx) == 'equip') return get.type(card) == 'equip'; - return get.name(card) == get.name(cardx); + filterCard:function(card,player){ + if(ui.selected.cards.length){ + var cardx=ui.selected.cards[0]; + if(get.type(cardx)=='equip') return get.type(card)=='equip'; + return get.name(card)==get.name(cardx); } - var cards = player.getCards('he'); - for (var cardx of cards) { - if (card != cardx) { - if (get.type(cardx) == 'equip' && get.type(card) == 'equip') return true; - if (get.name(card) == get.name(cardx)) return true; + var cards=player.getCards('he'); + for(var cardx of cards){ + if(card!=cardx){ + if(get.type(cardx)=='equip'&&get.type(card)=='equip') return true; + if(get.name(card)==get.name(cardx)) return true; } } return false; }, - selectCard: [2, Infinity], - position: 'he', - complexCard: true, - discard: false, - visible: true, - prepare: 'throw', - loseTo: 'discardPile', - delay: 0.5, - check: function (card) { - if (get.type(card) == 'equip') return 15 - get.value(card); - return 7 - get.value(card); + selectCard:[2,Infinity], + position:'he', + complexCard:true, + discard:false, + visible:true, + prepare:'throw', + loseTo:'discardPile', + delay:0.5, + check:function(card){ + if(get.type(card)=='equip') return 15-get.value(card); + return 7-get.value(card); }, - content: function () { + content:function(){ 'step 0' player.draw(cards.length); - player.addTempSkill('oljianhe_chosen', 'phaseUseAfter'); - player.markAuto('oljianhe_chosen', [target]); + player.addTempSkill('oljianhe_chosen','phaseUseAfter'); + player.markAuto('oljianhe_chosen',[target]); 'step 1' - var type = get.type2(cards[0]); - target.chooseCard(get.translation(player) + '对你发动了【剑合】', '请重铸' + get.cnNumber(cards.length) + '张' + get.translation(type) + '牌,或点“取消”受到1点雷电伤害', cards.length, 'he', (card, player) => { - return get.type2(card) == _status.event.type && player.canRecast(card); - }).set('ai', card => { - if (_status.event.goon) return (get.type(card) == 'equip' ? 15 : 7) - get.value(card); + var type=get.type2(cards[0]); + target.chooseCard(get.translation(player)+'对你发动了【剑合】','请重铸'+get.cnNumber(cards.length)+'张'+get.translation(type)+'牌,或点“取消”受到1点雷电伤害',cards.length,'he',(card,player)=>{ + return get.type2(card)==_status.event.type&&player.canRecast(card); + }).set('ai',card=>{ + if(_status.event.goon) return (get.type(card)=='equip'?15:7)-get.value(card); return 0; - }).set('type', type).set('goon', get.damageEffect(target, player, target, 'thunder') < 0); + }).set('type',type).set('goon',get.damageEffect(target,player,target,'thunder')<0); 'step 2' - if (result.bool) { + if(result.bool){ target.recast(result.cards); } - else { - target.damage(player, 'thunder'); + else{ + target.damage(player,'thunder'); } 'step 3' game.delayx(); }, - ai: { - order: function (item, player) { - if (player.hasSkill('olbihun') && player.countCards('h') > player.getHandcardLimit()) return 11; + ai:{ + order:function(item,player){ + if(player.hasSkill('olbihun')&&player.countCards('h')>player.getHandcardLimit()) return 11; return 4; }, - threaten: 2.4, - expose: 0.1, - result: { - target: function (player, target) { - var cards = ui.selected.cards, type = get.type2(cards[0]); - if (target.countCards('he', card => { - return get.type(card) == type && get.value(card) <= 5; - }) >= cards.length) return 1; + threaten:2.4, + expose:0.1, + result:{ + target:function(player,target){ + var cards=ui.selected.cards,type=get.type2(cards[0]); + if(target.countCards('he',card=>{ + return get.type(card)==type&&get.value(card)<=5; + })>=cards.length) return 1; return -1; } } }, - subSkill: { - chosen: { - charlotte: true, - onremove: true, - intro: { content: '本阶段已对$发动过技能' }, + subSkill:{ + chosen:{ + charlotte:true, + onremove:true, + intro:{content:'本阶段已对$发动过技能'}, } } }, //屈晃 - olqiejian: { - audio: 2, - trigger: { - global: ['loseAfter', 'equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + olqiejian:{ + audio:2, + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - direct: true, - filter: function (event, player) { - return game.hasPlayer(current => { - if (current.countCards('h')) return false; - var evt = event.getl(current); - return evt && evt.hs && evt.hs.length && !player.getStorage('olqiejian_ban').includes(current); + direct:true, + filter:function(event,player){ + return game.hasPlayer(current=>{ + if(current.countCards('h')) return false; + var evt=event.getl(current); + return evt&&evt.hs&&evt.hs.length&&!player.getStorage('olqiejian_ban').includes(current); }); }, - content: function () { + content:function(){ 'step 0' - event.targets = game.filterPlayer(current => { - if (current.countCards('h')) return false; - var evt = trigger.getl(current); - return evt && evt.hs && evt.hs.length && !player.getStorage('olqiejian_ban').includes(current); + event.targets=game.filterPlayer(current=>{ + if(current.countCards('h')) return false; + var evt=trigger.getl(current); + return evt&&evt.hs&&evt.hs.length&&!player.getStorage('olqiejian_ban').includes(current); }).sortBySeat(_status.currentPhase); 'step 1' - var target = targets.shift(); - event.target = target; - if (target.isIn()) { - player.chooseBool(get.prompt2('olqiejian', target)).set('ai', () => { + var target=targets.shift(); + event.target=target; + if(target.isIn()){ + player.chooseBool(get.prompt2('olqiejian',target)).set('ai',()=>{ return _status.event.bool; - }).set('bool', get.attitude(player, target) > 0 || target.hasCard(card => { - return get.value(card, target) * get.sgnAttitude(player, target) < -6; - }, 'ej')); + }).set('bool',get.attitude(player,target)>0||target.hasCard(card=>{ + return get.value(card,target)*get.sgnAttitude(player,target)<-6; + },'ej')); } else event.goto(5); 'step 2' - if (result.bool) { - player.logSkill('olqiejian', target); + if(result.bool){ + player.logSkill('olqiejian',target); player.draw('nodelay'); target.draw(); } else event.goto(5); 'step 3' - player.chooseTarget('切谏:选择一名角色', '弃置你或其场上的一张牌;或点击“取消”令你于本轮不能再对其发动此技能', (card, player, target) => { - return (target == player || target == _status.event.getParent().target) && target.countDiscardableCards(player, 'ej') > 0; - }).set('ai', target => { - var sign = get.sgnAttitude(_status.event.player, target); - return 6 - target.getCards('ej').map(i => { - var val = 0; - if (get.position(i) == 'e') val = get.value(i, target); - else { - val = get.effect(player, { - name: i.viewAs || i.name, - cards: [i], - }, target, target); + player.chooseTarget('切谏:选择一名角色','弃置你或其场上的一张牌;或点击“取消”令你于本轮不能再对其发动此技能',(card,player,target)=>{ + return (target==player||target==_status.event.getParent().target)&&target.countDiscardableCards(player,'ej')>0; + }).set('ai',target=>{ + var sign=get.sgnAttitude(_status.event.player,target); + return 6-target.getCards('ej').map(i=>{ + var val=0; + if(get.position(i)=='e') val=get.value(i,target); + else{ + val=get.effect(player,{ + name:i.viewAs||i.name, + cards:[i], + },target,target); } - return sign * val; - }).sort((a, b) => a - b)[0]; + return sign*val; + }).sort((a,b)=>a-b)[0]; }); 'step 4' - if (result.bool) { - var targetx = result.targets[0]; - player.discardPlayerCard(targetx, 'ej', true); + if(result.bool){ + var targetx=result.targets[0]; + player.discardPlayerCard(targetx,'ej',true); } - else { - player.addTempSkill('olqiejian_ban', 'roundStart'); - player.markAuto('olqiejian_ban', [target]); + else{ + player.addTempSkill('olqiejian_ban','roundStart'); + player.markAuto('olqiejian_ban',[target]); } 'step 5' - if (targets.length) event.goto(1); + if(targets.length) event.goto(1); }, - subSkill: { - ban: { - onremove: true, - charlotte: true, - intro: { - content: '本轮不能再对$发动〖切谏〗' + subSkill:{ + ban:{ + onremove:true, + charlotte:true, + intro:{ + content:'本轮不能再对$发动〖切谏〗' } } } }, - olnishou: { - audio: 2, - trigger: { - player: 'loseAfter', - global: ['loseAsyncAfter', 'equipAfter'], + olnishou:{ + audio:2, + trigger:{ + player:'loseAfter', + global:['loseAsyncAfter','equipAfter'], }, - forced: true, - filter: function (event, player) { + forced:true, + filter:function(event,player){ var phaseName; - for (var name of lib.phaseName) { - var evt = event.getParent(name); - if (!evt || evt.name != name) continue; - phaseName = name; + for(var name of lib.phaseName){ + var evt=event.getParent(name); + if(!evt||evt.name!=name) continue; + phaseName=name; } - var cards = event.getd(player, 'es'); - return cards.length && (cards.some(card => { - if (get.position(card, true) != 'd') return false; - return player.hasUseTarget(get.autoViewAs({ name: 'shandian' }, [card])); - }) || phaseName && !player.hasSkill('olnishou_swap')); + var cards=event.getd(player,'es'); + return cards.length&&(cards.some(card=>{ + if(get.position(card,true)!='d') return false; + return player.hasUseTarget(get.autoViewAs({name:'shandian'},[card])); + })||phaseName&&!player.hasSkill('olnishou_swap')); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var cards = trigger.getd(player, 'es'); - var choices = []; - var choiceList = [ - '将' + (cards.length ? get.translation(cards[0]) : '这些牌中第一张能当【闪电】对你使用的牌') + '当【闪电】使用', + var cards=trigger.getd(player,'es'); + var choices=[]; + var choiceList=[ + '将'+(cards.length?get.translation(cards[0]):'这些牌中第一张能当【闪电】对你使用的牌')+'当【闪电】使用', '本阶段结束时,你与一名手牌数最少的角色交换手牌' ]; - cards = cards.filter(card => { - if (get.position(card, true) != 'd') return false; - return player.hasUseTarget(get.autoViewAs({ name: 'shandian' }, [card])); + cards=cards.filter(card=>{ + if(get.position(card,true)!='d') return false; + return player.hasUseTarget(get.autoViewAs({name:'shandian'},[card])); }); - event.cards = cards; + event.cards=cards; var phaseName; - for (var name of lib.phaseName) { - var evt = trigger.getParent(name); - if (!evt || evt.name != name) continue; - phaseName = name; + for(var name of lib.phaseName){ + var evt=trigger.getParent(name); + if(!evt||evt.name!=name) continue; + phaseName=name; } - if (cards.length) choices.push('选项一'); - else choiceList[0] = '' + choiceList[0] + ''; - if (phaseName && !player.hasSkill('olnishou_swap')) choices.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - event.phaseName = phaseName; - if (!choices.length) event.finish(); - else player.chooseControl(choices).set('choiceList', choiceList).set('prompt', '泥首:选择一项').set('ai', () => 0); + if(cards.length) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(phaseName&&!player.hasSkill('olnishou_swap')) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + event.phaseName=phaseName; + if(!choices.length) event.finish(); + else player.chooseControl(choices).set('choiceList',choiceList).set('prompt','泥首:选择一项').set('ai',()=>0); 'step 1' player.logSkill('olnishou'); - game.log(player, '选择了', '#y' + result.control); - if (result.control == '选项一') { - var card = cards[0]; - player.chooseUseTarget({ name: 'shandian' }, [card], true); + game.log(player,'选择了','#y'+result.control); + if(result.control=='选项一'){ + var card=cards[0]; + player.chooseUseTarget({name:'shandian'},[card],true); } - else { - var name = event.phaseName; - player.storage.olnishou_swap = name; - player.addTempSkill('olnishou_swap', name + 'After'); + else{ + var name=event.phaseName; + player.storage.olnishou_swap=name; + player.addTempSkill('olnishou_swap',name+'After'); } }, - subSkill: { - swap: { - audio: 'olnishou', - charlotte: true, - forced: true, - direct: true, - onremove: true, - trigger: { global: ['phaseZhunbeiEnd', 'phaseJudgeEnd', 'phaseDrawEnd', 'phaseUseEnd', 'phaseDiscardEnd', 'phaseJieshuEnd'] }, - content: function () { + subSkill:{ + swap:{ + audio:'olnishou', + charlotte:true, + forced:true, + direct:true, + onremove:true, + trigger:{global:['phaseZhunbeiEnd','phaseJudgeEnd','phaseDrawEnd','phaseUseEnd','phaseDiscardEnd','phaseJieshuEnd']}, + content:function(){ 'step 0' - if (trigger.name != player.storage.olnishou_swap || !event.player.isIn()) { + if(trigger.name!=player.storage.olnishou_swap||!event.player.isIn()){ player.removeSkill('olnishou_swap'); event.finish(); return; } - player.chooseTarget('泥首:与一名手牌数最少的角色交换手牌', true, (card, player, target) => { + player.chooseTarget('泥首:与一名手牌数最少的角色交换手牌',true,(card,player,target)=>{ return target.isMinHandcard(); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('olnishou_swap', target); - if (target != player) { + if(result.bool){ + var target=result.targets[0]; + player.logSkill('olnishou_swap',target); + if(target!=player){ player.swapHandcards(target); } } @@ -6283,210 +6284,210 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //马承 - olchenglie: { - audio: 2, - trigger: { player: 'useCard2' }, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - return game.hasPlayer(function (current) { - return !event.targets.includes(current) && player.canUse(event.card, current); + olchenglie:{ + audio:2, + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.includes(current)&&player.canUse(event.card,current); }); }, - direct: true, - shaRelated: true, - content: function () { + direct:true, + shaRelated:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('olchenglie'), '为' + get.translation(trigger.card) + '多指定至多两个目标,并发动后续效果', [1, 2], (card, player, target) => { - var evt = _status.event.getTrigger(); - return !evt.targets.includes(target) && player.canUse(evt.card, target); - }).set('ai', function (target) { - var player = _status.event.player, evt = _status.event.getTrigger(); - return get.effect(target, evt.card, player, player); + player.chooseTarget(get.prompt('olchenglie'),'为'+get.translation(trigger.card)+'多指定至多两个目标,并发动后续效果',[1,2],(card,player,target)=>{ + var evt=_status.event.getTrigger(); + return !evt.targets.includes(target)&&player.canUse(evt.card,target); + }).set('ai',function(target){ + var player=_status.event.player,evt=_status.event.getTrigger(); + return get.effect(target,evt.card,player,player); }); 'step 1' - if (result.bool) { - if (!event.isMine() && !event.isOnline()) game.delayx(); - event.targets = result.targets; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; } else event.finish(); 'step 2' - player.logSkill('olchenglie', targets); + player.logSkill('olchenglie',targets); trigger.targets.addArray(targets); - var targets = trigger.targets; - event.targets = targets; - event.given = []; - var cards = get.cards(targets.length); - event.cards = cards.slice(); - player.showCards(event.cards, get.translation(player) + '发动了【骋烈】'); - while (cards.length) ui.cardPile.insertBefore(cards.pop().fix(), ui.cardPile.firstChild); + var targets=trigger.targets; + event.targets=targets; + event.given=[]; + var cards=get.cards(targets.length); + event.cards=cards.slice(); + player.showCards(event.cards,get.translation(player)+'发动了【骋烈】'); + while(cards.length) ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild); 'step 3' game.updateRoundNumber(); - var hs = player.getCards('h'); - var next = player.chooseToMove('骋烈:是否交换一张牌?'); - next.set('list', [ - ['〖骋烈〗展示', event.cards, 'olchenglie'], - ['你的手牌', hs], + var hs=player.getCards('h'); + var next=player.chooseToMove('骋烈:是否交换一张牌?'); + next.set('list',[ + ['〖骋烈〗展示',event.cards,'olchenglie'], + ['你的手牌',hs], ]); - next.set('filterMove', function (from, to, moved) { - if (typeof to == 'number') return false; - var player = _status.event.player; - var hs = player.getCards('h'); - var changed = hs.filter(function (card) { + next.set('filterMove',function(from,to,moved){ + if(typeof to=='number') return false; + var player=_status.event.player; + var hs=player.getCards('h'); + var changed=hs.filter(function(card){ return !moved[1].includes(card); }); - var changed2 = moved[1].filter(function (card) { + var changed2=moved[1].filter(function(card){ return !hs.includes(card); }); - if (changed.length < 1) return true; - var pos1 = (moved[0].includes(from.link) ? 0 : 1), pos2 = (moved[0].includes(to.link) ? 0 : 1); - if (pos1 == pos2) return true; - if (pos1 == 0) { - if (changed.includes(from.link)) return true; + if(changed.length<1) return true; + var pos1=(moved[0].includes(from.link)?0:1),pos2=(moved[0].includes(to.link)?0:1); + if(pos1==pos2) return true; + if(pos1==0){ + if(changed.includes(from.link)) return true; return changed2.includes(to.link); } - if (changed2.includes(from.link)) return true; + if(changed2.includes(from.link)) return true; return changed.includes(to.link); }); - next.set('processAI', function (list) { - var cards1 = list[0][1].slice(), cards2 = list[1][1].slice(); - var card1 = cards1.sort((a, b) => get.value(b) - get.value(a))[0]; - var card2 = cards2.sort((a, b) => get.value(a) - get.value(b))[0]; - if (card1 && card2 && get.value(card1) > get.value(card2)) { + next.set('processAI',function(list){ + var cards1=list[0][1].slice(),cards2=list[1][1].slice(); + var card1=cards1.sort((a,b)=>get.value(b)-get.value(a))[0]; + var card2=cards2.sort((a,b)=>get.value(a)-get.value(b))[0]; + if(card1&&card2&&get.value(card1)>get.value(card2)){ cards1.remove(card1); cards2.remove(card2); cards1.push(card2); cards2.push(card1); } - return [cards1, cards2]; + return [cards1,cards2]; }); 'step 4' - var moved = result.moved; - var hs = player.getCards('h'), ts = event.cards; - var card1, card2; - for (var i of moved[0]) { - if (!ts.includes(i)) card1 = i; + var moved=result.moved; + var hs=player.getCards('h'),ts=event.cards; + var card1,card2; + for(var i of moved[0]){ + if(!ts.includes(i)) card1=i; } - for (var i of moved[1]) { - if (!hs.includes(i)) card2 = i; + for(var i of moved[1]){ + if(!hs.includes(i)) card2=i; } - if (card1 && card2) { - player.$throw(1, 1000); - event.cards.forEach((i, ind, arr) => { - if (i == card2) arr[ind] = card1; + if(card1&&card2){ + player.$throw(1,1000); + event.cards.forEach((i,ind,arr)=>{ + if(i==card2) arr[ind]=card1; }) - player.lose(card1, ui.cardPile).set('insert_index', event => event.cardx).set('cardx', card2); - player.gain(card2, 'draw'); - game.log(player, '交换了一张牌'); + player.lose(card1,ui.cardPile).set('insert_index',event=>event.cardx).set('cardx',card2); + player.gain(card2,'draw'); + game.log(player,'交换了一张牌'); } 'step 5' game.cardsGotoOrdering(event.cards); 'step 6' - if (event.cards.length == 1) event._result = { bool: true, links: event.cards }; - else player.chooseButton(['骋烈:将这些牌置于目标角色的武将牌上', event.cards], true); + if(event.cards.length==1) event._result={bool:true,links:event.cards}; + else player.chooseButton(['骋烈:将这些牌置于目标角色的武将牌上',event.cards],true); game.updateRoundNumber(); 'step 7' - if (result.bool) { - var card = result.links[0]; - event.card = card; - player.chooseTarget('将' + get.translation(card) + '置于一名目标角色的武将牌上', true, (card, player, target) => { - return _status.event.getTrigger().targets.includes(target) && !_status.event.getParent().given.includes(target); - }).set('ai', target => { - var color = _status.event.color, player = _status.event.player; - var evt = _status.event.getTrigger(); - if (color == 'red') { - var eff = get.effect(target, evt.card, player, target), att = get.attitude(player, target); - if (eff >= 0 && att < 0) return -1; - if (eff < 0 && att < 0 && target.hasCard(card => ['shan', 'caochuan'].includes(get.name(card)), 'hs')) return 10; + if(result.bool){ + var card=result.links[0]; + event.card=card; + player.chooseTarget('将'+get.translation(card)+'置于一名目标角色的武将牌上',true,(card,player,target)=>{ + return _status.event.getTrigger().targets.includes(target)&&!_status.event.getParent().given.includes(target); + }).set('ai',target=>{ + var color=_status.event.color,player=_status.event.player; + var evt=_status.event.getTrigger(); + if(color=='red'){ + var eff=get.effect(target,evt.card,player,target),att=get.attitude(player,target); + if(eff>=0&&att<0) return -1; + if(eff<0&&att<0&&target.hasCard(card=>['shan','caochuan'].includes(get.name(card)),'hs')) return 10; } return 1; - }).set('color', get.color(card)); + }).set('color',get.color(card)); } else event.finish(); 'step 8' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); event.given.push(target); target.addToExpansion(card).gaintag.add('olchenglie'); - player.addTempSkill('olchenglie_effect', 'phaseUseAfter'); - if (!trigger.card.storage) trigger.card.storage = {}; - trigger.card.storage.olchenglie = player; - target.storage.olchenglie_viewer = player; + player.addTempSkill('olchenglie_effect','phaseUseAfter'); + if(!trigger.card.storage) trigger.card.storage={}; + trigger.card.storage.olchenglie=player; + target.storage.olchenglie_viewer=player; event.cards.remove(card); - var cardx = player == game.me || player.isUnderControl() ? card : 1; - player.$give(cardx, target, false); + var cardx=player==game.me||player.isUnderControl()?card:1; + player.$give(cardx,target,false); } else event.finish(); 'step 9' - if (event.cards.length) event.goto(6); - else if (!event.isMine() && !event.isOnline()) game.delayx(); + if(event.cards.length) event.goto(6); + else if(!event.isMine()&&!event.isOnline()) game.delayx(); }, - marktext: '骋', - intro: { - markcount: 'expansion', - mark: function (dialog, content, player) { - var content = player.getExpansions('olchenglie'); - if (content && content.length) { - if (game.me == player.storage.olchenglie_viewer) { + marktext:'骋', + intro:{ + markcount:'expansion', + mark:function(dialog,content,player){ + var content=player.getExpansions('olchenglie'); + if(content&&content.length){ + if(game.me==player.storage.olchenglie_viewer){ dialog.addAuto(content); } - else { - return '有' + get.cnNumber(content.length) + '张扣置的“骋烈”牌'; + else{ + return '有'+get.cnNumber(content.length)+'张扣置的“骋烈”牌'; } } }, - content: function (content, player) { - var content = player.getExpansions('olchenglie'); - if (content && content.length) { - if (game.me == player.storage.olchenglie_viewer) { + content:function(content,player){ + var content=player.getExpansions('olchenglie'); + if(content&&content.length){ + if(game.me==player.storage.olchenglie_viewer){ return get.translation(content); } - return '有' + get.cnNumber(content.length) + '张扣置的“骋烈”牌'; + return '有'+get.cnNumber(content.length)+'张扣置的“骋烈”牌'; } } }, - subSkill: { - effect: { - trigger: { global: 'useCardAfter' }, - forced: true, - charlotte: true, - forceDie: true, - popup: false, - filter: function (event, player) { - return event.card.storage && event.card.storage.olchenglie; + subSkill:{ + effect:{ + trigger:{global:'useCardAfter'}, + forced:true, + charlotte:true, + forceDie:true, + popup:false, + filter:function(event,player){ + return event.card.storage&&event.card.storage.olchenglie; }, - content: function () { + content:function(){ 'step 0' - var targets = game.filterPlayer(current => { - var cards = current.getExpansions('olchenglie'); - return cards.some(i => get.color(i, false) == 'red'); + var targets=game.filterPlayer(current=>{ + var cards=current.getExpansions('olchenglie'); + return cards.some(i=>get.color(i,false)=='red'); }).sortBySeat(); - event.targets = targets; - var togive = trigger.card.storage.olchenglie; - event.togive = togive; - if (!targets.length || !togive.isIn()) event.goto(3); + event.targets=targets; + var togive=trigger.card.storage.olchenglie; + event.togive=togive; + if(!targets.length||!togive.isIn()) event.goto(3); 'step 1' - var target = event.targets.shift(); - event.target = target; + var target=event.targets.shift(); + event.target=target; player.line(target); - if (target.hasHistory('useCard', evt => { - return evt.respondTo && evt.respondTo[1] == trigger.card; - })) { - if (target.countCards('he')) target.chooseCard('骋烈:交给' + get.translation(event.togive) + '一张牌', true, 'he'); + if(target.hasHistory('useCard',evt=>{ + return evt.respondTo&&evt.respondTo[1]==trigger.card; + })){ + if(target.countCards('he')) target.chooseCard('骋烈:交给'+get.translation(event.togive)+'一张牌',true,'he'); } - else { + else{ target.recover(); } 'step 2' - if (result.bool) { - target.give(result.cards, event.togive); + if(result.bool){ + target.give(result.cards,event.togive); } - if (targets.length) event.goto(1); + if(targets.length) event.goto(1); 'step 3' - game.filterPlayer(current => { - var cards = current.getExpansions('olchenglie'); + game.filterPlayer(current=>{ + var cards=current.getExpansions('olchenglie'); return cards.length; - }).forEach(i => { + }).forEach(i=>{ i.loseToDiscardpile(i.getExpansions('olchenglie')); delete i.storage.olchenglie_viewer; }); @@ -6495,281 +6496,281 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //新贺齐 - olqizhou: { - audio: 'qizhou', - trigger: { - player: 'loseAfter', - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter', 'phaseBefore'], + olqizhou:{ + audio:'qizhou', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','phaseBefore'], }, - forced: true, - onremove: true, - filter: function (event, player) { - if (event.name != 'phase' && (event.name != 'equip' || event.player != player)) { - var evt = event.getl(player); - if (!evt || !evt.es || !evt.es.length) return false; + forced:true, + onremove:true, + filter:function(event,player){ + if(event.name!='phase'&&(event.name!='equip'||event.player!=player)){ + var evt=event.getl(player); + if(!evt||!evt.es||!evt.es.length) return false; } - var num = player.countMark('olqizhou'); - return lib.skill.olqizhou.getSuitNum(player) != num; + var num=player.countMark('olqizhou'); + return lib.skill.olqizhou.getSuitNum(player)!=num; }, - content: function () { + content:function(){ lib.skill.olqizhou.applyChange(player); }, - getSuitNum: function (player) { - var suits = [], es = player.getCards('e'); - for (var i of es) suits.add(get.suit(i, player)); - return Math.min(4, suits.length); + getSuitNum:function(player){ + var suits=[],es=player.getCards('e'); + for(var i of es) suits.add(get.suit(i,player)); + return Math.min(4,suits.length); }, - applyChange: function (player) { + applyChange:function(player){ player.removeAdditionalSkill('olqizhou'); - var num = lib.skill.olqizhou.getSuitNum(player); - player.storage.olqizhou = num; - if (num > 0) player.addAdditionalSkill('olqizhou', lib.skill.olqizhou.derivation.slice(0, num)); + var num=lib.skill.olqizhou.getSuitNum(player); + player.storage.olqizhou=num; + if(num>0) player.addAdditionalSkill('olqizhou',lib.skill.olqizhou.derivation.slice(0,num)); }, - derivation: ['reduanbing', 'reyingzi', 'fenwei', 'lanjiang'], + derivation:['reduanbing','reyingzi','fenwei','lanjiang'], }, - olshanxi: { - audio: 'shanxi', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('e') < 5 && game.hasPlayer((current) => lib.skill.olshanxi.filterTarget(null, player, current)); + olshanxi:{ + audio:'shanxi', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('e')<5&&game.hasPlayer((current)=>lib.skill.olshanxi.filterTarget(null,player,current)); }, - filterTarget: function (card, player, target) { - return (target != player && player.countCards('h') + target.countCards('h') > 0 && !player.inRangeOf(target)); + filterTarget:function(card,player,target){ + return (target!=player&&player.countCards('h')+target.countCards('h')>0&&!player.inRangeOf(target)); }, - content: function () { + content:function(){ 'step 0' - var cards1 = player.getCards('h'), cards2 = target.getCards('h'); - var num = 5 - player.countCards('e'); - var dialog = ['闪袭:选择展示至多' + get.cnNumber(num) + '张牌']; - if (cards1.length > 0) { + var cards1=player.getCards('h'),cards2=target.getCards('h'); + var num=5-player.countCards('e'); + var dialog=['闪袭:选择展示至多'+get.cnNumber(num)+'张牌']; + if(cards1.length>0){ dialog.push('
    你的手牌
    '); dialog.push(cards1); } - if (cards2.length > 0) { - dialog.push('
    ' + get.translation(target) + '的手牌
    '); - if (player.hasSkillTag('viewHandcard', null, target, true)) dialog.push(cards2); - else dialog.push([cards2.randomSort(), 'blank']); + if(cards2.length>0){ + dialog.push('
    '+get.translation(target)+'的手牌
    '); + if(player.hasSkillTag('viewHandcard',null,target,true)) dialog.push(cards2); + else dialog.push([cards2.randomSort(),'blank']); } - player.chooseButton(dialog, [1, num], true).set('ai', function (button) { - var player = _status.event.player, target = _status.event.getParent().target; - var card = button.link, cards = ui.selected.buttons.map(button => button.link); - var hs = player.getCards('h'), discard = false; - for (var i of cards) { - if (hs.includes(i)) { - discard = true; + player.chooseButton(dialog,[1,num],true).set('ai',function(button){ + var player=_status.event.player,target=_status.event.getParent().target; + var card=button.link,cards=ui.selected.buttons.map(button=>button.link); + var hs=player.getCards('h'),discard=false; + for(var i of cards){ + if(hs.includes(i)){ + discard=true; break; } } - if (hs.includes(card)) { - if (discard || get.name(card) != 'shan') return 0; - if (target.hasCard(card => get.value(card, target) > 5, 'e')) return 2; + if(hs.includes(card)){ + if(discard||get.name(card)!='shan') return 0; + if(target.hasCard(card=>get.value(card,target)>5,'e')) return 2; return 0; } - if (discard && !target.hasCard(function (cardx) { - return cardx != card && !cards.includes(cardx) && get.value(cardx, target) > 0; - }, 'he')) return 0; - return 1 + Math.random(); + if(discard&&!target.hasCard(function(cardx){ + return cardx!=card&&!cards.includes(cardx)&&get.value(cardx,target)>0; + },'he')) return 0; + return 1+Math.random(); }); 'step 1' - if (result.bool) { - event.cards = result.links; - var list1 = [], list2 = []; - var hs = player.getCards('h'); - for (var card of result.links) { - if (hs.includes(card)) { + if(result.bool){ + event.cards=result.links; + var list1=[],list2=[]; + var hs=player.getCards('h'); + for(var card of result.links){ + if(hs.includes(card)){ list1.push(card); } - else { + else{ list2.push(card); } } - event.list1 = list1; - event.list2 = list2; - event.videoId = lib.status.videoId++; - game.broadcastAll(function (player, target, list1, list2, id) { - var dialog = ui.create.dialog(player + '对' + target + '发动了【闪袭】'); - dialog.videoId = id; - if (list1.length > 0) { - dialog.add('
    ' + player + '展示的牌
    '); + event.list1=list1; + event.list2=list2; + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,target,list1,list2,id){ + var dialog=ui.create.dialog(player+'对'+target+'发动了【闪袭】'); + dialog.videoId=id; + if(list1.length>0){ + dialog.add('
    '+player+'展示的牌
    '); dialog.add(list1); } - if (list2.length > 0) { - dialog.add('
    ' + target + '被展示的牌
    '); + if(list2.length>0){ + dialog.add('
    '+target+'被展示的牌
    '); dialog.add(list2); } - }, get.translation(player), get.translation(target), list1, list2, event.videoId) + },get.translation(player),get.translation(target),list1,list2,event.videoId) game.delay(4); } else event.finish(); 'step 2' - game.broadcastAll('closeDialog', event.videoId); - var list1 = event.list1.filter((card) => get.name(card, player) == 'shan'); - var list2 = event.list2.filter((card) => get.name(card, target) == 'shan'); - if (list1.length && list2.length) { + game.broadcastAll('closeDialog',event.videoId); + var list1=event.list1.filter((card)=>get.name(card,player)=='shan'); + var list2=event.list2.filter((card)=>get.name(card,target)=='shan'); + if(list1.length&&list2.length){ game.loseAsync({ - lose_list: [ - [player, list1], - [target, list2] + lose_list:[ + [player,list1], + [target,list2] ], - discarder: player, + discarder:player, }).setContent('discardMultiple'); } - else if (list2.length) { + else if(list2.length){ target.discard(list2); } - else if (list1.length) player.discard(list1); + else if(list1.length) player.discard(list1); else event.finish(); 'step 3' - if (target.hasCard(function (card) { - return !cards.includes(card) && lib.filter.canBeGained(card, player, target); - }, 'he')) player.gainPlayerCard(target, true, 'he').set('filterButton', function (button) { + if(target.hasCard(function(card){ + return !cards.includes(card)&&lib.filter.canBeGained(card,player,target); + },'he')) player.gainPlayerCard(target,true,'he').set('filterButton',function(button){ return !_status.event.cards.includes(button.link); - }).set('cards', cards); + }).set('cards',cards); }, - ai: { - order: 14, - result: { - target: function (player, target) { + ai:{ + order:14, + result:{ + target:function(player,target){ return -target.countCards('h'); }, }, }, }, //刘巴 - oltongduo: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - content: function () { + oltongduo:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('oltongduo'), function (card, player, target) { - return target != player && target.countCards('h') > 0; - }).set('ai', function (target) { - var att = get.attitude(_status.event.player, target); - if (att > 0) return Math.sqrt(att) / 10; - return 5 - att; + player.chooseTarget(get.prompt2('oltongduo'),function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }).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('oltongduo', target); - target.chooseCard('h', true, '统度:将一张手牌交给' + get.translation(player) + ',然后其于此阶段结束时将此牌置于牌堆顶'); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('oltongduo',target); + target.chooseCard('h',true,'统度:将一张手牌交给'+get.translation(player)+',然后其于此阶段结束时将此牌置于牌堆顶'); } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { + if(result.bool){ player.addTempSkill('oltongduo_put'); - event.target.give(result.cards, player, true).gaintag.add('oltongduo'); + event.target.give(result.cards,player,true).gaintag.add('oltongduo'); } }, - subSkill: { - put: { - trigger: { player: 'phaseUseEnd' }, - charlotte: true, - forced: true, - filter: function (event, player) { - return player.hasCard(card => card.hasGaintag('oltongduo'), 'h'); + subSkill:{ + put:{ + trigger:{player:'phaseUseEnd'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player.hasCard(card=>card.hasGaintag('oltongduo'),'h'); }, - content: function () { - var cards = player.getCards('h', card => card.hasGaintag('oltongduo')); - player.lose(cards, ui.cardPile, 'insert'); - game.log(player, '将', get.cnNumber(cards.length) + '张牌', '置于牌堆顶'); - game.broadcastAll(function (player) { - var cardx = ui.create.card(); + content:function(){ + var cards=player.getCards('h',card=>card.hasGaintag('oltongduo')); + player.lose(cards,ui.cardPile,'insert'); + game.log(player,'将',get.cnNumber(cards.length)+'张牌','置于牌堆顶'); + game.broadcastAll(function(player){ + var cardx=ui.create.card(); cardx.classList.add('infohidden'); cardx.classList.add('infoflip'); - player.$throw(cardx, 1000, 'nobroadcast'); - }, player); + player.$throw(cardx,1000,'nobroadcast'); + },player); }, - onremove: function (player) { + onremove:function(player){ player.removeGaintag('oltongduo'); }, } } }, - olzhubi: { - audio: 2, - enable: 'phaseUse', - group: 'olzhubi_replace', - filter: function (event, player) { - return (player.getStat('skill').olzhubi || 0) < player.maxHp; + olzhubi:{ + audio:2, + enable:'phaseUse', + group:'olzhubi_replace', + filter:function(event,player){ + return (player.getStat('skill').olzhubi||0) 0; + filterTarget:function(card,player,target){ + return target.countCards('he')>0; }, - content: function () { + content:function(){ 'step 0' - target.chooseCard('he', true, '铸币:请重铸一张牌', lib.filter.cardRecastable); + target.chooseCard('he',true,'铸币:请重铸一张牌',lib.filter.cardRecastable); 'step 1' - if (result.bool) { - target.recast(result.cards, null, player => player.draw().set('log', false).gaintag = ['olzhubi_tag']); + if(result.bool){ + target.recast(result.cards,null,player=>player.draw().set('log',false).gaintag=['olzhubi_tag']); } }, - ai: { - order: 6, - result: { - target: function (player, target) { - if (target.hasCard(card => card.hasGaintag('olzhubi_tag'), 'h')) return 0.5; + ai:{ + order:6, + result:{ + target:function(player,target){ + if(target.hasCard(card=>card.hasGaintag('olzhubi_tag'),'h')) return 0.5; return 1; } } }, - subSkill: { - replace: { - trigger: { global: 'phaseJieshuBegin' }, - filter: function (event, player) { - return event.player.hasCard(card => card.hasGaintag('olzhubi_tag'), 'h'); + subSkill:{ + replace:{ + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player.hasCard(card=>card.hasGaintag('olzhubi_tag'),'h'); }, - forced: true, - locked: false, - logTarget: 'player', - content: function () { + forced:true, + locked:false, + logTarget:'player', + content:function(){ 'step 0' - var cards = get.bottomCards(5); - event.cards2 = cards; + var cards=get.bottomCards(5); + event.cards2=cards; game.cardsGotoOrdering(cards); - var player = trigger.player; - var next = player.chooseToMove('铸币:用任意“币”交换牌堆底等量张牌'); - var hs = player.getCards('h', card => card.hasGaintag('olzhubi_tag')); - next.set('filterMove', function (from, to) { - return typeof to != 'number'; + var player=trigger.player; + var next=player.chooseToMove('铸币:用任意“币”交换牌堆底等量张牌'); + var hs=player.getCards('h',card=>card.hasGaintag('olzhubi_tag')); + next.set('filterMove',function(from,to){ + return typeof to!='number'; }); - next.set('list', [ - ['牌堆底', cards], - ['你的手牌', hs, 'olzhubi_tag'] + next.set('list',[ + ['牌堆底',cards], + ['你的手牌',hs,'olzhubi_tag'] ]); - next.set('processAI', function (list) { - var all = list[0][1].concat(list[1][1]), cards = all.slice(0); - var num = _status.event.num; - cards.sort(function (a, b) { - return get.value(b) - get.value(a); + next.set('processAI',function(list){ + var all=list[0][1].concat(list[1][1]),cards=all.slice(0); + var num=_status.event.num; + cards.sort(function(a,b){ + return get.value(b)-get.value(a); }); - return [cards.slice(num), cards.slice(0, num)]; + return [cards.slice(num),cards.slice(0,num)]; }); - next.set('num', hs.length); + next.set('num',hs.length); 'step 1' - if (result.bool) { - event.forceDie = true; - var cards = result.moved[0]; - event.cards = cards; - var player = trigger.player; - var hs = player.getCards('h'); - var lose = [], gain = event.cards2; - for (var i of cards) { - if (hs.includes(i)) lose.push(i); + if(result.bool){ + event.forceDie=true; + var cards=result.moved[0]; + event.cards=cards; + var player=trigger.player; + var hs=player.getCards('h'); + var lose=[],gain=event.cards2; + for(var i of cards){ + if(hs.includes(i)) lose.push(i); else gain.remove(i); } - if (lose.length) player.lose(lose, ui.cardPile); - if (gain.length) player.gain(gain, 'draw'); + if(lose.length) player.lose(lose,ui.cardPile); + if(gain.length) player.gain(gain,'draw'); } else event.finish(); 'step 2' - for (var i of cards) { - if (!(('hejsdx').includes(get.position(i, true)))) { + for(var i of cards){ + if(!(('hejsdx').includes(get.position(i,true)))){ i.fix(); ui.cardPile.appendChild(i); } @@ -6780,279 +6781,279 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //傅肜 - olxiaosi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return target.countCards('h') > 0 && player != target; + olxiaosi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&player!=target; }, - filterCard: function (card, player, target) { - return get.type(card) == 'basic'; + filterCard:function(card,player,target){ + return get.type(card)=='basic'; }, - check: function (card) { - var player = _status.event.player; - if (player.hasValueTarget(card)) return 10 - get.value(card); + check:function(card){ + var player=_status.event.player; + if(player.hasValueTarget(card)) return 10-get.value(card); return 0.1; }, - content: function () { + content:function(){ 'step 0' - if (target.countCards('h', card => { - return get.type(card) == 'basic' && lib.filter.cardDiscardable(card, target, 'olxiaosi'); - }) == 0) event.draw = true; - else { - target.chooseToDiscard('h', true, '效死:弃置一张基本牌', { type: 'basic' }); + if(target.countCards('h',card=>{ + return get.type(card)=='basic'&&lib.filter.cardDiscardable(card,target,'olxiaosi'); + })==0) event.draw=true; + else{ + target.chooseToDiscard('h',true,'效死:弃置一张基本牌',{type:'basic'}); } 'step 1' - var cards2 = cards.slice(0); - if (result.bool) { - cards2 = cards2.addArray(result.cards); + var cards2=cards.slice(0); + if(result.bool){ + cards2=cards2.addArray(result.cards); } - event.cards2 = cards2; + event.cards2=cards2; 'step 2' - var cardsx = event.cards2.filter(i => get.position(i, true) == 'd' && player.hasUseTarget(i, false)); - if (!cardsx.length) event.goto(5); - else player.chooseButton(['效死:是否使用其中的一张牌?', cardsx]).set('filterButton', button => { - return _status.event.player.hasUseTarget(button.link, false); - }).set('ai', button => { - if (button.link.name == 'jiu') return 10; + var cardsx=event.cards2.filter(i=>get.position(i,true)=='d'&&player.hasUseTarget(i,false)); + if(!cardsx.length) event.goto(5); + else player.chooseButton(['效死:是否使用其中的一张牌?',cardsx]).set('filterButton',button=>{ + return _status.event.player.hasUseTarget(button.link,false); + }).set('ai',button=>{ + if(button.link.name=='jiu') return 10; return _status.event.player.getUseValue(button.link); }); 'step 3' - if (result.bool) { - var card = result.links[0]; + if(result.bool){ + var card=result.links[0]; event.cards2.remove(card); - player.$gain2(card, false); + player.$gain2(card,false); game.delayx(); - player.chooseUseTarget(true, card, false, 'nodistance'); + player.chooseUseTarget(true,card,false,'nodistance'); } else event.goto(5); 'step 4' - if (event.cards2.filter(i => get.position(i, true) == 'd' && player.hasUseTarget(i, false)).length) event.goto(2); + if(event.cards2.filter(i=>get.position(i,true)=='d'&&player.hasUseTarget(i,false)).length) event.goto(2); 'step 5' - if (event.draw) player.draw(); + if(event.draw) player.draw(); }, - ai: { - order: 4.5, - result: { - player: 1, - target: -1 + ai:{ + order:4.5, + result:{ + player:1, + target:-1 } } }, //阿会喃 - jueman: { - audio: 2, - trigger: { global: 'phaseEnd' }, - forced: true, - direct: true, - filter: function (event, player) { - var history = game.getGlobalHistory('useCard', evt => { - return get.type(evt.card) == 'basic'; + jueman:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + direct:true, + filter:function(event,player){ + var history=game.getGlobalHistory('useCard',evt=>{ + return get.type(evt.card)=='basic'; }); - if (history.length < 2) return false; - var users = history.slice(0, 2).map(i => i.player); - var list = users.filter(user => user == player); - if (list.length == 1) return true; - if (list.length == 0) { - var evtx = history[2]; - if (evtx) { - var name = evtx.card.name, nature = evtx.card.nature; - if (evtx && player.hasUseTarget({ name: name, nature: nature, isCard: true })) return true; + if(history.length<2) return false; + var users=history.slice(0,2).map(i=>i.player); + var list=users.filter(user=>user==player); + if(list.length==1) return true; + if(list.length==0){ + var evtx=history[2]; + if(evtx){ + var name=evtx.card.name,nature=evtx.card.nature; + if(evtx&&player.hasUseTarget({name:name,nature:nature,isCard:true})) return true; } } return false; }, - content: function () { + content:function(){ 'step 0' - var history = game.getGlobalHistory('useCard', evt => { - return get.type(evt.card) == 'basic'; + var history=game.getGlobalHistory('useCard',evt=>{ + return get.type(evt.card)=='basic'; }); - var list = history.slice(0, 2).map(i => i.player).filter(user => user == player); - if (list.length == 1) { + var list=history.slice(0,2).map(i=>i.player).filter(user=>user==player); + if(list.length==1) { player.logSkill('jueman'); player.draw(); } - else if (list.length == 0) { - var evtx = history[2], name = evtx.card.name, nature = evtx.card.nature; - player.chooseUseTarget({ name: name, nature: nature, isCard: true }, true).set('logSkill', 'jueman'); + else if(list.length==0){ + var evtx=history[2],name=evtx.card.name,nature=evtx.card.nature; + player.chooseUseTarget({name:name,nature:nature,isCard:true},true).set('logSkill','jueman'); } } }, //张芝 - olbixin: { - audio: 2, - trigger: { - global: ['phaseZhunbeiBegin', 'phaseJieshuBegin'], + olbixin:{ + audio:2, + trigger:{ + global:['phaseZhunbeiBegin','phaseJieshuBegin'], }, - direct: true, - onremove: ['olbixin', 'olbixin_basic', 'olbixin_trick', 'olbixin_equip'], - group: 'olbixin_full', - map: { 基本: 'basic', 锦囊: 'trick', 装备: 'equip' }, - filter: function (event, player) { - var count = player.countMark('olbixin'); - if (count > 0 && event.player != player) return false; - if (count > 1 && event.name == 'phaseZhunbei') return false; - if (count > 2) return false; - var num = count >= 3 ? 3 : 1; - var types = ['basic', 'trick', 'equip'].filter(type => { - return player.countMark('olbixin_' + type) < num; + direct:true, + onremove:['olbixin','olbixin_basic','olbixin_trick','olbixin_equip'], + group:'olbixin_full', + map:{基本:'basic',锦囊:'trick',装备:'equip'}, + filter:function(event,player){ + var count=player.countMark('olbixin'); + if(count>0&&event.player!=player) return false; + if(count>1&&event.name=='phaseZhunbei') return false; + if(count>2) return false; + var num=count>=3?3:1; + var types=['basic','trick','equip'].filter(type=>{ + return player.countMark('olbixin_'+type) 0; + if(!types.length) return false; + return lib.skill.olbixin.getList(player).length>0; }, - getList: function (player, event) { - var natures = lib.inpile_nature.slice(0), used = []; - var history = player.actionHistory; - for (var i = history.length - 1; i >= 0; i--) { - var info = history[i]; - for (var evt of info.useCard) { - var name = evt.card.name; - if (get.type(name) != 'basic') continue; - if (name == 'sha') { - if (evt.card.nature) natures.remove(evt.card.nature); + getList:function(player,event){ + var natures=lib.inpile_nature.slice(0),used=[]; + var history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + var info=history[i]; + for(var evt of info.useCard){ + var name=evt.card.name; + if(get.type(name)!='basic') continue; + if(name=='sha'){ + if(evt.card.nature) natures.remove(evt.card.nature); else used.push(name); } else used.push(name); } - if (info.isRound) break; + if(info.isRound) break; } - var vcards = []; - for (var name of lib.inpile) { - if (get.type(name) != 'basic') continue; - if (!event) { - if (name == 'sha') { - if (!used.includes('sha') && player.hasUseTarget({ name: 'sha' })) vcards.push(['基本', '', 'sha']); - for (var nature of natures) { - if (player.hasUseTarget({ name: 'sha', nature: nature })) vcards.push(['基本', '', 'sha', nature]); + var vcards=[]; + for(var name of lib.inpile){ + if(get.type(name)!='basic') continue; + if(!event){ + if(name=='sha'){ + if(!used.includes('sha')&&player.hasUseTarget({name:'sha'})) vcards.push(['基本','','sha']); + for(var nature of natures) { + if(player.hasUseTarget({name:'sha',nature:nature})) vcards.push(['基本','','sha',nature]); } } - else if (!used.includes(name) && player.hasUseTarget({ name: name })) vcards.push(['基本', '', name]); + else if(!used.includes(name)&&player.hasUseTarget({name:name})) vcards.push(['基本','',name]); } - else { - if (name == 'sha') { - if (!used.includes('sha') && event.filterCard({ name: 'sha' }, player, event)) vcards.push(['基本', '', 'sha']); - for (var nature of natures) { - if (event.filterCard({ name: 'sha', nature: nature }, player, event)) vcards.push(['基本', '', 'sha', nature]); + else{ + if(name=='sha'){ + if(!used.includes('sha')&&event.filterCard({name:'sha'},player,event)) vcards.push(['基本','','sha']); + for(var nature of natures) { + if(event.filterCard({name:'sha',nature:nature},player,event)) vcards.push(['基本','','sha',nature]); } } - else if (!used.includes(name) && event.filterCard({ name: name }, player, event)) vcards.push(['基本', '', name]); + else if(!used.includes(name)&&event.filterCard({name:name},player,event)) vcards.push(['基本','',name]); } } return vcards; }, - content: function () { + content:function(){ 'step 0' - var types = ['basic', 'trick', 'equip']; - var list = lib.skill.olbixin.getList(player); - if (list.length) { - var dialog = ['###' + get.prompt('olbixin') + '###
    摸' + get.cnNumber(player.countMark('olbixin') >= 3 ? 1 : 3) + '张牌,然后将所有指定类型的手牌当一张基本牌使用
    ']; - dialog.push([types.map(i => get.translation(i)), 'tdnodes']); - dialog.push([list, 'vcard']); - player.chooseButton(dialog, 2).set('filterButton', button => { - var player = _status.event.player, count = player.countMark('olbixin'), num = count >= 3 ? 3 : 1; - var type = typeof button.link; - if (ui.selected.buttons.length && type == typeof ui.selected.buttons[0].link) return false; - if (type == 'string' && player.countMark('olbixin_' + lib.skill.olbixin.map[button.link]) >= num) return false; - if (type != 'string' && !player.hasUseTarget({ name: button.link[2], nature: button.link[3] })) return false; + var types=['basic','trick','equip']; + var list=lib.skill.olbixin.getList(player); + if(list.length){ + var dialog=['###'+get.prompt('olbixin')+'###
    摸'+get.cnNumber(player.countMark('olbixin')>=3?1:3)+'张牌,然后将所有指定类型的手牌当一张基本牌使用
    ']; + dialog.push([types.map(i=>get.translation(i)),'tdnodes']); + dialog.push([list,'vcard']); + player.chooseButton(dialog,2).set('filterButton',button=>{ + var player=_status.event.player,count=player.countMark('olbixin'),num=count>=3?3:1; + var type=typeof button.link; + if(ui.selected.buttons.length&&type==typeof ui.selected.buttons[0].link) return false; + if(type=='string'&&player.countMark('olbixin_'+lib.skill.olbixin.map[button.link])>=num) return false; + if(type!='string'&&!player.hasUseTarget({name:button.link[2],nature:button.link[3]})) return false; return true; - }).set('ai', button => { - var list = _status.event.list; - var type = typeof button.link; - if (type == 'string') return (1.2 - list.indexOf(lib.skill.olbixin.map[button.link])) * 10; - return _status.event.player.getUseValue({ name: button.link[2], nature: button.link[3] }); - }).set('list', types.map(i => [i, player.getCards('h', { type: i }).map(i => get.value(i)).reduce((p, c) => p + c, 0)]).sort((a, b) => a[1] - b[1]).map(i => i[0])); - } else event.finish(); + }).set('ai',button=>{ + var list=_status.event.list; + var type=typeof button.link; + if(type=='string') return (1.2-list.indexOf(lib.skill.olbixin.map[button.link]))*10; + return _status.event.player.getUseValue({name:button.link[2],nature:button.link[3]}); + }).set('list',types.map(i=>[i,player.getCards('h',{type:i}).map(i=>get.value(i)).reduce((p,c)=>p+c,0)]).sort((a,b)=>a[1]-b[1]).map(i=>i[0])); + }else event.finish(); 'step 1' - if (result.bool) { - if (typeof result.links[0] != 'string') result.links.reverse(); - var type = result.links[0], name = result.links[1][2], nature = result.links[1][3]; + if(result.bool){ + if(typeof result.links[0]!='string') result.links.reverse(); + var type=result.links[0],name=result.links[1][2],nature=result.links[1][3]; player.logSkill('olbixin'); - game.log(player, '声明了', type + '牌'); - type = lib.skill.olbixin.map[type]; - event.type = type; - event.card = { name: name, nature: nature }; - player.addMark('olbixin_' + type, 1, false); - player.draw(player.countMark('olbixin') >= 3 ? 1 : 3); + game.log(player,'声明了',type+'牌'); + type=lib.skill.olbixin.map[type]; + event.type=type; + event.card={name:name,nature:nature}; + player.addMark('olbixin_'+type,1,false); + player.draw(player.countMark('olbixin')>=3?1:3); game.delayx(); - } else event.finish(); + }else event.finish(); 'step 2' - if (player.hasCard(card => get.type2(card) == event.type, 'h')) { - var cards = player.getCards('h', card => get.type2(card) == event.type); - var cardx = get.autoViewAs(card, cards); - if (player.hasUseTarget(cardx, true, false)) { - player.chooseUseTarget(cardx, cards, true, false).set('prompt', '选择' + get.translation(cardx) + '(' + get.translation(cards) + ')的目标'); + if(player.hasCard(card=>get.type2(card)==event.type,'h')){ + var cards=player.getCards('h',card=>get.type2(card)==event.type); + var cardx=get.autoViewAs(card,cards); + if(player.hasUseTarget(cardx,true,false)){ + player.chooseUseTarget(cardx,cards,true,false).set('prompt','选择'+get.translation(cardx)+'('+get.translation(cards)+')的目标'); } } }, - subSkill: { - full: { - enable: 'chooseToUse', - filter: function (event, player) { - if (event.olbixin) return false; - var count = player.countMark('olbixin'); - if (count <= 2) return false; - var num = count >= 3 ? 3 : 1; - var types = ['basic', 'trick', 'equip'].filter(type => { - return player.countMark('olbixin_' + type) < num; + subSkill:{ + full:{ + enable:'chooseToUse', + filter:function(event,player){ + if(event.olbixin) return false; + var count=player.countMark('olbixin'); + if(count<=2) return false; + var num=count>=3?3:1; + var types=['basic','trick','equip'].filter(type=>{ + return player.countMark('olbixin_'+type) 0; + if(!types.length) return false; + return lib.skill.olbixin.getList(player,event).length>0; }, - prompt: '你可以声明一种牌的类型(每种类型限三次),并选择一种你本轮未使用过且有合法目标的的基本牌。你摸一张牌,然后若你有此类型的手牌,你将所有此类型的手牌当此基本牌使用。', - chooseButton: { - dialog: function (event, player) { - var list = lib.skill.olbixin.getList(player, event); - var types = ['basic', 'trick', 'equip']; + prompt:'你可以声明一种牌的类型(每种类型限三次),并选择一种你本轮未使用过且有合法目标的的基本牌。你摸一张牌,然后若你有此类型的手牌,你将所有此类型的手牌当此基本牌使用。', + chooseButton:{ + dialog:function(event,player){ + var list=lib.skill.olbixin.getList(player,event); + var types=['basic','trick','equip']; return ui.create.dialog( '###笔心###
    摸一张牌,然后将所有指定类型的手牌当一张基本牌使用
    ', - [types.map(i => get.translation(i)), 'tdnodes'], - [list, 'vcard'] + [types.map(i=>get.translation(i)),'tdnodes'], + [list,'vcard'] ); }, - filter: function (button, player) { - var player = _status.event.player, count = player.countMark('olbixin'), num = count >= 3 ? 3 : 1; - var type = typeof button.link; - if (ui.selected.buttons.length && type == typeof ui.selected.buttons[0].link) return false; - if (type == 'string' && player.countMark('olbixin_' + lib.skill.olbixin.map[button.link]) >= num) return false; - if (type != 'string' && !_status.event.getParent().filterCard({ name: button.link[2], nature: button.link[3] }, player, _status.event.getParent())) return false; + filter:function(button,player){ + var player=_status.event.player,count=player.countMark('olbixin'),num=count>=3?3:1; + var type=typeof button.link; + if(ui.selected.buttons.length&&type==typeof ui.selected.buttons[0].link) return false; + if(type=='string'&&player.countMark('olbixin_'+lib.skill.olbixin.map[button.link])>=num) return false; + if(type!='string'&&!_status.event.getParent().filterCard({name:button.link[2],nature:button.link[3]},player,_status.event.getParent())) return false; return true; }, - select: 2, - check: function (button) { - var types = ['basic', 'trick', 'equip']; - var type = typeof button.link; - var player = _status.event.player; - var list = types.map(i => [i, player.getCards('h', { type: i }).map(i => get.value(i)).reduce((p, c) => p + c, 0)]).sort((a, b) => a[1] - b[1]).map(i => i[0]); - if (type == 'string') return (1.2 - list.indexOf(button.link) + Math.sqrt(3 - player.countMark('olbixin_' + lib.skill.olbixin.map[button.link]))) * 10; - if (_status.event.getParent().type != 'phase') return 1; - return player.getUseValue({ name: button.link[2], nature: button.link[3] }); + select:2, + check:function(button){ + var types=['basic','trick','equip']; + var type=typeof button.link; + var player=_status.event.player; + var list=types.map(i=>[i,player.getCards('h',{type:i}).map(i=>get.value(i)).reduce((p,c)=>p+c,0)]).sort((a,b)=>a[1]-b[1]).map(i=>i[0]); + if(type=='string') return (1.2-list.indexOf(button.link)+Math.sqrt(3-player.countMark('olbixin_'+lib.skill.olbixin.map[button.link])))*10; + if(_status.event.getParent().type!='phase') return 1; + return player.getUseValue({name:button.link[2],nature:button.link[3]}); }, - backup: function (links, player) { - if (typeof links[0] != 'string') links.reverse(); + backup:function(links,player){ + if(typeof links[0]!='string') links.reverse(); return { - popname: true, - position: 'h', - filterCard: () => false, - selectCard: -1, - type: lib.skill.olbixin.map[links[0]], - viewAs: { name: links[1][2], nature: links[1][3] }, - precontent: function () { + popname:true, + position:'h', + filterCard:()=>false, + selectCard:-1, + type:lib.skill.olbixin.map[links[0]], + viewAs:{name:links[1][2],nature:links[1][3]}, + precontent:function(){ 'step 0' player.logSkill('olbixin'); - var type = lib.skill.olbixin_full_backup.type; - game.log(player, '声明了', type, '牌'); + var type=lib.skill.olbixin_full_backup.type; + game.log(player,'声明了',type,'牌'); delete event.result.skill; - player.addMark('olbixin_' + type, 1, false); - player.draw(player.countMark('olbixin') >= 3 ? 1 : 3); + player.addMark('olbixin_'+type,1,false); + player.draw(player.countMark('olbixin')>=3?1:3); 'step 1' - var cards = player.getCards('h', card => get.type2(card) == lib.skill.olbixin_full_backup.type); - var cardsx = cards.filter(i => game.checkMod(i, player, 'unchanged', 'cardEnabled2', player) !== false); - if (cardsx.length && cardsx.length == cards.length) { - event.result.cards = cards; + var cards=player.getCards('h',card=>get.type2(card)==lib.skill.olbixin_full_backup.type); + var cardsx=cards.filter(i=>game.checkMod(i,player,'unchanged','cardEnabled2',player)!==false); + if(cardsx.length&&cardsx.length==cards.length){ + event.result.cards=cards; game.delayx(); } - else { + else{ event.cancel(); // event.getParent().set('olbixin',true); event.getParent().goto(0); @@ -7061,697 +7062,697 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, } }, - prompt: function (links, player) { - return '摸一张牌,然后将所有' + get.translation(links[0]) + '牌当做' + (get.translation(links[1][3]) || '') + get.translation(links[1][2]) + '使用'; + prompt:function(links,player){ + return '摸一张牌,然后将所有'+get.translation(links[0])+'牌当做'+(get.translation(links[1][3])||'')+get.translation(links[1][2])+'使用'; } }, - hiddenCard: function (player, name) { - var count = player.countMark('olbixin'); - if (!lib.inpile.includes(name) || get.type(name) != 'basic' || count < 3) return false; - var types = ['basic', 'trick', 'equip'].filter(type => { - return player.countMark('olbixin_' + type) < 3; + hiddenCard:function(player,name){ + var count=player.countMark('olbixin'); + if(!lib.inpile.includes(name)||get.type(name)!='basic'||count<3) return false; + var types=['basic','trick','equip'].filter(type=>{ + return player.countMark('olbixin_'+type)<3; }); return types.length; }, - ai: { - fireAttack: true, - respondSha: true, - respondShan: true, - skillTagFilter: function (player) { - var count = player.countMark('olbixin'); - if (count < 3) return; - var types = ['basic', 'trick', 'equip'].filter(type => { - return player.countMark('olbixin_' + type) < 3; + ai:{ + fireAttack:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player){ + var count=player.countMark('olbixin'); + if(count<3) return; + var types=['basic','trick','equip'].filter(type=>{ + return player.countMark('olbixin_'+type)<3; }); - if (types.length) return true; + if(types.length) return true; }, - order: 1, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + order:1, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; }, }, }, }, - full_backup: {}, + full_backup:{}, } }, - olximo: { - audio: 3, - trigger: { player: 'logSkill' }, - derivation: 'olfeibai', - filter: function (event, player) { - return event.skill == 'olbixin' && player.countMark('olbixin') < 3; + olximo:{ + audio:3, + trigger:{player:'logSkill'}, + derivation:'olfeibai', + filter:function(event,player){ + return event.skill=='olbixin'&&player.countMark('olbixin')<3; }, - forced: true, - content: function () { - player.addMark('olbixin', 1, false); - game.log(player, '删除了', '#g【笔心】', '描述的前五个字符'); - if (player.countMark('olbixin') == 3) { - game.log(player, '交换了', '#g【笔心】', '方括号中的两个数字'); + forced:true, + content:function(){ + player.addMark('olbixin',1,false); + game.log(player,'删除了','#g【笔心】','描述的前五个字符'); + if(player.countMark('olbixin')==3){ + game.log(player,'交换了','#g【笔心】','方括号中的两个数字'); //player.removeSkill('olximo'); //game.log(player,'失去了技能','#g【洗墨】'); - player.changeSkills(['olfeibai'], ['olximo']); + player.changeSkills(['olfeibai'],['olximo']); } }, - ai: { - combo: 'olbixin', + ai:{ + combo:'olbixin', } }, - olfeibai: { - audio: 2, - trigger: { - source: 'damageBegin1', - player: 'recoverBegin', + olfeibai:{ + audio:2, + trigger:{ + source:'damageBegin1', + player:'recoverBegin', }, - filter: function (event, player) { - var storage = player.storage.olfeibai; - var evt = event.getParent(), card = event.card; - if (evt.player != player || !card) return false; - if (storage && event.name == 'recover') { - return get.color(card) != 'red'; + filter:function(event,player){ + var storage=player.storage.olfeibai; + var evt=event.getParent(),card=event.card; + if(evt.player!=player||!card) return false; + if(storage&&event.name=='recover'){ + return get.color(card)!='red'; } - if (!storage && event.name == 'damage') { - return get.color(card) != 'black'; + if(!storage&&event.name=='damage'){ + return get.color(card)!='black'; } return false; }, - content: function () { + content:function(){ player.changeZhuanhuanji('olfeibai'); trigger.num++; }, - zhuanhuanji: true, - forced: true, - mark: true, - marktext: '☯', - intro: { - content: function (storage, player) { - if (storage) return '转换技。当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。'; + zhuanhuanji:true, + forced:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage,player){ + if(storage) return '转换技。当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。'; return '转换技。当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1。'; }, }, }, //新诸葛瑾 - olhuanshi: { - audio: 'huanshi', - trigger: { global: 'judge' }, - filter: function (event, player) { - return player.countCards('h') > 0; + olhuanshi:{ + audio:'huanshi', + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('h')>0; }, - logTarget: 'player', - prompt2: function (event, player) { - var str = (get.translation(event.player) + '的' + event.judgestr + '判定为' + get.translation(event.player.judging[0]) + '。你可以令其观看你的牌,其选择一张牌进行改判。'); - if (!player.hasSkill('olhuanshi_mark', null, null, false)) str += '然后你可以重铸任意张牌。'; + logTarget:'player', + prompt2:function(event,player){ + var str=(get.translation(event.player)+'的'+event.judgestr+'判定为'+get.translation(event.player.judging[0])+'。你可以令其观看你的牌,其选择一张牌进行改判。'); + if(!player.hasSkill('olhuanshi_mark',null,null,false)) str+='然后你可以重铸任意张牌。'; return str; }, - 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; i < cards.length; i++) { - var judge2 = event.judge(cards[i]); - if (judge2 > judge) return true; - if (_status.currentPhase != player && judge2 == judge && get.color(cards[i]) == 'red' && get.useful(cards[i]) < 5) return true; + 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 () { + 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; + 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); + 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); + else{ + return get.color(card)=='black'?10:0+get.value(card); } } - if (attitude >= 0) { - return get.color(card) == 'red' ? 0 : -10 + result; + if(attitude>=0){ + return get.color(card)=='red'?0:-10+result; } - else { - return get.color(card) == 'black' ? 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; + }).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); + }).set('judge',judge).set('attitude',attitude); 'step 1' - if (result.bool) { - event.card = result.links[0]; - player.respond(event.card, 'highlight', 'noOrdering').nopopup = true; + if(result.bool){ + event.card=result.links[0]; + player.respond(event.card,'highlight','noOrdering').nopopup=true; } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { - if (trigger.player.judging[0].clone) { + if(result.bool){ + if(trigger.player.judging[0].clone){ trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function (card) { - if (card.clone) { + 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])); + },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.player.judging[0]=event.card; trigger.orderingCards.add(event.card); - game.log(trigger.player, '的判定牌改为', event.card); + game.log(trigger.player,'的判定牌改为',event.card); game.delay(2); } - if (!player.countCards('h') || player.hasSkill('olhuanshi_mark', null, null, false)) event.finish(); + if(!player.countCards('h')||player.hasSkill('olhuanshi_mark',null,null,false)) event.finish(); 'step 3' - player.chooseCard('是否重铸任意张手牌?', '操作提示:选择要重铸的牌并点击“确定”', [1, player.countCards('h')], lib.filter.cardRecastable).set('ai', function (card) { - var player = _status.event.player, cards = ui.selected.cards; - if (!player.hasSkill('olmingzhe')) return 5 - get.value(card); - for (var i of cards) { - if (get.color(i, player) == 'red') return 5 - get.value(card); + player.chooseCard('是否重铸任意张手牌?','操作提示:选择要重铸的牌并点击“确定”',[1,player.countCards('h')],lib.filter.cardRecastable).set('ai',function(card){ + var player=_status.event.player,cards=ui.selected.cards; + if(!player.hasSkill('olmingzhe')) return 5-get.value(card); + for(var i of cards){ + if(get.color(i,player)=='red') return 5-get.value(card); } - return 7.5 - get.value(card); + return 7.5-get.value(card); }); 'step 4' - if (result.bool) { + if(result.bool){ player.addTempSkill('olhuanshi_mark'); player.recast(result.cards); } }, - ai: { - rejudge: true, - tag: { - rejudge: 1, + ai:{ + rejudge:true, + tag:{ + rejudge:1, } }, - subSkill: { mark: { charlotte: true } }, + subSkill:{mark:{charlotte:true}}, }, - olhongyuan: { - audio: 'hongyuan', - trigger: { player: 'gainAfter', global: 'loseAsyncAfter' }, - filter(event, player) { - if (!player.countCards('he') || player.hasSkill('olhongyuan_blocker', null, null, false)) return false; - return event.getg(player).length >= 2; + olhongyuan:{ + audio:'hongyuan', + trigger:{player:'gainAfter',global:'loseAsyncAfter'}, + filter(event,player){ + if(!player.countCards('he')||player.hasSkill('olhongyuan_blocker',null,null,false)) return false; + return event.getg(player).length>=2; }, - async content(event, trigger, player) { - player.addTempSkill('olhongyuan_blocker', ['phaseZhunbeiBefore', 'phaseJudgeBefore', 'phaseDrawBefore', 'phaseUseBefore', 'phaseDiscardBefore', 'phaseJieshuBefore', 'phaseBefore']); - let selectedTargets = []; - while (selectedTargets.length < 2 && player.countCards('he') && game.hasPlayer(target => { - return target != player && !selectedTargets.includes(target); - })) { - const { result: { bool, targets, cards } } = await player.chooseCardTarget({ - prompt: '弘援:将一张牌交给一名其他角色', - filterCard: true, - position: 'he', - filterTarget(card, player, target) { - return target != player && !get.event('selectedTargets').includes(target); + async content(event,trigger,player){ + player.addTempSkill('olhongyuan_blocker',['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseUseBefore','phaseDiscardBefore','phaseJieshuBefore','phaseBefore']); + let selectedTargets=[]; + while(selectedTargets.length<2&&player.countCards('he')&&game.hasPlayer(target=>{ + return target!=player&&!selectedTargets.includes(target); + })){ + const {result:{bool,targets,cards}}=await player.chooseCardTarget({ + prompt:'弘援:将一张牌交给一名其他角色', + filterCard:true, + position:'he', + filterTarget(card,player,target){ + return target!=player&&!get.event('selectedTargets').includes(target); }, - complexCard: true, - complexTarget: true, - complexSelect: true, - ai1(card) { - const player = get.event('player'); - if (!game.hasPlayer(current => { - if (get.event('selectedTargets').includes(current)) return false; - return current != player && get.attitude(player, current) > 0 && !current.hasSkillTag('nogain'); + complexCard:true, + complexTarget:true, + complexSelect:true, + ai1(card){ + const player=get.event('player'); + if(!game.hasPlayer(current=>{ + if(get.event('selectedTargets').includes(current)) return false; + return current!=player&&get.attitude(player,current)>0&&!current.hasSkillTag('nogain'); })) return -get.value(card); - return 4 + ((player.hasSkill('olmingzhe') && get.color(card) == 'red') ? 2 : 0) - Math.max(player.getUseValue(card), get.value(card, player)); + return 4+((player.hasSkill('olmingzhe')&&get.color(card)=='red')?2:0)-Math.max(player.getUseValue(card),get.value(card,player)); }, - ai2(target) { - const player = _status.event.player, att = get.attitude(player, target); - if (!ui.selected.cards.length) return att; - const card = ui.selected.cards[0], val = get.value(card, target); - if (val < 0) return -att * Math.sqrt(-val); - return att * Math.sqrt(val + 2); + ai2(target){ + const player=_status.event.player,att=get.attitude(player,target); + if(!ui.selected.cards.length) return att; + const card=ui.selected.cards[0],val=get.value(card,target); + if(val<0) return -att*Math.sqrt(-val); + return att*Math.sqrt(val+2); }, - }).set('selectedTargets', selectedTargets); - if (bool) { - const target = targets[0]; + }).set('selectedTargets',selectedTargets); + if(bool){ + const target=targets[0]; selectedTargets.push(target); player.line(target); - await player.give(cards, target); + await player.give(cards,target); } else break; } }, - ai: { threaten: 0.8 }, - subSkill: { blocker: { charlotte: true } }, + ai:{threaten:0.8}, + subSkill:{blocker:{charlotte:true}}, }, - olmingzhe: { - audio: 'mingzhe', - trigger: { - player: 'loseAfter', - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + olmingzhe:{ + audio:'mingzhe', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - forced: true, - filter: function (event, player) { - if (player.isPhaseUsing()) return false; - var evt = event.getl(player); - for (var i of evt.cards2) { - if (get.color(i, player) == 'red') return true; + forced:true, + filter:function(event,player){ + if(player.isPhaseUsing()) return false; + var evt=event.getl(player); + for(var i of evt.cards2){ + if(get.color(i,player)=='red') return true; } return false; }, - content: function () { - if (!trigger.visible) { - var cards = trigger.getl(player).hs.filter(function (i) { - return get.color(i, player) == 'red'; + content:function(){ + if(!trigger.visible){ + var cards=trigger.getl(player).hs.filter(function(i){ + return get.color(i,player)=='red'; }); - if (cards.length > 0) player.showCards(cards, get.translation(player) + '发动了【明哲】'); + if(cards.length>0) player.showCards(cards,get.translation(player)+'发动了【明哲】'); } player.draw(); }, }, //吕范 - xindiaodu: { - audio: "diaodu", - group: 'xindiaodu_use', - frequent: true, - preHidden: true, - isFriendOf: function (player, target) { - if (get.mode() == 'guozhan') return player.isFriendOf(target); - return player.group == target.group; + xindiaodu:{ + audio:"diaodu", + group:'xindiaodu_use', + frequent:true, + preHidden:true, + isFriendOf:function(player,target){ + if(get.mode()=='guozhan') return player.isFriendOf(target); + return player.group==target.group; }, - subSkill: { - temp: { charlotte: true }, - use: { - trigger: { - global: "useCard", + subSkill:{ + temp:{charlotte:true}, + use:{ + trigger:{ + global:"useCard", }, - filter: function (event, player) { - return get.type(event.card) == 'equip' && event.player.isIn() && - lib.skill.xindiaodu.isFriendOf(player, event.player) && (player == event.player || player.hasSkill('xindiaodu')) && !event.player.hasSkill('xindiaodu_temp'); + filter:function(event,player){ + return get.type(event.card)=='equip'&&event.player.isIn()&& + lib.skill.xindiaodu.isFriendOf(player,event.player)&&(player==event.player||player.hasSkill('xindiaodu'))&&!event.player.hasSkill('xindiaodu_temp'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var next = trigger.player.chooseBool('是否发动【调度】摸一张牌?'); - if (player.hasSkill('xindiaodu')) next.set('frequentSkill', 'xindiaodu'); - if (player == trigger.player) next.setHiddenSkill('xindiaodu'); + var next=trigger.player.chooseBool('是否发动【调度】摸一张牌?'); + if(player.hasSkill('xindiaodu')) next.set('frequentSkill','xindiaodu'); + if(player==trigger.player) next.setHiddenSkill('xindiaodu'); 'step 1' - if (result.bool) { - player.logSkill('xindiaodu', trigger.player); + if(result.bool){ + player.logSkill('xindiaodu',trigger.player); trigger.player.draw('nodelay'); trigger.player.addTempSkill('xindiaodu_temp'); } }, }, }, - trigger: { - player: "phaseUseBegin", + trigger:{ + player:"phaseUseBegin", }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return lib.skill.xindiaodu.isFriendOf(current, player) && current.countGainableCards(player, 'e') > 0; + filter:function(event,player){ + return game.hasPlayer(function(current){ + return lib.skill.xindiaodu.isFriendOf(current,player)&¤t.countGainableCards(player,'e')>0; }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('xindiaodu'), function (card, player, current) { - return lib.skill.xindiaodu.isFriendOf(current, player) && current.countGainableCards(player, 'e') > 0; - }).setHiddenSkill(event.name).ai = function (target) { - var num = 1; - if (target.hasSkill('gzxiaoji')) num += 2.5; - if (target.isDamaged() && target.getEquip('baiyin')) num += 2.5; - if (target.hasSkill('xuanlve')) num += 2; + player.chooseTarget(get.prompt2('xindiaodu'),function(card,player,current){ + return lib.skill.xindiaodu.isFriendOf(current,player)&¤t.countGainableCards(player,'e')>0; + }).setHiddenSkill(event.name).ai=function(target){ + var num=1; + if(target.hasSkill('gzxiaoji')) num+=2.5; + if(target.isDamaged()&&target.getEquip('baiyin')) num+=2.5; + if(target.hasSkill('xuanlve')) num+=2; return num; }; 'step 1' - if (result.bool) { - event.target1 = result.targets[0]; - player.logSkill('xindiaodu', event.target1); - player.line(event.target1, 'xindiaodu'); - player.gainPlayerCard(event.target1, 'e', true); + if(result.bool){ + event.target1=result.targets[0]; + player.logSkill('xindiaodu',event.target1); + player.line(event.target1,'xindiaodu'); + player.gainPlayerCard(event.target1,'e',true); } else event.finish(); 'step 2' - if (result.bool && player.getCards('h').includes(result.cards[0])) { - event.card = result.cards[0]; - player.chooseTarget('是否将' + get.translation(event.card) + '交给一名其他角色?', function (card, player, current) { - return current != player && current != _status.event.target1 && lib.skill.xindiaodu.isFriendOf(current, player) - }).set('target1', event.target1); + if(result.bool&&player.getCards('h').includes(result.cards[0])){ + event.card=result.cards[0]; + player.chooseTarget('是否将'+get.translation(event.card)+'交给一名其他角色?',function(card,player,current){ + return current!=player&¤t!=_status.event.target1&&lib.skill.xindiaodu.isFriendOf(current,player) + }).set('target1',event.target1); } else event.finish(); 'step 3' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'green'); - player.give(card, target); + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + player.give(card,target); } }, }, //夏侯玄 - olhuanfu: { - audio: 2, - trigger: { - player: 'useCardToPlayered', - target: 'useCardToTargeted', + olhuanfu:{ + audio:2, + trigger:{ + player:'useCardToPlayered', + target:'useCardToTargeted', }, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - if (player == event.player && !event.isFirstTarget) return false; - if (event.olhuanfu_map && event.olhuanfu_map[player.playerid]) return false; - return player.maxHp > 0 && player.countCards('he') > 0; + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(player==event.player&&!event.isFirstTarget) return false; + if(event.olhuanfu_map&&event.olhuanfu_map[player.playerid]) return false; + return player.maxHp>0&&player.countCards('he')>0; }, - shaRelated: true, - direct: true, - content: function () { + shaRelated:true, + direct:true, + content:function(){ 'step 0' - player.chooseToDiscard('he', [1, player.maxHp], get.prompt('olhuanfu'), '通过弃牌,预测' + (player == trigger.player ? '你' : get.translation(trigger.player)) + '使用的' + get.translation(trigger.card) + '能造成多少伤害。如果弃置的牌数等于总伤害,则你摸两倍的牌。').set('predict', function () { - var target = trigger.target; - if (player == target) { - if (trigger.targets.length > 1 || player.hasShan() || get.effect(player, trigger.card, trigger.player, player) == 0) return 0; + player.chooseToDiscard('he',[1,player.maxHp],get.prompt('olhuanfu'),'通过弃牌,预测'+(player==trigger.player?'你':get.translation(trigger.player))+'使用的'+get.translation(trigger.card)+'能造成多少伤害。如果弃置的牌数等于总伤害,则你摸两倍的牌。').set('predict',function(){ + var target=trigger.target; + if(player==target){ + if(trigger.targets.length>1||player.hasShan()||get.effect(player,trigger.card,trigger.player,player)==0) return 0; } - else { - var target = trigger.target; - if (trigger.targets.length > 1 || target.mayHaveShan(player, 'use', target.getCards('h', i => { + else{ + var target=trigger.target; + if(trigger.targets.length>1||target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); }))) return 0; } - var num = trigger.getParent().baseDamage; - var map = trigger.getParent().customArgs, id = target.playerid; - if (map[id]) { - if (typeof map[id].baseDamage == 'number') num = map[id].baseDamage; - if (typeof map[id].extraDamage == 'number') num += map[id].extraDamage; + var num=trigger.getParent().baseDamage; + var map=trigger.getParent().customArgs,id=target.playerid; + if(map[id]){ + if(typeof map[id].baseDamage=='number') num=map[id].baseDamage; + if(typeof map[id].extraDamage=='number') num+=map[id].extraDamage; } - if (target.hasSkillTag('filterDamage', null, { - player: trigger.player, - card: trigger.card, - })) num = 1; + if(target.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:trigger.card, + })) num=1; return num; - }()).set('ai', function (card) { - var num = _status.event.predict, player = _status.event.player; - if (ui.selected.cards.length >= num) return 0; - if (player.countCards('he', function (card) { - return get.value(card) < 6 + num; - }) < num) return 0; - return 6 + num - get.value(card); - }).logSkill = 'olhuanfu'; + }()).set('ai',function(card){ + var num=_status.event.predict,player=_status.event.player; + if(ui.selected.cards.length>=num) return 0; + if(player.countCards('he',function(card){ + return get.value(card)<6+num; + }) 0 && current < 0 && target.countCards('he') > 0) return 0.7; + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&target.hp>0&¤t<0&&target.countCards('he')>0) return 0.7; }, }, }, - subSkill: { - lottery: { - trigger: { global: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - var map = event.olhuanfu_map; - if (!map || !map[player.playerid]) return false; - var num = 0; - event.player.getHistory('sourceDamage', function (evt) { - if (evt.card == event.card && evt.getParent().type == 'card') num += evt.num; + subSkill:{ + lottery:{ + trigger:{global:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + var map=event.olhuanfu_map; + if(!map||!map[player.playerid]) return false; + var num=0; + event.player.getHistory('sourceDamage',function(evt){ + if(evt.card==event.card&&evt.getParent().type=='card') num+=evt.num; }); - return num == map[player.playerid]; + return num==map[player.playerid]; }, - content: function () { - player.draw(2 * trigger.olhuanfu_map[player.playerid]); + content:function(){ + player.draw(2*trigger.olhuanfu_map[player.playerid]); }, }, }, }, - olqingyi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.hasCard(function (card) { - return lib.filter.cardDiscardable(card, player, 'olqingyi'); - }, 'he') && game.hasPlayer(current => lib.skill.olqingyi.filterTarget(null, player, current)); + olqingyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'olqingyi'); + },'he')&&game.hasPlayer(current=>lib.skill.olqingyi.filterTarget(null,player,current)); }, - selectTarget: [1, 2], - filterTarget: function (card, player, target) { - return target != player && target.countCards('he') > 0; + selectTarget:[1,2], + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; }, - multitarget: true, - multiline: true, - content: function () { + multitarget:true, + multiline:true, + content:function(){ 'step 0' - var list = [player]; + var list=[player]; list.addArray(targets); list.sortBySeat(); - event.list = list; - for (var target of event.list) { - if (!target.hasCard(function (card) { - return lib.filter.cardDiscardable(card, target, 'olqingyi'); - }, 'he')) { + event.list=list; + for(var target of event.list){ + if(!target.hasCard(function(card){ + return lib.filter.cardDiscardable(card,target,'olqingyi'); + },'he')){ event.finish(); break; } } 'step 1' - player.chooseCardOL(event.list, 'he', true, '清议:选择弃置一张牌', function (card, player) { - return lib.filter.cardDiscardable(card, player, 'olqingyi'); - }).set('ai', get.unuseful); + player.chooseCardOL(event.list,'he',true,'清议:选择弃置一张牌',function(card,player){ + return lib.filter.cardDiscardable(card,player,'olqingyi'); + }).set('ai',get.unuseful); 'step 2' - var lose_list = [], cards = []; - for (var i = 0; i < result.length; i++) { - var current = event.list[i], card = result[i].cards[0]; - lose_list.push([current, result[i].cards]); + var lose_list=[],cards=[]; + for(var i=0;i evt.skill == 'olqingyi'); - if (!history.length) return false; - var color = false; - for (var evt of history) { - var list = [player]; + group:'olqingyi_gain', + subSkill:{ + gain:{ + audio:'olqingyi', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + var history=player.getHistory('useSkill',(evt)=>evt.skill=='olqingyi'); + if(!history.length) return false; + var color=false; + for(var evt of history){ + var list=[player]; list.addArray(evt.targets); - for (var target of list) { - target.getHistory('lose', function (evtx) { - if (color === true || evtx.getParent(2).name != 'olqingyi') return false; - for (var card of evtx.cards) { - if (color === true || get.position(card, true) != 'd') continue; - var color2 = get.color(card, false); - if (!color) color = color2; - else if (color != color2) color = true; + for(var target of list){ + target.getHistory('lose',function(evtx){ + if(color===true||evtx.getParent(2).name!='olqingyi') return false; + for(var card of evtx.cards){ + if(color===true||get.position(card,true)!='d') continue; + var color2=get.color(card,false); + if(!color) color=color2; + else if(color!=color2) color=true; } }); - if (color === true) return true; + if(color===true) return true; } } return false; }, - content: function () { + content:function(){ 'step 0' - var history = player.getHistory('useSkill', (evt) => evt.skill == 'olqingyi'), cards = []; - for (var evt of history) { - var list = [player]; + var history=player.getHistory('useSkill',(evt)=>evt.skill=='olqingyi'),cards=[]; + for(var evt of history){ + var list=[player]; list.addArray(evt.targets); - for (var target of list) { - target.getHistory('lose', function (evtx) { - if (evtx.getParent(2).name != 'olqingyi') return false; - for (var card of evtx.cards) { - if (get.position(card, true) == 'd') cards.add(card); + for(var target of list){ + target.getHistory('lose',function(evtx){ + if(evtx.getParent(2).name!='olqingyi') return false; + for(var card of evtx.cards){ + if(get.position(card,true)=='d') cards.add(card); } }); } } - player.chooseButton(['清议:选择获得两张异色牌', cards], 2).set('filterButton', function (button) { - if (!ui.selected.buttons.length) return true; - return get.color(button.link, false) != get.color(ui.selected.buttons[0].link, false); - }).set('ai', function (button) { - return get.value(button.link, _status.event.player); + player.chooseButton(['清议:选择获得两张异色牌',cards],2).set('filterButton',function(button){ + if(!ui.selected.buttons.length) return true; + return get.color(button.link,false)!=get.color(ui.selected.buttons[0].link,false); + }).set('ai',function(button){ + return get.value(button.link,_status.event.player); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('olqingyi_gain'); - player.gain(result.links, 'gain2'); + player.gain(result.links,'gain2'); } }, }, }, }, - olzeyue: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - limited: true, - skillAnimation: true, - animationColor: 'water', - direct: true, - filter: function (event, player) { - var sources = [], history = player.actionHistory; - for (var i = history.length - 1; i >= 0; i--) { - if (i < history.length - 1 && history[i].isMe) break; - for (var evt of history[i].damage) { - if (evt.source && evt.source != player && evt.source.isIn()) sources.add(evt.source); + olzeyue:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + limited:true, + skillAnimation:true, + animationColor:'water', + direct:true, + filter:function(event,player){ + var sources=[],history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + if(i= 0; i--) { - if (i < history.length - 1 && history[i].isMe) break; - for (var evt of history[i].damage) { - if (evt.source && evt.source != player && evt.source.isIn()) sources.add(evt.source); + var sources=[],history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + if(i= 0) return 0; - return get.threaten(target, player); + }).set('sources',sources).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(att>=0) return 0; + return get.threaten(target,player); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('olzeyue', target); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('olzeyue',target); player.awakenSkill('olzeyue'); - event.target = target; - var skills = target.getStockSkills('一!', '五!'); - skills = skills.filter(function (skill) { - var info = get.info(skill); - if (info && !info.charlotte && !get.is.locked(skill, target) && target.hasSkill(skill, null, null, false)) return true; + event.target=target; + var skills=target.getStockSkills('一!','五!'); + skills=skills.filter(function(skill){ + var info=get.info(skill); + if(info&&!info.charlotte&&!get.is.locked(skill,target)&&target.hasSkill(skill,null,null,false)) return true; }); - if (skills.length == 1) event._result = { control: skills[0] }; - else player.chooseControl(skills).set('prompt', '令' + get.translation(target) + '的一个技能失效'); + if(skills.length==1) event._result={control:skills[0]}; + else player.chooseControl(skills).set('prompt','令'+get.translation(target)+'的一个技能失效'); } else event.finish(); 'step 2' - var skill = result.control; - target.disableSkill('olzeyue_' + player.playerid, skill); - target.storage['olzeyue_' + player.playerid] = true; + var skill=result.control; + target.disableSkill('olzeyue_'+player.playerid,skill); + target.storage['olzeyue_'+player.playerid]=true; player.addSkill('olzeyue_round'); - player.markAuto('olzeyue_round', [target]); - if (!player.storage.olzeyue_map) player.storage.olzeyue_map = {}; - player.storage.olzeyue_map[target.playerid] = 0; - game.log(target, '的技能', '#g【' + get.translation(skill) + '】', '被失效了'); + player.markAuto('olzeyue_round',[target]); + if(!player.storage.olzeyue_map) player.storage.olzeyue_map={}; + player.storage.olzeyue_map[target.playerid]=0; + game.log(target,'的技能','#g【'+get.translation(skill)+'】','被失效了'); }, - ai: { threaten: 3 }, - subSkill: { - round: { - trigger: { global: 'roundStart' }, - forced: true, - charlotte: true, - popup: false, - filter: function (event, player) { - var storage = player.getStorage('olzeyue_round'); - for (var source of storage) { - if (source.isIn() && source.canUse('sha', player, false)) return true; + ai:{threaten:3}, + subSkill:{ + round:{ + trigger:{global:'roundStart'}, + forced:true, + charlotte:true, + popup:false, + filter:function(event,player){ + var storage=player.getStorage('olzeyue_round'); + for(var source of storage){ + if(source.isIn()&&source.canUse('sha',player,false)) return true; } return false; }, - content: function () { + content:function(){ 'step 0' - event.targets = player.storage.olzeyue_round.slice(0).sortBySeat(); - event.target = event.targets.shift(); - event.forceDie = true; + event.targets=player.storage.olzeyue_round.slice(0).sortBySeat(); + event.target=event.targets.shift(); + event.forceDie=true; 'step 1' - var map = player.storage.olzeyue_map; - if (target.storage['olzeyue_' + player.playerid]) map[target.playerid]++; - event.num = map[target.playerid] - 1; - if (event.num <= 0) event.finish(); + var map=player.storage.olzeyue_map; + if(target.storage['olzeyue_'+player.playerid]) map[target.playerid]++; + event.num=map[target.playerid]-1; + if(event.num<=0) event.finish(); 'step 2' event.num--; - target.useCard(player, { name: 'sha', isCard: true }, false, 'olzeyue_round'); + target.useCard(player,{name:'sha',isCard:true},false,'olzeyue_round'); 'step 3' - var key = 'olzeyue_' + player.playerid; - if (target.storage[key] && player.hasHistory('damage', function (evt) { - return evt.card.name == 'sha' && evt.getParent().type == 'card' && evt.getParent(3) == event; - })) { - for (var skill in target.disabledSkills) { - if (target.disabledSkills[skill].includes(key)) game.log(target, '恢复了技能', '#g【' + get.translation(skill) + '】'); + var key='olzeyue_'+player.playerid; + if(target.storage[key]&&player.hasHistory('damage',function(evt){ + return evt.card.name=='sha'&&evt.getParent().type=='card'&&evt.getParent(3)==event; + })){ + for(var skill in target.disabledSkills){ + if(target.disabledSkills[skill].includes(key)) game.log(target,'恢复了技能','#g【'+get.translation(skill)+'】'); } delete target.storage[key]; target.enableSkill(key); } - if (event.num > 0 && player.isIn() && target.isIn() && target.canUse('sha', player, false)) { + if(event.num>0&&player.isIn()&&target.isIn()&&target.canUse('sha',player,false)){ event.goto(2); } - else if (event.targets.length > 0) { - event.target = event.targets.shift(); + else if(event.targets.length>0){ + event.target=event.targets.shift(); event.goto(1); } }, @@ -7759,2447 +7760,2447 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //邓忠 - dzkanpo: { - audio: 2, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - return event.getParent().type == 'card' && event.card && event.card.name == 'sha' && event.player.countCards('he') > 0; + dzkanpo:{ + audio:2, + trigger:{source:'damageSource'}, + filter:function(event,player){ + return event.getParent().type=='card'&&event.card&&event.card.name=='sha'&&event.player.countCards('he')>0; }, - logTarget: 'player', - content: function () { - var suit = get.suit(trigger.card); - var next = player.gainPlayerCard(trigger.player, 'h', 'visible'); - next.set('suit', suit); - next.set('filterButton', function (button) { - var evt = _status.event; - return get.suit(button.link, evt.target) == evt.suit; + logTarget:'player', + content:function(){ + var suit=get.suit(trigger.card); + var next=player.gainPlayerCard(trigger.player,'h','visible'); + next.set('suit',suit); + next.set('filterButton',function(button){ + var evt=_status.event; + return get.suit(button.link,evt.target)==evt.suit; }); }, - group: 'dzkanpo_sha', - subSkill: { - sha: { - enable: 'chooseToUse', - usable: 1, - viewAs: { name: 'sha' }, - viewAsFilter: function (player) { - return player.countCards('hs') > 0; + group:'dzkanpo_sha', + subSkill:{ + sha:{ + enable:'chooseToUse', + usable:1, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + return player.countCards('hs')>0; }, - filterCard: true, - position: 'hs', - prompt: '将一张手牌当做【杀】使用', - check: function (card) { - return 6 - get.value(card); + filterCard:true, + position:'hs', + prompt:'将一张手牌当做【杀】使用', + check:function(card){ + return 6-get.value(card); }, - ai: { - respondSha: true, - skillTagFilter: function (player) { - if (player.getStat('skill').dzkanpo_sha) return false; - if (!player.countCards('hs')) return false; + ai:{ + respondSha:true, + skillTagFilter:function(player){ + if(player.getStat('skill').dzkanpo_sha) return false; + if(!player.countCards('hs')) return false; }, }, }, }, }, - dzgengzhan: { - audio: 2, - trigger: { - global: ['loseAfter', 'loseAsyncAfter'], + dzgengzhan:{ + audio:2, + trigger:{ + global:['loseAfter','loseAsyncAfter'], }, - usable: 1, - filter: function (event, player) { - if (event.type != 'discard' || event.getlx === false || player == _status.currentPhase || !event.isPhaseUsing()) return false; - for (var card of event.cards) { - if (get.position(card, true) == 'd' && get.name(card, event.hs && event.hs.includes(card) ? event.player : false) == 'sha') return true; + usable:1, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false||player==_status.currentPhase||!event.isPhaseUsing()) return false; + for(var card of event.cards){ + if(get.position(card,true)=='d'&&get.name(card,event.hs&&event.hs.includes(card)?event.player:false)=='sha') return true; } }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var cards = trigger.cards.filter(function (card) { - return (get.position(card, true) == 'd' && get.name(card, trigger.hs && trigger.hs.includes(card) ? trigger.player : false) == 'sha') + var cards=trigger.cards.filter(function(card){ + return (get.position(card,true)=='d'&&get.name(card,trigger.hs&&trigger.hs.includes(card)?trigger.player:false)=='sha') }); - player.chooseButton(['是否发动【更战】获得一张杀?', cards]).set('ai', function (button) { - return get.value(button.link, _status.event.player); + player.chooseButton(['是否发动【更战】获得一张杀?',cards]).set('ai',function(button){ + return get.value(button.link,_status.event.player); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('dzgengzhan'); - player.gain(result.links, 'gain2'); + player.gain(result.links,'gain2'); } else player.storage.counttrigger.dzgengzhan--; }, - group: 'dzgengzhan_add', - subSkill: { - add: { - audio: 'dzgengzhan', - trigger: { global: 'phaseJieshuBegin' }, - forced: true, - locked: false, - filter: function (event, player) { - return player != event.player && !event.player.hasHistory('useCard', function (evt) { - return evt.card.name == 'sha'; + group:'dzgengzhan_add', + subSkill:{ + add:{ + audio:'dzgengzhan', + trigger:{global:'phaseJieshuBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return player!=event.player&&!event.player.hasHistory('useCard',function(evt){ + return evt.card.name=='sha'; }); }, - logTarget: 'player', - content: function () { - player.addTempSkill('dzgengzhan_effect', { player: 'phaseUseAfter' }); - player.addMark('dzgengzhan_effect', 1, false); + logTarget:'player', + content:function(){ + player.addTempSkill('dzgengzhan_effect',{player:'phaseUseAfter'}); + player.addMark('dzgengzhan_effect',1,false); game.delayx(); }, }, - effect: { - onremove: true, - charlotte: true, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.countMark('dzgengzhan_effect'); + effect:{ + onremove:true, + charlotte:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('dzgengzhan_effect'); }, }, - intro: { content: '使用杀的次数上限+#' }, + intro:{content:'使用杀的次数上限+#'}, }, }, }, //王衍 - yangkuang: { - audio: 2, - trigger: { player: 'recoverEnd' }, - filter: function (event, player) { + yangkuang:{ + audio:2, + trigger:{player:'recoverEnd'}, + filter:function(event,player){ return player.isHealthy(); }, - logTarget: function (event, player) { - return _status.currentPhase || player; + logTarget:function(event,player){ + return _status.currentPhase||player; }, - check: function (event, player) { - var target = (_status.currentPhase || player); - if (get.attitude(player, target) > 0) return true; - if (player.countCards('h') > target.countCards('h')) return true; - if (!target.getCardUsable('sha')) return true; + check:function(event,player){ + var target=(_status.currentPhase||player); + if(get.attitude(player,target)>0) return true; + if(player.countCards('h')>target.countCards('h')) return true; + if(!target.getCardUsable('sha')) return true; return false; }, - content: function () { + content:function(){ 'step 0' - player.chooseUseTarget('jiu', true); + player.chooseUseTarget('jiu',true); 'step 1' - var target = _status.currentPhase; - if (target) target.draw('nodelay'); + var target=_status.currentPhase; + if(target) target.draw('nodelay'); player.draw(); }, }, - cihuang: { - audio: 2, - trigger: { - global: ['eventNeutralized', 'shaMiss'], + cihuang:{ + audio:2, + trigger:{ + global:['eventNeutralized','shaMiss'], }, - direct: true, - filter: function (event, player) { - if (event.player != _status.currentPhase || !event.targets || event.targets.length != 1 || event.type != 'card' || !player.countCards('he')) return false; - return lib.skill.cihuang.getList(player, event.player, true); + direct:true, + filter:function(event,player){ + if(event.player!=_status.currentPhase||!event.targets||event.targets.length!=1||event.type!='card'||!player.countCards('he')) return false; + return lib.skill.cihuang.getList(player,event.player,true); }, - getList: function (player, target, bool) { - var natures = lib.inpile_nature.slice(0); - var tricks = []; - for (var name of lib.inpile) { - var info = lib.card[name]; - if (!info || info.type != 'trick' || info.notarget || ((info.selectTarget && info.selectTarget != 1) && (info.selectTarget != -1 || !info.toself))) continue; + getList:function(player,target,bool){ + var natures=lib.inpile_nature.slice(0); + var tricks=[]; + for(var name of lib.inpile){ + var info=lib.card[name]; + if(!info||info.type!='trick'||info.notarget||((info.selectTarget&&info.selectTarget!=1)&&(info.selectTarget!=-1||!info.toself))) continue; tricks.push(name); } - var history = player.actionHistory; - for (var i = history.length - 1; i >= 0; i--) { - var info = history[i]; - for (var evt of info.useCard) { - var name = evt.card.name; - if (name == 'sha') { - if (evt.card.nature) natures.remove(evt.card.nature); + var history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + var info=history[i]; + for(var evt of info.useCard){ + var name=evt.card.name; + if(name=='sha'){ + if(evt.card.nature) natures.remove(evt.card.nature); } else tricks.remove(name); } - if (info.isRound) break; + if(info.isRound) break; } - var vcards = []; - for (var i of natures) { - if (player.canUse({ - name: 'sha', - nature: i, - isCard: true, - }, target)) { - if (bool) return true; - else vcards.push(['基本', '', 'sha', i]); + var vcards=[]; + for(var i of natures){ + if(player.canUse({ + name:'sha', + nature:i, + isCard:true, + },target)){ + if(bool) return true; + else vcards.push(['基本','','sha',i]); } } - for (var i of tricks) { - if (player.canUse({ - name: i, - isCard: true, - }, target)) { - if (bool) return true; - else vcards.push(['锦囊', '', i]); + for(var i of tricks){ + if(player.canUse({ + name:i, + isCard:true, + },target)){ + if(bool) return true; + else vcards.push(['锦囊','',i]); } } - if (bool) return false; + if(bool) return false; return vcards; }, - content: function () { + content:function(){ 'step 0' - var target = trigger.player; - var list = lib.skill.cihuang.getList(player, target); - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - player.chooseButton([get.prompt('cihuang', target), '
    将一张牌当以下的一张牌对' + get.translation(target) + '使用
    ', [list, 'vcard']]).set('ai', function (button) { - var card = { - name: button.link[2], - nature: button.link[3], - storage: { cihuang: true }, - }, player = _status.event.player, target = _status.event.getTrigger().player; - return get.effect(target, card, player, player); + var target=trigger.player; + var list=lib.skill.cihuang.getList(player,target); + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + player.chooseButton([get.prompt('cihuang',target),'
    将一张牌当以下的一张牌对'+get.translation(target)+'使用
    ',[list,'vcard']]).set('ai',function(button){ + var card={ + name:button.link[2], + nature:button.link[3], + storage:{cihuang:true}, + },player=_status.event.player,target=_status.event.getTrigger().player; + return get.effect(target,card,player,player); }); 'step 1' - if (result.bool) { - var card = { - name: result.links[0][2], - nature: result.links[0][3], - storage: { cihuang: true }, + if(result.bool){ + var card={ + name:result.links[0][2], + nature:result.links[0][3], + storage:{cihuang:true}, }; - event.card = card; - player.chooseCard('hes', '雌黄:将一张牌当' + get.translation(card) + '对' + get.translation(trigger.player) + '使用', function (card, player) { - return player.canUse(get.autoViewAs(_status.event.getParent().card, [card]), _status.event.target, false); - }).set('target', trigger.player).set('ai', function (card) { - if (get.effect(_status.event.target, get.autoViewAs(_status.event.getParent().card, [card]), player) <= 0) return false; - return 6 - get.value(card); + event.card=card; + player.chooseCard('hes','雌黄:将一张牌当'+get.translation(card)+'对'+get.translation(trigger.player)+'使用',function(card,player){ + return player.canUse(get.autoViewAs(_status.event.getParent().card,[card]),_status.event.target,false); + }).set('target',trigger.player).set('ai',function(card){ + if(get.effect(_status.event.target,get.autoViewAs(_status.event.getParent().card,[card]),player)<=0) return false; + return 6-get.value(card); }); } - else event._result = { bool: false }; + else event._result={bool:false}; 'step 2' - if (_status.connectMode) { game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); } - if (result.bool) { - player.useCard(get.autoViewAs(event.card, result.cards), result.cards, false, trigger.player, 'cihuang').oncard = function (card, player) { + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + if(result.bool){ + player.useCard(get.autoViewAs(event.card,result.cards),result.cards,false,trigger.player,'cihuang').oncard=function(card,player){ _status.event.directHit.addArray(game.filterPlayer()); }; } }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - return arg && arg.card && arg.card.storage && arg.card.storage.cihuang; + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.card&&arg.card.storage&&arg.card.storage.cihuang; }, }, }, - sanku: { - audio: 2, - trigger: { player: 'dying' }, - forced: true, - group: 'sanku_nogain', - content: function () { + sanku:{ + audio:2, + trigger:{player:'dying'}, + forced:true, + group:'sanku_nogain', + content:function(){ 'step 0' player.loseMaxHp(); 'step 1' - var num = player.maxHp - player.hp; - if (num > 0) player.recover(num); + var num=player.maxHp-player.hp; + if(num>0) player.recover(num); }, - ai: { halfneg: true }, - subSkill: { - nogain: { - audio: 'sanku', - trigger: { player: 'gainMaxHpBegin' }, - forced: true, - content: function () { + ai:{halfneg:true}, + subSkill:{ + nogain:{ + audio:'sanku', + trigger:{player:'gainMaxHpBegin'}, + forced:true, + content:function(){ trigger.cancel(); } } } }, //霍峻 - qiongshou: { - audio: 2, - trigger: { - player: 'enterGame', - global: 'phaseBefore', + qiongshou:{ + audio:2, + trigger:{ + player:'enterGame', + global:'phaseBefore', }, - forced: true, - filter: function (event, player) { - if (event.name == 'phase' && game.phaseNumber != 0) return false; + forced:true, + filter:function(event,player){ + if(event.name=='phase'&&game.phaseNumber!=0) return false; return player.hasEnabledSlot(); }, - content: function () { - var list = []; - for (var i = 1; i < 6; i++) { - for (var j = 0; j < player.countEnabledSlot(i); j++) { + content:function(){ + var list=[]; + for(var i=1;i<6;i++){ + for(var j=0;j 0) || (!player.storage.fenrui && game.hasPlayer(function (current) { - return current != player && current.countCards('e') < es; + fenrui:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + onremove:true, + filter:function(event,player){ + var es=player.countCards('e'); + return (player.hasDisabledSlot()&&player.countCards('he')>0)||(!player.storage.fenrui&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e') 0) { - var str = '弃置一张牌,恢复一个装备栏并使用一张对应装备牌'; - player.chooseToDiscard('he', get.prompt('fenrui'), str).set('ai', function (card) { - return 7 - get.value(card); - }).logSkill = 'fenrui'; + if(player.hasDisabledSlot()&&player.countCards('he')>0){ + var str='弃置一张牌,恢复一个装备栏并使用一张对应装备牌'; + player.chooseToDiscard('he',get.prompt('fenrui'),str).set('ai',function(card){ + return 7-get.value(card); + }).logSkill='fenrui'; } else event.goto(3); 'step 1' - if (result.bool) { - player.chooseToEnable().set('ai', function () { - var player = _status.event.player; - var list = [2, 5, 1, 3, 4]; - for (var i of list) { - if (player.hasDisabledSlot(i)) return 'equip' + i; + if(result.bool){ + player.chooseToEnable().set('ai',function(){ + var player=_status.event.player; + var list=[2,5,1,3,4]; + for(var i of list){ + if(player.hasDisabledSlot(i)) return 'equip'+i; } }); } - else { - var es = player.countCards('e'); - if (player.storage.fenrui || !game.hasPlayer(function (current) { - return current != player && current.countCards('e') < es; + else{ + var es=player.countCards('e'); + if(player.storage.fenrui||!game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e') 0 && game.hasPlayer(function (current) { - return current != player && current.countCards('e') < es; - })) { - player.chooseTarget('是否对一名装备数小于你的角色造成伤害?', '你可以选择一名装备区内牌数小于你的角色,并对其造成X点伤害(X为你与其装备区牌数之差),但此效果每局游戏内仅限一次。', function (card, player, target) { - return player != target && player.countCards('e') > target.countCards('e'); - }).set('ai', function (target) { - var player = _status.event.player; - var num = player.countCards('e') - target.countCards('e'); - if (get.attitude(player, target) >= 0) return 0; - if (num >= Math.min(2, player.hp, target.hp)) return get.damageEffect(target, player, player); + var es=player.countCards('e'); + if(es>0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')target.countCards('e'); + }).set('ai',function(target){ + var player=_status.event.player; + var num=player.countCards('e')-target.countCards('e'); + if(get.attitude(player,target)>=0) return 0; + if(num>=Math.min(2,player.hp,target.hp)) return get.damageEffect(target,player,player); return 0; }); } else event.finish(); 'step 4' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('fenrui_animate', target); - player.storage.fenrui = true; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('fenrui_animate',target); + player.storage.fenrui=true; player.unmarkSkill('fenrui'); game.delayx(); - target.damage(player.countCards('e') - target.countCards('e')); + target.damage(player.countCards('e')-target.countCards('e')); } }, - group: 'fenrui_animate', - mark: true, - intro: { content: '王炸尚未使用' }, - subSkill: { - animate: { - skillAnimation: true, - animationColor: 'fire', + group:'fenrui_animate', + mark:true, + intro:{content:'王炸尚未使用'}, + subSkill:{ + animate:{ + skillAnimation:true, + animationColor:'fire', }, }, }, //曹宪曹华 - huamu: { - audio: 6, - trigger: { player: 'useCardAfter' }, - locked: false, - filter: function (event, player) { - var color = get.color(event.card); - if (color == 'none') return false; - if (!player.hasHistory('lose', function (evt) { - return evt.hs.length > 0 && evt.getParent() == event; - }) || !event.cards.filterInD('oe').length) return false; - var history = game.getGlobalHistory('useCard'); - var index = history.indexOf(event); - if (index < 1) return false; - var evt = history[index - 1], color2 = get.color(evt.card); - return color != color2 && color2 != 'none'; + huamu:{ + audio:6, + trigger:{player:'useCardAfter'}, + locked:false, + filter:function(event,player){ + var color=get.color(event.card); + if(color=='none') return false; + if(!player.hasHistory('lose',function(evt){ + return evt.hs.length>0&&evt.getParent()==event; + })||!event.cards.filterInD('oe').length) return false; + var history=game.getGlobalHistory('useCard'); + var index=history.indexOf(event); + if(index<1) return false; + var evt=history[index-1],color2=get.color(evt.card); + return color!=color2&&color2!='none'; }, - prompt2: (event) => '将' + get.translation(event.cards.filterInD('oe')) + '置于武将牌上', - check: function (event, player) { - if (!game.hasPlayer(function (current) { - return current.hasSkill('qianmeng', null, null, false) && get.attitude(player, current) > 0; + prompt2:(event)=>'将'+get.translation(event.cards.filterInD('oe'))+'置于武将牌上', + check:function(event,player){ + if(!game.hasPlayer(function(current){ + return current.hasSkill('qianmeng',null,null,false)&&get.attitude(player,current)>0; })) return false; - var cards = event.cards.filterInD('e'); - if (!cards.length) return true; - var card = cards[0]; - if (get.owner(card) == player) { - if (get.value(card, player) <= 0) return true; - var subtype = get.subtype(card); - if (player.hasCard('hs', function (card) { - return get.subtype(card) == subtype && player.canUse(card, player) && get.effect(player, card, player, player) > 0; + var cards=event.cards.filterInD('e'); + if(!cards.length) return true; + var card=cards[0]; + if(get.owner(card)==player){ + if(get.value(card,player)<=0) return true; + var subtype=get.subtype(card); + if(player.hasCard('hs',function(card){ + return get.subtype(card)==subtype&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; })) return true; } return false; }, - content: function () { - var cards = trigger.cards.filterInD('oe'); - player.addToExpansion(cards, 'gain2').gaintag.add('huamu'); + content:function(){ + var cards=trigger.cards.filterInD('oe'); + player.addToExpansion(cards,'gain2').gaintag.add('huamu'); }, - ai: { - reverseOrder: true, - combo: 'qianmeng', + ai:{ + reverseOrder:true, + combo:'qianmeng', }, - mod: { - aiOrder: function (player, card, num) { - if (typeof card == 'object') { - var history = game.getGlobalHistory('useCard'); - if (!history.length) return; - var evt = history[history.length - 1]; - if (evt && evt.card && get.color(evt.card) != 'none' && get.color(card) != 'none' && get.color(evt.card) != get.color(card)) { - return num + 4; + mod:{ + aiOrder:function(player,card,num){ + if(typeof card=='object'){ + var history=game.getGlobalHistory('useCard'); + if(!history.length) return; + var evt=history[history.length-1]; + if(evt&&evt.card&&get.color(evt.card)!='none'&&get.color(card)!='none'&&get.color(evt.card)!=get.color(card)){ + return num+4; } } }, }, - marktext: '木', - intro: { - name: '灵杉&玉树', - markcount: function (storage, player) { - var red = [], black = []; - var cards = player.getExpansions('huamu'); - for (var i of cards) { - var color = get.color(i, false); - (color == 'red' ? red : black).push(i); + marktext:'木', + intro:{ + name:'灵杉&玉树', + markcount:function(storage,player){ + var red=[],black=[]; + var cards=player.getExpansions('huamu'); + for(var i of cards){ + var color=get.color(i,false); + (color=='red'?red:black).push(i); } - return ('' + black.length + '/' + red.length); + return (''+black.length+'/'+red.length); }, - content: 'expansion', - mark: function (dialog, storage, player) { - var red = [], black = []; - var cards = player.getExpansions('huamu'); - for (var i of cards) { - var color = get.color(i, false); - (color == 'red' ? red : black).push(i); + content:'expansion', + mark:function(dialog,storage,player){ + var red=[],black=[]; + var cards=player.getExpansions('huamu'); + for(var i of cards){ + var color=get.color(i,false); + (color=='red'?red:black).push(i); } - if (black.length) { + if(black.length){ dialog.addText('灵杉'); dialog.addSmall(black); } - if (red.length) { + if(red.length){ dialog.addText('玉树'); dialog.addSmall(red); } }, }, }, - qianmeng: { - audio: 2, - trigger: { - global: ['loseAfter', 'equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + qianmeng:{ + audio:2, + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - if (event.name == 'addToExpansion') { - if (event.gaintag.includes('huamu')) { - var cards = event.player.getExpansions('huamu'), red = cards.filter(function (i) { - return get.color(i, false) == 'red'; + filter:function(event,player){ + if(event.name=='addToExpansion'){ + if(event.gaintag.includes('huamu')){ + var cards=event.player.getExpansions('huamu'),red=cards.filter(function(i){ + return get.color(i,false)=='red'; }); - if (cards.length == red.length || red.length == 0 || cards.length == red.length * 2) return true; + if(cards.length==red.length||red.length==0||cards.length==red.length*2) return true; } } - if (event.name == 'lose' && event.getlx !== false) { - for (var i in event.gaintag_map) { - if (event.gaintag_map[i].includes('huamu')) { - var cards = event.player.getExpansions('huamu'), red = cards.filter(function (i) { - return get.color(i, false) == 'red'; + if(event.name=='lose'&&event.getlx!==false){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].includes('huamu')){ + var cards=event.player.getExpansions('huamu'),red=cards.filter(function(i){ + return get.color(i,false)=='red'; }); - return (cards.length == red.length || red.length == 0 || cards.length == red.length / 2); + return (cards.length==red.length||red.length==0||cards.length==red.length/2); } } return false; } - return game.getGlobalHistory('cardMove', function (evt) { - if (evt.name != 'lose' || event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('huamu')) { - var cards = evt.player.getExpansions('huamu'), red = cards.filter(function (i) { - return get.color(i, false) == 'red'; + return game.getGlobalHistory('cardMove',function(evt){ + if(evt.name!='lose'||event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('huamu')){ + var cards=evt.player.getExpansions('huamu'),red=cards.filter(function(i){ + return get.color(i,false)=='red'; }); - return (cards.length == red.length || red.length == 0 || cards.length == red.length / 2); + return (cards.length==red.length||red.length==0||cards.length==red.length/2); } } return false; - }).length > 0; + }).length>0; }, - forced: true, - content: function () { + forced:true, + content:function(){ player.draw(); }, - ai: { combo: 'huamu' }, + ai:{combo:'huamu'}, }, - liangyuan: { - enable: 'chooseToUse', - hiddenCard: function (player, name) { - if (name == 'tao') { - return !player.hasSkill('liangyuan_tao', null, null, false) && game.hasPlayer(function (current) { - var storage = current.getExpansions('huamu'); - return storage.length > 0 && storage.filter(function (i) { - return get.color(i, false) == 'red'; - }).length > 0; + liangyuan:{ + enable:'chooseToUse', + hiddenCard:function(player,name){ + if(name=='tao'){ + return !player.hasSkill('liangyuan_tao',null,null,false)&&game.hasPlayer(function(current){ + var storage=current.getExpansions('huamu'); + return storage.length>0&&storage.filter(function(i){ + return get.color(i,false)=='red'; + }).length>0; }); } - else if (name == 'jiu') { - return !player.hasSkill('liangyuan_jiu', null, null, false) && game.hasPlayer(function (current) { - var storage = current.getExpansions('huamu'); - return storage.length > 0 && storage.filter(function (i) { - return get.color(i, false) == 'black'; - }).length > 0; + else if(name=='jiu'){ + return !player.hasSkill('liangyuan_jiu',null,null,false)&&game.hasPlayer(function(current){ + var storage=current.getExpansions('huamu'); + return storage.length>0&&storage.filter(function(i){ + return get.color(i,false)=='black'; + }).length>0; }) } return false; }, - filter: function (event, player) { - if (event.type == 'wuxie') return false; - if (!player.hasSkill('liangyuan_tao', null, null, false) && event.filterCard({ name: 'tao' }, player, event) && game.hasPlayer(function (current) { - var storage = current.getExpansions('huamu'); - return storage.length > 0 && storage.filter(function (i) { - return get.color(i, false) == 'red'; - }).length > 0; + filter:function(event,player){ + if(event.type=='wuxie') return false; + if(!player.hasSkill('liangyuan_tao',null,null,false)&&event.filterCard({name:'tao'},player,event)&&game.hasPlayer(function(current){ + var storage=current.getExpansions('huamu'); + return storage.length>0&&storage.filter(function(i){ + return get.color(i,false)=='red'; + }).length>0; })) return true; - if (!player.hasSkill('liangyuan_jiu', null, null, false) && event.filterCard({ name: 'jiu' }, player, event) && game.hasPlayer(function (current) { - var storage = current.getExpansions('huamu'); - return storage.length > 0 && storage.filter(function (i) { - return get.color(i, false) == 'black'; - }).length > 0; + if(!player.hasSkill('liangyuan_jiu',null,null,false)&&event.filterCard({name:'jiu'},player,event)&&game.hasPlayer(function(current){ + var storage=current.getExpansions('huamu'); + return storage.length>0&&storage.filter(function(i){ + return get.color(i,false)=='black'; + }).length>0; })) return true; return false; }, - chooseButton: { - dialog: function () { - return ui.create.dialog('良缘', [['tao', 'jiu'], 'vcard'], 'hidden'); + chooseButton:{ + dialog:function(){ + return ui.create.dialog('良缘',[['tao','jiu'],'vcard'],'hidden'); }, - filter: function (button, player) { - var evt = _status.event.getParent(); - var name = button.link[2], color = (name == 'tao') ? 'red' : 'black'; - if (player.hasSkill('liangyuan_' + name, null, null, false)) return false; - var cards = []; - game.countPlayer(function (current) { - cards.addArray(current.getExpansions('huamu').filter(function (i) { - return get.color(i, false) == color; + filter:function(button,player){ + var evt=_status.event.getParent(); + var name=button.link[2],color=(name=='tao')?'red':'black'; + if(player.hasSkill('liangyuan_'+name,null,null,false)) return false; + var cards=[]; + game.countPlayer(function(current){ + cards.addArray(current.getExpansions('huamu').filter(function(i){ + return get.color(i,false)==color; })); }); - if (!cards.length) return false; - var card = get.autoViewAs({ name: name }, cards); - return evt.filterCard(card, player, evt); + if(!cards.length) return false; + var card=get.autoViewAs({name:name},cards); + return evt.filterCard(card,player,evt); }, - check: function (button) { - if (_status.event.getParent().type != 'phase') return 1; - var player = _status.event.player; - var name = button.link[2], color = (name == 'tao') ? 'red' : 'black'; - var cards = []; - game.countPlayer(function (current) { - cards.addArray(current.getExpansions('huamu').filter(function (i) { - return get.color(i, false) == color; + check:function(button){ + if(_status.event.getParent().type!='phase') return 1; + var player=_status.event.player; + var name=button.link[2],color=(name=='tao')?'red':'black'; + var cards=[]; + game.countPlayer(function(current){ + cards.addArray(current.getExpansions('huamu').filter(function(i){ + return get.color(i,false)==color; })); }); - var card = get.autoViewAs({ name: name }, cards); - return player.getUseValue(card, null, true); + var card=get.autoViewAs({name:name},cards); + return player.getUseValue(card,null,true); }, - backup: function (links, player) { - var name = links[0][2], color = (name == 'tao') ? 'red' : 'black'; - var cards = []; - game.countPlayer(function (current) { - cards.addArray(current.getExpansions('huamu').filter(function (i) { - return get.color(i, false) == color; + backup:function(links,player){ + var name=links[0][2],color=(name=='tao')?'red':'black'; + var cards=[]; + game.countPlayer(function(current){ + cards.addArray(current.getExpansions('huamu').filter(function(i){ + return get.color(i,false)==color; })); }); - if (!cards.length) return false; - var card = get.autoViewAs({ name: name }, cards); + if(!cards.length) return false; + var card=get.autoViewAs({name:name},cards); return { - viewAs: card, - color: color, - selectCard: -1, - filterCard: () => false, - precontent: function () { - player.addTempSkill('liangyuan_' + event.result.card.name, 'roundStart'); + viewAs:card, + color:color, + selectCard:-1, + filterCard:()=>false, + precontent:function(){ + player.addTempSkill('liangyuan_'+event.result.card.name,'roundStart'); player.logSkill('liangyuan'); - var list = [], color = lib.skill.liangyuan_backup.color; - var cards = []; - game.countPlayer(function (current) { - var cardsx = current.getExpansions('huamu').filter(function (i) { - return get.color(i, false) == color; + var list=[],color=lib.skill.liangyuan_backup.color; + var cards=[]; + game.countPlayer(function(current){ + var cardsx=current.getExpansions('huamu').filter(function(i){ + return get.color(i,false)==color; }); - if (cardsx.length) { + if(cardsx.length){ cards.addArray(cardsx); - list.push([current, cardsx]); + list.push([current,cardsx]); current.$throw(cardsx); - game.log(current, '将', cardsx, '化作“' + (color == 'black' ? '灵杉' : '玉树') + '”良缘') + game.log(current,'将',cardsx,'化作“'+(color=='black'?'灵杉':'玉树')+'”良缘') } }); - event.result.cards = cards; + event.result.cards=cards; delete event.result.skill; - event.result._apply_args = { 'throw': false }; + event.result._apply_args={'throw':false}; game.loseAsync({ - lose_list: list, + lose_list:list, }).setContent('chooseToCompareLose'); }, } }, - prompt: function (links, player) { - var name = links[0][2], color = (name == 'tao') ? '玉树' : '灵杉'; - return '将场上所有的“' + color + '”当做【' + get.translation(name) + '】使用'; + prompt:function(links,player){ + var name=links[0][2],color=(name=='tao')?'玉树':'灵杉'; + return '将场上所有的“'+color+'”当做【'+get.translation(name)+'】使用'; }, }, - subSkill: { - tao: { charlotte: true }, - jiu: { charlotte: true }, + subSkill:{ + tao:{charlotte:true}, + jiu:{charlotte:true}, }, - ai: { - order: function (item, player) { - if (!player) player = _status.event.player; - return get.order({ name: lib.skill.liangyuan.hiddenCard(player, 'jiu') ? 'jiu' : 'tao' }) + 4; + ai:{ + order:function(item,player){ + if(!player) player=_status.event.player; + return get.order({name:lib.skill.liangyuan.hiddenCard(player,'jiu')?'jiu':'tao'})+4; }, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; }, }, - combo: 'huamu', - threaten: 3, + combo:'huamu', + threaten:3, }, }, - jisi: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - limited: true, - skillAnimation: true, - animationColor: 'metal', - filter: function (event, player) { - var skills = player.getStockSkills('一!', '五!').filter(function (skill) { - if (skill == 'jisi') return false; - var info = get.info(skill); - return info && !info.charlotte; + jisi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + limited:true, + skillAnimation:true, + animationColor:'metal', + filter:function(event,player){ + var skills=player.getStockSkills('一!','五!').filter(function(skill){ + if(skill=='jisi') return false; + var info=get.info(skill); + return info&&!info.charlotte; }); - var history = player.getAllHistory('useSkill'); - for (var i of history) { - if (skills.includes(i.sourceSkill) || skills.includes(i.skill)) return true; + var history=player.getAllHistory('useSkill'); + for(var i of history){ + if(skills.includes(i.sourceSkill)||skills.includes(i.skill)) return true; } return false; }, - content: function () { + content:function(){ 'step 0' - var skills2 = []; - var skills = player.getStockSkills('只!', '因!').filter(function (skill) { - if (skill == 'jisi') return false; - var info = get.info(skill); - return info && !info.charlotte; + var skills2=[]; + var skills=player.getStockSkills('只!','因!').filter(function(skill){ + if(skill=='jisi') return false; + var info=get.info(skill); + return info&&!info.charlotte; }); - var history = player.getAllHistory('useSkill'); - for (var i of history) { - if (skills.includes(i.sourceSkill)) skills2.add(i.sourceSkill); - if (skills.includes(i.skill)) skills2.add(i.skill); - if (skills.length == skills2.length) break; + var history=player.getAllHistory('useSkill'); + for(var i of history){ + if(skills.includes(i.sourceSkill)) skills2.add(i.sourceSkill); + if(skills.includes(i.skill)) skills2.add(i.skill); + if(skills.length==skills2.length) break; } - event.skills2 = skills2; - var str = '令一名其他角色获得'; - for (var i = 0; i < skills2.length; i++) { - str += ('〖' + get.translation(skills2[i]) + '〗'); - if (i != skills2.length - 1) str += ';'; + event.skills2=skills2; + var str='令一名其他角色获得'; + for(var i=0;i 1) str += '中的一个技能'; - str += '然后你'; - if (player.countCards('h') > 0) str += '弃置所有手牌,并'; - str += '视为对其使用一张【杀】'; - player.chooseTarget(get.prompt('jisi'), str, lib.filter.notMe).set('ai', function (target) { - if (!_status.event.goon) return false; - var att = get.attitude(player, target); - if (att < 4) return false; - var eff = get.effect(target, { name: 'sha', isCard: true }, player, player); - if (eff >= 0) return att + eff; - if (target.hp <= 2) return false; - return att / Math.max(1, -eff); - }).set('goon', function () { - if (player.hasUnknown() || player.identity == 'nei') return false; - var hs = player.getCards('h'); - if (!hs.length || get.value(hs, player) <= 9 - player.hp) return true; + if(skills2.length>1) str+='中的一个技能'; + str+='然后你'; + if(player.countCards('h')>0) str+='弃置所有手牌,并'; + str+='视为对其使用一张【杀】'; + player.chooseTarget(get.prompt('jisi'),str,lib.filter.notMe).set('ai',function(target){ + if(!_status.event.goon) return false; + var att=get.attitude(player,target); + if(att<4) return false; + var eff=get.effect(target,{name:'sha',isCard:true},player,player); + if(eff>=0) return att+eff; + if(target.hp<=2) return false; + return att/Math.max(1,-eff); + }).set('goon',function(){ + if(player.hasUnknown()||player.identity=='nei') return false; + var hs=player.getCards('h'); + if(!hs.length||get.value(hs,player)<=9-player.hp) return true; return false; }()); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('jisi', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('jisi',target); player.awakenSkill('jisi'); - var list = event.skills2; - if (list.length == 0) event._result = { control: list[0] }; - player.chooseControl(list).set('prompt', '令' + get.translation(target) + '获得一个技能').set( - 'ai', () => _status.event.choice - ).set('choice', list.includes('qianmeng') ? 'qianmeng' : list.randomGet()); + var list=event.skills2; + if(list.length==0) event._result={control:list[0]}; + player.chooseControl(list).set('prompt','令'+get.translation(target)+'获得一个技能').set( + 'ai',()=>_status.event.choice + ).set('choice',list.includes('qianmeng')?'qianmeng':list.randomGet()); } else event.finish(); 'step 2' target.addSkills(result.control); 'step 3' - var num = player.countCards('h'); - if (num > 0) player.chooseToDiscard('h', num, true); + var num=player.countCards('h'); + if(num>0) player.chooseToDiscard('h',num,true); 'step 4' - if (player.canUse('sha', target, false)) player.useCard(false, target, { - name: 'sha', - isCard: true, - }, 'noai') + if(player.canUse('sha',target,false)) player.useCard(false,target,{ + name:'sha', + isCard:true, + },'noai') }, }, //周处 - shanduan: { - audio: 2, - init: function (player, name) { - player.storage[name] = [1, 2, 3, 4]; + shanduan:{ + audio:2, + init:function(player,name){ + player.storage[name]=[1,2,3,4]; }, - trigger: { player: 'damageEnd' }, - filter: (event, player) => player != _status.currentPhase, - forced: true, - locked: false, - content: function () { - if (!player.storage.shanduan) player.storage.shanduan = [1, 2, 3, 4]; - var list = player.storage.shanduan; - for (var i = 0; i < list.length; i++) { - var num = list[i], add = true; - for (var j = 0; j < list.length; j++) { - if (list[j] < num) { - add = false; + trigger:{player:'damageEnd'}, + filter:(event,player)=>player!=_status.currentPhase, + forced:true, + locked:false, + content:function(){ + if(!player.storage.shanduan) player.storage.shanduan=[1,2,3,4]; + var list=player.storage.shanduan; + for(var i=0;i 0; + subSkill:{ + draw:{ + audio:'shanduan', + trigger:{player:'phaseDrawBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + var list=event.getParent()._shanduan; + return !list||list.length>0; }, - content: function () { + content:function(){ 'step 0' - var list = trigger.getParent()._shanduan; - if (!list) { - trigger.getParent()._shanduan = (player.storage.shanduan || [1, 2, 3, 4]).slice(0); - player.storage.shanduan = [1, 2, 3, 4]; + var list=trigger.getParent()._shanduan; + if(!list){ + trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0); + player.storage.shanduan=[1,2,3,4]; } 'step 1' - var list = trigger.getParent()._shanduan; - if (list.length == 1) event._result = { index: 0 }; - else player.chooseControl(list).set('prompt', '善断:为摸牌阶段的摸牌数分配一个数值').set('choice', list.indexOf(Math.max.apply(Math, list))).set('ai', () => _status.event.choice); + var list=trigger.getParent()._shanduan; + if(list.length==1) event._result={index:0}; + else player.chooseControl(list).set('prompt','善断:为摸牌阶段的摸牌数分配一个数值').set('choice',list.indexOf(Math.max.apply(Math,list))).set('ai',()=>_status.event.choice); 'step 2' - var list = trigger.getParent()._shanduan; - var num = list[result.index]; - trigger.num = num; + var list=trigger.getParent()._shanduan; + var num=list[result.index]; + trigger.num=num; list.remove(num); - game.log(player, '给', '#g摸牌阶段的摸牌数', '分配的数值是', '#y' + num); + game.log(player,'给','#g摸牌阶段的摸牌数','分配的数值是','#y'+num); }, }, - use: { - audio: 'shanduan', - trigger: { player: 'phaseUseBegin' }, - forced: true, - locked: false, - filter: function (event, player) { - var list = event.getParent()._shanduan; - return !list || list.length > 0; + use:{ + audio:'shanduan', + trigger:{player:'phaseUseBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + var list=event.getParent()._shanduan; + return !list||list.length>0; }, - content: function () { + content:function(){ 'step 0' - var list = trigger.getParent()._shanduan; - if (!list) { - trigger.getParent()._shanduan = (player.storage.shanduan || [1, 2, 3, 4]).slice(0); - player.storage.shanduan = [1, 2, 3, 4]; + var list=trigger.getParent()._shanduan; + if(!list){ + trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0); + player.storage.shanduan=[1,2,3,4]; } 'step 1' - var list = trigger.getParent()._shanduan; - if (list.length == 1) event._result = { index: 0 }; - else player.chooseControl(list).set('prompt', '善断:为攻击范围基数分配一个数值').set('list', list).set('ai', function () { - var player = _status.event.player, list = _status.event.list, card = { name: 'sha' }; - if (player.hasSha() && (player.hasValueTarget(card, false, true) && !player.hasValueTarget(card, null, true))) { - var range = 1; - var equips = player.getCards('e'); - for (var i = 0; i < equips.length; i++) { - var info = get.info(equips[i], false).distance; - if (!info) continue; - if (info.attackFrom) { - range -= info.attackFrom; + var list=trigger.getParent()._shanduan; + if(list.length==1) event._result={index:0}; + else player.chooseControl(list).set('prompt','善断:为攻击范围基数分配一个数值').set('list',list).set('ai',function(){ + var player=_status.event.player,list=_status.event.list,card={name:'sha'}; + if(player.hasSha()&&(player.hasValueTarget(card,false,true)&&!player.hasValueTarget(card,null,true))){ + var range=1; + var equips=player.getCards('e'); + for(var i=0;i 1 && distance <= (i - range)) return true; + var listx=list.slice(0).sort(); + for(var i of listx){ + if(i<=range) continue; + if(game.hasPlayer(function(current){ + var distance=get.distance(player,current,'attack'); + if(distance>1&&distance<=(i-range)) return true; return false; })) return list.indexOf(i); } } - return list.indexOf(Math.min.apply(Math, list)); + return list.indexOf(Math.min.apply(Math,list)); }); 'step 2' - var list = trigger.getParent()._shanduan; - var num = list[result.index]; - if (!player.storage.shanduan_effect) player.storage.shanduan_effect = {}; - player.storage.shanduan_effect.range = num; + var list=trigger.getParent()._shanduan; + var num=list[result.index]; + if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; + player.storage.shanduan_effect.range=num; player.addTempSkill('shanduan_effect'); list.remove(num); - game.log(player, '给', '#g攻击范围的基数', '分配的数值是', '#y' + num); - if (list.length == 0) event.finish(); - else if (list.length == 1) event._result = { index: 0 }; - else player.chooseControl(list).set('prompt', '为使用【杀】的次数上限分配一个数值').set('list', list).set('ai', function () { - var player = _status.event.player, list = _status.event.list; - var sha = player.countCards('hs', function (card) { - return get.name(card) == 'sha' && player.hasValueTarget(card, null, true); + game.log(player,'给','#g攻击范围的基数','分配的数值是','#y'+num); + if(list.length==0) event.finish(); + else if(list.length==1) event._result={index:0}; + else player.chooseControl(list).set('prompt','为使用【杀】的次数上限分配一个数值').set('list',list).set('ai',function(){ + var player=_status.event.player,list=_status.event.list; + var sha=player.countCards('hs',function(card){ + return get.name(card)=='sha'&&player.hasValueTarget(card,null,true); }); - var max = player.getCardUsable('sha'); - if (sha <= max) { - var listx = list.slice(0).sort(); - for (var i of listx) { - if (max + i >= sha) return list.indexOf(i); + var max=player.getCardUsable('sha'); + if(sha<=max){ + var listx=list.slice(0).sort(); + for(var i of listx){ + if(max+i>=sha) return list.indexOf(i); } - return list.indexOf(Math.max.apply(Math, list)) + return list.indexOf(Math.max.apply(Math,list)) } - return list.indexOf(Math.min.apply(Math, list)); + return list.indexOf(Math.min.apply(Math,list)); }); 'step 3' - var list = trigger.getParent()._shanduan; - var num = list[result.index]; - if (!player.storage.shanduan_effect) player.storage.shanduan_effect = {}; - player.storage.shanduan_effect.sha = num; - game.log(player, '给', '#g使用【杀】的次数上限', '分配的数值是', '#y' + num); + var list=trigger.getParent()._shanduan; + var num=list[result.index]; + if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; + player.storage.shanduan_effect.sha=num; + game.log(player,'给','#g使用【杀】的次数上限','分配的数值是','#y'+num); list.remove(num); }, }, - discard: { - audio: 'shanduan', - trigger: { player: 'phaseDiscardBegin' }, - forced: true, - locked: false, - filter: function (event, player) { - var list = event.getParent()._shanduan; - return !list || list.length > 0; + discard:{ + audio:'shanduan', + trigger:{player:'phaseDiscardBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + var list=event.getParent()._shanduan; + return !list||list.length>0; }, - content: function () { + content:function(){ 'step 0' - var list = trigger.getParent()._shanduan; - if (!list) { - trigger.getParent()._shanduan = (player.storage.shanduan || [1, 2, 3, 4]).slice(0); - player.storage.shanduan = [1, 2, 3, 4]; + var list=trigger.getParent()._shanduan; + if(!list){ + trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0); + player.storage.shanduan=[1,2,3,4]; } 'step 1' - var list = trigger.getParent()._shanduan; - if (list.length == 1) event._result = { index: 0 }; - else player.chooseControl(list).set('prompt', '善断:为手牌上限基数分配一个数值').set('choice', list.indexOf(Math.max.apply(Math, list))).set('ai', () => _status.event.choice); + var list=trigger.getParent()._shanduan; + if(list.length==1) event._result={index:0}; + else player.chooseControl(list).set('prompt','善断:为手牌上限基数分配一个数值').set('choice',list.indexOf(Math.max.apply(Math,list))).set('ai',()=>_status.event.choice); 'step 2' - var list = trigger.getParent()._shanduan; - var num = list[result.index]; - if (!player.storage.shanduan_effect) player.storage.shanduan_effect = {}; - player.storage.shanduan_effect.limit = num; + var list=trigger.getParent()._shanduan; + var num=list[result.index]; + if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; + player.storage.shanduan_effect.limit=num; player.addTempSkill('shanduan_effect'); list.remove(num); - game.log(player, '给', '#g手牌上限的基数', '分配的数值是', '#y' + num); + game.log(player,'给','#g手牌上限的基数','分配的数值是','#y'+num); }, }, - effect: { - charlotte: true, - onremove: true, - mod: { - attackRangeBase: function (player) { - var map = player.storage.shanduan_effect; - if (typeof map.range != 'number') return; - var range = 1; - var equips = player.getCards('e', function (card) { - return !ui.selected.cards || !ui.selected.cards.includes(card); + effect:{ + charlotte:true, + onremove:true, + mod:{ + attackRangeBase:function(player){ + var map=player.storage.shanduan_effect; + if(typeof map.range!='number') return; + var range=1; + var equips=player.getCards('e',function(card){ + return !ui.selected.cards||!ui.selected.cards.includes(card); }); - for (var i = 0; i < equips.length; i++) { - var info = get.info(equips[i], false).distance; - if (!info) continue; - if (info.attackFrom) { - range -= info.attackFrom; + for(var i=0;i get.value(cardx) < 8); - cards.sort((a, b) => get.value(a) - get.value(b)); - if (cards.some(cardx => get.name(cardx) == 'sha' && !cards.slice(0, 2).includes(cardx))) return player.getUseValue({ name: 'jiu' }); + if(evt.type=='phase'){ + if(button.link[2]=='jiu'){ + if(player.getUseValue({name:'jiu'})<=0) return 0; + var cards=player.getCards('hs',cardx=>get.value(cardx)<8); + cards.sort((a,b)=>get.value(a)-get.value(b)); + if(cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) return player.getUseValue({name:'jiu'}); return 0; } - return player.getUseValue(card) / 4; + return player.getUseValue(card)/4; } return 1; }, - backup: function (links, player) { + backup:function(links,player){ return { - audio: 'yilie', - selectCard: 2, - filterCard: function (card, player) { - var color = get.color(card); - if (ui.selected.cards.length) return color == get.color(ui.selected.cards[0]); - return player.hasCard(function (cardx) { - return card != cardx && get.color(cardx) == color; - }, 'hs') + audio:'yilie', + selectCard:2, + filterCard:function(card,player){ + var color=get.color(card); + if(ui.selected.cards.length) return color==get.color(ui.selected.cards[0]); + return player.hasCard(function(cardx){ + return card!=cardx&&get.color(cardx)==color; + },'hs') }, - position: 'hs', - complexCard: true, - check: (card) => 8 - get.value(card), - popname: true, - viewAs: { - name: links[0][2], - nature: links[0][3], + position:'hs', + complexCard:true, + check:(card)=>8-get.value(card), + popname:true, + viewAs:{ + name:links[0][2], + nature:links[0][3], }, - precontent: function () { - var name = event.result.card.name; - player.addTempSkill('yilie_count', 'roundStart'); - player.markAuto('yilie_count', [name]); + precontent:function(){ + var name=event.result.card.name; + player.addTempSkill('yilie_count','roundStart'); + player.markAuto('yilie_count',[name]); }, } }, - prompt: function (links, player) { - var name = links[0][2]; - var nature = links[0][3]; - return '将两张颜色相同的手牌当做' + (get.translation(nature) || '') + get.translation(name) + '使用'; + prompt:function(links,player){ + var name=links[0][2]; + var nature=links[0][3]; + return '将两张颜色相同的手牌当做'+(get.translation(nature)||'')+get.translation(name)+'使用'; }, }, - ai: { - order: function (item, player) { - if (player && _status.event.type == 'phase') { - var add = false, max = 0; - var names = lib.inpile.filter(name => get.type(name) == 'basic' && !player.getStorage('yilie_count').includes(name)); - if (names.includes('sha')) add = true; - names = names.map(namex => { return { name: namex } }); - if (add) lib.inpile_nature.forEach(nature => names.push({ name: 'sha', nature: nature })); - names.forEach(card => { - if (player.getUseValue(card) > 0) { - var temp = get.order(card); - if (card.name == 'jiu') { - var cards = player.getCards('hs', cardx => get.value(cardx) < 8); - cards.sort((a, b) => get.value(a) - get.value(b)); - if (!cards.some(cardx => get.name(cardx) == 'sha' && !cards.slice(0, 2).includes(cardx))) temp = 0; + ai:{ + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var add=false,max=0; + var names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('yilie_count').includes(name)); + if(names.includes('sha')) add=true; + names=names.map(namex=>{return {name:namex}}); + if(add) lib.inpile_nature.forEach(nature=>names.push({name:'sha',nature:nature})); + names.forEach(card=>{ + if(player.getUseValue(card)>0){ + var temp=get.order(card); + if(card.name=='jiu'){ + var cards=player.getCards('hs',cardx=>get.value(cardx)<8); + cards.sort((a,b)=>get.value(a)-get.value(b)); + if(!cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) temp=0; } - if (temp > max) max = temp; + if(temp>max) max=temp; } }); - if (max > 0) max -= 0.001; + if(max>0) max-=0.001; return max; } return 0.5; }, - respondShan: true, - respondSha: true, - fireAttack: true, - skillTagFilter: function (player, tag, arg) { - if (arg == 'respond') return false; - var hs = player.getCards('hs'); - if (hs.length < 2) return false; - var bool = false, map = {}; - for (var card of hs) { - var color = get.color(card); - if (!map[color]) map[color] = true; - else { - bool = true; + respondShan:true, + respondSha:true, + fireAttack:true, + skillTagFilter:function(player,tag,arg){ + if(arg=='respond') return false; + var hs=player.getCards('hs'); + if(hs.length<2) return false; + var bool=false,map={}; + for(var card of hs){ + var color=get.color(card); + if(!map[color]) map[color]=true; + else{ + bool=true; break; } } - if (!bool) return false; - var storage = player.storage.yilie_count; + if(!bool) return false; + var storage=player.storage.yilie_count; var name; - switch (tag) { - case 'respondShan': name = 'shan'; break; - default: name = 'sha'; break; + switch(tag){ + case 'respondShan':name='shan';break; + default:name='sha';break; } - if (storage && storage.includes(name)) return false; + if(storage&&storage.includes(name)) return false; }, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; } } }, - subSkill: { - count: { charlotte: true, onremove: true }, - backup: { audio: 'yilie' }, + subSkill:{ + count:{charlotte:true,onremove:true}, + backup:{audio:'yilie'}, }, }, //赵俨 - tongxie: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - direct: true, - content: function () { + tongxie:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('tongxie'), '选择至多两名其他角色作为“同协角色”', lib.filter.notMe, [0, 2]).set('ai', function (target) { - return get.attitude(_status.event.player, target); + player.chooseTarget(get.prompt('tongxie'),'选择至多两名其他角色作为“同协角色”',lib.filter.notMe,[0,2]).set('ai',function(target){ + return get.attitude(_status.event.player,target); }); 'step 1' - if (result.bool) { - var targets = result.targets; + if(result.bool){ + var targets=result.targets; targets.add(player); - player.logSkill('tongxie', targets); - player.addTempSkill('tongxie_effect', { player: 'phaseBegin' }); - player.markAuto('tongxie_effect', targets); - var min = player.countCards('h'), min_player = player; - for (var i of targets) { - if (i == player) continue; - var num = i.countCards('h'); - if (num < min) { - min = num; - min_player = i; + player.logSkill('tongxie',targets); + player.addTempSkill('tongxie_effect',{player:'phaseBegin'}); + player.markAuto('tongxie_effect',targets); + var min=player.countCards('h'),min_player=player; + for(var i of targets){ + if(i==player) continue; + var num=i.countCards('h'); + if(num 0) return true; - if (i.hasSha()) return true; + subSkill:{ + effect:{ + audio:'tongxie', + charlotte:true, + trigger:{global:'useCardAfter'}, + onremove:true, + forced:true, + popup:false, + filter:function(event,player){ + if(event.card.name!='sha'||event.targets.length!=1||!event.targets[0].isIn()) return false; + if(event.getParent(2).name=='tongxie_effect') return false; + var list=player.getStorage('tongxie_effect'),target=event.targets[0]; + if(!list.includes(event.player)) return false; + for(var i of list){ + if(i==event.player||!i.isIn()) continue; + if(!i.canUse('sha',target,false)) continue; + if(_status.connectMode&&i.countCards('hs')>0) return true; + if(i.hasSha()) return true; } return false; }, - content: function () { + content:function(){ 'step 0' - event.targets = player.getStorage('tongxie_effect').filter(function (i) { - return i !== trigger.player; + event.targets=player.getStorage('tongxie_effect').filter(function(i){ + return i!==trigger.player; }).sortBySeat(); - event.target = trigger.targets[0]; + event.target=trigger.targets[0]; 'step 1' - var current = targets.shift(); - if (current.isIn() && target.isIn() && current.canUse('sha', target, false) && (_status.connectMode || current.hasSha())) { - current.chooseToUse(function (card, player, event) { - if (get.name(card) != 'sha') return false; - return lib.filter.filterCard.apply(this, arguments); - }, '同协:是否对' + get.translation(target) + '使用一张杀?').set('targetRequired', true).set('complexSelect', true).set('filterTarget', function (card, player, target) { - if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this, arguments); - }).set('sourcex', target).set('logSkill', 'tongxie_effect').set('addCount', false); - if (targets.length > 0) event.redo(); + var current=targets.shift(); + if(current.isIn()&&target.isIn()&¤t.canUse('sha',target,false)&&(_status.connectMode||current.hasSha())){ + current.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'同协:是否对'+get.translation(target)+'使用一张杀?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',target).set('logSkill','tongxie_effect').set('addCount',false); + if(targets.length>0) event.redo(); } }, - group: ['tongxie_damage', 'tongxie_count'], + group:['tongxie_damage','tongxie_count'], }, - damage: { - audio: 'tongxie', - charlotte: true, - trigger: { global: 'damageBegin4' }, - filter: function (event, player) { - var list = player.getStorage('tongxie_effect'); - if (!list.includes(event.player)) return false; - for (var i of list) { - if (i != event.player && i.isIn() && !i.hasSkill('tongxie_count2', null, null, false)) return true; + damage:{ + audio:'tongxie', + charlotte:true, + trigger:{global:'damageBegin4'}, + filter:function(event,player){ + var list=player.getStorage('tongxie_effect'); + if(!list.includes(event.player)) return false; + for(var i of list){ + if(i!=event.player&&i.isIn()&&!i.hasSkill('tongxie_count2',null,null,false)) return true; } return false; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ 'step 0' - event.targets = player.getStorage('tongxie_effect').filter(function (i) { - return i != trigger.player && i.isIn() && !i.hasSkill('tongxie_count2', null, null, false); + event.targets=player.getStorage('tongxie_effect').filter(function(i){ + return i!=trigger.player&&i.isIn()&&!i.hasSkill('tongxie_count2',null,null,false); }).sortBySeat(); - event.num = 0; + event.num=0; 'step 1' - var target = targets[num]; + var target=targets[num]; event.num++; - event.target = target; - target.chooseBool('同协:是否为' + get.translation(trigger.player) + '阻挡伤害?', '失去1点体力,防止' + get.translation(trigger.player) + '即将受到的' + get.cnNumber(trigger.num) + '点伤害').set('ai', function () { - var player = _status.event.player, target = _status.event.getTrigger().player; - var trigger = _status.event.getTrigger(); - var eff1 = get.damageEffect(target, trigger.source, player, trigger.nature); - if (trigger.num > 1) eff1 = Math.min(-1, eff1) * trigger.num; - var eff2 = get.effect(player, { name: 'losehp' }, player, player); - return eff2 > eff1; + event.target=target; + target.chooseBool('同协:是否为'+get.translation(trigger.player)+'阻挡伤害?','失去1点体力,防止'+get.translation(trigger.player)+'即将受到的'+get.cnNumber(trigger.num)+'点伤害').set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + var trigger=_status.event.getTrigger(); + var eff1=get.damageEffect(target,trigger.source,player,trigger.nature); + if(trigger.num>1) eff1=Math.min(-1,eff1)*trigger.num; + var eff2=get.effect(player,{name:'losehp'},player,player); + return eff2>eff1; }); 'step 2' - if (result.bool) { - target.logSkill('tongxie_damage', trigger.player); + if(result.bool){ + target.logSkill('tongxie_damage',trigger.player); trigger.cancel(); target.loseHp(); } - else if (num < targets.length) event.goto(1); + else if(num= to.hp) return -Infinity; + olzhuiji:{ + mod:{ + globalFrom:function(from,to){ + if(from.hp>=to.hp) return -Infinity; }, }, - trigger: { player: 'useCardToPlayered' }, - shaRelated: true, - filter: function (event, player) { - return event.card.name == 'sha' && event.target.countCards('he') > 0 && get.distance(player, event.target) == 1; + trigger:{player:'useCardToPlayered'}, + shaRelated:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countCards('he')>0&&get.distance(player,event.target)==1; }, - forced: true, - logTarget: 'target', - content: function () { + forced:true, + logTarget:'target', + content:function(){ 'step 0' - var target = trigger.target; - event.target = target; - if (target.countCards('e') == 0) event._result = { index: 0 }; - else target.chooseControl().set('choiceList', [ + var target=trigger.target; + event.target=target; + if(target.countCards('e')==0) event._result={index:0}; + else target.chooseControl().set('choiceList',[ '弃置一张牌', '重铸装备区的所有牌', - ]).set('ai', function (card) { - var min = Infinity, equ = 0, es = player.getCards('e'), hs = player.getCards('he'); - for (var i of hs) { - var val = get.value(i); - min = Math.min(min, val); - if (es.includes(i)) equ += val; + ]).set('ai',function(card){ + var min=Infinity,equ=0,es=player.getCards('e'),hs=player.getCards('he'); + for(var i of hs){ + var val=get.value(i); + min=Math.min(min,val); + if(es.includes(i)) equ+=val; } - equ /= es.length; - if (min < equ - 1) return 0; + equ/=es.length; + if(min 1) return; - var card = get.cards()[0]; - if (!card) return; - game.log(player, '展示了', card); + var sendback=function(result,player){ + if(result){ + var index=result.index; + game.log(player,'选择了',['#b助力锻造','#g妨碍锻造','#b什么都不做'][index]) + if(index>1) return; + var card=get.cards()[0]; + if(!card) return; + game.log(player,'展示了',card); event.cardsx.push(card); event.cards2[index].push(card); - game.broadcastAll(function (id, card, name, index) { - var dialog = get.idDialog(id); - if (!dialog) return; - var button = ui.create.button(card, 'card', dialog.buttonss[index]); - button.querySelector('.info').innerHTML = (name + '|' + get.strNumber(card.number)); - }, event.videoId, card, function (target) { - if (target._tempTranslate) return target._tempTranslate; - var name = target.name; - if (lib.translate[name + '_ab']) return lib.translate[name + '_ab']; + game.broadcastAll(function(id,card,name,index){ + var dialog=get.idDialog(id); + if(!dialog) return; + var button=ui.create.button(card,'card',dialog.buttonss[index]); + button.querySelector('.info').innerHTML=(name+'|'+get.strNumber(card.number)); + },event.videoId,card,function(target){ + if(target._tempTranslate) return target._tempTranslate; + var name=target.name; + if(lib.translate[name+'_ab']) return lib.translate[name+'_ab']; return get.translation(name); - }(player), index); + }(player),index); } }; - event.players = game.filterPlayer(); - event.cardsx = []; - event.cards2 = [[], []]; - event.videoId = lib.status.videoId++; - event.ai_targets = []; - game.broadcastAll(function (name, id) { - var dialog = ui.create.dialog(name + '发起了“锻造”', 'hidden', 'forcebutton'); - dialog.videoId = id; + event.players=game.filterPlayer(); + event.cardsx=[]; + event.cards2=[[],[]]; + event.videoId=lib.status.videoId++; + event.ai_targets=[]; + game.broadcastAll(function(name,id){ + var dialog=ui.create.dialog(name+'发起了“锻造”','hidden','forcebutton'); + dialog.videoId=id; dialog.classList.add('scroll1'); dialog.classList.add('scroll2'); dialog.classList.add('fullwidth'); dialog.classList.add('fullheight'); ui.arena.classList.add('choose-to-move'); - dialog.buttonss = []; + dialog.buttonss=[]; - var list = ['协力锻造的玩家', '妨碍锻造的玩家'] - for (var i = 0; i < list.length; i++) { - dialog.add('
    ' + list[i] + '
    '); - var buttons = ui.create.div('.buttons', dialog.content); + var list=['协力锻造的玩家','妨碍锻造的玩家'] + for(var i=0;i'+list[i]+''); + var buttons=ui.create.div('.buttons',dialog.content); dialog.buttonss.push(buttons); buttons.classList.add('popup'); buttons.classList.add('guanxing'); } dialog.open(); - }, get.translation(player), event.videoId) - for (var i = 0; i < event.players.length; i++) { - if (event.players[i] == player) { - sendback({ index: 0 }, player); + },get.translation(player),event.videoId) + for(var i=0;i 0) num = 0; - else if (att < 0) num = 1; - sendback({ index: num }, target); - if (_status.connectMode) target.hideTimer(); - if (!event.ai_targets.length) { + setTimeout(function(){ + event.interval=setInterval(function(){ + var target=event.ai_targets.shift(); + var att=get.attitude(target,player); + var num=2; + if(att>0) num=0; + else if(att<0) num=1; + sendback({index:num},target); + if(_status.connectMode) target.hideTimer(); + if(!event.ai_targets.length){ clearInterval(event.interval); - if (event.withai) game.resume(); + if(event.withai) game.resume(); } - }, 750); - }, 500) + },750); + },500) } 'step 1' - if (event.withme) { - if (_status.connectMode) game.me.unwait(result); - else { - var index = result.index; - game.log(game.me, '选择了', ['#b助力锻造', '#g妨碍锻造', '#b什么都不做'][index]) - if (index > 1) return; - var card = get.cards()[0]; - if (!card) return; - game.log(game.me, '展示了', card); + if(event.withme){ + if(_status.connectMode) game.me.unwait(result); + else{ + var index=result.index; + game.log(game.me,'选择了',['#b助力锻造','#g妨碍锻造','#b什么都不做'][index]) + if(index>1) return; + var card=get.cards()[0]; + if(!card) return; + game.log(game.me,'展示了',card); event.cardsx.push(card); event.cards2[index].push(card); - game.broadcastAll(function (id, card, name, index) { - var dialog = get.idDialog(id); - if (!dialog) return; - var button = ui.create.button(card, 'card', dialog.buttonss[index]); - button.querySelector('.info').innerHTML = (name + '|' + get.strNumber(card.number)); - }, event.videoId, card, function (target) { - if (target._tempTranslate) return target._tempTranslate; - var name = target.name; - if (lib.translate[name + '_ab']) return lib.translate[name + '_ab']; + game.broadcastAll(function(id,card,name,index){ + var dialog=get.idDialog(id); + if(!dialog) return; + var button=ui.create.button(card,'card',dialog.buttonss[index]); + button.querySelector('.info').innerHTML=(name+'|'+get.strNumber(card.number)); + },event.videoId,card,function(target){ + if(target._tempTranslate) return target._tempTranslate; + var name=target.name; + if(lib.translate[name+'_ab']) return lib.translate[name+'_ab']; return get.translation(name); - }(game.me), index); + }(game.me),index); } } 'step 2' - if (event.withol && !event.resultOL) { + if(event.withol&&!event.resultOL){ game.pause(); } 'step 3' - if (event.ai_targets.length > 0) { - event.withai = true; + if(event.ai_targets.length>0){ + event.withai=true; game.pause(); } 'step 4' - game.broadcastAll(function () { - setTimeout(function () { + game.broadcastAll(function(){ + setTimeout(function(){ ui.arena.classList.remove('choose-to-move'); - }, 500); + },500); }) game.delay(2); - var num1 = 0, num2 = 0; - for (var i of event.cards2[0]) num1 += get.number(i, false); - for (var i of event.cards2[1]) num2 += get.number(i, false); - var result = 2; - if (num1 < num2) result = 0; - else if (num2 > 0) result = 1; - event.duanzao_result = result; - game.broadcastAll(function (id, result) { - var dialog = get.idDialog(id); - if (dialog) dialog.content.firstChild.innerHTML = ['锻造失败…', '锻造成功', '完美锻造!'][result]; - }, event.videoId, result) + var num1=0,num2=0; + for(var i of event.cards2[0]) num1+=get.number(i,false); + for(var i of event.cards2[1]) num2+=get.number(i,false); + var result=2; + if(num10) result=1; + event.duanzao_result=result; + game.broadcastAll(function(id,result){ + var dialog=get.idDialog(id); + if(dialog) dialog.content.firstChild.innerHTML=['锻造失败…','锻造成功','完美锻造!'][result]; + },event.videoId,result) 'step 5' game.cardsGotoOrdering(event.cardsx); - game.broadcastAll('closeDialog', event.videoId); + game.broadcastAll('closeDialog',event.videoId); 'step 6' - var subtype = get.subtype(cards[0]); - if (subtype != 'equip1' && subtype != 'equip2') subtype = 'others'; - var card_map = { - equip1: [ - ['diamond', 13, 'bintieshuangji'], - ['diamond', 1, 'wuxinghelingshan'], - ['spade', 13, 'wutiesuolian'], - ['diamond', 12, 'wushuangfangtianji'], - ['spade', 6, 'chixueqingfeng'], - ['spade', 5, 'guilongzhanyuedao'], + var subtype=get.subtype(cards[0]); + if(subtype!='equip1'&&subtype!='equip2') subtype='others'; + var card_map={ + equip1:[ + ['diamond',13,'bintieshuangji'], + ['diamond',1,'wuxinghelingshan'], + ['spade',13,'wutiesuolian'], + ['diamond',12,'wushuangfangtianji'], + ['spade',6,'chixueqingfeng'], + ['spade',5,'guilongzhanyuedao'], ], - equip2: [ - ['club', 1, 'huxinjing'], - ['club', 2, 'heiguangkai'], - ['spade', 2, 'linglongshimandai'], - ['club', 1, 'hongmianbaihuapao'], - ['spade', 2, 'qimenbagua'], - ['spade', 9, 'guofengyupao'], + equip2:[ + ['club',1,'huxinjing'], + ['club',2,'heiguangkai'], + ['spade',2,'linglongshimandai'], + ['club',1,'hongmianbaihuapao'], + ['spade',2,'qimenbagua'], + ['spade',9,'guofengyupao'], ], - others: [ - ['diamond', 1, 'zhaogujing'], - ['spade', 5, 'sanlve'], - ['club', 12, 'tianjitu'], - ['spade', 2, 'taigongyinfu'], - ['diamond', 1, 'shufazijinguan'], - ['club', 4, 'xuwangzhimian'], + others:[ + ['diamond',1,'zhaogujing'], + ['spade',5,'sanlve'], + ['club',12,'tianjitu'], + ['spade',2,'taigongyinfu'], + ['diamond',1,'shufazijinguan'], + ['club',4,'xuwangzhimian'], ], }; - if (!_status.olshengong_map) _status.olshengong_map = {}; - if (!_status.olshengong_maken) _status.olshengong_maken = {}; - var list = card_map[subtype]; - for (var i = 0; i < list.length; i++) { - var name = list[i][2]; - if (!lib.card[name] || _status.olshengong_map[name]) { - list.splice(i--, 1); + if(!_status.olshengong_map) _status.olshengong_map={}; + if(!_status.olshengong_maken) _status.olshengong_maken={}; + var list=card_map[subtype]; + for(var i=0;i 0; + draw:{ + audio:'olshengong', + trigger:{global:'phaseJieshuBegin'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return player.countMark('olshengong_draw')>0; }, - content: function () { + content:function(){ player.draw(player.countMark('olshengong_draw')); }, }, }, }, - olqisi: { - audio: 2, - trigger: { player: 'phaseDrawBegin2' }, - filter: function (event, player) { - return !event.numFixed && event.num > 0; + olqisi:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + filter:function(event,player){ + return !event.numFixed&&event.num>0; }, - check: function (event, player) { - if (player.hasEmptySlot(2) || player.hasEmptySlot(5) || player.hasEmptySlot(1)) return true; + check:function(event,player){ + if(player.hasEmptySlot(2)||player.hasEmptySlot(5)||player.hasEmptySlot(1)) return true; return false; }, - prompt2: '摸牌阶段开始时,你可以少摸一张牌并声明一种装备牌的副类别,然后从牌堆或弃牌堆中获得一张该副类别的牌。', - content: function () { + prompt2:'摸牌阶段开始时,你可以少摸一张牌并声明一种装备牌的副类别,然后从牌堆或弃牌堆中获得一张该副类别的牌。', + content:function(){ 'step 0' - player.chooseControl('equip1', 'equip2', 'equip6', 'equip5').set('prompt', '选择获得一种副类别的装备牌').set('ai', function (card) { - if (player.hasEmptySlot(2)) return 'equip2'; - if (player.hasEmptySlot(5)) return 'equip5'; - if (player.hasEmptySlot(1)) return 'equip1'; + player.chooseControl('equip1','equip2','equip6','equip5').set('prompt','选择获得一种副类别的装备牌').set('ai',function(card){ + if(player.hasEmptySlot(2)) return 'equip2'; + if(player.hasEmptySlot(5)) return 'equip5'; + if(player.hasEmptySlot(1)) return 'equip1'; return 'equip6'; }); 'step 1' - var card = get.cardPile(function (card) { - var type = get.subtype(card); - if (result.control == 'equip6') return (type == 'equip3' || type == 'equip4'); - return type == result.control; + var card=get.cardPile(function(card){ + var type=get.subtype(card); + if(result.control=='equip6') return (type=='equip3'||type=='equip4'); + return type==result.control; }); - if (card) { + if(card){ trigger.num--; - player.gain(card, 'gain2'); + player.gain(card,'gain2'); } }, - group: 'olqisi_init', - subSkill: { - init: { - audio: 'olqisi', - trigger: { - global: 'phaseBefore', - player: 'enterGame', + group:'olqisi_init', + subSkill:{ + init:{ + audio:'olqisi', + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - locked: false, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0); + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); }, - content: function () { + content:function(){ 'step 0' - var i = 0; - var list = []; - while (i++ < 2) { - var card = get.cardPile(function (card) { - if (get.type(card) != 'equip') return false; - return list.length == 0 || get.subtype(card) != get.subtype(list[0]); + var i=0; + var list=[]; + while(i++<2){ + var card=get.cardPile(function(card){ + if(get.type(card)!='equip') return false; + return list.length==0||get.subtype(card)!=get.subtype(list[0]); }); - if (card) list.push(card); + if(card) list.push(card); } - if (!list.length) { event.finish(); return; } - event.list = list; - player.gain(event.list, 'gain2'); + if(!list.length){event.finish();return;} + event.list=list; + player.gain(event.list,'gain2'); 'step 1' game.delay(1); - var card = event.list.shift(); - if (player.getCards('h').includes(card)) { - player.$give(card, player, false) + var card=event.list.shift(); + if(player.getCards('h').includes(card)){ + player.$give(card,player,false) player.equip(card); } - if (event.list.length) event.redo(); + if(event.list.length) event.redo(); }, }, }, }, //蒲元衍生 - zhaogujing_skill: { - equipSkill: true, - trigger: { player: 'phaseUseEnd' }, - direct: true, - filter: function (event, player) { - return player.hasCard(function (card) { - if (_status.connectMode) return true; - var type = get.type(card, player); - return type == 'basic' || type == 'trick'; - }, 'h'); + zhaogujing_skill:{ + equipSkill:true, + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event,player){ + return player.hasCard(function(card){ + if(_status.connectMode) return true; + var type=get.type(card,player); + return type=='basic'||type=='trick'; + },'h'); }, - content: function () { + content:function(){ 'step 0' - player.chooseCard('h', get.prompt('zhaogujing_skill'), '展示并视为使用一张基本牌或普通锦囊牌', function (card, player) { - var type = get.type(card, player); - return type == 'basic' || type == 'trick'; - }).set('ai', function (card) { - var player = _status.event.player, name = get.name(card, player); - if (name == 'jiu') return 0; + player.chooseCard('h',get.prompt('zhaogujing_skill'),'展示并视为使用一张基本牌或普通锦囊牌',function(card,player){ + var type=get.type(card,player); + return type=='basic'||type=='trick'; + }).set('ai',function(card){ + var player=_status.event.player,name=get.name(card,player); + if(name=='jiu') return 0; return player.getUseValue({ - name: name, - nature: get.nature(card, player), - isCard: true, + name:name, + nature:get.nature(card,player), + isCard:true, }) }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('zhaogujing_skill'); - player.showCards(result.cards, get.translation(player) + '发动了【照骨镜】'); - var card = { - name: get.name(result.cards[0], player), - nature: get.nature(result.cards[0], player), - isCard: true, + player.showCards(result.cards,get.translation(player)+'发动了【照骨镜】'); + var card={ + name:get.name(result.cards[0],player), + nature:get.nature(result.cards[0],player), + isCard:true, } - player.chooseUseTarget(card, true, false); + player.chooseUseTarget(card,true,false); } }, }, - sanlve_skill: { - equipSkill: true, - mod: { - maxHandcard: function (player, num) { - return num + 1; + sanlve_skill:{ + equipSkill:true, + mod:{ + maxHandcard:function(player,num){ + return num+1; }, - attackRange: function (player, num) { - return num + 1; + attackRange:function(player,num){ + return num+1; }, - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; }, }, }, - xuwangzhimian: { - equipSkill: true, - trigger: { player: 'phaseDrawBegin2' }, - forced: true, - filter: function (event, player) { + xuwangzhimian:{ + equipSkill:true, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:function(event,player){ return !event.numFixed; }, - content: function () { - trigger.num += 2; + content:function(){ + trigger.num+=2; }, - mod: { - maxHandcard: function (player, num) { - return num - 1; + mod:{ + maxHandcard:function(player,num){ + return num-1; } } }, - shufazijinguan_skill: { - equipSkill: true, - trigger: { - player: "phaseZhunbeiBegin", + shufazijinguan_skill:{ + equipSkill:true, + trigger:{ + player:"phaseZhunbeiBegin", }, - direct: true, - content: function () { + direct:true, + content:function(){ "step 0" - player.chooseTarget(get.prompt('shufazijinguan'), '对一名其他角色造成1点伤害', function (card, player, target) { - return player != target; - }).set('ai', function (target) { - return get.damageEffect(target, player, player); + player.chooseTarget(get.prompt('shufazijinguan'),'对一名其他角色造成1点伤害',function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + return get.damageEffect(target,player,player); }); "step 1" - if (result.bool) { - player.logSkill('shufazijinguan_skill', result.targets[0]); + if(result.bool){ + player.logSkill('shufazijinguan_skill',result.targets[0]); result.targets[0].damage(); } }, }, - qimenbagua: { - equipSkill: true, - trigger: { target: 'useCardToBefore' }, - forced: true, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - if (player.hasSkillTag('unequip2')) return false; - if (event.player.hasSkillTag('unequip', false, { - name: event.card ? event.card.name : null, - target: player, - card: event.card + qimenbagua:{ + equipSkill:true, + trigger:{target:'useCardToBefore'}, + forced:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + 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 true; }, - content: function () { + content:function(){ trigger.cancel(); }, - ai: { - effect: { - target: function (card, player, target) { - if (card.name != 'sha') return; - if (target.hasSkillTag('unequip2') || 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 + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name!='sha') return; + if(target.hasSkillTag('unequip2')||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; return 'zerotarget'; } } } }, - guofengyupao: { - equipSkill: true, - mod: { - targetEnabled: function (card, player, target) { - if (player == target || get.type(card) != 'trick') return; - if (target.hasSkillTag('unequip2')) return; - if (player.hasSkillTag('unequip', false, { - name: card ? card.name : null, - target: player, - card: card + guofengyupao:{ + equipSkill:true, + mod:{ + targetEnabled:function(card,player,target){ + if(player==target||get.type(card)!='trick') return; + if(target.hasSkillTag('unequip2')) return; + if(player.hasSkillTag('unequip',false,{ + name:card?card.name:null, + target:player, + card:card })) return; return false; } } }, - hongmianbaihuapao_skill: { - equipSkill: true, - trigger: { - player: "damageBegin4", + hongmianbaihuapao_skill:{ + equipSkill:true, + trigger:{ + player:"damageBegin4", }, - filter: function (event, player) { - if (!event.hasNature('linked')) return false; - if (player.hasSkillTag('unequip2')) return false; - if (event.source && event.source.hasSkillTag('unequip', false, { - name: event.card ? event.card.name : null, - target: player, - card: event.card + filter:function(event,player){ + if(!event.hasNature('linked')) return false; + if(player.hasSkillTag('unequip2')) return false; + if(event.source&&event.source.hasSkillTag('unequip',false,{ + name:event.card?event.card.name:null, + target:player, + card:event.card })) return false; return true; }, - forced: true, - content: function () { + forced:true, + content:function(){ trigger.cancel(); }, - ai: { - nofire: true, - nothunder: true, - effect: { - target: function (card, player, target, current) { - if (!get.tag(card, 'natureDamage')) return; - if (!target.hasSkillTag('unequip2') && !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 + ai:{ + nofire:true, + nothunder:true, + effect:{ + target:function(card,player,target,current){ + if(!get.tag(card,'natureDamage')) return; + if(!target.hasSkillTag('unequip2')&&!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 'zerotarget'; }, }, }, }, - linglongshimandai_skill: { - equipSkill: true, - trigger: { - target: "useCardToTargeted", + linglongshimandai_skill:{ + equipSkill:true, + trigger:{ + target:"useCardToTargeted", }, - filter: function (event, player) { - if (event.targets && event.targets.length > 1 || event.player == player) return false; - if (player.hasSkillTag('unequip2')) return false; - var evt = event.getParent(); - if (evt.player && evt.player.hasSkillTag('unequip', false, { - name: evt.card ? evt.card.name : null, - target: player, - card: evt.card + filter:function(event,player){ + if(event.targets&&event.targets.length>1||event.player==player) return false; + if(player.hasSkillTag('unequip2')) return false; + var evt=event.getParent(); + if(evt.player&&evt.player.hasSkillTag('unequip',false,{ + name:evt.card?evt.card.name:null, + target:player, + card:evt.card })) return false; return true; }, - audio: true, - check: function (event, player) { - return get.effect(player, event.card, event.player, player) <= 0; + audio:true, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)<=0; }, - prompt2: (event) => ('进行一次判定。若结果为♥,则' + get.translation(event.card) + '对你无效'), - content: function () { + prompt2:(event)=>('进行一次判定。若结果为♥,则'+get.translation(event.card)+'对你无效'), + content:function(){ "step 0" - player.judge('linglongshimandai', function (card) { return (get.suit(card) == 'heart') ? 1.5 : -0.5 }).judge2 = function (result) { - return result.bool ? true : false; + player.judge('linglongshimandai',function(card){return (get.suit(card)=='heart')?1.5:-0.5}).judge2=function(result){ + return result.bool?true:false; }; "step 1" - if (result.judge > 0) { + if(result.judge>0){ trigger.getParent().excluded.add(player); } }, - ai: { - effect: { - target: function (card, player, target, effect) { - if (effect > 0 || 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 + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(effect>0||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; return 0.75; }, }, }, }, - bintieshuangji_skill: { - trigger: { player: 'shaMiss' }, - filter: function (event, player) { - return player.hp > 0; + bintieshuangji_skill:{ + trigger:{player:'shaMiss'}, + filter:function(event,player){ + return player.hp>0; }, - prompt2: function (event, player) { - var prompt = '失去1点体力,然后'; - var cards = event.cards.filterInD(); - if (cards.length) prompt += ('获得' + get.translation(cards) + '、'); - prompt += '摸一张牌、本回合使用【杀】的次数上限+1'; + prompt2:function(event,player){ + var prompt='失去1点体力,然后'; + var cards=event.cards.filterInD(); + if(cards.length) prompt+=('获得'+get.translation(cards)+'、'); + prompt+='摸一张牌、本回合使用【杀】的次数上限+1'; return prompt; }, - check: function (event, player) { - if (get.effect(player, { name: 'losehp' }, player, player) > 0) return true; - return player.hp > event.target.hp && event.cards.filterInD().length > 0; + check:function(event,player){ + if(get.effect(player,{name:'losehp'},player,player)>0) return true; + return player.hp>event.target.hp&&event.cards.filterInD().length>0; }, - content: function () { + content:function(){ 'step 0' player.loseHp(); 'step 1' - var cards = trigger.cards.filterInD(); - if (cards.length) player.gain(cards, 'gain2'); + var cards=trigger.cards.filterInD(); + if(cards.length) player.gain(cards,'gain2'); player.draw(); 'step 2' player.addTempSkill('bintieshuangji_skill_effect'); - player.addMark('bintieshuangji_skill_effect', 1, false); + player.addMark('bintieshuangji_skill_effect',1,false); }, - subSkill: { - effect: { - charlotte: true, - intro: { content: '使用【杀】的次数上限+#' }, - onremove: true, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.countMark('bintieshuangji_skill_effect'); + subSkill:{ + effect:{ + charlotte:true, + intro:{content:'使用【杀】的次数上限+#'}, + onremove:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('bintieshuangji_skill_effect'); }, }, }, }, }, - chixueqingfeng: { - equipSkill: true, - trigger: { player: 'useCardToPlayered' }, - filter: function (event) { - return event.card.name == 'sha'; + chixueqingfeng:{ + equipSkill:true, + trigger:{player:'useCardToPlayered'}, + filter:function(event){ + return event.card.name=='sha'; }, - logTarget: 'target', - forced: true, - content: function () { - var target = trigger.target; + logTarget:'target', + forced:true, + content:function(){ + var target=trigger.target; target.addTempSkill('chixueqingfeng2'); - target.markAuto('chixueqingfeng2', [trigger.card]) + target.markAuto('chixueqingfeng2',[trigger.card]) }, - ai: { - unequip_ai: true, - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - if (arg && arg.card && arg.card.name == 'sha') return true; + ai:{ + unequip_ai:true, + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.card&&arg.card.name=='sha') return true; return false; } } }, - chixueqingfeng2: { - equipSkill: true, - trigger: { global: 'useCardAfter' }, - forced: true, - charlotte: true, - popup: false, - firstDo: true, - onremove: true, - filter: function (event, player) { - return player.storage.chixueqingfeng2 && player.storage.chixueqingfeng2.includes(event.card); + chixueqingfeng2:{ + equipSkill:true, + trigger:{global:'useCardAfter'}, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + onremove:true, + filter:function(event,player){ + return player.storage.chixueqingfeng2&&player.storage.chixueqingfeng2.includes(event.card); }, - content: function () { + content:function(){ player.storage.chixueqingfeng2.remove(trigger.card); - if (!player.storage.chixueqingfeng2.length) player.removeSkill('chixueqingfeng2'); + if(!player.storage.chixueqingfeng2.length) player.removeSkill('chixueqingfeng2'); }, - mark: true, - marktext: '※', - intro: { - content: '防具技能无效,且不能使用或打出手牌', + mark:true, + marktext:'※', + intro:{ + content:'防具技能无效,且不能使用或打出手牌', }, - mod: { - cardEnabled2: function (card) { - if (get.position(card) == 'h') return false; + mod:{ + cardEnabled2:function(card){ + if(get.position(card)=='h') return false; }, }, - ai: { - unequip2: true, + ai:{ + unequip2:true, }, }, - guilongzhanyuedao: { - equipSkill: true, - trigger: { player: 'useCard' }, - forced: true, - filter: function (event, player) { - return event.card && event.card.name == 'sha' && get.color(event.card) == 'red'; + guilongzhanyuedao:{ + equipSkill:true, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'; }, - content: function () { + content:function(){ trigger.directHit.addArray(game.players); }, - ai: { - unequip_ai: true, - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - if (arg && arg.card && arg.card.name == 'sha' && get.color(arg.card) == 'red') return true; + ai:{ + unequip_ai:true, + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.card&&arg.card.name=='sha'&&get.color(arg.card)=='red') return true; return false; } } }, - wushuangfangtianji_skill: { - equipSkill: true, - trigger: { - source: "damageSource", + wushuangfangtianji_skill:{ + equipSkill:true, + trigger:{ + source:"damageSource", }, - filter: function (event, player) { - return event.card && event.card.name == 'sha' && event.getParent().type == 'card'; + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent().type=='card'; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var target = trigger.player; - var choices = ['摸一张牌']; - if (target.hasCard(function (card) { - return lib.filter.canBeDiscarded(card, player, target); - }, 'he')) choices.push('弃置' + get.translation(target) + '的一张牌'); - player.chooseControl('cancel2').set('choiceList', choices).set('prompt', get.prompt('wushuangfangtianji_skill')).set('ai', function () { - var player = _status.event.player, target = _status.event.getTrigger().player; - if (target.hasCard(function (card) { - return lib.filter.canBeDiscarded(card, player, target); - }, 'he') && get.effect(target, { name: 'guohe_copy2' }, player, player) > get.effect(player, { name: 'draw' }, player, player)) return 1; + var target=trigger.player; + var choices=['摸一张牌']; + if(target.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,target); + },'he')) choices.push('弃置'+get.translation(target)+'的一张牌'); + player.chooseControl('cancel2').set('choiceList',choices).set('prompt',get.prompt('wushuangfangtianji_skill')).set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + if(target.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,target); + },'he')&&get.effect(target,{name:'guohe_copy2'},player,player)>get.effect(player,{name:'draw'},player,player)) return 1; return 0; }); 'step 1' - if (result.control == 'cancel2') return; - if (result.index == 0) { + if(result.control=='cancel2') return; + if(result.index==0){ player.logSkill('wushuangfangtianji_skill'); player.draw(); } - else { - var target = trigger.player; - player.logSkill('wushuangfangtianji_skill', target); - player.discardPlayerCard(target, 'he', true); + else{ + var target=trigger.player; + player.logSkill('wushuangfangtianji_skill',target); + player.discardPlayerCard(target,'he',true); } }, }, //芮姬 - qiaoli: { - onChooseToUse: function (event) { - if (event.type == 'phase' && !game.online && !(event.qiaoli_equip1 && event.qiaoli_noequip1)) { - var player = event.player; - var evt = event.getParent('phaseUse'); - if (player.getHistory('useCard', function (evtx) { - return evtx.getParent('phaseUse') == evt && evtx.skill == 'qiaoli' && get.subtype(evtx.cards[0]) == 'equip1'; - }).length) event.set('qiaoli_equip1', true); - if (player.getHistory('useCard', function (evtx) { - return evtx.getParent('phaseUse') == evt && evtx.skill == 'qiaoli' && get.subtype(evtx.cards[0]) != 'equip1'; - }).length) event.set('qiaoli_noequip1', true); + qiaoli:{ + onChooseToUse:function(event){ + if(event.type=='phase'&&!game.online&&!(event.qiaoli_equip1&&event.qiaoli_noequip1)){ + var player=event.player; + var evt=event.getParent('phaseUse'); + if(player.getHistory('useCard',function(evtx){ + return evtx.getParent('phaseUse')==evt&&evtx.skill=='qiaoli'&&get.subtype(evtx.cards[0])=='equip1'; + }).length) event.set('qiaoli_equip1',true); + if(player.getHistory('useCard',function(evtx){ + return evtx.getParent('phaseUse')==evt&&evtx.skill=='qiaoli'&&get.subtype(evtx.cards[0])!='equip1'; + }).length) event.set('qiaoli_noequip1',true); } }, - audio: 2, - enable: 'phaseUse', - viewAs: { - name: 'juedou', - qiaoli: true, + audio:2, + enable:'phaseUse', + viewAs:{ + name:'juedou', + qiaoli:true, }, - filterCard: function (card, player) { - if (get.type(card) != 'equip') return false; - var event = _status.event; - if (get.subtype(card) == 'equip1' && event.qiaoli_equip1) return false; - if (get.subtype(card) != 'equip1' && event.qiaoli_noequip1) return false; + filterCard:function(card,player){ + if(get.type(card)!='equip') return false; + var event=_status.event; + if(get.subtype(card)=='equip1'&&event.qiaoli_equip1) return false; + if(get.subtype(card)!='equip1'&&event.qiaoli_noequip1) return false; return true; }, - viewAsFilter: function (player) { - return player.isPhaseUsing() && player.hasCard(function (card) { - return lib.skill.qiaoli.filterCard(card, player); - }, 'hes'); + viewAsFilter:function(player){ + return player.isPhaseUsing()&&player.hasCard(function(card){ + return lib.skill.qiaoli.filterCard(card,player); + },'hes'); }, - check: function (card) { - if (get.position(card) == 'e') return 7.5 - get.value(card); - return 12 - _status.event.player.getUseValue(card); + check:function(card){ + if(get.position(card)=='e') return 7.5-get.value(card); + return 12-_status.event.player.getUseValue(card); }, - position: 'hes', - precontent: function () { + position:'hes', + precontent:function(){ player.addTempSkill('qiaoli_norespond'); player.addTempSkill('qiaoli_effect'); }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - return arg && arg.card && arg.card.name == 'juedou' && _status.event.skill == 'qiaoli'; + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.card&&arg.card.name=='juedou'&&_status.event.skill=='qiaoli'; }, }, - subSkill: { - norespond: { - charlotte: true, - trigger: { player: 'useCard1' }, - filter: function (event, player) { - return event.card.qiaoli && get.subtype(event.cards[0]) != 'equip1'; + subSkill:{ + norespond:{ + charlotte:true, + trigger:{player:'useCard1'}, + filter:function(event,player){ + return event.card.qiaoli&&get.subtype(event.cards[0])!='equip1'; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ player.addTempSkill('qiaoli_gain'); trigger.directHit.addArray(game.players); - game.log(trigger.card, '不可被响应'); + game.log(trigger.card,'不可被响应'); }, }, - effect: { - charlotte: true, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - return event.card && event.cards && event.card.qiaoli && get.subtype(event.cards[0]) == 'equip1'; + effect:{ + charlotte:true, + trigger:{source:'damageSource'}, + filter:function(event,player){ + return event.card&&event.cards&&event.card.qiaoli&&get.subtype(event.cards[0])=='equip1'; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ 'step 0' - var card = trigger.cards[0]; - var num = 1; - var info = get.info(card, false); - if (info && info.distance && typeof info.distance.attackFrom == 'number') num -= info.distance.attackFrom; + var card=trigger.cards[0]; + var num=1; + var info=get.info(card,false); + if(info&&info.distance&&typeof info.distance.attackFrom=='number') num-=info.distance.attackFrom; player.draw(num); 'step 1' - var cards = result; - if (get.itemtype(cards) != 'cards') { + var cards=result; + if(get.itemtype(cards)!='cards'){ event.finish(5); return; } - var hs = player.getCards('h'); - cards = cards.filter(function (card) { + var hs=player.getCards('h'); + cards=cards.filter(function(card){ return hs.includes(card); }); - if (!cards.length) { + if(!cards.length){ event.finish(5); return; } - event.cards = cards; - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; + event.cards=cards; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; 'step 2' player.chooseCardTarget({ - filterCard: function (card) { - return _status.event.cards.includes(card) && !card.hasGaintag('qiaoli_given'); + filterCard:function(card){ + return _status.event.cards.includes(card)&&!card.hasGaintag('qiaoli_given'); }, - cards: cards, - filterTarget: lib.filter.notMe, - selectCard: [1, cards.length], - prompt: '是否将获得的牌分配给其他角色?', - ai1: function (card) { + cards:cards, + filterTarget:lib.filter.notMe, + selectCard:[1,cards.length], + prompt:'是否将获得的牌分配给其他角色?', + ai1:function(card){ return -1; }, - ai2: function (target) { + ai2:function(target){ return -1; }, }); 'step 3' - if (result.bool) { - var res = result.cards, target = result.targets[0].playerid; - player.addGaintag(res, 'qiaoli_given'); + if(result.bool){ + var res=result.cards,target=result.targets[0].playerid; + player.addGaintag(res,'qiaoli_given'); cards.removeArray(res); - if (!event.given_map[target]) event.given_map[target] = []; + if(!event.given_map[target]) event.given_map[target]=[]; event.given_map[target].addArray(res); - if (cards.length) event.goto(2); + if(cards.length) event.goto(2); } 'step 4' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown}); game.stopCountChoose(); } - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - player.line(source, 'green'); - source.gain(event.given_map[i], player, 'giveAuto'); + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + source.gain(event.given_map[i],player,'giveAuto'); } - event.next.sort(function (a, b) { - return lib.sort.seat(a.player, b.player); + event.next.sort(function(a,b){ + return lib.sort.seat(a.player,b.player); }); }, }, - gain: { - charlotte: true, - audio: 'qiaoli', - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - content: function () { - var card = get.cardPile2(function (card) { - return get.type(card) == 'equip'; + gain:{ + charlotte:true, + audio:'qiaoli', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + var card=get.cardPile2(function(card){ + return get.type(card)=='equip'; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); }, }, }, }, - qingliang: { - audio: 2, - trigger: { target: 'useCardToTarget' }, - filter: function (event, player) { - if (event.targets.length != 1) return false; - var bool1 = (event.card.name == 'sha'); - var bool2 = (get.type2(event.card) == 'trick' && get.tag(event.card, 'damage')); - if (!bool1 && !bool2) return false; - return player != event.player && player.countCards('h') > 0; + qingliang:{ + audio:2, + trigger:{target:'useCardToTarget'}, + filter:function(event,player){ + if(event.targets.length!=1) return false; + var bool1=(event.card.name=='sha'); + var bool2=(get.type2(event.card)=='trick'&&get.tag(event.card,'damage')); + if(!bool1&&!bool2) return false; + return player!=event.player&&player.countCards('h')>0; }, - usable: 1, - logTarget: 'player', - check: function (event, player) { - if (get.attitude(player, event.player) > 0 || event.player.hasSkillTag('nogain')) return true; - var eff = get.effect(player, event.card, event.player, player); - if (eff >= 0) return false; - var suits = [], banned = [], hs = player.getCards('h'); - for (var i of hs) { - var suit = get.suit(i, player); + usable:1, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>0||event.player.hasSkillTag('nogain')) return true; + var eff=get.effect(player,event.card,event.player,player); + if(eff>=0) return false; + var suits=[],banned=[],hs=player.getCards('h'); + for(var i of hs){ + var suit=get.suit(i,player); suits.add(suit); - if (!lib.filter.cardDiscardable(i, player, 'qingliang')) banned.add(suit); + if(!lib.filter.cardDiscardable(i,player,'qingliang')) banned.add(suit); } suits.removeArray(banned); - for (var i of suits) { - var cards = player.getCards('h', function (card) { - return get.suit(card, player) == i; + for(var i of suits){ + var cards=player.getCards('h',function(card){ + return get.suit(card,player)==i; }); - if ((-eff / 2 - get.value(cards, player)) > 0) return true; + if((-eff/2-get.value(cards,player))>0) return true; } return false; }, - content: function () { + content:function(){ 'step 0' - player.showHandcards(get.translation(player) + '发动了【清靓】'); + player.showHandcards(get.translation(player)+'发动了【清靓】'); 'step 1' - var suits = [], banned = [], hs = player.getCards('h'); - for (var i of hs) { - var suit = get.suit(i, player); + var suits=[],banned=[],hs=player.getCards('h'); + for(var i of hs){ + var suit=get.suit(i,player); suits.add(suit); - if (!lib.filter.cardDiscardable(i, player, 'qingliang')) banned.add(suit); + if(!lib.filter.cardDiscardable(i,player,'qingliang')) banned.add(suit); } - if (suits.length > banned.length) { - player.chooseControl().set('choiceList', [ - '和' + get.translation(trigger.player) + '各摸一张牌', - '弃置一种花色的所有手牌,令' + get.translation(trigger.card) + '对自己无效', - ]).set('ai', function () { - var player = _status.event.player, event = _status.event.getTrigger(); - if (get.attitude(player, event.player) > 0 || event.player.hasSkillTag('nogain')) return 0; + if(suits.length>banned.length){ + player.chooseControl().set('choiceList',[ + '和'+get.translation(trigger.player)+'各摸一张牌', + '弃置一种花色的所有手牌,令'+get.translation(trigger.card)+'对自己无效', + ]).set('ai',function(){ + var player=_status.event.player,event=_status.event.getTrigger(); + if(get.attitude(player,event.player)>0||event.player.hasSkillTag('nogain')) return 0; return 1; }); - event.suits = suits; + event.suits=suits; suits.removeArray(banned); suits.sort(); } - else { - event._result = { index: 0 }; + else{ + event._result={index:0}; } 'step 2' - if (result.index == 0) { - var list = [player, trigger.player].sortBySeat(); + if(result.index==0){ + var list=[player,trigger.player].sortBySeat(); list[0].draw('nodelay'); list[1].draw(); event.finish(); } - else { - if (event.suits.length == 1) event._result = { control: event.suits[0] }; - else player.chooseControl(event.suits).set('prompt', '选择弃置一种花色的所有牌').set('ai', function () { - var player = _status.event.player, list = _status.event.controls.slice(0); - var gett = function (suit) { - var cards = player.getCards('h', function (card) { - return get.suit(card, player) == suit; + else{ + if(event.suits.length==1) event._result={control:event.suits[0]}; + else player.chooseControl(event.suits).set('prompt','选择弃置一种花色的所有牌').set('ai',function(){ + var player=_status.event.player,list=_status.event.controls.slice(0); + var gett=function(suit){ + var cards=player.getCards('h',function(card){ + return get.suit(card,player)==suit; }); return get.value(cards); } - return list.sort(function (b, a) { - return gett(b) - gett(a); + return list.sort(function(b,a){ + return gett(b)-gett(a); })[0]; }); } 'step 3' - var cards = player.getCards('h', function (card) { - return get.suit(card) == result.control; + var cards=player.getCards('h',function(card){ + return get.suit(card)==result.control; }); - if (cards.length) player.discard(cards); + if(cards.length) player.discard(cards); trigger.targets.remove(player); trigger.getParent().triggeredTargets2.remove(player); trigger.untrigger(); }, }, //卫兹 - yuanzi: { - audio: 2, - trigger: { global: 'phaseZhunbeiBegin' }, - logTarget: 'player', - filter: function (event, player) { - return player != event.player && event.player.isIn() && player.countCards('h') > 0 && !player.hasSkill('yuanzi_round', null, null, false); + yuanzi:{ + audio:2, + trigger:{global:'phaseZhunbeiBegin'}, + logTarget:'player', + filter:function(event,player){ + return player!=event.player&&event.player.isIn()&&player.countCards('h')>0&&!player.hasSkill('yuanzi_round',null,null,false); }, - check: function (event, player) { - if (event.player.hasJudge('lebu') || get.attitude(player, event.player) < 2) return false; - return game.hasPlayer(function (current) { - return current !== player && current !== event.player && event.player.inRange(current) && get.attitude(event.player, current) < 0; + check:function(event,player){ + if(event.player.hasJudge('lebu')||get.attitude(player,event.player)<2) return false; + return game.hasPlayer(function(current){ + return current!==player&¤t!==event.player&&event.player.inRange(current)&&get.attitude(event.player,current)<0; }); }, - content: function () { - var cards = player.getCards('h'); - player.give(cards, trigger.player); + content:function(){ + var cards=player.getCards('h'); + player.give(cards,trigger.player); player.addTempSkill('yuanzi_effect'); - player.addTempSkill('yuanzi_round', 'roundStart'); + player.addTempSkill('yuanzi_round','roundStart'); }, - subSkill: { - effect: { - charlotte: true, - audio: 'yuanzi', - trigger: { global: 'damageSource' }, - forced: true, - filter: function (event, player) { - var source = event.source; - return source && source == _status.currentPhase && player.countCards('h') <= source.countCards('h'); + subSkill:{ + effect:{ + charlotte:true, + audio:'yuanzi', + trigger:{global:'damageSource'}, + forced:true, + filter:function(event,player){ + var source=event.source; + return source&&source==_status.currentPhase&&player.countCards('h')<=source.countCards('h'); }, - content: function () { + content:function(){ player.draw(2); }, }, - round: { charlotte: true }, + round:{charlotte:true}, }, }, - liejie: { - audio: 2, - trigger: { player: 'damageEnd' }, - direct: true, - filter: function (event, player) { - return player.countCards('he') > 0; + liejie:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; }, - content: function () { + content:function(){ 'step 0' - var source = trigger.source; - var prompt2 = '弃置至多三张牌并摸等量的牌'; - if (source) prompt2 += (',若弃置的牌中有红色牌,则弃置' + get.translation(source) + '至多等量的牌'); - var next = player.chooseToDiscard('he', [1, 3], get.prompt('liejie'), prompt2); - next.set('ai', function (card) { - return 6 - get.value(card); + var source=trigger.source; + var prompt2='弃置至多三张牌并摸等量的牌'; + if(source) prompt2+=(',若弃置的牌中有红色牌,则弃置'+get.translation(source)+'至多等量的牌'); + var next=player.chooseToDiscard('he',[1,3],get.prompt('liejie'),prompt2); + next.set('ai',function(card){ + return 6-get.value(card); }) - if (source) next.logSkill = ['liejie', source]; - else next.logSkill = 'liejie'; + if(source) next.logSkill=['liejie',source]; + else next.logSkill='liejie'; 'step 1' - if (result.bool) { - var cards = result.cards; + if(result.bool){ + var cards=result.cards; player.draw(cards.length); - if (trigger.source) { - var num = cards.filter(function (i) { - return get.color(i, player) == 'red'; + if(trigger.source){ + var num=cards.filter(function(i){ + return get.color(i,player)=='red'; }).length; - if (num > 0) player.discardPlayerCard(trigger.source, 'he', [1, num]).set('forceAuto', true); + if(num>0) player.discardPlayerCard(trigger.source,'he',[1,num]).set('forceAuto',true); } } }, }, //滕芳兰 - luochong: { - audio: 2, - trigger: { player: ['phaseZhunbeiBegin', 'damageEnd'] }, - direct: true, - filter: function (event, player) { - if (event.name == 'damage') { - var history = player.getHistory('damage'); - if (history.indexOf(event) != 0) return false; + luochong:{ + audio:2, + trigger:{player:['phaseZhunbeiBegin','damageEnd']}, + direct:true, + filter:function(event,player){ + if(event.name=='damage'){ + var history=player.getHistory('damage'); + if(history.indexOf(event)!=0) return false; } - var storage1 = player.storage.luochong_round, storage2 = player.getStorage('luochong'); - if (!storage1) storage1 = [[], []]; - for (var i = 0; i < 4; i++) { - if (!storage1[0].includes(i) && !storage2.includes(i) && game.hasPlayer(function (current) { - return !storage1[1].includes(current) && lib.skill.luochong.filterx[i](current); + var storage1=player.storage.luochong_round,storage2=player.getStorage('luochong'); + if(!storage1) storage1=[[],[]]; + for(var i=0;i<4;i++){ + if(!storage1[0].includes(i)&&!storage2.includes(i)&&game.hasPlayer(function(current){ + return !storage1[1].includes(current)&&lib.skill.luochong.filterx[i](current); })) return true; } return false; }, - filterx: [ - (target) => target.isDamaged(), - () => true, - (target) => target.countCards('he') > 0, - () => true, + filterx:[ + (target)=>target.isDamaged(), + ()=>true, + (target)=>target.countCards('he')>0, + ()=>true, ], - onremove: true, - content: function () { + onremove:true, + content:function(){ 'step 0' - var list = []; - var choiceList = [ + var list=[]; + var choiceList=[ '令一名角色回复1点体力。', '令一名角色失去1点体力。', '令一名角色弃置两张牌。', '令一名角色摸两张牌。', ]; - var storage1 = player.storage.luochong_round, storage2 = player.getStorage('luochong'); - if (!storage1) storage1 = [[], []]; - for (var i = 0; i < 4; i++) { - if (storage2.includes(i)) { - choiceList[i] = ('' + choiceList[i] + ''); + var storage1=player.storage.luochong_round,storage2=player.getStorage('luochong'); + if(!storage1) storage1=[[],[]]; + for(var i=0;i<4;i++){ + if(storage2.includes(i)){ + choiceList[i]=(''+choiceList[i]+''); } - else if (storage1[0].includes(i) || !game.hasPlayer(function (current) { - return !storage1[1].includes(current) && lib.skill.luochong.filterx[i](current); - })) { - choiceList[i] = ('' + choiceList[i] + ''); + else if(storage1[0].includes(i)||!game.hasPlayer(function(current){ + return !storage1[1].includes(current)&&lib.skill.luochong.filterx[i](current); + })){ + choiceList[i]=(''+choiceList[i]+''); } - else list.push('选项' + get.cnNumber(i + 1, true)) + else list.push('选项'+get.cnNumber(i+1,true)) } list.push('cancel2'); - player.chooseControl(list).set('prompt', get.prompt('luochong')).set('choiceList', choiceList).set('ai', function () { - var player = _status.event.player; - var list = _status.event.controls.slice(0); - var listx = (player.storage.luochong_round || [[], []])[1]; - var gett = function (choice) { - if (choice == 'cancel2') return 0.1; - var max = 0, func = { - 选项一: function (current) { - if (current.isDamaged()) max = Math.max(max, get.recoverEffect(current, player, player)); + player.chooseControl(list).set('prompt',get.prompt('luochong')).set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player; + var list=_status.event.controls.slice(0); + var listx=(player.storage.luochong_round||[[],[]])[1]; + var gett=function(choice){ + if(choice=='cancel2') return 0.1; + var max=0,func={ + 选项一:function(current){ + if(current.isDamaged()) max=Math.max(max,get.recoverEffect(current,player,player)); }, - 选项二: function (target) { - max = Math.max(max, get.effect(target, { name: 'losehp' }, player, player)); + 选项二:function(target){ + max=Math.max(max,get.effect(target,{name:'losehp'},player,player)); }, - 选项三: function (target) { - var num = target.countDiscardableCards(player, 'he'); - if (num > 0) max = Math.max(max, Math.sqrt(Math.min(2, num)) * get.effect(target, { name: 'guohe_copy2' }, player, player)); + 选项三:function(target){ + var num=target.countDiscardableCards(player,'he'); + if(num>0) max=Math.max(max,Math.sqrt(Math.min(2,num))*get.effect(target,{name:'guohe_copy2'},player,player)); }, - 选项四: function (target) { - max = Math.max(max, 2 * get.effect(target, { name: 'draw' }, player, player)); + 选项四:function(target){ + max=Math.max(max,2*get.effect(target,{name:'draw'},player,player)); }, }[choice]; - game.countPlayer(function (current) { - if (!listx.includes(current)) func(current); + game.countPlayer(function(current){ + if(!listx.includes(current)) func(current); }); return max; }; - return list.sort(function (a, b) { - return gett(b) - gett(a); + return list.sort(function(a,b){ + return gett(b)-gett(a); })[0]; }); 'step 1' - if (result.control != 'cancel2') { - var index = ['选项一', '选项二', '选项三', '选项四'].indexOf(result.control); - event.index = index; - var listx = (player.storage.luochong_round || [[], []])[1]; - var list = [ - ['选择一名角色,令其回复1点体力', function (target) { - var player = _status.event.player; - return get.recoverEffect(target, player, player); + if(result.control!='cancel2'){ + var index=['选项一','选项二','选项三','选项四'].indexOf(result.control); + event.index=index; + var listx=(player.storage.luochong_round||[[],[]])[1]; + var list=[ + ['选择一名角色,令其回复1点体力',function(target){ + var player=_status.event.player; + return get.recoverEffect(target,player,player); }], - ['选择一名角色,令其失去1点体力', function (target) { - return get.effect(target, { name: 'losehp' }, player, player); + ['选择一名角色,令其失去1点体力',function(target){ + return get.effect(target,{name:'losehp'},player,player); }], - ['选择一名角色,令其弃置两张牌', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'guohe_copy2' }, player, player) * Math.sqrt(Math.min(2, target.countCards('he'))); + ['选择一名角色,令其弃置两张牌',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe_copy2'},player,player)*Math.sqrt(Math.min(2,target.countCards('he'))); }], - ['选择一名角色,令其摸两张牌', function (target) { - var player = _status.event.player; - return 2 * get.effect(target, { name: 'draw' }, player, player); + ['选择一名角色,令其摸两张牌',function(target){ + var player=_status.event.player; + return 2*get.effect(target,{name:'draw'},player,player); }] ][index]; - var targets = game.filterPlayer(function (current) { - return !listx.includes(current) && lib.skill.luochong.filterx[event.index](current); + var targets=game.filterPlayer(function(current){ + return !listx.includes(current)&&lib.skill.luochong.filterx[event.index](current); }) - var next = player.chooseTarget(list[0], true, function (card, player, target) { + var next=player.chooseTarget(list[0],true,function(card,player,target){ return _status.event.targets.includes(target); }); - next.set('targets', targets); - next.set('ai', list[1]); + next.set('targets',targets); + next.set('ai',list[1]); } else event.finish(); 'step 2' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('luochong', target); - if (player != target) player.addExpose(0.2); - player.addTempSkill('luochong_round', 'roundStart'); - if (!player.storage.luochong_round) player.storage.luochong_round = [[], []]; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('luochong',target); + if(player!=target) player.addExpose(0.2); + player.addTempSkill('luochong_round','roundStart'); + if(!player.storage.luochong_round) player.storage.luochong_round=[[],[]]; player.storage.luochong_round[0].push(event.index); player.storage.luochong_round[1].push(target); - switch (event.index) { + switch(event.index){ case 0: target.recover(); break; @@ -10207,7 +10208,7 @@ game.import('character', function (lib, game, ui, get, ai, _status) { target.loseHp(); break; case 2: - target.chooseToDiscard(true, 'he', 2); + target.chooseToDiscard(true,'he',2); break; case 3: target.draw(2); @@ -10215,166 +10216,166 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - subSkill: { - round: { - charlotte: true, - onremove: true, + subSkill:{ + round:{ + charlotte:true, + onremove:true, }, }, }, - aichen: { - audio: 2, - trigger: { player: 'dying' }, - forced: true, - filter: function (event, player) { - return player.hasSkill('luochong', null, null, false) && player.getStorage('luochong').length < 3; + aichen:{ + audio:2, + trigger:{player:'dying'}, + forced:true, + filter:function(event,player){ + return player.hasSkill('luochong',null,null,false)&&player.getStorage('luochong').length<3; }, - content: function () { + content:function(){ 'step 0' //var num=1-player.hp; //if(num>0) player.recover(num); - var list = []; - var choiceList = [ + var list=[]; + var choiceList=[ '令一名角色回复1点体力。', '令一名角色失去1点体力。', '令一名角色弃置两张牌。', '令一名角色摸两张牌。', ]; - var storage2 = player.getStorage('luochong'); - for (var i = 0; i < 4; i++) { - if (storage2.includes(i)) { - choiceList[i] = ('' + choiceList[i] + ''); + var storage2=player.getStorage('luochong'); + for(var i=0;i<4;i++){ + if(storage2.includes(i)){ + choiceList[i]=(''+choiceList[i]+''); } - else list.push('选项' + get.cnNumber(i + 1, true)) + else list.push('选项'+get.cnNumber(i+1,true)) } - player.chooseControl(list).set('prompt', '哀尘:选择移去一个〖落宠〗的选项').set('choiceList', choiceList).set('ai', function () { - var controls = _status.event.controls.slice(0); - var list = ['选项三', '选项四', '选项二', '选项一']; - for (var i of list) { - if (controls.includes(i)) return i; + player.chooseControl(list).set('prompt','哀尘:选择移去一个〖落宠〗的选项').set('choiceList',choiceList).set('ai',function(){ + var controls=_status.event.controls.slice(0); + var list=['选项三','选项四','选项二','选项一']; + for(var i of list){ + if(controls.includes(i)) return i; } return 0; }); 'step 1' - var index = ['选项一', '选项二', '选项三', '选项四'].indexOf(result.control); - player.markAuto('luochong', [index]); - game.log(player, '移去了', '#g【落宠】', '的', '#y' + [ + var index=['选项一','选项二','选项三','选项四'].indexOf(result.control); + player.markAuto('luochong',[index]); + game.log(player,'移去了','#g【落宠】','的','#y'+[ '令一名角色回复1点体力', '令一名角色失去1点体力', '令一名角色弃置两张牌', '令一名角色摸两张牌', - ][index], '的选项'); + ][index],'的选项'); }, }, //SP孟获 - spmanwang: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return player.countCards('he') > 0; + spmanwang:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he')>0; }, - filterCard: true, - position: 'he', - selectCard: [1, Infinity], - check: function (card) { - var player = _status.event.player; - var max = Math.min(player.isDamaged() ? 3 : 2, 4 - player.countMark('spmanwang')); - if (!max && !player.hasSkill('sppanqin')) return 0; - if (max == 0 && ui.selected.length > 0) return 0; - return 7 - ui.selected.cards.length - get.value(card); + filterCard:true, + position:'he', + selectCard:[1,Infinity], + check:function(card){ + var player=_status.event.player; + var max=Math.min(player.isDamaged()?3:2,4-player.countMark('spmanwang')); + if(!max&&!player.hasSkill('sppanqin')) return 0; + if(max==0&&ui.selected.length>0) return 0; + return 7-ui.selected.cards.length-get.value(card); }, - content: function () { - var num = Math.min(cards.length, 4 - player.countMark('spmanwang')); - if (num >= 1) player.addSkills('sppanqin'); - if (num >= 2) player.draw(); - if (num >= 3) player.recover(); - if (num >= 4) { + content:function(){ + var num=Math.min(cards.length,4-player.countMark('spmanwang')); + if(num>=1) player.addSkills('sppanqin'); + if(num>=2) player.draw(); + if(num>=3) player.recover(); + if(num>=4){ player.draw(2); player.removeSkills('sppanqin'); } }, - intro: { content: '已经移去过#个选项' }, - ai: { - order: 2, - result: { - player: function (player, target) { - if (player.getUseValue({ name: 'nanman' }) <= 0) return 0; - if (player.getStat('skill').spmanwang && player.hasSkill('sppanqin')) return 0; + intro:{content:'已经移去过#个选项'}, + ai:{ + order:2, + result:{ + player:function(player,target){ + if(player.getUseValue({name:'nanman'})<=0) return 0; + if(player.getStat('skill').spmanwang&&player.hasSkill('sppanqin')) return 0; return 1; }, }, }, - derivation: 'sppanqin', + derivation:'sppanqin', }, - sppanqin: { - audio: 2, - trigger: { player: ['phaseUseEnd', 'phaseDiscardEnd'] }, - filter: function (event, player) { - var cards = [], bool = true; - player.getHistory('lose', function (evt) { - if (!bool || evt.type != 'discard' || evt.getParent(event.name) != event) return false; - for (var i of evt.cards2) { - if (get.position(i, true) == 'd') { + sppanqin:{ + audio:2, + trigger:{player:['phaseUseEnd','phaseDiscardEnd']}, + filter:function(event,player){ + var cards=[],bool=true; + player.getHistory('lose',function(evt){ + if(!bool||evt.type!='discard'||evt.getParent(event.name)!=event) return false; + for(var i of evt.cards2){ + if(get.position(i,true)=='d'){ cards.add(i); - if (!game.checkMod(i, player, 'unchanged', 'cardEnabled2', player)) bool = false; + if(!game.checkMod(i,player,'unchanged','cardEnabled2',player)) bool=false; } } }); - if (!bool || !cards.length) return false; - return player.hasUseTarget(get.autoViewAs({ name: 'nanman' }, cards)); + if(!bool||!cards.length) return false; + return player.hasUseTarget(get.autoViewAs({name:'nanman'},cards)); }, - prompt2: function (event, player) { - var cards = []; - player.getHistory('lose', function (evt) { - if (evt.type != 'discard' || evt.getParent(event.name) != event) return false; - for (var i of evt.cards2) { - if (get.position(i, true) == 'd') { + prompt2:function(event,player){ + var cards=[]; + player.getHistory('lose',function(evt){ + if(evt.type!='discard'||evt.getParent(event.name)!=event) return false; + for(var i of evt.cards2){ + if(get.position(i,true)=='d'){ cards.add(i); } } }); - return '将' + get.translation(cards) + '(共计' + get.cnNumber(cards.length) + '张牌)当做【南蛮入侵】使用' + return '将'+get.translation(cards)+'(共计'+get.cnNumber(cards.length)+'张牌)当做【南蛮入侵】使用' }, - check: function (event, player) { - var cards = [], bool = true; - player.getHistory('lose', function (evt) { - if (!bool || evt.type != 'discard' || evt.getParent(event.name) != event) return false; - for (var i of evt.cards2) { - if (get.position(i, true) == 'd') { + check:function(event,player){ + var cards=[],bool=true; + player.getHistory('lose',function(evt){ + if(!bool||evt.type!='discard'||evt.getParent(event.name)!=event) return false; + for(var i of evt.cards2){ + if(get.position(i,true)=='d'){ cards.add(i); - if (!game.checkMod(i, player, 'unchanged', 'cardEnabled2', player)) bool = false; + if(!game.checkMod(i,player,'unchanged','cardEnabled2',player)) bool=false; } } }); - if (!bool || !cards.length) return false; - return player.hasValueTarget(get.autoViewAs({ name: 'nanman' }, cards)); + if(!bool||!cards.length) return false; + return player.hasValueTarget(get.autoViewAs({name:'nanman'},cards)); }, - content: function () { + content:function(){ 'step 0' - var cards = []; - player.getHistory('lose', function (evt) { - if (evt.type != 'discard' || evt.getParent(trigger.name) != trigger) return false; - for (var i of evt.cards2) { - if (get.position(i, true) == 'd') { + var cards=[]; + player.getHistory('lose',function(evt){ + if(evt.type!='discard'||evt.getParent(trigger.name)!=trigger) return false; + for(var i of evt.cards2){ + if(get.position(i,true)=='d'){ cards.add(i); } } }); - player.chooseUseTarget(true, { name: 'nanman' }, cards); + player.chooseUseTarget(true,{name:'nanman'},cards); player.addTempSkill('sppanqin_eff'); }, - subSkill: { - eff: { - trigger: { player: 'useCard' }, - charlotte: true, - forced: true, - popup: false, - filter: function (event, player) { - return event.card.name == 'nanman' && event.getParent(2).name == 'sppanqin' && player.countMark('spmanwang') < 4 && player.hasSkill('spmanwang', null, null, false) && event.cards.length <= event.targets.length; + subSkill:{ + eff:{ + trigger:{player:'useCard'}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player){ + return event.card.name=='nanman'&&event.getParent(2).name=='sppanqin'&&player.countMark('spmanwang')<4&&player.hasSkill('spmanwang',null,null,false)&&event.cards.length<=event.targets.length; }, - content: function () { - player.addMark('spmanwang', 1, false); - switch (player.countMark('spmanwang')) { + content:function(){ + player.addMark('spmanwang',1,false); + switch(player.countMark('spmanwang')){ case 1: player.draw(2); player.removeSkills('sppanqin'); @@ -10394,950 +10395,950 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //清河公主 - zengou: { - audio: 2, - trigger: { global: 'useCard' }, - filter: function (event, player) { - return event.card.name == 'shan' && player.inRange(event.player) && (player.hp > 0 || player.hasCard(function (card) { - return get.type(card) != 'basic' && lib.filter.cardDiscardable(card, player, 'zengou'); - }, 'eh')) + zengou:{ + audio:2, + trigger:{global:'useCard'}, + filter:function(event,player){ + return event.card.name=='shan'&&player.inRange(event.player)&&(player.hp>0||player.hasCard(function(card){ + return get.type(card)!='basic'&&lib.filter.cardDiscardable(card,player,'zengou'); + },'eh')) }, - logTarget: 'player', - check: function (event, player) { - if (get.attitude(player, event.player) >= 0) return false; - if (get.damageEffect(event.player, event.getParent(3).player, player, get.nature(event.card)) <= 0) return false; - if (player.hasCard(function (card) { - return get.type(card) != 'basic' && get.value(card) < 7 && lib.filter.cardDiscardable(card, player, 'zengou'); - }, 'eh')) return true; - return player.hp > Math.max(1, event.player.hp); + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(get.damageEffect(event.player,event.getParent(3).player,player,get.nature(event.card))<=0) return false; + if(player.hasCard(function(card){ + return get.type(card)!='basic'&&get.value(card)<7&&lib.filter.cardDiscardable(card,player,'zengou'); + },'eh')) return true; + return player.hp>Math.max(1,event.player.hp); }, - content: function () { + content:function(){ 'step 0' - trigger.all_excluded = true; - var str = '弃置一张非基本牌'; - if (player.hp > 0) str += ',或点「取消」失去1点体力'; - var next = player.chooseToDiscard(str, function (card) { - return get.type(card) != 'basic'; - }, 'he').set('ai', function (card) { - return 7 - get.value(card); + trigger.all_excluded=true; + var str='弃置一张非基本牌'; + if(player.hp>0) str+=',或点「取消」失去1点体力'; + var next=player.chooseToDiscard(str,function(card){ + return get.type(card)!='basic'; + },'he').set('ai',function(card){ + return 7-get.value(card); }); - if (player.hp <= 0) next.set('forced', true); + if(player.hp<=0) next.set('forced',true); 'step 1' - if (!result.bool) player.loseHp(); + if(!result.bool) player.loseHp(); 'step 2' - var cards = trigger.cards.filterInD(); - if (cards.length) player.gain(cards, 'gain2'); + var cards=trigger.cards.filterInD(); + if(cards.length) player.gain(cards,'gain2'); }, }, - qhzhangji: { - audio: 2, - trigger: { global: 'phaseJieshuBegin' }, - direct: true, - filter: function (event, player) { - if (!event.player.isIn()) return false; - if (player.getHistory('sourceDamage').length > 0) return true; - if (player.getHistory('damage').length > 0) return event.player.countCards('he') > 0; + qhzhangji:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + if(!event.player.isIn()) return false; + if(player.getHistory('sourceDamage').length>0) return true; + if(player.getHistory('damage').length>0) return event.player.countCards('he')>0; return false; }, - content: function () { + content:function(){ 'step 0' - event.target = trigger.player; - if (player.getHistory('sourceDamage').length) player.chooseBool(get.prompt('qhzhangji', event.target), '令' + get.translation(event.target) + '摸两张牌').set('choice', get.attitude(player, event.target) > 0).set('ai', () => _status.event.choice); + event.target=trigger.player; + if(player.getHistory('sourceDamage').length) player.chooseBool(get.prompt('qhzhangji',event.target),'令'+get.translation(event.target)+'摸两张牌').set('choice',get.attitude(player,event.target)>0).set('ai',()=>_status.event.choice); else event.goto(2); 'step 1' - if (result.bool) { - player.logSkill('qhzhangji', target); - event.logged = true; + if(result.bool){ + player.logSkill('qhzhangji',target); + event.logged=true; target.draw(2); } 'step 2' - if (target.isIn() && target.countCards('he') > 0 && player.getHistory('damage').length > 0) player.chooseBool(get.prompt('qhzhangji', event.target), '令' + get.translation(event.target) + '弃置两张牌').set('choice', get.attitude(player, event.target) < 0).set('ai', () => _status.event.choice); + if(target.isIn()&&target.countCards('he')>0&&player.getHistory('damage').length>0) player.chooseBool(get.prompt('qhzhangji',event.target),'令'+get.translation(event.target)+'弃置两张牌').set('choice',get.attitude(player,event.target)<0).set('ai',()=>_status.event.choice); else event.finish(); 'step 3' - if (result.bool) { - if (!event.logged) player.logSkill('qhzhangji', target); - target.chooseToDiscard('he', true, 2); + if(result.bool){ + if(!event.logged) player.logSkill('qhzhangji',target); + target.chooseToDiscard('he',true,2); } }, }, //十周年夏侯霸 - rebaobian: { - audio: 2, - trigger: { player: 'damageEnd' }, - filter: function (event, player) { - for (var i of lib.skill.rebaobian.derivation) { - if (!player.hasSkill(i, null, null, false)) return true; + rebaobian:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + for(var i of lib.skill.rebaobian.derivation){ + if(!player.hasSkill(i,null,null,false)) return true; } return false; }, - forced: true, - content: function () { - for (var i of lib.skill.rebaobian.derivation) { - if (!player.hasSkill(i, null, null, false)) { + forced:true, + content:function(){ + for(var i of lib.skill.rebaobian.derivation){ + if(!player.hasSkill(i,null,null,false)){ player.addSkills(i); break; } } }, - ai: { - maixie: true, - effect: { - target: function (card, player, target) { - if (get.tag(card, 'damage') && !target.hasSkill('oltiaoxin', null, null, false)) { - if (!target.hasFriend()) return; - if (target.hp >= 4) return [0, 1]; + ai:{ + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&!target.hasSkill('oltiaoxin',null,null,false)){ + if(!target.hasFriend()) return; + if(target.hp>=4) return [0,1]; } } } }, - derivation: ['tiaoxin', 'new_repaoxiao', 'xinshensu'], + derivation:['tiaoxin','new_repaoxiao','xinshensu'], }, //范强张达 - yuanchou: { - audio: 2, - trigger: { - player: 'useCardToPlayered', - target: 'useCardToTargeted', + yuanchou:{ + audio:2, + trigger:{ + player:'useCardToPlayered', + target:'useCardToTargeted', }, - filter: function (event) { - return event.card.name == 'sha' && get.color(event.card) == 'black'; + filter:function(event){ + return event.card.name=='sha'&&get.color(event.card)=='black'; }, - forced: true, - logTarget: 'target', - content: function () { + forced:true, + logTarget:'target', + content:function(){ trigger.target.addTempSkill('qinggang2'); trigger.target.storage.qinggang2.add(trigger.card); }, - ai: { - unequip_ai: true, - skillTagFilter: function (player, tag, arg) { - if (arg && arg.name == 'sha' && get.color(arg.card) == 'black') return true; + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&get.color(arg.card)=='black') return true; return false; } }, - global: 'yuanchou_ai', - subSkill: { - ai: { - unequip_ai: true, - skillTagFilter: function (player, tag, arg) { - if (arg && arg.name == 'sha' && get.color(arg.card) == 'black' && arg.target && arg.target.hasSkill('yuanchou')) return true; + global:'yuanchou_ai', + subSkill:{ + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&get.color(arg.card)=='black'&&arg.target&&arg.target.hasSkill('yuanchou')) return true; return false; } }, }, }, - juesheng: { - audio: 2, - enable: 'phaseUse', - limited: true, - skillAnimation: true, - animationColor: 'orange', - viewAs: { name: 'juedou', isCard: true }, - filterCard: () => false, - selectCard: -1, - precontent: function () { + juesheng:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'orange', + viewAs:{name:'juedou',isCard:true}, + filterCard:()=>false, + selectCard:-1, + precontent:function(){ player.awakenSkill('juesheng'); player.addTempSkill('juesheng_counter'); }, - ai: { - result: { - player: function (player, target) { - return target.getAllHistory('useCard', (evt) => evt.card.name == 'sha').length * lib.card.juedou.ai.result.player.apply(this, arguments); + ai:{ + result:{ + player:function(player,target){ + return target.getAllHistory('useCard',(evt)=>evt.card.name=='sha').length*lib.card.juedou.ai.result.player.apply(this,arguments); }, - target: function (player, target) { - var num = target.getAllHistory('useCard', (evt) => evt.card.name == 'sha').length; - if (num < target.hp) return 0; - return num * lib.card.juedou.ai.result.target; + target:function(player,target){ + var num=target.getAllHistory('useCard',(evt)=>evt.card.name=='sha').length; + if(num evt.card.name == 'sha').length); - target.addTempSkill('juesheng', { player: 'phaseAfter' }); + content:function(){ + var target=trigger.getParent().target; + trigger.num=Math.max(1,target.getAllHistory('useCard',(evt)=>evt.card.name=='sha').length); + target.addTempSkill('juesheng',{player:'phaseAfter'}); }, }, }, }, //田之间 - saodi: { - audio: 2, - trigger: { - player: 'useCardToPlayer', + saodi:{ + audio:2, + trigger:{ + player:'useCardToPlayer', }, - direct: true, - filter: function (event, player) { - if (event.targets.length != 1 || event.target == player || event.target.hasSkill('nodis')) return false; - if (event.card.name != 'sha' && get.type(event.card) != 'trick') return false; - var target = event.target; - var left = [], right = [], left2 = player, right2 = player; - while (left2 != target && right2 != target) { - left2 = left2.getPrevious(); - right2 = right2.getNext(); - if (left2 != target) left.push(left2); - if (right2 != target) right.push(right2); + direct:true, + filter:function(event,player){ + if(event.targets.length!=1||event.target==player||event.target.hasSkill('nodis')) return false; + if(event.card.name!='sha'&&get.type(event.card)!='trick') return false; + var target=event.target; + var left=[],right=[],left2=player,right2=player; + while(left2!=target&&right2!=target){ + left2=left2.getPrevious(); + right2=right2.getNext(); + if(left2!=target) left.push(left2); + if(right2!=target) right.push(right2); } - if (target == left2) { - for (var i of left) { - if (lib.filter.targetEnabled2(event.card, player, i)) return true; + if(target==left2){ + for(var i of left){ + if(lib.filter.targetEnabled2(event.card,player,i)) return true; } } - if (target == right2) { - for (var i of right) { - if (lib.filter.targetEnabled2(event.card, player, i)) return true; + if(target==right2){ + for(var i of right){ + if(lib.filter.targetEnabled2(event.card,player,i)) return true; } } return false; }, - aiJudge: function (card, player, target, bool) { - var left = [], right = [], left2 = player, right2 = player, left3 = false, right3 = false; - var eff_left = 0, eff_right = 0; - while (left2 != target && right2 != target) { - left2 = left2.getPrevious(); - right2 = right2.getNext(); - if (left2 != target) left.push(left2); - if (right2 != target) right.push(right2); + aiJudge:function(card,player,target,bool){ + var left=[],right=[],left2=player,right2=player,left3=false,right3=false; + var eff_left=0,eff_right=0; + while(left2!=target&&right2!=target){ + left2=left2.getPrevious(); + right2=right2.getNext(); + if(left2!=target) left.push(left2); + if(right2!=target) right.push(right2); } - if (target == left2) { - for (var i of left) { - if (lib.filter.targetEnabled2(card, player, i)) { - left3 = true; - eff_left += get.effect(i, card, player, player); + if(target==left2){ + for(var i of left){ + if(lib.filter.targetEnabled2(card,player,i)){ + left3=true; + eff_left+=get.effect(i,card,player,player); } } } - if (target == right2) { - for (var i of right) { - if (lib.filter.targetEnabled2(card, player, i)) { - right3 = true; - eff_right += get.effect(i, card, player, player); + if(target==right2){ + for(var i of right){ + if(lib.filter.targetEnabled2(card,player,i)){ + right3=true; + eff_right+=get.effect(i,card,player,player); } } } - if (left3 && right3) { - if (!bool) return Math.max(eff_left, eff_right); - if (eff_left > Math.max(0, eff_right)) return '↖顺时针'; - if (eff_right > Math.max(0, eff_left)) return '逆时针↗'; + if(left3&&right3){ + if(!bool) return Math.max(eff_left,eff_right); + if(eff_left>Math.max(0,eff_right)) return '↖顺时针'; + if(eff_right>Math.max(0,eff_left)) return '逆时针↗'; return 'cancel2'; } - else if (left3) { - if (bool) return eff_left > 0 ? '↖顺时针' : 'cancel2'; + else if(left3){ + if(bool) return eff_left>0?'↖顺时针':'cancel2'; return eff_left; } - else if (right3) { - if (bool) return eff_right > 0 ? '逆时针↗' : 'cancel2'; + else if(right3){ + if(bool) return eff_right>0?'逆时针↗':'cancel2'; return eff_right; } - else return bool ? 'cancel2' : 0; + else return bool?'cancel2':0; }, - content: function () { + content:function(){ 'step 0' - var choices = []; - var target = trigger.target; - var left = [], right = [], left2 = player, right2 = player; - while (left2 != target && right2 != target) { - left2 = left2.getPrevious(); - right2 = right2.getNext(); - if (left2 != target) left.push(left2); - if (right2 != target) right.push(right2); + var choices=[]; + var target=trigger.target; + var left=[],right=[],left2=player,right2=player; + while(left2!=target&&right2!=target){ + left2=left2.getPrevious(); + right2=right2.getNext(); + if(left2!=target) left.push(left2); + if(right2!=target) right.push(right2); } - if (target == left2) { - for (var i of left) { - if (lib.filter.targetEnabled2(trigger.card, player, i)) { + if(target==left2){ + for(var i of left){ + if(lib.filter.targetEnabled2(trigger.card,player,i)){ choices.push('↖顺时针'); break; } } } - if (target == right2) { - for (var i of right) { - if (lib.filter.targetEnabled2(trigger.card, player, i)) { + if(target==right2){ + for(var i of right){ + if(lib.filter.targetEnabled2(trigger.card,player,i)){ choices.push('逆时针↗'); break; } } } choices.push('cancel2'); - player.chooseControl(choices).set('prompt', get.prompt('saodi')).set('prompt2', '令自己和' + get.translation(trigger.target) + '某个方向之间的所有角色均成为' + get.translation(trigger.card) + '的目标').set('choices', choices).set('ai', function () { - var evt = _status.event.getTrigger(); - return lib.skill.saodi.aiJudge(evt.card, evt.player, evt.target, true); + player.chooseControl(choices).set('prompt',get.prompt('saodi')).set('prompt2','令自己和'+get.translation(trigger.target)+'某个方向之间的所有角色均成为'+get.translation(trigger.card)+'的目标').set('choices',choices).set('ai',function(){ + var evt=_status.event.getTrigger(); + return lib.skill.saodi.aiJudge(evt.card,evt.player,evt.target,true); }); 'step 1' - if (result.control != 'cancel2') { - var targets = []; - if (result.control == '↖顺时针') { - var current = player.getPrevious(); - while (current != trigger.target) { - if (lib.filter.targetEnabled2(trigger.card, player, current)) targets.push(current); - current = current.getPrevious(); + if(result.control!='cancel2'){ + var targets=[]; + if(result.control=='↖顺时针'){ + var current=player.getPrevious(); + while(current!=trigger.target){ + if(lib.filter.targetEnabled2(trigger.card,player,current)) targets.push(current); + current=current.getPrevious(); } } - else { - var current = player.getNext(); - while (current != trigger.target) { - if (lib.filter.targetEnabled2(trigger.card, player, current)) targets.push(current); - current = current.getNext(); + else{ + var current=player.getNext(); + while(current!=trigger.target){ + if(lib.filter.targetEnabled2(trigger.card,player,current)) targets.push(current); + current=current.getNext(); } } - event.targets = targets; - if (!event.isMine() && !event.isOnline()) game.delayx(); + event.targets=targets; + if(!event.isMine()&&!event.isOnline()) game.delayx(); } else event.finish(); 'step 2' - player.logSkill('saodi', targets); + player.logSkill('saodi',targets); trigger.targets.addArray(targets); }, - ai: { - effect: { - player_use: function (card, player, target) { - if (!target || player._saodi_judging || ui.selected.targets.length || player == target || target.hasSkill('nodis')) return; - if (typeof card != 'object' || card.name != 'sha' && get.type(card) != 'trick') return false; - player._saodi_judging = true; - var effect = lib.skill.saodi.aiJudge(card, player, target); + ai:{ + effect:{ + player_use:function(card,player,target){ + if(!target||player._saodi_judging||ui.selected.targets.length||player==target||target.hasSkill('nodis')) return; + if(typeof card!='object'||card.name!='sha'&&get.type(card)!='trick') return false; + player._saodi_judging=true; + var effect=lib.skill.saodi.aiJudge(card,player,target); delete player._saodi_judging; - if (effect > 0) return [1, effect / Math.max(0.01, get.attitude(player, player))]; + if(effect>0) return [1,effect/Math.max(0.01,get.attitude(player,player))]; }, }, }, }, - zhuitao: { - audio: 2, - direct: true, - locked: false, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - var storage = player.getStorage('zhuitao'); - return game.hasPlayer(function (current) { - return current != player && !storage.includes(current); + zhuitao:{ + audio:2, + direct:true, + locked:false, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + var storage=player.getStorage('zhuitao'); + return game.hasPlayer(function(current){ + return current!=player&&!storage.includes(current); }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('zhuitao'), '令自己至一名其他角色的距离-1', function (card, player, target) { - return target != player && !player.getStorage('zhuitao').includes(target); - }).set('ai', function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (att < 0 && get.distance(player, target) == 2) return 100; - return get.distance(player, target) * (1 - get.sgn(att) / 3); + player.chooseTarget(get.prompt('zhuitao'),'令自己至一名其他角色的距离-1',function(card,player,target){ + return target!=player&&!player.getStorage('zhuitao').includes(target); + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<0&&get.distance(player,target)==2) return 100; + return get.distance(player,target)*(1-get.sgn(att)/3); }); 'step 1' - if (result.bool) { - player.logSkill('zhuitao', result.targets[0]); - player.markAuto('zhuitao', result.targets); + if(result.bool){ + player.logSkill('zhuitao',result.targets[0]); + player.markAuto('zhuitao',result.targets); game.delayx(); } }, - intro: { - content: '至$的距离-1', - onunmark: true, + intro:{ + content:'至$的距离-1', + onunmark:true, }, - onremove: true, - mod: { - globalFrom: function (player, target, distance) { - if (player.getStorage('zhuitao').includes(target)) return distance - 1; + onremove:true, + mod:{ + globalFrom:function(player,target,distance){ + if(player.getStorage('zhuitao').includes(target)) return distance-1; }, }, - group: 'zhuitao_remove', - subSkill: { - remove: { - audio: 'zhuitao', - trigger: { - source: 'damageSource', + group:'zhuitao_remove', + subSkill:{ + remove:{ + audio:'zhuitao', + trigger:{ + source:'damageSource', }, - forced: true, - filter: function (event, player) { + forced:true, + filter:function(event,player){ return player.getStorage('zhuitao').includes(event.player); }, - logTarget: 'player', - content: function () { - player.unmarkAuto('zhuitao', [trigger.player]); + logTarget:'player', + content:function(){ + player.unmarkAuto('zhuitao',[trigger.player]); }, }, }, }, //生鱼片 - olfengji: { - audio: 2, - trigger: { player: 'phaseDrawBegin2' }, - forced: true, - locked: false, - filter: function (event, player) { + olfengji:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + locked:false, + filter:function(event,player){ return !player.numFixed; }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget('丰积:请选择增加摸牌的目标', '令自己本回合的额定摸牌数-1,且目标下回合的额定摸牌数+2。或者点击「取消」,令自己的额定摸牌数+1', lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - if (target.hasJudge('lebu') || target.hasJudge('bingliang')) return 0; - var att = get.attitude(player, target), dist = get.distance(player, target, 'absolute'); - if (_status.event.goon) { - return att / dist; + player.chooseTarget('丰积:请选择增加摸牌的目标','令自己本回合的额定摸牌数-1,且目标下回合的额定摸牌数+2。或者点击「取消」,令自己的额定摸牌数+1',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + if(target.hasJudge('lebu')||target.hasJudge('bingliang')) return 0; + var att=get.attitude(player,target),dist=get.distance(player,target,'absolute'); + if(_status.event.goon){ + return att/dist; } - if (game.countPlayer(function (current) { - return current != player && current != target && get.attitude(player, current) < 0 && get.distance(player, current, 'absolute') < dist; - }) >= target.hp) return 0; - return att / dist; - }).set('goon', player.skipList.includes('lebu')); + if(game.countPlayer(function(current){ + return current!=player&¤t!=target&&get.attitude(player,current)<0&&get.distance(player,current,'absolute')=target.hp) return 0; + return att/dist; + }).set('goon',player.skipList.includes('lebu')); 'step 1' - if (!player.storage.olfengji_draw) player.storage.olfengji_draw = 0; - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'thunder'); + if(!player.storage.olfengji_draw) player.storage.olfengji_draw=0; + if(result.bool){ + var target=result.targets[0]; + player.line(target,'thunder'); player.storage.olfengji_draw--; - if (!target.storage.olfengji_draw) target.storage.olfengji_draw = 0; - target.storage.olfengji_draw += 2; - target.addTempSkill('olfengji_draw', { player: 'phaseAfter' }); + if(!target.storage.olfengji_draw) target.storage.olfengji_draw=0; + target.storage.olfengji_draw+=2; + target.addTempSkill('olfengji_draw',{player:'phaseAfter'}); target.markSkill('olfengji_draw'); } - else { + else{ player.storage.olfengji_draw++; } player.addTempSkill('olfengji_draw'); player.markSkill('olfengji_draw'); 'step 2' - player.chooseTarget('丰积:请选择增加使用杀次数的目标', '令自己本回合使用杀的次数上限-1,且目标下回合使用杀的次数上限+2。或者点击「取消」,令自己使用杀的次数上限+1', lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - if (target.countMark('olfengji_draw') > 0 && target.getCardUsable('sha') < 2) return get.attitude(player, target); + player.chooseTarget('丰积:请选择增加使用杀次数的目标','令自己本回合使用杀的次数上限-1,且目标下回合使用杀的次数上限+2。或者点击「取消」,令自己使用杀的次数上限+1',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + if(target.countMark('olfengji_draw')>0&&target.getCardUsable('sha')<2) return get.attitude(player,target); return 0; }); 'step 3' - if (!player.storage.olfengji_sha) player.storage.olfengji_sha = 0; - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'fire'); + if(!player.storage.olfengji_sha) player.storage.olfengji_sha=0; + if(result.bool){ + var target=result.targets[0]; + player.line(target,'fire'); player.storage.olfengji_sha--; - if (!target.storage.olfengji_sha) target.storage.olfengji_sha = 0; - target.storage.olfengji_sha += 2; - target.addTempSkill('olfengji_sha', { player: 'phaseAfter' }); + if(!target.storage.olfengji_sha) target.storage.olfengji_sha=0; + target.storage.olfengji_sha+=2; + target.addTempSkill('olfengji_sha',{player:'phaseAfter'}); target.markSkill('olfengji_sha'); } - else { + else{ player.storage.olfengji_sha++; } player.addTempSkill('olfengji_sha'); player.markSkill('olfengji_sha'); }, - subSkill: { - sha: { - charlotte: true, - onremove: true, - intro: { - content: function (storage) { - return '使用【杀】的次数上限' + (storage >= 0 ? '+' : '') + storage; + subSkill:{ + sha:{ + charlotte:true, + onremove:true, + intro:{ + content:function(storage){ + return '使用【杀】的次数上限'+(storage>=0?'+':'')+storage; }, }, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.storage.olfengji_sha; + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.storage.olfengji_sha; }, }, }, - draw: { - charlotte: true, - onremove: true, - intro: { - content: function (storage) { - return '额定摸牌数' + (storage >= 0 ? '+' : '') + storage; + draw:{ + charlotte:true, + onremove:true, + intro:{ + content:function(storage){ + return '额定摸牌数'+(storage>=0?'+':'')+storage; }, }, - trigger: { player: 'phaseDrawBegin2' }, - forced: true, - filter: function (event, player) { + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:function(event,player){ return !event.numFixed; }, - content: function () { - trigger.num += player.storage.olfengji_draw; + content:function(){ + trigger.num+=player.storage.olfengji_draw; }, }, }, }, //朱灵 - jixian: { - audio: 2, - trigger: { player: 'phaseDrawAfter' }, - direct: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player && lib.skill.jixian.getNum(player, current) > 0 && player.canUse('sha', current, false); + jixian:{ + audio:2, + trigger:{player:'phaseDrawAfter'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&lib.skill.jixian.getNum(player,current)>0&&player.canUse('sha',current,false); }) }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('jixian'), '视为对一名满足条件的角色使用一张【杀】', function (card, player, target) { - return target != player && lib.skill.jixian.getNum(player, target) > 0 && player.canUse('sha', target, false); - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'sha' }, player, player) * Math.sqrt(lib.skill.jixian.getNum(player, target)); + player.chooseTarget(get.prompt('jixian'),'视为对一名满足条件的角色使用一张【杀】',function(card,player,target){ + return target!=player&&lib.skill.jixian.getNum(player,target)>0&&player.canUse('sha',target,false); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player)*Math.sqrt(lib.skill.jixian.getNum(player,target)); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('jixian', target); - var num = lib.skill.jixian.getNum(player, target); - player.useCard({ name: 'sha', isCard: true }, target, false); - if (num > 0) player.draw(num); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('jixian',target); + var num=lib.skill.jixian.getNum(player,target); + player.useCard({name:'sha',isCard:true},target,false); + if(num>0) player.draw(num); } else event.finish(); 'step 2' - if (!player.hasHistory('sourceDamage', function (evt) { - var card = evt.card; - if (!card || card.name != 'sha') return false; - var evtx = evt.getParent('useCard'); - return evtx.card == card && evtx.getParent() == event; + if(!player.hasHistory('sourceDamage',function(evt){ + var card=evt.card; + if(!card||card.name!='sha') return false; + var evtx=evt.getParent('useCard'); + return evtx.card==card&&evtx.getParent()==event; })) player.loseHp(); }, - getNum: function (player, target) { - var num = 0; - if (target.isHealthy()) num++; - if (target.getEquips(2).length) num++; - var countSkill = function (player) { - return player.getSkills(null, false, false).filter(function (skill) { - var info = get.info(skill); - if (!info || info.charlotte) return false; - if (info.zhuSkill) return player.hasZhuSkill(skill); + getNum:function(player,target){ + var num=0; + if(target.isHealthy()) num++; + if(target.getEquips(2).length) num++; + var countSkill=function(player){ + return player.getSkills(null,false,false).filter(function(skill){ + var info=get.info(skill); + if(!info||info.charlotte) return false; + if(info.zhuSkill) return player.hasZhuSkill(skill); return true; }).length; } - if (countSkill(player) < countSkill(target)) num++; + if(countSkill(player) (current == player || current.countCards('h') >= ph)).sortBySeat(); - player.line(targets, 'green'); - event.targets = targets; - event.num = 0; + var ph=player.countCards('h'); + var targets=game.filterPlayer((current)=>(current==player||current.countCards('h')>=ph)).sortBySeat(); + player.line(targets,'green'); + event.targets=targets; + event.num=0; 'step 1' - var target = targets[num]; + var target=targets[num]; event.num++; - if (target.isIn()) { - event.target = target; - target.chooseBool('是否令' + (player == target ? '自己' : get.translation(player)) + '摸一张牌?').set('ai', () => get.attitude(_status.event.player, _status.event.getParent().player) > 0); + if(target.isIn()){ + event.target=target; + target.chooseBool('是否令'+(player==target?'自己':get.translation(player))+'摸一张牌?').set('ai',()=>get.attitude(_status.event.player,_status.event.getParent().player)>0); } - else { - event.goto(event.num < targets.length ? 1 : 3); + else{ + event.goto(event.num 0 && player.getExpansions('spolzhouxuan').length < 5; + spolzhouxuan:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + filter:function(event,player){ + return player.countCards('h')>0&&player.getExpansions('spolzhouxuan').length<5; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard('h', get.prompt('spolzhouxuan'), [1, 5 - player.getExpansions('spolzhouxuan').length], '将至多' + get.cnNumber(5 - player.getExpansions('spolzhouxuan').length) + '张手牌置于武将牌上').set('ai', function (card) { - if (ui.selected.cards.length >= player.needsToDiscard()) return 6 - get.value(card); - return 100 - get.useful(card); + player.chooseCard('h',get.prompt('spolzhouxuan'),[1,5-player.getExpansions('spolzhouxuan').length],'将至多'+get.cnNumber(5-player.getExpansions('spolzhouxuan').length)+'张手牌置于武将牌上').set('ai',function(card){ + if(ui.selected.cards.length>=player.needsToDiscard()) return 6-get.value(card); + return 100-get.useful(card); }); 'step 1' - if (result.bool) { - var cards = result.cards; + if(result.bool){ + var cards=result.cards; player.logSkill('spolzhouxuan'); - player.addToExpansion(cards, player, 'give').gaintag.add('spolzhouxuan'); + player.addToExpansion(cards,player,'give').gaintag.add('spolzhouxuan'); } }, - marktext: '旋', - intro: { - content: 'expansion', - markcount: 'expansion', + marktext:'旋', + intro:{ + content:'expansion', + markcount:'expansion', }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - group: ['spolzhouxuan_use', 'spolzhouxuan_discard'], - subSkill: { - use: { - audio: 'spolzhouxuan', - trigger: { player: 'useCard' }, - filter: function (event, player) { - return player.getExpansions('spolzhouxuan').length > 0; + group:['spolzhouxuan_use','spolzhouxuan_discard'], + subSkill:{ + use:{ + audio:'spolzhouxuan', + trigger:{player:'useCard'}, + filter:function(event,player){ + return player.getExpansions('spolzhouxuan').length>0; }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ 'step 0' player.loseToDiscardpile(player.getExpansions('spolzhouxuan').randomGet()); 'step 1' - var num = 1; - if (!player.isMaxHandcard(true)) num += player.getExpansions('spolzhouxuan').length; + var num=1; + if(!player.isMaxHandcard(true)) num+=player.getExpansions('spolzhouxuan').length; player.draw(num); }, }, - discard: { - audio: 'spolzhouxuan', - trigger: { player: 'phaseUseEnd' }, - filter: function (event, player) { - return player.getExpansions('spolzhouxuan').length > 0; + discard:{ + audio:'spolzhouxuan', + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ + return player.getExpansions('spolzhouxuan').length>0; }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ player.loseToDiscardpile(player.getExpansions('spolzhouxuan')); }, }, }, }, //董昭 - olxianlve: { - audio: 2, - mode: ['identity'], - trigger: { - global: 'phaseZhunbeiBegin', + olxianlve:{ + audio:2, + mode:['identity'], + trigger:{ + global:'phaseZhunbeiBegin', }, - direct: true, - filter: function (event, player) { - return event.player == game.zhu && event.player.isZhu; + direct:true, + filter:function(event,player){ + return event.player==game.zhu&&event.player.isZhu; }, - content: function () { + content:function(){ 'step 0' - var list = lib.inpile.filter(function (i) { - return get.type2(i) == 'trick'; - }).map(function (i) { - return ['锦囊', '', i]; + var list=lib.inpile.filter(function(i){ + return get.type2(i)=='trick'; + }).map(function(i){ + return ['锦囊','',i]; }); - if (!list.length) event.finish(); - else player.chooseButton([get.prompt('olxianlve'), [list, 'vcard']]).set('ai', function (button) { - switch (button.link[2]) { - case 'wuxie': return 0.6 + Math.random(); - case 'wuzhong': case 'dongzhuxianji': return 0.5 + Math.random(); - case 'guohe': case 'zhujinqiyuan': return 0.4 + Math.random(); + if(!list.length) event.finish(); + else player.chooseButton([get.prompt('olxianlve'),[list,'vcard']]).set('ai',function(button){ + switch(button.link[2]){ + case 'wuxie': return 0.6+Math.random(); + case 'wuzhong': case 'dongzhuxianji':return 0.5+Math.random(); + case 'guohe': case 'zhujinqiyuan': return 0.4+Math.random(); default: return Math.random(); } }); 'step 1' - if (result.bool) { - var name = result.links[0][2]; + if(result.bool){ + var name=result.links[0][2]; player.logSkill('olxianlve'); - player.storage.olxianlve = name; + player.storage.olxianlve=name; player.markSkill('olxianlve'); } }, - intro: { - content: function (name, player) { - return '已声明' + (player.isUnderControl(true) ? '【' + get.translation(name) + '】' : '一个牌名'); + intro:{ + content:function(name,player){ + return '已声明'+(player.isUnderControl(true)?'【'+get.translation(name)+'】':'一个牌名'); }, }, - group: ['olxianlve_use', 'olxianlve_count'], - subSkill: { - count: { - trigger: { global: 'useCard1' }, - silent: true, - forced: true, - popup: false, - firstDo: true, - filter: function (event, player) { - return event.player != player && event.card.name == player.storage.olxianlve; + group:['olxianlve_use','olxianlve_count'], + subSkill:{ + count:{ + trigger:{global:'useCard1'}, + silent:true, + forced:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.player!=player&&event.card.name==player.storage.olxianlve; }, - content: function () { - if (!trigger.olxianlve_map) trigger.olxianlve_map = {}; - trigger.olxianlve_map[player.playerid] = true; + content:function(){ + if(!trigger.olxianlve_map) trigger.olxianlve_map={}; + trigger.olxianlve_map[player.playerid]=true; }, }, - use: { - audio: 'olxianlve', - trigger: { global: 'useCardAfter' }, - forced: true, - locked: false, - usable: 1, - filter: function (event, player) { - return event.player != player && event.olxianlve_map && event.olxianlve_map[player.playerid] && event.card.name == player.storage.olxianlve; + use:{ + audio:'olxianlve', + trigger:{global:'useCardAfter'}, + forced:true, + locked:false, + usable:1, + filter:function(event,player){ + return event.player!=player&&event.olxianlve_map&&event.olxianlve_map[player.playerid]&&event.card.name==player.storage.olxianlve; }, - content: function () { + content:function(){ 'step 0' player.draw(2); 'step 1' - var cards = result; - if (get.itemtype(cards) != 'cards') { + var cards=result; + if(get.itemtype(cards)!='cards'){ event.goto(5); return; } - var hs = player.getCards('h'); - cards = cards.filter(function (card) { + var hs=player.getCards('h'); + cards=cards.filter(function(card){ return hs.includes(card); }); - if (!cards.length) { + if(!cards.length){ event.goto(5); return; } - event.cards = cards; - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; - event.ai_list = []; + event.cards=cards; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + event.ai_list=[]; 'step 2' player.chooseCardTarget({ - filterCard: function (card) { - return _status.event.cards.includes(card) && !card.hasGaintag('olxianlve'); + filterCard:function(card){ + return _status.event.cards.includes(card)&&!card.hasGaintag('olxianlve'); }, - cards: cards, - filterTarget: lib.filter.notMe, - selectCard: [1, cards.length], - prompt: '是否将得到的牌分配给其他角色?', - ai1: function (card) { - if (!ui.selected.cards.length) return 1; + cards:cards, + filterTarget:lib.filter.notMe, + selectCard:[1,cards.length], + prompt:'是否将得到的牌分配给其他角色?', + ai1:function(card){ + if(!ui.selected.cards.length) return 1; return 0; }, - ai2: function (target) { - var player = _status.event.player, card = ui.selected.cards[0]; - var val = target.getUseValue(card); - if (target.isPhaseUsing() && get.type2(card) == 'trick') val *= 3; - if (val > 0) return val * get.attitude(player, target) * 2; - return get.value(card, target) * get.attitude(player, target); + ai2:function(target){ + var player=_status.event.player,card=ui.selected.cards[0]; + var val=target.getUseValue(card); + if(target.isPhaseUsing()&&get.type2(card)=='trick') val*=3; + if(val>0) return val*get.attitude(player,target)*2; + return get.value(card,target)*get.attitude(player,target); }, }); 'step 3' - if (result.bool) { - var res = result.cards, target = result.targets[0].playerid; - player.addGaintag(res, 'olxianlve'); + if(result.bool){ + var res=result.cards,target=result.targets[0].playerid; + player.addGaintag(res,'olxianlve'); cards.removeArray(res); - if (!event.given_map[target]) event.given_map[target] = []; + if(!event.given_map[target]) event.given_map[target]=[]; event.given_map[target].addArray(res); - if (result.targets[0].isPhaseUsing() && get.type2(res[0]) == 'trick') event.ai_list.push(res[0].name); - if (cards.length) event.goto(2); + if(result.targets[0].isPhaseUsing()&&get.type2(res[0])=='trick') event.ai_list.push(res[0].name); + if(cards.length) event.goto(2); } 'step 4' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - var map = [], cards = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - player.line(source, 'green'); - map.push([source, event.given_map[i]]); + var map=[],cards=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + map.push([source,event.given_map[i]]); cards.addArray(event.given_map[i]); } - if (map.length) game.loseAsync({ - gain_list: map, - player: player, - cards: cards, - giver: player, - animate: 'giveAuto', + if(map.length) game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', }).setContent('gaincardMultiple') 'step 5' - var list = lib.inpile.filter(function (i) { - return get.type2(i) == 'trick'; - }).map(function (i) { - return ['锦囊', '', i]; + var list=lib.inpile.filter(function(i){ + return get.type2(i)=='trick'; + }).map(function(i){ + return ['锦囊','',i]; }); - if (!list.length) event.finish(); - else player.chooseButton([get.prompt('olxianlve'), [list, 'vcard']]).set('list', event.ai_list).set('ai', function (button) { - if (_status.event.list.includes(button.link[2])) return 2 + Math.random(); - switch (button.link[2]) { - case 'wuxie': return 0.6 + Math.random(); - case 'wuzhong': case 'dongzhuxianji': return 0.5 + Math.random(); - case 'guohe': case 'zhujinqiyuan': return 0.4 + Math.random(); + if(!list.length) event.finish(); + else player.chooseButton([get.prompt('olxianlve'),[list,'vcard']]).set('list',event.ai_list).set('ai',function(button){ + if(_status.event.list.includes(button.link[2])) return 2+Math.random(); + switch(button.link[2]){ + case 'wuxie': return 0.6+Math.random(); + case 'wuzhong': case 'dongzhuxianji':return 0.5+Math.random(); + case 'guohe': case 'zhujinqiyuan': return 0.4+Math.random(); default: return Math.random(); } }); 'step 6' - if (result.bool) { - var name = result.links[0][2]; - player.storage.olxianlve = name; + if(result.bool){ + var name=result.links[0][2]; + player.storage.olxianlve=name; player.markSkill('olxianlve'); } }, }, }, }, - olzaowang: { - mode: ['identity'], - available: function (mode) { - if (mode == 'identity' && _status.mode == 'purple') return false; + olzaowang:{ + mode:['identity'], + available:function(mode){ + if(mode=='identity'&&_status.mode=='purple') return false; }, - audio: 2, - enable: 'phaseUse', - limited: true, - skillAnimation: true, - animationColor: 'water', - filterTarget: true, - content: function () { + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'water', + filterTarget:true, + content:function(){ player.awakenSkill('olzaowang'); target.gainMaxHp(); target.recover(); target.draw(3); target.addSkills('olzaowang2'); }, - ai: { - order: 2, - result: { - target: function (player, target) { - if (player.hasUnknown(2)) return 0; - if (target.identity == 'zhong') return 20; - if (target.identity == 'zhu') return 10; - if (target.identity == 'nei') return 5; - if (!target.hasFriend()) return 5; + ai:{ + order:2, + result:{ + target:function(player,target){ + if(player.hasUnknown(2)) return 0; + if(target.identity=='zhong') return 20; + if(target.identity=='zhu') return 10; + if(target.identity=='nei') return 5; + if(!target.hasFriend()) return 5; return 0; }, }, }, }, - olzaowang2: { - charlotte: true, - trigger: { global: 'dieBegin' }, - forced: true, - filter: function (event, player) { - return event.player.identity == 'zhu' && (player.identity == 'zhong' || player.identity == 'mingzhong'); + olzaowang2:{ + charlotte:true, + trigger:{global:'dieBegin'}, + forced:true, + filter:function(event,player){ + return event.player.identity=='zhu'&&(player.identity=='zhong'||player.identity=='mingzhong'); }, - logTarget: 'player', - skillAnimation: true, - animationColor: 'orange', - content: function () { - game.broadcastAll(function (player, target) { - target.identity = player.identity; - if (player.identity == 'mingzhong') game.zhong = target; + logTarget:'player', + skillAnimation:true, + animationColor:'orange', + content:function(){ + game.broadcastAll(function(player,target){ + target.identity=player.identity; + if(player.identity=='mingzhong') game.zhong=target; delete target.isZhu; - player.identity = 'zhu'; - game.zhu = player; + player.identity='zhu'; + game.zhu=player; player.showIdentity(); target.showIdentity(); - }, player, trigger.player); + },player,trigger.player); event.trigger('zhuUpdate'); }, - mark: true, - marktext: '王', - intro: { content: '造了个王' }, - group: 'olzaowang2_kill', - subSkill: { - kill: { - trigger: { player: 'die' }, - forced: true, - forceDie: true, - skillAnimation: true, - animationColor: 'wood', - filter: function (event, player) { - return player.identity == 'fan' && event.source && (event.source.identity == 'zhu' || event.source.identity == 'zhong' || event.source.identity == 'mingzhong'); + mark:true, + marktext:'王', + intro:{content:'造了个王'}, + group:'olzaowang2_kill', + subSkill:{ + kill:{ + trigger:{player:'die'}, + forced:true, + forceDie:true, + skillAnimation:true, + animationColor:'wood', + filter:function(event,player){ + return player.identity=='fan'&&event.source&&(event.source.identity=='zhu'||event.source.identity=='zhong'||event.source.identity=='mingzhong'); }, - content: function () { - game.over((game.me.identity == 'zhu' || game.me.identity == 'zhong' || game.me.identity == 'mingzhong')); + content:function(){ + game.over((game.me.identity=='zhu'||game.me.identity=='zhong'||game.me.identity=='mingzhong')); }, }, }, }, //冯方女 - zhuangshu: { - audio: 2, - trigger: { global: 'phaseBegin' }, - direct: true, - filter: function (event, player) { - return event.player.isIn() && event.player.hasEmptySlot(5) && player.hasCard(lib.skill.zhuangshu.filterCard, 'he'); + zhuangshu:{ + audio:2, + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return event.player.isIn()&&event.player.hasEmptySlot(5)&&player.hasCard(lib.skill.zhuangshu.filterCard,'he'); }, - filterCard: function (card) { - if (_status.connectMode) return true; - var type = get.type2(card); - return type == 'basic' || type == 'trick' || type == 'equip'; + filterCard:function(card){ + if(_status.connectMode) return true; + var type=get.type2(card); + return type=='basic'||type=='trick'||type=='equip'; }, - content: function () { + content:function(){ 'step 0' - player.chooseToDiscard('he', get.prompt('zhuangshu', trigger.player), '弃置一张牌,并根据此牌的类型,按如下关系将一张宝物牌置入该角色的装备区:{<基本牌,【琼梳】>,<锦囊牌,【犀梳】>,<装备牌,【金梳】>}。', function (card) { - var type = get.type2(card); - return type == 'basic' || type == 'trick' || type == 'equip'; - }).set('ai', function (card) { - var player = _status.event.player; - if (get.attitude(player, _status.event.getTrigger().player) < 4) return 0; - var name = 'zhuangshu_' + get.type2(card, player); - if (game.hasPlayer(function (current) { - return current.getEquip(name) && get.attitude(player, current) > 0; + player.chooseToDiscard('he',get.prompt('zhuangshu',trigger.player),'弃置一张牌,并根据此牌的类型,按如下关系将一张宝物牌置入该角色的装备区:{<基本牌,【琼梳】>,<锦囊牌,【犀梳】>,<装备牌,【金梳】>}。',function(card){ + var type=get.type2(card); + return type=='basic'||type=='trick'||type=='equip'; + }).set('ai',function(card){ + var player=_status.event.player; + if(get.attitude(player,_status.event.getTrigger().player)<4) return 0; + var name='zhuangshu_'+get.type2(card,player); + if(game.hasPlayer(function(current){ + return current.getEquip(name)&&get.attitude(player,current)>0; })) return 0; - return 7 - get.value(card); - }).logSkill = ['zhuangshu', trigger.player]; + return 7-get.value(card); + }).logSkill=['zhuangshu',trigger.player]; 'step 1' - if (result.bool) { - var name = 'zhuangshu_' + get.type2(result.cards[0], result.cards[0].original == 'h' ? player : false); - if (lib.card[name] && trigger.player.isIn && trigger.player.hasEmptySlot(5)) { - var target = game.findPlayer(function (current) { - var equip = current.getEquip(name); - return equip && equip.name == name; + if(result.bool){ + var name='zhuangshu_'+get.type2(result.cards[0],result.cards[0].original=='h'?player:false); + if(lib.card[name]&&trigger.player.isIn&&trigger.player.hasEmptySlot(5)){ + var target=game.findPlayer(function(current){ + var equip=current.getEquip(name); + return equip&&equip.name==name; }); - if (target) { - var card = target.getEquip(name); - target.$give(card, trigger.player, false); + if(target){ + var card=target.getEquip(name); + target.$give(card,trigger.player,false); } - else { - var card = game.createCard(name, lib.card[name].suit, 12); - trigger.player.$gain2(card, false); + else{ + var card=game.createCard(name,lib.card[name].suit,12); + trigger.player.$gain2(card,false); } game.delayx(); trigger.player.equip(card); } } }, - group: 'zhuangshu_gameStart', - subSkill: { - gameStart: { - trigger: { global: 'phaseBefore' }, - direct: true, - filter: function (event, player) { - return game.phaseNumber == 0; + group:'zhuangshu_gameStart', + subSkill:{ + gameStart:{ + trigger:{global:'phaseBefore'}, + direct:true, + filter:function(event,player){ + return game.phaseNumber==0; }, - content: function () { + content:function(){ 'step 0' - player.chooseButton([get.prompt('zhuangshu'), [['zhuangshu_basic', 'zhuangshu_trick', 'zhuangshu_equip'], 'vcard']]).set('filterButton', function (button) { - return !game.hasPlayer(function (current) { + player.chooseButton([get.prompt('zhuangshu'),[['zhuangshu_basic','zhuangshu_trick','zhuangshu_equip'],'vcard']]).set('filterButton',function(button){ + return !game.hasPlayer(function(current){ return current.getEquip(button.link[2]); }) }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('zhuangshu'); - var name = result.links[0][2], card = game.createCard(name, lib.card[name].suit, 12); - player.$gain2(card, false); + var name=result.links[0][2],card=game.createCard(name,lib.card[name].suit,12); + player.$gain2(card,false); game.delayx(); player.equip(card); } @@ -11345,74 +11346,74 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - chuiti: { - audio: 2, - usable: 1, - trigger: { - global: ['loseAfter', 'loseAsyncAfter'], + chuiti:{ + audio:2, + usable:1, + trigger:{ + global:['loseAfter','loseAsyncAfter'], }, - direct: true, - filter: function (event, player) { - if (event.type != 'discard' || event.getlx === false) return false; - return game.hasPlayer(function (current) { - if (player != current) { - var cards = current.getEquips(5); - if (!cards.some(card => card.name.indexOf('zhuangshu_') == 0)) return false; + direct:true, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false) return false; + return game.hasPlayer(function(current){ + if(player!=current){ + var cards=current.getEquips(5); + if(!cards.some(card=>card.name.indexOf('zhuangshu_')==0)) return false; } - var evt = event.getl(current); - if (!evt || !evt.cards2) return false; - for (var i of evt.cards2) { - if (get.position(i, true) == 'd' && player.hasUseTarget(i)) return true; + var evt=event.getl(current); + if(!evt||!evt.cards2) return false; + for(var i of evt.cards2){ + if(get.position(i,true)=='d'&&player.hasUseTarget(i)) return true; } return false; }); }, - content: function () { + content:function(){ 'step 0' - var cards = []; - game.countPlayer(function (current) { - if (player != current) { - var cards2 = current.getEquips(5); - if (!cards2.some(card => card.name.indexOf('zhuangshu_') == 0)) return false; + var cards=[]; + game.countPlayer(function(current){ + if(player!=current){ + var cards2=current.getEquips(5); + if(!cards2.some(card=>card.name.indexOf('zhuangshu_')==0)) return false; } - var evt = trigger.getl(current); - for (var i of evt.cards2) { - if (get.position(i, true) == 'd' && player.hasUseTarget(i)) cards.push(i); + var evt=trigger.getl(current); + for(var i of evt.cards2){ + if(get.position(i,true)=='d'&&player.hasUseTarget(i)) cards.push(i); } return false; }); - player.chooseButton(['垂涕:是否使用其中的一张牌?', cards]).set('ai', function (button) { + player.chooseButton(['垂涕:是否使用其中的一张牌?',cards]).set('ai',function(button){ return _status.event.player.getUseValue(button.link); }); 'step 1' - if (result.bool) { - player.$gain2(result.links[0], false); + if(result.bool){ + player.$gain2(result.links[0],false); game.delayx(); - player.chooseUseTarget(true, result.links[0], false).logSkill = 'chuiti'; + player.chooseUseTarget(true,result.links[0],false).logSkill='chuiti'; } else player.storage.counttrigger.chuiti--; }, }, - zhuangshu_basic: { - equipSkill: true, - trigger: { player: 'damageBegin2' }, - direct: true, - filter: function (event, player) { - var equip = player.getEquip('zhuangshu_basic'); - return event.num <= player.countCards('he', function (card) { - return card != equip; + zhuangshu_basic:{ + equipSkill:true, + trigger:{player:'damageBegin2'}, + direct:true, + filter:function(event,player){ + var equip=player.getEquip('zhuangshu_basic'); + return event.num<=player.countCards('he',function(card){ + return card!=equip; }) }, - content: function () { + content:function(){ 'step 0' - player.chooseToDiscard('he', trigger.num, get.prompt('zhuangshu_basic'), '弃置' + get.cnNumber(trigger.num) + '张牌并防止伤害', function (card, player) { - return card != player.getEquip('zhuangshu_basic'); - }).set('ai', function (card) { - var player = _status.event.player; - return 4 + player.getUseValue(card) - get.value(card, player); + player.chooseToDiscard('he',trigger.num,get.prompt('zhuangshu_basic'),'弃置'+get.cnNumber(trigger.num)+'张牌并防止伤害',function(card,player){ + return card!=player.getEquip('zhuangshu_basic'); + }).set('ai',function(card){ + var player=_status.event.player; + return 4+player.getUseValue(card)-get.value(card,player); }); 'step 1' - if (result.bool) trigger.cancel(); + if(result.bool) trigger.cancel(); }, /*usable:1, trigger:{player:'useCard2'}, @@ -11454,186 +11455,186 @@ game.import('character', function (lib, game, ui, get, ai, _status) { trigger.directHit.addArray(targets); },*/ }, - zhuangshu_trick: { - trigger: { player: ['phaseJudgeBefore'] }, - equipSkill: true, - direct: true, - content: function () { + zhuangshu_trick:{ + trigger:{player:['phaseJudgeBefore']}, + equipSkill:true, + direct:true, + content:function(){ 'step 0' - player.chooseControl('判定阶段', '弃牌阶段', 'cancel2').set('prompt', get.prompt('zhuangshu_trick')).set('prompt2', '跳过本回合的判定阶段或弃牌阶段').set('ai', function () { - var player = _status.event.player; - if (player.hasCard(function (card) { - return get.effect(player, { - name: card.viewAs || card.name, - cards: [card], - }, player, player) < 0; - }, 'j')) return '判定阶段'; + player.chooseControl('判定阶段','弃牌阶段','cancel2').set('prompt',get.prompt('zhuangshu_trick')).set('prompt2','跳过本回合的判定阶段或弃牌阶段').set('ai',function(){ + var player=_status.event.player; + if(player.hasCard(function(card){ + return get.effect(player,{ + name:card.viewAs||card.name, + cards:[card], + },player,player)<0; + },'j')) return '判定阶段'; return '弃牌阶段'; }); 'step 1' - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.logSkill('zhuangshu_trick'); - if (result.control == '判定阶段') { + if(result.control=='判定阶段'){ trigger.cancel(); - game.log(player, '跳过了', '#y判定阶段'); + game.log(player,'跳过了','#y判定阶段'); } - else { + else{ player.skip('phaseDiscard'); - game.log(player, '跳过了', '#g弃牌阶段'); + game.log(player,'跳过了','#g弃牌阶段'); } } }, }, - zhuangshu_equip: { - trigger: { player: 'phaseUseEnd' }, - forced: true, - equipSkill: true, - filter: function (event, player) { - return player.countCards('h') < Math.min(5, player.getHandcardLimit()); + zhuangshu_equip:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + equipSkill:true, + filter:function(event,player){ + return player.countCards('h') 0) list.push(eff); + player.chooseTarget(get.prompt2('oljuanxia'),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player,list=[]; + for(var name of lib.inpile){ + var info=lib.card[name]; + if(!info||info.type!='trick'||info.notarget||(info.selectTarget&&info.selectTarget!=1)) continue; + if(!player.canUse(name,target,false)) continue; + var eff=get.effect(target,{name:name},player,player) + if(eff>0) list.push(eff); } list.sort().reverse(); - if (!list.length) return 0; - return list[0] + (list[1] || 0) + (list[2] || 0); + if(!list.length) return 0; + return list[0]+(list[1]||0)+(list[2]||0); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('oljuanxia', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('oljuanxia',target); } else event.finish(); 'step 2' - var list = []; - for (var name of lib.inpile) { - var info = lib.card[name]; - if (!info || info.type != 'trick' || info.notarget || (info.selectTarget && info.selectTarget != 1)) continue; + var list=[]; + for(var name of lib.inpile){ + var info=lib.card[name]; + if(!info||info.type!='trick'||info.notarget||(info.selectTarget&&info.selectTarget!=1)) continue; list.push(name); } - if (!list.length) event.finish(); - else { - event.list = list; - event.count = 0; + if(!list.length) event.finish(); + else{ + event.list=list; + event.count=0; } 'step 3' - var list = event.list.filter(function (name) { - return player.canUse(name, target, false); + var list=event.list.filter(function(name){ + return player.canUse(name,target,false); }); - if (list.length) { - var next = player.chooseButton(['视为对' + get.translation(target) + '使用一张牌', [list, 'vcard']]).set('ai', function (button) { - var evt = _status.event.getParent(); - return get.effect(evt.target, { name: button.link[2] }, evt.player, evt.player); + if(list.length){ + var next=player.chooseButton(['视为对'+get.translation(target)+'使用一张牌',[list,'vcard']]).set('ai',function(button){ + var evt=_status.event.getParent(); + return get.effect(evt.target,{name:button.link[2]},evt.player,evt.player); }); - if (event.count == 0) next.set('forced', true); + if(event.count==0) next.set('forced',true); } - else { - event.stopped = true; + else{ + event.stopped=true; event.goto(5); } 'step 4' - if (result.bool) { + if(result.bool){ event.count++; - var name = result.links[0][2]; + var name=result.links[0][2]; event.list.remove(name); - player.useCard({ name: name, isCard: true }, target, false); + player.useCard({name:name,isCard:true},target,false); } - else event.stopped = true; + else event.stopped=true; 'step 5' - if (target.isIn() && event.count > 0) { - if (event.count < 3 && !event.stopped && event.list.length > 0) event.goto(3); - else { - target.addTempSkill('oljuanxia_counter', { player: 'phaseAfter' }); - if (!target.storage.oljuanxia_counter) target.storage.oljuanxia_counter = {}; - if (!target.storage.oljuanxia_counter[player.playerid]) target.storage.oljuanxia_counter[player.playerid] = 0; - target.storage.oljuanxia_counter[player.playerid] += event.count; + if(target.isIn()&&event.count>0){ + if(event.count<3&&!event.stopped&&event.list.length>0) event.goto(3); + else{ + target.addTempSkill('oljuanxia_counter',{player:'phaseAfter'}); + if(!target.storage.oljuanxia_counter) target.storage.oljuanxia_counter={}; + if(!target.storage.oljuanxia_counter[player.playerid]) target.storage.oljuanxia_counter[player.playerid]=0; + target.storage.oljuanxia_counter[player.playerid]+=event.count; } } }, - subSkill: { - counter: { - trigger: { player: 'phaseEnd' }, - forced: true, - charlotte: true, - onremove: true, - filter: function (event, player) { - var map1 = (_status.connectMode ? lib.playerOL : game.playerMap), map2 = player.storage.oljuanxia_counter; - if (!map2) return false; - for (var i in map2) { - if (map1[i] && map1[i].isIn() && player.canUse('sha', map1[i], false)) return true; + subSkill:{ + counter:{ + trigger:{player:'phaseEnd'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + var map1=(_status.connectMode?lib.playerOL:game.playerMap),map2=player.storage.oljuanxia_counter; + if(!map2) return false; + for(var i in map2){ + if(map1[i]&&map1[i].isIn()&&player.canUse('sha',map1[i],false)) return true; } return false; }, - logTarget: function (event, player) { - var list = []; - var map1 = (_status.connectMode ? lib.playerOL : game.playerMap), map2 = player.storage.oljuanxia_counter; - if (!map2) return false; - for (var i in map2) { - if (map1[i] && map1[i].isIn()) list.push(map1[i]); + logTarget:function(event,player){ + var list=[]; + var map1=(_status.connectMode?lib.playerOL:game.playerMap),map2=player.storage.oljuanxia_counter; + if(!map2) return false; + for(var i in map2){ + if(map1[i]&&map1[i].isIn()) list.push(map1[i]); } return list; }, - content: function () { + content:function(){ 'step 0' - var list = []; - var map1 = (_status.connectMode ? lib.playerOL : game.playerMap), map2 = player.storage.oljuanxia_counter; - if (!map2) return false; - for (var i in map2) { - if (map1[i] && map1[i].isIn()) list.push(map1[i]); + var list=[]; + var map1=(_status.connectMode?lib.playerOL:game.playerMap),map2=player.storage.oljuanxia_counter; + if(!map2) return false; + for(var i in map2){ + if(map1[i]&&map1[i].isIn()) list.push(map1[i]); } list.sortBySeat(); - event.num = 0; - event.targets = list; + event.num=0; + event.targets=list; 'step 1' - var target = targets[num]; - event.target = target; - if (target.isIn() && player.canUse('sha', target, false)) player.chooseBool('狷狭:是否视为对' + get.translation(target) + '依次使用' + get.cnNumber(player.storage.oljuanxia_counter[target.playerid]) + '张【杀】?').set('goon', get.effect(target, { name: 'sha' }, player, player) > 0).set('ai', () => _status.event.goon); + var target=targets[num]; + event.target=target; + if(target.isIn()&&player.canUse('sha',target,false)) player.chooseBool('狷狭:是否视为对'+get.translation(target)+'依次使用'+get.cnNumber(player.storage.oljuanxia_counter[target.playerid])+'张【杀】?').set('goon',get.effect(target,{name:'sha'},player,player)>0).set('ai',()=>_status.event.goon); 'step 2' event.num++; - if (result.bool) event.count = player.storage.oljuanxia_counter[target.playerid]; - else if (event.num < targets.length) event.goto(1); + if(result.bool) event.count=player.storage.oljuanxia_counter[target.playerid]; + else if(event.num 0) event.redo(); - else if (event.num < targets.length) event.goto(1); + if(target.isIn()&&player.canUse('sha',target,false)) player.useCard({name:'sha',isCard:true},target,false); + if(event.count>0) event.redo(); + else if(event.num 1) { - var color = get.color(result[0], player); - for (var i = 1; i < result.length; i++) { - if (get.color(result[i], player) != color) { - if (player.countCards('h')) player.chooseToDiscard('h', true); + if(Array.isArray(result)&&result.length>1){ + var color=get.color(result[0],player); + for(var i=1;i 0; + prompt2:'令其交给你一张手牌,并根据类型获得对应的标记', + check:function(event,player){ + return get.attitude(_status.event.player,event.player)>0; }, - content: function () { + content:function(){ 'step 0' - event.target = trigger.player; - event.target.chooseCard('h', true, get.translation(player) + '发动了【诏颂】;请交给其一张手牌'); + event.target=trigger.player; + event.target.chooseCard('h',true,get.translation(player)+'发动了【诏颂】;请交给其一张手牌'); 'step 1' - if (result.bool) { - var card = result.cards[0]; - target.give(card, player, 'give'); - var type = get.type2(card, target); - if (lib.skill['zhaosong_' + type]) { - target.addSkill('zhaosong_' + type); - target.addMark('zhaosong_' + type); + if(result.bool){ + var card=result.cards[0]; + target.give(card,player,'give'); + var type=get.type2(card,target); + if(lib.skill['zhaosong_'+type]){ + target.addSkill('zhaosong_'+type); + target.addMark('zhaosong_'+type); } } }, - subSkill: { - basic: { - marktext: '颂', - intro: { - name: '诏颂(颂)', - name2: '颂', - content: '当你使用【杀】选择唯一目标时,你可移去“颂”,并为此【杀】增加至多两个目标。', + subSkill:{ + basic:{ + marktext:'颂', + intro:{ + name:'诏颂(颂)', + name2:'颂', + content:'当你使用【杀】选择唯一目标时,你可移去“颂”,并为此【杀】增加至多两个目标。', }, - trigger: { player: 'useCard2' }, - direct: true, - charlotte: true, - onremove: true, - filter: function (event, player) { - return player.hasMark('zhaosong_basic') && event.card.name == 'sha' && - event.targets.length == 1 && game.hasPlayer(function (current) { - return current != player && current != event.targets[0] && lib.filter.targetEnabled2(event.card, player, current); - }); + trigger:{player:'useCard2'}, + direct:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return player.hasMark('zhaosong_basic')&&event.card.name=='sha'&& + event.targets.length==1&&game.hasPlayer(function(current){ + return current!=player&¤t!=event.targets[0]&&lib.filter.targetEnabled2(event.card,player,current); + }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget([1, 2], '是否弃置“颂”标记?', '为' + get.translation(trigger.card) + '增加至多两个目标', function (card, player, target) { - var evt = _status.event.getTrigger(); - return target != player && target != evt.targets[0] && lib.filter.targetEnabled2(evt.card, player, target); - }).set('ai', function (target) { - var evt = _status.event.getTrigger(); - return get.effect(target, evt.card, evt.player, evt.player); + player.chooseTarget([1,2],'是否弃置“颂”标记?','为'+get.translation(trigger.card)+'增加至多两个目标',function(card,player,target){ + var evt=_status.event.getTrigger(); + return target!=player&&target!=evt.targets[0]&&lib.filter.targetEnabled2(evt.card,player,target); + }).set('ai',function(target){ + var evt=_status.event.getTrigger(); + return get.effect(target,evt.card,evt.player,evt.player); }); 'step 1' - if (result.bool) { - if (player != event.player && !player.isOnline()) game.delayx(); + if(result.bool){ + if(player!=event.player&&!player.isOnline()) game.delayx(); //player.addTempSkill('zhaosong_shaloss'); } else event.finish(); 'step 2' - var targets = result.targets; - player.logSkill('zhaosong_basic', targets); - player.removeMark('zhaosong_basic', 1); + var targets=result.targets; + player.logSkill('zhaosong_basic',targets); + player.removeMark('zhaosong_basic',1); player.removeSkill('zhaosong_basic'); trigger.targets.addArray(targets); - trigger.zhaosong_basic = true; + trigger.zhaosong_basic=true; }, },/* shaloss:{ @@ -11729,138 +11730,138 @@ game.import('character', function (lib, game, ui, get, ai, _status) { player.loseHp(); }, },*/ - trick: { - marktext: '诔', - intro: { - name: '诏颂(诔)', - name2: '诔', - content: '当你进入濒死状态时,你可移去“诔”,然后将体力回复至1点并摸一张牌。', + trick:{ + marktext:'诔', + intro:{ + name:'诏颂(诔)', + name2:'诔', + content:'当你进入濒死状态时,你可移去“诔”,然后将体力回复至1点并摸一张牌。', }, - trigger: { player: 'dying' }, - prompt: '是否弃置“诔”标记?', - prompt2: '回复体力至1点并摸一张牌。', - charlotte: true, - onremove: true, - filter: function (event, player) { - return player.hasMark('zhaosong_trick') && player.hp < 1; + trigger:{player:'dying'}, + prompt:'是否弃置“诔”标记?', + prompt2:'回复体力至1点并摸一张牌。', + charlotte:true, + onremove:true, + filter:function(event,player){ + return player.hasMark('zhaosong_trick')&&player.hp<1; }, - check: function (event, player) { - if (player.maxHp < 2 || 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, event.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); + check:function(event,player){ + if(player.maxHp<2||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,event.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; + })>=1+event.num-event.player.hp) return false; return true; }, - content: function () { - player.removeMark('zhaosong_trick', 1); + content:function(){ + player.removeMark('zhaosong_trick',1); player.removeSkill('zhaosong_trick'); //player.loseMaxHp(); - if (player.hp < 1) player.recover(1 - player.hp); + if(player.hp<1) player.recover(1-player.hp); player.draw(); }, }, - equip: { - marktext: '赋', - intro: { - name: '诏颂(赋)', - name2: '赋', - content: '出牌阶段开始时,你可移去“赋”并弃置一名角色区域内的至多两张牌。', + equip:{ + marktext:'赋', + intro:{ + name:'诏颂(赋)', + name2:'赋', + content:'出牌阶段开始时,你可移去“赋”并弃置一名角色区域内的至多两张牌。', }, - trigger: { player: 'phaseUseBegin' }, - direct: true, - charlotte: true, - onremove: true, - filter: function (event, player) { - return player.hasMark('zhaosong_equip') && game.hasPlayer(function (current) { - return current.hasCard(function (card) { - return lib.filter.canBeDiscarded(card, player, current); - }, 'hej'); + trigger:{player:'phaseUseBegin'}, + direct:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return player.hasMark('zhaosong_equip')&&game.hasPlayer(function(current){ + return current.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,current); + },'hej'); }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget('是否弃置“赋”标记?', '弃置一名角色区域内的至多两张牌', function (card, player, current) { - return current.hasCard(function (card) { - return lib.filter.canBeDiscarded(card, player, current); - }, 'hej'); - }).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target) > 0 ? 2 : 1; - return get.effect(target, { name: 'guohe_copy' }, player, player) * att; + player.chooseTarget('是否弃置“赋”标记?','弃置一名角色区域内的至多两张牌',function(card,player,current){ + return current.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,current); + },'hej'); + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target)>0?2:1; + return get.effect(target,{name:'guohe_copy'},player,player)*att; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('zhaosong_equip', target); - player.removeMark('zhaosong_equip', 1); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('zhaosong_equip',target); + player.removeMark('zhaosong_equip',1); player.removeSkill('zhaosong_equip'); - player.discardPlayerCard(target, true, 'hej', [1, 2]); + player.discardPlayerCard(target,true,'hej',[1,2]); } }, }, }, }, - lisi: { - audio: 2, - trigger: { player: 'useCardAfter' }, - direct: true, - filter: function (event, player) { - if (player == _status.currentPhase || !event.cards.filterInD().length) return false; - var hs = player.countCards('h'); - return game.hasPlayer(function (current) { - return current != player && current.countCards('h') <= hs; + lisi:{ + audio:2, + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(player==_status.currentPhase||!event.cards.filterInD().length) return false; + var hs=player.countCards('h'); + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')<=hs; }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('lisi'), '将' + get.translation(trigger.cards.filterInD()) + '交给一名手牌数不大于你的其他角色', function (card, player, target) { - return target != player && target.countCards('h') <= player.countCards('h'); + player.chooseTarget(get.prompt('lisi'),'将'+get.translation(trigger.cards.filterInD())+'交给一名手牌数不大于你的其他角色',function(card,player,target){ + return target!=player&&target.countCards('h')<=player.countCards('h'); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('lisi', target); - target.gain(trigger.cards.filterInD(), 'gain2'); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('lisi',target); + target.gain(trigger.cards.filterInD(),'gain2'); } }, }, //王荣 - olfengzi: { - audio: 2, - trigger: { player: 'useCard' }, - direct: true, - usable: 1, - filter: function (event, player) { - if (event.olfengzi_buff || !event.targets.length || !player.isPhaseUsing() || player.hasSkill('olfengzi_buff')) return false; - var type = get.type(event.card, false); - if (type != 'basic' && type != 'trick') return false; - return player.hasCard(function (i) { - if (_status.connectMode) return true; - return get.type2(i, player) == type; - }, 'h'); + olfengzi:{ + audio:2, + trigger:{player:'useCard'}, + direct:true, + usable:1, + filter:function(event,player){ + if(event.olfengzi_buff||!event.targets.length||!player.isPhaseUsing()||player.hasSkill('olfengzi_buff')) return false; + var type=get.type(event.card,false); + if(type!='basic'&&type!='trick') return false; + return player.hasCard(function(i){ + if(_status.connectMode) return true; + return get.type2(i,player)==type; + },'h'); }, - content: function () { + content:function(){ 'step 0' - if (player != game.me && !player.isUnderControl() && !player.isOnline()) game.delayx(); - var type = get.type(trigger.card, false); - player.chooseToDiscard('h', get.prompt('olfengzi'), '弃置一张' + get.translation(type) + '牌,令' + get.translation(trigger.card) + '结算两次', function (card, player) { - return get.type2(card, player) == _status.event.type; - }).set('type', type).set('ai', function (card) { - var player = _status.event.player; - var trigger = _status.event.getTrigger(); - if (trigger.card.name == 'tiesuo') return 0; - var num = 0; - for (var i of trigger.targets) num += get.effect(i, trigger.card, player, player); - if (num <= 0) return 0; - return 7 - get.value(card); - }).logSkill = 'olfengzi'; + if(player!=game.me&&!player.isUnderControl()&&!player.isOnline()) game.delayx(); + var type=get.type(trigger.card,false); + player.chooseToDiscard('h',get.prompt('olfengzi'),'弃置一张'+get.translation(type)+'牌,令'+get.translation(trigger.card)+'结算两次',function(card,player){ + return get.type2(card,player)==_status.event.type; + }).set('type',type).set('ai',function(card){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + if(trigger.card.name=='tiesuo') return 0; + var num=0; + for(var i of trigger.targets) num+=get.effect(i,trigger.card,player,player); + if(num<=0) return 0; + return 7-get.value(card); + }).logSkill='olfengzi'; 'step 1' - if (result.bool) { + if(result.bool){ trigger.effectCount++; } else player.storage.counttrigger.olfengzi--; @@ -11885,60 +11886,60 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, },*/ }, - oljizhan: { - audio: 2, - trigger: { player: 'phaseDrawBegin1' }, - filter: function (event, player) { + oljizhan:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ return !event.numFixed; }, - content: function () { + content:function(){ 'step 0' trigger.changeToZero(); - var card = get.cards()[0]; + var card=get.cards()[0]; game.cardsGotoOrdering(card); - event.cards = [card]; - event.num = get.number(card, false); - player.showCards(card, get.translation(player) + '发动了【吉占】'); + event.cards=[card]; + event.num=get.number(card,false); + player.showCards(card,get.translation(player)+'发动了【吉占】'); 'step 1' - var str = get.strNumber(num); - player.chooseControl('大于' + str, '小于' + str, 'cancel2').set('prompt', '吉占:猜测下一张牌的点数').set('choice', num < 7 ? 0 : 1).set('ai', () => _status.event.choice); + var str=get.strNumber(num); + player.chooseControl('大于'+str,'小于'+str,'cancel2').set('prompt','吉占:猜测下一张牌的点数').set('choice',num<7?0:1).set('ai',()=>_status.event.choice); 'step 2' - var card = get.cards()[0]; + var card=get.cards()[0]; game.cardsGotoOrdering(card); event.cards.push(card); - var num = get.number(card, false); - if (num > event.num && result.index == 0 || num < event.num && result.index == 1) { - event.num = num; + var num=get.number(card,false); + if(num>event.num&&result.index==0||num player.maxHp; + olfusong:{ + audio:2, + forceDie:true, + trigger:{player:'die'}, + skillAnimation:true, + animationColor:'gray', + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.maxHp>player.maxHp; }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('olfusong'), '令一名体力上限大于你的其他角色获得〖丰姿〗或〖吉占〗', function (card, player, target) { - return target.maxHp > player.maxHp; - }).set('forceDie', true).set('ai', (target) => get.attitude(_status.event.player, target)); + player.chooseTarget(get.prompt('olfusong'),'令一名体力上限大于你的其他角色获得〖丰姿〗或〖吉占〗',function(card,player,target){ + return target.maxHp>player.maxHp; + }).set('forceDie',true).set('ai',(target)=>get.attitude(_status.event.player,target)); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('olfusong', target); - target.chooseControl('olfengzi', 'oljizhan').set('prompt', '令' + get.translation(target) + '获得其中一个技能').set('ai', () => (Math.random() > 0.5 ? 0 : 1)); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('olfusong',target); + target.chooseControl('olfengzi','oljizhan').set('prompt','令'+get.translation(target)+'获得其中一个技能').set('ai',()=>(Math.random()>0.5?0:1)); } else event.finish(); 'step 2' @@ -11946,1009 +11947,1009 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //邓芝 - olxiuhao: { - audio: 2, - trigger: { global: 'damageBegin4' }, - usable: 1, - filter: function (event, player) { - return event.source && event.source.isIn() && [event.source, event.player].includes(player) && event.source != event.player; + olxiuhao:{ + audio:2, + trigger:{global:'damageBegin4'}, + usable:1, + filter:function(event,player){ + return event.source&&event.source.isIn()&&[event.source,event.player].includes(player)&&event.source!=event.player; }, - logTarget: function (event, player) { - return player == event.player ? event.source : event.player; + logTarget:function(event,player){ + return player==event.player?event.source:event.player; }, - check: function (event, player) { - _status.olxiuhao_judging = true; - var bool = false; - if (get.attitude(player, event.player) > 0) bool = true; - else if (2 * get.effect(event.source, { name: 'draw' }, player, _status.event.player) + event.num * get.damageEffect(player, event.source, _status.event.player, event.nature) > 0) bool = true; - else if (event.source.hasSkillTag('nogain')) bool = true; + check:function(event,player){ + _status.olxiuhao_judging=true; + var bool=false; + if(get.attitude(player,event.player)>0) bool=true; + else if(2*get.effect(event.source,{name:'draw'},player,_status.event.player)+event.num*get.damageEffect(player,event.source,_status.event.player,event.nature)>0) bool=true; + else if(event.source.hasSkillTag('nogain')) bool=true; delete _status.olxiuhao_judging; return bool; }, - content: function () { + content:function(){ trigger.cancel(); trigger.source.draw(2); }, - ai: { - effect: { - target: function (card, player, target) { - if (!_status.olxiuhao_judging && get.tag(card, 'damage') && get.attitude(target, player) > 0 && player != target && (!target.storage.counttrigger || !target.storage.counttrigger.olxiuhao)) return [0, 0.5, 0, 0.5]; + ai:{ + effect:{ + target:function(card,player,target){ + if(!_status.olxiuhao_judging&&get.tag(card,'damage')&&get.attitude(target,player)>0&&player!=target&&(!target.storage.counttrigger||!target.storage.counttrigger.olxiuhao)) return [0,0.5,0,0.5]; }, - player: function (card, player, target) { - if (!_status.olxiuhao_judging && get.tag(card, 'damage') && get.attitude(player, target) > 0 && player != target && (!player.storage.counttrigger || !player.storage.counttrigger.olxiuhao)) return [0, 0.5, 0, 0.5]; + player:function(card,player,target){ + if(!_status.olxiuhao_judging&&get.tag(card,'damage')&&get.attitude(player,target)>0&&player!=target&&(!player.storage.counttrigger||!player.storage.counttrigger.olxiuhao)) return [0,0.5,0,0.5]; }, }, }, }, - olsujian: { - trigger: { player: 'phaseDiscardBefore' }, - forced: true, - content: function () { + olsujian:{ + trigger:{player:'phaseDiscardBefore'}, + forced:true, + content:function(){ trigger.setContent(lib.skill.olsujian.phaseDiscard); }, - phaseDiscard: function () { + phaseDiscard:function(){ 'step 0' - game.log(player, '进入了弃牌阶段'); - game.broadcastAll(function (player) { - if (lib.config.show_phase_prompt) { - player.popup('弃牌阶段', null, false); + game.log(player,'进入了弃牌阶段'); + game.broadcastAll(function(player){ + if(lib.config.show_phase_prompt){ + player.popup('弃牌阶段',null,false); } - }, player); + },player); event.trigger('phaseDiscard'); 'step 1' - var cards = lib.skill.olsujian.update(player); - if (!cards.length) event.finish(); - else { - event.cards = cards; - var str = get.translation(cards); - player.chooseControl().set('choiceList', [ - '将' + str + '分配给任意名其他角色', - '弃置' + str + '并弃置一名其他角色至多等量的牌', - ]).set('ai', function () { - var cards = _status.event.getParent().cards, player = _status.event.player; - if (!game.hasPlayer(function (current) { - return player !== current && get.attitude(player, current) > 0; + var cards=lib.skill.olsujian.update(player); + if(!cards.length) event.finish(); + else{ + event.cards=cards; + var str=get.translation(cards); + player.chooseControl().set('choiceList',[ + '将'+str+'分配给任意名其他角色', + '弃置'+str+'并弃置一名其他角色至多等量的牌', + ]).set('ai',function(){ + var cards=_status.event.getParent().cards,player=_status.event.player; + if(!game.hasPlayer(function(current){ + return player!==current&&get.attitude(player,current)>0; })) return 1; - if (game.hasPlayer(function (current) { - var att = get.attitude(player, current); - return att && current.countDiscardableCards(player, 'he', function (i) { - if (att > 0) return get.value(i, current) < 0; - return get.value(i, current) >= 4; - }) >= cards.length && get.effect(current, { name: 'guohe_copy2' }, player, player) > 0; + if(game.hasPlayer(function(current){ + var att=get.attitude(player,current); + return att&¤t.countDiscardableCards(player,'he',function(i){ + if(att>0) return get.value(i,current)<0; + return get.value(i,current)>=4; + })>=cards.length&&get.effect(current,{name:'guohe_copy2'},player,player)>0; })) return 1; return 0; }); } 'step 2' - if (result.index == 1) { - cards = event.cards.filter(function (i) { - return lib.filter.cardDiscardable(i, player, 'olsujian'); + if(result.index==1){ + cards=event.cards.filter(function(i){ + return lib.filter.cardDiscardable(i,player,'olsujian'); }); - if (cards.length) { - event.num = cards.length; + if(cards.length){ + event.num=cards.length; player.discard(cards); - event.cards = cards; + event.cards=cards; } else event.finish(); } else event.goto(5); 'step 3' - if (game.hasPlayer(function (current) { - return current != player && current.countDiscardableCards(player, 'he') > 0; - })) { - player.chooseTarget(true, '弃置一名其他角色的至多' + get.cnNumber(num) + '张牌', function (card, player, current) { - return current != player && current.countDiscardableCards(player, 'he') > 0; - }).set('ai', function (current) { - var att = get.attitude(player, current); - if (current.countDiscardableCards(player, 'he', function (i) { - if (att > 0) return get.value(i, current) >= 4; - return get.value(i, current) <= 0; - }) >= num) return 4 * get.effect(current, { name: 'guohe_copy2' }, player, player); - return get.effect(current, { name: 'guohe_copy2' }, player, player); + if(game.hasPlayer(function(current){ + return current!=player&¤t.countDiscardableCards(player,'he')>0; + })){ + player.chooseTarget(true,'弃置一名其他角色的至多'+get.cnNumber(num)+'张牌',function(card,player,current){ + return current!=player&¤t.countDiscardableCards(player,'he')>0; + }).set('ai',function(current){ + var att=get.attitude(player,current); + if(current.countDiscardableCards(player,'he',function(i){ + if(att>0) return get.value(i,current)>=4; + return get.value(i,current)<=0; + })>=num) return 4*get.effect(current,{name:'guohe_copy2'},player,player); + return get.effect(current,{name:'guohe_copy2'},player,player); }); } else event.finish(); 'step 4' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'green'); - player.discardPlayerCard(target, true, [1, num]); + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + player.discardPlayerCard(target,true,[1,num]); } event.finish(); 'step 5' - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; 'step 6' player.chooseCardTarget({ - filterCard: function (card) { + filterCard:function(card){ return card.hasGaintag('olsujian'); }, - filterTarget: lib.filter.notMe, - selectCard: [1, cards.length], - forced: true, - prompt: '请选择要分配的卡牌和目标', - ai1: function (card) { - if (!ui.selected.cards.length) return 1; + filterTarget:lib.filter.notMe, + selectCard:[1,cards.length], + forced:true, + prompt:'请选择要分配的卡牌和目标', + ai1:function(card){ + if(!ui.selected.cards.length) return 1; return 0; }, - ai2: function (target) { - var player = _status.event.player, card = ui.selected.cards[0]; - var val = target.getUseValue(card); - if (val > 0) return val * get.attitude(player, target) * 2; - return get.value(card, target) * get.attitude(player, target); + ai2:function(target){ + var player=_status.event.player,card=ui.selected.cards[0]; + var val=target.getUseValue(card); + if(val>0) return val*get.attitude(player,target)*2; + return get.value(card,target)*get.attitude(player,target); }, }); 'step 7' - if (result.bool) { - var res = result.cards, target = result.targets[0].playerid; - player.removeGaintag('olsujian', res); - player.addGaintag(res, 'olsujian_given'); + if(result.bool){ + var res=result.cards,target=result.targets[0].playerid; + player.removeGaintag('olsujian',res); + player.addGaintag(res,'olsujian_given'); cards.removeArray(res); - if (!event.given_map[target]) event.given_map[target] = []; + if(!event.given_map[target]) event.given_map[target]=[]; event.given_map[target].addArray(res); - if (cards.length) event.goto(6); + if(cards.length) event.goto(6); } else event.finish(); 'step 8' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - var map = [], cards = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - player.line(source, 'green'); - map.push([source, event.given_map[i]]); + var map=[],cards=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + map.push([source,event.given_map[i]]); cards.addArray(event.given_map[i]); } - if (map.length) game.loseAsync({ - gain_list: map, - player: player, - cards: cards, - giver: player, - animate: 'giveAuto', + if(map.length) game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', }).setContent('gaincardMultiple'); 'step 9' - event.cards = []; + event.cards=[]; }, - update: function (player) { + update:function(player){ player.removeGaintag('olsujian'); - var hs = player.getCards('h'); - player.getHistory('gain', function (evt) { + var hs=player.getCards('h'); + player.getHistory('gain',function(evt){ hs.removeArray(evt.cards); }); - if (hs.length) player.addGaintag(hs, 'olsujian'); + if(hs.length) player.addGaintag(hs,'olsujian'); return hs; }, - group: 'olsujian_sync', - subSkill: { - sync: { - trigger: { player: ['phaseBeginStart', 'gainBegin'] }, - forced: true, - popup: false, - firstDo: true, - filter: function (event, player) { - if (event.name == 'gain') return (player == _status.currentPhase) && (event.getParent('olsujian').player != player); + group:'olsujian_sync', + subSkill:{ + sync:{ + trigger:{player:['phaseBeginStart','gainBegin']}, + forced:true, + popup:false, + firstDo:true, + filter:function(event,player){ + if(event.name=='gain') return (player==_status.currentPhase)&&(event.getParent('olsujian').player!=player); return true; }, - content: function () { + content:function(){ lib.skill.olsujian.update(player); }, }, }, }, //卞夫人 - fuwei: { - audio: 'wanwei', - trigger: { - player: 'loseAfter', - global: 'gainAfter', + fuwei:{ + audio:'wanwei', + trigger:{ + player:'loseAfter', + global:'gainAfter', }, - filter: function (event, player) { - var evt = event; - if (event.name == 'lose') { - if (event.type != 'discard') return false; - evt = event.getParent(); + filter:function(event,player){ + var evt=event; + if(event.name=='lose'){ + if(event.type!='discard') return false; + evt=event.getParent(); } - if (evt[event.name == 'gain' ? 'bySelf' : 'notBySelf'] != true) return false; - var evtx = event.getl(player); - return evtx && evtx.cards2 && evtx.cards2.length > 0; + if(evt[event.name=='gain'?'bySelf':'notBySelf']!=true) return false; + var evtx=event.getl(player); + return evtx&&evtx.cards2&&evtx.cards2.length>0; }, - prompt2: function (event, player) { - var evt = event.getl(player), origins = evt.cards2.map(function (i) { - return get.name(i, evt.hs.includes(i) ? player : false); + prompt2:function(event,player){ + var evt=event.getl(player),origins=evt.cards2.map(function(i){ + return get.name(i,evt.hs.includes(i)?player:false); }); - return '从牌堆中获得' + get.translation(origins) + ';若没有则改为摸一张牌'; + return '从牌堆中获得'+get.translation(origins)+';若没有则改为摸一张牌'; }, - usable: 1, - content: function () { - var num = 0, cards = [], evt = trigger.getl(player), origins = evt.cards2.map(function (i) { - return get.name(i, evt.hs.includes(i) ? player : false); + usable:1, + content:function(){ + var num=0,cards=[],evt=trigger.getl(player),origins=evt.cards2.map(function(i){ + return get.name(i,evt.hs.includes(i)?player:false); }); - for (var i of origins) { - var card = get.cardPile2(function (card) { - return card.name == i && !cards.includes(card); + for(var i of origins){ + var card=get.cardPile2(function(card){ + return card.name==i&&!cards.includes(card); }); - if (card) cards.push(card); + if(card) cards.push(card); else num++; } - if (cards.length) player.gain(cards, 'gain2'); - if (num) player.draw(num); + if(cards.length) player.gain(cards,'gain2'); + if(num) player.draw(num); }, }, - yuejian: { - audio: 2, - usable: 2, - trigger: { global: 'useCardAfter' }, - filter: function (event, player) { - return player != event.player && event.targets && event.targets.includes(player) && player.countCards('h') > 0; + yuejian:{ + audio:2, + usable:2, + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + return player!=event.player&&event.targets&&event.targets.includes(player)&&player.countCards('h')>0; }, - prompt2: function (event, player) { - var suit = get.suit(event.card), hs = player.getCards('h'), cards = event.cards.filterInD(); - if (!lib.suit.includes(suit) || !cards.length) { + prompt2:function(event,player){ + var suit=get.suit(event.card),hs=player.getCards('h'),cards=event.cards.filterInD(); + if(!lib.suit.includes(suit)||!cards.length){ return '展示所有手牌,然后无事发生'; } - for (var i of hs) { - if (get.suit(i) == suit) { + for(var i of hs){ + if(get.suit(i)==suit){ return '展示所有手牌,然后无事发生'; } } - return '展示所有手牌,然后获得' + get.translation(cards) + ''; + return '展示所有手牌,然后获得'+get.translation(cards)+''; }, - check: function (event, player) { - var suit = get.suit(event.card), hs = player.getCards('h'), cards = event.cards.filterInD(); - if (!lib.suit.includes(suit) || !cards.length) { + check:function(event,player){ + var suit=get.suit(event.card),hs=player.getCards('h'),cards=event.cards.filterInD(); + if(!lib.suit.includes(suit)||!cards.length){ return false; } - for (var i of hs) { - if (get.suit(i) == suit) { + for(var i of hs){ + if(get.suit(i)==suit){ return false; } } return true; }, - content: function () { + content:function(){ 'step 0' - player.showHandcards(get.translation(player) + '发动了【约俭】'); - var suit = get.suit(trigger.card), hs = player.getCards('h'); - if (!lib.suit.includes(suit)) { event.finish(); return; } - for (var i of hs) { - if (get.suit(i) == suit) { + player.showHandcards(get.translation(player)+'发动了【约俭】'); + var suit=get.suit(trigger.card),hs=player.getCards('h'); + if(!lib.suit.includes(suit)){event.finish();return;} + for(var i of hs){ + if(get.suit(i)==suit){ event.finish(); return; } } 'step 1' - var cards = trigger.cards.filterInD(); - if (cards.length) player.gain(cards, 'gain2'); + var cards=trigger.cards.filterInD(); + if(cards.length) player.gain(cards,'gain2'); }, }, //杜袭 - quxi: { - audio: 2, - trigger: { player: 'phaseUseEnd' }, - direct: true, - limited: true, - skillAnimation: true, - animationColor: 'water', - filter: function (event, player) { - if (player.isTurnedOver()) return false; - var list = game.filterPlayer((target) => target != player && !target.hasMark('quxi_gain') && !target.hasMark('quxi_lose')); - if (list.length < 2) return false; - var nf = list[0].countCards('h'); - for (var i = 1; i < list.length; i++) { - if (list[i].countCards('h') != nf) return true; + quxi:{ + audio:2, + trigger:{player:'phaseUseEnd'}, + direct:true, + limited:true, + skillAnimation:true, + animationColor:'water', + filter:function(event,player){ + if(player.isTurnedOver()) return false; + var list=game.filterPlayer((target)=>target!=player&&!target.hasMark('quxi_gain')&&!target.hasMark('quxi_lose')); + if(list.length<2) return false; + var nf=list[0].countCards('h'); + for(var i=1;i hs && !current.hasMark('quxi_gain') && !current.hasMark('quxi_lose'); - })) return get.attitude(player, target) / (Math.sqrt(1 + target.countCards('h'))); + player.chooseTarget(2,get.prompt('quxi'),'选择两名手牌数不同的其他角色。你将翻至背面,令这两名角色中手牌数较少的角色获得另一名角色的一张牌并获得一枚“丰”,另一名角色获得一枚“歉”。',function(card,player,target){ + if(player==target||target.hasMark('quxi_gain')||target.hasMark('quxi_lose')) return false; + if(!ui.selected.targets.length) return true; + return target.countCards('h')!=ui.selected.targets[0].countCards('h'); + }).set('complexTarget',true).set('ai',function(target){ + if(!ui.selected.targets.length){ + var player=_status.event.player,hs=target.countCards('h'); + if(game.hasPlayer(function(current){ + return current!=player&¤t!=target&¤t.countCards('h')>hs&&!current.hasMark('quxi_gain')&&!current.hasMark('quxi_lose'); + })) return get.attitude(player,target)/(Math.sqrt(1+target.countCards('h'))); return 0; } - if (target.countCards('h') > ui.selected.targets[0].countCards('h')) return -get.attitude(_status.event.player, target); + if(target.countCards('h')>ui.selected.targets[0].countCards('h')) return -get.attitude(_status.event.player,target); return 0; }); 'step 1' - if (result.bool) { - player.logSkill('quxi', result.targets); + if(result.bool){ + player.logSkill('quxi',result.targets); player.awakenSkill('quxi'); player.skip('phaseDiscard'); - if (result.targets[0].countCards('h') > result.targets[1].countCards('h')) result.targets.reverse(); - event.gainner = result.targets[0]; - event.giver = result.targets[1]; + if(result.targets[0].countCards('h')>result.targets[1].countCards('h')) result.targets.reverse(); + event.gainner=result.targets[0]; + event.giver=result.targets[1]; player.turnOver(); } else event.finish(); 'step 2' - event.gainner.gainPlayerCard(event.giver, true, 'he'); + event.gainner.gainPlayerCard(event.giver,true,'he'); 'step 3' player.addSkill('quxi_effect'); - event.gainner.addMark('quxi_gain', 1); - event.giver.addMark('quxi_lose', 1); + event.gainner.addMark('quxi_gain',1); + event.giver.addMark('quxi_lose',1); }, - subSkill: { - effect: { - global: 'quxi_gainlose', - trigger: { global: ['roundStart', 'die'] }, - charlotte: true, - direct: true, - filter: function (event, player) { - if (event.name == 'die') return event.player.countMark('quxi_gain') > 0 || event.player.countMark('quxi_lose') > 0; - return game.hasPlayer(function (target) { - return target != player && (target.countMark('quxi_gain') > 0 || target.countMark('quxi_lose') > 0) + subSkill:{ + effect:{ + global:'quxi_gainlose', + trigger:{global:['roundStart','die']}, + charlotte:true, + direct:true, + filter:function(event,player){ + if(event.name=='die') return event.player.countMark('quxi_gain')>0||event.player.countMark('quxi_lose')>0; + return game.hasPlayer(function(target){ + return target!=player&&(target.countMark('quxi_gain')>0||target.countMark('quxi_lose')>0) }); }, - content: function () { + content:function(){ 'step 0' - if (trigger.name == 'die') { - var gain = trigger.player.countMark('quxi_gain'), lose = trigger.player.countMark('quxi_lose'); - player.chooseTarget('是否令一名角色获得' + get.translation(trigger.player) + '的“' + (gain && lose ? '丰”和“歉' : (gain ? '丰' : '歉')) + '”标记?', function (card, player, target) { - return !target.hasMark('quxi_gain') && !target.hasMark('quxi_lose'); - }).set('goon', gain - lose).set('ai', function (target) { - var evt = _status.event; - return evt.goon * get.attitude(evt.player, target); + if(trigger.name=='die'){ + var gain=trigger.player.countMark('quxi_gain'),lose=trigger.player.countMark('quxi_lose'); + player.chooseTarget('是否令一名角色获得'+get.translation(trigger.player)+'的“'+(gain&&lose?'丰”和“歉':(gain?'丰':'歉'))+'”标记?',function(card,player,target){ + return !target.hasMark('quxi_gain')&&!target.hasMark('quxi_lose'); + }).set('goon',gain-lose).set('ai',function(target){ + var evt=_status.event; + return evt.goon*get.attitude(evt.player,target); }); } else event.goto(2); 'step 1' - if (result.bool) { - var targets = result.targets; - if (targets.length < 2) targets.unshift(trigger.player); - player.logSkill('quxi_effect', targets, false); + if(result.bool){ + var targets=result.targets; + if(targets.length<2) targets.unshift(trigger.player); + player.logSkill('quxi_effect',targets,false); player.line2(targets); - var gain = targets[0].countMark('quxi_gain'), lose = targets[0].countMark('quxi_lose'); - if (gain) { - targets[0].removeMark('quxi_gain', gain); - targets[1].addMark('quxi_gain', gain); + var gain=targets[0].countMark('quxi_gain'),lose=targets[0].countMark('quxi_lose'); + if(gain){ + targets[0].removeMark('quxi_gain',gain); + targets[1].addMark('quxi_gain',gain); } - if (lose) { - targets[0].removeMark('quxi_lose', lose); - targets[1].addMark('quxi_lose', lose); + if(lose){ + targets[0].removeMark('quxi_lose',lose); + targets[1].addMark('quxi_lose',lose); } game.delayx(); event.finish(); } 'step 2' - if (game.hasPlayer(function (target) { - return target.countMark('quxi_gain') > 0; - })) player.chooseTarget(2, '是否转移“丰”标记?', function (card, player, target) { - if (ui.selected.targets.length) return (!target.hasMark('quxi_gain') && !target.hasMark('quxi_lose')); - return target.countMark('quxi_gain') > 0; - }).set('complexTarget', true).set('complexSelect', true).set('targetprompt', ['移走标记', '获得标记']).set('ai', function (target) { - var player = _status.event.player; - if (!ui.selected.targets.length) { - return -get.attitude(player, target); + if(game.hasPlayer(function(target){ + return target.countMark('quxi_gain')>0; + })) player.chooseTarget(2,'是否转移“丰”标记?',function(card,player,target){ + if(ui.selected.targets.length) return (!target.hasMark('quxi_gain')&&!target.hasMark('quxi_lose')); + return target.countMark('quxi_gain')>0; + }).set('complexTarget',true).set('complexSelect',true).set('targetprompt',['移走标记','获得标记']).set('ai',function(target){ + var player=_status.event.player; + if(!ui.selected.targets.length){ + return -get.attitude(player,target); } - return get.attitude(player, target); + return get.attitude(player,target); }); else event.goto(4); 'step 3' - if (result.bool) { - var targets = result.targets; - player.logSkill('quxi_effect', targets, false); + if(result.bool){ + var targets=result.targets; + player.logSkill('quxi_effect',targets,false); player.line2(targets); - var gain = targets[0].countMark('quxi_gain'); - if (gain) { - targets[0].removeMark('quxi_gain', gain); - targets[1].addMark('quxi_gain', gain); + var gain=targets[0].countMark('quxi_gain'); + if(gain){ + targets[0].removeMark('quxi_gain',gain); + targets[1].addMark('quxi_gain',gain); } game.delayx(); } 'step 4' - if (game.hasPlayer(function (target) { - return target.countMark('quxi_lose') > 0; - })) player.chooseTarget(2, '是否转移“歉”标记?', function (card, player, target) { - if (ui.selected.targets.length) return (!target.hasMark('quxi_gain') && !target.hasMark('quxi_lose')); - return target.countMark('quxi_lose') > 0; - }).set('complexTarget', true).set('complexSelect', true).set('targetprompt', ['移走标记', '获得标记']).set('ai', function (target) { - var player = _status.event.player; - if (!ui.selected.targets.length) { - return get.attitude(player, target); + if(game.hasPlayer(function(target){ + return target.countMark('quxi_lose')>0; + })) player.chooseTarget(2,'是否转移“歉”标记?',function(card,player,target){ + if(ui.selected.targets.length) return (!target.hasMark('quxi_gain')&&!target.hasMark('quxi_lose')); + return target.countMark('quxi_lose')>0; + }).set('complexTarget',true).set('complexSelect',true).set('targetprompt',['移走标记','获得标记']).set('ai',function(target){ + var player=_status.event.player; + if(!ui.selected.targets.length){ + return get.attitude(player,target); } - return -get.attitude(player, target); + return -get.attitude(player,target); }); else event.finish(); 'step 5' - if (result.bool) { - var targets = result.targets; - player.logSkill('quxi_effect', targets, false); + if(result.bool){ + var targets=result.targets; + player.logSkill('quxi_effect',targets,false); player.line2(targets); - var gain = targets[0].countMark('quxi_lose'); - if (gain) { - targets[0].removeMark('quxi_lose', gain); - targets[1].addMark('quxi_lose', gain); + var gain=targets[0].countMark('quxi_lose'); + if(gain){ + targets[0].removeMark('quxi_lose',gain); + targets[1].addMark('quxi_lose',gain); } game.delayx(); } }, }, - gainlose: { - trigger: { player: 'phaseDrawBegin' }, - forced: true, - filter: function (event, player) { - if (event.numFixed) return false; - return player.countMark('quxi_gain') - player.countMark('quxi_lose') != 0; + gainlose:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + filter:function(event,player){ + if(event.numFixed) return false; + return player.countMark('quxi_gain')-player.countMark('quxi_lose')!=0; }, - content: function () { - trigger.num += (player.countMark('quxi_gain') - player.countMark('quxi_lose')); + content:function(){ + trigger.num+=(player.countMark('quxi_gain')-player.countMark('quxi_lose')); }, }, - gain: { - marktext: '丰', - intro: { - name: '驱徙(丰)', - name2: '丰', - content: 'mark', + gain:{ + marktext:'丰', + intro:{ + name:'驱徙(丰)', + name2:'丰', + content:'mark', }, }, - lose: { - marktext: '歉', - intro: { - name: '驱徙(歉)', - name2: '歉', - content: 'mark', + lose:{ + marktext:'歉', + intro:{ + name:'驱徙(歉)', + name2:'歉', + content:'mark', }, }, }, }, - bixiong: { - trigger: { - player: 'loseAfter', - global: 'loseAsyncAfter', + bixiong:{ + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', }, - forced: true, - filter: function (event, player) { - if (event.type != 'discard' || event.getlx === false || event.getParent('phaseDiscard').player != player) return false; - var evt = event.getl(player); - return evt && evt.hs && evt.hs.length > 0; + forced:true, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false||event.getParent('phaseDiscard').player!=player) return false; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length>0; }, - content: function () { - var cards = [], hs = trigger.getl(player).hs; - for (var i of hs) cards.add(get.suit(i, player)); - player.addTempSkill('bixiong2', { player: 'phaseBegin' }); - player.markAuto('bixiong2', cards); + content:function(){ + var cards=[],hs=trigger.getl(player).hs; + for(var i of hs) cards.add(get.suit(i,player)); + player.addTempSkill('bixiong2',{player:'phaseBegin'}); + player.markAuto('bixiong2',cards); }, }, - bixiong2: { - onremove: true, - mod: { - targetEnabled: function (card, player, target) { - if (player !== target && target.getStorage('bixiong2').includes(get.suit(card))) return false; + bixiong2:{ + onremove:true, + mod:{ + targetEnabled:function(card,player,target){ + if(player!==target&&target.getStorage('bixiong2').includes(get.suit(card))) return false; }, }, - intro: { content: '不能成为其他角色$牌的目标' }, + intro:{content:'不能成为其他角色$牌的目标'}, }, //高干 - juguan: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { + juguan:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ return event.filterCard({ - name: 'sha', - }, player, event) || event.filterCard({ - name: 'juedou', - }, player, event); + name:'sha', + },player,event)||event.filterCard({ + name:'juedou', + },player,event); }, - chooseButton: { - dialog: function () { - return ui.create.dialog('拒关', [['sha', 'juedou'], 'vcard']); + chooseButton:{ + dialog:function(){ + return ui.create.dialog('拒关',[['sha','juedou'],'vcard']); }, - filter: function (button, player) { - var evt = _status.event.getParent(); + filter:function(button,player){ + var evt=_status.event.getParent(); return evt.filterCard({ - name: button.link[2], - }, player, evt); + name:button.link[2], + },player,evt); }, - check: function (button) { + check:function(button){ return _status.event.player.getUseValue({ - name: button.link[2], - }) * (button.link[2] == 'juedou' ? 3 : 1); + name:button.link[2], + })*(button.link[2]=='juedou'?3:1); }, - backup: function (links) { + backup:function(links){ return { - audio: 'juguan', - viewAs: { name: links[0][2] }, - filterCard: true, - check: function (card) { - return 6 - get.value(card); + audio:'juguan', + viewAs:{name:links[0][2]}, + filterCard:true, + check:function(card){ + return 6-get.value(card); }, - position: 'hs', - onuse: function (result, player) { + position:'hs', + onuse:function(result,player){ player.addTempSkill('juguan_effect'); }, } }, - prompt: function (links) { - return '将一张手牌当做' + get.translation(links[0][2]) + '使用'; + prompt:function(links){ + return '将一张手牌当做'+get.translation(links[0][2])+'使用'; }, }, - ai: { - order: function (item, player) { - return Math.max(get.order({ name: 'sha' }), get.order({ name: 'juedou' })) + 0.2; + ai:{ + order:function(item,player){ + return Math.max(get.order({name:'sha'}),get.order({name:'juedou'}))+0.2; }, - result: { player: 1 }, + result:{player:1}, }, - subSkill: { - effect: { - trigger: { global: 'damage' }, - forced: true, - charlotte: true, - firstDo: true, - silent: true, - popup: false, - filter: function (event, player) { - var evt = event.getParent('useCard'); - return event.card && evt && event.card == evt.card && evt.skill == 'juguan_backup' && evt.player == player; + subSkill:{ + effect:{ + trigger:{global:'damage'}, + forced:true, + charlotte:true, + firstDo:true, + silent:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent('useCard'); + return event.card&&evt&&event.card==evt.card&&evt.skill=='juguan_backup'&&evt.player==player; }, - content: function () { + content:function(){ player.addSkill('juguan_draw'); - player.markAuto('juguan_draw', [trigger.player]); + player.markAuto('juguan_draw',[trigger.player]); }, }, - draw: { - audio: 'juguan', - trigger: { player: 'phaseDrawBegin' }, - forced: true, - charlotte: true, - onremove: true, - content: function () { + draw:{ + audio:'juguan', + trigger:{player:'phaseDrawBegin'}, + forced:true, + charlotte:true, + onremove:true, + content:function(){ player.removeSkill('juguan_draw'); - if (!trigger.numFixed) trigger.num += 2; + if(!trigger.numFixed) trigger.num+=2; }, - group: 'juguan_clear', - intro: { - content: '若没有受到$的伤害,则下个摸牌阶段多摸两张牌', + group:'juguan_clear', + intro:{ + content:'若没有受到$的伤害,则下个摸牌阶段多摸两张牌', }, }, - clear: { - trigger: { player: 'damage' }, - forced: true, - charlotte: true, - firstDo: true, - silent: true, - popup: false, - filter: function (event, player) { - return player.storage.juguan_draw && player.storage.juguan_draw.includes(event.source); + clear:{ + trigger:{player:'damage'}, + forced:true, + charlotte:true, + firstDo:true, + silent:true, + popup:false, + filter:function(event,player){ + return player.storage.juguan_draw&&player.storage.juguan_draw.includes(event.source); }, - content: function () { - player.unmarkAuto('juguan_draw', [trigger.source]); - if (!player.storage.juguan_draw || !player.storage.juguan_draw.length) player.removeSkill('juguan_draw'); + content:function(){ + player.unmarkAuto('juguan_draw',[trigger.source]); + if(!player.storage.juguan_draw||!player.storage.juguan_draw.length) player.removeSkill('juguan_draw'); }, }, }, }, //OL鲍三娘 - olwuniang: { - audio: 'xinfu_wuniang', - trigger: { player: 'useCardAfter' }, - usable: 1, - filter: function (event, player) { - return event.card.name == 'sha' && event.targets.length == 1 && event.targets[0].isIn(); + olwuniang:{ + audio:'xinfu_wuniang', + trigger:{player:'useCardAfter'}, + usable:1, + filter:function(event,player){ + return event.card.name=='sha'&&event.targets.length==1&&event.targets[0].isIn(); }, - logTarget: 'targets', - content: function () { + logTarget:'targets', + content:function(){ 'step 0' - var target = trigger.targets[0]; - target.chooseToUse(function (card, player, event) { - if (get.name(card) != 'sha') return false; - return lib.filter.filterCard.apply(this, arguments); - }, '武娘:是否对' + get.translation(player) + '使用一张杀?').set('targetRequired', true).set('complexSelect', true).set('filterTarget', function (card, player, target) { - if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false; - return lib.filter.filterTarget.apply(this, arguments); - }).set('sourcex', player); + var target=trigger.targets[0]; + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'武娘:是否对'+get.translation(player)+'使用一张杀?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',player); 'step 1' player.addTempSkill('olwuniang2'); - player.addMark('olwuniang2', 1, false); + player.addMark('olwuniang2',1,false); player.draw(); }, }, - olwuniang2: { - onremove: true, - charlotte: true, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.countMark('olwuniang2'); + olwuniang2:{ + onremove:true, + charlotte:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('olwuniang2'); }, }, }, - olxushen: { - derivation: 'olzhennan', - audio: 'xinfu_xushen', - trigger: { player: 'dying' }, - limited: true, - skillAnimation: true, - animationColor: 'fire', - filter: function (event, player) { - return player.hp < 1; + olxushen:{ + derivation:'olzhennan', + audio:'xinfu_xushen', + trigger:{player:'dying'}, + limited:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + return player.hp<1; }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('olxushen'); player.addSkills('olzhennan'); - player.recover(1 - player.hp); + player.recover(1-player.hp); 'step 1' - if (!player.isDying() && !game.hasPlayer(function (current) { - return current.name1 == 'guansuo' || current.name2 == 'guansuo'; - })) { - player.chooseTarget(function (card, player, current) { - return current != player && current.hasSex('male'); - }, '许身:是否令一名其他男性角色选择是否将其武将牌替换为“关索”?').set('ai', function (target) { - return get.attitude(_status.event.player, target) - 4; + if(!player.isDying()&&!game.hasPlayer(function(current){ + return current.name1=='guansuo'||current.name2=='guansuo'; + })){ + player.chooseTarget(function(card,player,current){ + return current!=player&¤t.hasSex('male'); + },'许身:是否令一名其他男性角色选择是否将其武将牌替换为“关索”?').set('ai',function(target){ + return get.attitude(_status.event.player,target)-4; }); } else event.finish(); 'step 2' - if (!result.bool) { + if(!result.bool){ event.finish(); return; } - var target = result.targets[0]; - event.target = target; - player.line(target, 'fire'); + var target=result.targets[0]; + event.target=target; + player.line(target,'fire'); target.chooseBool('许身:是否将自己的一张武将牌替换为“关索”?'); 'step 3' - if (result.bool) { - if (target.name2 != undefined) { - target.chooseControl(target.name1, target.name2).set('prompt', '请选择要更换的武将牌'); + if(result.bool){ + if(target.name2!=undefined){ + target.chooseControl(target.name1,target.name2).set('prompt','请选择要更换的武将牌'); } - else event._result = { control: target.name1 }; + else event._result={control:target.name1}; } else event.finish(); 'step 4' - target.reinitCharacter(result.control, 'guansuo'); + target.reinitCharacter(result.control,'guansuo'); }, }, - olzhennan: { - audio: 'xinfu_zhennan', - enable: 'phaseUse', - usable: 1, - viewAs: { name: 'nanman' }, - filterCard: true, - selectCard: function () { - if (ui.selected.targets.length) return [ui.selected.targets.length, Math.min(ui.selected.targets.length + 1, game.players.length - 1)]; - return [1, Infinity]; + olzhennan:{ + audio:'xinfu_zhennan', + enable:'phaseUse', + usable:1, + viewAs:{name:'nanman'}, + filterCard:true, + selectCard:function(){ + if(ui.selected.targets.length) return [ui.selected.targets.length,Math.min(ui.selected.targets.length+1,game.players.length-1)]; + return [1,Infinity]; }, - check: function (card) { - var player = _status.event.player; - if (game.countPlayer(function (current) { - return current != player && player.canUse('nanman', current) && get.effect(current, { name: 'nanman' }, player, player) > 0; - }) <= ui.selected.cards.length) return 0; - return 6 - get.value(card); + check:function(card){ + var player=_status.event.player; + if(game.countPlayer(function(current){ + return current!=player&&player.canUse('nanman',current)&&get.effect(current,{name:'nanman'},player,player)>0; + })<=ui.selected.cards.length) return 0; + return 6-get.value(card); }, - selectTarget: function () { + selectTarget:function(){ return ui.selected.cards.length; }, - ai: { - order: 2, + ai:{ + order:2, }, - group: 'olzhennan2', + group:'olzhennan2', }, - olzhennan2: { - trigger: { target: 'useCardToBefore' }, - forced: true, - locked: false, - audio: 'olzhennan', - filter: function (event, player) { - return event.card.name == 'nanman'; + olzhennan2:{ + trigger:{target:'useCardToBefore'}, + forced:true, + locked:false, + audio:'olzhennan', + filter:function(event,player){ + return event.card.name=='nanman'; }, - content: function () { + content:function(){ trigger.cancel(); }, }, //黄承彦 - guanxu: { - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return game.hasPlayer((current) => lib.skill.guanxu.filterTarget(null, player, current)); + guanxu:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer((current)=>lib.skill.guanxu.filterTarget(null,player,current)); }, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h') > 0; + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; }, - content: function () { + content:function(){ 'step 0' - var cards = get.cards(5); - for (var i = cards.length - 1; i >= 0; i--) { - ui.cardPile.insertBefore(cards[i], ui.cardPile.firstChild); + var cards=get.cards(5); + for(var i=cards.length-1;i>=0;i--){ + ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); } game.updateRoundNumber(); - var hs = target.getCards('h'); - var dialog = ['观虚:选择要操作的牌', '
    ' + get.translation(target) + '的手牌
    ', hs, '
    牌堆顶
    ', cards]; - player.chooseButton(dialog, 2).set('filterButton', function (button) { - if (ui.selected.buttons.length) return get.position(button.link) != get.position(ui.selected.buttons[0].link); + var hs=target.getCards('h'); + var dialog=['观虚:选择要操作的牌','
    '+get.translation(target)+'的手牌
    ',hs,'
    牌堆顶
    ',cards]; + player.chooseButton(dialog,2).set('filterButton',function(button){ + if(ui.selected.buttons.length) return get.position(button.link)!=get.position(ui.selected.buttons[0].link); return true; - }).set('cards1', hs).set('cards2', cards).set('ai', function (button) { - var card = button.link, cards1 = _status.event.cards1.slice(0); - var cards2 = _status.event.cards2.slice(0), target = _status.event.getParent().target; - if (!ui.selected.buttons.length) { - if (!cards1.includes(card)) return 0; + }).set('cards1',hs).set('cards2',cards).set('ai',function(button){ + var card=button.link,cards1=_status.event.cards1.slice(0); + var cards2=_status.event.cards2.slice(0),target=_status.event.getParent().target; + if(!ui.selected.buttons.length){ + if(!cards1.includes(card)) return 0; cards1.remove(card); - var suits = cards2.map(function (i) { - return get.suit(i, target); + var suits=cards2.map(function(i){ + return get.suit(i,target); }); - for (var i of lib.suit) { - var num = cards1.filter(function (c) { - return get.suit(c, target) == i; + for(var i of lib.suit){ + var num=cards1.filter(function(c){ + return get.suit(c,target)==i; }).length; - if (num > 2 || (num > 1 && suits.includes(i))) return 20 + get.value(card); + if(num>2||(num>1&&suits.includes(i))) return 20+get.value(card); } return get.value(card); } cards1.remove(ui.selected.buttons[0].link); cards1.push(card); - for (var i of lib.suit) { - if (cards1.filter(function (c) { - return get.suit(c, target) == i; - }).length > 2) return 20 - get.value(card); - return get.value(ui.selected.buttons[0].link) - get.value(card); + for(var i of lib.suit){ + if(cards1.filter(function(c){ + return get.suit(c,target)==i; + }).length>2) return 20-get.value(card); + return get.value(ui.selected.buttons[0].link)-get.value(card); } }); 'step 1' - if (result.bool) { - var cards = result.links; - if (get.position(cards[0]) != 'h') cards.reverse(); - var next = target.lose(cards[0], ui.cardPile); - next.insert_index_card = cards[1]; - next.insert_index = function (event) { + if(result.bool){ + var cards=result.links; + if(get.position(cards[0])!='h') cards.reverse(); + var next=target.lose(cards[0],ui.cardPile); + next.insert_index_card=cards[1]; + next.insert_index=function(event){ return event.insert_index_card; } - target.gain(cards[1], 'draw'); + target.gain(cards[1],'draw'); } else event.finish(); 'step 2' game.updateRoundNumber(); - var suits = [], map = {}, hs = target.getCards('h'); - if (hs.length) { - for (var i of hs) { - if (!lib.filter.canBeDiscarded(i, player, target, 'guanxu')) continue; - var suit = get.suit(i, target); - if (!map[suit]) map[suit] = 1; + var suits=[],map={},hs=target.getCards('h'); + if(hs.length){ + for(var i of hs){ + if(!lib.filter.canBeDiscarded(i,player,target,'guanxu')) continue; + var suit=get.suit(i,target); + if(!map[suit]) map[suit]=1; else map[suit]++; - if (map[suit] > 2) suits.add(suit); + if(map[suit]>2) suits.add(suit); } - var next = player.discardPlayerCard(target, 3, 'visible', 'h'); - next.set('suits', suits); - next.set('filterButton', function (button) { - var suit = get.suit(button.link); - if (!ui.selected.buttons.length) return _status.event.suits.includes(suit); - return suit == get.suit(ui.selected.buttons[0].link) + var next=player.discardPlayerCard(target,3,'visible','h'); + next.set('suits',suits); + next.set('filterButton',function(button){ + var suit=get.suit(button.link); + if(!ui.selected.buttons.length) return _status.event.suits.includes(suit); + return suit==get.suit(ui.selected.buttons[0].link) }); - if (suits.length) next.set('forced', true); + if(suits.length) next.set('forced',true); } }, - ai: { - order: 9, - result: { - target: function (player, target) { - if (target.countCards('h') > 3) return -5; - if (target.countCards('h') == 3) return -3; + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.countCards('h')>3) return -5; + if(target.countCards('h')==3) return -3; return -0.5; }, }, }, }, - yashi: { - trigger: { player: 'damageEnd' }, - direct: true, - filter: function (event, player) { - if (event.source && event.source.isIn()) return true; - return game.hasPlayer((current) => lib.skill.guanxu.filterTarget(null, player, current)); + yashi:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + if(event.source&&event.source.isIn()) return true; + return game.hasPlayer((current)=>lib.skill.guanxu.filterTarget(null,player,current)); }, - content: function () { + content:function(){ 'step 0' - event.addIndex = 0; - var choiceList = []; - if (trigger.source && trigger.source.isIn()) { - choiceList.push('令' + get.translation(trigger.source) + '的所有非锁定技失效'); + event.addIndex=0; + var choiceList=[]; + if(trigger.source&&trigger.source.isIn()){ + choiceList.push('令'+get.translation(trigger.source)+'的所有非锁定技失效'); } else event.addIndex++; - if (game.hasPlayer((current) => lib.skill.guanxu.filterTarget(null, player, current))) choiceList.push('发动一次〖观虚〗'); - player.chooseControl('cancel2').set('prompt', get.prompt('yashi')).set('choiceList', choiceList).set('ai', function () { - var player = _status.event.player, source = _status.event.getTrigger().source, index = _status.event.getParent().addIndex; - if (game.hasPlayer(function (current) { - return current != player && current.countCards('h') > 3 && get.attitude(player, current) < 0; - })) return 1 - index; - if (source && source.isIn() && get.attitude(player, source) < 0 && !source.hasSkill('fengyin')) return 0; - if (game.hasPlayer(function (current) { - return current != player && current.countCards('h') > 0 && get.attitude(player, current) < 0; - })) return 1 - index; + if(game.hasPlayer((current)=>lib.skill.guanxu.filterTarget(null,player,current))) choiceList.push('发动一次〖观虚〗'); + player.chooseControl('cancel2').set('prompt',get.prompt('yashi')).set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,source=_status.event.getTrigger().source,index=_status.event.getParent().addIndex; + if(game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>3&&get.attitude(player,current)<0; + })) return 1-index; + if(source&&source.isIn()&&get.attitude(player,source)<0&&!source.hasSkill('fengyin')) return 0; + if(game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>0&&get.attitude(player,current)<0; + })) return 1-index; return 'cancel2'; }); 'step 1' - if (result.control != 'cancel2') { - if (result.index + event.addIndex == 0) { - var target = trigger.source; - player.logSkill('yashi', target); + if(result.control!='cancel2'){ + if(result.index+event.addIndex==0){ + var target=trigger.source; + player.logSkill('yashi',target); //target.removeSkill('fengyin'); - target.addTempSkill('fengyin', { player: 'phaseBegin' }); + target.addTempSkill('fengyin',{player:'phaseBegin'}); event.finish(); } - else player.chooseTarget(true, '请选择〖观虚〗的目标', lib.skill.guanxu.filterTarget).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, 'guanxu', player, player); + else player.chooseTarget(true,'请选择〖观虚〗的目标',lib.skill.guanxu.filterTarget).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,'guanxu',player,player); }); } else event.finish(); 'step 2' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('yashi', target); - var next = game.createEvent('yashi_guanxu'); - next.player = player; - next.target = target; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('yashi',target); + var next=game.createEvent('yashi_guanxu'); + next.player=player; + next.target=target; next.setContent(lib.skill.guanxu.content); } }, }, //黄祖 - wangong: { - audio: 2, - trigger: { player: 'useCard' }, - forced: true, - filter: function (event, player) { - return get.type(event.card, false) == 'basic'; + wangong:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.type(event.card,false)=='basic'; }, - content: function () { + content:function(){ player.addSkill('wangong2'); }, }, - wangong2: { - trigger: { player: 'useCard1' }, - forced: true, - popup: false, - firstDo: true, - charlotte: true, - content: function () { + wangong2:{ + trigger:{player:'useCard1'}, + forced:true, + popup:false, + firstDo:true, + charlotte:true, + content:function(){ player.removeSkill('wangong2'); - if (trigger.card.name == 'sha') trigger.baseDamage++; + if(trigger.card.name=='sha') trigger.baseDamage++; }, - mod: { - cardUsable: function (card) { - if (card.name == 'sha') return Infinity; + mod:{ + cardUsable:function(card){ + if(card.name=='sha') return Infinity; }, - targetInRange: function (card) { - if (card.name == 'sha') return true; + targetInRange:function(card){ + if(card.name=='sha') return true; }, }, - mark: true, - intro: { - content: '使用【杀】无距离和次数限制且伤害+1', + mark:true, + intro:{ + content:'使用【杀】无距离和次数限制且伤害+1', }, }, //潘淑 - weiyi: { - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - if (player.getStorage('weiyi').includes(event.player) || !event.player.isIn()) return false; - return event.player.hp >= player.hp || event.player.isDamaged(); + weiyi:{ + trigger:{global:'damageEnd'}, + filter:function(event,player){ + if(player.getStorage('weiyi').includes(event.player)||!event.player.isIn()) return false; + return event.player.hp>=player.hp||event.player.isDamaged(); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = []; - if (trigger.player.hp >= player.hp) list.push('失去体力'); - if (trigger.player.hp <= player.hp && trigger.player.isDamaged()) list.push('回复体力'); + var list=[]; + if(trigger.player.hp>=player.hp) list.push('失去体力'); + if(trigger.player.hp<=player.hp&&trigger.player.isDamaged()) list.push('回复体力'); list.push('cancel2') - player.chooseControl(list).set('prompt', get.prompt2('weiyi', trigger.player)).set('ai', function () { - var player = _status.event.player, target = _status.event.getTrigger().player; - var att = get.attitude(player, target), eff = get.recoverEffect(target, player, player); - if (target.hp <= player.hp && target.isDamaged() && att > 2 && eff > 0) { - if (player == target) { - var storage = player.getStorage('weiyi'); - if (player.hp >= 2 && game.hasPlayer(function (current) { - return current.hp == player.hp + 1 && !storage.includes(current) && get.attitude(player, current) < 0; + player.chooseControl(list).set('prompt',get.prompt2('weiyi',trigger.player)).set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + var att=get.attitude(player,target),eff=get.recoverEffect(target,player,player); + if(target.hp<=player.hp&&target.isDamaged()&&att>2&&eff>0){ + if(player==target){ + var storage=player.getStorage('weiyi'); + if(player.hp>=2&&game.hasPlayer(function(current){ + return current.hp==player.hp+1&&!storage.includes(current)&&get.attitude(player,current)<0; })) return 'cancel2'; } return '回复体力'; } - if (target.hp >= player.hp && att < -2 && eff < 0) return '失去体力'; + if(target.hp>=player.hp&&att<-2&&eff<0) return '失去体力'; return 'cancel2'; }); 'step 1' - if (result.control != 'cancel2') { - var target = trigger.player; - player.logSkill('weiyi', target); - player.markAuto('weiyi', [target]); - target[result.control == '失去体力' ? 'loseHp' : 'recover'](); + if(result.control!='cancel2'){ + var target=trigger.player; + player.logSkill('weiyi',target); + player.markAuto('weiyi',[target]); + target[result.control=='失去体力'?'loseHp':'recover'](); } }, - onremove: true, - intro: { - content: '已令$对汝威服', + onremove:true, + intro:{ + content:'已令$对汝威服', }, }, - jinzhi: { - audio: 2, - enable: ['chooseToUse', 'chooseToRespond'], - hiddenCard: function (player, name) { - if (get.type(name) == 'basic' && lib.inpile.includes(name) && player.countMark('jinzhi2') < player.countCards('he')) return true; + jinzhi:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + if(get.type(name)=='basic'&&lib.inpile.includes(name)&&player.countMark('jinzhi2')= player.countCards('he')) return false; - for (var i of lib.inpile) { - if (get.type(i) == 'basic' && event.filterCard({ name: i }, player, event)) return true; + filter:function(event,player){ + if(event.responded||event.jinzhi||player.countMark('jinzhi2')>=player.countCards('he')) return false; + for(var i of lib.inpile){ + if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)) return true; } return false; }, - chooseButton: { - dialog: function (event, player) { - var list = []; - for (var i of lib.inpile) { - if (get.type(i) == 'basic' && event.filterCard({ name: i }, player, event)) { - list.push(['基本', '', i]); - if (i == 'sha') { - for (var j of lib.inpile_nature) list.push(['基本', '', 'sha', j]); + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i of lib.inpile){ + if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)){ + list.push(['基本','',i]); + if(i=='sha'){ + for(var j of lib.inpile_nature) list.push(['基本','','sha',j]); } } } - return ui.create.dialog('锦织', [list, 'vcard'], 'hidden') + return ui.create.dialog('锦织',[list,'vcard'],'hidden') }, - check: function (button) { - if (button.link[2] == 'shan') return 3; - var player = _status.event.player; - if (button.link[2] == 'jiu') { - if (player.getUseValue({ name: 'jiu' }) <= 0) return 0; - if (player.countCards('h', 'sha')) return player.getUseValue({ name: 'jiu' }); + check:function(button){ + if(button.link[2]=='shan') return 3; + var player=_status.event.player; + if(button.link[2]=='jiu'){ + if(player.getUseValue({name:'jiu'})<=0) return 0; + if(player.countCards('h','sha')) return player.getUseValue({name:'jiu'}); } - return player.getUseValue({ name: button.link[2], nature: button.link[3] }) / 4; + return player.getUseValue({name:button.link[2],nature:button.link[3]})/4; }, - backup: function (links, player) { + backup:function(links,player){ return { - selectCard: player.countMark('jinzhi2') + 1, - filterCard: function (card, player) { - if (ui.selected.cards.length) { - if (get.color(card) != get.color(ui.selected.cards[0])) return false; + selectCard:player.countMark('jinzhi2')+1, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + if(get.color(card)!=get.color(ui.selected.cards[0])) return false; } - return lib.filter.cardDiscardable.apply(this, arguments); + return lib.filter.cardDiscardable.apply(this,arguments); }, - complexCard: true, - viewAs: { - name: links[0][2], - nature: links[0][3], - suit: 'none', - number: null, - isCard: true, + complexCard:true, + viewAs:{ + name:links[0][2], + nature:links[0][3], + suit:'none', + number:null, + isCard:true, }, - position: 'he', - ignoreMod: true, - check: function (card) { - var player = _status.event.player, color = get.color(card, player); - if (player.countCards('he', { color: color }) <= player.countMark('jinzhi2') || (ui.selected.cards.length && get.color(ui.selected.cards[0], player) != color)) return -1; - if (lib.skill.jinzhi_backup.viewAs.name == 'jiu' && !player.countCards('h', function (cardx) { - return card != cardx && !ui.selected.cards.includes(cardx) && get.name(cardx, player) == 'sha'; + position:'he', + ignoreMod:true, + check:function(card){ + var player=_status.event.player,color=get.color(card,player); + if(player.countCards('he',{color:color})<=player.countMark('jinzhi2')||(ui.selected.cards.length&&get.color(ui.selected.cards[0],player)!=color)) return -1; + if(lib.skill.jinzhi_backup.viewAs.name=='jiu'&&!player.countCards('h',function(cardx){ + return card!=cardx&&!ui.selected.cards.includes(cardx)&&get.name(cardx,player)=='sha'; })) return 0; - return Math.min(0.01, 6 - get.value(card)); + return Math.min(0.01,6-get.value(card)); }, - precontent: function () { + precontent:function(){ player.logSkill('jinzhi'); - player.addTempSkill('jinzhi2', 'roundStart'); - player.addMark('jinzhi2', 1, false); - var cards = event.result.cards; + player.addTempSkill('jinzhi2','roundStart'); + player.addMark('jinzhi2',1,false); + var cards=event.result.cards; player.discard(cards); player.draw(); - event.result.card = { - name: event.result.card.name, - nature: event.result.card.nature, - isCard: true, + event.result.card={ + name:event.result.card.name, + nature:event.result.card.nature, + isCard:true, }; - event.result.cards = []; + event.result.cards=[]; delete event.result.skill; - if (cards.length > 1) { - var color = get.color(cards[0], player); - for (var i = 1; i < cards.length; i++) { - if (get.color(cards[i], player) != color) { - var evt = event.getParent(); - evt.set('jinzhi', true); + if(cards.length>1){ + var color=get.color(cards[0],player); + for(var i=1;i 0 && player.countCards('h', 'sha')) return get.order({ name: 'jiu' }) + 1; + ai:{ + order:function(item,player){ + if(_status.event.type=='phase'&&!player.countMark('jinzhi2')&&player.getUseValue({name:'jiu'},null,true)>0&&player.countCards('h','sha')) return get.order({name:'jiu'})+1; return 1; }, - respondShan: true, - respondSha: true, - skillTagFilter: function (player) { - if (player.countMark('jinzhi2') >= player.countCards('he')) return false; + respondShan:true, + respondSha:true, + skillTagFilter:function(player){ + if(player.countMark('jinzhi2')>=player.countCards('he')) return false; }, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; } } } }, - jinzhi2: { - onremove: true, - intro: { - content: '本轮已发动过#次', + jinzhi2:{ + onremove:true, + intro:{ + content:'本轮已发动过#次', }, }, //宗预 - zyqiao: { - audio: 2, - trigger: { target: 'useCardToTargeted' }, - logTarget: 'player', - usable: 2, - preHidden: true, - filter: function (event, player) { - var source = event.player; - if (source == player) return false; - if (get.mode() == 'guozhan' && source.isFriendOf(player)) return false; - return source.countDiscardableCards(player, 'he') > 0; + zyqiao:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + logTarget:'player', + usable:2, + preHidden:true, + filter:function(event,player){ + var source=event.player; + if(source==player) return false; + if(get.mode()=='guozhan'&&source.isFriendOf(player)) return false; + return source.countDiscardableCards(player,'he')>0; }, - check: function (event, player) { - var target = event.player; - if (get.attitude(player, target) >= 0) return false; - if (!player.countCards('he', function (card) { - return lib.filter.cardDiscardable(card, player, 'zyqiao'); + check:function(event,player){ + var target=event.player; + if(get.attitude(player,target)>=0) return false; + if(!player.countCards('he',function(card){ + return lib.filter.cardDiscardable(card,player,'zyqiao'); })) return true; - if (player.countCards('he', (card) => get.value(card, player) < 5)) return true; - if (target.countCards('he', (card) => get.value(card, target) > 6) && player.countCards('he', (card) => get.value(card, player) < 7)) return true; + if(player.countCards('he',(card)=>get.value(card,player)<5)) return true; + if(target.countCards('he',(card)=>get.value(card,target)>6)&&player.countCards('he',(card)=>get.value(card,player)<7)) return true; return false; }, - content: function () { + content:function(){ 'step 0' - player.discardPlayerCard(trigger.player, true, 'he'); + player.discardPlayerCard(trigger.player,true,'he'); 'step 1' - if (player.countCards('he', function (card) { - return lib.filter.cardDiscardable(card, player, 'zyqiao'); - })) player.chooseToDiscard('he', true); + if(player.countCards('he',function(card){ + return lib.filter.cardDiscardable(card,player,'zyqiao'); + })) player.chooseToDiscard('he',true); }, }, - chengshang: { - audio: 2, - trigger: { player: 'useCardAfter' }, - filter: function (event, player) { - if (!lib.suit.includes(get.suit(event.card, false)) || typeof get.number(event.card) != 'number') return false; - if (player.getHistory('sourceDamage', function (evt) { - return evt.card == event.card; + chengshang:{ + audio:2, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + if(!lib.suit.includes(get.suit(event.card,false))||typeof get.number(event.card)!='number') return false; + if(player.getHistory('sourceDamage',function(evt){ + return evt.card==event.card; }).length) return false; - var phsu = event.getParent('phaseUse'); - if (!phsu || phsu.player != player) return false; - if (player.getHistory('gain', function (evt) { - return evt.getParent().name == 'chengshang'; + var phsu=event.getParent('phaseUse'); + if(!phsu||phsu.player!=player) return false; + if(player.getHistory('gain',function(evt){ + return evt.getParent().name=='chengshang'; }).length) return false; - for (var i of event.targets) { - if (i != player && (get.mode() != 'guozhan' || i.isEnemyOf(player))) return true; + for(var i of event.targets){ + if(i!=player&&(get.mode()!='guozhan'||i.isEnemyOf(player))) return true; } return false; }, - preHidden: true, - content: function () { - var suit = get.suit(trigger.card); - var number = get.number(trigger.card); - var cards = []; - for (var i = 0; i < ui.cardPile.childNodes.length; i++) { - var card = ui.cardPile.childNodes[i]; - if (card.suit == suit && card.number == number) cards.push(card); + preHidden:true, + content:function(){ + var suit=get.suit(trigger.card); + var number=get.number(trigger.card); + var cards=[]; + for(var i=0;i 0; - })) { + 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._reduanbingtmp; - return [1, 1]; + return [1,1]; } delete player._reduanbingtmp; } } } }, - group: 'reduanbing_sha', - subSkill: { - sha: { - audio: 'duanbing', - audioname: ['heqi'], - trigger: { player: 'useCardToPlayered' }, - forced: true, - filter: function (event, player) { - return event.card.name == 'sha' && !event.getParent().directHit.includes(event.target) && get.distance(player, event.target) <= 1; + group:'reduanbing_sha', + subSkill:{ + sha:{ + audio:'duanbing', + audioname:['heqi'], + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.getParent().directHit.includes(event.target)&&get.distance(player,event.target)<=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') { + 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; + else{ + map[id].shanRequired=2; } }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - if (arg.card.name != 'sha' || arg.target.countCards('h', 'shan') > 1 || get.distance(player, arg.target) > 1) return false; + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg.card.name!='sha'||arg.target.countCards('h','shan')>1||get.distance(player,arg.target)>1) return false; }, }, }, }, }, - refenxun: { - audio: 'fenxun', - enable: 'phaseUse', - usable: 1, - position: 'he', - filterTarget: function (card, player, target) { - return target != player; + refenxun:{ + audio:'fenxun', + enable:'phaseUse', + usable:1, + position:'he', + filterTarget:function(card,player,target){ + return target!=player; }, - content: function () { - player.markAuto('refenxun2', targets); + content:function(){ + player.markAuto('refenxun2',targets); player.addTempSkill('refenxun2'); }, - ai: { - order: 6.5, - result: { - player: function (player, target) { - if (get.distance(player, target) <= 1) return 0; - var hs = player.getCards('h', 'shunshou'); - if (hs.length && player.canUse(hs[0], target, false)) { + ai:{ + order:6.5, + result:{ + player:function(player,target){ + if(get.distance(player,target)<=1) return 0; + var hs=player.getCards('h','shunshou'); + if(hs.length&&player.canUse(hs[0],target,false)){ return 1; } - var geteff = function (current) { - return player.canUse('sha', current, false, true) && get.effect(current, { name: 'sha' }, player, player) > 0; + var geteff=function(current){ + return player.canUse('sha',current,false,true)&&get.effect(current,{name:'sha'},player,player)>0; } - if (player.hasSha() && geteff(target)) { - var num = game.countPlayer(function (current) { - return current != player && get.distance(player, current) <= 1 && geteff(current); + 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) && current != target; - })) { + if(num==0){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current)&&geteff(current)&¤t!=target; + })){ return 1; } } - else if (num == 1) { + else if(num==1){ return 1; } } @@ -13179,1092 +13180,1092 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - refenxun2: { - audio: 'fenxun', - trigger: { - player: 'phaseJieshuBegin', + refenxun2:{ + audio:'fenxun', + trigger:{ + player:'phaseJieshuBegin', }, - forced: true, - charlotte: true, - filter: function (event, player) { - return player.getHistory('sourceDamage', function (evt) { + forced:true, + charlotte:true, + filter:function(event,player){ + return player.getHistory('sourceDamage',function(evt){ return player.storage.refenxun2.includes(evt.player); - }).length == 0 && player.countCards('he', function (card) { - return lib.filter.cardDiscardable(card, player, 'refenxun2'); - }) > 0; + }).length==0&&player.countCards('he',function(card){ + return lib.filter.cardDiscardable(card,player,'refenxun2'); + })>0; }, - content: function () { - player.chooseToDiscard('he', true); + content:function(){ + player.chooseToDiscard('he',true); }, - onremove: true, - intro: { - content: '到$的距离视为1' + onremove:true, + intro:{ + content:'到$的距离视为1' }, - mod: { - globalFrom: function (from, to) { - if (from.storage.refenxun2.includes(to)) { + mod:{ + globalFrom:function(from,to){ + if(from.storage.refenxun2.includes(to)){ return -Infinity; } } }, }, //蔡阳新技能 - zhuixi: { - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + zhuixi:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; }, }, }, //新塌顿 - reluanzhan: { - audio: 'luanzhan', - trigger: { - player: 'damageEnd', - source: 'damageSource', + reluanzhan:{ + audio:'luanzhan', + trigger:{ + player:'damageEnd', + source:'damageSource', }, - forced: true, - locked: false, - content: function () { - player.addMark('reluanzhan', 1, false); + forced:true, + locked:false, + content:function(){ + player.addMark('reluanzhan',1,false); }, - intro: { content: 'mark' }, - ai: { notemp: true }, - group: ['reluanzhan_add', 'reluanzhan_remove'], + intro:{content:'mark'}, + ai:{notemp:true}, + group:['reluanzhan_add','reluanzhan_remove'], }, - reluanzhan_add: { - trigger: { player: 'useCard2' }, - direct: true, - filter: function (event, player) { - if (event.card.name != 'sha' && (get.color(event.card) != 'black' || get.type(event.card) != 'trick') || !player.countMark('reluanzhan')) return false; - var info = get.info(event.card); - if (info.allowMultiple == false) return false; - if (event.targets && !info.multitarget) { - if (game.hasPlayer(function (current) { - return !event.targets.includes(current) && lib.filter.targetEnabled2(event.card, player, current) && lib.filter.targetInRange(event.card, player, current); - })) { + reluanzhan_add:{ + trigger:{player:'useCard2'}, + direct:true, + filter:function(event,player){ + if(event.card.name!='sha'&&(get.color(event.card)!='black'||get.type(event.card)!='trick')||!player.countMark('reluanzhan')) return false; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); + })){ return true; } } return false; }, - content: function () { + content:function(){ 'step 0' - var num = player.countMark('reluanzhan'); - var prompt2 = '为' + get.translation(trigger.card) + '增加至多' + get.cnNumber(num) + '个目标' - player.chooseTarget(get.prompt('reluanzhan'), function (card, player, target) { - if (_status.event.targets.includes(target)) return false; - var player = _status.event.player; - return lib.filter.targetEnabled2(_status.event.card, player, target) && lib.filter.targetInRange(_status.event.card, player, target); - }, [1, num]).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); - }).set('card', trigger.card).set('targets', trigger.targets); + var num=player.countMark('reluanzhan'); + var prompt2='为'+get.translation(trigger.card)+'增加至多'+get.cnNumber(num)+'个目标' + player.chooseTarget(get.prompt('reluanzhan'),function(card,player,target){ + if(_status.event.targets.includes(target)) return false; + var player=_status.event.player; + return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target); + },[1,num]).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); + }).set('card',trigger.card).set('targets',trigger.targets); 'step 1' - if (result.bool) { - if (!event.isMine() && !event.isOnline()) game.delayx(); - event.targets = result.targets; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; } - else { + else{ event.finish(); } 'step 2' - if (event.targets) { - player.logSkill('reluanzhan', event.targets); + if(event.targets){ + player.logSkill('reluanzhan',event.targets); trigger.targets.addArray(event.targets); } }, }, - reluanzhan_remove: { - audio: 'luanzhan', - trigger: { player: 'useCardToPlayered' }, - forced: true, - locked: false, - filter: function (event, player) { - if (!event.isFirstTarget || (event.card.name != 'sha' && (get.color(event.card) != 'black' || get.type(event.card) != 'trick')) || !player.countMark('reluanzhan')) return false; - var info = get.info(event.card); - if (info.allowMultiple == false || info.multitarget) return false; - return event.targets.length < player.countMark('reluanzhan'); + reluanzhan_remove:{ + audio:'luanzhan', + trigger:{player:'useCardToPlayered'}, + forced:true, + locked:false, + filter:function(event,player){ + if(!event.isFirstTarget||(event.card.name!='sha'&&(get.color(event.card)!='black'||get.type(event.card)!='trick'))||!player.countMark('reluanzhan')) return false; + var info=get.info(event.card); + if(info.allowMultiple==false||info.multitarget) return false; + return event.targets.length 0) dialog.add([equips, 'tdnodes']) - var type = player.storage.youlong ? 'basic' : 'trick'; - var list = []; - for (var name of lib.inpile) { - if (player.storage.youlong2.includes(name)) continue; - if (get.type(name) != type) continue; - if (event.filterCard({ name: name, isCard: true }, player, event)) { - list.push([type, '', name]); - if (name == 'sha') { - for (var j of lib.inpile_nature) list.push(['基本', '', 'sha', j]); + if(equips.length>0) dialog.add([equips,'tdnodes']) + var type=player.storage.youlong?'basic':'trick'; + var list=[]; + for(var name of lib.inpile){ + if(player.storage.youlong2.includes(name)) continue; + if(get.type(name)!=type) continue; + if(event.filterCard({name:name,isCard:true},player,event)){ + list.push([type,'',name]); + if(name=='sha'){ + for(var j of lib.inpile_nature) list.push(['基本','','sha',j]); } } } - dialog.add([list, 'vcard']); + dialog.add([list,'vcard']); return dialog; }, - filter: function (button) { - if (ui.selected.buttons.length && typeof button.link == typeof ui.selected.buttons[0].link) return false; + filter:function(button){ + if(ui.selected.buttons.length&&typeof button.link==typeof ui.selected.buttons[0].link) return false; return true; }, - select: 2, - check: function (button) { - var player = _status.event.player; - if (typeof button.link == 'number') { - var card = player.getEquip(button.link); - if (card) { - var val = get.value(card); - if (val > 0) return 0; - return 5 - val; + select:2, + check:function(button){ + var player=_status.event.player; + if(typeof button.link=='number'){ + var card=player.getEquip(button.link); + if(card){ + var val=get.value(card); + if(val>0) return 0; + return 5-val; } - switch (button.link) { - case 3: return 4.5; - case 4: return 4.4; - case 5: return 4.3; - case 2: return (3 - player.hp) * 1.5; - case 1: { - if (game.hasPlayer(function (current) { - return (get.realAttitude || get.attitude)(player, current) < 0 && get.distance(player, current) > 1; + switch(button.link){ + case 3:return 4.5; + case 4:return 4.4; + case 5:return 4.3; + case 2:return (3-player.hp)*1.5; + case 1:{ + if(game.hasPlayer(function(current){ + return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1; })) return 0; return 3.2; } } } - var name = button.link[2]; - var evt = _status.event.getParent(); - if (evt.type == 'phase') { - var card = { name: name, nature: button.link[3], isCard: true }; - if (name == 'shan') return 2; - if (evt.type == 'dying') { - if (get.attitude(player, evt.dying) < 2) return false; - if (name == 'jiu') return 2.1; + var name=button.link[2]; + var evt=_status.event.getParent(); + if(evt.type=='phase'){ + var card={name:name,nature:button.link[3],isCard:true}; + if(name=='shan') return 2; + if(evt.type=='dying'){ + if(get.attitude(player,evt.dying)<2) return false; + if(name=='jiu') return 2.1; return 1.9; } return player.getUseValue(card); } return 1; }, - backup: function (links, player) { - if (typeof links[1] == 'number') links.reverse(); - var equip = links[0]; - var name = links[1][2]; - var nature = links[1][3]; + backup:function(links,player){ + if(typeof links[1]=='number') links.reverse(); + var equip=links[0]; + var name=links[1][2]; + var nature=links[1][3]; return { - filterCard: function () { return false }, - selectCard: -1, - equip: equip, - viewAs: { - name: name, - nature: nature, - isCard: true, + filterCard:function(){return false}, + selectCard:-1, + equip:equip, + viewAs:{ + name:name, + nature:nature, + isCard:true, }, - popname: true, - precontent: function () { + popname:true, + precontent:function(){ player.logSkill('youlong'); player.disableEquip(lib.skill.youlong_backup.equip); delete event.result.skill; - player.addTempSkill('youlong_' + (player.storage.youlong || false), 'roundStart'); + player.addTempSkill('youlong_'+(player.storage.youlong||false),'roundStart'); player.changeZhuanhuanji('youlong'); player.storage.youlong2.add(event.result.card.name); }, } }, - prompt: function (links, player) { - if (typeof links[1] == 'number') links.reverse(); - var equip = 'equip' + links[0]; - var name = links[1][2]; - var nature = links[1][3]; - return '废除自己的' + get.translation(equip) + '栏,视为使用' + (get.translation(nature) || '') + get.translation(name); + prompt:function(links,player){ + if(typeof links[1]=='number') links.reverse(); + var equip='equip'+links[0]; + var name=links[1][2]; + var nature=links[1][3]; + return '废除自己的'+get.translation(equip)+'栏,视为使用'+(get.translation(nature)||'')+get.translation(name); }, }, - ai: { - respondSha: true, - respondShan: true, - skillTagFilter: function (player, tag, arg) { - if (arg == 'respond') return false; - if (!player.storage.youlong || player.hasSkill('youlong_true')) return false; - var name = (tag == 'respondSha' ? 'sha' : 'shan'); + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + if(arg=='respond') return false; + if(!player.storage.youlong||player.hasSkill('youlong_true')) return false; + var name=(tag=='respondSha'?'sha':'shan'); return !player.storage.youlong2.includes(name); }, - order: function (item, player) { - if (player && _status.event.type == 'phase') { - var max = 0, add = false; - var type = player.storage.youlong ? 'basic' : 'trick'; - var list = lib.inpile.filter(name => get.type(name) == type && !player.storage.youlong2.includes(name)); - if (list.includes('sha')) add = true; - list = list.map(namex => { return { name: namex, isCard: true } }); - if (add) lib.inpile_nature.forEach(naturex => list.push({ name: 'sha', nature: naturex, isCard: true })); - for (var card of list) { - if (player.getUseValue(card) > 0) { - var temp = get.order(card); - if (temp > max) max = temp; + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0,add=false; + var type=player.storage.youlong?'basic':'trick'; + var list=lib.inpile.filter(name=>get.type(name)==type&&!player.storage.youlong2.includes(name)); + if(list.includes('sha')) add=true; + list=list.map(namex=>{return {name:namex,isCard:true}}); + if(add) lib.inpile_nature.forEach(naturex=>list.push({name:'sha',nature:naturex,isCard:true})); + for(var card of list){ + if(player.getUseValue(card)>0){ + var temp=get.order(card); + if(temp>max) max=temp; } } - if (max > 0) max += 0.3; + if(max>0) max+=0.3; return max; } return 1; }, - result: { player: 1 }, + result:{player:1}, }, }, - youlong_true: { charlotte: true }, - youlong_false: { charlotte: true }, - luanfeng: { - audio: 2, - audioname: ['key_sakuya'], - trigger: { global: 'dying' }, - filter: function (event, player) { - return event.player.maxHp >= player.maxHp && event.player.hp < 1; + youlong_true:{charlotte:true}, + youlong_false:{charlotte:true}, + luanfeng:{ + audio:2, + audioname:['key_sakuya'], + trigger:{global:'dying'}, + filter:function(event,player){ + return event.player.maxHp>=player.maxHp&&event.player.hp<1; }, - limited: true, - skillAnimation: true, - animationColor: 'soil', - 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, event.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); + limited:true, + skillAnimation:true, + animationColor:'soil', + 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,event.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; + })>=1-event.player.hp) return false; + if(event.player==player||event.player==get.zhu(player)) return true; return !player.hasUnknown(); }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('luanfeng'); - trigger.player.recover(3 - trigger.player.hp); + trigger.player.recover(3-trigger.player.hp); 'step 1' - var list = [], target = trigger.player; - for (var i = 1; i < 6; i++) { - for (var j = 0; j < target.countDisabledSlot(i); j++) { + var list=[],target=trigger.player; + for(var i=1;i<6;i++){ + for(var j=0;j 0) target.enableEquip(list); - if (list.length < 6) target.drawTo(6 - list.length); - if (target.storage.kotarou_rewrite) target.storage.kotarou_rewrite = []; - if (player == target) player.storage.youlong2 = []; + if(list.length>0) target.enableEquip(list); + if(list.length<6) target.drawTo(6-list.length); + if(target.storage.kotarou_rewrite) target.storage.kotarou_rewrite=[]; + if(player==target) player.storage.youlong2=[]; }, }, //曹爽,韩遂,何进 - xiaoxi: { - audio: 2, - audioname: ['machao', 'hansui', 'pangde'], - trigger: { - player: 'enterGame', - global: 'phaseBefore', + xiaoxi:{ + audio:2, + audioname:['machao','hansui','pangde'], + trigger:{ + player:'enterGame', + global:'phaseBefore', }, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0); + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); }, - direct: true, - content: function () { - player.chooseUseTarget('sha', get.prompt('xiaoxi'), '视为使用一张【杀】').logSkill = 'xiaoxi'; + direct:true, + content:function(){ + player.chooseUseTarget('sha',get.prompt('xiaoxi'),'视为使用一张【杀】').logSkill='xiaoxi'; }, }, - spmouzhu: { - enable: 'phaseUse', - audio: 'mouzhu', - usable: 1, - filter: function (event, player) { - return game.hasPlayer((current) => lib.skill.spmouzhu.filterTarget(null, player, current)); + spmouzhu:{ + enable:'phaseUse', + audio:'mouzhu', + usable:1, + filter:function(event,player){ + return game.hasPlayer((current)=>lib.skill.spmouzhu.filterTarget(null,player,current)); }, - filterTarget: function (card, player, target) { - if (!target.countCards('h')) return false; - return player != target && (target.hp == player.hp || get.distance(player, target) == 1); + filterTarget:function(card,player,target){ + if(!target.countCards('h')) return false; + return player!=target&&(target.hp==player.hp||get.distance(player,target)==1); }, - selectTarget: [1, Infinity], - content: function () { + selectTarget:[1,Infinity], + content:function(){ 'step 0' - target.chooseCard('h', '交给' + get.translation(player) + '一张牌', true); + target.chooseCard('h','交给'+get.translation(player)+'一张牌',true); 'step 1' - if (result.bool) target.give(result.cards, player); + if(result.bool) target.give(result.cards,player); 'step 2' - if (player.countCards('h') <= target.countCards('h')) { + 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'; + 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, 'noai'); + target.useCard({name:result.control,isCard:true},player,'noai'); }, - ai: { - order: 7, - result: { - target: -1.2, - player: function (player, target) { - if (ui.selected.targets.length) return 0; - 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; + ai:{ + order:7, + result:{ + target:-1.2, + player:function(player,target){ + if(ui.selected.targets.length) return 0; + 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; }, }, }, }, - spyanhuo: { - audio: 'yanhuo', - trigger: { player: 'die' }, - forceDie: true, - skillAnimation: true, - animationColor: 'soil', - content: function () { - player.line(game.players, 'green'); + spyanhuo:{ + audio:'yanhuo', + trigger:{player:'die'}, + forceDie:true, + skillAnimation:true, + animationColor:'soil', + content:function(){ + player.line(game.players,'green'); game.addGlobalSkill('spyanhuo_damage'); - if (!_status.yanhuo) _status.yanhuo = 0; + if(!_status.yanhuo) _status.yanhuo=0; _status.yanhuo++; }, - subSkill: { - damage: { - trigger: { player: 'useCard' }, - forced: true, - filter: function (event, player) { - return event.card.name == 'sha'; + subSkill:{ + damage:{ + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'; }, - content: function () { - trigger.baseDamage += (_status.yanhuo || 0); + content:function(){ + trigger.baseDamage+=(_status.yanhuo||0); }, }, }, }, - spniluan: { - enable: 'phaseUse', - audio: 'niluan', - viewAs: { name: 'sha' }, - check: function (card) { - return 5.1 - get.value(card); + spniluan:{ + enable:'phaseUse', + audio:'niluan', + viewAs:{name:'sha'}, + check:function(card){ + return 5.1-get.value(card); }, - filterCard: { color: 'black' }, - position: 'hes', - viewAsFilter: function (player) { - return player.countCards('hes', lib.skill.spniluan.filterCard) > 0; + filterCard:{color:'black'}, + position:'hes', + viewAsFilter:function(player){ + return player.countCards('hes',lib.skill.spniluan.filterCard)>0; }, - group: 'spniluan_clear', + group:'spniluan_clear', }, - spniluan_clear: { - trigger: { player: 'useCardAfter' }, - forced: true, - silent: true, - charlotte: true, - filter: function (event, player) { - return event.skill == 'spniluan' && event.addCount !== false && player.getHistory('sourceDamage', function (card) { - return card.card == event.card; - }).length == 0; + spniluan_clear:{ + trigger:{player:'useCardAfter'}, + forced:true, + silent:true, + charlotte:true, + filter:function(event,player){ + return event.skill=='spniluan'&&event.addCount!==false&&player.getHistory('sourceDamage',function(card){ + return card.card==event.card; + }).length==0; }, - content: function () { - trigger.addCount = false; - if (player.stat[player.stat.length - 1].card.sha > 0) { - player.stat[player.stat.length - 1].card.sha--; + content:function(){ + trigger.addCount=false; + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; } }, }, - spweiwu: { - audio: 2, - locked: false, - enable: 'phaseUse', - usable: 1, - viewAs: { - name: 'shunshou', - storage: { spweiwu: true }, + spweiwu:{ + audio:2, + locked:false, + enable:'phaseUse', + usable:1, + viewAs:{ + name:'shunshou', + storage:{spweiwu:true}, }, - filterCard: { color: 'red' }, - position: 'hes', - check: function (card) { - return 7 - get.value(card); + filterCard:{color:'red'}, + position:'hes', + check:function(card){ + return 7-get.value(card); }, - mod: { - targetInRange: function (card) { - if (card.storage && card.storage.spweiwu) return true; + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.spweiwu) return true; }, }, }, - tuogu: { - audio: 2, - trigger: { global: 'die' }, - filter: function (event, player) { - return event.player.getStockSkills('仲村由理', '天下第一').filter(function (skill) { - var info = get.info(skill); - return info && !info.juexingji && !info.hiddenSkill && !info.zhuSkill && !info.charlotte && !info.limited && !info.dutySkill; - }).length > 0; + tuogu:{ + audio:2, + trigger:{global:'die'}, + filter:function(event,player){ + return event.player.getStockSkills('仲村由理','天下第一').filter(function(skill){ + var info=get.info(skill); + return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill; + }).length>0; }, - logTarget: 'player', - skillAnimation: true, - limited: true, - animationColor: 'thunder', - content: function () { + logTarget:'player', + skillAnimation:true, + limited:true, + animationColor:'thunder', + content:function(){ 'step 0' player.awakenSkill('tuogu'); - var list = trigger.player.getStockSkills('仲村由理', '天下第一').filter(function (skill) { - var info = get.info(skill); - return info && !info.juexingji && !info.hiddenSkill && !info.zhuSkill && !info.charlotte && !info.limited && !info.dutySkill; + var list=trigger.player.getStockSkills('仲村由理','天下第一').filter(function(skill){ + var info=get.info(skill); + return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill; }); - if (list.length == 1) event._result = { control: list[0] }; - else trigger.player.chooseControl(list).set('prompt', '选择令' + get.translation(player) + '获得一个技能').set('forceDie', true).set('ai', function () { + if(list.length==1) event._result={control:list[0]}; + else trigger.player.chooseControl(list).set('prompt','选择令'+get.translation(player)+'获得一个技能').set('forceDie',true).set('ai',function(){ return list.randomGet(); }); 'step 1' player.addSkills(result.control); - game.broadcastAll(function (skill) { - var list = [skill]; game.expandSkills(list); - for (var i of list) { - var info = lib.skill[i]; - if (!info) continue; - if (!info.audioname2) info.audioname2 = {}; - info.audioname2.caoshuang = 'tuogu'; + game.broadcastAll(function(skill){ + var list=[skill];game.expandSkills(list); + for(var i of list){ + var info=lib.skill[i]; + if(!info) continue; + if(!info.audioname2) info.audioname2={}; + info.audioname2.caoshuang='tuogu'; } - }, result.control); + },result.control); }, }, - retuogu: { - audio: 'tuogu', - trigger: { global: 'die' }, - filter: function (event, player) { - return event.player.getStockSkills('仲村由理', '天下第一').filter(function (skill) { - var info = get.info(skill); - return info && !info.juexingji && !info.hiddenSkill && !info.zhuSkill && !info.charlotte && !info.limited && !info.dutySkill; - }).length > 0; + retuogu:{ + audio:'tuogu', + trigger:{global:'die'}, + filter:function(event,player){ + return event.player.getStockSkills('仲村由理','天下第一').filter(function(skill){ + var info=get.info(skill); + return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill; + }).length>0; }, - logTarget: 'player', - check: function (event, player) { - var list = event.player.getStockSkills('仲村由理', '天下第一').filter(function (skill) { - var info = get.info(skill); - return info && !info.juexingji && !info.hiddenSkill && !info.zhuSkill && !info.charlotte && !info.limited && !info.dutySkill; + logTarget:'player', + check:function(event,player){ + var list=event.player.getStockSkills('仲村由理','天下第一').filter(function(skill){ + var info=get.info(skill); + return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill; }); - var negSkill = list.some(function (skill) { - return get.skillRank(skill, 'inout') <= 0; + var negSkill=list.some(function(skill){ + return get.skillRank(skill,'inout')<=0; }); - var att = get.sgnAttitude(event.player, player); - if (!player.storage.retuogu) { - if (negSkill && att < 0) return false; + var att=get.sgnAttitude(event.player,player); + if(!player.storage.retuogu){ + if(negSkill&&att<0) return false; return true; } - list.sort(function (a, b) { - return att * (get.skillRank(b, 'inout') - get.skillRank(a, 'inout')); + list.sort(function(a,b){ + return att*(get.skillRank(b,'inout')-get.skillRank(a,'inout')); })[0]; - return get.skillRank(list[0], 'inout') >= get.skillRank(player.storage.retuogu, 'inout'); + return get.skillRank(list[0],'inout')>=get.skillRank(player.storage.retuogu,'inout'); }, - content: function () { + content:function(){ 'step 0' - var list = trigger.player.getStockSkills('仲村由理', '天下第一').filter(function (skill) { - var info = get.info(skill); - return info && !info.juexingji && !info.hiddenSkill && !info.zhuSkill && !info.charlotte && !info.limited && !info.dutySkill; + var list=trigger.player.getStockSkills('仲村由理','天下第一').filter(function(skill){ + var info=get.info(skill); + return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill; }); - if (list.length == 1) event._result = { control: list[0] }; - else trigger.player.chooseControl(list).set('prompt', '选择令' + get.translation(player) + '获得一个技能').set('forceDie', true).set('ai', function () { - var att = get.sgnAttitude(_status.event.getTrigger().player, player); - if (att == 0) return list.randomGet(); - var listx = list.map(function (skill) { - return [skill, get.skillRank(skill, 'inout')]; - }).sort(function (a, b) { - return att * (b[1] - a[1]); - }).slice(0, 2); - var listx2 = [0]; - if (Math.abs(listx[0][1] - listx[1][1]) <= 0.5 && Math.sign(listx[0][1]) == Math.sign(listx[1][1])) listx2.push(1); + if(list.length==1) event._result={control:list[0]}; + else trigger.player.chooseControl(list).set('prompt','选择令'+get.translation(player)+'获得一个技能').set('forceDie',true).set('ai',function(){ + var att=get.sgnAttitude(_status.event.getTrigger().player,player); + if(att==0) return list.randomGet(); + var listx=list.map(function(skill){ + return [skill,get.skillRank(skill,'inout')]; + }).sort(function(a,b){ + return att*(b[1]-a[1]); + }).slice(0,2); + var listx2=[0]; + if(Math.abs(listx[0][1]-listx[1][1])<=0.5&&Math.sign(listx[0][1])==Math.sign(listx[1][1])) listx2.push(1); return listx[listx2.randomGet()][0]; }); 'step 1' - if (player.storage.retuogu) player.removeSkill(player.storage.retuogu); - player.storage.retuogu = result.control; + if(player.storage.retuogu) player.removeSkill(player.storage.retuogu); + player.storage.retuogu=result.control; player.markSkill('retuogu'); player.addSkills(result.control); - game.broadcastAll(function (skill) { - var list = [skill]; + game.broadcastAll(function(skill){ + var list=[skill]; game.expandSkills(list); - for (var i of list) { - var info = lib.skill[i]; - if (!info) continue; - if (!info.audioname2) info.audioname2 = {}; - info.audioname2.caoshuang = 'tuogu'; + for(var i of list){ + var info=lib.skill[i]; + if(!info) continue; + if(!info.audioname2) info.audioname2={}; + info.audioname2.caoshuang='tuogu'; } - }, result.control); + },result.control); }, - mark: true, - intro: { content: '当前托孤技能:$' }, + mark:true, + intro:{content:'当前托孤技能:$'}, }, - shanzhuan: { - trigger: { source: 'damageSource' }, - audio: 2, - direct: true, - filter: function (event, player) { - return player != event.player && !event.player.isDisabledJudge() && event.player.countCards('he') && !event.player.countCards('j', card => get.type(card.viewAs || card.name) == 'delay'); + shanzhuan:{ + trigger:{source:'damageSource'}, + audio:2, + direct:true, + filter:function(event,player){ + return player!=event.player&&!event.player.isDisabledJudge()&&event.player.countCards('he')&&!event.player.countCards('j',card=>get.type(card.viewAs||card.name)=='delay'); }, - content: function () { + content:function(){ 'step 0' - player.choosePlayerCard(trigger.player, 'he', get.prompt('shanzhuan', trigger.player)).set('ai', function (card) { - if (get.attitude(_status.event.player, _status.event.target) >= 0) return 0; + player.choosePlayerCard(trigger.player,'he',get.prompt('shanzhuan',trigger.player)).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.target)>=0) return 0; return get.buttonValue(card); }); 'step 1' - if (result.bool) { - player.logSkill('shanzhuan', trigger.player); - var card = result.cards[0]; + if(result.bool){ + player.logSkill('shanzhuan',trigger.player); + var card=result.cards[0]; trigger.player.$throw(card); game.delayx(); - if (get.type(card, false) == 'delay') trigger.player.addJudge(card); - else trigger.player.addJudge({ name: get.color(card, false) == 'red' ? 'lebu' : 'bingliang' }, result.cards); + if(get.type(card,false)=='delay') trigger.player.addJudge(card); + else trigger.player.addJudge({name:get.color(card,false)=='red'?'lebu':'bingliang'},result.cards); } }, - group: 'shanzhuan_draw', - subfrequent: ['draw'], - subSkill: { - draw: { - audio: 'shanzhuan', - trigger: { player: 'phaseEnd' }, - frequent: true, - prompt: '是否发动【擅专】摸一张牌?', - filter: function (event, player) { + group:'shanzhuan_draw', + subfrequent:['draw'], + subSkill:{ + draw:{ + audio:'shanzhuan', + trigger:{player:'phaseEnd'}, + frequent:true, + prompt:'是否发动【擅专】摸一张牌?', + filter:function(event,player){ return !player.getHistory('sourceDamage').length; }, - content: function () { + content:function(){ player.draw(); }, }, }, }, - olxingshen: { - trigger: { player: 'damageEnd' }, - frequent: true, - audio: 'xingshen', - content: function () { + 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; - var num = player.countMark('olxingshen'); - if (num < 6) player.addMark('olxingshen', Math.min(6 - num, player.getDamagedHp()), false) + var next=player.draw(); + if(get.isLuckyStar(player)||Math.random()<0.5) next.num=2; + var num=player.countMark('olxingshen'); + if(num<6) player.addMark('olxingshen',Math.min(6-num,player.getDamagedHp()),false) }, - intro: { - content: '下一次发动〖严教〗时多展示X张牌', + intro:{ + content:'下一次发动〖严教〗时多展示X张牌', }, }, //张道陵 - zlhuji: { - mod: { - globalFrom: function (player, target, distance) { - return distance - 1; + zlhuji:{ + mod:{ + globalFrom:function(player,target,distance){ + return distance-1; }, }, - trigger: { player: 'damageEnd' }, - forced: true, - filter: function (event, player) { - return player != _status.currentPhase; + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player!=_status.currentPhase; }, - content: function () { + content:function(){ 'step 0' - var func = function (result) { - if (get.color(result) == 'red') return 1; + 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) { + 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; + 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).judge2 = function (result) { - return result.color == 'red' ? true : false; + player.judge(func).judge2=function(result){ + return result.color=='red'?true:false; }; 'step 1' - if (result.color == 'red' && get.itemtype(trigger.source) == 'player' && player.canUse('sha', trigger.source, false)) { - player.useCard({ name: 'sha', isCard: true }, trigger.source, false, 'noai'); + if(result.color=='red'&&get.itemtype(trigger.source)=='player'&&player.canUse('sha',trigger.source,false)){ + player.useCard({name:'sha',isCard:true},trigger.source,false,'noai'); } }, }, - zlshoufu: { - enable: 'phaseUse', - usable: 1, - delay: false, - content: function () { + zlshoufu:{ + enable:'phaseUse', + usable:1, + delay:false, + content:function(){ 'step 0' player.draw(); 'step 1' - var filterTarget = function (card, player, target) { - return target != player && !target.hasSkill('zlshoufu2'); + var filterTarget=function(card,player,target){ + return target!=player&&!target.hasSkill('zlshoufu2'); }; - if (!player.countCards('h') || !game.hasPlayer(function (current) { - return filterTarget(null, player, current); + if(!player.countCards('h')||!game.hasPlayer(function(current){ + return filterTarget(null,player,current); })) event.finish(); else player.chooseCardTarget({ - forced: true, - prompt: '将一张手牌作为“箓”置于其他角色的武将牌上', - filterTarget: filterTarget, - filterCard: true, - position: 'h', - ai1: function (card) { - if (get.type(card, false) == 'equip') return 1 - get.value(card); - return 7 - get.value(card); + forced:true, + prompt:'将一张手牌作为“箓”置于其他角色的武将牌上', + filterTarget:filterTarget, + filterCard:true, + position:'h', + ai1:function(card){ + if(get.type(card,false)=='equip') return 1-get.value(card); + return 7-get.value(card); }, - ai2: function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (att > 0) return -att; - return -att / get.distance(player, target, 'absolute'); + ai2:function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>0) return -att; + return -att/get.distance(player,target,'absolute'); }, }); 'step 2' - var target = result.targets[0]; - var cards = result.cards; - target.addToExpansion(cards, player, 'give').gaintag.add('zlshoufu2'); - player.line(target, 'green'); + var target=result.targets[0]; + var cards=result.cards; + target.addToExpansion(cards,player,'give').gaintag.add('zlshoufu2'); + player.line(target,'green'); target.addSkill('zlshoufu2'); 'step 3' game.delayx(); }, - ai: { - notemp: true, - order: 1, - result: { - player: function (player) { - if (game.hasPlayer(function (target) { - return target != player && !target.hasSkill('zlshoufu2') && get.attitude(player, target) < 0; - }) || !game.hasPlayer(function (target) { - return target != player && !target.hasSkill('zlshoufu2') && get.attitude(player, target) > 0; + ai:{ + notemp:true, + order:1, + result:{ + player:function(player){ + if(game.hasPlayer(function(target){ + return target!=player&&!target.hasSkill('zlshoufu2')&&get.attitude(player,target)<0; + })||!game.hasPlayer(function(target){ + return target!=player&&!target.hasSkill('zlshoufu2')&&get.attitude(player,target)>0; })) return 1; return 0; }, }, }, }, - zlshoufu2: { - marktext: '箓', - intro: { - content: 'expansion', - markcount: 'expansion', + zlshoufu2:{ + marktext:'箓', + intro:{ + content:'expansion', + markcount:'expansion', }, - charlotte: true, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + charlotte:true, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - mod: { - cardEnabled: function (card, player) { - if (player.getExpansions('zlshoufu2').filter(function (magic) { - return get.type2(magic) == get.type2(card); + mod:{ + cardEnabled:function(card,player){ + if(player.getExpansions('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type2(card); }).length) return false; }, - cardRespondable: function (card, player) { - if (player.getExpansions('zlshoufu2').filter(function (magic) { - return get.type2(magic) == get.type2(card); + cardRespondable:function(card,player){ + if(player.getExpansions('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type2(card); }).length) return false; }, - cardSavable: function (card, player) { - if (player.getExpansions('zlshoufu2').filter(function (magic) { - return get.type2(magic) == get.type2(card); + cardSavable:function(card,player){ + if(player.getExpansions('zlshoufu2').filter(function(magic){ + return get.type2(magic)==get.type2(card); }).length) return false; }, }, - trigger: { - player: ['damageEnd', 'loseAfter'], - global: 'loseAsyncAfter', + trigger:{ + player:['damageEnd','loseAfter'], + global:'loseAsyncAfter', }, - forced: true, - filter: function (event, player) { - var storage = player.getExpansions('zlshoufu2'); - if (!storage.length) return false; - if (event.name == 'damage') return true; - if (event.type != 'discard' || event.getlx === false || event.getParent('phaseDiscard').player != player) return false; - var num = 0, evt = event.getl(player); - if (!evt || !evt.cards2) return false; - for (var i of evt.cards2) { - if (storage.filter(function (magic) { - return get.type2(magic) == get.type2(i, event.hs.includes(i) ? player : false); + forced:true, + filter:function(event,player){ + var storage=player.getExpansions('zlshoufu2'); + if(!storage.length) return false; + if(event.name=='damage') return true; + if(event.type!='discard'||event.getlx===false||event.getParent('phaseDiscard').player!=player) return false; + var num=0,evt=event.getl(player); + if(!evt||!evt.cards2) return false; + for(var i of evt.cards2){ + if(storage.filter(function(magic){ + return get.type2(magic)==get.type2(i,event.hs.includes(i)?player:false); }).length) num++; } - return num > 1; + return num>1; }, - content: function () { + content:function(){ player.removeSkill('zlshoufu2'); }, }, //蔡阳 - yinka: { - trigger: { player: ['drawBegin', 'judgeBegin'] }, - direct: true, - filter: function () { - return ui.cardPile.childNodes.length > 0; + yinka:{ + trigger:{player:['drawBegin','judgeBegin']}, + direct:true, + filter:function(){ + return ui.cardPile.childNodes.length>0; }, - content: function () { + content:function(){ 'step 0' - player.chooseButton(['印卡:请选择要置于牌堆' + (trigger.bottom ? '底' : '顶') + '的牌(先选择的在上)', Array.from(ui.cardPile.childNodes)], [1, trigger.num || 1]); + 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(); + 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(); + else{ + var card=result.links.pop(); ui.cardPile.removeChild(card); - ui.cardPile.insertBefore(card, ui.cardPile.firstChild) + ui.cardPile.insertBefore(card,ui.cardPile.firstChild) } } } }, - ai: { isLuckyStar: true }, + ai:{isLuckyStar:true}, }, //新王允 - xinlianji: { - enable: 'phaseUse', - audio: 'wylianji', - usable: 1, - check: function (card) { - return 5 - get.value(card); + 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; + filterTarget:function(card,player,target){ + if(ui.selected.targets.length) return true; + return target!=player; }, - filterCard: true, - selectTarget: 2, - multitarget: true, - targetprompt: ['打人', '被打'], - content: function () { + 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); + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'&&targets[0].hasUseTarget(card); }); - if (card) { - if (card.name == 'qinggang' && !lib.inpile.includes('qibaodao')) { + if(card){ + if(card.name=='qinggang'&&!lib.inpile.includes('qibaodao')){ card.remove(); - card = game.createCard('qibaodao', card.suit, card.number); + card=game.createCard('qibaodao',card.suit,card.number); } - targets[0].chooseUseTarget(card, true, 'nopopup', 'nothrow'); + targets[0].chooseUseTarget(card,true,'nopopup','nothrow'); } - else { + 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.includes(_status.event.sourcex)) return false; - return lib.filter.filterTarget.apply(this, arguments); - }).set('sourcex', targets[1]).set('addCount', false); + 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.includes(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',targets[1]).set('addCount',false); 'step 2' - var cards = targets[0].getEquips(1); - if (!result.bool && cards.length) { - event.cards = cards; - player.chooseTarget(true, '将' + get.translation(cards) + '交给一名其他角色').set('ai', function (target) { - var card = _status.event.getParent().cards; - return (target.hasSkillTag('nogain') ? 0 : get.attitude(_status.event.player, target)) * Math.max(0.1, target.getUseValue(cards[0])); + var cards=targets[0].getEquips(1); + if(!result.bool&&cards.length){ + event.cards=cards; + player.chooseTarget(true,'将'+get.translation(cards)+'交给一名其他角色').set('ai',function(target){ + var card=_status.event.getParent().cards; + return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(cards[0])); }); } else event.finish(); 'step 3' - result.targets[0].gain(cards, result.targets[0], 'give').giver = player; + result.targets[0].gain(cards,result.targets[0],'give').giver=player; }, - 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); + 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; + 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; + 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)); + 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 game.hasPlayer2(function (current) { - return current.getAllHistory('sourceDamage', function (evt) { - if (!evt.card || evt.card.name != 'sha' || evt.getParent().type != 'card') return false; - var evt2 = evt.getParent(4); - return evt2 && evt2.name == 'xinlianji' && evt2.player == player; - }).length > 0; + xinmoucheng:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:'moucheng', + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + derivation:'xinjingong', + unique:true, + filter:function(event,player){ + return game.hasPlayer2(function(current){ + return current.getAllHistory('sourceDamage',function(evt){ + if(!evt.card||evt.card.name!='sha'||evt.getParent().type!='card') return false; + var evt2=evt.getParent(4); + return evt2&&evt2.name=='xinlianji'&&evt2.player==player; + }).length>0; }); }, - content: function () { + content:function(){ player.awakenSkill('xinmoucheng'); - player.changeSkills(['xinjingong'], ['xinlianji']); + player.changeSkills(['xinjingong'],['xinlianji']); }, }, - xinjingong: { - audio: 'jingong', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return event.xinjingong_list && player.countCards('hes', function (card) { - return card.name == 'sha' || get.type(card) == 'equip'; + xinjingong:{ + audio:'jingong', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return event.xinjingong_list&&player.countCards('hes',function(card){ + return card.name=='sha'||get.type(card)=='equip'; }); }, - onChooseToUse: function (event) { - if (!game.online) { - var evt = event.getParent(); - if (evt.name != 'phaseUse') return; - if (!evt.xinjingong_list) { - var list = get.inpile('trick').randomGets(2); - if (Math.random() < 0.5) { + onChooseToUse:function(event){ + if(!game.online){ + var evt=event.getParent(); + if(evt.name!='phaseUse') return; + if(!evt.xinjingong_list){ + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ list.push('wy_meirenji'); } - else { + else{ list.push('wy_xiaolicangdao'); } - evt.xinjingong_list = list; + evt.xinjingong_list=list; } - if (!event.xinjingong_list) event.set('xinjingong_list', evt.xinjingong_list); + if(!event.xinjingong_list) event.set('xinjingong_list',evt.xinjingong_list); } }, - chooseButton: { - dialog: function (event, player) { - var list = []; - for (var i of event.xinjingong_list) list.push(['锦囊', '', i]); - return ui.create.dialog('矜功', [list, 'vcard']); + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i of event.xinjingong_list) list.push(['锦囊','',i]); + return ui.create.dialog('矜功',[list,'vcard']); }, - filter: function (button, player) { - return lib.filter.filterCard({ name: button.link[2] }, player, _status.event.getParent()); + filter:function(button,player){ + return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent()); }, - check: function (button) { - return _status.event.player.getUseValue({ name: button.link[2] }); + check:function(button){ + return _status.event.player.getUseValue({name:button.link[2]}); }, - backup: function (links, player) { + backup:function(links,player){ return { - audio: 'jingong', - popname: true, - position: 'hes', - viewAs: { name: links[0][2] }, - check: function (card) { - return 6 - get.value(card); + audio:'jingong', + popname:true, + position:'hes', + viewAs:{name:links[0][2]}, + check:function(card){ + return 6-get.value(card); }, - filterCard: function (card) { - return card.name == 'sha' || get.type(card) == 'equip'; + filterCard:function(card){ + return card.name=='sha'||get.type(card)=='equip'; }, }; }, - prompt: function (links, player) { - return '将一张【杀】或装备牌当做' + get.translation(links[0][2]) + '使用'; + prompt:function(links,player){ + return '将一张【杀】或装备牌当做'+get.translation(links[0][2])+'使用'; } }, - ai: { - order: 2, - result: { - player: 1 + ai:{ + order:2, + result:{ + player:1 } } }, //孙邵 - bizheng: { - trigger: { player: 'phaseDrawEnd' }, - direct: true, - audio: 2, - content: function () { + bizheng:{ + trigger:{player:'phaseDrawEnd'}, + direct:true, + audio:2, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('bizheng'), lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - if (player.countCards('h') > player.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; + player.chooseTarget(get.prompt2('bizheng'),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + if(player.countCards('h')>player.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); + 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); + if(player.countCards('h')>player.maxHp) player.chooseToDiscard(2,'he',true); 'step 3' - if (target.countCards('h') > target.maxHp) target.chooseToDiscard(2, 'he', true); + if(target.countCards('h')>target.maxHp) target.chooseToDiscard(2,'he',true); }, - ai: { - expose: 0.25, + 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; i < ui.discardPile.childElementCount; i++) { - if (ui.discardPile.childNodes[i].name == event.card.name) return false; + 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;i 0; - })) { - player.chooseControl('cancel2').set('choiceList', [ + _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, current) > 5; - }) > 0; - return current.countCards('ej', function (card) { - return get.position(card) == 'j' || get.value(card, current) <= 0; - }) > 0; + ]).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,current)>5; + })>0; + return current.countCards('ej',function(card){ + return get.position(card)=='j'||get.value(card,current)<=0; + })>0; })) return 1; return 0; }); } - else { - player.chooseControl('ok', 'cancel2').set('prompt', get.prompt2('neifa')); + else{ + player.chooseControl('ok','cancel2').set('prompt',get.prompt2('neifa')); } 'step 1' - if (result.control == 'cancel2') { + if(result.control=='cancel2'){ delete _status.noclearcountdown; - if (!_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, target) > 5; + 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,target)>5; })) return -att; return -1; }); } - else { + else{ delete _status.noclearcountdown; - if (!_status.noclearcountdown) { + if(!_status.noclearcountdown){ game.stopCountChoose(); } player.logSkill('neifa'); @@ -14273,832 +14274,832 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } 'step 2' delete _status.noclearcountdown; - if (!_status.noclearcountdown) { + if(!_status.noclearcountdown){ game.stopCountChoose(); } - if (result.bool) { - var target = result.targets[0]; - player.logSkill('neifa', target); - player.gainPlayerCard(target, 'ej', true); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('neifa',target); + player.gainPlayerCard(target,'ej',true); } 'step 3' - player.chooseToDiscard(true, 'he').set('ai', function (cardx) { - var player = _status.event.player; - var num = 0; - var hs = player.getCards('h'); - var muniu = player.getEquip('muniu'); - var subs = []; - if (muniu && muniu.cards) hs = hs.concat(muniu.cards); - if (get.type(cardx) == 'basic') { - var shas = hs.filter(function (card) { - return card != cardx && get.name(card, player) == 'sha' && player.hasValueTarget(card); + player.chooseToDiscard(true,'he').set('ai',function(cardx){ + var player=_status.event.player; + var num=0; + var hs=player.getCards('h'); + var muniu=player.getEquip('muniu'); + var subs=[]; + if(muniu&&muniu.cards) hs=hs.concat(muniu.cards); + if(get.type(cardx)=='basic'){ + var shas=hs.filter(function(card){ + return card!=cardx&&get.name(card,player)=='sha'&&player.hasValueTarget(card); }); - var numx = player.countCards('h', function (card) { - return get.type(card, player) != 'basic'; + var numx=player.countCards('h',function(card){ + return get.type(card,player)!='basic'; }); - num += Math.min(numx, Math.max(0, shas.length - player.getCardUsable('sha'))) * 0.7; - num += Math.min(player.getCardUsable('sha') + numx, shas.filter(function (card) { - return game.countPlayer(function (current) { - return player.canUse(card, current) && get.effect(current, card, player, player) > 0; - }) > 1; - }).length) * 1.1; - var taos = Math.min(player.maxHp - player.hp, hs.filter(function (card) { - return cardx != card && get.name(card, player) == 'tao'; + num+=Math.min(numx,Math.max(0,shas.length-player.getCardUsable('sha')))*0.7; + num+=Math.min(player.getCardUsable('sha')+numx,shas.filter(function(card){ + return game.countPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })>1; + }).length)*1.1; + var taos=Math.min(player.maxHp-player.hp,hs.filter(function(card){ + return cardx!=card&&get.name(card,player)=='tao'; }).length); - num += taos * player.getDamagedHp() * 1.2; + num+=taos*player.getDamagedHp()*1.2; } - else { - var numx = Math.sqrt(Math.min(5, player.countCards('h', function (card) { - return get.type(card, player) == 'basic'; + else{ + var numx=Math.sqrt(Math.min(5,player.countCards('h',function(card){ + return get.type(card,player)=='basic'; }))); - if (numx) num += numx * Math.min(2, hs.filter(function (card) { - if (card == cardx || get.type(card) != 'equip' || !player.hasUseTarget(card)) return false; + if(numx) num+=numx*Math.min(2,hs.filter(function(card){ + if(card==cardx||get.type(card)!='equip'||!player.hasUseTarget(card)) return false; subs.add(get.subtype(card)); return true; - }).length) * (2.5 + player.countCards('e')) / 2.5; - num += hs.filter(function (card) { - return card != cardx && get.type2(card) == 'trick' && player.hasValueTarget(card); - }).length * 0.65; + }).length)*(2.5+player.countCards('e'))/2.5; + num+=hs.filter(function(card){ + return card!=cardx&&get.type2(card)=='trick'&&player.hasValueTarget(card); + }).length*0.65; } - if (get.position(cardx) == 'e' && cardx.name != 'muniu' && subs.includes(get.subtype(card))) num += 3; - return num * 1.5 - get.value(cardx); + if(get.position(cardx)=='e'&&cardx.name!='muniu'&&subs.includes(get.subtype(card))) num+=3; + return num*1.5-get.value(cardx); }); 'step 4' - if (result.bool && result.cards && result.cards.length) { - var name = get.type(result.cards[0]) == 'basic' ? 'neifa_basic' : 'neifa_nobasic'; + 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') + var num=Math.min(5,player.countCards('h',function(cardx){ + return (name=='neifa_basic')!=(get.type(cardx,player)=='basic') })); - if (num > 0) player.addMark(name, num, false); - else player.storage[name] = 0; + if(num>0) player.addMark(name,num,false); + else player.storage[name]=0; } }, - ai: { - threaten: 3, + ai:{ + threaten:3, }, }, - neifa_basic: { - mark: true, - marktext: '伐', - onremove: true, - intro: { - name: '内伐 - 基本牌', - content: '本回合内不能使用锦囊牌和装备牌,使用【杀】选择目标时可以额外指定一个目标且使用【杀】的目标次数上限+#。', + neifa_basic:{ + mark:true, + marktext:'伐', + onremove:true, + intro:{ + name:'内伐 - 基本牌', + content:'本回合内不能使用锦囊牌和装备牌,使用【杀】选择目标时可以额外指定一个目标且使用【杀】的目标次数上限+#。', }, - mod: { - cardEnabled: function (card, player) { - if (['trick', 'equip'].includes(get.type(card, 'trick'))) return false; + mod:{ + cardEnabled:function(card,player){ + if(['trick','equip'].includes(get.type(card,'trick'))) return false; }, - cardSavable: function (card, player) { - if (['trick', 'equip'].includes(get.type(card, 'trick'))) return false; + cardSavable:function(card,player){ + if(['trick','equip'].includes(get.type(card,'trick'))) return false; }, - cardUsable: function (card, player, num) { - if (card.name == 'sha') { - return num + player.countMark('neifa_basic'); + 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.includes(current) && player.canUse(event.card, current); + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.includes(current)&&player.canUse(event.card,current); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('neifa'), '为' + get.translation(trigger.card) + '额外指定一个目标', function (card, player, target) { - return !_status.event.sourcex.includes(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); + player.chooseTarget(get.prompt('neifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ + return !_status.event.sourcex.includes(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() && !event.isOnline()) game.delayx(); - event.targets = result.targets; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; } - else { + else{ event.finish(); } 'step 2' - player.logSkill('neifa', event.targets); + 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; + 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; + cardSavable:function(card,player){ + if(get.type(card)=='basic') return false; }, }, - intro: { - name: '内伐 - 非基本牌', - content: '本回合内不能使用基本牌,使用普通锦囊牌选择目标时可以增加或减少一个目标,且本回合的出牌阶段内前两次使用装备牌时摸#张牌。' + intro:{ + name:'内伐 - 非基本牌', + content:'本回合内不能使用基本牌,使用普通锦囊牌选择目标时可以增加或减少一个目标,且本回合的出牌阶段内前两次使用装备牌时摸#张牌。' }, - 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 !event.targets.includes(current) && lib.filter.targetEnabled2(event.card, player, current) && lib.filter.targetInRange(event.card, player, current); - })) { + 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 !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); + })){ return true; } } return false; }, - content: function () { + 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.includes(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.includes(target) ? -1 : 1); - }).set('targets', trigger.targets).set('card', trigger.card); + var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' + player.chooseTarget(get.prompt('neifa'),function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.includes(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.includes(target)?-1:1); + }).set('targets',trigger.targets).set('card',trigger.card); 'step 1' - if (result.bool) { - if (!event.isMine() && !event.isOnline()) game.delayx(); - event.targets = result.targets; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; } - else { + else{ event.finish(); } 'step 2' - if (event.targets) { - player.logSkill('neifa', event.targets); - if (trigger.targets.includes(event.targets[0])) trigger.targets.removeArray(event.targets); + if(event.targets){ + player.logSkill('neifa',event.targets); + if(trigger.targets.includes(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; + 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]; + 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; + 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 () { + content:function(){ player.draw(player.countMark('neifa_nobasic')); }, }, //许靖 - yuxu: { - audio: 2, - trigger: { player: 'useCardAfter' }, - filter: function (event, player) { - var evt = event.getParent('phaseUse'); - if (!evt || evt.player != player) return false; + yuxu:{ + audio:2, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; return true; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var draw = !player.hasMark('yuxu_used'); - if (draw) player.chooseBool(get.prompt2('yuxu')).set('ai', () => 1); + var draw=!player.hasMark('yuxu_used'); + if(draw) player.chooseBool(get.prompt2('yuxu')).set('ai',()=>1); else event.goto(2); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('yuxu'); player.draw(); - player.addMark('yuxu_used', 1, false); - player.addTempSkill('yuxu_used', 'phaseUseAfter'); + player.addMark('yuxu_used',1,false); + player.addTempSkill('yuxu_used','phaseUseAfter'); } event.finish(); 'step 2' player.logSkill('yuxu'); - player.removeMark('yuxu_used', player.countMark('yuxu_used'), false); - player.chooseToDiscard('he', true); + player.removeMark('yuxu_used',player.countMark('yuxu_used'),false); + player.chooseToDiscard('he',true); }, - subSkill: { - used: { - charlotte: true, - onremove: true + subSkill:{ + used:{ + charlotte:true, + onremove: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; + 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 () { + 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); + 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.addTempSkills('yuxu'); + if(result.bool) trigger.player.addTempSkills('yuxu'); }, - ai: { - expose: 0.25, + ai:{ + expose:0.25, }, }, //新1v1 - yanhuo: { - audio: 2, - trigger: { player: 'die' }, - forceDie: true, - filter: function (event, player) { - return player.countCards('he') > 0; + 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 () { + 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); + 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'); + 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')) { + if(target.countDiscardableCards(player,'he')){ player.line(target); - player.discardPlayerCard(target, 'he', true).set('forceDie', true); + player.discardPlayerCard(target,'he',true).set('forceDie',true); event.count--; - if (event.count) event.redo(); + if(event.count) event.redo(); } }, }, - mouzhu: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h') > 0; + mouzhu:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; }, - content: function () { + content:function(){ 'step 0' - target.chooseCard('h', '交给' + get.translation(player) + '一张手牌', true); + target.chooseCard('h','交给'+get.translation(player)+'一张手牌',true); 'step 1' - if (result.bool) target.give(result.cards, player); + if(result.bool) target.give(result.cards,player); 'step 2' - if (player.countCards('h') <= target.countCards('h')) { + 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'; + 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, 'noai'); + target.useCard({name:result.control,isCard:true},player,'noai'); }, - 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; + 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.getHistory('useCard', function (card) { - return card.card.name == 'sha'; - }).length > 0); + niluan:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player!=player&&(event.player.hp>player.hp||event.player.getHistory('useCard',function(card){ + return card.card.name=='sha'; + }).length>0); }, - 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.set('custom', { - add: {}, - replace: { window: function () { } } + 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.set('custom',{ + add:{}, + replace:{window:function(){}} }); next.backup('niluanx'); }, }, - niluanx: { - viewAs: { name: 'sha' }, - filterCard: { color: 'black' }, - position: 'hes', - selectCard: 1, - check: function (card) { return 5 - get.value(card) }, + niluanx:{ + viewAs:{name:'sha'}, + filterCard:{color:'black'}, + position:'hes', + selectCard:1, + check:function(card){return 5-get.value(card)}, }, - cuorui: { - audio: 2, - trigger: { - global: 'phaseBefore', - player: 'enterGame', + cuorui:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - filter: function (event, player) { - return player.maxHp > 0 && !get.is.single() && (event.name != 'phase' || game.phaseNumber == 0); + forced:true, + filter:function(event,player){ + return player.maxHp>0&&!get.is.single()&&(event.name!='phase'||game.phaseNumber==0); }, - content: function () { - player.draw(Math.min(5, player.maxHp), false); + content:function(){ + player.draw(Math.min(5,player.maxHp),false); }, - group: 'cuorui_nojudge', - subSkill: { - nojudge: { - trigger: { - player: 'phaseJudgeBefore', + 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')); + forced:true, + audio:'cuorui', + filter:function(event,player){ + return !player.storage.cuorui&&(get.is.single()||player.countCards('j')); }, - content: function () { - player.storage.cuorui = true; + content:function(){ + player.storage.cuorui=true; trigger.cancel(); - game.log(player, '跳过了', '#g判定阶段'); + game.log(player,'跳过了','#g判定阶段'); }, }, }, }, - liewei: { - audio: 2, - trigger: { source: 'dieAfter' }, - frequent: true, - content: function () { + liewei:{ + audio:2, + trigger:{source:'dieAfter'}, + frequent:true, + content:function(){ player.draw(3); }, }, //蒋干 - weicheng: { - audio: 2, - trigger: { - global: 'gainAfter', - player: 'loseAsyncAfter', + weicheng:{ + audio:2, + trigger:{ + global:'gainAfter', + player:'loseAsyncAfter', }, //forced:true, - frequent: true, - filter: function (event, player) { - if (player.getHp() <= player.countCards('h')) return false; - if (event.name == 'loseAsync') { - if (event.type != 'gain') return false; - var cards = event.getl(player).hs; - return game.hasPlayer(function (current) { - if (current == player) return false; - var cardsx = event.getg(current); - for (var i of cardsx) { - if (cards.includes(i)) return true; + frequent:true, + filter:function(event,player){ + if(player.getHp()<=player.countCards('h')) return false; + if(event.name=='loseAsync'){ + if(event.type!='gain') return false; + var cards=event.getl(player).hs; + return game.hasPlayer(function(current){ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.includes(i)) return true; } return false; }); } - if (event.player == player) return false; - var evt = event.getl(player); - return evt && evt.hs && evt.hs.length > 0; + if(event.player==player) return false; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length>0; }, - preHidden: true, - content: function () { + preHidden:true, + content:function(){ player.draw(); }, }, - daoshu: { - audio: 2, - enable: 'phaseUse', - filterTarget: function (c, p, t) { - return t != p && t.countGainableCards(p, 'h') > 0; + daoshu:{ + audio:2, + enable:'phaseUse', + filterTarget:function(c,p,t){ + return t!=p&&t.countGainableCards(p,'h')>0; }, - filter: function (e, p) { + filter:function(e,p){ return !p.hasSkill('daoshu_used') }, - content: function () { + content:function(){ 'step 0' - player.chooseControl(lib.suit).set('prompt', '请选择一个花色').ai = function () { return lib.suit.randomGet() }; + 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'); + 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) { + 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) { + 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 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); + player.give(result.cards,target,true); }, - ai: { - order: 1, - result: { - target: -1, + ai:{ + order:1, + result:{ + target:-1, }, }, - subSkill: { - used: { sub: true }, + 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 && current.side == to.side && current.hasSkill('zhenwei_three'); - })) return distance + 1; + "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, + sub:true, }, }, }, - "huanshi_three": { - audio: "huanshi", - trigger: { - global: "judge", + "huanshi_three":{ + audio:"huanshi", + trigger:{ + global:"judge", }, - filter: function (event, player) { - return player.countCards('hes') > 0 && player.side == event.player.side; + filter:function (event,player){ + return player.countCards('hes')>0&&player.side==event.player.side; }, - direct: true, - content: function () { + direct:true, + content:function (){ "step 0" - player.chooseCard(get.translation(trigger.player) + '的' + (trigger.judgestr || '') + '判定为' + - get.translation(trigger.player.judging[0]) + ',' + get.prompt('huanshi_three'), 'hes', 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]); + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'hes',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'); + if(result.bool){ + player.respond(result.cards,'highlight','huanshi_three','noOrdering'); } - else { + else{ event.finish(); } "step 2" - if (result.bool) { - if (trigger.player.judging[0].clone) { + if(result.bool){ + if(trigger.player.judging[0].clone){ trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function (card) { - if (card.clone) { + 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])); + },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.player.judging[0]=result.cards[0]; trigger.orderingCards.addArray(result.cards); - game.log(trigger.player, '的判定牌改为', result.cards[0]); + game.log(trigger.player,'的判定牌改为',result.cards[0]); game.delay(2); } }, - ai: { - rejudge: true, - tag: { - rejudge: 1, + ai:{ + rejudge:true, + tag:{ + rejudge:1, }, }, }, //变权移植 - wanwei: { - trigger: { target: ['rewriteGainResult', 'rewriteDiscardResult'] }, - direct: true, - preHidden: true, - filter: function (event, player) { - return event.player != player; + wanwei:{ + trigger:{target:['rewriteGainResult','rewriteDiscardResult']}, + direct:true, + preHidden:true, + filter:function(event,player){ + return event.player!=player; }, - audio: 2, - content: function () { + 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); + 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; + next.filterButton=trigger.filterButton; + next.selectButton=trigger.result.cards.length; next.setHiddenSkill('wanwei'); 'step 1' - if (result.bool) { + 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.result.cards=result.links.slice(0); + trigger.result.links=result.links.slice(0); + trigger.cards=result.links.slice(0); trigger.untrigger(); } } }, - 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; + 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; + 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-=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; + 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, - preHidden: true, - filter: function (event, player) { - return player.getHistory('useCard').length + player.getHistory('respond').length == player.getAttackRange(); + trigger:{player:['useCard','respond']}, + frequent:true, + locked:false, + preHidden:true, + filter:function(event,player){ + return player.getHistory('useCard').length+player.getHistory('respond').length==player.getAttackRange(); }, - audio: 2, - content: function () { - player.draw(player.getHistory('useCard').length + player.getHistory('respond').length); + audio:2, + content:function(){ + player.draw(player.getHistory('useCard').length+player.getHistory('respond').length); }, - ai: { - threaten: 1.8, - effect: { - target: function (card, player, target, current) { - let used = (target.getHistory('useCard').length + target.getHistory('respond').length); - if (get.subtype(card) == 'equip1' && !get.cardtag(card, 'gifts')) { - if (player != target || !player.isPhaseUsing()) return; - let range0 = player.getAttackRange(); - let range = 0; - let info = get.info(card); - if (info && info.distance && info.distance.attackFrom) { - range -= info.distance.attackFrom; + ai:{ + threaten:1.8, + effect:{ + target:function(card,player,target,current){ + let used=(target.getHistory('useCard').length+target.getHistory('respond').length); + if(get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')){ + if(player!=target||!player.isPhaseUsing()) return; + let range0=player.getAttackRange(); + let range=0; + let info=get.info(card); + if(info&&info.distance&&info.distance.attackFrom){ + range-=info.distance.attackFrom; } - if (player.getEquip(1)) { - let num = 0; - let info = get.info(player.getEquip(1)); - if (info && info.distance && info.distance.attackFrom) { - num -= info.distance.attackFrom; + if(player.getEquip(1)){ + let num=0; + let info=get.info(player.getEquip(1)); + if(info&&info.distance&&info.distance.attackFrom){ + num-=info.distance.attackFrom; } - range0 -= num; + range0-=num; } - range0 += range; - let delta = range0 - used; - if (delta < 0) return; - let num = player.countCards('h', function (card) { - return (get.cardtag(card, 'gifts') || get.subtype(card) != 'equip1') && player.getUseValue(card) > 0; + range0+=range; + let delta=range0-used; + if(delta<0) return; + let 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'; + if(delta==2&&num>0) return [1,3]; + if(num>=delta) return 'zeroplayertarget'; } - else if (get.tag(card, 'respondShan') > 0) { - if (current < 0 && used == target.getAttackRange() - 1) { - if (card.name === 'sha') { - if (!target.mayHaveShan(player, 'use', target.getCards('h', i => { + else if(get.tag(card,'respondShan')>0){ + if(current<0&&used==target.getAttackRange()-1){ + if(card.name==='sha'){ + if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); }))) return; } - else if (!target.mayHaveShan(player)) return 0.9; - return [1, (used + 1) / 2]; + else if(!target.mayHaveShan(player)) return 0.9; + return [1,(used+1)/2]; } } - else if (get.tag(card, 'respondSha') > 0) { - if (current < 0 && used == target.getAttackRange() - 1 && target.mayHaveSha(player)) return [1, (used + 1) / 2]; + else if(get.tag(card,'respondSha')>0){ + if(current<0&&used==target.getAttackRange()-1&&target.mayHaveSha(player)) return [1,(used+1)/2]; } }, }, } }, - xiongsuan: { - audio: 2, + xiongsuan:{ + audio:2, }, - diancai: { - audio: 2, + diancai:{ + audio:2, }, - diaodu: { - audio: 2, + diaodu:{ + audio:2, }, - zhengbi: { - audio: 2, + zhengbi:{ + audio:2, }, - fengying: { - audio: 2, + fengying:{ + audio:2, }, //新服曹笨 - 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')) { - return num / player.hp; + 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')){ + return num/player.hp; } }, }, - audio: "shanjia", - trigger: { - player: "phaseUseBegin", + audio:"shanjia", + trigger:{ + player:"phaseUseBegin", }, - intro: { - content: "本局游戏内已失去过#张装备牌", + intro:{ + content:"本局游戏内已失去过#张装备牌", }, - frequent: true, - sync: function (player) { - var history = player.actionHistory; - var num = 0; - for (var i = 0; i < history.length; i++) { - for (var j = 0; j < history[i].lose.length; j++) { - if (history[i].lose[j].parent.name == 'useCard') continue; - num += history[i].lose[j].cards2.filter(function (card) { - return get.type(card, false) == 'equip'; + frequent:true, + sync:function(player){ + var history=player.actionHistory; + var num=0; + for(var i=0;i 0) player.markSkill('xinshanjia'); + player.storage.xinshanjia=num; + if(num>0) player.markSkill('xinshanjia'); }, - content: function () { + 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; + var num=3-player.storage.xinshanjia; + if(num>0){ + player.chooseToDiscard('he',true,num).ai=get.disvalue; } 'step 2' - var bool1 = true, bool2 = true; - if (result.cards) { - var cards = result.cards; - for (var i = 0; i < result.cards.length; i++) { - var type = get.type(result.cards[i], 'trick', result.cards[i].original == 'h' ? player : false); - if (type == 'basic') bool1 = false; - if (type == 'trick') bool2 = false; + var bool1=true,bool2=true; + if(result.cards){ + var cards=result.cards; + for(var i=0;i 2) return false; + ai:{ + threaten:3, + noe:true, + reverseOrder:true, + skillTagFilter:function(player){ + if(player.storage.xinshanjia>2) return false; }, - effect: { - target: function (card, player, target) { - if (player.storage.xinshanjia < 3 && get.type(card) == 'equip' && !get.cardtag(card, 'gifts')) return [1, 3]; + effect:{ + target:function(card,player,target){ + if(player.storage.xinshanjia<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; }, }, }, - subSkill: { - count: { - forced: true, - silent: true, - popup: false, - trigger: { - player: "loseEnd", + subSkill:{ + count:{ + forced:true, + silent:true, + popup:false, + trigger:{ + player:"loseEnd", }, - filter: function (event, player) { - return event.cards2 && event.cards2.length > 0; + filter:function(event,player){ + return event.cards2&&event.cards2.length>0; }, - content: function () { + content:function (){ lib.skill.xinshanjia.sync(player); }, }, - sha: { - mark: true, - charlotte: true, - intro: { content: '使用【杀】的次数上限+1' }, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + sha:{ + mark:true, + charlotte:true, + intro:{content:'使用【杀】的次数上限+1'}, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; } } }, - nodis: { - mark: true, - charlotte: true, - intro: { content: '使用牌无距离限制' }, - mod: { - targetInRange: () => true + nodis:{ + mark:true, + charlotte:true, + intro:{content:'使用牌无距离限制'}, + mod:{ + targetInRange:()=>true } } } }, //OL马超 - ol_shichou: { - audio: 2, - trigger: { player: 'useCard2' }, - filter: function (event, player) { - return event.card && event.card.name == 'sha'; + ol_shichou:{ + audio:2, + trigger:{player:'useCard2'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var num = player.getDamagedHp() + 1; - player.chooseTarget('是否发动【誓仇】?', '为' + get.translation(trigger.card) + '添加至多' + get.cnNumber(num) + '个目标', [1, num], function (card, player, target) { - var evt = _status.event.getTrigger(); - return target != player && !evt.targets.includes(target) && lib.filter.targetEnabled2(evt.card, player, target) && lib.filter.targetInRange(evt.card, player, target); - }).set('ai', function (target) { - return get.effect(target, _status.event.getTrigger().card, _status.event.player); + var num=player.getDamagedHp()+1; + player.chooseTarget('是否发动【誓仇】?','为'+get.translation(trigger.card)+'添加至多'+get.cnNumber(num)+'个目标',[1,num],function(card,player,target){ + var evt=_status.event.getTrigger(); + return target!=player&&!evt.targets.includes(target)&&lib.filter.targetEnabled2(evt.card,player,target)&&lib.filter.targetInRange(evt.card,player,target); + }).set('ai',function(target){ + return get.effect(target,_status.event.getTrigger().card,_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); + 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); } }, @@ -15134,347 +15135,347 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, }, - ol_shichou2: { - charlotte: true, - trigger: { player: 'useCardAfter' }, - filter: function (event, player) { - return event.ol_shichou && !player.getHistory('sourceDamage', function (evt) { - return evt.card == event.card; - }).length && event.cards.filterInD().length > 0; + ol_shichou2:{ + charlotte:true, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return event.ol_shichou&&!player.getHistory('sourceDamage',function(evt){ + return evt.card==event.card; + }).length&&event.cards.filterInD().length>0; }, - forced: true, - popup: false, - content: function () { - player.gain(trigger.cards.filterInD(), 'gain2'); + forced:true, + popup:false, + content:function(){ + player.gain(trigger.cards.filterInD(),'gain2'); }, }, //新大小乔 - new_xingwu: { - audio: "xingwu", - trigger: { - player: "phaseDiscardBegin", + new_xingwu:{ + audio:"xingwu", + trigger:{ + player:"phaseDiscardBegin", }, - direct: true, - intro: { - content: "expansion", - markcount: 'expansion', - onunmark: function (storage, player) { + direct:true, + intro:{ + content:"expansion", + markcount:'expansion', + onunmark:function(storage,player){ player.removeAdditionalSkill('new_luoyan'); }, }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - filter: function (event, player) { - return player.countCards('he') > 0; + filter:function(event,player){ + return player.countCards('he')>0; }, - content: function () { + content:function(){ 'step 0' - player.chooseCard('he', get.prompt('new_xingwu'), '将一张牌置于武将牌上作为“舞”').set('ai', function (card) { - if (_status.event.goon) return 20 - get.value(card); - return 7 - get.value(card); - }).set('goon', player.needsToDiscard() || player.getExpansions('new_xingwu').length > 1); + player.chooseCard('he',get.prompt('new_xingwu'),'将一张牌置于武将牌上作为“舞”').set('ai',function(card){ + if(_status.event.goon) return 20-get.value(card); + return 7-get.value(card); + }).set('goon',player.needsToDiscard()||player.getExpansions('new_xingwu').length>1); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('new_xingwu'); - var cards = result.cards; - player.addToExpansion(cards, player, 'give').gaintag.add('new_xingwu'); - if (player.hasSkill('new_luoyan')) player.addAdditionalSkill('new_luoyan', ['oltianxiang', 'liuli']); + var cards=result.cards; + player.addToExpansion(cards,player,'give').gaintag.add('new_xingwu'); + if(player.hasSkill('new_luoyan')) player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']); } else event.finish(); 'step 2' game.delayx(); - var choices = []; - event.addIndex = 0; - if (player.getExpansions('new_xingwu').length > 2) { + var choices=[]; + event.addIndex=0; + if(player.getExpansions('new_xingwu').length>2){ choices.push('将三张“星舞”牌置入弃牌堆'); } else event.addIndex++; - if (player.countCards('h', function (card) { - return lib.filter.cardDiscardable(card, player, 'new_xingwu'); - }) > 1) choices.push('弃置两张手牌并将武将牌翻面'); - if (choices.length) { - player.chooseControl('cancel2').set('prompt', '星舞:是否发射核弹?').set('choiceList', choices).set('ai', function () { - var player = _status.event.player; - if (player.getExpansions('new_xingwu').length > 2) return 0; - if (player.isTurnedOver() || player.identity == 'fan' || player.getEnemies().length == 1) return 0; + if(player.countCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'new_xingwu'); + })>1) choices.push('弃置两张手牌并将武将牌翻面'); + if(choices.length){ + player.chooseControl('cancel2').set('prompt','星舞:是否发射核弹?').set('choiceList',choices).set('ai',function(){ + var player=_status.event.player; + if(player.getExpansions('new_xingwu').length>2) return 0; + if(player.isTurnedOver()||player.identity=='fan'||player.getEnemies().length==1) return 0; return 'cancel2'; }); } else event.finish(); 'step 3' - if (result.control != 'cancel2') { - var num = result.index + event.addIndex; - if (num == 1) { + if(result.control!='cancel2'){ + var num=result.index+event.addIndex; + if(num==1){ event.goto(5); return; } - if (player.getExpansions('new_xingwu').length > 3) player.chooseButton(['请选择要移去的“星舞”牌', player.getExpansions('new_xingwu')], 3, true); - else event._result = { - bool: true, - links: player.getExpansions('new_xingwu').slice(0), + if(player.getExpansions('new_xingwu').length>3) player.chooseButton(['请选择要移去的“星舞”牌',player.getExpansions('new_xingwu')],3,true); + else event._result={ + bool:true, + links:player.getExpansions('new_xingwu').slice(0), } } else event.finish(); 'step 4' - if (result.bool && result.links && result.links.length == 3) { - var cards = result.links; + if(result.bool&&result.links&&result.links.length==3){ + var cards=result.links; player.loseToDiscardpile(cards); event.goto(6); } else event.finish(); 'step 5' - player.chooseToDiscard(true, 'h', 2); + player.chooseToDiscard(true,'h',2); player.turnOver(); 'step 6' - player.chooseTarget('请选择【星舞】的目标', '弃置其装备区内的所有牌。然后对其造成2点伤害(目标为女性角色则改为1点)', true, lib.filter.notMe).set('ai', function (target) { - return -get.attitude(_status.event.player, target) * Math.sqrt(4 + target.countCards('e', function (card) { - return get.value(card, target) > 0; - })) * (target.hasSex('female') ? 1 : 2); + player.chooseTarget('请选择【星舞】的目标','弃置其装备区内的所有牌。然后对其造成2点伤害(目标为女性角色则改为1点)',true,lib.filter.notMe).set('ai',function(target){ + return -get.attitude(_status.event.player,target)*Math.sqrt(4+target.countCards('e',function(card){ + return get.value(card,target)>0; + }))*(target.hasSex('female')?1:2); }); 'step 7' - if (result.bool && result.targets && result.targets.length) { - var target = result.targets[0]; - player.line(target, 'green'); - var num = target.countCards('e'); - if (num) player.discardPlayerCard(target, 'e', num, true); - target.damage(target.hasSex('female') ? 1 : 2); + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'green'); + var num=target.countCards('e'); + if(num) player.discardPlayerCard(target,'e',num,true); + target.damage(target.hasSex('female')?1:2); } }, - ai: { - threaten: 1.5, + ai:{ + threaten:1.5, }, }, - new_luoyan: { - init: function (player) { - if (player.getExpansions('new_xingwu').length) player.addAdditionalSkill('new_luoyan', ['oltianxiang', 'liuli']); + new_luoyan:{ + init:function(player){ + if(player.getExpansions('new_xingwu').length) player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']); }, - onremove: function (player) { + onremove:function(player){ player.removeAdditionalSkill('new_luoyan'); }, - derivation: ['oltianxiang', 'liuli'], - locked: true, + derivation:['oltianxiang','liuli'], + locked:true, }, //新孙鲁育 - "new_meibu": { - audio: "meibu", - trigger: { - global: "phaseUseBegin", + "new_meibu":{ + audio:"meibu", + trigger:{ + global:"phaseUseBegin", }, - filter: function (event, player) { - return event.player != player && event.player.isIn() && player.countCards('he') > 0 && event.player.inRange(player); + filter:function (event,player){ + return event.player!=player&&event.player.isIn()&&player.countCards('he')>0&&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; + 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; + return event.player.countCards('h')>event.player.hp; }, - content: function () { + 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); + 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', trigger.player]); + }).set('check',check).set('logSkill',['new_meibu',trigger.player]); "step 1" - if (result.bool) { - var target = trigger.player; - var card = result.cards[0]; - player.line(target, 'green'); - target.addTempSkill('new_zhixi', 'phaseUseAfter'); - if (card.name != 'sha' && get.type(card) != 'trick' && get.color(card) != 'black') { - target.addTempSkill('new_meibu_range', 'phaseUseAfter'); - target.markAuto('new_meibu_range', player); + if(result.bool){ + var target=trigger.player; + var card=result.cards[0]; + player.line(target,'green'); + target.addTempSkill('new_zhixi','phaseUseAfter'); + if(card.name!='sha'&&get.type(card)!='trick'&&get.color(card)!='black'){ + target.addTempSkill('new_meibu_range','phaseUseAfter'); + target.markAuto('new_meibu_range',player); } - target.markSkillCharacter('new_meibu', player, '魅步', '锁定技,出牌阶段,你至多可使用X张牌,你使用了锦囊牌后不能再使用牌(X为你的体力值)。'); + target.markSkillCharacter('new_meibu',player,'魅步','锁定技,出牌阶段,你至多可使用X张牌,你使用了锦囊牌后不能再使用牌(X为你的体力值)。'); } }, - ai: { - expose: 0.2, + ai:{ + expose:0.2, }, - subSkill: { - range: { - onremove: true, - charlotte: true, - mod: { - globalFrom: function (from, to, num) { - if (from.getStorage('new_meibu_range').includes(to)) { + subSkill:{ + range:{ + onremove:true, + charlotte:true, + mod:{ + globalFrom:function (from,to,num){ + if(from.getStorage('new_meibu_range').includes(to)){ return -Infinity; } }, }, - sub: true, + sub:true, }, }, }, - "new_mumu": { - audio: "mumu", - trigger: { - player: "phaseUseBegin", + "new_mumu":{ + audio:"mumu", + trigger:{ + player:"phaseUseBegin", }, - filter: function (event, player) { - return game.hasPlayer(current => { - if (current == player) return current.getEquips(2).length > 0; - return current.countCards('e') > 0; + filter:function(event,player){ + return game.hasPlayer(current=>{ + if(current==player) return current.getEquips(2).length>0; + return current.countCards('e')>0; }); }, - direct: true, - content: function () { + direct:true, + content:function (){ 'step 0' - player.chooseTarget(get.prompt('new_mumu'), '弃置一名其他角色装备区内的一张牌,或者获得一名角色装备区内的防具牌', function (card, player, target) { - if (target == player) return target.getEquips(2).length > 0; - 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.hasEmptySlot(2)) { - return -2 * att; + player.chooseTarget(get.prompt('new_mumu'),'弃置一名其他角色装备区内的一张牌,或者获得一名角色装备区内的防具牌',function(card,player,target){ + if(target==player) return target.getEquips(2).length>0; + 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.hasEmptySlot(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.getEquips(2); - event.e = e; - if (target == player) event.choice = '获得一张防具牌'; - else if (e.length > 0) { - player.chooseControl('弃置一张装备牌', '获得一张防具牌').set('ai', function () { - if (_status.event.player.getEquips(2).length > 0) { + 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.getEquips(2); + event.e=e; + if(target==player) event.choice='获得一张防具牌'; + else if(e.length>0){ + player.chooseControl('弃置一张装备牌','获得一张防具牌').set('ai',function(){ + if(_status.event.player.getEquips(2).length>0){ return '弃置一张装备牌'; } return '获得一张防具牌'; }); } - else { - event.choice = '弃置一张装备牌'; + else{ + event.choice='弃置一张装备牌'; } } else event.finish(); 'step 2' - var choice = event.choice || result.control; - if (choice == '弃置一张装备牌') { - player.discardPlayerCard(event.target, 'e', true); + 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', 'bySelf'); + else{ + if(event.e){ + player.gain(event.e,event.target,'give','bySelf'); player.addTempSkill('new_mumu2') } } }, }, - "new_zhixi": { - mod: { - cardEnabled: function (card, player) { - if (player.storage.new_zhixi2 || player.countMark('new_zhixi') >= player.hp) return false; + "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; + 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; + cardRespondable:function(card,player){ + if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; }, - cardSavable: function (card, player) { - if (player.storage.new_zhixi2 || player.countMark('new_zhixi') >= player.hp) return false; + cardSavable:function(card,player){ + if(player.storage.new_zhixi2||player.countMark('new_zhixi')>=player.hp) return false; }, }, - trigger: { - player: "useCard1", + trigger:{ + player:"useCard1", }, - forced: true, - popup: false, - firstDo: true, - init: function (player, skill) { - player.storage[skill] = 0; - var evt = _status.event.getParent('phaseUse'); - if (evt && evt.player == player) { - player.getHistory('useCard', function (evtx) { - if (evtx.getParent('phaseUse') == evt) { + forced:true, + popup:false, + firstDo:true, + init:function(player,skill){ + player.storage[skill]=0; + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.player==player){ + player.getHistory('useCard',function(evtx){ + if(evtx.getParent('phaseUse')==evt){ player.storage[skill]++; - if (get.type2(evtx.card) == 'trick') player.storage.new_zhixi2 = true; + if(get.type2(evtx.card)=='trick') player.storage.new_zhixi2=true; } }); } }, - onremove: function (player) { + 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; + 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 }, + ai:{presha:true,pretao:true,nokeep:true}, }, - "new_mumu2": { - charlotte: true, - mod: { - cardEnabled: function (card) { - if (card.name == 'sha') return false; + "new_mumu2":{ + charlotte:true, + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; }, }, }, - qingzhong: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - check: function (event, player) { - if (game.hasPlayer(function (current) { - return current != player && current.isMinHandcard() && get.attitude(player, current) > 0; - })) { + qingzhong:{ + audio:2, + 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')<=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 () { + content:function(){ player.draw(2); player.addTempSkill('qingzhong_give'); }, - subSkill: { - give: { - audio: 'qingzhong', - trigger: { player: 'phaseUseEnd' }, - filter: function (event, player) { + subSkill:{ + give:{ + audio:'qingzhong', + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ return !player.isMinHandcard(true); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - var list = game.filterPlayer(function (current) { + var list=game.filterPlayer(function(current){ return current.isMinHandcard(); }); - if (list.length == 1) { - if (list[0] != player) { - player.line(list[0], 'green'); + 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) { + else{ + player.chooseTarget(true,'清忠:选择一名手牌最少的角色与其交换手牌',function(card,player,target){ return target.isMinHandcard(); - }).set('ai', function (target) { - return get.attitude(_status.event.player, target); + }).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'); + if(result.bool){ + var target=result.targets[0]; + if(target!=player){ + player.line(target,'green'); player.swapHandcards(target); } } @@ -15482,99 +15483,99 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - weijing: { - audio: 2, - enable: 'chooseToUse', - filter: function (event, player) { - if (event.type == 'wuxie' || player.hasSkill('weijing_used')) return false; - for (var name of ['sha', 'shan']) { - if (event.filterCard({ name: name, isCard: true }, player, event)) return true; + weijing:{ + audio:2, + enable:'chooseToUse', + filter:function(event,player){ + if(event.type=='wuxie'||player.hasSkill('weijing_used')) return false; + for(var name of ['sha','shan']){ + if(event.filterCard({name:name,isCard:true},player,event)) return true; } return false; }, - chooseButton: { - dialog: function (event, player) { - var vcards = []; - for (var name of ['sha', 'shan']) { - var card = { name: name, isCard: true }; - if (event.filterCard(card, player, event)) vcards.push(['基本', '', name]); + chooseButton:{ + dialog:function(event,player){ + var vcards=[]; + for(var name of ['sha','shan']){ + var card={name:name,isCard:true}; + if(event.filterCard(card,player,event)) vcards.push(['基本','',name]); } - var dialog = ui.create.dialog('卫境', [vcards, 'vcard'], 'hidden'); - dialog.direct = true; + var dialog=ui.create.dialog('卫境',[vcards,'vcard'],'hidden'); + dialog.direct=true; return dialog; }, - backup: function (links, player) { + backup:function(links,player){ return { - filterCard: () => false, - selectCard: -1, - viewAs: { - name: links[0][2], - isCard: true, + filterCard:()=>false, + selectCard:-1, + viewAs:{ + name:links[0][2], + isCard:true, }, - popname: true, - precontent: function () { + popname:true, + precontent:function(){ player.logSkill('weijing'); - player.addTempSkill('weijing_used', 'roundStart'); + player.addTempSkill('weijing_used','roundStart'); }, } }, - prompt: function (links, player) { - return '卫境:视为使用一张【' + get.translation(links[0][2]) + '】'; + prompt:function(links,player){ + return '卫境:视为使用一张【'+get.translation(links[0][2])+'】'; } }, - ai: { - order: function (item, player) { - var player = _status.event.player; - var event = _status.event; - if (event.filterCard({ name: 'sha' }, player, event)) { - if (!player.hasShan() && !game.hasPlayer(function (current) { - return player.canUse('sha', current) && current.hp == 1 && get.effect(current, { name: 'sha' }, player, player) > 0; - })) { + ai:{ + order:function(item,player){ + var player=_status.event.player; + var event=_status.event; + if(event.filterCard({name:'sha'},player,event)){ + 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; } - else { - var player = _status.event.player; - if (player.hasSkill('qingzhong_give')) return 2.95; + else{ + var player=_status.event.player; + if(player.hasSkill('qingzhong_give')) return 2.95; return 3.15; } }, - respondSha: true, - respondShan: true, - skillTagFilter: function (player, tag, arg) { - if (player.hasSkill('weijing_used')) return false; - if (arg != 'use') return false; + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + if(player.hasSkill('weijing_used')) return false; + if(arg!='use') return false; }, - result: { - player: 1 + result:{ + player:1 } }, - subSkill: { - used: { - mark: true, - intro: { - content: '本轮已发动' + subSkill:{ + used:{ + 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; i < evt.cards.length; i++) { - if (he.includes(evt.cards[i])) bool = true; break; + 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;i 0) return false; - return event.cards.filterInD().length > 0 + yingyuan:{ + audio:2, + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + if(player.getHistory('custom',function(evt){ + return evt.yingyuan_name==event.card.name; + }).length>0) return false; + return event.cards.filterInD().length>0 }, - content: function () { + 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; - let att = get.attitude(_status.event.player, target), name = _status.event.cards[0].name; - if (att < 3) return 0; - if (target.hasSkillTag('nogain')) att /= 10; - if (name === 'sha' && target.hasSha()) att /= 5; - if (name === 'wuxie' && target.needsToDiscard(_status.event.cards)) att /= 5; - return att / (1 + get.distance(player, target, 'absolute')); - }).set('cards', trigger.cards); + 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; + let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name; + if(att<3) return 0; + if(target.hasSkillTag('nogain')) att/=10; + if(name==='sha'&&target.hasSha()) att/=5; + if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5; + return att/(1+get.distance(player,target,'absolute')); + }).set('cards',trigger.cards); '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 }); + 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: 2, - trigger: { player: 'phaseUseAfter' }, - direct: true, - filter: function (event, player) { + shuimeng:{ + audio:2, + trigger:{player:'phaseUseAfter'}, + direct:true, + filter:function(event,player){ return player.countCards('h'); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('shuimeng'), function (card, player, target) { + 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; + }).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; + if(val<=6){ + return card.number>=12; } return false; })); 'step 1' - if (result.bool) { - player.logSkill('shuimeng', result.targets); - event.target = result.targets[0]; + if(result.bool){ + player.logSkill('shuimeng',result.targets); + event.target=result.targets[0]; player.chooseToCompare(event.target); } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { - player.chooseUseTarget({ name: 'wuzhong', isCard: true }, true); + if(result.bool){ + player.chooseUseTarget({name:'wuzhong',isCard:true},true); } - else { - event.target.useCard({ name: 'guohe', isCard: true }, player); + 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'); + qianya:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + direct:true, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'&&player.countCards('h'); }, - content: function () { + content:function(){ 'step 0' - var nh = player.countCards('h'); + var nh=player.countCards('h'); player.chooseCardTarget({ - filterCard: true, - filterTarget: function (card, player, target) { - return target != player; + 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, (i, player) => { - return !ui.selected.cards.includes(i) && !player.canIgnoreHandcard(i); - })) return 10 - get.value(card, player, 'raw'); + 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,(i,player)=>{ + return !ui.selected.cards.includes(i)&&!player.canIgnoreHandcard(i); + })) return 10-get.value(card,player,'raw'); } - else if (cardname == 'guohe') { - if (player.needsToDiscard(-1, (i, player) => { - return !ui.selected.cards.includes(i) && !player.canIgnoreHandcard(i); - })) return 10 - get.value(card, player, 'raw'); + else if(cardname=='guohe'){ + if(player.needsToDiscard(-1,(i,player)=>{ + return !ui.selected.cards.includes(i)&&!player.canIgnoreHandcard(i); + })) return 10-get.value(card,player,'raw'); } return 0; } - else if (cardname == 'lebu') { - if (player.needsToDiscard(1, (i, player) => { - return !ui.selected.cards.includes(i) && !player.canIgnoreHandcard(i); - })) { - return 8 - get.value(card, player, 'raw'); + else if(cardname=='lebu'){ + if(player.needsToDiscard(1,(i,player)=>{ + return !ui.selected.cards.includes(i)&&!player.canIgnoreHandcard(i); + })){ + return 8-get.value(card,player,'raw'); } - else { - if (!ui.selected.cards.length) { - return 6 - 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=='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'); + 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'); + 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; + 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=='lebu'){ + return att/num; } - else if (cardname == 'shunshou') { - if (_status.event.nh <= 2) 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; + else if(cardname=='huogong'){ + if(_status.event.player.hp==1) return att/num; } - if (_status.event.nh > nh2 + 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; + 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') + 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]); + if(result.bool){ + player.logSkill('qianya',result.targets); + player.give(result.cards,result.targets[0]); } } }, - xianfu: { - trigger: { - global: 'phaseBefore', - player: 'enterGame', + xianfu:{ + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - filter: function (event, player) { - return game.hasPlayer(current => current != player) && (event.name != 'phase' || game.phaseNumber == 0); + forced:true, + filter:function(event,player){ + return game.hasPlayer(current=>current!=player)&&(event.name!='phase'||game.phaseNumber==0); }, - audio: 6, - content: function () { + 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.includes(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(); + player.chooseTarget('请选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){ + return target!=player&&(!player.storage.xianfu2||!player.storage.xianfu2.includes(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; - }).animate = false; + }).animate=false; 'step 1' - if (result.bool) { - var target = result.targets[0]; - if (!player.storage.xianfu2) player.storage.xianfu2 = []; + 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: '当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力' + 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.includes(event.player) || event.num <= 0) return false; - if (event.name == 'damage') return true; + 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.includes(event.player)||event.num<=0) return false; + if(event.name=='damage') return true; return player.isDamaged(); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' - var target = trigger.player; - if (!target.storage.xianfu_mark) target.storage.xianfu_mark = []; + 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'); + player[trigger.name](trigger.num,'nosource'); }, - onremove: function (player) { - if (!player.storage.xianfu2) return; - game.countPlayer(function (current) { - if (player.storage.xianfu2.includes(current) && current.storage.xianfu_mark) { + onremove:function(player){ + if(!player.storage.xianfu2) return; + game.countPlayer(function(current){ + if(player.storage.xianfu2.includes(current)&¤t.storage.xianfu_mark){ current.storage.xianfu_mark.remove(player); - if (!current.storage.xianfu_mark.length) current.unmarkSkill('xianfu_mark'); + if(!current.storage.xianfu_mark.length) current.unmarkSkill('xianfu_mark'); else current.markSkill('xianfu_mark'); } }); delete player.storage.xianfu2; }, - group: 'xianfu3', + group:'xianfu3', }, - xianfu3: { - trigger: { global: 'dieBegin' }, - silent: true, - filter: function (event, player) { - return event.player == player || player.storage.xianfu2 && player.storage.xianfu2.includes(player); + xianfu3:{ + trigger:{global:'dieBegin'}, + silent:true, + filter:function(event,player){ + return event.player==player||player.storage.xianfu2&&player.storage.xianfu2.includes(player); }, - content: function () { - if (player == trigger.player) lib.skill.xianfu2.onremove(player); + content:function(){ + if(player==trigger.player) lib.skill.xianfu2.onremove(player); else player.storage.xianfu2.remove(event.player); } }, - chouce: { - trigger: { player: 'damageEnd' }, - content: function () { + chouce:{ + trigger:{player:'damageEnd'}, + content:function(){ 'step 0' - event.num = trigger.num; + event.num=trigger.num; 'step 1' player.judge(); 'step 2' - event.color = result.color; - if (event.color == 'black') { - if (game.hasPlayer(function (current) { - return current.countDiscardableCards(player, 'hej') > 0; - })) player.chooseTarget('弃置一名角色区域内的一张牌', function (card, player, target) { - return target.countDiscardableCards(player, 'hej'); - }, true).set('ai', function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (att < 0) { - att = -Math.sqrt(-att); + event.color=result.color; + if(event.color=='black'){ + if(game.hasPlayer(function(current){ + return current.countDiscardableCards(player,'hej')>0; + })) player.chooseTarget('弃置一名角色区域内的一张牌',function(card,player,target){ + return target.countDiscardableCards(player,'hej'); + },true).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); + else{ + att=Math.sqrt(att); } - return att * lib.card.guohe.ai.result.target(player, target); + return att*lib.card.guohe.ai.result.target(player,target); }); else event.finish(); } - else { - var next = player.chooseTarget('令一名角色摸一张牌'); - if (player.storage.xianfu2 && player.storage.xianfu2.length) { - next.set('prompt2', '(若目标为' + get.translation(player.storage.xianfu2) + '则改为摸两张牌)'); + 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 (target.hasSkillTag('nogain')) att /= 10; - if (player.storage.xianfu2 && player.storage.xianfu2.includes(target)) return att * 2; + next.set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); + if(target.hasSkillTag('nogain')) att/=10; + if(player.storage.xianfu2&&player.storage.xianfu2.includes(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); + 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.includes(target)) { - if (!target.storage.xianfu_mark) target.storage.xianfu_mark = []; + else{ + if(player.storage.xianfu2&&player.storage.xianfu2.includes(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 { + else{ target.draw(); } } } 'step 4' - if (--event.num > 0 && player.hasSkill('chouce')) { + if(--event.num>0&&player.hasSkill('chouce')){ player.chooseBool(get.prompt2('chouce')); } - else { + else{ event.finish(); } 'step 5' - if (result.bool) { + 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]; + 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", + 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'].includes(event.card.name)) && game.hasPlayer(function (current) { - return current != player && get.distance(current, player) <= 1; + filter:function(event,player){ + return event.card&&(get.type(event.card)=='trick'||get.type(event.card)=='basic'&&!['shan','tao','jiu','du'].includes(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; + content:function(){ + trigger.directHit.addArray(game.filterPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; })); }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - return get.distance(arg.target, player) <= 1; + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return get.distance(arg.target,player)<=1; }, }, }, - wylianji: { - enable: 'phaseUse', - audio: 2, - usable: 1, - filter: function (event, player) { + 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; + 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; + 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); - })); + 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 () { + discard:false, + lose:true, + delay:false, + content:function(){ 'step 0' - player.showCards(get.translation(player) + '对' + get.translation(target) + '发动了【连计】', cards); + player.showCards(get.translation(player)+'对'+get.translation(target)+'发动了【连计】',cards); 'step 1' - var equip1 = get.cardPile2(function (card) { - return get.subtype(card) == 'equip1'; + var equip1=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'; }); - if (!equip1) { + if(!equip1){ player.popup('连计失败'); game.log('牌堆中无装备'); event.finish(); return; } - if (equip1.name == 'qinggang' && !lib.inpile.includes('qibaodao')) { + if(equip1.name=='qinggang'&&!lib.inpile.includes('qibaodao')){ equip1.remove(); - equip1 = game.createCard2('qibaodao', equip1.suit, equip1.number); + equip1=game.createCard2('qibaodao',equip1.suit,equip1.number); } target.$draw(equip1); - target.chooseUseTarget(true, equip1, 'nothrow', 'nopopup'); + target.chooseUseTarget(true,equip1,'nothrow','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 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 () { + 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) + }).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(bool1){ + event.directindex=0; } - else if (bool2) { - event.directindex = 1; + else if(bool2){ + event.directindex=1; } - else { + else{ event.finish(); } 'step 3' - var card = cards[0]; - if (result && typeof event.directindex != 'number') { - event.directindex = result.index; + 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 + 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; + else{ + event.insert(lib.skill.wylianji.content_give,{ + player:target, + card:card, + targets:game.filterPlayer(function(current){ + return current!=player; }) }); } }, - content_use: function () { + content_use:function(){ 'step 0' - player.useCard(card, target); + player.useCard(card,target); 'step 1' - if (!get.owner(card)) { - target.gain(card, 'gain2'); + if(!get.owner(card)){ + target.gain(card,'gain2'); } 'step 2' - var equip1 = target.getEquips(1); - if (equip1.length) { + var equip1=target.getEquips(1); + if(equip1.length){ game.delay(); - target.give(equip1, player); + target.give(equip1,player); target.line(player); } }, - content_give: function () { + content_give:function(){ 'step 0' - var select = get.select(get.info(card).selectTarget); - if (select[1] == -1) { - for (var i = 0; i < targets.length; i++) { - if (!player.canUse(card, targets[i])) { - targets.splice(i--, 1); + var select=get.select(get.info(card).selectTarget); + if(select[1]==-1){ + for(var i=0;i 1) { - player.chooseTarget(true, '将' + get.translation(equip1) + '交给一名角色', function (card, player, target) { + if(event.list.length>1){ + player.chooseTarget(true,'将'+get.translation(equip1)+'交给一名角色',function(card,player,target){ return _status.event.list.includes(target); - }).set('ai', function (target) { - return get.attitude(player, target); - }).set('list', _status.event.list); - event.equip1 = equip1; + }).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]); + else{ + if(event.list.length==1){ + player.give(equip1,event.list[0]); player.line(event.list); } event.finish(); } } - else { + else{ event.finish(); } 'step 3' - if (result.bool && result.targets.length && event.equip1) { - player.give(event.equip1, result.targets[0]); + 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; + 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; + if(target.hasSkillTag('noe')) 2*num; return num; } } @@ -16226,1157 +16227,1157 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - 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'; + 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; + init:function(player){ + player.storage.moucheng=0; }, - intro: { - content: '已造成#点伤害' + intro:{ + content:'已造成#点伤害' }, - unique: true, - juexingji: true, - content: function () { - player.storage.moucheng += trigger.num; - if (player.hasSkill('moucheng')) { + 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) { + if(player.storage.moucheng>=3){ event.trigger('mouchengAwaken'); } }, - group: 'moucheng_awaken', - subSkill: { - awaken: { - trigger: { player: 'mouchengAwaken' }, - forced: true, - skillAnimation: true, - animationColor: 'gray', - content: function () { + group:'moucheng_awaken', + subSkill:{ + awaken:{ + trigger:{player:'mouchengAwaken'}, + forced:true, + skillAnimation:true, + animationColor:'gray', + content:function(){ player.awakenSkill('moucheng'); - game.log(player, '失去了技能', '#g【连计】'); - player.changeSkills(['jingong'], ['wylianji']); + game.log(player,'失去了技能','#g【连计】'); + player.changeSkills(['jingong'],['wylianji']); } } } }, - jingong: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return event.xinjingong_list && player.countCards('hes', function (card) { - return card.name == 'sha' || get.type(card) == 'equip'; + jingong:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return event.xinjingong_list&&player.countCards('hes',function(card){ + return card.name=='sha'||get.type(card)=='equip'; }); }, - onChooseToUse: function (event) { - if (!game.online) { - var evt = event.getParent(); - if (evt.name != 'phaseUse') return; - if (!evt.xinjingong_list) { - var list = get.inpile('trick').randomGets(2); - if (Math.random() < 0.5) { + onChooseToUse:function(event){ + if(!game.online){ + var evt=event.getParent(); + if(evt.name!='phaseUse') return; + if(!evt.xinjingong_list){ + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ list.push('wy_meirenji'); } - else { + else{ list.push('wy_xiaolicangdao'); } - evt.xinjingong_list = list; + evt.xinjingong_list=list; } - if (!event.xinjingong_list) event.set('xinjingong_list', evt.xinjingong_list); + if(!event.xinjingong_list) event.set('xinjingong_list',evt.xinjingong_list); } }, - chooseButton: { - dialog: function (event, player) { - var list = []; - for (var i of event.xinjingong_list) list.push(['锦囊', '', i]); - return ui.create.dialog('矜功', [list, 'vcard']); + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i of event.xinjingong_list) list.push(['锦囊','',i]); + return ui.create.dialog('矜功',[list,'vcard']); }, - filter: function (button, player) { - return lib.filter.filterCard({ name: button.link[2] }, player, _status.event.getParent()); + filter:function(button,player){ + return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent()); }, - check: function (button) { - return _status.event.player.getUseValue({ name: button.link[2] }); + check:function(button){ + return _status.event.player.getUseValue({name:button.link[2]}); }, - backup: function (links, player) { + backup:function(links,player){ return { - audio: 'jingong', - popname: true, - position: 'hes', - viewAs: { name: links[0][2] }, - check: function (card) { - return 6 - get.value(card); + audio:'jingong', + popname:true, + position:'hes', + viewAs:{name:links[0][2]}, + check:function(card){ + return 6-get.value(card); }, - filterCard: function (card) { - return card.name == 'sha' || get.type(card) == 'equip'; + filterCard:function(card){ + return card.name=='sha'||get.type(card)=='equip'; }, - precontent: function () { + precontent:function(){ player.addTempSkill('jingong2'); }, }; }, - prompt: function (links, player) { - return '将一张【杀】或装备牌当做' + get.translation(links[0][2]) + '使用'; + prompt:function(links,player){ + return '将一张【杀】或装备牌当做'+get.translation(links[0][2])+'使用'; } }, - ai: { - order: 2, - result: { - player: function (player) { - if ((player.hp <= 2 || player.needsToDiscard()) && !player.getStat('damage')) return 0; + ai:{ + order:2, + result:{ + player:function(player){ + if((player.hp<=2||player.needsToDiscard())&&!player.getStat('damage')) return 0; return 1; } } } }, - jingong2: { - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - filter: function (event, player) { + jingong2:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ return !player.getStat('damage'); }, - content: function () { + content:function(){ player.loseHp(); } }, - jingong3: { charlotte: true }, - weikui: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h'); + jingong3:{charlotte:true}, + weikui:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h'); }, - content: function () { + content:function(){ 'step 0' player.loseHp(); 'step 1' - if (target.countCards('h', 'shan')) { + if(target.countCards('h','shan')){ player.viewHandcards(target); - if (player.canUse({ name: 'sha', isCard: true }, target, false)) player.useCard({ name: 'sha', isCard: true }, target, false); - player.storage.weikui2 = target; + if(player.canUse({name:'sha',isCard:true},target,false)) player.useCard({name:'sha',isCard:true},target,false); + player.storage.weikui2=target; player.addTempSkill('weikui2'); } - else { - player.discardPlayerCard(target, 'visible', true, 'h').set('ai', function (button) { - return get.value(button.link, _status.event.target); + else{ + player.discardPlayerCard(target,'visible',true,'h').set('ai',function(button){ + return get.value(button.link,_status.event.target); }); } }, - ai: { - order: 8, - result: { - target: function (player, target) { - if (player.hp <= 2) return 0; - if (player.hp == 3) return target.hp <= 2 ? -1 : 0; + ai:{ + order:8, + result:{ + target:function(player,target){ + if(player.hp<=2) return 0; + if(player.hp==3) return target.hp<=2?-1:0; return -1; } } } }, - weikui2: { - onremove: true, - mod: { - globalFrom: function (from, to) { - if (to == from.storage.weikui2) return -Infinity; + weikui2:{ + onremove:true, + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.weikui2) return -Infinity; } }, - mark: 'character', - intro: { - content: '与$的距离视为1直到回合结束' + mark:'character', + intro:{ + content:'与$的距离视为1直到回合结束' }, }, - lizhan: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - filter: function (event, player) { - for (var i = 0; i < game.players.length; i++) { - if (game.players[i].isDamaged()) { + lizhan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + for(var i=0;i= num) return false; - return player.countCards('h') > 0; + xinfenyue:{ + enable:'phaseUse', + audio:'fenyue', + filter:function(event,player){ + var num=game.players.length-player.getFriends(true).length; + if((player.getStat().skill.xinfenyue||0)>=num) return false; + return player.countCards('h')>0; }, - filterTarget: function (event, player, target) { + filterTarget:function(event,player,target){ return player.canCompare(target); }, - content: function () { + content:function(){ 'step 0' player.chooseToCompare(target); 'step 1' - if (!result.bool) event.finish(); - event.num = result.num1; + if(!result.bool) event.finish(); + event.num=result.num1; 'step 2' - if (num <= 5 && target.countGainableCards(player, 'he') > 0) player.gainPlayerCard(target, 'he', true); + 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(num<=9){ + var card=get.cardPile2(function(x){ + return x.name=='sha'; }); - if (card) player.gain(card, 'gain2'); + 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); + 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; + 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; + 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; + return ps.length>=ts.length?-0.5:0; }, }, }, }, - fenyue: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - if (!player.countCards('h')) return false; + 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'; + if(get.mode()=='identity'){ + num=game.countPlayer(function(current){ + return current.identity=='zhong'||current.identity=='mingzhong'; }); } - else { - num = 1; + else{ + num=1; } - if (player.getStat().skill.fenyue >= num) return false; + if(player.getStat().skill.fenyue>=num) return false; return true; }, - filterTarget: function (card, player, target) { + 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); + 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 { + else{ return 0; } } } }, - content: function () { + content:function(){ 'step 0' player.chooseToCompare(target); 'step 1' - if (result.bool) { - player.chooseControl(function () { + if(result.bool){ + player.chooseControl(function(){ return 1; - }).set('choiceList', [ - '令' + get.translation(target) + '不能使用或打出手牌直到回合结束', - '视为对' + get.translation(target) + '使用一张杀(不计入次数限制)' + }).set('choiceList',[ + '令'+get.translation(target)+'不能使用或打出手牌直到回合结束', + '视为对'+get.translation(target)+'使用一张杀(不计入次数限制)' ]); } - else { - var evt = _status.event.getParent('phaseUse'); - if (evt && evt.name == 'phaseUse') { - evt.skipped = true; + else{ + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; } event.finish(); } 'step 2' - if (result.control == '选项一') { + if(result.control=='选项一'){ target.addTempSkill('fenyue2'); } - else { - player.useCard({ name: 'sha', isCard: true }, target, false); + else{ + player.useCard({name:'sha',isCard:true},target,false); } } }, - fenyue2: { - mark: true, - mod: { - cardEnabled2: function (card) { - if (get.position(card) == 'h') return false; + fenyue2:{ + mark:true, + mod:{ + cardEnabled2:function (card){ + if(get.position(card)=='h') return false; }, }, - intro: { - content: '不能使用或打出手牌' + intro:{ + content:'不能使用或打出手牌' } }, - zfengshi: { - audio: 2, - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - return event.card.name == 'sha' && event.target.countCards('e'); + 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; + 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); + content:function(){ + trigger.target.chooseToDiscard('e',true); } }, - chuanxin: { - audio: 2, - trigger: { source: 'damageBegin2' }, - preHidden: true, - 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(); + chuanxin:{ + audio:2, + trigger:{source:'damageBegin2'}, + preHidden:true, + 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 < info[3].length; i++) { - if (lib.skill[info[3][i]].fixed) continue; - if (skills.includes(info[3][i])) return true; + 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; + if(trigger.player.countCards('e')){ + trigger.player.chooseControl(function(event,player){ + if(get.mode()=='guozhan'&&get.guozhanRank(player.name2,player)<4) return 1; + if(player.hp==1) return 1; + if(player.hp==2&&player.countCards('e')>=2) return 1; return 0; - }).set('choiceList', ['弃置装备区内的所有牌并失去1点体力', get.mode() == 'guozhan' ? '移除副将牌' : '随机移除武将牌上的一个技能']); + }).set('choiceList',['弃置装备区内的所有牌并失去1点体力',get.mode()=='guozhan'?'移除副将牌':'随机移除武将牌上的一个技能']); } - else { - event._result = { index: 1 }; + 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; i < info[3].length; i++) { - if (lib.skill[info[3][i]].fixed) continue; - if (skills.includes(info[3][i])) { + 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;i 0; + filter:function(event){ + return _status.currentPhase&&_status.currentPhase.isIn()&&event.num>0; }, - logTarget: function () { + logTarget:function(){ return _status.currentPhase; }, - content: function () { - var source = _status.currentPhase; - if (source.hasSkill('hengjiang2')) { - source.storage.hengjiang2 += trigger.num; + 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; + else{ + source.storage.hengjiang3=[player]; + source.storage.hengjiang2=trigger.num; source.addTempSkill('hengjiang2'); } }, - ai: { - maixie_defend: true, + ai:{ + maixie_defend:true, } }, - hengjiang2: { - mark: true, - charlotte: true, - intro: { - content: '手牌上限-#' + hengjiang2:{ + mark:true, + charlotte:true, + intro:{ + content:'手牌上限-#' }, - mod: { - maxHandcard: function (player, num) { - return num - player.storage.hengjiang2; + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.hengjiang2; } }, - onremove: function (player) { + 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; i < players.length; i++) { - if (players[i].isIn()) return true; + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + if(event.cards&&event.cards.length) return false; + var players=player.storage.hengjiang3; + for(var i=0;i 0; + filter:function(event){ + return _status.currentPhase&&_status.currentPhase.isIn()&&event.num>0; }, - logTarget: function () { + logTarget:function(){ return _status.currentPhase; }, - preHidden: true, - content: function () { + preHidden:true, + content:function(){ "step 0" - event.count = trigger.num; + event.count=trigger.num; "step 1" event.count--; - var source = _status.currentPhase; + var source=_status.currentPhase; source.addTempSkill('rehengjiang2'); - source.addMark('rehengjiang2', 1, false); + source.addMark('rehengjiang2',1,false); player.addTempSkill('rehengjiang3'); "step 2" - if (event.count && player.hasSkill('rehengjiang')) { - player.chooseBool(get.prompt2('rehengjiang', _status.currentPhase)).set('ai', function () { - return lib.skill.rehengjiang.check(_status.event.getTrigger(), _status.event.player); + if(event.count&&player.hasSkill('rehengjiang')){ + 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); + if(result.bool){ + player.logSkill('rehengjiang',_status.currentPhase); event.goto(1); } }, - ai: { - maixie_defend: true, - notemp: true, + ai:{ + maixie_defend:true, + notemp:true, } }, - rehengjiang2: { - mark: true, - charlotte: true, - onremove: true, - intro: { - content: '手牌上限-#' + rehengjiang2:{ + mark:true, + charlotte:true, + onremove:true, + intro:{ + content:'手牌上限-#' }, - mod: { - maxHandcard: function (player, num) { - return num - player.storage.rehengjiang2; + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.rehengjiang2; } }, }, - rehengjiang3: { - audio: 'hengjiang', - trigger: { global: 'phaseEnd' }, - forced: true, - charlotte: true, - filter: function (event, player) { - if (!event.player.countMark('rehengjiang2')) return false; - if (event.player.hasHistory('lose', function (evt) { - return evt.type == 'discard' && evt.cards2.length > 0 && evt.getParent('phaseDiscard').player == event.player; + rehengjiang3:{ + audio:'hengjiang', + trigger:{global:'phaseEnd'}, + forced:true, + charlotte:true, + filter:function(event,player){ + if(!event.player.countMark('rehengjiang2')) return false; + if(event.player.hasHistory('lose',function(evt){ + return evt.type=='discard'&&evt.cards2.length>0&&evt.getParent('phaseDiscard').player==event.player; })) return false; return true; }, - logTarget: 'player', - content: function () { - var num = player.getHistory('useSkill', function (evt) { - return evt.skill == 'rehengjiang' && evt.targets.includes(trigger.player); + logTarget:'player', + content:function(){ + var num=player.getHistory('useSkill',function(evt){ + return evt.skill=='rehengjiang'&&evt.targets.includes(trigger.player); }).length; - if (num > 0) player.draw(num); + if(num>0) player.draw(num); }, }, - shuangren: { - trigger: { player: 'phaseUseBegin' }, - direct: true, - preHidden: true, - filter: function (event, player) { - return player.countCards('h') > 0 && game.hasPlayer(function (current) { - return current != player && player.canCompare(current); + shuangren:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + preHidden:true, + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer(function(current){ + return current!=player&&player.canCompare(current); }) }, - content: function () { + content:function(){ 'step 0' var goon; - if (player.needsToDiscard() > 1) { - goon = player.hasCard(function (card) { - return card.number > 10 && get.value(card) <= 5; + if(player.needsToDiscard()>1){ + 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; + 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) { + 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); + }).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).setHiddenSkill(event.name); + }).set('goon',goon).setHiddenSkill(event.name); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('shuangren', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('shuangren',target); player.chooseToCompare(target); } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { - var target = event.target; - if (game.hasPlayer(function (current) { - if (target == current) return false; - if (!player.canUse('sha', current, false)) return false; + if(result.bool){ + var target=event.target; + if(game.hasPlayer(function(current){ + if(target==current) return false; + if(!player.canUse('sha',current,false)) return false; return target.isFriendOf(current); - })) { - var str = '对一名与' + get.translation(target) + '势力相同的'; - player.chooseTarget(str + '角色使用一张杀', true, function (card, player, target) { - if (!player.canUse('sha', target, false)) return false; - if (get.mode() == 'guozhan') { + })){ + var str='对一名与'+get.translation(target)+'势力相同的'; + player.chooseTarget(str+'角色使用一张杀',true,function(card,player,target){ + if(!player.canUse('sha',target,false)) return false; + if(get.mode()=='guozhan'){ return target.isFriendOf(_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); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }).set('identity',target); } - else { - player.useCard({ name: 'sha', isCard: true }, target, false); + else{ + player.useCard({name:'sha',isCard:true},target,false); event.finish(); } } - else { + else{ player.addTempSkill('zishou2'); event.finish(); } 'step 3' - if (result.bool && result.targets && result.targets.length) { - player.useCard({ name: 'sha', isCard: true }, result.targets[0], false); + 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 () { + 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); + 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; - }).animate = false; + }).animate=false; 'step 1' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.logSkill('kuanshi'); - target.storage.kuanshi2 = player; + target.storage.kuanshi2=player; target.addSkill('kuanshi2'); } } }, - kuanshi2: { + kuanshi2:{ /*mark:'character', intro:{ content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' },*/ - trigger: { player: 'damageBegin4' }, - forced: true, - filter: function (event, player) { - return event.num > 1; + trigger:{player:'damageBegin4'}, + forced:true, + filter:function(event,player){ + return event.num>1; }, //priority:-11, - content: function () { + 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; + 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 () { + content:function(){ player.removeSkill('kuanshi2'); } } } }, - xiashu: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - direct: true, - filter: function (event, player) { - return player.countCards('h') > 0; + xiashu:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; }, - content: function () { + content:function(){ 'step 0' - var maxval = 0; - var hs = player.getCards('h'); - for (var i = 0; i < hs.length; i++) { - maxval = Math.max(maxval, get.value(hs[i])); + var maxval=0; + var hs=player.getCards('h'); + for(var i=0;i 0) 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; + player.chooseTarget(get.prompt2('xiashu'),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + var maxval=_status.event.maxval; + var dh=target.countCards('h')-player.countCards('h'); + var att=get.attitude(player,target); + if(target.hasSkill('qingjian')) return false; + if(dh<=0) return 0; + if(att>0) 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; + if(maxval<=6) return dh; return 0; - }).set('maxval', maxval); + }).set('maxval',maxval); 'step 1' - if (result.bool) { - player.logSkill('xiashu', result.targets); - event.target = result.targets[0]; - var hs = player.getCards('h'); - player.give(hs, event.target); + if(result.bool){ + player.logSkill('xiashu',result.targets); + event.target=result.targets[0]; + var hs=player.getCards('h'); + player.give(hs,event.target); } - else { + else{ event.finish(); } 'step 2' - var hs = event.target.getCards('h'); - if (!hs.length) { + 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'); + 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); + 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); + 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) { + event.cards1=result.cards; + event.cards2=event.target.getCards('h',function(card){ return !event.cards1.includes(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; + 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){ + choice=(Math.random()<0.45)?0:1; } - else if (num1 > num2) { - if (num1 - num2 == 1) { - choice = (Math.random() < 0.6) ? 0 : 1; + else if(num1>num2){ + if(num1-num2==1){ + choice=(Math.random()<0.6)?0:1; } - else { - choice = 0; + else{ + choice=0; } } - else { - if (num2 - num1 == 1) { - choice = (Math.random() < 0.6) ? 1 : 0; + else{ + if(num2-num1==1){ + choice=(Math.random()<0.6)?1:0; } - else { - choice = 1; + else{ + choice=1; } } - player.chooseControl(function (event, player) { + player.chooseControl(function(event,player){ return _status.event.choice; - }).set('choiceList', ['获得' + get.translation(event.target) + '展示的牌', - '获得' + get.translation(event.target) + '未展示的牌']).set('choice', 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', 'bySelf'); + if(result.index==0){ + player.gain(event.cards1,target,'give','bySelf'); } - else { - player.gain(event.cards2, target, 'giveAuto', 'bySelf'); + else{ + player.gain(event.cards2,target,'giveAuto','bySelf'); } }, - ai: { - expose: 0.1 + ai:{ + expose:0.1 } }, - sheyan: { - audio: 2, - trigger: { target: 'useCardToTarget' }, - filter: function (event, player) { - if (!event.targets || !event.targets.includes(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.includes(current) && lib.filter.targetEnabled2(event.card, event.player, current); + sheyan:{ + audio:2, + trigger:{target:'useCardToTarget'}, + filter:function(event,player){ + if(!event.targets||!event.targets.includes(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.includes(current)&&lib.filter.targetEnabled2(event.card,event.player,current); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var bool1 = (trigger.targets.length > 1); - var bool2 = game.hasPlayer(function (current) { - return !trigger.targets.includes(current) && lib.filter.targetEnabled2(trigger.card, trigger.player, current); + var bool1=(trigger.targets.length>1); + var bool2=game.hasPlayer(function(current){ + return !trigger.targets.includes(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; + 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); + }).set('add',get.effect(player,trigger.card,trigger.player,player)>=0); } - else if (bool2) { - event.type = 'add'; + else if(bool2){ + event.type='add'; event.goto(2); - event.unchosen = true; + event.unchosen=true; } - else { - event.type = 'remove'; + else{ + event.type='remove'; event.goto(2); - event.unchosen = true; + event.unchosen=true; } 'step 1' - if (result.control == 'cancel2') { + if(result.control=='cancel2'){ event.finish(); } - else if (result.index == 1) { - event.type = 'remove'; + else if(result.index==1){ + event.type='remove'; } - else { - event.type = 'add'; + 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.includes(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); + 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.includes(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) { + else{ + player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){ return _status.event.targets.includes(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); + }).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() && !event.isOnline()) game.delayx(); - event.target = result.targets[0]; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.target=result.targets[0]; } - else { + else{ event.finish(); } 'step 4' - player.logSkill('sheyan', event.target); - if (event.type == 'add') { + player.logSkill('sheyan',event.target); + if(event.type=='add'){ trigger.targets.push(event.target); } - else { + else{ trigger.getParent().excluded.add(event.target); } }, - ai: { - expose: 0.2 + ai:{ + expose:0.2 } }, - bingzheng: { - audio: 2, - trigger: { player: 'phaseUseEnd' }, - direct: true, - content: function () { + 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; + 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; + 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; + 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; + 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) + '弃置一张手牌']); + }).set('choiceList',['令'+get.translation(event.target)+'摸一张牌', + '令'+get.translation(event.target)+'弃置一张手牌']); } - else { - event.directfalse = true; + else{ + event.directfalse=true; } } - else { + else{ event.finish(); } 'step 2' - if (event.directfalse || result.index == 0) { + if(event.directfalse||result.index==0){ event.target.draw(); } - else { - event.target.chooseToDiscard('h', true); + else{ + event.target.chooseToDiscard('h',true); } 'step 3' - if (event.target.countCards('h') == event.target.hp) { + if(event.target.countCards('h')==event.target.hp){ player.draw(); - if (event.target == player) { + 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') { + 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); + if(_status.event.goon){ + return 10-get.value(card); } - return -get.value(card, _status.event.player, 'raw'); + 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)>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); + if(get.attitude(player,event.target)>0&&player.needsToDiscard()){ + next.set('goon',true); } } - else { + else{ event.finish(); } 'step 4' - if (result.bool) { - player.give(result.cards, target); + if(result.bool){ + player.give(result.cards,target); } }, - ai: { - expose: 0.2, - threaten: 1.4 + ai:{ + expose:0.2, + threaten:1.4 } }, - fuman: { - audio: 2, - enable: 'phaseUse', - filterTarget: function (card, player, target) { - if (target == player) return false; - var stat = player.getStat('skill').fuman_targets; - return !stat || !stat.includes(target); + fuman:{ + audio:2, + enable:'phaseUse', + filterTarget:function(card,player,target){ + if(target==player) return false; + var stat=player.getStat('skill').fuman_targets; + return !stat||!stat.includes(target); }, - filter: function (event, player) { - return player.countCards('h') > 0 && game.hasPlayer((current) => lib.skill.fuman.filterTarget(null, player, current)); + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer((current)=>lib.skill.fuman.filterTarget(null,player,current)); }, - discard: false, - lose: false, - delay: false, - filterCard: true, - content: function () { - player.give(cards, target).gaintag.add('fuman'); + discard:false, + lose:false, + delay:false, + filterCard:true, + content:function(){ + player.give(cards,target).gaintag.add('fuman'); target.addSkill('fuman2'); player.addSkill('fuman_draw'); - var stat = player.getStat('skill'); - if (!stat.fuman_targets) stat.fuman_targets = []; + var stat=player.getStat('skill'); + if(!stat.fuman_targets) stat.fuman_targets=[]; stat.fuman_targets.push(target); }, - check: function (card) { - return 6 - get.value(card); + check:function(card){ + return 6-get.value(card); }, - ai: { - order: 2, - result: { - target: function (player, target) { - if (!target.hasSha()) return 1.2; + ai:{ + order:2, + result:{ + target:function(player,target){ + if(!target.hasSha()) return 1.2; return 1; } } }, - subSkill: { - draw: { - trigger: { global: 'useCardAfter' }, - forced: true, - charlotte: true, - filter: function (event, player) { - return event.player.hasHistory('lose', function (evt) { - if (evt.getParent() != event) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('fuman')) return true; + subSkill:{ + draw:{ + trigger:{global:'useCardAfter'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return event.player.hasHistory('lose',function(evt){ + if(evt.getParent()!=event) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('fuman')) return true; } return false; }); }, - logTarget: 'player', - content: function () { - player.draw(trigger.player.hasHistory('sourceDamage', function (evt) { - return evt.card == trigger.card; - }) ? 2 : 1); + logTarget:'player', + content:function(){ + player.draw(trigger.player.hasHistory('sourceDamage',function(evt){ + return evt.card==trigger.card; + })?2:1); }, }, }, }, - fuman2: { - mod: { - aiOrder: function (player, card, num) { - if (get.itemtype(card) == 'card' && card.hasGaintag('fuman')) return num + 1; + fuman2:{ + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('fuman')) return num+1; }, - cardname: function (card, player) { - if (get.itemtype(card) == 'card' && card.hasGaintag('fuman')) return 'sha'; + cardname:function(card,player){ + if(get.itemtype(card)=='card'&&card.hasGaintag('fuman')) return 'sha'; }, }, }, - qizhou: { - trigger: { player: ['phaseBefore', 'equipEnd', 'loseEnd'] }, - forced: true, - popup: false, - derivation: ['mashu', 'reyingzi', 'reduanbing', 'fenwei'], - filter: function (event, player) { - if (player.equiping) return false; - var suits = []; - var es = player.getCards('e'); - for (var i = 0; i < es.length; i++) { + qizhou:{ + trigger:{player:['phaseBefore','equipEnd','loseEnd']}, + forced:true, + popup:false, + derivation:['mashu','reyingzi','reduanbing','fenwei'], + filter:function(event,player){ + if(player.equiping) return false; + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i 0; + else{ + return suits.length>0; } }, - content: function () { - var suits = []; - var es = player.getCards('e'); - for (var i = 0; i < es.length; i++) { + content:function(){ + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i 0; + var geteff=function(current){ + return player.canUse('sha',current,false,true)&&get.effect(current,{name:'sha'},player,player)>0; } - if (player.hasSha() && geteff(target)) { - var num = game.countPlayer(function (current) { - return current != player && get.distance(player, current) <= 1 && geteff(current); + 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) && current != target; - })) { + if(num==0){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current)&&geteff(current)&¤t!=target; + })){ return 1; } } - else if (num == 1) { + else if(num==1){ return 1; } } @@ -17385,67 +17386,67 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - fenxun2: { - mark: 'character', - onremove: true, - intro: { - content: '到$的距离视为1' + fenxun2:{ + mark:'character', + onremove:true, + intro:{ + content:'到$的距离视为1' }, - mod: { - globalFrom: function (from, to) { - if (from.getStorage('fenxun2').includes(to)) { + mod:{ + globalFrom:function(from,to){ + if(from.getStorage('fenxun2').includes(to)){ 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.includes(current) && get.distance(player, current) <= 1 && player.canUse(event.card, current); + 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.includes(current)&&get.distance(player,current)<=1&&player.canUse(event.card,current); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('duanbing'), '为' + get.translation(trigger.card) + '增加一个目标', function (card, player, target) { - return !_status.event.sourcex.includes(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); + player.chooseTarget(get.prompt('duanbing'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ + return !_status.event.sourcex.includes(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() && !event.isOnline()) game.delayx(); - event.target = result.targets[0]; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.target=result.targets[0]; } - else { + else{ event.finish(); } 'step 2' - player.logSkill('duanbing', event.target); + 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) { + 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; - })) { + 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]; + return [1,1]; } delete player._duanbingtmp; } @@ -17453,55 +17454,55 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - fuhan: { - audio: 2, - trigger: { player: 'phaseBegin' }, - unique: true, - limited: true, - skillAnimation: true, - animationColor: 'orange', - forceunique: true, + 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 + ')'; + 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(); + 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 () { + 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); + 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); + 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 if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; }); } - else { - list = get.gainableCharacters(function (info) { - return info[1] == 'shu'; + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='shu'; }); } - var players = game.players.concat(game.dead); - for (var i = 0; i < players.length; i++) { + var players=game.players.concat(game.dead); + for(var i=0;i 0) player.gainMaxHp(num); + var num=event.num-player.maxHp; + if(num>0) player.gainMaxHp(num); else player.loseMaxHp(-num); player.recover(); } }, - refuhan: { - audio: 'fuhan', - trigger: { player: 'phaseZhunbeiBegin' }, - unique: true, - limited: true, - skillAnimation: true, - animationColor: 'orange', - forceunique: true, - filter: function (event, player) { - return player.countMark('fanghun') > 0; + refuhan:{ + audio:'fuhan', + trigger:{player:'phaseZhunbeiBegin'}, + unique:true, + limited:true, + skillAnimation:true, + animationColor:'orange', + forceunique:true, + filter:function(event,player){ + return player.countMark('fanghun')>0; }, - content: function () { + content:function(){ 'step 0' - if (player.storage.fanghun) player.draw(player.storage.fanghun); - player.removeMark('fanghun', player.storage.fanghun); + if(player.storage.fanghun) player.draw(player.storage.fanghun); + player.removeMark('fanghun',player.storage.fanghun); player.awakenSkill('refuhan'); 'step 1' 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); + 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 if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; }); } - else { - list = get.gainableCharacters(function (info) { - return info[1] == 'shu'; + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='shu'; }); } - var players = game.players.concat(game.dead); - for (var i = 0; i < players.length; i++) { + var players=game.players.concat(game.dead); + 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; - if (!this.classList.contains('bluebg')) { - if (rSkill.length >= 2) return; + td.innerHTML=''+get.translation(skills[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; + if(!this.classList.contains('bluebg')){ + if(rSkill.length>=2) return; rSkill.add(link); this.classList.add('bluebg'); } - else { + else{ this.classList.remove('bluebg'); rSkill.remove(link); } @@ -17630,362 +17631,362 @@ game.import('character', function (lib, game, ui, get, ai, _status) { dialog.add('  '); dialog.open(); - event.switchToAuto = function () { + event.switchToAuto=function(){ event.dialog.close(); event.control.close(); game.resume(); - _status.imchoosing = false; + _status.imchoosing=false; }; - event.control = ui.create.control('ok', function (link) { + event.control=ui.create.control('ok',function(link){ event.dialog.close(); event.control.close(); game.resume(); - _status.imchoosing = false; + _status.imchoosing=false; }); - for (var i = 0; i < event.dialog.buttons.length; i++) { + for(var i=0;i 0; - if (name == 'jiu') return player.countCards('hs', 'tao') > 0; + fanghun:{ + hiddenCard:function(player,name){ + if(!player.storage.fanghun||player.storage.fanghun<=0) return false; + if(name=='tao') return player.countCards('hs','jiu')>0; + if(name=='jiu') return player.countCards('hs','tao')>0; return false; }, - audio: 2, - marktext: '影', - intro: { - content: 'mark', - name: '梅影', + audio:2, + marktext:'影', + intro:{ + content:'mark', + name:'梅影', }, - trigger: { - source: 'damageSource', - player: 'damageEnd', + trigger:{ + source:'damageSource', + player:'damageEnd', }, - forced: true, - locked: false, - filter: function (event) { - return event.card && event.card.name == 'sha'; + forced:true, + locked:false, + filter:function(event){ + return event.card&&event.card.name=='sha'; }, - content: function () { - player.addMark('fanghun', trigger.num || 1); - player.addMark('fanghun2', trigger.num || 1, false); + content:function(){ + player.addMark('fanghun',trigger.num||1); + player.addMark('fanghun2',trigger.num||1,false); }, - group: ['fanghun_sha', 'fanghun_draw'], - subSkill: { - draw: { - trigger: { player: ['useCardAfter', 'respondAfter'] }, - forced: true, - popup: false, - filter: function (event) { - return event.skill == 'fanghun_sha' || event.skill == 'fanghun_shan'; + group:['fanghun_sha','fanghun_draw'], + subSkill:{ + draw:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + popup:false, + filter:function(event){ + return event.skill=='fanghun_sha'||event.skill=='fanghun_shan'; }, - content: function () { + content:function(){ player.draw(); } }, - sha: { - audio: 'fanghun', - 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; + sha:{ + audio:'fanghun', + 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 }; + if(name) return {name:name}; return null; }, - position: 'hs', - check: function (card) { - var player = _status.event.player; - if (_status.event.type == 'phase') { - var max = 0; + position:'hs', + 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 < list.length; i++) { - var name = list[i]; - if (player.countCards('hs', map[name]) > (name == 'jiu' ? 1 : 0) && player.getUseValue({ name: name }) > 0) { - var temp = get.order({ name: name }); - if (temp > max) { - max = temp; - name2 = map[name]; + 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; + 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; + 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('hs', 'shan')) return true; - if (filter({ name: 'shan' }, player, event) && player.countCards('hs', 'sha')) return true; - if (filter({ name: 'tao' }, player, event) && player.countCards('hs', 'jiu')) return true; - if (filter({ name: 'jiu' }, player, event) && player.countCards('hs', 'tao')) return true; + 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('hs','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true; + if(filter({name:'jiu'},player, event)&&player.countCards('hs','tao')) return true; return false; }, - onrespond: function () { return this.onuse.apply(this, arguments) }, - onuse: function (result, player) { - player.removeMark('fanghun', 1); + onrespond:function(){return this.onuse.apply(this,arguments)}, + onuse:function(result,player){ + player.removeMark('fanghun',1); }, - ai: { - respondSha: true, - respondShan: true, - skillTagFilter: function (player, tag) { - if (!player.storage.fanghun || player.storage.fanghun < 0) return false; + ai:{ + respondSha:true, + respondShan: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; + switch(tag){ + case 'respondSha':name='shan';break; + case 'respondShan':name='sha';break; } - if (!player.countCards('hs', name)) return false; + if(!player.countCards('hs',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 < list.length; i++) { - var name = list[i]; - if (player.countCards('hs', map[name]) > (name == 'jiu' ? 1 : 0) && player.getUseValue({ name: name }) > 0) { - var temp = get.order({ name: name }); - if (temp > max) max = temp; + 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 += ((player.storage.refuhan || player.storage.twfuhan) ? 0.3 : -0.3); + if(max>0) max+=((player.storage.refuhan||player.storage.twfuhan)?0.3:-0.3); return max; } - if (!player) player = _status.event.player; - return (player.storage.refuhan || player.storage.twfuhan) ? 4 : 1; + if(!player) player=_status.event.player; + return (player.storage.refuhan||player.storage.twfuhan)?4:1; }, }, }, } }, - yjixi: { - derivation: 'rewangzun', - audio: 'weidi', - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - filter: function (event, player) { - if (player.phaseNumber < 3) return false; - var num = 0; - for (var i = player.actionHistory.length - 1; i >= 0; i--) { - if (!player.actionHistory[i].isMe) continue; - if (_status.globalHistory[i].changeHp.some(evt => evt.player == player && evt.getParent().name == 'loseHp')) return false; - else { + yjixi:{ + derivation:'rewangzun', + audio:'weidi', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + if(player.phaseNumber<3) return false; + var num=0; + for(var i=player.actionHistory.length-1;i>=0;i--){ + if(!player.actionHistory[i].isMe) continue; + if(_status.globalHistory[i].changeHp.some(evt=>evt.player==player&&evt.getParent().name=='loseHp')) return false; + else{ num++; - if (num >= 3) break; + if(num>=3) break; } } return true; }, - skillAnimation: true, - animationColor: 'gray', - unique: true, - juexingji: true, - content: function () { + 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 < zhu.skills.length; i++) { - if (lib.skill[zhu.skills[i]] && lib.skill[zhu.skills[i]].zhuSkill) { + 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; + check:function(card){ + var num=get.value(card); + if(get.color(card)=='black'){ + if(num>=6) return 0; + return 20-num; } - else { - if (_status.event.player.needsToDiscard()) return 7 - num; + else{ + if(_status.event.player.needsToDiscard()) return 7-num; } return 0; }, - discard: false, - lose: false, - delay: false, - content: function () { + discard:false, + lose:false, + delay:false, + content:function(){ 'step 0' - player.give(cards, target); - 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); + player.give(cards,target); + 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); + }).set('goon',get.attitude(target,player)<0); } - else { + else{ event.finish(); } 'step 1' - if (!result.bool) { + 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') < player.countCards('h')) return 1; + 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; + if(event.player!=player){ + var hs=event.player.getCards('h'); + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.filter(function(card){ + return hs.includes(card)&&get.color(card,player)=='black'; + }).length>0; } return false; }, - content: function () { - var cards = trigger.getl(player).cards2; - game.countPlayer(function (current) { - if (current == player) return; - var hs = current.getCards('h'), cardsx = trigger.getg(current).filter(function (card) { - return hs.includes(card) && cards.includes(card) && get.color(card, player) == 'black'; + content:function(){ + var cards=trigger.getl(player).cards2; + game.countPlayer(function(current){ + if(current==player) return; + var hs=current.getCards('h'),cardsx=trigger.getg(current).filter(function(card){ + return hs.includes(card)&&cards.includes(card)&&get.color(card,player)=='black'; }); - if (cardsx.length > 0) { + if(cardsx.length>0){ current.addSkill('xiehui2'); - current.addGaintag(cards, 'xiehui'); + current.addGaintag(cards,'xiehui'); } }); } }, - xiehui2: { - mark: true, - intro: { - content: '不能使用、打出或弃置得到的黑色牌', + xiehui2:{ + mark:true, + intro:{ + content:'不能使用、打出或弃置得到的黑色牌', }, - mod: { - cardDiscardable: function (card, player) { - if (card.hasGaintag('xiehui')) return false; + mod:{ + cardDiscardable:function(card,player){ + if(card.hasGaintag('xiehui')) return false; }, - cardEnabled2: function (card, player) { - if (get.itemtype(card) == 'card' && card.hasGaintag('xiehui')) return false; + cardEnabled2:function(card,player){ + if(get.itemtype(card)=='card'&&card.hasGaintag('xiehui')) return false; }, }, - trigger: { player: 'changeHp' }, - forced: true, - popup: false, - charlotte: true, - filter: function (event) { - return event.num < 0; + trigger:{player:'changeHp'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event){ + return event.num<0; }, - content: function () { + content:function(){ player.removeSkill('xiehui2'); }, - onremove: function (player) { + onremove:function(player){ player.removeGaintag('xiehui'); }, }, - shanjia: { - sync: function (player) { - if (game.online) return; - var history = player.actionHistory; - var num = 0; - for (var i = 0; i < history.length; i++) { - for (var j = 0; j < history[i].useCard.length; j++) { - if (get.type(history[i].useCard[j].card) == 'equip') num++; + shanjia:{ + sync:function(player){ + if(game.online) return; + var history=player.actionHistory; + var num=0; + for(var i=0;i 0) player.markSkill('shanjia'); + player.storage.shanjia=num; + if(num>0) player.markSkill('shanjia'); }, - audio: 2, - intro: { - content: function (storage) { - if (storage == 0) return '未使用过装备牌'; - return '已使用过' + storage + '张装备牌'; + audio:2, + intro:{ + content:function(storage){ + if(storage==0) return '未使用过装备牌'; + return '已使用过'+storage+'张装备牌'; } }, - group: 'shanjia2', - trigger: { player: 'phaseUseBegin' }, - frequent: true, - filter: function (event, player) { + group:'shanjia2', + trigger:{player:'phaseUseBegin'}, + frequent:true, + filter:function(event,player){ lib.skill.shanjia.sync(player); - return player.storage.shanjia > 0; + return player.storage.shanjia>0; }, - content: function () { + content:function(){ 'step 0' lib.skill.shanjia.sync(player); - player.draw(Math.min(7, player.storage.shanjia)); + player.draw(Math.min(7,player.storage.shanjia)); 'step 1' - player.chooseToDiscard('he', Math.min(7, player.storage.shanjia), true); + player.chooseToDiscard('he',Math.min(7,player.storage.shanjia),true); 'step 2' - var useCard = false; - if (result.bool && result.cards) { - for (var i = 0; i < result.cards.length; i++) { - if (result.cards[i].original == 'e') { - useCard = true; break; + var useCard=false; + if(result.bool&&result.cards){ + for(var i=0;i 0) - })) { - 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 () { + 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; + 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 + ai:{ + order:9.1, + result:{ + player:1 } } }, - zhanyi_basic: { - group: ['zhanyi_basic_sha', 'zhanyi_basic_jiu', 'zhanyi_basic_tao'] + 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; + 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); + prompt:'将一张基本牌当桃使用', + check:function(card){ + return 8-get.value(card); }, - ai: { - skillTagFilter: function (player) { - if (!player.countCards('h', { type: 'basic' })) return false; + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; }, - save: true, + save:true, } }, - zhanyi_basic_sha: { - enable: 'chooseToUse', - filterCard: { type: 'basic' }, - viewAs: { name: 'sha' }, - viewAsFilter: function (player) { - if (!player.countCards('h', { type: 'basic' })) return false; + 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; + prompt:'将一张基本牌当杀使用', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; }, - respondSha: true, + respondSha:true, } }, - zhanyi_basic_jiu: { - enable: 'chooseToUse', - filterCard: { type: 'basic' }, - viewAs: { name: 'jiu' }, - viewAsFilter: function (player) { - if (!player.countCards('h', { type: 'basic' })) return false; + 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); + 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; + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{type:'basic'})>0&&player.hp<=0; }, - save: true, + save:true, } }, - zhanyi_equip: { - trigger: { player: 'shaBegin' }, - forced: true, - filter: function (event, player) { - return event.target.countCards('he') > 0; + 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; + check:function(event,player){ + return get.attitude(player,event.target)<0; }, - content: function () { - trigger.target.chooseToDiscard('he', true, 2); + content:function(){ + trigger.target.chooseToDiscard('he',true,2); } }, - zhanyi_trick: { - mod: { - targetInRange: function () { + zhanyi_trick:{ + mod:{ + targetInRange:function(){ return true; } } }, - dingpan: { - enable: 'phaseUse', - filter: function (event, player) { + 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'); + var mode=get.mode(); + if(mode=='identity'){ + if(_status.mode=='purple') num=player.getEnemies().length; + else num=get.population('fan'); } - else if (mode == 'versus') { - if (!_status.mode || _status.mode != 'two') num = player.getEnemies().length; - else { - var target = game.findPlayer(x => { - var num = x.getFriends().length; - return !game.hasPlayer(y => { - return x != y && y.getFriends().length > num; + else if(mode=='versus'){ + if(!_status.mode||_status.mode!='two') num=player.getEnemies().length; + else{ + var target=game.findPlayer(x=>{ + var num=x.getFriends().length; + return !game.hasPlayer(y=>{ + return x!=y&&y.getFriends().length>num; }); }); - num = (target ? target.getFriends(true).length : 1); + num=(target?target.getFriends(true).length:1); } } - else { - num = 1; + else{ + num=1; } - if ((player.getStat().skill.dingpan || 0) >= num) return false; + if((player.getStat().skill.dingpan||0)>=num) return false; return true; }, - filterTarget: function (card, player, target) { - return target.countCards('e') > 0; + filterTarget:function(card,player,target){ + return target.countCards('e')>0; }, - content: function () { + 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 < es.length; i++) { - if (get.equipValue(es[i], target) >= 8) { - goon = true; break; + 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 '选项二'; + target.chooseControl(function(){ + if(_status.event.goon) return '选项二'; return '选项一'; - }).set('goon', goon).set('prompt', '定叛').set('choiceList', ['令' + get.translation(player) + '弃置你装备区里的一张牌', '获得你装备区内的所有牌并受到1点伤害']); + }).set('goon',goon).set('prompt','定叛').set('choiceList',['令'+get.translation(player)+'弃置你装备区里的一张牌','获得你装备区内的所有牌并受到1点伤害']); 'step 2' - if (result.control == '选项一') { - player.discardPlayerCard(target, true, 'e'); + if(result.control=='选项一'){ + player.discardPlayerCard(target,true,'e'); event.finish(); } - else { - target.gain(target.getCards('e'), 'gain2'); + 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; i < es.length; i++) { - var val = get.equipValue(es[i], target); - if (val <= 4) { - if (att > 0) { + 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) { + else if(val>=7){ + if(att<0){ return -1; } } @@ -18339,424 +18340,424 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - hongde: { - audio: 2, - trigger: { - player: ['loseAfter', 'gainAfter'], - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + hongde:{ + audio:2, + trigger:{ + player:['loseAfter','gainAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - direct: true, - filter: function (event, player) { - var num = event.getl(player).cards2.length; - if (event.getg) num = Math.max(num, event.getg(player).length) - return num > 1; + direct:true, + filter:function(event,player){ + var num=event.getl(player).cards2.length; + if(event.getg) num=Math.max(num,event.getg(player).length) + return num>1; }, - content: function () { + 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); + 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); + 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; i < ui.selected.cards.length; i++) { - num += get.number(ui.selected.cards[i]); + ziyuan:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:function(card){ + var num=0; + for(var i=0;i 0); - })) { + ai:{ + order:function(skill,player){ + if(game.hasPlayer(function(current){ + return (current.hp0); + })){ 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; + 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; + if(player.needsToDiscard()) return 1; return 0; } }, - threaten: 1.3 + threaten:1.3 } }, - jugu: { - audio: 2, - mod: { - maxHandcard: function (player, num) { - return num + player.maxHp; + jugu:{ + audio:2, + mod:{ + maxHandcard:function(player,num){ + return num+player.maxHp; } }, - trigger: { global: 'phaseBefore', player: 'enterGame' }, - forced: true, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0); + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); }, - content: function () { + 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; + tuifeng:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + notemp:true, + filter:function(event,player){ + return player.countCards('he')>0; }, - content: function () { + 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); + 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) { + if(result.bool){ player.logSkill('tuifeng'); - player.addToExpansion(result.cards, player, 'give').gaintag.add('tuifeng'); + player.addToExpansion(result.cards,player,'give').gaintag.add('tuifeng'); } }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - marktext: '锋', - intro: { - content: 'expansion', - markcount: 'expansion', + marktext:'锋', + intro:{ + content:'expansion', + markcount:'expansion', }, - group: 'tuifeng2', - ai: { - threaten: 0.8, - maixie: true, - maixie_hp: true + group:'tuifeng2', + ai:{ + threaten:0.8, + maixie:true, + maixie_hp:true } }, - tuifeng2: { - audio: 'tuifeng', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - filter: function (event, player) { - return player.getExpansions('tuifeng').length > 0; + tuifeng2:{ + audio:'tuifeng', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.getExpansions('tuifeng').length>0; }, - content: function () { - var cards = player.getExpansions('tuifeng'); - player.draw(2 * cards.length); + content:function(){ + var cards=player.getExpansions('tuifeng'); + player.draw(2*cards.length); player.addTempSkill('tuifeng3'); - player.addMark('tuifeng3', cards.length, false); + player.addMark('tuifeng3',cards.length,false); player.loseToDiscardpile(cards); } }, - tuifeng3: { - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.countMark('tuifeng3'); + tuifeng3:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('tuifeng3'); } }, - onremove: true, - charlotte: true, + onremove:true, + charlotte:true, }, - weidi: { - init(player) { - const list = []; - const zhu = get.zhu(player); - if (zhu && zhu != player && zhu.skills) { - for (var i = 0; i < zhu.skills.length; i++) { - if (lib.skill[zhu.skills[i]] && lib.skill[zhu.skills[i]].zhuSkill) { + weidi:{ + init(player){ + const list=[]; + const zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;i { return lib.skill[skill] && lib.skill[skill].zhuSkill; }) || event.addSkill.some(skill => { return lib.skill[skill] && lib.skill[skill].zhuSkill; })); }, - async content(event, trigger, player) { + async content (event, trigger, player) { lib.skill.weidi.init(player); }, }, - zhenlue: { - audio: 2, - trigger: { player: 'useCard' }, - forced: true, - filter: function (event) { - return get.type(event.card) == 'trick'; + zhenlue:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event){ + return get.type(event.card)=='trick'; }, - content: function () { - trigger.nowuxie = true; + content:function(){ + trigger.nowuxie=true; }, - mod: { - targetEnabled: function (card, player, target) { - if (get.type(card) == 'delay') { + mod:{ + targetEnabled:function(card,player,target){ + if(get.type(card)=='delay'){ return false; } }, } }, - jianshu: { - audio: 2, - unique: true, - limited: true, - enable: 'phaseUse', - animationColor: 'thunder', - skillAnimation: 'epic', - filter: function (event, player) { - return !player.storage.jianshu && player.countCards('h', { color: 'black' }) > 0; + jianshu:{ + audio:2, + unique:true, + limited:true, + enable:'phaseUse', + animationColor:'thunder', + skillAnimation:'epic', + filter:function(event,player){ + return !player.storage.jianshu&&player.countCards('h',{color:'black'})>0; }, - init: function (player) { - player.storage.jianshu = false; + 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'); + 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); + 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 () { + selectTarget:2, + multitarget:true, + content:function(){ 'step 0' player.awakenSkill('jianshu'); - player.storage.jianshu = true; - player.give(cards, targets[0], 'give'); + player.storage.jianshu=true; + player.give(cards,targets[0],'give'); 'step 1' targets[0].chooseToCompare(targets[1]); 'step 2' - if (result.bool) { - targets[0].chooseToDiscard('he', 2, true); + if(result.bool){ + targets[0].chooseToDiscard('he',2,true); targets[1].loseHp(); } - else if (result.tie) { + else if(result.tie){ targets[0].loseHp() targets[1].loseHp() } - else { - targets[1].chooseToDiscard('he', 2, true); + else{ + targets[1].chooseToDiscard('he',2,true); targets[0].loseHp(); } }, - intro: { - content: 'limited' + 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; + 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, - audioname: ['xinping'], - unique: true, - limited: true, - trigger: { player: 'phaseZhunbeiBegin' }, - animationColor: 'thunder', - skillAnimation: 'legend', - mark: true, - direct: true, - content: function () { + yongdi:{ + audio:2, + audioname:['xinping'], + unique:true, + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + animationColor:'thunder', + skillAnimation:'legend', + mark:true, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('yongdi'), function (card, player, target) { - return (target.hasSex('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' || _status.mode == 'guandu'))) { - if (target.name && lib.character[target.name]) { - for (var i = 0; i < lib.character[target.name][3].length; i++) { - if (lib.skill[lib.character[target.name][3][i]].zhuSkill) { - return att * 2; + player.chooseTarget(get.prompt2('yongdi'),function(card,player,target){ + return (target.hasSex('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'||_status.mode=='guandu'))){ + if(target.name&&lib.character[target.name]){ + for(var i=0;i { - if (target.hasSkill(skill)) return false; - var info = get.info(skill); - return info && info.zhuSkill; + var skills=target.getStockSkills(true,true).filter(skill=>{ + if(target.hasSkill(skill)) return false; + var info=get.info(skill); + return info&&info.zhuSkill; }); - if (skills.length) { + if(skills.length){ target.addSkills(skills); } } }, - ai: { expose: 0.2 }, + ai:{expose:0.2}, }, - regushe: { - audio: 'gushe', - enable: 'phaseUse', - filterTarget: function (card, player, target) { + regushe:{ + audio:'gushe', + enable:'phaseUse', + filterTarget:function(card,player,target){ return player.canCompare(target); }, - selectTarget: [1, 3], - filter: function (event, player) { - return (player.countMark('regushe') + player.countMark('regushe2') < 7) && player.countCards('h') > 0; + selectTarget:[1,3], + filter:function(event,player){ + return (player.countMark('regushe')+player.countMark('regushe2')<7)&&player.countCards('h')>0; }, - multitarget: true, - multiline: true, - content: function () { + multitarget:true, + multiline:true, + content:function(){ player.addTempSkill('regushe2'); - player.chooseToCompare(targets).callback = lib.skill.regushe.callback; + player.chooseToCompare(targets).callback=lib.skill.regushe.callback; }, - intro: { - name: '饶舌', - content: 'mark' + intro:{ + name:'饶舌', + content:'mark' }, - callback: function () { + callback:function(){ 'step 0' - if (event.num1 <= event.num2) { + if(event.num1<=event.num2){ target.chat(lib.skill.gushe.chat[player.countMark('regushe')]); game.delay(); - player.addMark('regushe', 1); - if (player.countMark('regushe') >= 7) { + player.addMark('regushe',1); + if(player.countMark('regushe')>=7){ player.die(); } } - else player.addMark('regushe2', 1, false); + else player.addMark('regushe2',1,false); 'step 1' - if (event.num1 <= event.num2) { - player.chooseToDiscard('he', '弃置一张牌,或摸一张牌').set('ai', function () { return -1; }); + if(event.num1<=event.num2){ + player.chooseToDiscard('he','弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); } else event.goto(3); 'step 2' - if (!result.bool) { + if(!result.bool){ player.draw(); } 'step 3' - if (event.num1 >= event.num2) { - target.chooseToDiscard('he', '弃置一张牌,或令' + get.translation(player) + '摸一张牌').set('ai', function (card) { - if (_status.event.goon) return 6 - get.value(card); + 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); + }).set('goon',get.attitude(target,player)<0); } else event.finish(); 'step 4' - if (!result.bool) player.draw(); + if(!result.bool) player.draw(); }, - ai: { - order: 7, - result: { - target: function (player, target) { - var num = ui.selected.targets.length + 1; - if (num + player.countMark('regushe') <= 6) return -1; - var hs = player.getCards('h'); - for (var i = 0; i < hs.length; i++) { - if (get.value(hs[i]) <= 6) { - switch (hs[i].number) { - case 13: return -1; - case 12: if (player.countMark('regushe') + num <= 8) return -1; break; - case 11: if (player.countMark('regushe') + num <= 7) return -1; break; - default: if (hs[i].number > 5 && player.countMark('regushe') + num <= 6) return -1; + ai:{ + order:7, + result:{ + target:function(player,target){ + var num=ui.selected.targets.length+1; + if(num+player.countMark('regushe')<=6) return -1; + var hs=player.getCards('h'); + for(var i=0;i5&&player.countMark('regushe')+num<=6) return -1; } } } @@ -18764,27 +18765,27 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, } }, - marktext: '饶', + marktext:'饶', }, - regushe2: { - charlotte: true, - onremove: true, + regushe2:{ + charlotte:true, + onremove:true, }, - rejici: { - audio: 'jici', - trigger: { - player: 'compare', - target: 'compare', + rejici:{ + audio:'jici', + trigger:{ + player:'compare', + target:'compare', }, - forced: true, - filter: function (event, player) { + forced:true, + filter:function(event,player){ // if(player!=event.target&&event.iwhile) return false; - return (player == event.player ? event.num1 : event.num2) <= player.countMark('regushe'); + return (player==event.player?event.num1:event.num2)<=player.countMark('regushe'); }, - content: function () { - if (player == trigger.target || !trigger.iwhile) { - trigger[player == trigger.player ? 'num1' : 'num2'] += player.countMark('regushe'); - game.log(player, '的拼点牌点数+' + player.countMark('regushe')); + content:function(){ + if(player==trigger.target||!trigger.iwhile){ + trigger[player==trigger.player?'num1':'num2']+=player.countMark('regushe'); + game.log(player,'的拼点牌点数+'+player.countMark('regushe')); } game.delayx(); // var cards=[trigger.card1]; @@ -18801,96 +18802,96 @@ game.import('character', function (lib, game, ui, get, ai, _status) { // } // } // cards=cards.filterInD(); - var cards = []; - if (trigger.num1 > trigger.num2) cards.push(trigger.card1); - if (trigger.num1 < trigger.num2) cards.push(trigger.card2); - cards = cards.filterInD(); - if (cards.length) player.gain(cards, 'gain2'); + var cards=[]; + if(trigger.num1>trigger.num2) cards.push(trigger.card1); + if(trigger.num1 0) trigger.source.chooseToDiscard(num, true, 'he'); + logTarget:'source', + content:function(){ + var num=7-player.countMark('regushe'); + if(num>0) trigger.source.chooseToDiscard(num,true,'he'); trigger.source.loseHp(); }, }, - gushe: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { + gushe:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ return player.canCompare(target); }, - selectTarget: [1, 3], - filter: function (event, player) { - return player.countCards('h') > 0; + selectTarget:[1,3], + filter:function(event,player){ + return player.countCards('h')>0; }, - multitarget: true, - multiline: true, - content: function () { - player.chooseToCompare(targets).callback = lib.skill.gushe.callback; + multitarget:true, + multiline:true, + content:function(){ + player.chooseToCompare(targets).callback=lib.skill.gushe.callback; }, - intro: { - name: '饶舌', - content: 'mark' + intro:{ + name:'饶舌', + content:'mark' }, - chat: ['粗鄙之语', '天地不容', '谄谀之臣', '皓首匹夫,苍髯老贼', '二臣贼子', '断脊之犬', '我从未见过有如此厚颜无耻之人!'], - callback: function () { + chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚颜无耻之人!'], + callback:function(){ 'step 0' - if (event.num1 <= event.num2) { + 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.addMark('gushe',1); + if(player.countMark('gushe')>=7){ player.die(); } } 'step 1' - if (event.num1 <= event.num2) { - player.chooseToDiscard('he', '弃置一张牌,或摸一张牌').set('ai', function () { return -1; }); + if(event.num1<=event.num2){ + player.chooseToDiscard('he','弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); } else event.goto(3); 'step 2' - if (!result.bool) { + if(!result.bool){ player.draw(); } 'step 3' - if (event.num1 >= event.num2) { - target.chooseToDiscard('he', '弃置一张牌,或令' + get.translation(player) + '摸一张牌').set('ai', function (card) { - if (_status.event.goon) return 6 - get.value(card); + 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); + }).set('goon',get.attitude(target,player)<0); } else event.finish(); 'step 4' - if (!result.bool) player.draw(); + 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; i < hs.length; i++) { - if (get.value(hs[i]) <= 6) { - switch (hs[i].number) { - case 13: return -1; - case 12: if (player.countMark('gushe') + num <= 8) return -1; break; - case 11: if (player.countMark('gushe') + num <= 7) return -1; break; - default: if (hs[i].number > 5 && player.countMark('gushe') + num <= 6) return -1; + 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; } } } @@ -18899,63 +18900,63 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - jici: { - audio: 2, - trigger: { player: 'compare' }, - filter: function (event, player) { - return event.getParent().name == 'gushe' && !event.iwhile && event.num1 <= player.countMark('gushe'); + 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.num1 < player.countMark('gushe')) { - trigger.num1 += player.countMark('gushe'); + content:function(){ + if(trigger.num1 0; + juesi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; }, - filterTarget: function (card, player, target) { - return target != player && target.countCards('he') > 0 && player.inRange(target); + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0&&player.inRange(target); }, - filterCard: { name: 'sha' }, - content: function () { + filterCard:{name:'sha'}, + content:function(){ 'step 0' - target.chooseToDiscard('he', true); + 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); + 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) { + ai:{ + order:2, + result:{ + target:function(player,target){ + if(get.effect(target,{name:'juedou'},player,player)<=0){ return 0; } - if (target.hp < player.hp) { - if (player.countCards('h') > player.hp) return -0.1; + 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) { + 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) { + 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) { + 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)) { + if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ return 0; } return -1; @@ -18963,313 +18964,313 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - 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 = []; + 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('he') > 0; + filter:function(event,player){ + return player.countCards('he')>0; }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - intro: { - content: 'cards', - onunmark: function (storage, player) { - player.storage.shefu = []; - player.storage.shefu2 = []; + intro:{ + content:'cards', + onunmark:function(storage,player){ + player.storage.shefu=[]; + player.storage.shefu2=[]; }, - mark: function (dialog, content, player) { - if (content && content.length) { + mark:function(dialog,content,player){ + if(content&&content.length){ dialog.addAuto(content); - if (player.isUnderControl(true)) { - var str = ''; - for (var i = 0; i < player.storage.shefu2.length; i++) { - str += get.translation(player.storage.shefu2[i]); - if (i < player.storage.shefu2.length - 1) { - str += '、'; + if(player.isUnderControl(true)){ + var str=''; + for(var i=0;i' + str + '') + dialog.add('
    '+str+'
    ') } } }, }, - content: function () { + content:function(){ 'step 0' - var list1 = [], list2 = [], list3 = []; - for (var i = 0; i < lib.inpile.length; i++) { - var type = get.type(lib.inpile[i]); - if (type == 'basic') { - list1.push(['基本', '', lib.inpile[i]]); + var list1=[],list2=[],list3=[]; + for(var i=0;i nh2 && event.source.isIn()) return true; - if (nh1 < Math.min(5, nh2)) return true; + benyu:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + if(!event.source) return false; + var nh1=player.countCards('h'); + var nh2=event.source.countCards('h'); + var eh=player.countCards('e'); + if((nh1+eh)>nh2&&event.source.isIn()) return true; + if(nh1 num2 && trigger.source.isIn()) bool2 = true; - if (bool1 && bool2) { - event.chosen = true; - player.chooseControl('cancel2').set('prompt', get.prompt('benyu', trigger.source)).set('choiceList', [ - '将手牌摸至' + get.cnNumber(Math.min(num2, 5)) + '张', - '弃置至少' + get.cnNumber(num2 + 1) + '张牌并对其造成1点伤害', + var bool1=false,bool2=false; + if(num1num2&&trigger.source.isIn()) bool2=true; + if(bool1&&bool2){ + event.chosen=true; + player.chooseControl('cancel2').set('prompt',get.prompt('benyu',trigger.source)).set('choiceList',[ + '将手牌摸至'+get.cnNumber(Math.min(num2,5))+'张', + '弃置至少'+get.cnNumber(num2+1)+'张牌并对其造成1点伤害', ]) } - else if (bool2) event.goto(3); + else if(bool2) event.goto(3); "step 1" - if (event.chosen) { - if (result.control == 'cancel2') event.finish(); - else if (result.index == 1) event.goto(3); - else event._result = { bool: true }; + if(event.chosen){ + if(result.control=='cancel2') event.finish(); + else if(result.index==1) event.goto(3); + else event._result={bool:true}; } - else player.chooseBool(get.prompt('benyu', trigger.source), '将手牌摸至' + get.cnNumber(Math.min(trigger.source.countCards('h'), 5)) + '张'); + else player.chooseBool(get.prompt('benyu',trigger.source),'将手牌摸至'+get.cnNumber(Math.min(trigger.source.countCards('h'),5))+'张'); "step 2" - if (result.bool) { - player.logSkill('benyu', trigger.source); - player.drawTo(Math.min(trigger.source.countCards('h'), 5)); + if(result.bool){ + player.logSkill('benyu',trigger.source); + player.drawTo(Math.min(trigger.source.countCards('h'),5)); } event.finish(); "step 3" - var num = trigger.source.countCards('h') + 1; - var args = [[num, player.countCards('he')], 'he']; - if (event.chosen) { - player.logSkill('benyu', trigger.source); + var num=trigger.source.countCards('h')+1; + var args=[[num,player.countCards('he')],'he']; + if(event.chosen){ + player.logSkill('benyu',trigger.source); args.push(true); } - else { - args.push(get.prompt('benyu', trigger.source)); - args.push('弃置' + get.cnNumber(num) + '张牌并对其造成1点伤害'); + else{ + args.push(get.prompt('benyu',trigger.source)); + args.push('弃置'+get.cnNumber(num)+'张牌并对其造成1点伤害'); } - var next = player.chooseToDiscard.apply(player, args); - if (!event.chosen) 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) { + var next=player.chooseToDiscard.apply(player,args); + if(!event.chosen) 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 && (get.value(card, player) < 0 || _status.event.num <= 2)) { - return 8 - get.value(card); + if(get.damageEffect(trigger.source,player,player)>0&&(get.value(card,player)<0||_status.event.num<=2)){ + return 8-get.value(card); } return -1; }); - next.set('num', num); + next.set('num',num); "step 4" - if (result.bool) trigger.source.damage(); + if(result.bool) trigger.source.damage(); }, }, - jili: { - audio: 2, - trigger: { - global: 'useCardToTarget' + jili:{ + audio:2, + trigger:{ + global:'useCardToTarget' }, - forced: true, - check: function (event, player) { - return get.effect(player, event.card, event.player, player) > 0; + 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.includes(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; i < event.targets.length; i++) { - if (get.distance(event.targets[i], player) <= 1) return true; + 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.includes(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;i 0 && !player.hasSkill('zhidao2') && !get.tag(card, 'damage') && (!lib.filter.targetEnabled(card, player, player) || get.effect(player, card, player) <= 0)) return num + 10; + zhidao:{ + audio:2, + mod:{ + aiOrder:function(player,card,num){ + if(num>0&&!player.hasSkill('zhidao2')&&!get.tag(card,'damage')&&(!lib.filter.targetEnabled(card,player,player)||get.effect(player,card,player)<=0)) return num+10; } }, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - if (event._notrigger.includes(event.player)) return false; - return _status.currentPhase == player && event.player.isIn() && - event.player.countCards('hej') > 0 && event.player != player && !player.hasSkill('zhidao2'); + trigger:{source:'damageSource'}, + filter:function(event,player){ + if(event._notrigger.includes(event.player)) return false; + return _status.currentPhase==player&&event.player.isIn()&& + event.player.countCards('hej')>0&&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; i < ui.selected.buttons.length; i++) { - if (get.position(button.link) == get.position(ui.selected.buttons[i].link)) return false; + 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;i !player.hasSkill(skill)); - if (list.length == 1) event._result = { control: list[0] }; - else if (list.length > 0) { - player.chooseControl(list).set('prompt', '选择获得一项技能').set('ai', function () { - if (_status.event.controls.includes('dangxian')) return 'dangxian'; + var list=lib.skill.zhengnan.derivation.filter(skill=>!player.hasSkill(skill)); + if(list.length==1) event._result={control:list[0]}; + else if(list.length>0){ + player.chooseControl(list).set('prompt','选择获得一项技能').set('ai',function(){ + if(_status.event.controls.includes('dangxian')) return 'dangxian'; return _status.event.controls[0]; }); } else event.finish(); 'step 2' - if (result.control) { + if(result.control){ player.addSkills(result.control); } }, - ai: { threaten: 2 }, + ai:{threaten:2}, }, - xiefang: { - mod: { - globalFrom: function (from, to, distance) { - return distance - game.countPlayer(function (current) { + xiefang:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-game.countPlayer(function(current){ return current.hasSex('female'); }); } } }, - qizhi: { - audio: 2, - trigger: { - player: 'useCardToPlayered' + qizhi:{ + audio:2, + trigger:{ + player:'useCardToPlayered' }, - direct: true, - filter: function (event, player) { - if (!event.targets) return false; - if (!event.isFirstTarget) return false; - if (_status.currentPhase != player) return false; - var type = get.type(event.card, 'trick'); - if (type != 'basic' && type != 'trick') return false; - if (event.noai) return false; - return game.hasPlayer(function (target) { - return !event.targets.includes(target) && target.countCards('he') > 0; + direct:true, + filter:function(event,player){ + if(!event.targets) return false; + if(!event.isFirstTarget) return false; + if(_status.currentPhase!=player) return false; + var type=get.type(event.card,'trick'); + if(type!='basic'&&type!='trick') return false; + if(event.noai) return false; + return game.hasPlayer(function(target){ + return !event.targets.includes(target)&&target.countCards('he')>0; }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('qizhi'), '弃置一名角色的一张牌,然后其摸一张牌', function (card, player, target) { - return !_status.event.targets.includes(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) { + player.chooseTarget(get.prompt('qizhi'),'弃置一名角色的一张牌,然后其摸一张牌',function(card,player,target){ + return !_status.event.targets.includes(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); + }).set('targets',trigger.targets); 'step 1' - if (result.bool) { - player.getHistory('custom').push({ qizhi: true }); - player.logSkill('qizhi', result.targets); - player.discardPlayerCard(result.targets[0], true, 'he'); - event.target = result.targets[0]; + if(result.bool){ + player.getHistory('custom').push({qizhi:true}); + player.logSkill('qizhi',result.targets); + player.discardPlayerCard(result.targets[0],true,'he'); + event.target=result.targets[0]; } - else { + 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'); + 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; + prompt:function(event,player){ + var num=player.getHistory('custom',function(evt){ + return evt.qizhi==true; }).length; - return '进趋:是否摸两张牌并将手牌弃置至' + get.cnNumber(num) + '张?'; + return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(num)+'张?'; }, - content: function () { + content:function(){ 'step 0' player.draw(2); 'step 1' - var dh = player.countCards('h') - player.getHistory('custom', function (evt) { - return evt.qizhi == true; + var dh=player.countCards('h')-player.getHistory('custom',function(evt){ + return evt.qizhi==true; }).length; - if (dh > 0) { - player.chooseToDiscard(dh, true); + if(dh>0){ + player.chooseToDiscard(dh,true); } }, - ai: { combo: 'qizhi' }, + ai:{combo:'qizhi'}, }, - jiaozi: { - audio: 2, - trigger: { player: 'damageBegin3', source: 'damageBegin1' }, - forced: true, - filter: function (event, player) { + jiaozi:{ + audio:2, + trigger:{player:'damageBegin3',source:'damageBegin1'}, + forced:true, + filter:function(event,player){ return player.isMaxHandcard(true); }, - content: function () { + content:function(){ trigger.num++; }, - ai: { presha: true }, + ai:{presha:true}, }, - jiqiao: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - direct: true, - filter: function (event, player) { - return player.countCards('he', { type: 'equip' }) > 0; + jiqiao:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; }, - content: function () { + 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'; + 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); + if(result.bool){ + event.cards=get.cards(2*result.cards.length); player.showCards(event.cards); } - else { + else{ event.finish(); } 'step 2' - var gained = []; - var tothrow = []; - for (var i = 0; i < event.cards.length; i++) { - if (get.type(event.cards[i]) != 'equip') { + var gained=[]; + var tothrow=[]; + for(var i=0;i slot == 'equip2' || slot == 'equip5')) return false; + canBeDiscarded:function (card,source,player){ + if(!player.hasEmptySlot(5)) return; + if(get.position(card)=='e'&&get.subtypes(card).some(slot=>slot=='equip2'||slot=='equip5')) return false; }, /*cardDiscardable:function (card,player){ if(player.getEquip(5)) return; @@ -19591,96 +19592,96 @@ game.import('character', function (lib, game, ui, get, ai, _status) { },*/ } }, - linglong_bagua: { - audio: 'linglong', - audioname2: { re_jsp_huangyueying: 'relinglong' }, - inherit: 'bagua_skill', - filter: function (event, player) { - if (!lib.skill.bagua_skill.filter(event, player)) return false; - if (!player.hasEmptySlot(2)) return false; + linglong_bagua:{ + audio:'linglong', + audioname2:{re_jsp_huangyueying:'relinglong'}, + inherit:'bagua_skill', + filter:function(event,player){ + if(!lib.skill.bagua_skill.filter(event,player)) return false; + if(!player.hasEmptySlot(2)) return false; return true; }, - ai: { - respondShan: true, - effect: { - target: function (card, player, target) { - if (player == target && get.subtype(card) == 'equip2') { - if (get.equipValue(card) <= 7.5) return 0; + ai:{ + respondShan:true, + effect:{ + target:function(card,player,target){ + if(player==target&&get.subtype(card)=='equip2'){ + if(get.equipValue(card)<=7.5) return 0; } - if (target.getEquip(2)) return; - return lib.skill.bagua_skill.ai.effect.target.apply(this, arguments); + if(target.getEquip(2)) return; + return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments); } } }, }, - zhenwei: { - audio: 2, - audioname: ['re_wenpin'], - trigger: { - global: 'useCardToTarget' + zhenwei:{ + audio:2, + audioname:['re_wenpin'], + trigger:{ + global:'useCardToTarget' }, - direct: true, - filter: function (event, player) { - if (player == event.target || player == event.player) return false; - if (!player.countCards('he')) return false; - if (event.targets.length > 1) return false; - if (!event.target) return false; - if (event.target.hp >= player.hp) return false; + direct:true, + filter:function(event,player){ + if(player==event.target||player==event.player) return false; + if(!player.countCards('he')) return false; + if(event.targets.length>1) 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; + 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 () { + 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') < player.countCards('h')) { - save = true; + 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) { + else{ + var cards=trigger.cards.filterInD(); + if(cards.length>0){ trigger.player.addSkill('zhenwei2'); - trigger.player.addToExpansion(cards, 'gain2').gaintag.add('zhenwei2'); + trigger.player.addToExpansion(cards,'gain2').gaintag.add('zhenwei2'); } - trigger.targets.length = 0; - trigger.getParent().triggeredTargets2.length = 0; + trigger.targets.length=0; + trigger.getParent().triggeredTargets2.length=0; } }, - ai: { - threaten: 1.1 + ai:{ + threaten:1.1 } }, - zhenwei2: { - audio: false, - intro: { - content: 'expansion', - markcount: 'expansion', + zhenwei2:{ + audio:false, + intro:{ + content:'expansion', + markcount:'expansion', }, - trigger: { global: 'phaseEnd' }, - forced: true, - charlotte: true, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + trigger:{global:'phaseEnd'}, + forced:true, + charlotte:true, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - content: function () { + content:function(){ 'step 0' - var cards = player.getExpansions('zhenwei2'); - if (cards.length) player.gain(cards, 'gain2'); + var cards=player.getExpansions('zhenwei2'); + if(cards.length) player.gain(cards,'gain2'); 'step 1' player.removeSkill('zhenwei2'); } }, - xunzhi: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - locked: false, - init: function (player) { - player.storage.xunzhi = 0; + xunzhi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + locked:false, + 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; + 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; + check:function(event,player){ + return player.hp>=3&&player.countCards('h')>player.hp+1+player.storage.xunzhi; }, - content: function () { + content:function(){ player.loseHp(); - player.storage.xunzhi += 2; + player.storage.xunzhi+=2; }, - mark: true, - intro: { - content: function (storage, player) { - return '手牌上限+' + player.storage.xunzhi; + 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; + 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) { + 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; + 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; + if(!player.hasSkill('xunzhi2')){ + var nh=player.countCards('h'); + if(nh>5) return false; + if(num==3&&nh>3) return false; } - return num >= 3; + return num>=3; }, - content: function () { + content:function(){ trigger.changeToZero(); - var num = game.countPlayer(function (target) { - return target.hp == player.hp; + var num=game.countPlayer(function(target){ + return target.hp==player.hp; }); - if (num) { + if(num){ player.draw(num); } - player.storage.yawang = 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; + yawang2:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.currentPhase!=player) return; + if(player.countUsed()>=player.storage.yawang) return false; }, - cardSavable: function (card, player) { - if (_status.currentPhase != player) return; - if (player.countUsed() >= player.storage.yawang) return false; + cardSavable:function(card,player){ + if(_status.currentPhase!=player) return; + if(player.countUsed()>=player.storage.yawang) return false; } } }, - 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_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_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'], + 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']; + 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; + color2:{ + trigger:{player:'useCard'}, + silent:true, + filter:function(event,player){ + return Array.isArray(player.storage.xingwu_color)&&_status.currentPhase==player; }, - content: function () { + 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; i < hs.length; i++) { - if (get.color(hs[i]) == color) return true; + 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;i 0 && - get.attitude(player, current) < 0) + }).set('ai',function(card){ + var player=_status.event.player; + if(player.storage.xingwu.length==2){ + if(!game.hasPlayer(function(current){ + return (current!=player&¤t.hasSex('male')&& + get.damageEffect(current,player,player)>0&& + get.attitude(player,current)<0) })) return 0; } - return 7 - get.value(card); + return 7-get.value(card); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('xingwu'); - if (player.storage.xingwu.length < 2) { - player.$give(result.cards, player); + 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.lose(result.cards,ui.special); + player.storage.xingwu=player.storage.xingwu.concat(result.cards); player.markSkill('xingwu'); player.syncStorage('xingwu'); } - else { + else{ event.finish(); } 'step 2' - if (player.storage.xingwu.length == 3) { + if(player.storage.xingwu.length==3){ player.$throw(player.storage.xingwu); - while (player.storage.xingwu.length) { + while(player.storage.xingwu.length){ player.storage.xingwu.shift().discard(); } player.unmarkSkill('xingwu'); - player.chooseTarget(function (card, player, target) { - return target != player && target.hasSex('male'); - }, '对一名男性角色造成2点伤害并弃置其装备区内的牌').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; + player.chooseTarget(function(card,player,target){ + return target!=player&&target.hasSex('male'); + },'对一名男性角色造成2点伤害并弃置其装备区内的牌').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 { + else{ event.finish(); } 'step 3' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; target.damage(2); - event.target = target; - player.line(target, 'green'); + event.target=target; + player.line(target,'green'); } - else { + else{ event.finish(); } 'step 4' - if (event.target && event.target.isIn()) { - var es = event.target.getCards('e'); - if (es.length) { + if(event.target&&event.target.isIn()){ + var es=event.target.getCards('e'); + if(es.length){ event.target.discard(es); } } }, - ai: { - threaten: 1.5 + ai:{ + threaten:1.5 } }, - yinbing: { - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - audio: 2, - preHidden: true, - filter: function (event, player) { - return player.countCards('he', { type: 'basic' }) < player.countCards('he'); + yinbing:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + preHidden:true, + filter:function(event,player){ + return player.countCards('he',{type:'basic'}) 0 && - (event.card.name == 'sha' || event.card.name == 'juedou'); + subSkill:{ + discard:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.card&&player.getExpansions('yinbing').length>0&& + (event.card.name=='sha'||event.card.name=='juedou'); }, - content: function () { + content:function(){ 'step 0' - player.chooseCardButton('移去一张引兵牌', true, player.getExpansions('yinbing')); + player.chooseCardButton('移去一张引兵牌',true,player.getExpansions('yinbing')); 'step 1' - if (result.bool) player.loseToDiscardpile(result.links); + if(result.bool) player.loseToDiscardpile(result.links); } } }, - group: 'yinbing_discard' + group:'yinbing_discard' }, - juedi: { - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return player.getExpansions('yinbing').length > 0; + juedi:{ + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.getExpansions('yinbing').length>0; }, - forced: true, - audio: 2, - content: function () { + 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; + 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{ + num+=_status.event.n2*2; + if(target.isDamaged()){ + if(target.hp==1){ + num+=3; } - else if (target.hp == 2) { - num += 2; + else if(target.hp==2){ + num+=2; } - else { - num += 0.5; + else{ + num+=0.5; } } } - if (target.hasJudge('lebu')) { - num /= 2; + if(target.hasJudge('lebu')){ + num/=2; } return num; - }).set('n2', player.getExpansions('yinbing').length); + }).set('n2',player.getExpansions('yinbing').length); 'step 1' - if (result.bool) { - player.line(result.targets[0], 'green'); - var cards = player.getExpansions('yinbing'); - if (result.targets[0] == player) { + if(result.bool){ + player.line(result.targets[0],'green'); + var cards=player.getExpansions('yinbing'); + if(result.targets[0]==player){ player.loseToDiscardpile(cards); - var num = player.maxHp - player.countCards('h'); - if (num > 0) player.draw(num); + var num=player.maxHp-player.countCards('h'); + if(num>0) player.draw(num); } - else { - var target = result.targets[0]; + else{ + var target=result.targets[0]; target.recover(); - player.give(cards, target, 'give'); + player.give(cards,target,'give'); target.draw(cards.length); } } } }, - meibu: { - trigger: { global: 'phaseUseBegin' }, - filter: function (event, player) { - return event.player != player && get.distance(event.player, player, 'attack') > 1; + 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; + 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; + return player.countCards('h','shan')>0; }, - content: function () { - var target = trigger.player; + 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) + '视为在攻击范围内'); + target.storage.meibu=player; + target.markSkillCharacter('meibu',player,'魅步','锦囊牌均视为杀且'+get.translation(player)+'视为在攻击范围内'); }, - ai: { - expose: 0.2 + ai:{ + expose:0.2 }, - subSkill: { - range: { - mod: { - targetInRange: function (card, player, target) { - if (card.name == 'sha' && target == player.storage.meibu) { + 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) { + 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); + if(player.marks.meibu){ player.marks.meibu.delete(); delete player.marks.meibu; - game.addVideo('unmark', player, 'meibu'); + game.addVideo('unmark',player,'meibu'); } }, - trigger: { player: 'useCard' }, - forced: true, - popup: false, - filter: function (event, player) { - return event.skill == 'meibu_viewas' + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='meibu_viewas' }, - content: function () { + 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); + 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); + },player); } }, - viewas: { - mod: { - cardEnabled: function (card, player) { - if (card.name != 'sha' && get.type(card, 'trick') == 'trick') return false; + 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; + 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; + 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; + 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'; + 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') && current < 0) return 0.8 + 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 + 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'); + 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); + check:function(card){ + return 7-get.value(card); }, - filterTarget: function (card, player, target) { - if (target == player) return false; - return target.getEquips(1).length > 0 || target.getEquips(2).length > 0; + filterTarget:function(card,player,target){ + if(target==player) return false; + return target.getEquips(1).length>0||target.getEquips(2).length>0; }, - content: function () { + content:function(){ 'step 0' - var e1 = target.getEquips(1); - var e2 = target.getEquips(2); - event.e1 = e1; - event.e2 = e2; - if (e1.length && e2.length) { - player.chooseControl('武器牌', '防具牌').set('ai', function () { - if (_status.event.player.getEquip(2)) { + var e1=target.getEquips(1); + var e2=target.getEquips(2); + event.e1=e1; + event.e2=e2; + if(e1.length&&e2.length){ + player.chooseControl('武器牌','防具牌').set('ai',function(){ + if(_status.event.player.getEquip(2)){ return '武器牌'; } return '防具牌'; }); } - else if (e1.length) { - event.choice = '武器牌'; + else if(e1.length){ + event.choice='武器牌'; } - else { - event.choice = '防具牌'; + else{ + event.choice='防具牌'; } 'step 1' - var choice = event.choice || result.control; - if (choice == '武器牌') { - if (event.e1) { + var choice=event.choice||result.control; + if(choice=='武器牌'){ + if(event.e1){ target.discard(event.e1); } player.draw(); } - else { - if (event.e2) { + else{ + if(event.e2){ player.equip(event.e2); - target.$give(event.e2, player); + target.$give(event.e2,player); } } }, - ai: { - order: 8, - result: { - target: function (player, target) { - if (target.getEquip(2) && !player.getEquip(2)) { + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.getEquip(2)&&!player.getEquip(2)){ return -2; } return -1; @@ -20207,1035 +20208,1035 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - 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) && current.countCards('he'); + 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: 'expansion', - markcount: 'expansion', + intro:{ + content:'expansion', + markcount:'expansion', }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - content: function () { + 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) + 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); + if(result.bool){ + player.logSkill('fentian',result.targets); + event.target=result.targets[0]; + player.choosePlayerCard(result.targets[0],'he',true); } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { - player.addToExpansion(result.links, target, 'give').gaintag.add('fentian'); + if(result.bool){ + player.addToExpansion(result.links,target,'give').gaintag.add('fentian'); } }, - mod: { - attackRange: function (from, distance) { - return distance + from.getExpansions('fentian').length; + mod:{ + attackRange:function(from,distance){ + return distance+from.getExpansions('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.getExpansions('fentian').length >= 3; + zhiri:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + unique:true, + juexingji:true, + audio:2, + skillAnimation:true, + animationColor:'fire', + derivation:'xintan', + filter:function(event,player){ + return player.getExpansions('fentian').length>=3; }, - content: function () { + content:function(){ player.awakenSkill('zhiri'); player.loseMaxHp(); - player.storage.zhiri = true; + player.storage.zhiri=true; } }, - xintan: { - enable: 'phaseUse', - usable: 1, - audio: 2, - unique: true, - filter: function (event, player) { - return player.getExpansions('fentian').length >= 2; + xintan:{ + enable:'phaseUse', + usable:1, + audio:2, + unique:true, + filter:function(event,player){ + return player.getExpansions('fentian').length>=2; }, - filterTarget: true, - prompt: '移去两张“焚”并令一名角色失去1点体力', - content: function () { + filterTarget:true, + prompt:'移去两张“焚”并令一名角色失去1点体力', + content:function(){ 'step 0' - player.chooseCardButton(2, '移去两张“焚”并令' + get.translation(target) + '失去1点体力', player.getExpansions('fentian'), true); + player.chooseCardButton(2,'移去两张“焚”并令'+get.translation(target)+'失去1点体力',player.getExpansions('fentian'),true); 'step 1' - if (result.bool) { + if(result.bool){ player.loseToDiscardpile(result.links); target.loseHp(); } }, - ai: { - order: 8, - result: { - target: -1 + ai:{ + order:8, + result:{ + target:-1 } } }, - danji: { - skillAnimation: true, - animationColor: 'water', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - unique: true, - juexingji: true, - derivation: ['mashu', 'nuzhan'], - filter: function (event, player) { - var zhu = get.zhu(player); - if (zhu && zhu.isZhu) { - var name = zhu.name - while (name.indexOf('_') != -1) { - name = name.slice(name.indexOf('_') + 1); + danji:{ + skillAnimation:true, + animationColor:'water', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + unique:true, + juexingji:true, + derivation:['mashu','nuzhan'], + filter:function(event,player){ + var zhu=get.zhu(player); + if(zhu&&zhu.isZhu){ + var name=zhu.name + while(name.indexOf('_')!=-1){ + name=name.slice(name.indexOf('_')+1); } - if (name.indexOf('liubei') == 0) return false; + if(name.indexOf('liubei')==0) return false; } - return !player.storage.danji && player.countCards('h') > player.hp; + return !player.storage.danji&&player.countCards('h')>player.hp; }, - content: function () { + content:function(){ player.awakenSkill('danji'); player.loseMaxHp(); - player.addSkills(['mashu', 'nuzhan']); + player.addSkills(['mashu','nuzhan']); }, - ai: { - maixie: true, - skillTagFilter: (player, tag, arg) => { - if (tag === 'maixie') { - if (player.hp < 2 || player.storage.danji || player.hasSkill('nuzhan') || player.countCards('h') !== player.hp) return false; - let zhu = get.zhu(player); - if (zhu && zhu.isZhu) { - let name = zhu.name; - while (name.indexOf('_') !== -1) { - name = name.slice(name.indexOf('_') + 1); + ai:{ + maixie:true, + skillTagFilter:(player,tag,arg)=>{ + if(tag==='maixie'){ + if(player.hp<2||player.storage.danji||player.hasSkill('nuzhan')||player.countCards('h')!==player.hp) return false; + let zhu=get.zhu(player); + if(zhu&&zhu.isZhu){ + let name=zhu.name; + while(name.indexOf('_')!==-1){ + name=name.slice(name.indexOf('_')+1); } - if (name.indexOf('liubei') == 0) return false; + if(name.indexOf('liubei')==0) return false; } return true; } }, - effect: { - target: (card, player, target) => { - let hs = target.countCards('h'); - if (target.hp < 3 || target.storage.danji || target.hasSkill('nuzhan') || hs > target.hp + 1) return; - let zhu = get.zhu(target); - if (zhu && zhu.isZhu) { - let name = zhu.name; - while (name.indexOf('_') !== -1) { - name = name.slice(name.indexOf('_') + 1); + effect:{ + target:(card,player,target)=>{ + let hs=target.countCards('h'); + if(target.hp<3||target.storage.danji||target.hasSkill('nuzhan')||hs>target.hp+1) return; + let zhu=get.zhu(target); + if(zhu&&zhu.isZhu){ + let name=zhu.name; + while(name.indexOf('_')!==-1){ + name=name.slice(name.indexOf('_')+1); } - if (name.indexOf('liubei') == 0) return; + if(name.indexOf('liubei')==0) return; } - if (get.tag(card, 'draw')) return 1.6; - if (get.tag(card, 'lose') || get.tag(card, 'discard')) return [1, -0.8]; - if (hs === target.hp && get.tag(card, 'damage')) return [1, target.hp / 3]; - if (hs > target.hp && target.hp > 3 && (card.name === 'shan' || card.name === 'wuxie')) return 'zeroplayertarget'; + if(get.tag(card,'draw')) return 1.6; + if(get.tag(card,'lose')||get.tag(card,'discard')) return [1,-0.8]; + if(hs===target.hp&&get.tag(card,'damage')) return [1,target.hp/3]; + if(hs>target.hp&&target.hp>3&&(card.name==='shan'||card.name==='wuxie')) return 'zeroplayertarget'; } } } }, - 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'; + 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--; + 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' + 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'; + 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 () { + 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.countCards(player.hasSkill('fenxin_nei') ? 'he' : 'h', function (card) { - if (player.hasSkill('fenxin_nei') || (_status.connectMode && get.position(card) == 'h')) return true; - return get.color(card) == 'black'; + jieyuan:{ + group:['jieyuan_more','jieyuan_less'], + subSkill:{ + more:{ + audio:true, + trigger:{source:'damageBegin1'}, + direct:true, + filter:function(event,player){ + if(!player.countCards(player.hasSkill('fenxin_nei')?'he':'h',function(card){ + if(player.hasSkill('fenxin_nei')||(_status.connectMode&&get.position(card)=='h')) return true; + return get.color(card)=='black'; })) return false; - return (event.player.hp >= player.hp || player.hasSkill('fenxin_fan')) && player != event.player; + return (event.player.hp>=player.hp||player.hasSkill('fenxin_fan'))&&player!=event.player; }, - content: function () { + content:function(){ 'step 0' - var goon = (get.attitude(player, trigger.player) < 0); - var next = player.chooseToDiscard(get.prompt('jieyuan', trigger.player), player.hasSkill('fenxin_nei') ? 'he' : 'h'); - if (!player.hasSkill('fenxin_nei')) { - next.set('filterCard', function (card) { - return get.color(card) == 'black'; + var goon=(get.attitude(player,trigger.player)<0); + var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player),player.hasSkill('fenxin_nei')?'he':'h'); + if(!player.hasSkill('fenxin_nei')){ + next.set('filterCard',function(card){ + return get.color(card)=='black'; }); - next.set('prompt2', '弃置一张黑色手牌令伤害+1'); + next.set('prompt2','弃置一张黑色手牌令伤害+1'); } - else { - next.set('prompt2', '弃置一张手牌令伤害+1'); + else{ + next.set('prompt2','弃置一张手牌令伤害+1'); } - next.set('ai', function (card) { - if (_status.event.goon) { - return 8 - get.value(card); + 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]; + next.set('goon',goon); + next.logSkill=['jieyuan_more',trigger.player]; 'step 1' - if (result.bool) { + if(result.bool){ trigger.num++; } } }, - less: { - audio: true, - trigger: { player: 'damageBegin2' }, - filter: function (event, player) { - if (!player.countCards(player.hasSkill('fenxin_nei') ? 'he' : 'h', function (card) { - if (player.hasSkill('fenxin_nei') || (_status.connectMode && get.position(card) == 'h')) return true; - return get.color(card) == 'red'; + less:{ + audio:true, + trigger:{player:'damageBegin2'}, + filter:function(event,player){ + if(!player.countCards(player.hasSkill('fenxin_nei')?'he':'h',function(card){ + if(player.hasSkill('fenxin_nei')||(_status.connectMode&&get.position(card)=='h')) return true; + return get.color(card)=='red'; })) return false; - return event.source && (event.source.hp >= player.hp || player.hasSkill('fenxin_zhong')) && player != event.source; + return event.source&&(event.source.hp>=player.hp||player.hasSkill('fenxin_zhong'))&&player!=event.source; }, - direct: true, - content: function () { + direct:true, + content:function(){ "step 0" - var next = player.chooseToDiscard(get.prompt('jieyuan'), player.hasSkill('fenxin_nei') ? 'he' : 'h'); - if (!player.hasSkill('fenxin_nei')) { - next.set('filterCard', function (card) { - return get.color(card) == 'red'; + var next=player.chooseToDiscard(get.prompt('jieyuan'),player.hasSkill('fenxin_nei')?'he':'h'); + if(!player.hasSkill('fenxin_nei')){ + next.set('filterCard',function(card){ + return get.color(card)=='red'; }); - next.set('prompt2', '弃置一张红色手牌令伤害-1'); + next.set('prompt2','弃置一张红色手牌令伤害-1'); } - else { - 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); + 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); + if(player.hp==2){ + return 8-get.value(card); } - return 7 - get.value(card); + return 7-get.value(card); }); - next.logSkill = 'jieyuan_less'; + next.logSkill='jieyuan_less'; "step 1" - if (result.bool) { + if(result.bool){ trigger.num--; } } } }, - ai: { - expose: 0.2, - threaten: 1.5 + ai:{ + expose:0.2, + threaten:1.5 } }, - fenxin: { - mode: ['identity', 'versus'], - available: function (mode) { - if (mode == 'identity' && _status.mode == 'purple') return false; - if (mode == 'versus' && _status.mode != 'two') return false; + fenxin:{ + mode:['identity','versus'], + available:function(mode){ + if(mode=='identity'&&_status.mode=='purple') return false; + if(mode=='versus'&&_status.mode!='two') return false; }, - trigger: { global: ['dieAfter', 'damageEnd'] }, - filter: function (event, player) { - var list = ['fan', 'zhong', 'nei']; - if (get.mode() == 'identity') return event.name == 'die' && list.includes(event.player.identity) && !player.hasSkill('fenxin_' + event.player.identity); - return event.name == 'damage' && event.player != player && list.some(identity => !player.hasSkill('fenxin_' + identity)) && event.player.getHistory('damage').indexOf(event) == 0; + trigger:{global:['dieAfter','damageEnd']}, + filter:function(event,player){ + var list=['fan','zhong','nei']; + if(get.mode()=='identity') return event.name=='die'&&list.includes(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity); + return event.name=='damage'&&event.player!=player&&list.some(identity=>!player.hasSkill('fenxin_'+identity))&&event.player.getHistory('damage').indexOf(event)==0; }, - forced: true, - logTarget: 'player', - content: function () { + forced:true, + logTarget:'player', + content:function(){ 'step 0' - if (get.mode() == 'identity') { - event._result = { - bool: true, - links: ['fenxin_' + trigger.player.identity], + if(get.mode()=='identity'){ + event._result={ + bool:true, + links:['fenxin_'+trigger.player.identity], }; } - else { + else{ player.chooseButton([ '焚心:请选择〖竭缘〗的升级方式', [[ - ['fenxin_fan', '发动〖竭缘〗增加伤害无体力值限制'], - ['fenxin_zhong', '发动〖竭缘〗减少伤害无体力值限制'], - ['fenxin_nei', '将〖竭缘〗中的黑色手牌和红色手牌改为一张牌'], - ].filter(list => !player.hasSkill(list[0])), 'textbutton'] - ], true).set('ai', function (button) { - return ['fenxin_fan', 'fenxin_zhong', 'fenxin_nei'].indexOf(button.link) + 1; + ['fenxin_fan','发动〖竭缘〗增加伤害无体力值限制'], + ['fenxin_zhong','发动〖竭缘〗减少伤害无体力值限制'], + ['fenxin_nei','将〖竭缘〗中的黑色手牌和红色手牌改为一张牌'], + ].filter(list=>!player.hasSkill(list[0])),'textbutton'] + ],true).set('ai',function(button){ + return ['fenxin_fan','fenxin_zhong','fenxin_nei'].indexOf(button.link)+1; }); } 'step 1' - if (result.bool) { - var identity = result.links[0]; + if(result.bool){ + var identity=result.links[0]; player.addSkill(identity); player.markSkill('fenxin'); } }, - intro: { - mark: function (dialog, content, player) { - if (player.hasSkill('fenxin_zhong')) { + intro:{ + mark:function(dialog,content,player){ + if(player.hasSkill('fenxin_zhong')){ dialog.addText('你发动“竭缘”减少伤害无体力值限制'); } - if (player.hasSkill('fenxin_fan')) { + if(player.hasSkill('fenxin_fan')){ dialog.addText('你发动“竭缘”增加伤害无体力值限制'); } - if (player.hasSkill('fenxin_nei')) { + if(player.hasSkill('fenxin_nei')){ dialog.addText('将“竭缘”中的黑色手牌和红色手牌改为一张牌'); } } }, - subSkill: { - fan: { charlotte: true }, - zhong: { charlotte: true }, - nei: { charlotte: true } + subSkill:{ + fan:{charlotte:true}, + zhong:{charlotte:true}, + nei:{charlotte:true} }, - ai: { combo: 'jieyuan' }, + ai:{combo:'jieyuan'}, }, - xisheng: { - enable: 'chooseToUse', - usable: 1, - viewAs: { name: 'tao' }, - viewAsFilter: function (player) { - return player != _status.currentPhase && player.countCards('hes') > 1; + xisheng:{ + enable:'chooseToUse', + usable:1, + viewAs:{name:'tao'}, + viewAsFilter:function(player){ + return player!=_status.currentPhase&&player.countCards('hes')>1; }, - selectCard: 2, - filterCard: true, - position: 'hes', + selectCard:2, + filterCard:true, + position:'hes', }, - shulv: { - inherit: 'zhiheng', - prompt: '弃置一张牌并摸一张牌', - selectCard: 1, - filter: function (event, player) { - return player.countCards('hs') > player.hp; + shulv:{ + inherit:'zhiheng', + prompt:'弃置一张牌并摸一张牌', + selectCard:1, + filter:function(event,player){ + return player.countCards('hs')>player.hp; }, }, - xiandeng: { - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + 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; + 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 () { + 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); + 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); + 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 () { + 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); + 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); + 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; + qingyi2:{ + audio:true, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; }, - content: function () { + content:function(){ "step 0" player.addSkill('qingyi3'); - var check = player.countCards('h') <= player.hp; + 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); + 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); + 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); + 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); + ai2:function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); }, - check: check + check:check }); "step 1" - if (result.bool) { - player.logSkill('qingyi2', result.targets); + if(result.bool){ + player.logSkill('qingyi2',result.targets); player.discard(result.cards[0]); - player.useCard({ name: 'sha', isCard: true }, result.targets[0]); + player.useCard({name:'sha',isCard:true},result.targets[0]); trigger.cancel(); } player.removeSkill('qingyi3'); } }, - qingyi3: { - mod: { - targetInRange: function (card, player, target, now) { + qingyi3:{ + mod:{ + targetInRange:function(card,player,target,now){ return true; } }, }, - qirang: { - audio: 2, - trigger: { player: 'equipEnd' }, - frequent: true, - content: function () { - var card = get.cardPile(function (card) { - return get.type(card, 'trick') == 'trick'; + qirang:{ + audio:2, + trigger:{player:'equipEnd'}, + frequent:true, + content:function(){ + var card=get.cardPile(function(card){ + return get.type(card,'trick')=='trick'; }); - if (card) { - var next = player.gain(card, 'gain2'); - if (get.type(card) == 'trick') next.gaintag.add('qirang'); - else { - player.addMark('qirang_mark', 1, false); - player.addTempSkill('qirang_mark', { player: 'phaseBegin' }); + if(card){ + var next=player.gain(card,'gain2'); + if(get.type(card)=='trick') next.gaintag.add('qirang'); + else{ + player.addMark('qirang_mark',1,false); + player.addTempSkill('qirang_mark',{player:'phaseBegin'}); } } }, - ai: { - effect: { - target: function (card, player, target, current) { - if (get.type(card) == 'equip' && !get.cardtag(card, 'gifts')) return [1, 3]; + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; } }, - threaten: 1.3 + threaten:1.3 }, - group: 'qirang_use', - subSkill: { - mark: { - charlotte: true, - onremove: function (player) { - var evt = _status.event; - if (evt.name != 'phase') evt = evt.getParent('phase'); - if (evt && evt.player == player) { - if (!evt.qirang_num) evt.qirang_num = 0; - evt.qirang_num += player.storage.qirang_mark; + group:'qirang_use', + subSkill:{ + mark:{ + charlotte:true, + onremove:function(player){ + var evt=_status.event; + if(evt.name!='phase') evt=evt.getParent('phase'); + if(evt&&evt.player==player){ + if(!evt.qirang_num) evt.qirang_num=0; + evt.qirang_num+=player.storage.qirang_mark; } delete player.storage.qirang_mark; }, - intro: { - content: '下回合发动〖羽化〗时卜算量+#', + intro:{ + content:'下回合发动〖羽化〗时卜算量+#', }, }, - use: { - audio: 'qirang', - trigger: { player: 'useCard2' }, - direct: true, - filter: function (event, player) { - if (get.type(event.card) != 'trick') return false; - if (!event.targets || event.targets.length != 1) return false; - var info = get.info(event.card); - if (info.allowMultiple == false) return false; - if (!player.hasHistory('lose', function (evt) { - if (evt.getParent() != event) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('qirang')) return true; + use:{ + audio:'qirang', + trigger:{player:'useCard2'}, + direct:true, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(!event.targets||event.targets.length!=1) return false; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(!player.hasHistory('lose',function(evt){ + if(evt.getParent()!=event) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('qirang')) return true; } return false; })) return false; - if (!info.multitarget) { - if (game.hasPlayer(function (current) { - return !event.targets.includes(current) && lib.filter.targetEnabled2(event.card, player, current) && lib.filter.targetInRange(event.card, player, current); - })) { + if(!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); + })){ return true; } } return false; }, - content: function () { + content:function(){ 'step 0' - var prompt2 = '为' + get.translation(trigger.card) + '增加一个目标' - player.chooseTarget(get.prompt('qirang'), function (card, player, target) { - var player = _status.event.player; - if (_status.event.targets.includes(target)) return false; - 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.includes(target) ? -1 : 1); - }).set('targets', trigger.targets).set('card', trigger.card); + var prompt2='为'+get.translation(trigger.card)+'增加一个目标' + player.chooseTarget(get.prompt('qirang'),function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.includes(target)) return false; + 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.includes(target)?-1:1); + }).set('targets',trigger.targets).set('card',trigger.card); 'step 1' - if (result.bool) { - if (!event.isMine() && !event.isOnline()) game.delayx(); - event.targets = result.targets; + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; } - else { + else{ event.finish(); } 'step 2' - if (event.targets) { - player.logSkill('qirang_use', event.targets); + if(event.targets){ + player.logSkill('qirang_use',event.targets); trigger.targets.addArray(event.targets); } }, }, }, }, - yuhua: { - trigger: { player: ['phaseZhunbeiBegin', 'phaseJieshuBegin'] }, - forced: true, - audio: 2, - content: function () { + yuhua:{ + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + forced:true, + audio:2, + content:function(){ "step 0" - var num = 1, evt = trigger.getParent(); - if (evt.qirang_num) num += evt.qirang_num; - var cards = get.cards(Math.min(5, num)); + var num=1,evt=trigger.getParent(); + if(evt.qirang_num) num+=evt.qirang_num; + var cards=get.cards(Math.min(5,num)); game.cardsGotoOrdering(cards); - var next = player.chooseToMove(); - next.set('list', [ - ['牌堆顶', cards], + var next=player.chooseToMove(); + next.set('list',[ + ['牌堆顶',cards], ['牌堆底'], ]); - next.set('prompt', '羽化:点击将牌移动到牌堆顶或牌堆底'); - next.processAI = function (list) { - var cards = list[0][1], player = _status.event.player; - var target = (_status.event.getTrigger().name == 'phaseZhunbei') ? player : player.next; - var att = get.sgn(get.attitude(player, target)); - var top = []; - var judges = target.getCards('j'); - var stopped = false; - if (player != target || !target.hasWuxie()) { - for (var i = 0; i < judges.length; i++) { - var judge = get.judge(judges[i]); - cards.sort(function (a, b) { - return (judge(b) - judge(a)) * att; + next.set('prompt','羽化:点击将牌移动到牌堆顶或牌堆底'); + next.processAI=function(list){ + var cards=list[0][1],player=_status.event.player; + var target=(_status.event.getTrigger().name=='phaseZhunbei')?player:player.next; + var att=get.sgn(get.attitude(player,target)); + var top=[]; + var judges=target.getCards('j'); + var stopped=false; + if(player!=target||!target.hasWuxie()){ + for(var i=0;i 0)) break; + while(cards.length){ + if((get.value(cards[0],player)<=5)==(att>0)) break; top.unshift(cards.shift()); } } - bottom = cards; - return [top, bottom]; + bottom=cards; + return [top,bottom]; } "step 1" - var top = result.moved[0]; - var bottom = result.moved[1]; + var top=result.moved[0]; + var bottom=result.moved[1]; top.reverse(); - for (var i = 0; i < top.length; i++) { - ui.cardPile.insertBefore(top[i], ui.cardPile.firstChild); + for(var i=0;i 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; + player.chooseTarget(get.prompt2('chenqing'),function(card,player,target){ + return target!=player&&target!=_status.event.getTrigger().player; + }).set('ai',function(target){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + if(get.attitude(player,trigger.player)>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 { + else{ return 0; // return get.attitude(player,target); } }); 'step 1' - if (result.bool) { - player.addTempSkill('chenqing2', 'roundStart'); - event.target = result.targets[0]; + if(result.bool){ + player.addTempSkill('chenqing2','roundStart'); + event.target=result.targets[0]; event.target.draw(4); - player.logSkill('chenqing', event.target); + player.logSkill('chenqing',event.target); } - else { + 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; i < ui.selected.cards.length; i++) { - if (get.suit(ui.selected.cards[i]) == suit) { - return -4 - get.value(card); + 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;i 0 && player.countCards('hs') > 0; + mozhi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.getHistory('useCard',function(evt){ + return evt.isPhaseUsing()&&['basic','trick'].includes(get.type(evt.card)); + }).length>0&&player.countCards('hs')>0; }, - content: function () { + content:function(){ "step 0" - event.count = 2; - event.history = player.getHistory('useCard', function (evt) { - return evt.isPhaseUsing() && ['basic', 'trick'].includes(get.type(evt.card)); + event.count=2; + event.history=player.getHistory('useCard',function(evt){ + return evt.isPhaseUsing()&&['basic','trick'].includes(get.type(evt.card)); }) "step 1" - event._result = {}; - if (event.count && event.history.length && player.countCards('hs')) { + event._result={}; + if(event.count&&event.history.length&&player.countCards('hs')){ 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) + 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.set('custom', { - add: {}, - replace: { window: function () { } } + next.logSkill='mozhi'; + next.set('openskilldialog','默识:将一张手牌当'+get.translation(card)+'使用'); + next.set('norestore',true); + next.set('_backupevent','mozhix'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} }); next.backup('mozhix'); } } } "step 2" - if (result && result.bool) event.goto(1); + if(result&&result.bool) event.goto(1); }, }, - mozhix: { - filterCard: function (card) { - return get.itemtype(card) == 'card'; + mozhix:{ + filterCard:function(card){ + return get.itemtype(card)=='card'; }, - selectCard: 1, - position: 'hs', - popname: true, + selectCard:1, + position:'hs', + popname:true, }, - chenqing2: { charlotte: true }, - ranshang: { - audio: 2, - trigger: { player: 'damageEnd' }, - filter: function (event, player) { + chenqing2:{charlotte:true}, + ranshang:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ return event.hasNature('fire'); }, - forced: true, - check: function () { + forced:true, + check:function(){ return false; }, - content: function () { - player.addMark('ranshang', trigger.num); + content:function(){ + player.addMark('ranshang',trigger.num); }, - intro: { - name2: '燃', - content: 'mark' + intro:{ + name2:'燃', + content:'mark' }, - ai: { - effect: { - target: function (card, player, target, current) { - if (card.name == 'sha') { - if (game.hasNature(card, 'fire') || player.hasSkill('zhuque_skill')) return 2; + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(game.hasNature(card,'fire')||player.hasSkill('zhuque_skill')) return 2; } - if (get.tag(card, 'fireDamage') && current < 0) return 2; + if(get.tag(card,'fireDamage')&¤t<0) return 2; } } }, - group: 'ranshang2' + group:'ranshang2' }, - ranshang2: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - filter: function (event, player) { - return player.countMark('ranshang') > 0; + ranshang2:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.countMark('ranshang')>0; }, - content: function () { + content:function(){ player.loseHp(player.countMark('ranshang')); - if (player.countMark('ranshang') > 2) { + if(player.countMark('ranshang')>2){ player.loseMaxHp(2); player.draw(2); } } }, - hanyong: { - trigger: { player: 'useCard' }, - filter: function (event, player) { - return event.card && (event.card.name == 'nanman' || event.card.name == 'wanjian' || (event.card.name == 'sha' && !game.hasNature(event.card) && get.suit(event.card) == 'spade')) && player.isDamaged(); + hanyong:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'||(event.card.name=='sha'&&!game.hasNature(event.card)&&get.suit(event.card)=='spade'))&&player.isDamaged(); }, - content: function () { + content:function(){ trigger.baseDamage++; - if (game.roundNumber <= player.hp) player.addMark('ranshang', 1); + if(game.roundNumber<=player.hp) player.addMark('ranshang',1); }, }, - hanyong3: { - audio: false, - trigger: { source: 'damageBegin1' }, - forced: true, - onremove: true, - filter: function (event, player) { - return event.card == player.storage.hanyong3; + hanyong3:{ + audio:false, + trigger:{source:'damageBegin1'}, + forced:true, + onremove:true, + filter:function(event,player){ + return event.card==player.storage.hanyong3; }, - content: function () { + content:function(){ trigger.num++; } }, - yishe: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { + yishe:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ return !player.getExpansions('yishe').length; }, - intro: { - content: 'expansion', - markcount: 'expansion', + intro:{ + content:'expansion', + markcount:'expansion', }, - content: function () { + content:function(){ 'step 0' player.draw(2); 'step 1' - var cards = player.getCards('he'); - if (!cards.length) event.finish(); - else if (cards.length <= 2) event._result = { bool: true, cards: cards }; - else player.chooseCard(2, 'he', true, '选择两张牌作为“米”'); + var cards=player.getCards('he'); + if(!cards.length) event.finish(); + else if(cards.length<=2) event._result={bool:true,cards:cards}; + else player.chooseCard(2,'he',true,'选择两张牌作为“米”'); 'step 2' - if (result.bool) player.addToExpansion(result.cards, player, 'give').gaintag.add('yishe'); + if(result.bool) player.addToExpansion(result.cards,player,'give').gaintag.add('yishe'); }, - group: 'yishe_recover', - ai: { combo: 'bushi' }, - subSkill: { - recover: { - audio: 'yishe', - trigger: { - player: ['loseAfter'], - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + group:'yishe_recover', + ai:{combo:'bushi'}, + subSkill:{ + recover:{ + audio:'yishe', + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - if (player.isHealthy()) return false; - var evt = event.getl(player); - if (!evt || !evt.xs || !evt.xs.length || player.getExpansions('yishe').length > 0) return false; - if (event.name == 'lose') { - for (var i in event.gaintag_map) { - if (event.gaintag_map[i].includes('yishe')) return true; + filter:function(event,player){ + if(player.isHealthy()) return false; + var evt=event.getl(player); + if(!evt||!evt.xs||!evt.xs.length||player.getExpansions('yishe').length>0) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].includes('yishe')) return true; } return false; } - return player.hasHistory('lose', function (evt) { - if (event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('yishe')) return true; + return player.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('yishe')) return true; } return false; }); }, - forced: true, - content: function () { + forced:true, + content:function(){ player.recover(); }, }, }, }, - bushi: { - audio: 2, - trigger: { player: 'damageEnd', source: 'damageEnd' }, - filter: function (event, player) { - if (event._notrigger.includes(event.player)) return false; - return event.player.isIn() && player.getExpansions('yishe').length > 0; + bushi:{ + audio:2, + trigger:{player:'damageEnd',source:'damageEnd'}, + filter:function(event,player){ + if(event._notrigger.includes(event.player)) return false; + return event.player.isIn()&&player.getExpansions('yishe').length>0; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - event.count = trigger.num; + event.count=trigger.num; 'step 1' - trigger.player.chooseCardButton('选择获得一张“米”', player.getExpansions('yishe')); + trigger.player.chooseCardButton('选择获得一张“米”',player.getExpansions('yishe')); 'step 2' - if (result.bool) { + if(result.bool){ event.count--; - player.logSkill('bushi', trigger.player); - trigger.player.gain(result.links[0], 'give', player, 'bySelf'); + player.logSkill('bushi',trigger.player); + trigger.player.gain(result.links[0],'give',player,'bySelf'); } else event.finish(); 'step 3' - if (event.count > 0 && player.getExpansions('yishe').length && player.hasSkill('bushi')) { + if(event.count>0&&player.getExpansions('yishe').length&&player.hasSkill('bushi')){ event.goto(1); } }, - ai: { combo: 'yishe' }, + ai:{combo:'yishe'}, }, - midao: { - audio: 2, - trigger: { global: 'judge' }, - direct: true, - filter: function (event, player) { - return player.getExpansions('yishe').length && event.player.isIn(); + midao:{ + audio:2, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.getExpansions('yishe').length&&event.player.isIn(); }, - content: function () { + content:function(){ "step 0" - var list = player.getExpansions('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; - }); + var list=player.getExpansions('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; + 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; } - else { + else{ event.finish(); } "step 2" - if (result.bool) { - if (trigger.player.judging[0].clone) { + if(result.bool){ + if(trigger.player.judging[0].clone){ trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function (card) { - if (card.clone) { + 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])); + },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.player.judging[0]=result.cards[0]; trigger.orderingCards.addArray(result.cards); - game.log(trigger.player, '的判定牌改为', card); + game.log(trigger.player,'的判定牌改为',card); game.delay(2); } }, - ai: { - combo: 'yishe', - rejudge: true, - tag: { - rejudge: 0.6 + ai:{ + combo:'yishe', + rejudge:true, + tag:{ + rejudge:0.6 } } }, - fengpo: { - shaRelated: true, - audio: 2, - trigger: { - player: 'useCardToPlayered', + fengpo:{ + shaRelated:true, + audio:2, + trigger:{ + player:'useCardToPlayered', }, - filter: function (event, player) { - if (event.targets.length != 1 || !['sha', 'juedou'].includes(event.card.name)) return false; - var evtx = event.getParent(); - return !player.hasHistory('useCard', function (evt) { - return evt != evtx && evt.card.name == event.card.name; - }, evtx) + filter:function(event,player){ + if(event.targets.length!=1||!['sha','juedou'].includes(event.card.name)) return false; + var evtx=event.getParent(); + return !player.hasHistory('useCard',function(evt){ + return evt!=evtx&&evt.card.name==event.card.name; + },evtx) }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var str1 = get.translation(trigger.card), str2 = get.translation(trigger.target); - player.chooseControl('摸X加1伤', '摸1加X伤', 'cancel2').set('prompt', get.prompt('fengpo', trigger.target)).set('prompt2', '你可以选择一项:1.摸X张牌,令' + str1 + '的伤害+1;2.摸一张牌,令' + str1 + '的伤害+X(X为' + str2 + '的♦牌的数量)。'); + var str1=get.translation(trigger.card),str2=get.translation(trigger.target); + player.chooseControl('摸X加1伤','摸1加X伤','cancel2').set('prompt',get.prompt('fengpo',trigger.target)).set('prompt2','你可以选择一项:1.摸X张牌,令'+str1+'的伤害+1;2.摸一张牌,令'+str1+'的伤害+X(X为'+str2+'的♦牌的数量)。'); 'step 1' - if (result.control && result.control != 'cancel2') { - player.logSkill('fengpo', trigger.target); - var nd = trigger.target.countCards('he', { suit: 'diamond' }); - var draw = 1, damage = 1; - if (result.control == '摸X加1伤') draw = nd; - else damage = nd; + if(result.control&&result.control!='cancel2'){ + player.logSkill('fengpo',trigger.target); + var nd=trigger.target.countCards('he',{suit:'diamond'}); + var draw=1,damage=1; + if(result.control=='摸X加1伤') draw=nd; + else damage=nd; player.draw(draw); - var trigger2 = trigger.getParent(); - if (typeof trigger2.baseDamage != 'number') { - trigger2.baseDamage = 1; + var trigger2=trigger.getParent(); + if(typeof trigger2.baseDamage!='number'){ + trigger2.baseDamage=1; } - trigger2.baseDamage += damage; + trigger2.baseDamage+=damage; } } }, - fengpo2: { - trigger: { source: 'damageBegin1' }, - filter: function (event) { - return event.card && (event.card.name == 'sha' || event.card.name == 'juedou') && event.notLink(); + 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; + forced:true, + audio:false, + content:function(){ + if(typeof player.storage.fengpo=='number'){ + trigger.num+=player.storage.fengpo; } } }, - fengpo3: { charlotte: true }, + fengpo3:{charlotte:true}, //士燮 biluan: { audio: 2, @@ -21373,936 +21374,936 @@ game.import('character', function (lib, game, ui, get, ai, _status) { game.addVideo('storage', player, ['rebiluan2', player.storage.rebiluan]); }, }, - rebiluan2: { - mark: true, - charlotte: true, - intro: { - content: function (storage) { - if (storage > 0) { - return '其他角色计算与你的距离时+' + storage; + rebiluan2:{ + mark:true, + charlotte:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '其他角色计算与你的距离时+'+storage; } - else if (storage < 0) { - return '其他角色计算与你的距离时' + storage; + else if(storage<0){ + return '其他角色计算与你的距离时'+storage; } - else { + else{ return '无距离变化'; } } }, - init: function (player) { - if (typeof player.storage.rebiluan2 != 'number') player.storage.rebiluan2 = 0; + 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; + 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; i < game.players.length; i++) { - if (game.players[i] != player) { - var dist = get.distance(game.players[i], player, 'attack'); - if (dist <= 1 && dist + ng > 1) { + 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; + return nai>=2; }, - filter: function (event, player) { - return player.countCards('he') && game.hasPlayer(function (current) { - return current != player && get.distance(current, player) <= 1; + filter:function(event,player){ + return player.countCards('he')&&game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; }); }, - direct: true, - content: function () { + 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); + 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) { + if(result.bool){ player.addSkill('rebiluan2'); - var ng = Math.min(4, game.countPlayer()); - player.$damagepop(ng, 'unknownx'); - player.storage.rebiluan2 += ng; + 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]); + game.addVideo('storage',player,['rebiluan2',player.storage.rebiluan2]); } }, }, - relixia: { - audio: 'lixia', - trigger: { global: 'phaseJieshuBegin' }, - filter: function (event, player) { - return event.player.isIn() && event.player != player && !player.inRangeOf(event.player); + relixia:{ + audio:'lixia', + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player.isIn()&&event.player!=player&&!player.inRangeOf(event.player); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - if (trigger.player.isDead()) { - event._result = { bool: true, links: [0] }; + if(trigger.player.isDead()){ + event._result={bool:true,links:[0]}; return; } - var list = [ + var list=[ '令自己摸一张牌', '令XXX摸两张牌', '令XXX回复1点体力', ]; - var card = get.translation(trigger.player); - var next = player.chooseButton([ + var card=get.translation(trigger.player); + var next=player.chooseButton([ '【礼下】:请选择一至两项', - [list.map((item, index) => { - return [index, item.replace(/XXX/g, card)] - }), 'textbutton'] - ], true, [1, 2]); - next.set('dialog', event.videoId); - next.set('filterButton', function (button) { - if (button.link == 2) { + [list.map((item,index)=>{ + return [index,item.replace(/XXX/g,card)] + }),'textbutton'] + ],true,[1,2]); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + if(button.link==2){ return _status.event.bool1; } return true; }); - next.set('bool1', trigger.player.isDamaged()); - next.set('ai', function (button) { - var player = _status.event.player; - var event = _status.event.getTrigger(); - if (button.link && get.attitude(player, event.player) <= 0) return 0; - return button.link * Math.random(); + next.set('bool1',trigger.player.isDamaged()); + next.set('ai',function(button){ + var player=_status.event.player; + var event=_status.event.getTrigger(); + if(button.link&&get.attitude(player,event.player)<=0) return 0; + return button.link*Math.random(); }); "step 1" - var map = [ - function (trigger, player, event) { + var map=[ + function(trigger,player,event){ player.draw(); }, - function (trigger, player, event) { - if (!result.links.includes(2)) player.line(trigger.player); + function(trigger,player,event){ + if(!result.links.includes(2)) player.line(trigger.player); trigger.player.draw(2); }, - function (trigger, player, event) { + function(trigger,player,event){ player.line(trigger.player); trigger.player.recover(); } ]; result.links.sort(); - for (var i = 0; i < result.links.length; i++) { - game.log(player, '选择了', '#g【礼下】', '的', '#y选项' + get.cnNumber(result.links[i] + 1, true)); - map[result.links[i]](trigger, player, event); + for(var i=0;i 3; + return num>3; }, - prompt: function (event, player) { - var num = game.countPlayer(function (current) { - if (player.hasZhuSkill('guiming') && current.group == 'wu' && current != player) return true; + 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) + '张牌?'; + return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; }, - filter: function (event, player) { + filter:function(event,player){ return !event.numFixed; }, - content: function () { + content:function(){ trigger.changeToZero(); - var num = game.countPlayer(function (current) { - if (player.hasZhuSkill('guiming') && current.group == 'wu' && current != player) return true; + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; return current.isDamaged(); }); - if (num > 0) { + 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'; + 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'); + autodelay:true, + content:function(){ + player.chooseToDiscard(true,'he'); } }, - chouhai: { - audio: 2, - trigger: { player: 'damageBegin3' }, - forced: true, - check: function () { + chouhai:{ + audio:2, + trigger:{player:'damageBegin3'}, + forced:true, + check:function(){ return false; }, - filter: function (event, player) { - return player.countCards('h') == 0; + filter:function(event,player){ + return player.countCards('h')==0; }, - content: function () { + content:function(){ trigger.num++; }, - ai: { - effect: { - target: function (card, player, target, current) { - if (get.tag(card, 'damage') && target.countCards('h') == 0) return [1, -2]; + 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.includes('phaseUse') || !player.countCards('h', function (card) { - return get.type(card, 'trick') == 'trick' && player.hasUseTarget(card); + recanshi:{ + audio:'canshi', + trigger:{player:'phaseDrawBegin2'}, + check:function(event,player){ + if(player.skipList.includes('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') && current.group == 'wu') return true; + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; return current.isDamaged(); }); - return num > 1; + return num>1; }, - prompt: function (event, player) { - var num = game.countPlayer(function (current) { - if (player.hasZhuSkill('guiming') && current.group == 'wu' && current != player) return true; + 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) + '张牌?'; + return '残蚀:是否多摸'+get.cnNumber(num)+'张牌?'; }, - filter: function (event, player) { - return !event.numFixed && game.hasPlayer(function (current) { - if (player.hasZhuSkill('guiming') && current.group == 'wu' && current != player) return true; + 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') && current.group == 'wu' && current != player) return true; + 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; + 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; - return get.type(event.card) == 'trick'; + recanshi2:{ + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + if(event.card.name=='sha') return true; + return get.type(event.card)=='trick'; }, - autodelay: true, - content: function () { - player.chooseToDiscard(true, 'he'); + autodelay:true, + content:function(){ + player.chooseToDiscard(true,'he'); } }, - rechouhai: { - audio: 'chouhai', - trigger: { player: 'damageBegin3' }, - forced: true, - check: function () { + 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; + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.countCards('h')==0; }, - content: function () { + content:function(){ trigger.num++; }, - ai: { - effect: { - target: function (card, player, target, current) { - if (card.name == 'sha' && target.countCards('h') == 0) return [1, -2]; + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&target.countCards('h')==0) return [1,-2]; } } } }, - kunfen: { - audio: 2, - audioname: ['ol_sb_jiangwei'], - trigger: { player: 'phaseJieshuBegin' }, - locked: function (skill, player) { - if (!player || !player.storage.kunfen) return true; + kunfen:{ + audio:2, + audioname:['ol_sb_jiangwei'], + trigger:{player:'phaseJieshuBegin'}, + locked:function(skill,player){ + if(!player||!player.storage.kunfen) return true; return false; }, - direct: true, - content: function () { + direct:true, + content:function(){ "step 0" - if (player.storage.kunfen || - (get.mode() == 'guozhan' && player.hiddenSkills.includes('kunfen'))) { - if (!player.storage.kunfen) { - event.skillHidden = true; + if(player.storage.kunfen|| + (get.mode()=='guozhan'&&player.hiddenSkills.includes('kunfen'))){ + if(!player.storage.kunfen){ + event.skillHidden=true; } - player.chooseBool(get.prompt('kunfen'), '结束阶段开始时,你可以失去1点体力,然后摸两张牌。').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; + player.chooseBool(get.prompt('kunfen'),'结束阶段开始时,你可以失去1点体力,然后摸两张牌。').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; + else{ + event.forced=true; } "step 1" - if (event.forced || result.bool) { + if(event.forced||result.bool){ player.logSkill('kunfen'); player.loseHp(); } - else { + else{ event.finish(); } "step 2" player.draw(2); }, - ai: { - threaten: 1.5 + ai:{ + threaten:1.5 } }, - fengliang: { - skillAnimation: true, - animationColor: 'thunder', - unique: true, - juexingji: true, - audio: 2, - derivation: 'oltiaoxin', - trigger: { player: 'dying' }, + fengliang:{ + skillAnimation:true, + animationColor:'thunder', + unique:true, + juexingji:true, + audio:2, + derivation:'oltiaoxin', + trigger:{player:'dying'}, //priority:10, - forced: true, - filter: function (event, player) { + forced:true, + filter:function(event,player){ return !player.storage.kunfen; }, - content: function () { + content:function(){ "step 0" player.awakenSkill('fengliang'); player.loseMaxHp(); "step 1" - if (player.hp < 2) { - player.recover(2 - player.hp); + if(player.hp<2){ + player.recover(2-player.hp); } "step 2" player.addSkills('oltiaoxin'); }, }, - zhuiji: { - mod: { - globalFrom: function (from, to) { - if (from.hp >= to.hp) return -Infinity; + 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; + oldcihuai:{ + audio:'cihuai', + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countCards('h')>0; }, - check: function (event, player) { - return !player.countCards('h', 'sha'); + check:function(event,player){ + return !player.countCards('h','sha'); }, - content: function () { + content:function(){ player.showHandcards(); - if (!player.countCards('h', 'sha')) player.addTempSkill('oldcihuai2'); + 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, + 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: ['loseAfter'], - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter', 'die'], + oldcihuai3:{ + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','die'], }, - silent: true, - firstDo: true, - filter: function (event, player) { - if (event.name == 'die') return true; - var evt = event.getl(player); - return evt && evt.hs && evt.hs.length > 0; + silent:true, + firstDo:true, + filter:function(event,player){ + if(event.name=='die') return true; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length>0; }, - content: function () { + content:function(){ player.removeSkill('oldcihuai2'); }, }, - cihuai: { - trigger: { player: 'phaseUseBegin' }, - direct: true, - filter: function (event, player) { - return player.countCards('h', 'sha') == 0; + cihuai:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h','sha')==0; }, - content: function () { + 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); + 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) { + if(result.bool){ player.logSkill('cihuai'); player.showHandcards(); - player.useCard({ name: 'sha', isCard: true }, result.targets); + player.useCard({name:'sha',isCard:true},result.targets); } }, - ai: { - expose: 0.2, + ai:{ + expose:0.2, } }, - jilei: { - trigger: { player: 'damageEnd' }, - audio: 2, - direct: true, - filter: function (event) { - return event.source && event.source.isIn(); + jilei:{ + trigger:{player:'damageEnd'}, + audio:2, + direct:true, + filter:function(event){ + return event.source&&event.source.isIn(); }, - content: function () { + 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'; - var list = ['basic', 'trick', 'equip'].filter(function (name) { - return (!source.storage.jilei2 || !source.storage.jilei2.includes(name)); + player.chooseControl('basic','trick','equip','cancel2',function(){ + var source=_status.event.source; + if(get.attitude(_status.event.player,source)>0) return 'cancel2'; + var list=['basic','trick','equip'].filter(function(name){ + return (!source.storage.jilei2||!source.storage.jilei2.includes(name)); }); - if (!list.length) return 'cancel2'; - if (list.includes('trick') && source.countCards('h', function (card) { - return get.type(card, source) == 'trick' && source.hasValueTarget(card); - }) > 1) return 'trick'; + if(!list.length) return 'cancel2'; + if(list.includes('trick')&&source.countCards('h',function(card){ + return get.type(card,source)=='trick'&&source.hasValueTarget(card); + })>1) return 'trick'; return list[0]; - }).set('prompt', get.prompt2('jilei', trigger.source)).set('source', trigger.source); + }).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' }); + 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 + ai:{ + maixie_defend:true, + threaten:0.7 } }, - jilei2: { - unique: true, - charlotte: true, - intro: { - content: function (storage) { - return '不能使用、打出或弃置' + get.translation(storage) + '牌'; + jilei2:{ + unique:true, + charlotte:true, + intro:{ + content:function(storage){ + return '不能使用、打出或弃置'+get.translation(storage)+'牌'; } }, - init: function (player, skill) { - if (!player.storage[skill]) player.storage[skill] = []; + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; }, - mark: true, - onremove: true, - mod: { - cardDiscardable: function (card, player) { - if (player.storage.jilei2.includes(get.type(card, 'trick'))) return false; + mark:true, + onremove:true, + mod:{ + cardDiscardable:function(card,player){ + if(player.storage.jilei2.includes(get.type(card,'trick'))) return false; }, - cardEnabled: function (card, player) { - if (player.storage.jilei2.includes(get.type(card, 'trick'))) { - var hs = player.getCards('h'), cards = [card]; - if (Array.isArray(card.cards)) cards.addArray(card.cards); - for (var i of cards) { - if (hs.includes(i)) return false; + cardEnabled:function(card,player){ + if(player.storage.jilei2.includes(get.type(card,'trick'))){ + var hs=player.getCards('h'),cards=[card]; + if(Array.isArray(card.cards)) cards.addArray(card.cards); + for(var i of cards){ + if(hs.includes(i)) return false; } } }, - cardRespondable: function (card, player) { - if (player.storage.jilei2.includes(get.type(card, 'trick'))) { - var hs = player.getCards('h'), cards = [card]; - if (Array.isArray(card.cards)) cards.addArray(card.cards); - for (var i of cards) { - if (hs.includes(i)) return false; + cardRespondable:function(card,player){ + if(player.storage.jilei2.includes(get.type(card,'trick'))){ + var hs=player.getCards('h'),cards=[card]; + if(Array.isArray(card.cards)) cards.addArray(card.cards); + for(var i of cards){ + if(hs.includes(i)) return false; } } }, - cardSavable: function (card, player) { - if (player.storage.jilei2.includes(get.type(card, 'trick'))) { - var hs = player.getCards('h'), cards = [card]; - if (Array.isArray(card.cards)) cards.addArray(card.cards); - for (var i of cards) { - if (hs.includes(i)) return false; + cardSavable:function(card,player){ + if(player.storage.jilei2.includes(get.type(card,'trick'))){ + var hs=player.getCards('h'),cards=[card]; + if(Array.isArray(card.cards)) cards.addArray(card.cards); + for(var i of cards){ + if(hs.includes(i)) 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; + 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.includes(player) || get.tag(event.card, 'multineg') || get.effect(player, event.card, event.player, player) <= 0; + check:function(event,player){ + return event.getParent().excluded.includes(player)||get.tag(event.card,'multineg')||get.effect(player,event.card,event.player,player)<=0; }, - trigger: { target: 'useCardToTargeted' }, - content: function () { + 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]; + 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); + taichen:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canUse('sha',target); }, - content: function () { + content:function(){ "step 0" player.loseHp(); "step 1" - player.useCard({ name: 'sha', isCard: true }, target, false); + 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); + 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; } } } }, - naman: { - audio: 2, - trigger: { global: 'respondAfter' }, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - if (event.player == player) return false; - if (event.cards) { - for (var i = 0; i < event.cards.length; i++) { - if (get.position(event.cards[i], true) == 'o') return true; + naman:{ + audio:2, + trigger:{global:'respondAfter'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(event.player==player) return false; + if(event.cards){ + for(var i=0;i 0; + xiemu:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h','sha')>0; }, - filterCard: { name: 'sha' }, - check: function (card) { return 6 - get.value(card) }, - content: function () { + filterCard:{name:'sha'}, + check:function(card){return 6-get.value(card)}, + content:function(){ 'step 0' - var list = lib.group.filter(function (group) { - return ['wei', 'shu', 'wu', 'qun'].includes(group) || game.hasPlayer(function (current) { - return current.group == group; + var list=lib.group.filter(function(group){ + return ['wei','shu','wu','qun'].includes(group)||game.hasPlayer(function(current){ + return current.group==group; }) }); - 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); + 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', '请选择一个势力').set('ai', function () { return _status.event.group }).set('group', list2[0]); + player.chooseControl(list).set('prompt','请选择一个势力').set('ai',function(){return _status.event.group}).set('group',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.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 }, + ai:{ + order:1, + result:{player:1}, }, - count: function (group) { - var player = _status.event.player; - return game.countPlayer(function (current) { - return current != player && current.group == group && get.attitude(current, player) < 0; + 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) + '势力'; + xiemu2:{ + onremove:true, + mark:true, + forced:true, + audio:'xiemu', + intro:{ + content:function(storage){ + return '已指定'+get.translation(storage)+'势力'; }, }, - trigger: { - target: 'useCardToTargeted' + trigger:{ + target:'useCardToTargeted' }, - init: function (player) { - if (!player.storage.xiemu2) player.storage.xiemu2 = []; + 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.includes(event.player.group)) return false; + 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.includes(event.player.group)) return false; return true; }, - content: function () { + 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; + 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 () { + direct:true, + content:function(){ "step 0" - var next = player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?', { name: 'sha' }); - next.set('ai', function (card) { - return 9 - get.value(card); + var next=player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}); + next.set('ai',function(card){ + return 9-get.value(card); }); - next.logSkill = 'xiemu'; + next.logSkill='xiemu'; "step 1" - if (result.bool) { + 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]; + 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; + spmengjin:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + return event.target.countCards('he')>0; }, - direct: true, - content: function () { + 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; + 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) { + if(result.bool){ trigger.target.discard(result.links); - player.logSkill('spmengjin', trigger.target); - trigger.target.addTempSkill('mengjin2', 'shaAfter'); + player.logSkill('spmengjin',trigger.target); + trigger.target.addTempSkill('mengjin2','shaAfter'); } }, - ai: { - expose: 0.2 + ai:{ + expose:0.2 } }, - fenxun_old: { - audio: 2, - trigger: { player: 'shaBefore' }, - direct: true, - filter: function (event, player) { - return event.targets.length == 1; + fenxun_old:{ + audio:2, + trigger:{player:'shaBefore'}, + direct:true, + filter:function(event,player){ + return event.targets.length==1; }, - position: 'he', - content: function () { + 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]; + 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); + 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); + 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') + prompt:get.prompt2('fenxun') }); "step 1" - if (result.bool) { + if(result.bool){ player.discard(result.cards); trigger.targets.push(result.targets[0]); - player.logSkill('fenxun', result.targets); + player.logSkill('fenxun',result.targets); } } }, - rezhoufu: { - audio: 'zhoufu', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('he') > 0; + 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.getExpansions('rezhoufu2').length; + filterCard:true, + filterTarget:function(card,player,target){ + return target!=player&&!target.getExpansions('rezhoufu2').length; }, - check: function (card) { - return 6 - get.value(card) + check:function(card){ + return 6-get.value(card) }, - position: 'he', - discard: false, - lose: false, - delay: false, - content: function () { - if (!target.storage.rezhoufu2_markcount) target.storage.rezhoufu2_markcount = 0; - target.addToExpansion(cards, player, 'give').gaintag.add('rezhoufu2'); + position:'he', + discard:false, + lose:false, + delay:false, + content:function(){ + if(!target.storage.rezhoufu2_markcount) target.storage.rezhoufu2_markcount=0; + target.addToExpansion(cards,player,'give').gaintag.add('rezhoufu2'); target.addSkill('rezhoufu_judge'); }, - ai: { - order: 1, - result: { - target: -1, + ai:{ + order:1, + result:{ + target:-1, }, }, - group: ['rezhoufu_losehp'], - subSkill: { - judge: { - audio: 'zhoufu', - trigger: { player: 'judgeBefore' }, - forced: true, - charlotte: true, - filter: function (event, player) { - return !event.directresult && player.getExpansions('rezhoufu2').length; + group:['rezhoufu_losehp'], + subSkill:{ + judge:{ + audio:'zhoufu', + trigger:{player:'judgeBefore'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return !event.directresult&&player.getExpansions('rezhoufu2').length; }, - content: function () { - var cards = [player.getExpansions('rezhoufu2')[0]]; - trigger.directresult = cards[0]; + content:function(){ + var cards=[player.getExpansions('rezhoufu2')[0]]; + trigger.directresult=cards[0]; }, }, - losehp: { - audio: 'zhoufu', - trigger: { global: 'phaseEnd' }, - forced: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.hasHistory('lose', function (evt) { - if (!evt || !evt.xs || !evt.xs.length) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('rezhoufu2')) return true; + losehp:{ + audio:'zhoufu', + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.hasHistory('lose',function(evt){ + if(!evt||!evt.xs||!evt.xs.length) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('rezhoufu2')) return true; } return false; }); }); }, - logTarget: function (current) { - return game.filterPlayer(function (current) { - return current.hasHistory('lose', function (evt) { - if (!evt || !evt.xs || !evt.xs.length) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('rezhoufu2')) return true; + logTarget:function(current){ + return game.filterPlayer(function(current){ + return current.hasHistory('lose',function(evt){ + if(!evt||!evt.xs||!evt.xs.length) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('rezhoufu2')) return true; } return false; }); }).sortBySeat(); }, - content: function () { - var targets = game.filterPlayer(function (current) { - return current.hasHistory('lose', function (evt) { - if (!evt || !evt.xs || !evt.xs.length) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('rezhoufu2')) return true; + content:function(){ + var targets=game.filterPlayer(function(current){ + return current.hasHistory('lose',function(evt){ + if(!evt||!evt.xs||!evt.xs.length) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('rezhoufu2')) return true; } return false; }); }).sortBySeat(); - while (targets.length) { + while(targets.length){ targets.shift().loseHp(); } }, }, }, }, - rezhoufu2: { - intro: { - content: 'expansion', + rezhoufu2:{ + intro:{ + content:'expansion', }, }, - rezhoufu3: {}, - reyingbing: { - audio: 'yingbin', - trigger: { global: 'useCard' }, - forced: true, - filter: function (event, player) { - var cards = event.player.getExpansions('rezhoufu2'); - return cards.length && get.color(cards[0]) == get.color(event.card); + rezhoufu3:{}, + reyingbing:{ + audio:'yingbin', + trigger:{global:'useCard'}, + forced:true, + filter:function(event,player){ + var cards=event.player.getExpansions('rezhoufu2'); + return cards.length&&get.color(cards[0])==get.color(event.card); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' player.draw(); 'step 1' trigger.player.storage.rezhoufu2_markcount++; - if (trigger.player.storage.rezhoufu2_markcount >= 2) { + if(trigger.player.storage.rezhoufu2_markcount>=2){ delete trigger.player.storage.rezhoufu2_markcount; - var cards = trigger.player.getExpansions('rezhoufu2'); - player.gain(cards, trigger.player, 'give', 'bySelf'); + var cards=trigger.player.getExpansions('rezhoufu2'); + player.gain(cards,trigger.player,'give','bySelf'); } else trigger.player.markSkill('rezhoufu2'); }, }, - zhoufu: { - audio: 2, + zhoufu:{ + audio:2, }, - yingbin: { - audio: 2, + yingbin:{ + audio:2, }, - kuiwei: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - check: function (event, player) { - if (player.isTurnedOver()) return true; - var num = game.countPlayer(function (current) { + 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; + return num>1; }, - content: function () { + content:function(){ "step 0" player.turnOver(); "step 1" - var num = game.countPlayer(function (current) { + var num=game.countPlayer(function(current){ return current.getEquips(1).length; }); - player.draw(2 + num); + player.draw(2+num); player.addSkill('kuiwei2'); }, - ai: { - effect: { - target: function (card) { - if (card.name == 'guiyoujie') return [0, 2]; + 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) { + kuiwei2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + audio:false, + content:function(){ + var num=game.countPlayer(function(current){ return current.getEquips(1).length; }); - if (num >= player.countCards('he')) { + if(num>=player.countCards('he')){ player.discard(player.getCards('he')); } - else if (num) { - player.chooseToDiscard('he', num, true); + else if(num){ + player.chooseToDiscard('he',num,true); } player.removeSkill('kuiwei2'); } }, - yanzheng: { - enable: 'chooseToUse', - audio: 2, - filter: function (event, player) { - return player.hp < player.countCards('h') && player.countCards('e') > 0; + yanzheng:{ + enable:'chooseToUse', + audio:2, + filter:function(event,player){ + return player.hp0; }, - viewAsFilter: function (player) { - return player.hp < player.countCards('h') && player.countCards('e') > 0; + 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 + 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.includes(player) && player != event.player && event.card.name == 'sha' && player.hp < player.countCards('h'); + tongji:{ + global:'tongji_disable', + audio:2, + trigger:{global:"useCard1"}, + forced:true, + filter:function (event,player){ + return event.targets.includes(player)&&player!=event.player&&event.card.name=='sha'&&player.hp= 0; + check:function(event,player){ + return get.attitude(player,event.target)>=0; }, - logTarget: 'target', - content: function () { + logTarget:'target', + 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; + 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 { + else{ event.finish(); } "step 1" - player.give(result.cards, trigger.target, 'give'); + player.give(result.cards,trigger.target,'give'); game.delay(); - event.card = result.cards[0]; + event.card=result.cards[0]; "step 2" - if (trigger.target.getCards('h').includes(card) && get.type(card) == 'equip') { + if(trigger.target.getCards('h').includes(card)&&get.type(card)=='equip'){ trigger.target.chooseUseTarget(card); } }, - ai: { - threaten: 1.1 + ai:{ + threaten:1.1 } }, - liangzhu: { - audio: 2, - trigger: { global: 'recoverAfter' }, - direct: true, - filter: function (event, player) { + liangzhu:{ + audio:2, + trigger:{global:'recoverAfter'}, + direct:true, + filter:function(event,player){ return event.player.isPhaseUsing(); }, - content: function () { + content:function(){ 'step 0' - if (player == trigger.player) { - player.chooseControl('摸一张', '摸两张', 'cancel2', function () { + if(player==trigger.player){ + player.chooseControl('摸一张','摸两张','cancel2',function(){ return '摸两张'; - }).set('prompt', get.prompt2('liangzhu')); - event.single = true; + }).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; + 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 == '摸一张') { + if(event.single){ + if(result.control!='cancel2'){ + player.logSkill('liangzhu',player); + if(result.control=='摸一张'){ player.draw(); } - else { + else{ player.draw(2); - if (!player.storage.liangzhu) player.storage.liangzhu = []; + 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) { + else if(result.bool){ + var target=result.targets[0]; + player.logSkill('liangzhu',target); + if(target==player){ target.draw(); } - else { + else{ target.draw(2); - if (target.storage.liangzhu) { + if(target.storage.liangzhu){ target.storage.liangzhu.add(player); } - else { - target.storage.liangzhu = [player]; + else{ + target.storage.liangzhu=[player]; } } } }, - ai: { - expose: 0.1 + 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 && current.storage.liangzhu.includes(player) && current.isDamaged(); + 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.includes(player)&¤t.isDamaged(); }); }, - forced: true, - content: function () { + forced:true, + content:function(){ player.awakenSkill('fanxiang'); player.gainMaxHp(); player.recover(); - player.changeSkills(['xiaoji'], ['liangzhu']); + player.changeSkills(['xiaoji'],['liangzhu']); }, }, - mingshi: { - audio: 2, - trigger: { player: 'damageBegin3' }, - direct: true, - filter: function (event, player) { - return event.source && event.source.hp > player.hp; + mingshi:{ + audio:2, + trigger:{player:'damageBegin3'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source.hp>player.hp; }, - content: function () { + content:function(){ "step 0" - var next = player.chooseToDiscard(get.prompt2('mingshi'), { color: 'black' }); - next.set('ai', function (card) { - return 9 - get.value(card); + var next=player.chooseToDiscard(get.prompt2('mingshi'),{color:'black'}); + next.set('ai',function(card){ + return 9-get.value(card); }); - next.set('logSkill', 'mingshi'); + next.set('logSkill','mingshi'); "step 1" - if (result.bool) { + if(result.bool){ trigger.num--; } }, - ai: { - threaten: 0.8 + ai:{ + threaten:0.8 } }, - lirang: { - audio: 2, - trigger: { - player: 'loseAfter', - global: 'loseAsyncAfter', + lirang:{ + audio:2, + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', }, - filter: function (event, player) { - if (!game.hasPlayer(current => current != player)) return false; - if (event.type != 'discard' || event.getlx === false) return false; - var evt = event.getl(player); - if (!evt || !evt.cards2) return false; - for (var i = 0; i < evt.cards2.length; i++) { - if (get.position(evt.cards2[i]) == 'd') { + filter:function(event,player){ + if(!game.hasPlayer(current=>current!=player)) return false; + if(event.type!='discard'||event.getlx===false) return false; + var evt=event.getl(player); + if(!evt||!evt.cards2) return false; + for(var i=0;i 1; + if(!goon){ + goon=game.hasPlayer(function(current){ + return player!=current&&get.attitude(player,current)>1; }); } - player.chooseButton(['礼让:是否分配本次弃置的牌?', event.cards], - [1, event.cards.length]).set('ai', function (button) { - if (_status.event.goon && ui.selected.buttons.length == 0) return 1 + Math.abs(get.value(button.link)); - return 0; - }).set('goon', goon).setHiddenSkill('lirang'); + player.chooseButton(['礼让:是否分配本次弃置的牌?',event.cards], + [1,event.cards.length]).set('ai',function(button){ + if(_status.event.goon&&ui.selected.buttons.length==0) return 1+Math.abs(get.value(button.link)); + return 0; + }).set('goon',goon).setHiddenSkill('lirang'); 'step 2' - if (result.bool) { + if(result.bool){ event.cards.removeArray(result.links); - event.togive = result.links.slice(0); - player.chooseTarget('选择一名其他角色获得' + get.translation(result.links), true, lib.filter.notMe).set('ai', function (target) { - var att = get.attitude(_status.event.player, target); - if (_status.event.enemy) { + event.togive=result.links.slice(0); + player.chooseTarget('选择一名其他角色获得'+get.translation(result.links),true,lib.filter.notMe).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.enemy){ return -att; } - else if (att > 0) { - return att / (1 + target.countCards('h')); + else if(att>0){ + return att/(1+target.countCards('h')); } - else { - return att / 100; + else{ + return att/100; } - }).set('enemy', get.value(event.togive[0], player, 'raw') < 0); + }).set('enemy',get.value(event.togive[0],player,'raw')<0); } else event.goto(4); 'step 3' - if (result.targets.length) { - var id = result.targets[0].playerid, map = event.given_map; - if (!map[id]) map[id] = []; + if(result.targets.length){ + var id=result.targets[0].playerid,map=event.given_map; + if(!map[id]) map[id]=[]; map[id].addArray(event.togive); } - if (cards.length > 0) event.goto(1); + if(cards.length>0) event.goto(1); 'step 4' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - var list = [], targets = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - list.push([source, event.given_map[i]]); + var list=[],targets=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + list.push([source,event.given_map[i]]); targets.push(source); } - if (targets.length) { - player.logSkill('lirang', targets); + if(targets.length){ + player.logSkill('lirang',targets); game.loseAsync({ - gain_list: list, - giver: player, - animate: 'gain2', + gain_list:list, + giver:player, + animate:'gain2', }).setContent('gaincardMultiple'); } }, - ai: { - expose: 0.1, - effect: { - target: function (card, player, target, current) { - if (target.hasFriend() && get.tag(card, 'discard')) { - if (current < 0) return 0; - return [1, 1]; + ai:{ + expose:0.1, + effect:{ + target:function(card,player,target,current){ + if(target.hasFriend()&&get.tag(card,'discard')){ + if(current<0) return 0; + return [1,1]; } } } } }, - moukui: { - audio: 2, - audioname: ['sp_mushun'], - trigger: { player: 'useCardToPlayered' }, - direct: true, - filter: function (event, player) { - return event.card.name == 'sha'; + moukui:{ + audio:2, + audioname:['sp_mushun'], + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'; }, - content: function () { + content:function(){ "step 0" - var controls = ['draw_card']; - if (trigger.target.countCards('he')) { + var controls=['draw_card']; + if(trigger.target.countCards('he')){ controls.push('discard_card'); } controls.push('cancel'); - player.chooseControl(controls).set('ai', function () { - var trigger = _status.event.getTrigger(); - if (trigger.target.countCards('he') && get.attitude(_status.event.player, trigger.target) < 0) { + player.chooseControl(controls).set('ai',function(){ + var trigger=_status.event.getTrigger(); + if(trigger.target.countCards('he')&&get.attitude(_status.event.player,trigger.target)<0){ return 'discard_card'; } - else { + else{ return 'draw_card'; } - }).set('prompt', get.prompt2('moukui')); + }).set('prompt',get.prompt2('moukui')); "step 1" - if (result.control == 'draw_card') { + if(result.control=='draw_card'){ player.draw(); player.logSkill('moukui'); } - else if (result.control == 'discard_card' && trigger.target.countCards('he')) { - player.discardPlayerCard(trigger.target, 'he', true).logSkill = ['moukui', trigger.target]; + else if(result.control=='discard_card'&&trigger.target.countCards('he')){ + player.discardPlayerCard(trigger.target,'he',true).logSkill=['moukui',trigger.target]; } else event.finish(); "step 2" - player.addTempSkill('moukui2', 'shaEnd'); + player.addTempSkill('moukui2','shaEnd'); }, - ai: { - expose: 0.1 + ai:{ + expose:0.1 } }, - moukui2: { - audio: false, - trigger: { player: 'shaMiss' }, - forced: true, - filter: function (event, player) { - return player.countCards('he') > 0; + moukui2:{ + audio:false, + trigger:{player:'shaMiss'}, + forced:true, + filter:function(event,player){ + return player.countCards('he')>0; }, - content: function () { - trigger.target.discardPlayerCard(player, true); + content:function(){ + trigger.target.discardPlayerCard(player,true); } }, - shenxian: { - audio: 2, - trigger: { global: ['loseAfter', 'loseAsyncAfter'] }, - filter: function (event, player) { - if (event.type != 'discard' || _status.currentPhase == player || event.getlx === false) return false; - if (event.name == 'lose' && event.player == player) return false; - if (player.hasSkill('shenxian2')) return false; - var cards = event.cards.slice(0); - var evt = event.getl(player); - if (evt && evt.cards) cards.removeArray(evt.cards); - for (var i = 0; i < cards.length; i++) { - if (get.type(cards[i], null, event.hs && event.hs.includes(cards[i]) ? event.player : false) == 'basic' && cards[i].original != 'j') { + shenxian:{ + audio:2, + trigger:{global:['loseAfter','loseAsyncAfter']}, + filter:function(event,player){ + if(event.type!='discard'||_status.currentPhase==player||event.getlx===false) return false; + if(event.name=='lose'&&event.player==player) return false; + if(player.hasSkill('shenxian2')) return false; + var cards=event.cards.slice(0); + var evt=event.getl(player); + if(evt&&evt.cards) cards.removeArray(evt.cards); + for(var i=0;i player.storage.qiangwu) return Infinity; + cardUsable:function(card,player){ + if(_status.currentPhase==player&&card.name=='sha'&&get.number(card)>player.storage.qiangwu) return Infinity; } }, - trigger: { player: 'useCard1' }, - filter: function (event, player) { - if (_status.currentPhase == player && event.card.name == 'sha' && - get.number(event.card) > player.storage.qiangwu && event.addCount !== false) return true; + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(_status.currentPhase==player&&event.card.name=='sha'&& + get.number(event.card)>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--; + 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)&&*/event.player.isIn() && player.countCards('h') > 0 && event.player.hasUseTarget({ name: 'jiu' }, null, true); + zhendu:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return /*(get.mode()!='guozhan'||event.player!=player)&&*/event.player.isIn()&&player.countCards('h')>0&&event.player.hasUseTarget({name:'jiu'},null,true); }, - direct: true, - preHidden: true, - content: function () { + direct:true, + preHidden: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 || !trigger.player.hasUseTarget({ name: 'jiu' }, null, true)) { - nono = true + var nono=(Math.abs(get.attitude(player,trigger.player))<3); + if(player==trigger.player||get.damageEffect(trigger.player,player,player)<=0||!trigger.player.hasUseTarget({name:'jiu'},null,true)){ + nono=true } - else if (trigger.player.hp > 2) { - nono = true; + else if(trigger.player.hp>2){ + nono=true; } - else if (trigger.player.hp > 1 && player.countCards('h') < 3 && (trigger.player.canUse('sha', player) && !player.countCards('h', 'shan') && trigger.player.countCards('h') >= 3)) { - nono = true; + else if(trigger.player.hp>1&&player.countCards('h')<3&&(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); + 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); + next.set('logSkill',['zhendu',trigger.player]); + next.set('nono',nono); next.setHiddenSkill('zhendu'); "step 1" - if (result.bool) { - trigger.player.chooseUseTarget({ name: 'jiu' }, true, 'noTargetDelay', 'nodelayx'); + if(result.bool){ + trigger.player.chooseUseTarget({name:'jiu'},true,'noTargetDelay','nodelayx'); } - else { + else{ event.finish(); } "step 2" - if (result.bool && trigger.player != player) trigger.player.damage(); + if(result.bool&&trigger.player!=player) trigger.player.damage(); }, - ai: { - threaten: 2, - expose: 0.3 + ai:{ + threaten:2, + expose:0.3 } }, - qiluan: { - audio: 'qiluan2', - preHidden: true, - trigger: { global: 'phaseEnd' }, - frequent: true, - filter: function (event, player) { - return game.hasPlayer2(function (current) { - return current.getStat('kill') > 0 + qiluan:{ + audio:'qiluan2', + preHidden:true, + 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); + 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) + '张牌)'; + return get.prompt('qiluan')+'(可摸'+get.cnNumber(num)+'张牌)'; }, - content: function () { + 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); - })); + 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; + subSkill:{ + draw:{ + trigger:{global:'dieAfter'}, + frequent:true, + filter:function(event,player){ + return /*get.mode()!='guozhan'&&*/player!=event.source; }, - content: function () { player.draw() }, + content:function(){player.draw()}, }, }, }, - qiluan2: { - audio: 2, + 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.includes(event.target); + zniaoxiang:{ + shaRelated:true, + audio:2, + trigger:{player:'useCardToPlayered'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&!event.getParent().directHit.includes(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') { + 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; + else{ + map[id].shanRequired=2; } } }, - shangyi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return player != target && target.countCards('h'); + shangyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); }, - content: function () { + content:function(){ "step 0" - player.chooseCardButton(target, target.getCards('h')).set('filterButton', function (button) { - return get.color(button.link) == 'black'; + player.chooseCardButton(target,target.getCards('h')).set('filterButton',function(button){ + return get.color(button.link)=='black'; }); "step 1" - if (result.bool) { + if(result.bool){ target.discard(result.links[0]); } }, - ai: { - order: 11, - result: { - target: function (player, target) { + ai:{ + order:11, + result:{ + target:function(player,target){ return -target.countCards('h'); } }, - threaten: 1.1 + threaten:1.1 }, }, - shengxi: { - trigger: { player: 'phaseDiscardBegin' }, - frequent: true, - filter: function (event, player) { + shengxi:{ + trigger:{player:'phaseDiscardBegin'}, + frequent:true, + filter:function(event,player){ return !player.getStat('damage'); }, - content: function () { + content:function(){ player.draw(2); }, - audio: 2, - audioname: ['liushan'] + audio:2, + audioname:['liushan'] }, - shoucheng: { - init(player) { - game.addGlobalSkill('shoucheng_draw', player); + shoucheng:{ + init(player){ + game.addGlobalSkill('shoucheng_draw',player); }, - trigger: { - global: ['equipAfter', 'addJudgeAfter', 'loseAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + trigger:{ + global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - audio: 2, - direct: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - if (current == _status.currentPhase) return false; - var evt = event.getl(current); - return evt && evt.hs && evt.hs.length && current.countCards('h') == 0; + audio:2, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + if(current==_status.currentPhase) return false; + var evt=event.getl(current); + return evt&&evt.hs&&evt.hs.length&¤t.countCards('h')==0; }); }, - content: function () { + content:function(){ "step 0" - event.list = game.filterPlayer(function (current) { - if (current == _status.currentPhase) return false; - var evt = trigger.getl(current); - return evt && evt.hs && evt.hs.length; + event.list=game.filterPlayer(function(current){ + if(current==_status.currentPhase) return false; + var evt=trigger.getl(current); + return evt&&evt.hs&&evt.hs.length; }).sortBySeat(_status.currentPhase); "step 1" - var target = event.list.shift(); - event.target = target; - if (target.isIn() && target.countCards('h') == 0) { - player.chooseBool(get.prompt2('shoucheng', target)).set('ai', function () { - return get.attitude(_status.event.player, _status.event.getParent().target) > 0; + var target=event.list.shift(); + event.target=target; + if(target.isIn()&&target.countCards('h')==0){ + player.chooseBool(get.prompt2('shoucheng',target)).set('ai',function(){ + return get.attitude(_status.event.player,_status.event.getParent().target)>0; }); } else event.goto(3); "step 2" - if (result.bool) { - player.logSkill(event.name, target); - if (player !== target && (get.mode() !== 'identity' || player.identity !== 'nei')) player.addExpose(0.15); + if(result.bool){ + player.logSkill(event.name,target); + if(player!==target&&(get.mode()!=='identity'||player.identity!=='nei')) player.addExpose(0.15); target.draw(); } "step 3" - if (event.list.length) event.goto(1); + if(event.list.length) event.goto(1); }, - ai: { - threaten: 1.3, + ai:{ + threaten:1.3, }, - subSkill: { - draw: { - trigger: { player: 'dieAfter' }, - filter(event, player) { - return !game.hasPlayer(current => { + subSkill:{ + draw:{ + trigger:{player:'dieAfter'}, + filter(event,player){ + return !game.hasPlayer(current=>{ return current.hasSkill('shoucheng'); - }, true); + },true); }, - content() { + content(){ game.removeGlobalSkill('shoucheng_draw'); }, - ai: { - noh: true, - skillTagFilter(player, tag, arg) { - if (player === _status.currentPhase || player.countCards('h') !== 1) return false; - return game.hasPlayer(current => { - return current.hasSkill('shoucheng') && player.isFriendOf(current); + ai:{ + noh:true, + skillTagFilter(player,tag,arg){ + if(player===_status.currentPhase||player.countCards('h')!==1) return false; + return game.hasPlayer(current=>{ + return current.hasSkill('shoucheng')&&player.isFriendOf(current); }); } } } } }, - hengzheng: { - audio: 2, - trigger: { player: 'phaseDrawBegin1' }, - preHidden: true, - filter: function (event, player) { - return !event.numFixed && (player.hp == 1 || player.countCards('h') == 0); + hengzheng:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + preHidden:true, + 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') && current != player && get.attitude(player, current) <= 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') && current != player && get.attitude(player, current) > 0) { + if(current.countCards('j')&¤t!=player&&get.attitude(player,current)>0){ return true; } }); - return num >= 2; + return num>=2; }, - content: function () { + content:function(){ "step 0" - var targets = game.filterPlayer(); + var targets=game.filterPlayer(); targets.remove(player); targets.sort(lib.sort.seat); - event.targets = targets; - event.num = 0; + event.targets=targets; + event.num=0; trigger.changeToZero(); - player.line(targets, 'green'); + player.line(targets,'green'); "step 1" - if (num < event.targets.length) { - if (event.targets[num].countCards('hej')) { - player.gainPlayerCard(event.targets[num], 'hej', true); + if(num【勇决】
    每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
    '); + target.markSkillCharacter('yongjue',player,'存嗣','
    【勇决】
    每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
    '); player.turnOver(); }, - intro: { - content: 'limited' + intro:{ + content:'limited' }, - ai: { - order: 4, - result: { - target: function (player, target) { - if (target.isMin()) return 0; - if (player.hp > 1) { - if (game.phaseNumber < game.players.length) return 0; - if (target.hp == 1 && target.maxHp > 2) return 0; - if (get.attitude(player, target) < 5) return 0; + 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; + 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 + 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() && current.countCards('he')) { - return get.effect(current, { name: 'guohe_copy2' }, player, player); + fenming:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ + return get.effect(current,{name:'guohe_copy2'},player,player); } }); - return num < 0; + return num<0; }, - filter: function (event, player) { + filter:function(event,player){ return player.isLinked(); }, - preHidden: true, - prompt: '是否发动【奋命】?', - logTarget: function (event, player) { - return game.filterPlayer(function (current) { - if (current.isLinked() && current.countCards('he')) { + preHidden:true, + prompt:'是否发动【奋命】?', + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ return true; } }); }, - content: function () { + content:function(){ "step 0" - event.targets = game.filterPlayer(function (current) { - if (current.isLinked() && current.countCards('he')) { + event.targets=game.filterPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ return true; } }); - event.num = 0; + event.num=0; event.targets.sort(lib.sort.seat); "step 1" - if (event.num < event.targets.length) { - var target = event.targets[event.num]; - if (player == target) { - player.chooseToDiscard(true, 'he'); + if(event.num 0) return 0; - if (_status.event.noe) return 12 - get.value(card); - return 2 * _status.event.damage - get.value(card); - }).set('damage', get.damageEffect(trigger.player, player, trigger.player)).set('noe', trigger.player.hasSkillTag('noe')); + if(result.bool){ + if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.15); + trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到1点伤害',{type:'equip'}).set('ai',function(card){ + if(_status.event.damage>0) return 0; + if(_status.event.noe) return 12-get.value(card); + return 2*_status.event.damage-get.value(card); + }).set('damage',get.damageEffect(trigger.player,player,trigger.player)).set('noe',trigger.player.hasSkillTag('noe')); } - else { + else{ event.finish(); } "step 2" - if (result.bool) { + if(result.bool){ player.draw(); } - else { + else{ trigger.player.damage(); } } }, - suishi: { - audio: 2, - trigger: { global: 'dying' }, - forced: true, - popup: false, + suishi:{ + audio:2, + trigger:{global:'dying'}, + forced:true, + popup:false, //priority:12, - check: function () { + check:function(){ return false; }, - filter: function (event, player) { - return event.player != player && event.parent.name == 'damage' && event.parent.source && event.parent.source != event.player; + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source!=event.player; }, - content: function () { + content:function(){ 'step 0' var str; - if (trigger.parent.source == player) { - str = '随势:是否摸一张牌?'; + if(trigger.parent.source==player){ + str='随势:是否摸一张牌?'; } - else { - str = '随势:是否令' + get.translation(player) + '摸一张牌?' + 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); + 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) { + if(result.bool){ player.logSkill('suishi'); - trigger.parent.source.line(player, 'green'); + trigger.parent.source.line(player,'green'); player.draw(); } }, - group: 'suishi2' + group:'suishi2' }, - suishi2: { - trigger: { global: 'dieAfter' }, - forced: true, - popup: false, - check: function () { + 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; + filter:function(event,player){ + return event.player!=player&&event.source&&event.source!=player&&event.source!=event.player; }, - content: function () { + content:function(){ 'step 0' var str; - if (trigger.source == player) { - str = '随势:是否失去1点体力?'; + if(trigger.source==player){ + str='随势:是否失去1点体力?'; } - else { - str = '随势:是否令' + get.translation(player) + '失去1点体力?' + else{ + str='随势:是否令'+get.translation(player)+'失去1点体力?' } - trigger.source.chooseBool(str).set('ai', function () { - return get.attitude(_status.event.player, _status.event.target) < 0; - }).set('target', 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) { + if(result.bool){ player.logSkill('suishi'); - trigger.source.line(player, 'green'); + trigger.source.line(player,'green'); player.loseHp(); } }, }, - sijian: { - trigger: { - player: 'loseAfter', - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + sijian:{ + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - direct: true, - audio: 2, - preHidden: true, - filter: function (event, player) { - if (player.countCards('h')) return false; - if (event.name == 'gain' && event.player == player) return false; - var evt = event.getl(player); - return evt && evt.hs && evt.hs.length > 0; + direct:true, + audio:2, + preHidden:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + if(event.name=='gain'&&event.player==player) return false; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length>0; }, - content: function () { + 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); + 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); }).setHiddenSkill(event.name); "step 1" - if (result.bool) { - player.logSkill('sijian', result.targets); - event.target = result.targets[0]; - player.discardPlayerCard(event.target, true); + if(result.bool){ + player.logSkill('sijian',result.targets); + event.target=result.targets[0]; + player.discardPlayerCard(event.target,true); } - else { + else{ event.finish(); } }, - ai: { - expose: 0.2, + ai:{ + expose:0.2, } }, - quji: { - audio: 2, - enable: 'phaseUse', - usable: 1, - position: 'he', - filterCard: true, - selectCard: function () { - var player = _status.event.player; + 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 < target.maxHp; + filterTarget:function(card,player,target){ + return target.hp -1; - if (num == 2) return att > 0; - return att > 1; + direct:true, + checkx:function(target,player){ + if(target){ + var num=target.countCards('h'); + var att=get.attitude(player,target); + if(num==0) return true; + if(num==1) return att>-1; + if(num==2) return att>0; + return att>1; } return false; }, - content: function () { + content:function(){ "step 0" - event.target = player; - event.player = trigger.player; + event.target=player; + event.player=trigger.player; var prompt; - if (player == event.player) prompt = '是否发动【郡兵】摸一张牌?'; - else prompt = ('###是否对' + get.translation(event.target) + '发动【郡兵】?###' + (event.player == event.target ? '摸一张牌' : '摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌')); - event.player.chooseBool(prompt).set('choice', lib.skill.junbing.checkx(event.target, event.player)); + if(player==event.player) prompt='是否发动【郡兵】摸一张牌?'; + else prompt=('###是否对'+get.translation(event.target)+'发动【郡兵】?###'+(event.player==event.target?'摸一张牌':'摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌')); + event.player.chooseBool(prompt).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(); + if(!result.bool){event.finish();return} + target.logSkill('junbing',player); + if(player==target) event.finish(); player.draw(); "step 2" - var cards = player.getCards('h'); - player.give(cards, target); - event.num = cards.length; + var cards=player.getCards('h'); + player.give(cards,target); + event.num=cards.length; "step 3" - var he = target.getCards('he'); - if (!he.length) event.finish(); - else if (he.length <= num) event._result = { cards: he }; - else target.chooseCard('选择还给' + get.translation(player) + '的牌', true, event.num, 'he'); + var he=target.getCards('he'); + if(!he.length) event.finish(); + else if(he.length<=num) event._result={cards:he}; + else target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num,'he'); "step 4" - target.give(result.cards, player); + target.give(result.cards,player); }, }, - 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 == 'unknown') { - if (!player.wontYe('qun')) return false; - return target.identity == 'qun'; + 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=='unknown'){ + if(!player.wontYe('qun')) return false; + return target.identity=='qun'; } return target.isFriendOf(player); } - else { + else{ return true; } }, - multitarget: true, - multiline: true, - selectTarget: function () { - if (get.mode() == 'guozhan') return -1; - return [1, Infinity]; + multitarget:true, + multiline:true, + selectTarget:function(){ + if(get.mode()=='guozhan') return -1; + return [1,Infinity]; }, - content: function () { + content:function(){ "step 0" player.awakenSkill('xiongyi'); - game.asyncDraw(targets, 3); + game.asyncDraw(targets,3); "step 1" - if (player.isDamaged()) { - if (get.mode() == 'guozhan') { - if (player.isMinor(true)) { + if(player.isDamaged()){ + if(get.mode()=='guozhan'){ + if(player.isMinor(true)){ player.recover(); } } - else if (player.isMinHp()) { + else if(player.isMinHp()){ 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.phaseNumber < game.players.length * 2) return 0; - if (player.hasUnknown()) return 0; + 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.phaseNumber 1) { + if(event.num>1){ event.num--; event.goto(1); } } }, - ai: { - threaten: 0.8, - expose: 0.1 + ai:{ + threaten:0.8, + expose:0.1 } }, - shushen: { - audio: 2, - trigger: { player: 'recoverAfter' }, - direct: true, - content: function () { + shushen:{ + audio:2, + trigger:{player:'recoverAfter'}, + direct:true, + content:function(){ "step 0" - event.count = trigger.num; + 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); + 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) { + if(result.bool){ event.count--; - player.logSkill('shushen', result.targets); - result.targets[0].chooseDrawRecover(2, true); - if (event.count) event.goto(1); + player.logSkill('shushen',result.targets); + result.targets[0].chooseDrawRecover(2,true); + if(event.count) event.goto(1); } }, - ai: { - threaten: 0.8, - expose: 0.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.length < player.hp) return false; - if (cards.length > 3) return false; - for (var i = 0; i < cards.length; i++) { - if (get.value(cards[i]) > 7 || get.tag(cards[i], 'recover') >= 1) return false; + 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; + filter:function(event,player){ + return player.countCards('h')>0; }, - preHidden: true, - content: function () { + preHidden:true, + content:function(){ "step 0" - var cards = player.getCards('h'); - event.bool = cards.length >= player.hp; + var cards=player.getCards('h'); + event.bool=cards.length>=player.hp; player.discard(cards); "step 1" - if (event.bool) { + 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; + 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 () { + content:function(){ "step 0" player.removeSkills('huxiao'); player.gainMaxHp(); "step 1" player.recover(); player.awakenSkill('wuji'); - player.storage.wuji = true; + player.storage.wuji=true; - var card = get.cardPile('qinglong', 'field'); - if (card) { - player.gain(card, 'gain2', 'log'); + var card=get.cardPile('qinglong','field'); + if(card){ + player.gain(card,'gain2','log'); } } }, - xueji_old: { - audio: 'xueji', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.hp < player.maxHp && player.countCards('he', { color: 'red' }) > 0; + xueji_old:{ + audio:'xueji', + 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; + 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]; + selectTarget:function(){ + return [1,_status.event.player.maxHp-_status.event.player.hp]; }, - position: 'he', - filterCard: function (card) { - return get.color(card) == 'red'; + position:'he', + filterCard:function(card){ + return get.color(card)=='red'; }, - check: function (card) { - return 8 - get.useful(card); + check:function(card){ + return 8-get.useful(card); }, - content: function () { + content:function(){ "step 0" target.damage(); "step 1" target.draw(); }, - ai: { - order: 7, - result: { - target: function (player, target) { - return get.damageEffect(target, player); + 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; + 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]; + 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]; + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; } } } }, //FW关银屏 - oldhuxiao: { - shaRelated: true, - audio: 'huxiao', - trigger: { player: 'shaMiss' }, - forced: true, - content: function () { - if (player.stat[player.stat.length - 1].card.sha > 0) { - player.stat[player.stat.length - 1].card.sha--; + oldhuxiao:{ + shaRelated:true, + audio:'huxiao', + trigger:{player:'shaMiss'}, + forced:true, + content:function(){ + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; } }, }, - oldwuji: { - unique: true, - audio: 'wuji', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return player.getStat('damage') >= 3 && !player.storage.oldwuji; + oldwuji:{ + unique:true, + audio:'wuji', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.getStat('damage')>=3&&!player.storage.oldwuji; }, - forced: true, - juexingji: true, - skillAnimation: true, - animationColor: 'orange', - content: function () { + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'orange', + content:function(){ 'step 0' player.removeSkills('oldhuxiao'); player.gainMaxHp(); @@ -23634,3603 +23635,3603 @@ game.import('character', function (lib, game, ui, get, ai, _status) { player.awakenSkill('oldwuji'); }, }, - xueji: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('he', { color: 'red' }) > 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())]; + 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); + position:'he', + filterCard:{color:'red'}, + check:function(card){ + return 8-get.value(card); }, - multitarget: true, - multiline: true, - line: 'fire', - content: function () { + multitarget:true, + multiline:true, + line:'fire', + content:function(){ 'step 0' - event.delay = false; - for (var i = 0; i < targets.length; i++) { - if (!targets[i].isLinked()) { + event.delay=false; + for(var i=0;i= 0; i--) { - ui.cardPile.insertBefore(cards[i].fix(), ui.cardPile.firstChild); + var evt=event.getParent(2); + evt.set('aocai',true); + var cards=get.cards((get.mode()!='guozhan'&&player.countCards('h')==0)?4:2); + for(var i=cards.length-1;i>=0;i--){ + ui.cardPile.insertBefore(cards[i].fix(),ui.cardPile.firstChild); } - var aozhan = player.hasSkill('aozhan'); - player.chooseButton(['傲才:选择要' + (evt.name == 'chooseToUse' ? '使用' : '打出') + '的牌', cards]).set('filterButton', function (button) { + var aozhan=player.hasSkill('aozhan'); + player.chooseButton(['傲才:选择要'+(evt.name=='chooseToUse'?'使用':'打出')+'的牌',cards]).set('filterButton',function(button){ return _status.event.cards.includes(button.link); - }).set('cards', cards.filter(function (card) { - if (aozhan && card.name == 'tao') { + }).set('cards',cards.filter(function(card){ + if(aozhan&&card.name=='tao'){ return evt.filterCard({ - name: 'sha', isCard: true, cards: [card], - }, evt.player, evt) || evt.filterCard({ - name: 'shan', isCard: true, cards: [card], - }, evt.player, evt); + name:'sha',isCard:true,cards:[card], + },evt.player,evt)||evt.filterCard({ + name:'shan',isCard:true,cards:[card], + },evt.player,evt); } - return evt.filterCard(card, evt.player, evt); - })).set('ai', function (button) { - var evt = _status.event.getParent(3); - if (evt && evt.ai) { - var tmp = _status.event; - _status.event = evt; - var result = (evt.ai || event.ai1)(button.link, _status.event.player, evt); - _status.event = tmp; + return evt.filterCard(card,evt.player,evt); + })).set('ai',function(button){ + var evt=_status.event.getParent(3); + if(evt&&evt.ai){ + var tmp=_status.event; + _status.event=evt; + var result=(evt.ai||event.ai1)(button.link,_status.event.player,evt); + _status.event=tmp; return result; } return 1; }); 'step 1' - var evt = event.getParent(2); - if (result.bool && result.links && result.links.length) { - var card = result.links[0]; - var name = card.name, aozhan = (player.hasSkill('aozhan') && name == 'tao'); - if (aozhan) { - name = evt.filterCard({ - name: 'sha', isCard: true, cards: [card], - }, evt.player, evt) ? 'sha' : 'shan'; + var evt=event.getParent(2); + if(result.bool&&result.links&&result.links.length){ + var card=result.links[0]; + var name=card.name,aozhan=(player.hasSkill('aozhan')&&name=='tao'); + if(aozhan){ + name=evt.filterCard({ + name:'sha',isCard:true,cards:[card], + },evt.player,evt)?'sha':'shan'; } - if (evt.name == 'chooseToUse') { - game.broadcastAll(function (result, name) { - lib.skill.aocai_backup.viewAs = { name: name, cards: [result], isCard: true }; - }, card, name); - evt.set('_backupevent', 'aocai_backup'); - evt.set('openskilldialog', ('请选择' + get.translation(card) + '的目标')) + if(evt.name=='chooseToUse'){ + game.broadcastAll(function(result,name){ + lib.skill.aocai_backup.viewAs={name:name,cards:[result],isCard:true}; + },card,name); + evt.set('_backupevent','aocai_backup'); + evt.set('openskilldialog',('请选择'+get.translation(card)+'的目标')) evt.backup('aocai_backup'); } - else { + else{ delete evt.result.skill; delete evt.result.used; - evt.result.card = get.autoViewAs(result.links[0]); - if (aozhan) evt.result.card.name = name; - evt.result.cards = [result.links[0]]; + evt.result.card=get.autoViewAs(result.links[0]); + if(aozhan) evt.result.card.name=name; + evt.result.cards=[result.links[0]]; evt.redo(); return; } } evt.goto(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; + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')) return 0.7; + if(get.tag(card,'respondSha')) return 0.7; } }, - order: 11, - respondShan: true, - respondSha: true, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + order:11, + respondShan:true, + respondSha:true, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; } } } }, - aocai_backup: { - sourceSkill: 'aocai', - precontent: function () { + aocai_backup:{ + sourceSkill:'aocai', + precontent:function(){ delete event.result.skill; - var name = event.result.card.name, cards = event.result.card.cards.slice(0); - event.result.cards = cards; - var rcard = cards[0], card; - if (rcard.name == name) card = get.autoViewAs(rcard); - else card = get.autoViewAs({ name, isCard: true }); - event.result.card = card; + var name=event.result.card.name,cards=event.result.card.cards.slice(0); + event.result.cards=cards; + var rcard=cards[0],card; + if(rcard.name==name) card=get.autoViewAs(rcard); + else card=get.autoViewAs({name,isCard:true}); + event.result.card=card; }, - filterCard: function () { return false }, - selectCard: -1, + filterCard:function(){return false}, + selectCard:-1, }, - hongyuan: { - trigger: { player: 'phaseDrawBegin2' }, - direct: true, - audio: 2, - filter: function (event, player) { - return !event.numFixed && event.num > 0; + hongyuan:{ + trigger:{player:'phaseDrawBegin2'}, + direct:true, + audio:2, + filter:function(event,player){ + return !event.numFixed&&event.num>0; }, - content: function () { + content:function(){ "step 0" var check; - if (player.countCards('h') == 0) { - check = false; + if(player.countCards('h')==0){ + check=false; } - else { - check = (game.countPlayer(function (current) { - return player != current && get.attitude(player, current) > 1; - }) >= 2); + 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; + 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); + 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) { + if(result.bool){ var targets; - if (event.versus) { - targets = game.filterPlayer(function (current) { - return current != player && current.side == player.side; + if(event.versus){ + targets=game.filterPlayer(function(current){ + return current!=player&¤t.side==player.side; }); } - else { - targets = result.targets; + else{ + targets=result.targets; } - player.logSkill('hongyuan', 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; + 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; i < cards.length; i++) { - var judge2 = event.judge(cards[i]); - if (judge2 > judge) return true; - if (_status.currentPhase != player && judge2 == judge && get.color(cards[i]) == 'red' && get.useful(cards[i]) < 5) return true; + 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 () { + 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; + 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); + 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); + else{ + return get.color(card)=='black'?10:0+get.value(card); } } - if (attitude >= 0) { - return get.color(card) == 'red' ? 0 : -10 + result; + if(attitude>=0){ + return get.color(card)=='red'?0:-10+result; } - else { - return get.color(card) == 'black' ? 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; + }).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); + }).set('judge',judge).set('attitude',attitude); "step 1" - if (result.bool) { - event.card = result.links[0]; - player.respond(event.card, 'highlight', 'noOrdering').nopopup = true; + if(result.bool){ + event.card=result.links[0]; + player.respond(event.card,'highlight','noOrdering').nopopup=true; } - else { + else{ event.finish(); } "step 2" - if (result.bool) { - if (trigger.player.judging[0].clone) { + if(result.bool){ + if(trigger.player.judging[0].clone){ trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function (card) { - if (card.clone) { + 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])); + },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.player.judging[0]=event.card; trigger.orderingCards.add(event.card); - game.log(trigger.player, '的判定牌改为', event.card); + game.log(trigger.player,'的判定牌改为',event.card); game.delay(2); } }, - ai: { - rejudge: true, - tag: { - rejudge: 1, + ai:{ + rejudge:true, + tag:{ + rejudge:1, } } }, - mingzhe: { - audio: 2, - trigger: { - player: ['useCard', 'respond', 'loseAfter'], - global: 'loseAsyncAfter', + mingzhe:{ + audio:2, + trigger:{ + player:['useCard','respond','loseAfter'], + global:'loseAsyncAfter', }, - frequent: true, - filter: function (event, player) { - if (player == _status.currentPhase) return false; - if (event.name.indexOf('lose') != 0) return get.color(event.card) == 'red'; - if (event.type != 'discard') return false; - var evt = event.getl(player); - if (evt && evt.cards2) { - for (var i = 0; i < evt.cards2.length; i++) { - if (get.color(evt.cards2[i], player) == 'red') return true; + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.name.indexOf('lose')!=0) return get.color(event.card)=='red'; + if(event.type!='discard') return false; + var evt=event.getl(player); + if(evt&&evt.cards2){ + for(var i=0;i 0 && current.hp <= player.countCards('he') && player.inRange(current); + duwu:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.hasSkill('duwu2')==false&&game.hasPlayer(function(current){ + return current.hp>0&¤t.hp<=player.countCards('he')&&player.inRange(current); }); }, - filterCard: function () { - if (ui.selected.targets.length) return false; + filterCard:function(){ + if(ui.selected.targets.length) return false; return true; }, - position: 'he', - selectCard: [1, Infinity], - complexSelect: true, - complexCard: true, - filterTarget: function (card, player, target) { - return target != player && target.hp > 0 && player.inRange(target) && ui.selected.cards.length == target.hp; + position:'he', + selectCard:[1,Infinity], + complexSelect:true, + complexCard:true, + filterTarget:function(card,player,target){ + return target!=player&&target.hp>0&&player.inRange(target)&&ui.selected.cards.length==target.hp; }, - check: function (card) { - var player = _status.event.player; - if (game.hasPlayer(function (current) { - return current != player && current.hp > 0 && player.inRange(current) && ui.selected.cards.length == current.hp && get.damageEffect(current, player, player) > 0; + check:function(card){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current!=player&¤t.hp>0&&player.inRange(current)&&ui.selected.cards.length==current.hp&&get.damageEffect(current,player,player)>0; })) return 0; - switch (ui.selected.cards.length) { - case 0: return 8 - get.value(card); - case 1: return 6 - get.value(card); - case 2: return 3 - get.value(card); - default: return 0; + switch(ui.selected.cards.length){ + case 0:return 8-get.value(card); + case 1:return 6-get.value(card); + case 2:return 3-get.value(card); + default:return 0; } }, - content: function () { + content:function(){ player.addTempSkill('duwu3'); target.damage('nocard'); }, - ai: { - damage: true, - order: 2, - result: { - target: function (player, target) { - return get.damageEffect(target, player); + ai:{ + damage:true, + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); } }, - threaten: 1.5, - expose: 0.3 + threaten:1.5, + expose:0.3 } }, - duwu2: { charlotte: true }, - duwu3: { - trigger: { global: 'dyingAfter' }, - forced: true, - popup: false, - charlotte: true, - filter: function (event, player) { - return event.player.isIn() && event.reason && event.reason.getParent().name == 'duwu'; + duwu2:{charlotte:true}, + duwu3:{ + trigger:{global:'dyingAfter'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.player.isIn()&&event.reason&&event.reason.getParent().name=='duwu'; }, - content: function () { + content:function(){ player.loseHp(); player.addTempSkill('duwu2'); } }, - yicong: { - trigger: { - player: ["changeHp"], + yicong:{ + trigger:{ + player:["changeHp"], }, - audio: 2, - audioname: ['re_gongsunzan'], - forced: true, - filter: function (event, player) { - return get.sgn(player.hp - 2.5) != get.sgn(player.hp - 2.5 - event.num); + audio:2, + audioname:['re_gongsunzan'], + 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; + 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; + globalTo:function(from,to,current){ + if(to.hp<=2) return current+1; }, }, - ai: { - threaten: 0.8 + ai:{ + threaten:0.8 } }, - yongsi: { - audio: 2, - group: ['yongsi1', 'yongsi2'], - locked: true, - ai: { - threaten: 3.2 + yongsi:{ + audio:2, + group:['yongsi1','yongsi2'], + locked:true, + ai:{ + threaten:3.2 } }, - yongsi1: { - audio: true, - trigger: { player: 'phaseDrawBegin2' }, - forced: true, - filter: function (event, player) { + yongsi1:{ + audio:true, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:function(event,player){ return !event.numFixed; }, - content: function () { - trigger.num += game.countGroup(); + content:function(){ + trigger.num+=game.countGroup(); } }, - yongsi2: { - audio: true, - trigger: { player: 'phaseDiscardBegin' }, - forced: true, - content: function () { - player.chooseToDiscard(game.countGroup(), 'he', true); + yongsi2:{ + audio:true, + 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; + bifa:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; }, - content: function () { + content:function(){ "step 0" player.chooseCardTarget({ - filterCard: true, - filterTarget: function (card, player, target) { - return player != target && !target.getExpansions('bifa2').length; + filterCard:true, + filterTarget:function(card,player,target){ + return player!=target&&!target.getExpansions('bifa2').length; }, - ai1: function (card) { - return 7 - get.value(card); + ai1:function(card){ + return 7-get.value(card); }, - ai2: function (target) { - var num = target.hasSkillTag('maixie') ? 2 : 0; - return -get.attitude(_status.event.player, target) - num; + ai2:function(target){ + var num=target.hasSkillTag('maixie')?2:0; + return -get.attitude(_status.event.player,target)-num; }, - prompt: get.prompt2('bifa'), + prompt:get.prompt2('bifa'), }); "step 1" - if (result.bool) { - event.forceDie = true; - var target = result.targets[0]; - event.target = target; - player.logSkill('bifa', result.targets[0]); - event.card = result.cards[0]; - target.storage.bifa2 = [result.cards[0], player]; - if (!_status.connectMode && player.isUnderControl(true)) player.$giveAuto(result.cards[0], target, false); - else player.$give(1, target, false); + if(result.bool){ + event.forceDie=true; + var target=result.targets[0]; + event.target=target; + player.logSkill('bifa',result.targets[0]); + event.card=result.cards[0]; + target.storage.bifa2=[result.cards[0],player]; + if(!_status.connectMode&&player.isUnderControl(true)) player.$giveAuto(result.cards[0],target,false); + else player.$give(1,target,false); target.addToExpansion(result.cards[0]).gaintag.add('bifa2'); } else event.finish(); "step 2" - if (target.getExpansions('bifa2').includes(card)) { + if(target.getExpansions('bifa2').includes(card)){ target.addSkill('bifa2'); } else delete target.storage.bifa2; }, - ai: { - threaten: 1.7, - expose: 0.3 + ai:{ + threaten:1.7, + expose:0.3 } }, - bifa2: { - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - charlotte: true, - audio: false, - filter: function (event, player) { - return player.storage.bifa2 && player.getExpansions('bifa2').includes(player.storage.bifa2[0]); + bifa2:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + charlotte:true, + audio:false, + filter:function(event,player){ + return player.storage.bifa2&&player.getExpansions('bifa2').includes(player.storage.bifa2[0]); }, - content: function () { + content:function(){ "step 0" - if (player.storage.bifa2[1].isIn() && player.countCards('h')) { - player.chooseCard(get.translation(player.storage.bifa2[1]) + '的笔伐牌为:', function (card) { - return get.type(card, 'trick') == _status.event.type; - }).set('ai', function (card) { - return 8 - get.value(card); - }).set('type', get.type(player.storage.bifa2[0], 'trick')).set('promptx', [[player.storage.bifa2[0]], '请交给其一张与此牌类别相同的手牌,否则失去1点体力']); + if(player.storage.bifa2[1].isIn()&&player.countCards('h')){ + player.chooseCard(get.translation(player.storage.bifa2[1])+'的笔伐牌为:',function(card){ + return get.type(card,'trick')==_status.event.type; + }).set('ai',function(card){ + return 8-get.value(card); + }).set('type',get.type(player.storage.bifa2[0],'trick')).set('promptx',[[player.storage.bifa2[0]],'请交给其一张与此牌类别相同的手牌,否则失去1点体力' ]); } - else { - event.directfalse = true; + else{ + event.directfalse=true; } "step 1" - if (result.bool && !event.directfalse) { - player.give(result.cards, player.storage.bifa2[1]); - player.gain(player.storage.bifa2[0], 'draw'); + if(result.bool&&!event.directfalse){ + player.give(result.cards,player.storage.bifa2[1]); + player.gain(player.storage.bifa2[0],'draw'); } - else { + else{ player.loseHp(); } "step 2" player.removeSkill('bifa2'); }, - marktext: '檄', - intro: { - markcount: () => 1, - name: '笔伐', - content: '已成为〖笔伐〗的目标', + marktext:'檄', + intro:{ + markcount:()=>1, + name:'笔伐', + content:'已成为〖笔伐〗的目标', }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); delete player.storage[skill]; }, }, - songci: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - if (!player.storage.songci) return true; - return game.hasPlayer(function (current) { + songci:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + if(!player.storage.songci) return true; + return game.hasPlayer(function(current){ return !player.storage.songci.includes(current); }); }, - init: function (player) { - if (!player.storage.songci) player.storage.songci = []; + init:function(player){ + if(!player.storage.songci) player.storage.songci=[]; }, - filterTarget: function (card, player, target) { - return (!player.storage.songci || !player.storage.songci.includes(target)); + filterTarget:function(card,player,target){ + return (!player.storage.songci||!player.storage.songci.includes(target)); }, - content: function () { - if (target.countCards('h') > target.hp) { - target.chooseToDiscard(2, 'he', true); + content:function(){ + if(target.countCards('h')>target.hp){ + target.chooseToDiscard(2,'he',true); } - else { + else{ target.draw(2); } - if (!player.storage.songci) player.storage.songci = []; + if(!player.storage.songci) player.storage.songci=[]; player.storage.songci.push(target); player.storage.songci.sortBySeat(); player.markSkill('songci'); }, - intro: { - content: '已对$发动过〖颂词〗' + intro:{ + content:'已对$发动过〖颂词〗' }, - ai: { - order: 7, - threaten: 1.6, - expose: 0.2, - result: { - target: function (player, target) { - if (target.countCards('h') <= target.hp) { + ai:{ + order:7, + threaten:1.6, + expose:0.2, + result:{ + target:function(player,target){ + if(target.countCards('h')<=target.hp){ return 1; } - else if (target.countCards('h') > target.hp) { + else if(target.countCards('h')>target.hp){ return -1; } } } }, - group: 'songci_draw', + group:'songci_draw', }, - songci_draw: { - audio: 'songci', - trigger: { player: 'phaseDiscardEnd' }, - forced: true, - filter: function (event, player) { - if (!player.storage.songci) return false; - return !game.hasPlayer(function (current) { + songci_draw:{ + audio:'songci', + trigger:{player:'phaseDiscardEnd'}, + forced:true, + filter:function(event,player){ + if(!player.storage.songci) return false; + return !game.hasPlayer(function(current){ return !player.storage.songci.includes(current); }); }, - content: function () { + content:function(){ player.draw(); }, }, - baobian: { - audio: 2, - trigger: { player: ['phaseBefore', 'changeHp'] }, - forced: true, - popup: false, - init: function (player) { - if (game.online) return; + 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) { + var list=[]; + if(player.hp<=3){ //if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); list.push('oltiaoxin'); } - if (player.hp <= 2) { + if(player.hp<=2){ list.push('olpaoxiao'); } - if (player.hp <= 1) { + if(player.hp<=1){ list.push('xinshensu'); } - if (list.length) { - player.addAdditionalSkill('baobian', list); + if(list.length){ + player.addAdditionalSkill('baobian',list); } }, - derivation: ['oltiaoxin', 'olpaoxiao', 'xinshensu'], - content: function () { + derivation:['oltiaoxin','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'); + var list=[]; + if(player.hp<=3){ + if(trigger.num!=undefined&&trigger.num<0&&player.hp-trigger.num>1) player.logSkill('baobian'); list.push('oltiaoxin'); } - if (player.hp <= 2) { + if(player.hp<=2){ list.push('olpaoxiao'); } - if (player.hp <= 1) { + if(player.hp<=1){ list.push('xinshensu'); } - if (list.length) { - player.addAdditionalSkill('baobian', list); + 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]; + 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]; + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; } } } }, - chongzhen: { - audio: 2, - trigger: { player: ['useCard', 'respond'] }, - filter: function (event, player) { - if (event.card.name != 'sha' && event.card.name != 'shan') return false; - if (!event.skill || event.skill.indexOf('fanghun') + event.skill.indexOf('longdan') == -2) return false; - var target = lib.skill.chongzhen.logTarget(event, player); - return target && target.countGainableCards(player, 'h') > 0; + chongzhen:{ + audio:2, + trigger:{player:['useCard','respond']}, + filter:function(event,player){ + if(event.card.name!='sha'&&event.card.name!='shan') return false; + if(!event.skill||event.skill.indexOf('fanghun')+event.skill.indexOf('longdan')==-2) return false; + var target=lib.skill.chongzhen.logTarget(event,player); + return target&&target.countGainableCards(player,'h')>0; }, - logTarget: function (event, player) { - if (event.name == 'respond') return event.source; - if (event.card.name == 'sha') return event.targets[0]; + logTarget:function(event,player){ + if(event.name=='respond') return event.source; + if(event.card.name=='sha') return event.targets[0]; return event.respondTo[0]; }, - prompt2: function (event, player) { - var target = lib.skill.chongzhen.logTarget(event, player); - return '获得' + get.translation(target) + '的一张手牌'; + prompt2:function(event,player){ + var target=lib.skill.chongzhen.logTarget(event,player); + return '获得'+get.translation(target)+'的一张手牌'; }, - content: function () { - var target = lib.skill.chongzhen.logTarget(trigger, player); - player.gainPlayerCard(target, 'h', true); + content:function(){ + var target=lib.skill.chongzhen.logTarget(trigger,player); + player.gainPlayerCard(target,'h',true); }, - 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]; + 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]; } } }, }, }, }, - lihun: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { - return player != target && target.hasSex('male'); + lihun:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.hasSex('male'); }, - filterCard: true, - position: 'he', - content: function () { - player.gainPlayerCard(target, true, 'h', target.countCards('h')); + filterCard:true, + position:'he', + content:function(){ + player.gainPlayerCard(target,true,'h',target.countCards('h')); player.turnOver(); player.addSkill('lihun2'); - player.storage.lihun = target; + 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; + 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'); + 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]; + 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 () { + lihun2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + audio:false, + content:function(){ "step 0" - var cards = player.getCards('he'); + var cards=player.getCards('he'); player.removeSkill('lihun2'); - if (player.storage.lihun.classList.contains('dead') || player.storage.lihun.hp <= 0 || cards.length == 0) { + if(player.storage.lihun.classList.contains('dead')||player.storage.lihun.hp<=0||cards.length==0){ event.finish(); } - else { - if (cards.length < player.storage.lihun.hp) event._result = { bool: true, cards: cards }; - else player.chooseCard('he', true, player.storage.lihun.hp, '离魂:选择要交给' + get.translation(player.storage.lihun) + '的牌'); + else{ + if(cards.length 0; + yuanhu:{ + audio:3, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; }, - content: function () { + content:function(){ "step 0" player.chooseCardTarget({ - filterCard: function (card) { - return get.type(card) == 'equip'; + filterCard:function(card){ + return get.type(card)=='equip'; }, - position: 'he', - filterTarget: function (card, player, target) { + position:'he', + filterTarget:function(card,player,target){ return target.canEquip(card); }, - ai1: function (card) { - return 6 - get.value(card); + ai1:function(card){ + return 6-get.value(card); }, - ai2: function (target) { - return get.attitude(_status.event.player, target) - 3; + ai2:function(target){ + return get.attitude(_status.event.player,target)-3; }, - prompt: get.prompt2('yuanhu') + prompt:get.prompt2('yuanhu') }); "step 1" - if (result.bool) { - player.logSkill('yuanhu', result.targets); - var thisTarget = result.targets[0]; - var thisCard = result.cards[0]; + 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); + 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; - })) { + 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; + 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); + }).set('thisTarget',thisTarget); return; } - case 'equip2': { - thisTarget.draw(); event.finish(); + case 'equip2':{ + thisTarget.draw();event.finish(); return; } - case 'equip5': { + case 'equip5':{ event.finish(); return; } - default: { + default:{ thisTarget.recover(); event.finish(); return; } } } - else { + else{ event.finish(); } "step 2" - if (result.targets.length) { - player.discardPlayerCard(true, result.targets[0], 'hej'); + 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; i < cards.length; i++) { - if (cards[i].name == 'shan' || cards[i].name == 'tao') return false; + tianming:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + check:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<=2){ + for(var i=0;i players[1].hp && players[0] != player) { + if(players[0].hp>players[1].hp&&players[0]!=player){ players[0].chooseBool(get.prompt2('tianming')); - event.player = players[0]; + event.player=players[0]; } - else { + else{ event.finish(); } "step 1" - if (result.bool) { - player.chooseToDiscard(2, true, 'he'); + 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]; + 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; + 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; + 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) { + 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; i < players.length; i++) { - if (players[i].countCards('h') && players[i] != target && players[i] != player && get.attitude(player, players[i]) < 0) { + var players=game.filterPlayer(); + for(var i=0;i 0) { - return eff - 10; + player.chooseTarget(true,'选择拼点目标',function(card,player,target){ + return _status.event.target1.canCompare(target)&&target!=player; + }).set('ai',function(target){ + var player=_status.event.player; + var eff=get.effect(target,{name:'sha'},_status.event.target1,player); + var att=get.attitude(player,target); + if(att>0){ + return eff-10; } return eff; - }).set('target1', event.target1).set('forceDie', true); + }).set('target1',event.target1).set('forceDie',true); "step 3" - if (result.targets.length) { - event.target2 = result.targets[0]; + if(result.targets.length){ + event.target2=result.targets[0]; event.target1.line(event.target2); event.target1.chooseToCompare(event.target2); } - else { + else{ event.finish(); } "step 4" - if (!result.tie) { - if (result.bool) { - if (event.target1.canUse({ name: 'sha', isCard: true }, event.target2, false)) event.target1.useCard({ name: 'sha', isCard: true }, event.target2); + if(!result.tie){ + if(result.bool){ + if(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); + 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 () { + gongao:{ + audio:2, + trigger:{global:'dieAfter'}, + forced:true, + content:function(){ player.gainMaxHp(); player.recover(); }, - ai: { - threaten: 1.5 + ai:{ + threaten:1.5 }, }, - juyi: { - skillAnimation: true, - animationColor: 'thunder', - audio: 2, - derivation: ['benghuai', 'weizhong'], - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return player.maxHp > game.countPlayer() && !player.storage.juyi; + juyi:{ + skillAnimation:true, + animationColor:'thunder', + audio:2, + derivation:['benghuai','weizhong'], + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.maxHp>game.countPlayer()&&!player.storage.juyi; }, - forced: true, - unique: true, - juexingji: true, - content: function () { + forced:true, + unique:true, + juexingji:true, + content:function(){ player.awakenSkill('juyi'); player.draw(player.maxHp); - player.addSkills(['benghuai', 'weizhong']); + player.addSkills(['benghuai','weizhong']); } }, - weizhong: { - audio: 2, - trigger: { player: ['gainMaxHpEnd', 'loseMaxHpEnd'] }, - forced: true, - content: function () { - player.draw(player.isMinHandcard() ? 2 : 1); + weizhong:{ + audio:2, + trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']}, + forced:true, + content:function(){ + player.draw(player.isMinHandcard()?2:1); }, }, - kuangfu: { - trigger: { source: 'damageSource' }, - audio: 2, - filter: function (event) { - if (event._notrigger.includes(event.player)) return false; - return event.card && event.card.name == 'sha' && event.player.countCards('e'); + kuangfu:{ + trigger:{source:'damageSource'}, + audio:2, + filter:function(event){ + if(event._notrigger.includes(event.player)) return false; + return event.card&&event.card.name=='sha'&&event.player.countCards('e'); }, - logTarget: 'player', - preHidden: true, - check: function (event, player) { - return get.attitude(player, event.player) <= 0; + logTarget:'player', + preHidden:true, + check:function(event,player){ + return get.attitude(player,event.player)<=0; }, - content: function () { + 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) { + 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); + }).set('neg',neg); "step 1" - if (result.bool) { - event.card = result.links[0]; - if (player.canEquip(event.card)) { - player.chooseBool('是否将' + get.translation(event.card) + '置入自己的装备区?').ai = function () { + if(result.bool){ + event.card=result.links[0]; + if(player.canEquip(event.card)){ + player.chooseBool('是否将'+get.translation(event.card)+'置入自己的装备区?').ai=function(){ return true; }; } - else event._result = { bool: false }; + else event._result={bool:false}; } else event.finish(); "step 2" - if (result.bool) { - trigger.player.$give(event.card, player, false); + 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", + "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'].includes(get.type(event.card))) return false; - if (get.tag(event.card, 'damage')) return true; + direct:true, + filter:function(event,player){ + if(event.getParent().triggeredTargets3.length>1) return false; + if(!player.isPhaseUsing()) return false; + if(!['basic','trick'].includes(get.type(event.card))) return false; + if(get.tag(event.card,'damage')) return true; return false; }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('xinfu_lingren'), '选择一名目标角色并猜测其手牌构成', function (card, player, target) { + player.chooseTarget(get.prompt('xinfu_lingren'),'选择一名目标角色并猜测其手牌构成',function(card,player,target){ return _status.event.targets.includes(target); - }).set('ai', function (target) { - return 2 - get.attitude(_status.event.player, target); - }).set('targets', trigger.targets); + }).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, + 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.chooseButton(['凌人:猜测其有哪些类别的手牌', [['basic', 'trick', 'equip'], 'vcard']], [0, 3], true).set('ai', function (button) { - switch (button.link[2]) { + player.chooseButton(['凌人:猜测其有哪些类别的手牌',[['basic','trick','equip'],'vcard']],[0,3],true).set('ai',function(button){ + switch(button.link[2]){ case 'basic': - var rand = 0.95; - if (!target.countCards('h', { type: ['basic'] })) rand = 0.05; - if (!target.countCards('h')) rand = 0; - return Math.random() < rand ? true : false; + var rand=0.95; + if(!target.countCards('h',{type:['basic']})) rand=0.05; + if(!target.countCards('h')) rand=0; + return Math.random() i[2]); - if (!event.isMine() && !event.isOnline()) game.delayx(); - var list = []; - event.num = 0; - ['basic', 'trick', 'equip'].forEach(type => { - if (choices.includes(type) == target.hasCard({ type: type }, 'h')) event.num++; + if(result.bool){ + var choices=result.links.map(i=>i[2]); + if(!event.isMine()&&!event.isOnline()) game.delayx(); + var list=[]; + event.num=0; + ['basic','trick','equip'].forEach(type=>{ + if(choices.includes(type)==target.hasCard({type:type},'h')) event.num++; }) } 'step 3' - player.popup('猜对' + get.cnNumber(event.num) + '项'); - game.log(player, '猜对了' + get.cnNumber(event.num) + '项'); - if (event.num > 0) { + player.popup('猜对'+get.cnNumber(event.num)+'项'); + game.log(player,'猜对了'+get.cnNumber(event.num)+'项'); + if(event.num>0){ target.addTempSkill('lingren_adddamage'); - target.storage.lingren = { - card: trigger.card, + target.storage.lingren={ + card:trigger.card, //player:event.targett, } } - if (event.num > 1) player.draw(2); - if (event.num > 2) { - player.addTempSkills(['lingren_jianxiong', 'lingren_xingshang'], { player: 'phaseBegin' }); + if(event.num>1) player.draw(2); + if(event.num>2){ + player.addTempSkills(['lingren_jianxiong','lingren_xingshang'],{player:'phaseBegin'}); } }, - ai: { - threaten: 2.4, + ai:{ + threaten:2.4, }, }, - "lingren_adddamage": { - onremove: function (player) { + "lingren_adddamage":{ + onremove:function (player){ delete player.storage.lingren; }, - trigger: { - player: "damageBegin3", + trigger:{ + player:"damageBegin3", }, - filter: function (event, player) { - var info = player.storage.lingren; - return event.card && event.card == info.card; + filter:function (event,player){ + var info=player.storage.lingren; + return event.card&&event.card==info.card; }, - silent: true, - popup: false, - forced: true, - charlotte: true, - content: function () { + silent:true, + popup:false, + forced:true, + charlotte:true, + content:function (){ trigger.num++; }, }, - "lingren_jianxiong": { - audio: 1, - trigger: { - player: "damageEnd", + "lingren_jianxiong":{ + audio:1, + trigger:{ + player:"damageEnd", }, - content: function () { + content:function (){ "step 0" - if (get.itemtype(trigger.cards) == 'cards' && get.position(trigger.cards[0], true) == 'o') { - player.gain(trigger.cards, "gain2"); + 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]; + 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', + "lingren_xingshang":{ + audio:1, + inherit:'rexingshang', }, - "xinfu_fujian": { - audio: 2, - trigger: { - player: "phaseJieshuBegin", + "xinfu_fujian":{ + audio:2, + trigger:{ + player:"phaseJieshuBegin", }, - filter: function (event, player) { - return !game.hasPlayer(function (current) { - return current.countCards('h') == 0; + 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; + 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) { + if(event.num<1){ event.finish(); } - else { - var target = list.randomGet(); - var cards = target.getCards('h').randomGets(event.num); + 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); + var content=[get.translation(target)+'的部分手牌',cards]; + game.log(player,'观看了',target,'的部分手牌'); + player.chooseControl('ok').set('dialog',content); } }, }, - xinfu_xionghuo: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return player.countMark('xinfu_xionghuo') > 0; + xinfu_xionghuo:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countMark('xinfu_xionghuo')>0; }, - filterTarget: function (card, player, target) { - return player != target && !target.hasMark('xinfu_xionghuo'); + filterTarget:function(card,player,target){ + return player!=target&&!target.hasMark('xinfu_xionghuo'); }, - content: function () { - player.removeMark('xinfu_xionghuo', 1); - target.addMark('xinfu_xionghuo', 1); + content:function(){ + player.removeMark('xinfu_xionghuo',1); + target.addMark('xinfu_xionghuo',1); }, - ai: { - order: 11, - result: { - target: function (player, target) { - if ((player.countMark('xinfu_xionghuo') >= 2 || !game.hasPlayer(function (current) { - return current != player && get.attitude(player, current) < 0 && current.hasMark('xinfu_xionghuo'); - })) && player.countCards('h', function (card) { - return get.tag(card, 'damage') && player.canUse(card, target, null, true) - && player.getUseValue(card) > 0 && get.effect_use(target, card, player) > 0 - && target.hasSkillTag('filterDamage', null, { - player: player, - card: card, - }); - })) return 3 / Math.max(1, target.hp); - if ((!player.hasUnknown() && game.countPlayer(function (current) { - return get.attitude(player, current) < 0; - }) <= 1) || player.countMark('xinfu_xionghuo') >= 2) { + ai:{ + order:11, + result:{ + target:function(player,target){ + if((player.countMark('xinfu_xionghuo')>=2||!game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)<0&¤t.hasMark('xinfu_xionghuo'); + }))&&player.countCards('h',function(card){ + return get.tag(card,'damage')&&player.canUse(card,target,null,true) + &&player.getUseValue(card)>0&&get.effect_use(target,card,player)>0 + &&target.hasSkillTag('filterDamage',null,{ + player:player, + card:card, + }); + })) return 3/Math.max(1,target.hp); + if((!player.hasUnknown()&&game.countPlayer(function(current){ + return get.attitude(player,current)<0; + })<=1)||player.countMark('xinfu_xionghuo')>=2){ return -1; } return 0; }, }, - effect: { - player: function (card, player, target) { - if (player != target && get.tag(card, 'damage') && target && target.hasMark('xinfu_xionghuo') && !target.hasSkillTag('filterDamage', null, { - player: player, - card: card, - })) return [1, 0, 1, -2]; + effect:{ + player:function(card,player,target){ + if(player!=target&&get.tag(card,'damage')&&target&&target.hasMark('xinfu_xionghuo')&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:card, + })) return [1,0,1,-2]; }, }, - threaten: 1.6, + threaten:1.6, }, - marktext: '戾', - intro: { - name: '暴戾', - content: 'mark', + marktext:'戾', + intro:{ + name:'暴戾', + content:'mark', }, - group: ['xinfu_xionghuo_init', 'xinfu_xionghuo_damage', 'xinfu_xionghuo_effect'], - subSkill: { - init: { - audio: 'xinfu_xionghuo', - trigger: { - global: "phaseBefore", - player: 'enterGame', + group:['xinfu_xionghuo_init','xinfu_xionghuo_damage','xinfu_xionghuo_effect'], + subSkill:{ + init:{ + audio:'xinfu_xionghuo', + trigger:{ + global:"phaseBefore", + player:'enterGame', }, - filter: function (event, player) { - if (player.countMark('xinfu_xionghuo') >= 3) return false; - return event.name != 'phase' || game.phaseNumber == 0; + filter:function(event,player){ + if(player.countMark('xinfu_xionghuo')>=3) return false; + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - locked: false, - content: function () { - player.addMark('xinfu_xionghuo', 3 - player.countMark('xinfu_xionghuo')); + forced:true, + locked:false, + content:function(){ + player.addMark('xinfu_xionghuo',3-player.countMark('xinfu_xionghuo')); }, }, - damage: { - audio: "xinfu_xionghuo", - trigger: { source: 'damageBegin1' }, - filter: function (event, player) { - return event.player.countMark('xinfu_xionghuo') > 0 && event.player != player; + damage:{ + audio:"xinfu_xionghuo", + trigger:{source:'damageBegin1'}, + filter:function(event,player){ + return event.player.countMark('xinfu_xionghuo')>0&&event.player!=player; }, - forced: true, - locked: false, - logTarget: 'player', - content: function () { + forced:true, + locked:false, + logTarget:'player', + content:function(){ trigger.num++; }, }, - effect: { - audio: 'xinfu_xionghuo', - trigger: { global: 'phaseUseBegin' }, - filter: function (event, player) { - return event.player.countMark('xinfu_xionghuo') > 0 && event.player != player; + effect:{ + audio:'xinfu_xionghuo', + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player.countMark('xinfu_xionghuo')>0&&event.player!=player; }, - line: false, - forced: true, - locked: false, - logTarget: 'player', - content: function () { + line:false, + forced:true, + locked:false, + logTarget:'player', + content:function(){ 'step 0' - trigger.player.removeMark('xinfu_xionghuo', trigger.player.countMark('xinfu_xionghuo')); + trigger.player.removeMark('xinfu_xionghuo',trigger.player.countMark('xinfu_xionghuo')); 'step 1' - var num = get.rand(0, 2); - switch (num) { + var num=get.rand(0,2); + switch(num){ case 0: - player.line(trigger.player, 'fire'); + player.line(trigger.player,'fire'); trigger.player.damage('fire'); trigger.player.addTempSkill('xinfu_xionghuo_disable'); - trigger.player.markAuto('xinfu_xionghuo_disable', [player]); + trigger.player.markAuto('xinfu_xionghuo_disable',[player]); break; case 1: - player.line(trigger.player, 'water'); + player.line(trigger.player,'water'); trigger.player.loseHp(); - trigger.player.addMark('xinfu_xionghuo_low', 1, false); + trigger.player.addMark('xinfu_xionghuo_low',1,false); trigger.player.addTempSkill('xinfu_xionghuo_low'); break; case 2: - 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) player.gain(list, trigger.player, 'giveAuto', 'bySelf'); + 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) player.gain(list,trigger.player,'giveAuto','bySelf'); break; } 'step 2' game.delay(); }, }, - disable: { - mod: { - playerEnabled: function (card, player, target) { - if (card.name == 'sha' && player.getStorage('xinfu_xionghuo_disable').includes(target)) return false; + disable:{ + mod:{ + playerEnabled:function (card,player,target){ + if(card.name=='sha'&&player.getStorage('xinfu_xionghuo_disable').includes(target)) return false; }, }, - charlotte: true, - onremove: true, - mark: true, - marktext: '禁', - intro: { content: '不能对$使用【杀】' }, + charlotte:true, + onremove:true, + mark:true, + marktext:'禁', + intro:{content:'不能对$使用【杀】'}, }, - low: { - mod: { - maxHandcard: function (player, num) { - return num - player.countMark('xinfu_xionghuo_low'); + low:{ + mod:{ + maxHandcard:function (player,num){ + return num-player.countMark('xinfu_xionghuo_low'); }, }, - charlotte: true, - onremove: true, - mark: true, - marktext: '减', - intro: { content: '手牌上限-#' }, + charlotte:true, + onremove:true, + mark:true, + marktext:'减', + intro:{content:'手牌上限-#'}, }, }, }, - xinfu_shajue: { - audio: 2, - trigger: { global: 'dying' }, - filter: function (event, player) { - if (event.player == player) return false; - const bool1 = (!player.hasSkill('xinfu_xionghuo') || player.countMark('xinfu_xionghuo') < 3); - const bool2 = (event.player.hp < 0 && get.itemtype(event.parent.cards) == 'cards' && event.parent.cards.some(card => get.position(card, true) == 'o')); - return bool1 || bool2; + xinfu_shajue:{ + audio:2, + trigger:{global:'dying'}, + filter:function(event,player){ + if(event.player==player) return false; + const bool1=(!player.hasSkill('xinfu_xionghuo')||player.countMark('xinfu_xionghuo')<3); + const bool2=(event.player.hp<0&&get.itemtype(event.parent.cards)=='cards'&&event.parent.cards.some(card=>get.position(card,true)=='o')); + return bool1||bool2; }, - forced: true, - content: function () { - if (!player.hasSkill('xinfu_xionghuo') || player.countMark('xinfu_xionghuo') < 3) player.addMark('xinfu_xionghuo', 1); - if (trigger.player.hp < 0 && get.itemtype(trigger.parent.cards) == 'cards' && trigger.parent.cards.some(card => get.position(card, true) == 'o')) { - player.gain(trigger.parent.cards.filter(card => get.position(card, true) == 'o'), 'gain2'); + forced:true, + content:function(){ + if(!player.hasSkill('xinfu_xionghuo')||player.countMark('xinfu_xionghuo')<3) player.addMark('xinfu_xionghuo',1); + if(trigger.player.hp<0&&get.itemtype(trigger.parent.cards)=='cards'&&trigger.parent.cards.some(card=>get.position(card,true)=='o')){ + player.gain(trigger.parent.cards.filter(card=>get.position(card,true)=='o'),'gain2'); } }, }, - xinfu_jianjie: { audio: 3 }, - jianjie: { - group: ["jianjie_use", "jianjie_die"], - derivation: ['jianjie_huoji', 'jianjie_lianhuan', 'jianjie_yeyan'], - audio: 'xinfu_jianjie', - trigger: { - player: "phaseZhunbeiBegin", + xinfu_jianjie:{audio:3}, + jianjie:{ + group:["jianjie_use","jianjie_die"], + derivation:['jianjie_huoji','jianjie_lianhuan','jianjie_yeyan'], + audio:'xinfu_jianjie', + trigger:{ + player:"phaseZhunbeiBegin", }, - forced: true, - locked: false, - filter: function (event, player) { - return player.phaseNumber <= 1 && game.hasPlayer(current => current != player); + forced:true, + locked:false, + filter:function(event,player){ + return player.phaseNumber<=1&&game.hasPlayer(current=>current!=player); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget('荐杰:选择一名其他角色获得“龙印”', lib.filter.notMe, true).set('ai', (target) => { - return get.attitude(get.player(), target); + player.chooseTarget('荐杰:选择一名其他角色获得“龙印”',lib.filter.notMe,true).set('ai',(target)=>{ + return get.attitude(get.player(),target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'fire'); - lib.skill.jianjie.addMark('huoji', player, target); - event.target = target; + if(result.bool){ + var target=result.targets[0]; + player.line(target,'fire'); + lib.skill.jianjie.addMark('huoji',player,target); + event.target=target; game.delayx(); } else event.finish(); 'step 2' - if (game.hasPlayer((current) => { - return current != player && current != target; - })) { - player.chooseTarget('荐杰:选择一名其他角色获得“凤印”', function (card, player, target) { - return target != player && target != _status.event.getParent().target; - }, true).set('ai', (target) => { - return get.attitude(get.player(), target); + if(game.hasPlayer((current)=>{ + return current!=player&¤t!=target; + })){ + player.chooseTarget('荐杰:选择一名其他角色获得“凤印”',function(card,player,target){ + return target!=player&&target!=_status.event.getParent().target; + },true).set('ai',(target)=>{ + return get.attitude(get.player(),target); }); } else event.finish(); 'step 3' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'thunder'); - lib.skill.jianjie.addMark('lianhuan', player, target); + if(result.bool){ + var target=result.targets[0]; + player.line(target,'thunder'); + lib.skill.jianjie.addMark('lianhuan',player,target); game.delayx(); } }, - ai: { - threaten: 3, + ai:{ + threaten:3, }, - hasMark: (mark, player, target) => { - if (!target) return player.getStorage('jianjie_' + mark).length > 0; - return target.getStorage('jianjie_' + mark).includes(player); + hasMark:(mark,player,target)=>{ + if(!target) return player.getStorage('jianjie_'+mark).length>0; + return target.getStorage('jianjie_'+mark).includes(player); }, - addMark: (mark, player, target) => { - mark = 'jianjie_' + mark; - target.addAdditionalSkill(`${mark}_${player.playerid}`, mark); - target.markAuto(mark, [player]); - game.log(player, '令', target, '获得了', `#g“${mark == 'jianjie_huoji' ? '龙印' : '凤印'}”`); + addMark:(mark,player,target)=>{ + mark='jianjie_'+mark; + target.addAdditionalSkill(`${mark}_${player.playerid}`,mark); + target.markAuto(mark,[player]); + game.log(player,'令',target,'获得了',`#g“${mark=='jianjie_huoji'?'龙印':'凤印'}”`); }, - removeMark: (mark, player, target, log) => { - if (lib.skill.jianjie.hasMark(mark, player, target, log)) { - mark = 'jianjie_' + mark; + removeMark:(mark,player,target,log)=>{ + if(lib.skill.jianjie.hasMark(mark,player,target,log)){ + mark='jianjie_'+mark; target.removeAdditionalSkill(`${mark}_${player.playerid}`); - target.unmarkAuto(mark, [player]); - if (log) game.log(target, '移去了', player, '给予的', `#g“${mark == 'jianjie_huoji' ? '龙印' : '凤印'}”`); - else game.log(player, '移去了', target, '的', `#g“${mark == 'jianjie_huoji' ? '龙印' : '凤印'}”`); + target.unmarkAuto(mark,[player]); + if(log) game.log(target,'移去了',player,'给予的',`#g“${mark=='jianjie_huoji'?'龙印':'凤印'}”`); + else game.log(player,'移去了',target,'的',`#g“${mark=='jianjie_huoji'?'龙印':'凤印'}”`); } }, - subSkill: { - use: { - audio: 'xinfu_jianjie', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - if (player.phaseNumber <= 1) return false; - const skill = lib.skill.jianjie; - return game.hasPlayer(function (current) { - return skill.hasMark('huoji', player, current) || skill.hasMark('lianhuan', player, current); + subSkill:{ + use:{ + audio:'xinfu_jianjie', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + if(player.phaseNumber<=1) return false; + const skill=lib.skill.jianjie; + return game.hasPlayer(function(current){ + return skill.hasMark('huoji',player,current)||skill.hasMark('lianhuan',player,current); }); }, - filterTarget: function (card, player, target) { - if (ui.selected.targets.length == 0) { - const skill = lib.skill.jianjie; - return skill.hasMark('huoji', player, target) || skill.hasMark('lianhuan', player, target); + filterTarget:function(card,player,target){ + if(ui.selected.targets.length==0){ + const skill=lib.skill.jianjie; + return skill.hasMark('huoji',player,target)||skill.hasMark('lianhuan',player,target); } return true; }, - selectTarget: 2, - complexSelect: true, - complexTarget: true, - multitarget: true, - prompt: '移动场上的“龙印”或“凤印”', - targetprompt: ['失去印', '获得印'], - content: function () { + selectTarget:2, + complexSelect:true, + complexTarget:true, + multitarget:true, + prompt:'移动场上的“龙印”或“凤印”', + targetprompt:['失去印','获得印'], + content:function(){ 'step 0' - var skill = lib.skill.jianjie; - var bool1 = skill.hasMark('huoji', player, targets[0]), bool2 = skill.hasMark('lianhuan', player, targets[0]); - if (bool1 && bool2) { - player.chooseControl('龙印', '凤印').set('prompt', '选择要移动的“印”'); + var skill=lib.skill.jianjie; + var bool1=skill.hasMark('huoji',player,targets[0]),bool2=skill.hasMark('lianhuan',player,targets[0]); + if(bool1&&bool2){ + player.chooseControl('龙印','凤印').set('prompt','选择要移动的“印”'); } - else { - event._result = { control: (bool1 ? '龙印' : '凤印') } + else{ + event._result={control:(bool1?'龙印':'凤印')} } 'step 1' - var skill = lib.skill.jianjie, mark = (result.control == '龙印' ? 'huoji' : 'lianhuan'); - skill.removeMark(mark, player, targets[0]); - skill.addMark(mark, player, targets[1]); + var skill=lib.skill.jianjie,mark=(result.control=='龙印'?'huoji':'lianhuan'); + skill.removeMark(mark,player,targets[0]); + skill.addMark(mark,player,targets[1]); game.delayx(); }, - ai: { - order: 8, - result: { - target: function (player, target) { - if (ui.selected.targets.length == 0) { - return get.attitude(player, target) < 0 ? -999 : -3; + 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; + else{ + return target.countCards('h')+1; } }, }, - expose: 0.4, + expose:0.4, }, }, - die: { - audio: 'xinfu_jianjie', - trigger: { global: 'die' }, - filter: function (event, player) { - const skill = lib.skill.jianjie; - return skill.hasMark('huoji', player, event.player) || skill.hasMark('lianhuan', player, event.player); + die:{ + audio:'xinfu_jianjie', + trigger:{global:'die'}, + filter:function(event,player){ + const skill=lib.skill.jianjie; + return skill.hasMark('huoji',player,event.player)||skill.hasMark('lianhuan',player,event.player); }, - forced: true, - logTarget: 'player', - content: function () { + forced:true, + logTarget:'player', + content:function(){ 'step 0' - if (lib.skill.jianjie.hasMark('huoji', player, trigger.player)) { - player.chooseTarget('荐杰:选择一名角色获得“龙印”', true).set('ai', (target) => { - return get.attitude(get.player(), target); + if(lib.skill.jianjie.hasMark('huoji',player,trigger.player)){ + player.chooseTarget('荐杰:选择一名角色获得“龙印”',true).set('ai',(target)=>{ + return get.attitude(get.player(),target); }); } else event.goto(2); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'fire'); - lib.skill.jianjie.addMark('huoji', player, target); - event.target = target; + if(result.bool){ + var target=result.targets[0]; + player.line(target,'fire'); + lib.skill.jianjie.addMark('huoji',player,target); + event.target=target; game.delayx(); } else event.finish(); 'step 2' - if (lib.skill.jianjie.hasMark('lianhuan', player, trigger.player)) { - player.chooseTarget('荐杰:选择一名角色获得“凤印”', true).set('ai', (target) => { - return get.attitude(get.player(), target); + if(lib.skill.jianjie.hasMark('lianhuan',player,trigger.player)){ + player.chooseTarget('荐杰:选择一名角色获得“凤印”',true).set('ai',(target)=>{ + return get.attitude(get.player(),target); }); } else event.finish(); 'step 3' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'thunder'); - lib.skill.jianjie.addMark('lianhuan', player, target); + if(result.bool){ + var target=result.targets[0]; + player.line(target,'thunder'); + lib.skill.jianjie.addMark('lianhuan',player,target); game.delayx(); } }, }, - huoji: { - marktext: '龙', - intro: { - name: "龙印", - content: "
  • 出牌阶段限三次。你可以将一张红色牌当作【火攻】使用,且你以此法使用【火攻】的作用效果改为“目标角色随机展示一张手牌A,然后你可以弃置一张与A颜色相同的牌,对目标造成1点火属性伤害”。
  • 若你同时拥有“凤印”,则你视为拥有技能〖业炎〗。(发动〖业炎〗时,弃置所有“龙印”和“凤印”)", + huoji:{ + marktext:'龙', + intro:{ + name:"龙印", + content:"
  • 出牌阶段限三次。你可以将一张红色牌当作【火攻】使用,且你以此法使用【火攻】的作用效果改为“目标角色随机展示一张手牌A,然后你可以弃置一张与A颜色相同的牌,对目标造成1点火属性伤害”。
  • 若你同时拥有“凤印”,则你视为拥有技能〖业炎〗。(发动〖业炎〗时,弃置所有“龙印”和“凤印”)", }, - inherit: 'rehuoji', - usable: 3, - charlotte: true, - viewAsFilter: function (player) { - const storage = player.getStorage('jianjie_huoji'); - if (!storage.some(source => { - return source.isIn() && source.hasSkill('jianjie'); + inherit:'rehuoji', + usable:3, + charlotte:true, + viewAsFilter:function(player){ + const storage=player.getStorage('jianjie_huoji'); + if(!storage.some(source=>{ + return source.isIn()&&source.hasSkill('jianjie'); })) return false; - return player.hasCard(card => get.color(card) == 'red', 'she'); + return player.hasCard(card=>get.color(card)=='red','she'); }, - group: ['jianjie_yeyan', 'jianjie_huoji_effect'], + group:['jianjie_yeyan','jianjie_huoji_effect'], }, - huoji_effect: { - trigger: { player: 'huogongBegin' }, - forced: true, - popup: false, - charlotte: true, - filter: function (event, player) { - return event.skill == 'jianjie_huoji' + huoji_effect:{ + trigger:{player:'huogongBegin'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.skill=='jianjie_huoji' }, - content: function () { + content:function(){ trigger.setContent(lib.skill.olhuoji.huogongContent); }, }, - lianhuan: { - marktext: '凤', - intro: { - name: "凤印", - content: "
  • 出牌阶段限三次。你可以将一张♣牌当作【铁索连环】使用或重铸,且你以此法使用【铁索连环】的目标数上限+1。
  • 若你同时拥有“龙印”,则你视为拥有技能〖业炎〗。(发动〖业炎〗时,弃置所有“龙印”和“凤印”)", + lianhuan:{ + marktext:'凤', + intro:{ + name:"凤印", + content:"
  • 出牌阶段限三次。你可以将一张♣牌当作【铁索连环】使用或重铸,且你以此法使用【铁索连环】的目标数上限+1。
  • 若你同时拥有“龙印”,则你视为拥有技能〖业炎〗。(发动〖业炎〗时,弃置所有“龙印”和“凤印”)", }, - charlotte: true, - usable: 3, - filter: function (event, player) { - const storage = player.getStorage('jianjie_lianhuan'); - if (!storage.some(source => { - return source.isIn() && source.hasSkill('jianjie'); + charlotte:true, + usable:3, + filter:function(event,player){ + const storage=player.getStorage('jianjie_lianhuan'); + if(!storage.some(source=>{ + return source.isIn()&&source.hasSkill('jianjie'); })) return false; - if (!player.hasCard(card => get.suit(card) == 'club', 'she')) return false; - return (event.type == 'phase' || event.filterCard({ name: 'tiesuo' }, player, event)); + if(!player.hasCard(card=>get.suit(card)=='club','she')) return false; + return (event.type=='phase'||event.filterCard({name:'tiesuo'},player,event)); }, - inherit: 'ollianhuan', - group: ['jianjie_yeyan', 'jianjie_lianhuan_effect'], + inherit:'ollianhuan', + group:['jianjie_yeyan','jianjie_lianhuan_effect'], }, - lianhuan_effect: { - trigger: { player: 'useCard2' }, - filter: function (event, player) { - if (event.skill != 'jianjie_lianhuan') return false; - var info = get.info(event.card); - if (info.allowMultiple == false) return false; - if (event.targets && !info.multitarget) { - if (game.hasPlayer(current => { - return !event.targets.includes(current) && lib.filter.targetEnabled2(event.card, player, current); + lianhuan_effect:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.skill!='jianjie_lianhuan') return false; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(current=>{ + return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current); })) return true; } return false; }, - charlotte: true, - forced: true, - popup: false, - content: function () { + charlotte:true, + forced:true, + popup:false, + content:function(){ 'step 0' - player.chooseTarget('是否为' + get.translation(trigger.card) + '额外指定一个目标?', (card, player, target) => { - return !_status.event.sourcex.includes(target) && lib.filter.targetEnabled2(_status.event.card, player, 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); + player.chooseTarget('是否为'+get.translation(trigger.card)+'额外指定一个目标?',(card,player,target)=>{ + return !_status.event.sourcex.includes(target)&&lib.filter.targetEnabled2(_status.event.card,player,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() && !event.isOnline()) game.delayex(); + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayex(); } else event.finish(); 'step 2' - if (result.bool) { - var targets = result.targets; - player.line(targets, 'thunder'); + if(result.bool){ + var targets=result.targets; + player.line(targets,'thunder'); trigger.targets.addArray(targets); - game.log(targets, '也成为了', trigger.card, '的目标'); + game.log(targets,'也成为了',trigger.card,'的目标'); } }, }, - yeyan: { - inherit: 'yeyan', - filter: function (event, player) { - const huoji = player.getStorage('jianjie_huoji'), lianhuan = player.getStorage('jianjie_lianhuan'); - return huoji.length > 0 && lianhuan.some(source => { - return huoji.includes(source) && source.isIn() && source.hasSkill('jianjie'); + yeyan:{ + inherit:'yeyan', + filter:function(event,player){ + const huoji=player.getStorage('jianjie_huoji'),lianhuan=player.getStorage('jianjie_lianhuan'); + return huoji.length>0&&lianhuan.some(source=>{ + return huoji.includes(source)&&source.isIn()&&source.hasSkill('jianjie'); }) }, - contentBefore: function () { + contentBefore:function(){ player.awakenSkill('jianjie_yeyan'); - var skill = lib.skill.jianjie; - var huoji = player.getStorage('jianjie_huoji').slice(0), lianhuan = player.getStorage('jianjie_lianhuan').slice(0); - huoji.forEach(source => { - skill.removeMark('huoji', source, player, true); + var skill=lib.skill.jianjie; + var huoji=player.getStorage('jianjie_huoji').slice(0),lianhuan=player.getStorage('jianjie_lianhuan').slice(0); + huoji.forEach(source=>{ + skill.removeMark('huoji',source,player,true); }); - lianhuan.forEach(source => { - skill.removeMark('lianhuan', source, player, true); + lianhuan.forEach(source=>{ + skill.removeMark('lianhuan',source,player,true); }); }, }, }, }, - xinfu_yinshi: { - audio: 2, - trigger: { player: 'damageBegin4' }, - forced: true, - filter: function (event, player) { - const skill = lib.skill.jianjie; - if (skill.hasMark('huoji', player) || skill.hasMark('lianhuan', player)) return false; - if (!player.hasEmptySlot(2)) return false; - if (event.hasNature()) return true; - return get.type(event.card, 'trick') == 'trick'; + xinfu_yinshi:{ + audio:2, + trigger:{player:'damageBegin4'}, + forced:true, + filter:function (event,player){ + const skill=lib.skill.jianjie; + if(skill.hasMark('huoji',player)||skill.hasMark('lianhuan',player)) return false; + if(!player.hasEmptySlot(2)) return false; + if(event.hasNature()) return true; + return get.type(event.card,'trick')=='trick'; }, - content: function () { + content:function (){ trigger.cancel(); }, - ai: { - notrick: true, - nofire: true, - nothunder: true, - effect: { - target: function (card, player, target, current) { - const skill = lib.skill.jianjie; - if (skill.hasMark('huoji', target) || skill.hasMark('lianhuan', target)) return false; - if (player == target && get.subtype(card) == 'equip2') { - if (get.equipValue(card) <= 8) return 0; + ai:{ + notrick:true, + nofire:true, + nothunder:true, + effect:{ + target:function (card,player,target,current){ + const skill=lib.skill.jianjie; + if(skill.hasMark('huoji',target)||skill.hasMark('lianhuan',target)) return false; + if(player==target&&get.subtype(card)=='equip2'){ + if(get.equipValue(card)<=8) return 0; } - if (!target.hasEmptySlot(2)) return; - if (get.tag(card, 'natureDamage')) return 'zerotarget'; - if (get.type(card) == 'trick' && get.tag(card, 'damage')) { + if(!target.hasEmptySlot(2)) return; + if(get.tag(card,'natureDamage')) return 'zerotarget'; + if(get.type(card)=='trick'&&get.tag(card,'damage')){ return 'zeroplayertarget'; } }, }, }, }, - "xinfu_chenghao": { - audio: 2, - trigger: { - global: "damageEnd", + "xinfu_chenghao":{ + audio:2, + trigger:{ + global:"damageEnd", }, - filter: function (event, player) { - return event.lianhuanable == true && event.player.isIn(); + filter:function (event,player){ + return event.lianhuanable==true&&event.player.isIn(); }, - frequent: true, - content: function () { + frequent:true, + content:function(){ 'step 0' - event.cards = game.cardsGotoOrdering(get.cards(game.countPlayer(function (current) { + event.cards=game.cardsGotoOrdering(get.cards(game.countPlayer(function(current){ return current.isLinked(); - }) + 1)).cards; - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; + })+1)).cards; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; '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; + 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 if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { + if(result.bool){ event.cards.removeArray(result.links); - event.togive = result.links.slice(0); - player.chooseTarget('选择一名角色获得' + get.translation(result.links), true).set('ai', function (target) { - var att = get.attitude(_status.event.player, target); - if (_status.event.enemy) { + event.togive=result.links.slice(0); + player.chooseTarget('选择一名角色获得'+get.translation(result.links),true).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.enemy){ return -att; } - else if (att > 0) { - return att / (1 + target.countCards('h')); + else if(att>0){ + return att/(1+target.countCards('h')); } - else { - return att / 100; + else{ + return att/100; } - }).set('enemy', get.value(event.togive[0], player, 'raw') < 0); + }).set('enemy',get.value(event.togive[0],player,'raw')<0); } 'step 3' - if (result.targets.length) { - var id = result.targets[0].playerid, map = event.given_map; - if (!map[id]) map[id] = []; + if(result.targets.length){ + var id=result.targets[0].playerid,map=event.given_map; + if(!map[id]) map[id]=[]; map[id].addArray(event.togive); } - if (cards.length > 0) event.goto(1); + if(cards.length>0) event.goto(1); 'step 4' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - var list = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - player.line(source, 'green'); - list.push([source, event.given_map[i]]); + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); } game.loseAsync({ - gain_list: list, - giver: player, - animate: 'draw', + gain_list:list, + giver:player, + animate:'draw', }).setContent('gaincardMultiple'); }, }, - "xinfu_wuniang": { - trigger: { - player: ["useCard", "respond"], + "xinfu_wuniang":{ + trigger:{ + player:["useCard","respond"], }, - audio: 2, - direct: true, - filter: function (event, player) { - return event.card.name == 'sha'; + audio:2, + direct:true, + filter:function (event,player){ + return event.card.name=='sha'; }, - content: function () { + 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); + 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 current.name == 'guansuo' || current.name2 == 'guansuo'; + 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 current.name=='guansuo'||current.name2=='guansuo'; }); - player.gainPlayerCard(target, 'he', true); + player.gainPlayerCard(target,'he',true); } else event.finish(); 'step 2' - game.asyncDraw(event.draws, 1); + game.asyncDraw(event.draws,1); game.delay(); }, }, - "xinfu_xushen": { - derivation: ["xinfu_zhennan"], - audio: 2, - subSkill: { - count: { - trigger: { - player: "recoverBegin", + "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.hasSex('male')) return false; - if (!player.isDying()) return false; - if (game.hasPlayer(function (current) { - return current.name == 'guansuo' || current.name2 == 'guansuo'; + forced:true, + silent:true, + popup:false, + filter:function (event,player){ + if(!event.card||event.card.name!='tao') return false; + if(!event.source||!event.source.hasSex('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; + content:function (){ + trigger.xinfu_xushen=true; }, - sub: true, + sub:true, }, }, - group: ["xinfu_xushen_count"], - trigger: { - player: "recoverAfter", + group:["xinfu_xushen_count"], + trigger:{ + player:"recoverAfter", }, - limited: true, - init: function (player) { - player.storage.xinfu_xushen = false; + 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; + 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 () { + direct:true, + skillAnimation:true, + animationColor:'fire', + content:function (){ "step 0" - trigger.source.chooseBool('【许身】:是否将自己的一张武将牌替换为“关索”?').set('ai', function () { + trigger.source.chooseBool('【许身】:是否将自己的一张武将牌替换为“关索”?').set('ai',function(){ return false; }); "step 1" - if (result.bool) { + if(result.bool){ player.awakenSkill('xinfu_xushen'); - player.logSkill('xinfu_xushen', trigger.source); - if (trigger.source.name2 != undefined) { - trigger.source.chooseControl(trigger.source.name1, trigger.source.name2).set('prompt', '请选择要更换的武将牌'); - } else event._result = { control: trigger.source.name1 }; + player.logSkill('xinfu_xushen',trigger.source); + if(trigger.source.name2!=undefined){ + trigger.source.chooseControl(trigger.source.name1,trigger.source.name2).set('prompt','请选择要更换的武将牌'); + }else event._result={control:trigger.source.name1}; } else event.finish(); "step 2" - trigger.source.reinitCharacter(result.control, 'guansuo'); + trigger.source.reinitCharacter(result.control,'guansuo'); player.recover(); player.addSkills('xinfu_zhennan'); }, - mark: true, - intro: { - content: "limited", + mark:true, + intro:{ + content:"limited", }, }, - "xinfu_falu": { - subSkill: { - spade: { - marktext: '♠︎️', - intro: { - name: '紫薇', - content: 'mark', + "xinfu_falu":{ + subSkill:{ + spade:{ + marktext:'♠︎️', + intro:{ + name:'紫薇', + content:'mark', }, }, - heart: { - marktext: '♥︎️', - intro: { - name: '玉清', - content: 'mark', + heart:{ + marktext:'♥︎️', + intro:{ + name:'玉清', + content:'mark', }, }, - club: { - marktext: '♣︎️', - intro: { - name: '后土', - content: 'mark', + club:{ + marktext:'♣︎️', + intro:{ + name:'后土', + content:'mark', }, }, - diamond: { - marktext: '♦︎', - intro: { - name: '勾陈', - content: 'mark', + diamond:{ + marktext:'♦︎', + intro:{ + name:'勾陈', + content:'mark', }, }, }, - forced: true, - audio: 2, - trigger: { - player: ["loseAfter", "enterGame"], - global: ['loseAsyncAfter', "phaseBefore"], + forced:true, + audio:2, + trigger:{ + player:["loseAfter","enterGame"], + global:['loseAsyncAfter',"phaseBefore"], }, - filter: function (event, player) { - if (event.name.indexOf('lose') != 0) return (event.name != 'phase' || game.phaseNumber == 0); - if (event.type != 'discard' || event.getlx === false) return false; - var evt = event.getl(player); - for (var i = 0; i < evt.cards2.length; i++) { - if (!player.hasMark('xinfu_falu_' + get.suit(evt.cards2[i]))) return true; + filter:function (event,player){ + if(event.name.indexOf('lose')!=0) return (event.name!='phase'||game.phaseNumber==0); + if(event.type!='discard'||event.getlx===false) return false; + var evt=event.getl(player); + for(var i=0;i 0)) break; + while(cards.length){ + if((get.value(cards[0],player)<=5)==(att>0)) break; top.unshift(cards.shift()); } } - bottom = cards; - return [top, bottom]; + bottom=cards; + return [top,bottom]; } "step 1" - var top = result.moved[0]; - var bottom = result.moved[1]; + var top=result.moved[0]; + var bottom=result.moved[1]; top.reverse(); - for (var i = 0; i < top.length; i++) { - ui.cardPile.insertBefore(top[i], ui.cardPile.firstChild); + for(var i=0;i 0) return list[0]; + if((getj(list[0])-res1)*attitude>0) return list[0]; return 'cancel2'; - }).set('judging', trigger.player.judging[0]); + }).set('judging',trigger.player.judging[0]); "step 1" - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.addExpose(0.25); player.removeMark('xinfu_falu_spade'); - player.logSkill('xinfu_zhenyi', trigger.player); + player.logSkill('xinfu_zhenyi',trigger.player); //player.line(trigger.player); player.popup(result.control); - game.log(player, '将判定结果改为了', '#y' + get.translation(result.control + 2) + 5); - trigger.fixedResult = { - suit: result.control, - color: get.color({ suit: result.control }), - number: 5, + game.log(player,'将判定结果改为了','#y'+get.translation(result.control+2)+5); + trigger.fixedResult={ + suit:result.control, + color:get.color({suit:result.control}), + number:5, }; } }, - ai: { - rejudge: true, - tag: { - rejudge: 1, + ai:{ + rejudge:true, + tag:{ + rejudge:1, }, - expose: 0.5, + expose:0.5, }, }, - "zhenyi_club": { - audio: 'xinfu_zhenyi', - enable: "chooseToUse", - viewAsFilter: function (player) { - if (player == _status.currentPhase) return false; - return player.hasMark('xinfu_falu_club') && player.countCards('hs') > 0; + "zhenyi_club":{ + audio:'xinfu_zhenyi', + enable:"chooseToUse", + viewAsFilter:function(player){ + if(player==_status.currentPhase) return false; + return player.hasMark('xinfu_falu_club')&&player.countCards('hs')>0; }, - filterCard: true, - position: "hs", - viewAs: { - name: "tao", + filterCard:true, + position:"hs", + viewAs:{ + name:"tao", }, - prompt: "弃置「后土♣」标记,将一张手牌当桃使用", - check: function (card) { return 15 - get.value(card) }, - precontent: function () { + prompt:"弃置「后土♣」标记,将一张手牌当桃使用", + check:function(card){return 15-get.value(card)}, + precontent:function(){ player.removeMark('xinfu_falu_club'); }, }, - zhenyi_heart: { - trigger: { - source: "damageBegin1", + zhenyi_heart:{ + trigger:{ + source:"damageBegin1", }, - audio: 'xinfu_zhenyi', - filter: function (event, player) { + audio:'xinfu_zhenyi', + filter:function (event,player){ return player.hasMark('xinfu_falu_heart'); }, - check: function (event, player) { - if (get.attitude(player, event.player) >= 0) return false; - if (event.player.hasSkillTag('filterDamage', null, { - player: player, - card: event.card, + check:function (event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(event.player.hasSkillTag('filterDamage',null,{ + player:player, + card:event.card, })) return false; return true; //return player.hasMark('xinfu_falu_spade')||get.color(ui.cardPile.firstChild)=='black'; }, - prompt2: function (event) { - return '弃置「玉清♥」标记,令对' + get.translation(event.player) + '即将造成的伤害+1。'; + prompt2:function(event){ + return '弃置「玉清♥」标记,令对'+get.translation(event.player)+'即将造成的伤害+1。'; }, - logTarget: "player", - content: function () { + logTarget:"player", + content:function(){ player.removeMark('xinfu_falu_heart'); trigger.num++; }, }, - "xinfu_zhennan": { - audio: 2, - trigger: { - target: "useCardToTargeted", + "xinfu_zhennan":{ + audio:2, + trigger:{ + target:"useCardToTargeted", }, - filter: function (event, player) { - return event.card.name == 'nanman'; + filter:function (event,player){ + return event.card.name=='nanman'; }, - direct: true, - content: function () { + 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); + 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) { + 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.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, + ai:{ + expose:0.25, }, }, }, - dynamicTranslate: { - shanduan: function (player) { - if (player.storage.shanduan) return '锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=[' + get.translation(player.storage.shanduan) + ']中分配数值。②当你于回合外受到伤害后,你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。'; + dynamicTranslate:{ + shanduan:function(player){ + if(player.storage.shanduan) return '锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=['+get.translation(player.storage.shanduan)+']中分配数值。②当你于回合外受到伤害后,你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。'; return '锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=[1,2,3,4]中分配数值。②当你于回合外受到伤害后,你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。'; }, - kunfen: function (player) { - if (player.storage.kunfen) return '结束阶段开始时,你可以失去1点体力,然后摸两张牌。'; + kunfen:function(player){ + if(player.storage.kunfen) return '结束阶段开始时,你可以失去1点体力,然后摸两张牌。'; return '锁定技,结束阶段开始时,你失去1点体力,然后摸两张牌。'; }, - jieyuan: function (player) { - var str = '当你对一名其他角色造成伤害时,' - if (!player.hasSkill('fenxin_fan')) str += '若其体力值大于或等于你的体力值,'; - str += '你可弃置一张'; - if (!player.hasSkill('fenxin_nei')) str += '黑色手'; - str += '牌,令此伤害+1;当你受到一名其他角色造成的伤害时,'; - if (!player.hasSkill('fenxin_zhong')) str += '若其体力值大于或等于你的体力值,'; - str += '你可弃置一张' - if (!player.hasSkill('fenxin_nei')) str += '红色手'; - str += '牌,令此伤害-1。'; + jieyuan:function(player){ + var str='当你对一名其他角色造成伤害时,' + if(!player.hasSkill('fenxin_fan')) str+='若其体力值大于或等于你的体力值,'; + str+='你可弃置一张'; + if(!player.hasSkill('fenxin_nei')) str+='黑色手'; + str+='牌,令此伤害+1;当你受到一名其他角色造成的伤害时,'; + if(!player.hasSkill('fenxin_zhong')) str+='若其体力值大于或等于你的体力值,'; + str+='你可弃置一张' + if(!player.hasSkill('fenxin_nei')) str+='红色手'; + str+='牌,令此伤害-1。'; return str; }, - youlong: function (player) { - if (player.storage.youlong) return '转换技,阴,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的普通锦囊牌;阳,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的基本牌。'; + youlong:function(player){ + if(player.storage.youlong) return '转换技,阴,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的普通锦囊牌;阳,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的基本牌。'; return '转换技,阴,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的普通锦囊牌;阳,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的基本牌。'; }, - luochong: function (player) { - var storage = player.getStorage('luochong'); - var str = '准备阶段开始时/当你于一回合首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):' - var choiceList = [ + luochong:function(player){ + var storage=player.getStorage('luochong'); + var str='准备阶段开始时/当你于一回合首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):' + var choiceList=[ '⒈令一名角色回复1点体力。', '⒉令一名角色失去1点体力。', '⒊令一名角色弃置两张牌。', '⒋令一名角色摸两张牌。' ]; - for (var i = 0; i < 4; i++) { - if (storage.includes(i)) { - choiceList[i] = ('' + choiceList[i] + ''); + for(var i=0;i<4;i++){ + if(storage.includes(i)){ + choiceList[i]=(''+choiceList[i]+''); } - str += choiceList[i]; + str+=choiceList[i]; } return str; }, - spmanwang: function (player) { - var num = 4 - player.countMark('spmanwang'); - var str = '出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前X项:'; - var list = [ + spmanwang:function(player){ + var num=4-player.countMark('spmanwang'); + var str='出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前X项:'; + var list=[ '⒈获得〖叛侵〗。', '⒉摸一张牌。', '⒊回复1点体力。', '⒋摸两张牌并失去〖叛侵〗。', ]; - for (var i = 0; i < 4; i++) { - if (i == num) { - str += ''; + for(var i=0;i<4;i++){ + if(i==num){ + str+=''; } - str += list[i]; + str+=list[i]; } - if (num < 4) str += ''; + if(num<4) str+=''; return str; }, - olbixin: function (player) { - var count = player.countMark('olbixin'); - if (count < 3) return lib.translate.olbixin_info.slice(count * 5); + olbixin:function(player){ + var count=player.countMark('olbixin'); + if(count<3) return lib.translate.olbixin_info.slice(count*5); return '你可以声明一种牌的类型(每种类型限[3]次),并选择一种你本轮未使用过且有合法目标的的基本牌。你摸[1]张牌,然后若你有此类型的手牌,你将所有此类型的手牌当此基本牌使用。'; }, - olfeibai: function (player) { - if (player.storage.olfeibai) return '转换技,锁定技。阴:当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1;阳:当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。'; + olfeibai:function(player){ + if(player.storage.olfeibai) return '转换技,锁定技。阴:当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1;阳:当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。'; return '转换技,锁定技。阴:当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1;阳:当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。' }, - olmiuyan: function (player) { - if (player.storage.olmiuyan) return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的牌;处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。'; + olmiuyan:function(player){ + if(player.storage.olmiuyan) return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的牌;处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。'; return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的牌;处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。'; }, - olsaogu: function (player) { - if (player.storage.olsaogu) return '转换技。①出牌阶段,你可以。阴:弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。'; + olsaogu:function(player){ + if(player.storage.olsaogu) return '转换技。①出牌阶段,你可以。阴:弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。'; return '转换技。①出牌阶段,你可以。阴:弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。'; }, - oldongdao: function (player) { - if (player.storage.oldongdao) return '农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。'; + oldongdao:function(player){ + if(player.storage.oldongdao) return '农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。'; return '农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。'; }, - ollangdao: function (player) { - var str = '当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:'; - var list = [ + ollangdao:function(player){ + var str='当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:'; + var list=[ '1.令此【杀】伤害基数+1;', '2.令你可以为此【杀】多选择一个目标;', '3.令此【杀】不可被响应。' ]; - var storage = player.getStorage('ollangdao'); - list.forEach((item, index) => { - if (storage.includes(index)) { - str += `${item}`; + var storage=player.getStorage('ollangdao'); + list.forEach((item,index)=>{ + if(storage.includes(index)){ + str+=`${item}`; } - else str += item; + else str+=item; }) - str += '然后若没有角色因此【杀】死亡,你移除本次被选择的项。'; + str+='然后若没有角色因此【杀】死亡,你移除本次被选择的项。'; return str; }, }, - characterReplace: { - guanyinping: ['guanyinping', 'old_guanyinping'], - shixie: ['shixie', 'dc_shixie', 'old_shixie'], - caoshuang: ['caoshuang', 'ns_caoshuang'], - caoang: ['caoang', 'yj_caoang', 'tw_caoang'], - caohong: ['caohong', 'tw_re_caohong', 'tw_caohong', 'yj_caohong'], - xiahouba: ['xiahouba', 'dc_xiahouba', 'tw_xiahouba'], - maliang: ['maliang', 're_maliang', 'tw_maliang', 'ol_maliang', 'old_maliang'], - dingfeng: ['dingfeng', 'tw_dingfeng', 'old_dingfeng'], - zumao: ['zumao', 'tw_zumao'], - tw_beimihu: ['beimihu', 'tw_beimihu'], - panfeng: ['panfeng', 're_panfeng', 'std_panfeng'], - sunluyu: ['sunluyu', 're_sunluyu', 'mb_sunluyu'], - jin_simazhao: ['jin_simazhao', 'simazhao', 'sp_simazhao'], - jin_wangyuanji: ['jin_wangyuanji', 'wangyuanji', 'sp_wangyuanji'], - wangyun: ['wangyun', 'dc_wangyun', 're_wangyun', 'jsrg_wangyun', 'old_wangyun', 'pe_wangyun'], - zhangliang: ['xin_zhangliang', 're_zhangliang', 'zhangliang'], - lingju: ['lingju', 'old_lingju'], - guansuo: ['guansuo', 'dc_guansuo'], - zhangxingcai: ['zhangxingcai', 'old_zhangxingcai'], - lisu: ['ol_lisu', 'lisu'], - fuwan: ['fuwan', 'tw_fuwan', 'sp_fuwan'], - huaxin: ['ol_huaxin', 'huaxin', 'sp_huaxin'], - xujing: ['xujing', 'dc_xujing', 'sp_xujing', 'tw_xujing'], - zhaoxiang: ['zhaoxiang', 'dc_zhaoxiang', 'tw_zhaoxiang'], - dengzhi: ['ol_dengzhi', 're_dengzhi', 'dengzhi', 'tw_dengzhi'], - wangrong: ['ol_wangrong', 'wangrong'], - zongyu: ['zongyu', 'sp_zongyu', 'tw_zongyu'], - ol_dongzhao: ['ol_dongzhao', 'dc_dongzhao', 'tw_dongzhao'], - mayunlu: ['mayunlu', 'tw_mayunlu'], - zhuling: ['ol_zhuling', 'dc_zhuling', 'zhuling'], - zangba: ['zangba', 'tw_zangba'], - zhangbao: ['zhangbao', 're_zhangbao'], - jianggan: ['jianggan', 'sp_jianggan'], - dc_jiben: ['dc_jiben', 'sp_jiben'], - yangyi: ['ol_yangyi', 'yangyi', 'tw_yangyi'], - tianyu: ['tianyu', 'tw_tianyu'], - huangchengyan: ['huangchengyan', 'dc_huangchengyan'], - puyuan: ['ol_puyuan', 'puyuan'], - huangzu: ['huangzu', 'dc_huangzu'], - huojun: ['huojun', 'dc_huojun', 'xin_huojun', 'tw_huojun'], - zhaoyǎn: ['zhaoyǎn', 'dc_zhaoyǎn'], - furong: ['ol_furong', 'furong', 'tw_furong'], - daxiaoqiao: ['daxiaoqiao', 'dc_daxiaoqiao', 'tw_daxiaoqiao'], - zhugeguo: ['zhugeguo', 'tw_zhugeguo'], - wanglang: ['ol_wanglang', 'wanglang', 'old_wanglang'], - tengfanglan: ['tengfanglan', 'dc_tengfanglan'], - zhangyì: ['ol_zhangyì', 'zhangyì'], - yuantanyuanshang: ['yuantanyuanshang', 'yuantanyuanxiyuanshang'], - ruiji: ['ruiji', 'dc_ruiji'], - jsp_huangyueying: ['jsp_huangyueying', 're_jsp_huangyueying'], - ganfuren: ['ganfuren', 'dc_ganfuren', 'jsp_ganfuren'], - wenqin: ['wenqin', 'pe_wenqin'], - zhouqun: ['ol_zhouqun', 'zhouqun'], - qianzhao: ['ol_qianzhao', 'qianzhao'], - ol_pengyang: ['ol_pengyang', 'sp_pengyang'], - ol_luyusheng: ['ol_luyusheng', 'luyusheng'], - fanjiangzhangda: ['fanjiangzhangda', 'jsrg_fanjiangzhangda'], - simalang: ['re_simalang', 'simalang'], - zhugedan: ['re_zhugedan', 'zhugedan'], - zhangren: ['jsrg_zhangren', 'zhangren'], - wenqin: ['ol_wenqin', 'pe_wenqin'], + characterReplace:{ + guanyinping:['guanyinping','old_guanyinping'], + shixie:['shixie','dc_shixie','old_shixie'], + caoshuang:['caoshuang','ns_caoshuang'], + caoang:['caoang','yj_caoang','tw_caoang'], + caohong:['caohong','tw_re_caohong','tw_caohong','yj_caohong'], + xiahouba:['xiahouba','dc_xiahouba','tw_xiahouba'], + maliang:['maliang','re_maliang','tw_maliang','ol_maliang','old_maliang'], + dingfeng:['dingfeng','tw_dingfeng','old_dingfeng'], + zumao:['zumao','tw_zumao'], + tw_beimihu:['beimihu','tw_beimihu'], + panfeng:['panfeng','re_panfeng','std_panfeng'], + sunluyu:['sunluyu','re_sunluyu','mb_sunluyu'], + jin_simazhao:['jin_simazhao','simazhao','sp_simazhao'], + jin_wangyuanji:['jin_wangyuanji','wangyuanji','sp_wangyuanji'], + wangyun:['wangyun','dc_wangyun','re_wangyun','jsrg_wangyun','old_wangyun','pe_wangyun'], + zhangliang:['xin_zhangliang','re_zhangliang','zhangliang'], + lingju:['lingju','old_lingju'], + guansuo:['guansuo','dc_guansuo'], + zhangxingcai:['zhangxingcai','old_zhangxingcai'], + lisu:['ol_lisu','lisu'], + fuwan:['fuwan','tw_fuwan','sp_fuwan'], + huaxin:['ol_huaxin','huaxin','sp_huaxin'], + xujing:['xujing','dc_xujing','sp_xujing','tw_xujing'], + zhaoxiang:['zhaoxiang','dc_zhaoxiang','tw_zhaoxiang'], + dengzhi:['ol_dengzhi','re_dengzhi','dengzhi','tw_dengzhi'], + wangrong:['ol_wangrong','wangrong'], + zongyu:['zongyu','sp_zongyu','tw_zongyu'], + ol_dongzhao:['ol_dongzhao','dc_dongzhao','tw_dongzhao'], + mayunlu:['mayunlu','tw_mayunlu'], + zhuling:['ol_zhuling','dc_zhuling','zhuling'], + zangba:['zangba','tw_zangba'], + zhangbao:['zhangbao','re_zhangbao'], + jianggan:['jianggan','sp_jianggan'], + dc_jiben:['dc_jiben','sp_jiben'], + yangyi:['ol_yangyi','yangyi','tw_yangyi'], + tianyu:['tianyu','tw_tianyu'], + huangchengyan:['huangchengyan','dc_huangchengyan'], + puyuan:['ol_puyuan','puyuan'], + huangzu:['huangzu','dc_huangzu'], + huojun:['huojun','dc_huojun','xin_huojun','tw_huojun'], + zhaoyǎn:['zhaoyǎn','dc_zhaoyǎn'], + furong:['ol_furong','furong','tw_furong'], + daxiaoqiao:['daxiaoqiao','dc_daxiaoqiao','tw_daxiaoqiao'], + zhugeguo:['zhugeguo','tw_zhugeguo'], + wanglang:['ol_wanglang','wanglang','old_wanglang'], + tengfanglan:['tengfanglan','dc_tengfanglan'], + zhangyì:['ol_zhangyì','zhangyì'], + yuantanyuanshang:['yuantanyuanshang','yuantanyuanxiyuanshang'], + ruiji:['ruiji','dc_ruiji'], + jsp_huangyueying:['jsp_huangyueying','re_jsp_huangyueying'], + ganfuren:['ganfuren','dc_ganfuren','jsp_ganfuren'], + wenqin:['wenqin','pe_wenqin'], + zhouqun:['ol_zhouqun','zhouqun'], + qianzhao:['ol_qianzhao','qianzhao'], + ol_pengyang:['ol_pengyang','sp_pengyang'], + ol_luyusheng:['ol_luyusheng','luyusheng'], + fanjiangzhangda:['fanjiangzhangda','jsrg_fanjiangzhangda'], + simalang:['re_simalang','simalang'], + zhugedan:['re_zhugedan','zhugedan'], + zhangren:['jsrg_zhangren','zhangren'], + wenqin:['ol_wenqin','pe_wenqin'], }, - translate: { - "xinfu_lingren": "凌人", - "xinfu_lingren_info": "每回合限一次。当你于出牌阶段内使用带有「伤害」标签的基本牌或普通锦囊牌指定目标后,你可以猜测其中的一个目标的手牌中是否有基本牌,锦囊牌或装备牌。若你猜中的项目数:≥1,此牌对该角色的伤害+1;≥2,你摸两张牌;≥3,你获得技能〖奸雄〗和〖行殇〗直到你的下回合开始。", - "lingren_adddamage": "凌人", - "lingren_adddamage_info": "", - "lingren_jianxiong": "奸雄", - "lingren_jianxiong_info": "当你受到伤害后,你可以获得对你造成伤害的牌并摸一张牌。", - "lingren_xingshang": "行殇", - "lingren_xingshang_info": "当有角色死亡后,你可以选择一项:1.回复1点体力。2.获得该角色的所有牌。", - "xinfu_fujian": "伏间", - "xinfu_fujian_info": "锁定技,结束阶段开始时,你观看一名随机的其他角色的随机X张手牌。(X为场上手牌最少的角色的手牌数)", - xinfu_xionghuo: '凶镬', - xinfu_xionghuo_info: '游戏开始时,你获得3个“暴戾”标记(标记上限为3)。出牌阶段,你可以交给一名其他角色一个“暴戾”标记。当你对有“暴戾”标记的其他角色造成伤害时,此伤害+1。有“暴戾”标记的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其一张手牌和一张装备区的牌。', - xinfu_shajue: '杀绝', - xinfu_shajue_info: '锁定技,其他角色进入濒死状态时,你获得一个“暴戾”标记。然后若其体力值小于0,你获得使其进入濒死状态的牌。', - xinfu_jianjie: "荐杰", - jianjie: '荐杰', - jianjie_info: '①你的第一个准备阶段开始时,你令一名其他角色获得“龙印”,然后令另一名其他角色获得“凤印”。②出牌阶段限一次。若当前回合不是你的第一个回合,则你可以移动场上的“龙印”或“凤印”。③拥有“龙印”或“凤印”的其他角色死亡时,你转移该角色的“龙印”和“凤印”。④拥有“龙印”/“凤印”的角色视为拥有〖火计〗/〖连环〗,且同时拥有这两种标记的角色视为拥有〖业炎〗。', - jianjie_huoji: '火计', - jianjie_huoji_effect: '火计', - jianjie_huoji_info: '出牌阶段限三次。你可以将一张红色牌当作【火攻】使用,且你以此法使用【火攻】的作用效果改为“目标角色随机展示一张手牌A,然后你可以弃置一张与A颜色相同的牌,对目标造成1点火属性伤害”。', - jianjie_lianhuan: '连环', - jianjie_lianhuan_effect: '连环', - jianjie_lianhuan_info: '出牌阶段限三次。你可以将一张♣牌当作【铁索连环】使用或重铸,且你以此法使用【铁索连环】的目标数上限+1。', - jianjie_yeyan: '业炎', - jianjie_yeyan_info: '限定技。出牌阶段,你可以移去你所有的“龙印”和“凤印”,对一至三名角色造成至多共3点火焰伤害(你可以任意分配每名目标角色受到的伤害点数),若你将对一名角色分配2点或更多的火焰伤害,你须先弃置四张不同花色的手牌再失去3点体力。', - xinfu_yinshi: "隐士", - xinfu_yinshi_info: "锁定技,若你没有“龙印”和“凤印”且防具栏为空,则当你受到属性伤害或锦囊牌造成的伤害时,防止此伤害。", - xinfu_chenghao: "称好", - xinfu_chenghao_info: "当一名角色受到属性伤害后,若其存活且其武将牌横置且是伤害传导的起点,则你可以观看牌堆顶的X张牌并分配给任意角色。(X为横置的角色数量且包含该角色)", - "jianjie_faq": "关于龙凤印", - "jianjie_faq_info": "龙印效果:视为拥有〖火计〗。凤印效果:视为拥有〖连环〗。(均一回合限使用三次) 龙凤印齐全:视为拥有〖业炎〗,〖业炎〗发动后移除龙凤印。", - "xinfu_wuniang": "武娘", - "xinfu_wuniang_info": "当你使用或打出【杀】时,你可以获得一名其他角色的一张牌。若如此做,该角色和场上所有的“关索”各摸一张牌。", - "xinfu_xushen": "许身", - "xinfu_xushen_info": "限定技,当一名男性角色使用【桃】令你脱离濒死状态时,若场上没有“关索”,则其可以将自己的一张武将牌变更为“关索”。然后你回复1点体力,并获得技能〖镇南〗。", - "xinfu_zhennan": "镇南", - "xinfu_zhennan_info": "当你成为【南蛮入侵】的目标时,你可以对一名其他角色造成1-3点随机伤害。", - "xinfu_falu": "法箓", - "xinfu_falu_info": "锁定技,游戏开始时,你获得「紫薇」「后土」「玉清」「勾陈」标记各一个。当你的牌因弃置而进入弃牌堆后,根据这些牌的花色,你获得对应的标记:黑桃,你获得1枚「紫薇」;梅花,你获得1枚「后土」;红桃,你获得1枚「玉清」;方块,你获得1枚「勾陈」。(每种标记限拥有1个)", - "xinfu_dianhua": "点化", - "xinfu_dianhua_info": "准备阶段或结束阶段,你可以观看牌堆顶的X张牌(X为你的「紫薇」「后土」「玉清」「勾陈」标记数的总和)。若如此做,你将这些牌以任意顺序放回牌堆顶或牌堆底。", - "xinfu_zhenyi": "真仪", - "xinfu_zhenyi_info": "你可以在以下时机弃置相应的标记来发动以下效果:一名角色的判定牌生效前,你可以弃置一枚「紫薇」,然后将判定结果改为任意花色且点数为5;你的回合外,你可以弃置一枚「后土」,然后将你的一张手牌当【桃】使用;当你造成伤害时,你可以弃置一枚「玉清」,然后令此伤害+1;当你受到伤害后,你可以弃置一张「勾陈」,然后你从牌堆中随机获得三种类型的牌各一张。", - "zhenyi_spade": "真仪", - "zhenyi_spade_info": "", - "zhenyi_club": "真仪", - "zhenyi_club_info": "", - "zhenyi_heart": "真仪", - "zhenyi_heart_info": "", - zhangren: '张任', - zoushi: '邹氏', - zangba: '臧霸', - gz_jiling: '纪灵', - gz_sp_dongzhuo: '董卓', - gz_zhangjiao: '张角', - litong: '李通', - mizhu: '糜竺', - buzhi: '步骘', - chenlin: '陈琳', - yuanshu: 'SP袁术', - yuanshu_prefix: 'SP', - gongsunzan: '公孙瓒', - sp_diaochan: 'SP貂蝉', - sp_diaochan_prefix: 'SP', - yangxiu: '杨修', - sp_zhaoyun: 'SP赵云', - sp_zhaoyun_prefix: 'SP', - caohong: '曹洪', - liuxie: '刘协', - xiahouba: '夏侯霸', - zhugejin: '诸葛瑾', - zhugeke: '诸葛恪', - guanyinping: '关银屏', - sunhao: '孙皓', - chengyu: '程昱', - simalang: '司马朗', - gz_tianfeng: '田丰', - sp_jiaxu: 'SP贾诩', - sp_jiaxu_prefix: 'SP', - maliang: '马良', - sp_caoren: 'SP曹仁', - sp_caoren_prefix: 'SP', - yuejin: '乐进', - mifuren: '糜夫人', - sp_dongzhuo: 'SP董卓', - sp_dongzhuo_prefix: 'SP', - gz_chendong: '陈武董袭', - gz_jiangfei: '蒋琬费祎', - gz_jiangqing: '蒋钦', - hetaihou: '何太后', - dingfeng: '丁奉', - zhangxingcai: '张星彩', - caoang: '曹昂', - gz_kongrong: '孔融', - fuwan: '伏完', - sp_pangde: 'SP庞德', - sp_pangde_prefix: 'SP', - sp_sunshangxiang: 'SP孙尚香', - sp_sunshangxiang_prefix: 'SP', - zhugedan: '诸葛诞', - sp_machao: 'SP马超', - sp_machao_prefix: 'SP', - sp_jiangwei: 'SP姜维', - sp_jiangwei_prefix: 'SP', - zhangbao: '张宝', - yangxiou: '杨修', - shixie: '士燮', - mayunlu: '马云騄', - zhanglu: '张鲁', - wutugu: '兀突骨', - gz_mateng: '马腾', - sp_caiwenji: 'SP蔡琰', - sp_caiwenji_prefix: 'SP', - zhugeguo: '诸葛果', - lingcao: '凌操', - lingju: '灵雎', - lifeng: '李丰', - jsp_guanyu: 'SP关羽', - jsp_guanyu_prefix: 'SP', - zhuling: '朱灵', - sunluyu: 'OL孙鲁育', - sunluyu_prefix: 'OL', - hanba: '旱魃', - gz_panfeng: '潘凤', - zumao: '祖茂', - daxiaoqiao: '大乔小乔', - cuiyan: '崔琰', - wenpin: '文聘', - jsp_huangyueying: 'SP黄月英', - jsp_huangyueying_prefix: 'SP', - guansuo: '关索', - tadun: '蹋顿', - yanbaihu: '严虎', - wanglang: '王朗', - caochun: '曹纯', - dongbai: 'OL董白', - dongbai_prefix: 'OL', - zhaoxiang: '赵襄', - heqi: '贺齐', - kanze: 'OL阚泽', - kanze_prefix: 'OL', - dongyun: '董允', - mazhong: '马忠', - huangfusong: '皇甫嵩', - wangyun: '王允', - sunqian: '孙乾', - xizhicai: '戏志才', - beimihu: '卑弥呼', - luzhi: '鲁芝', - bianfuren: '卞夫人', - ol_bianfuren: '卞夫人', - shamoke: '沙摩柯', - lvfan: '吕范', - liqueguosi: '李傕郭汜', - cuimao: '崔琰毛玠', + translate:{ + "xinfu_lingren":"凌人", + "xinfu_lingren_info":"每回合限一次。当你于出牌阶段内使用带有「伤害」标签的基本牌或普通锦囊牌指定目标后,你可以猜测其中的一个目标的手牌中是否有基本牌,锦囊牌或装备牌。若你猜中的项目数:≥1,此牌对该角色的伤害+1;≥2,你摸两张牌;≥3,你获得技能〖奸雄〗和〖行殇〗直到你的下回合开始。", + "lingren_adddamage":"凌人", + "lingren_adddamage_info":"", + "lingren_jianxiong":"奸雄", + "lingren_jianxiong_info":"当你受到伤害后,你可以获得对你造成伤害的牌并摸一张牌。", + "lingren_xingshang":"行殇", + "lingren_xingshang_info":"当有角色死亡后,你可以选择一项:1.回复1点体力。2.获得该角色的所有牌。", + "xinfu_fujian":"伏间", + "xinfu_fujian_info":"锁定技,结束阶段开始时,你观看一名随机的其他角色的随机X张手牌。(X为场上手牌最少的角色的手牌数)", + xinfu_xionghuo:'凶镬', + xinfu_xionghuo_info:'游戏开始时,你获得3个“暴戾”标记(标记上限为3)。出牌阶段,你可以交给一名其他角色一个“暴戾”标记。当你对有“暴戾”标记的其他角色造成伤害时,此伤害+1。有“暴戾”标记的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其一张手牌和一张装备区的牌。', + xinfu_shajue:'杀绝', + xinfu_shajue_info:'锁定技,其他角色进入濒死状态时,你获得一个“暴戾”标记。然后若其体力值小于0,你获得使其进入濒死状态的牌。', + xinfu_jianjie:"荐杰", + jianjie:'荐杰', + jianjie_info:'①你的第一个准备阶段开始时,你令一名其他角色获得“龙印”,然后令另一名其他角色获得“凤印”。②出牌阶段限一次。若当前回合不是你的第一个回合,则你可以移动场上的“龙印”或“凤印”。③拥有“龙印”或“凤印”的其他角色死亡时,你转移该角色的“龙印”和“凤印”。④拥有“龙印”/“凤印”的角色视为拥有〖火计〗/〖连环〗,且同时拥有这两种标记的角色视为拥有〖业炎〗。', + jianjie_huoji:'火计', + jianjie_huoji_effect:'火计', + jianjie_huoji_info:'出牌阶段限三次。你可以将一张红色牌当作【火攻】使用,且你以此法使用【火攻】的作用效果改为“目标角色随机展示一张手牌A,然后你可以弃置一张与A颜色相同的牌,对目标造成1点火属性伤害”。', + jianjie_lianhuan:'连环', + jianjie_lianhuan_effect:'连环', + jianjie_lianhuan_info:'出牌阶段限三次。你可以将一张♣牌当作【铁索连环】使用或重铸,且你以此法使用【铁索连环】的目标数上限+1。', + jianjie_yeyan:'业炎', + jianjie_yeyan_info:'限定技。出牌阶段,你可以移去你所有的“龙印”和“凤印”,对一至三名角色造成至多共3点火焰伤害(你可以任意分配每名目标角色受到的伤害点数),若你将对一名角色分配2点或更多的火焰伤害,你须先弃置四张不同花色的手牌再失去3点体力。', + xinfu_yinshi:"隐士", + xinfu_yinshi_info:"锁定技,若你没有“龙印”和“凤印”且防具栏为空,则当你受到属性伤害或锦囊牌造成的伤害时,防止此伤害。", + xinfu_chenghao:"称好", + xinfu_chenghao_info:"当一名角色受到属性伤害后,若其存活且其武将牌横置且是伤害传导的起点,则你可以观看牌堆顶的X张牌并分配给任意角色。(X为横置的角色数量且包含该角色)", + "jianjie_faq":"关于龙凤印", + "jianjie_faq_info":"龙印效果:视为拥有〖火计〗。凤印效果:视为拥有〖连环〗。(均一回合限使用三次) 龙凤印齐全:视为拥有〖业炎〗,〖业炎〗发动后移除龙凤印。", + "xinfu_wuniang":"武娘", + "xinfu_wuniang_info":"当你使用或打出【杀】时,你可以获得一名其他角色的一张牌。若如此做,该角色和场上所有的“关索”各摸一张牌。", + "xinfu_xushen":"许身", + "xinfu_xushen_info":"限定技,当一名男性角色使用【桃】令你脱离濒死状态时,若场上没有“关索”,则其可以将自己的一张武将牌变更为“关索”。然后你回复1点体力,并获得技能〖镇南〗。", + "xinfu_zhennan":"镇南", + "xinfu_zhennan_info":"当你成为【南蛮入侵】的目标时,你可以对一名其他角色造成1-3点随机伤害。", + "xinfu_falu":"法箓", + "xinfu_falu_info":"锁定技,游戏开始时,你获得「紫薇」「后土」「玉清」「勾陈」标记各一个。当你的牌因弃置而进入弃牌堆后,根据这些牌的花色,你获得对应的标记:黑桃,你获得1枚「紫薇」;梅花,你获得1枚「后土」;红桃,你获得1枚「玉清」;方块,你获得1枚「勾陈」。(每种标记限拥有1个)", + "xinfu_dianhua":"点化", + "xinfu_dianhua_info":"准备阶段或结束阶段,你可以观看牌堆顶的X张牌(X为你的「紫薇」「后土」「玉清」「勾陈」标记数的总和)。若如此做,你将这些牌以任意顺序放回牌堆顶或牌堆底。", + "xinfu_zhenyi":"真仪", + "xinfu_zhenyi_info":"你可以在以下时机弃置相应的标记来发动以下效果:一名角色的判定牌生效前,你可以弃置一枚「紫薇」,然后将判定结果改为任意花色且点数为5;你的回合外,你可以弃置一枚「后土」,然后将你的一张手牌当【桃】使用;当你造成伤害时,你可以弃置一枚「玉清」,然后令此伤害+1;当你受到伤害后,你可以弃置一张「勾陈」,然后你从牌堆中随机获得三种类型的牌各一张。", + "zhenyi_spade":"真仪", + "zhenyi_spade_info":"", + "zhenyi_club":"真仪", + "zhenyi_club_info":"", + "zhenyi_heart":"真仪", + "zhenyi_heart_info":"", + zhangren:'张任', + zoushi:'邹氏', + zangba:'臧霸', + gz_jiling:'纪灵', + gz_sp_dongzhuo:'董卓', + gz_zhangjiao:'张角', + litong:'李通', + mizhu:'糜竺', + buzhi:'步骘', + chenlin:'陈琳', + yuanshu:'SP袁术', + yuanshu_prefix:'SP', + gongsunzan:'公孙瓒', + sp_diaochan:'SP貂蝉', + sp_diaochan_prefix:'SP', + yangxiu:'杨修', + sp_zhaoyun:'SP赵云', + sp_zhaoyun_prefix:'SP', + caohong:'曹洪', + liuxie:'刘协', + xiahouba:'夏侯霸', + zhugejin:'诸葛瑾', + zhugeke:'诸葛恪', + guanyinping:'关银屏', + sunhao:'孙皓', + chengyu:'程昱', + simalang:'司马朗', + gz_tianfeng:'田丰', + sp_jiaxu:'SP贾诩', + sp_jiaxu_prefix:'SP', + maliang:'马良', + sp_caoren:'SP曹仁', + sp_caoren_prefix:'SP', + yuejin:'乐进', + mifuren:'糜夫人', + sp_dongzhuo:'SP董卓', + sp_dongzhuo_prefix:'SP', + gz_chendong:'陈武董袭', + gz_jiangfei:'蒋琬费祎', + gz_jiangqing:'蒋钦', + hetaihou:'何太后', + dingfeng:'丁奉', + zhangxingcai:'张星彩', + caoang:'曹昂', + gz_kongrong:'孔融', + fuwan:'伏完', + sp_pangde:'SP庞德', + sp_pangde_prefix:'SP', + sp_sunshangxiang:'SP孙尚香', + sp_sunshangxiang_prefix:'SP', + zhugedan:'诸葛诞', + sp_machao:'SP马超', + sp_machao_prefix:'SP', + sp_jiangwei:'SP姜维', + sp_jiangwei_prefix:'SP', + zhangbao:'张宝', + yangxiou:'杨修', + shixie:'士燮', + mayunlu:'马云騄', + zhanglu:'张鲁', + wutugu:'兀突骨', + gz_mateng:'马腾', + sp_caiwenji:'SP蔡琰', + sp_caiwenji_prefix:'SP', + zhugeguo:'诸葛果', + lingcao:'凌操', + lingju:'灵雎', + lifeng:'李丰', + jsp_guanyu:'SP关羽', + jsp_guanyu_prefix:'SP', + zhuling:'朱灵', + sunluyu:'OL孙鲁育', + sunluyu_prefix:'OL', + hanba:'旱魃', + gz_panfeng:'潘凤', + zumao:'祖茂', + daxiaoqiao:'大乔小乔', + cuiyan:'崔琰', + wenpin:'文聘', + jsp_huangyueying:'SP黄月英', + jsp_huangyueying_prefix:'SP', + guansuo:'关索', + tadun:'蹋顿', + yanbaihu:'严虎', + wanglang:'王朗', + caochun:'曹纯', + dongbai:'OL董白', + dongbai_prefix:'OL', + zhaoxiang:'赵襄', + heqi:'贺齐', + kanze:'OL阚泽', + kanze_prefix:'OL', + dongyun:'董允', + mazhong:'马忠', + huangfusong:'皇甫嵩', + wangyun:'王允', + sunqian:'孙乾', + xizhicai:'戏志才', + beimihu:'卑弥呼', + luzhi:'鲁芝', + bianfuren:'卞夫人', + ol_bianfuren:'卞夫人', + shamoke:'沙摩柯', + lvfan:'吕范', + liqueguosi:'李傕郭汜', + cuimao:'崔琰毛玠', - caoying: "曹婴", - simahui: "司马徽", - baosanniang: "鲍三娘", - majun: "马钧", - simazhao: "司马昭", - wangyuanji: "王元姬", + caoying:"曹婴", + simahui:"司马徽", + baosanniang:"鲍三娘", + majun:"马钧", + simazhao:"司马昭", + wangyuanji:"王元姬", - jianggan: "蒋干", - hejin: '何进', - hansui: '韩遂', - niujin: '牛金', - xujing: 'OL许靖', - xujing_prefix: 'OL', - yuantanyuanshang: '袁谭袁尚', + jianggan:"蒋干", + hejin:'何进', + hansui:'韩遂', + niujin:'牛金', + xujing:'OL许靖', + xujing_prefix:'OL', + yuantanyuanshang:'袁谭袁尚', - xinfenyue: '奋钺', - xinfenyue_info: '出牌阶段限X次(X为与你不同阵营的存活角色数),你可以与一名其他角色拼点,若你赢,根据你拼点牌的点数依次执行以下效果:不大于5,你获得其一张牌;不大于9,你获得牌堆里的一张【杀】; 不大于K,视为你对其使用一张雷【杀】。', - neifa: '内伐', - neifa_info: '出牌阶段开始时,你可以摸两张牌或获得场上的一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1;若弃置的不是基本牌,本回合你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标,前两次使用装备牌时摸X张牌(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5)。', - neifa_use: '内伐', - yuxu: '誉虚', - yuxu_info: '当你于出牌阶段内使用的牌结算结束后,若你此前于此阶段发动过〖誉虚〗的次数为:偶数,你可以摸一张牌;奇数,你弃置一张牌。', - yuxu2: '誉虚(弃牌)', - xjshijian: '实荐', - xjshijian_info: '一名其他角色于其回合内使用的第二张牌结算完成后,你可弃置一张牌并令其获得技能〖誉虚〗直到回合结束。', - mouzhu: '谋诛', - mouzhu_info: '出牌阶段限一次,你可以令一名有手牌的其他角色交给你一张手牌。然后若你的手牌数大于其,其选择视为对你使用一张【杀】或【决斗】。', - yanhuo: '延祸', - yanhuo_info: '当你死亡时,你可以依次弃置一名其他角色的X张牌。(X为你的牌数)', - niluan: '逆乱', - niluan_info: '其他角色的结束阶段开始时,若其本回合内使用过【杀】或其体力值大于你,则你可以将一张黑色牌当做【杀】使用。', - cuorui: '挫锐', - cuorui_info: '锁定技,游戏开始时,你摸X张牌(X为你的体力上限)。锁定技,限定技,判定阶段开始前,若你的判定区有牌,你跳过此阶段。', - cuorui_info_single: '锁定技,你的起始手牌数改为X+2(X为你剩余的备选武将数)。你跳过登场后的第一个判定阶段。', - liewei: '裂围', - liewei_info: '当你杀死一名角色后,你可以摸三张牌。', + xinfenyue:'奋钺', + xinfenyue_info:'出牌阶段限X次(X为与你不同阵营的存活角色数),你可以与一名其他角色拼点,若你赢,根据你拼点牌的点数依次执行以下效果:不大于5,你获得其一张牌;不大于9,你获得牌堆里的一张【杀】; 不大于K,视为你对其使用一张雷【杀】。', + neifa:'内伐', + neifa_info:'出牌阶段开始时,你可以摸两张牌或获得场上的一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1;若弃置的不是基本牌,本回合你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标,前两次使用装备牌时摸X张牌(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5)。', + neifa_use:'内伐', + yuxu:'誉虚', + yuxu_info:'当你于出牌阶段内使用的牌结算结束后,若你此前于此阶段发动过〖誉虚〗的次数为:偶数,你可以摸一张牌;奇数,你弃置一张牌。', + yuxu2:'誉虚(弃牌)', + xjshijian:'实荐', + xjshijian_info:'一名其他角色于其回合内使用的第二张牌结算完成后,你可弃置一张牌并令其获得技能〖誉虚〗直到回合结束。', + mouzhu:'谋诛', + mouzhu_info:'出牌阶段限一次,你可以令一名有手牌的其他角色交给你一张手牌。然后若你的手牌数大于其,其选择视为对你使用一张【杀】或【决斗】。', + yanhuo:'延祸', + yanhuo_info:'当你死亡时,你可以依次弃置一名其他角色的X张牌。(X为你的牌数)', + niluan:'逆乱', + niluan_info:'其他角色的结束阶段开始时,若其本回合内使用过【杀】或其体力值大于你,则你可以将一张黑色牌当做【杀】使用。', + cuorui:'挫锐', + cuorui_info:'锁定技,游戏开始时,你摸X张牌(X为你的体力上限)。锁定技,限定技,判定阶段开始前,若你的判定区有牌,你跳过此阶段。', + cuorui_info_single:'锁定技,你的起始手牌数改为X+2(X为你剩余的备选武将数)。你跳过登场后的第一个判定阶段。', + liewei:'裂围', + liewei_info:'当你杀死一名角色后,你可以摸三张牌。', - weicheng: '伪诚', - weicheng_info: '当牌从你的手牌区移动至其他角色的手牌区后,若你的手牌数小于体力值,你可以摸一张牌。', - daoshu: '盗书', - daoshu_info: '出牌阶段限一次。你可以选择一个花色并获得一名其他角色的一张手牌。若此牌花色与你选择的相同,则你对其造成1点伤害且你〖盗书〗于此阶段内可使用的次数上限+1。否则你须交给其一张与此牌花色不同的手牌(没有则展示手牌)。', + weicheng:'伪诚', + weicheng_info:'当牌从你的手牌区移动至其他角色的手牌区后,若你的手牌数小于体力值,你可以摸一张牌。', + daoshu:'盗书', + daoshu_info:'出牌阶段限一次。你可以选择一个花色并获得一名其他角色的一张手牌。若此牌花色与你选择的相同,则你对其造成1点伤害且你〖盗书〗于此阶段内可使用的次数上限+1。否则你须交给其一张与此牌花色不同的手牌(没有则展示手牌)。', - xinshanjia: "缮甲", - xinshanjia_info: "出牌阶段开始时,你可以摸三张牌,然后弃置3-X张牌(X为你本局游戏内不因使用而失去过的装备牌的数目且至多为3)。若你没有以此法弃置:基本牌,此阶段你使用【杀】的次数上限+1;锦囊牌,此阶段你使用牌无距离限制;基本牌或锦囊牌,你可以视为使用一张【杀】。", - "new_meibu": "魅步", - "new_meibu_info": "其他角色的出牌阶段开始时,若你在其攻击范围内,你可以弃置一张牌,令该角色于本回合内获得技能〖止息〗。若你以此法弃置的牌不是【杀】或黑色锦囊牌,则本回合其与你的距离视为1。", - "new_mumu": "穆穆", - "new_mumu_info": "出牌阶段开始时,你可以选择一项:1.弃置一名其他角色装备区里的一张牌;2.获得一名角色装备区里的一张防具牌,若如此做,你本回合不能使用【杀】。", - new_zhixi: "止息", - new_zhixi_info: "锁定技。出牌阶段内,若你使用过锦囊牌或使用过的牌数不小于X,则你不能使用牌(X为你的体力值)。", - "new_mumu2": "穆穆", - "new_mumu2_info": "锁定技,你不能使用【杀】。", - new_xingwu: "星舞", - new_xingwu_info: "弃牌阶段开始时,你可以将一张牌置于武将牌上,称为“舞”。然后你可以选择一项:①将三张“舞”置入弃牌堆;②弃置两张手牌并将武将牌翻面。若如此做,你选择一名角色,该角色弃置其装备区的所有牌并受到2点伤害(若为女性,则改为1点)。", - "new_luoyan": "落雁", - "new_luoyan_info": "锁定技。若你的武将牌上有“舞”,则你视为拥有技能〖天香〗和〖流离〗。", - "new_luoyan_tianxiang": "天香", - "new_luoyan_tianxiang_info": "", - "new_luoyan_liuli": "流离", - "new_luoyan_liuli_info": "", - ol_shichou: "誓仇", - ol_shichou_info: "当你使用【杀】时,你可以令至多X+1名角色也成为此【杀】的目标(X为你已损失的体力值)。", + xinshanjia:"缮甲", + xinshanjia_info:"出牌阶段开始时,你可以摸三张牌,然后弃置3-X张牌(X为你本局游戏内不因使用而失去过的装备牌的数目且至多为3)。若你没有以此法弃置:基本牌,此阶段你使用【杀】的次数上限+1;锦囊牌,此阶段你使用牌无距离限制;基本牌或锦囊牌,你可以视为使用一张【杀】。", + "new_meibu":"魅步", + "new_meibu_info":"其他角色的出牌阶段开始时,若你在其攻击范围内,你可以弃置一张牌,令该角色于本回合内获得技能〖止息〗。若你以此法弃置的牌不是【杀】或黑色锦囊牌,则本回合其与你的距离视为1。", + "new_mumu":"穆穆", + "new_mumu_info":"出牌阶段开始时,你可以选择一项:1.弃置一名其他角色装备区里的一张牌;2.获得一名角色装备区里的一张防具牌,若如此做,你本回合不能使用【杀】。", + new_zhixi:"止息", + new_zhixi_info:"锁定技。出牌阶段内,若你使用过锦囊牌或使用过的牌数不小于X,则你不能使用牌(X为你的体力值)。", + "new_mumu2":"穆穆", + "new_mumu2_info":"锁定技,你不能使用【杀】。", + new_xingwu:"星舞", + new_xingwu_info:"弃牌阶段开始时,你可以将一张牌置于武将牌上,称为“舞”。然后你可以选择一项:①将三张“舞”置入弃牌堆;②弃置两张手牌并将武将牌翻面。若如此做,你选择一名角色,该角色弃置其装备区的所有牌并受到2点伤害(若为女性,则改为1点)。", + "new_luoyan":"落雁", + "new_luoyan_info":"锁定技。若你的武将牌上有“舞”,则你视为拥有技能〖天香〗和〖流离〗。", + "new_luoyan_tianxiang":"天香", + "new_luoyan_tianxiang_info":"", + "new_luoyan_liuli":"流离", + "new_luoyan_liuli_info":"", + ol_shichou:"誓仇", + ol_shichou_info:"当你使用【杀】时,你可以令至多X+1名角色也成为此【杀】的目标(X为你已损失的体力值)。", dc_olshichou: '誓仇', dc_olshichou_info: '当你使用【杀】时,你可以令至多X名角色也成为此【杀】的目标。此牌结算结束后,若你未因【杀】造成过伤害,则你获得此【杀】(X为你已损失的体力值)。', - "zhenwei_three": "镇卫", - "zhenwei_three_info": "锁定技,敌方角色至己方其他角色的距离+1。", - "huanshi_three": "缓释", - "huanshi_three_info": "一名友方角色的判定牌生效前,你可打出一张牌代替之。", + "zhenwei_three":"镇卫", + "zhenwei_three_info":"锁定技,敌方角色至己方其他角色的距离+1。", + "huanshi_three":"缓释", + "huanshi_three_info":"一名友方角色的判定牌生效前,你可打出一张牌代替之。", - yizan: "翊赞", - yizan_info: "你可以将两张牌(其中至少一张是基本牌)当任意基本牌牌使用。", - yizan0: "翊赞", - yizan0_info: "你可以将两张牌(其中至少一张是基本牌)当任意基本牌牌使用。", - yizan1: "翊赞", - yizan1_info: "你可以将两张牌(其中至少一张是基本牌)当【闪】打出。", - yizan2: "翊赞", - yizan2_info: "你可以将一张基本牌当任意基本牌牌使用。", - yizan3: "翊赞", - yizan3_info: "你可以将一张基本牌当【闪】打出。", - yizan5: "翊赞", - yizan5_info: "你可以将两张牌(其中至少一张是基本牌)当【杀】打出。", - yizan6: "翊赞", - yizan6_info: "你可以将一张基本牌当【杀】打出。", - longyuan: "龙渊", - longyuan_info: "觉醒技 当你使用或打出基本牌时,若你已经已累计发动过3次〖翊赞〗,你将〖翊赞〗改为“你可以将一张基本牌当任意基本牌牌使用或打出”。", - wuniang: "武娘", - wuniang_info: "你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后该角色摸一张牌;若“关索”在场,你可令“关索”也摸一张牌。", - zhennan: "镇南", - zhennan_info: "当你成为【南蛮入侵】的目标时,你可令一名其他角色随机受到1至3点伤害。", - xushen: "许身", - xushen_info: "当其他男性角色令你脱离濒死状态时,若“关索”不在场,其可以选择是否用“关索”替换其武将牌,然后你回复1点体力并获得技能〖镇南〗。", + yizan:"翊赞", + yizan_info:"你可以将两张牌(其中至少一张是基本牌)当任意基本牌牌使用。", + yizan0:"翊赞", + yizan0_info:"你可以将两张牌(其中至少一张是基本牌)当任意基本牌牌使用。", + yizan1:"翊赞", + yizan1_info:"你可以将两张牌(其中至少一张是基本牌)当【闪】打出。", + yizan2:"翊赞", + yizan2_info:"你可以将一张基本牌当任意基本牌牌使用。", + yizan3:"翊赞", + yizan3_info:"你可以将一张基本牌当【闪】打出。", + yizan5:"翊赞", + yizan5_info:"你可以将两张牌(其中至少一张是基本牌)当【杀】打出。", + yizan6:"翊赞", + yizan6_info:"你可以将一张基本牌当【杀】打出。", + longyuan:"龙渊", + longyuan_info:"觉醒技 当你使用或打出基本牌时,若你已经已累计发动过3次〖翊赞〗,你将〖翊赞〗改为“你可以将一张基本牌当任意基本牌牌使用或打出”。", + wuniang:"武娘", + wuniang_info:"你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后该角色摸一张牌;若“关索”在场,你可令“关索”也摸一张牌。", + zhennan:"镇南", + zhennan_info:"当你成为【南蛮入侵】的目标时,你可令一名其他角色随机受到1至3点伤害。", + xushen:"许身", + xushen_info:"当其他男性角色令你脱离濒死状态时,若“关索”不在场,其可以选择是否用“关索”替换其武将牌,然后你回复1点体力并获得技能〖镇南〗。", - wanwei: '挽危', - wanwei_info: '当你因被其他角色获得或弃置而失去牌时,你可以改为自己选择失去的牌。', - 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)。然后,你结束出牌阶段,并在当前回合结束后进行一个新的回合。', + wanwei:'挽危', + wanwei_info:'当你因被其他角色获得或弃置而失去牌时,你可以改为自己选择失去的牌。', + 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: '清忠', - qingzhong_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.令你对其使用此牌,然后获得此牌,并将装备区内的武器牌交给你。', + qingzhong:'清忠', + qingzhong_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为存活的忠臣数)', + moucheng:'谋逞', + moucheng_info:'觉醒技,当其他角色使用因〖连计〗交给其的牌累计造成伤害达到3点后,你失去技能〖连计〗,然后获得技能〖矜功〗。', + jingong:'矜功', + jingong2:'矜功', + jingong_backup:'矜功', + jingong_info:'出牌阶段限一次,你可以将一张装备牌或【杀】当做一张随机锦囊牌使用(三选一,其中一张为【美人计】或【笑里藏刀】),然后本回合的结束阶段,若你于本回合内未造成过伤害,你失去1点体力。', + fenyue:'奋钺', + fenyue2:'奋钺', + fenyue2_bg:'钺', + fenyue_info:'出牌阶段限X次,你可以与一名角色拼点,若你赢,你选择一项:1.令其不能使用或打出手牌直到回合结束;2.视为对其使用一张【杀】(不计入次数)。若你没赢,你结束出牌阶段。(X为存活的忠臣数)', - zfengshi: '锋矢', - zfengshi_info: '当你使用【杀】指定目标后,你可以令目标弃置装备区内的一张牌。', - chuanxin: '穿心', - chuanxin_info: '当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能。', - chuanxin_info_guozhan: '当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将。', - hengjiang: '横江', - hengjiang2: '横江', - hengjiang_info: '当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌。', - rehengjiang: '横江', - rehengjiang2: '横江', - rehengjiang3: '横江', - rehengjiang_info: '当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸X张牌(X为你本回合内对其发动过〖横江〗的次数)。', - shuangren: '双刃', - shuangren_info: '出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你本回合内不能对其他角色使用牌。', - 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: '限定技,回合开始时,你可以移去所有"梅影"标记并摸等量的牌,然后从X张蜀势力武将牌中选择并获得至多两个技能(限定技、觉醒技、隐匿技、使命技、主公技除外)。若此时你是体力值最低的角色,你回复1点体力(X为场上角色数,且X∈[4,+∞))。', - yjixi: '觊玺', - yjixi_info: '觉醒技,结束阶段,若你已连续三个自己回合未失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。', - xinyongsi: '庸肆', - xinyongsi1: '庸肆', - xinyongsi2: '庸肆', - xinyongsi_info: '锁定技,摸牌阶段,你令额定摸牌数改为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力。', - xiehui: '黠慧', - xiehui2: '黠慧', - xiehui_info: '锁定技,你的黑色牌不计入手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值扣减为止。', - lianzhu: '连诛', - lianzhu_info: '出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若此牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌。', - shanjia: '缮甲', - shanjia_info: '出牌阶段开始时,你可以摸X张牌,然后弃置等量的牌。若你以此法弃置了装备区内的牌,则你可以视为使用一张【杀】。(X为你于本局游戏内使用过的装备牌数且最大为7)', - tuifeng: '推锋', - tuifeng2: '推锋', - tuifeng_info: '1.当你受到伤害后,你可以将至多X张牌置于武将牌上(X为伤害值),称为“锋”。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_two: '出牌阶段限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: '限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去1点体力。', - yongdi: '拥嫡', - yongdi_info: '限定技,准备阶段开始时,你可令一名其他男性角色增加1点体力上限并回复1点体力,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技。', - regushe: '鼓舌', - regushe_info: '出牌阶段,若X小于7,则你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。(X为你的“饶舌”标记数与本回合因“鼓舌”拼点而胜利的次数之和)', - rejici: '激词', - rejici2: '激词', - rejici_info: '锁定技。①当你的拼点牌亮出后,若此牌的点数不大于X,则你令此牌点数+X,并获得此次拼点中点数最大的拼点牌。②当你死亡时,你令杀死你的角色弃置7-X张牌并失去1点体力(X为你的“饶舌”标记数)。', - gushe: '鼓舌', - gushe_bg: '舌', - gushe_info: '出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。', - jici: '激词', - jici_info: '当你因发动〖鼓舌〗而扣置的拼点牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动〖鼓舌〗的次数上限+1。(X为你“饶舌”标记的数量)', - shefu: '设伏', - shefu2: '设伏', - shefu_bg: '伏', - shefu_info: '结束阶段开始时,你可以将一张牌移出游戏,称为「伏兵」。并为「伏兵」记录一个基本牌或锦囊牌的名称(须与其他「伏兵」记录的名称均不同)。你的回合外,当有其他角色使用与你记录的「伏兵」牌名相同的手牌时,你可以取消此牌的所有目标,然后移去该「伏兵」。若此时处于使用者的回合内,则你令使用者当前的所有非Charlotte技失效直至回合结束。', - 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为你于此回合发动过〖奇制〗的次数)', - jiqiao: '机巧', - jiqiao_info: '出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶两倍数量的牌并获得其中的非装备牌。', - linglong: '玲珑', - linglong_info: '锁定技,若你的装备区没有武器牌,则你使用【杀】的次数上限+1;若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,则你视为拥有技能〖奇才〗。', - zhenwei: '镇卫', - zhenwei2: '镇卫', - zhenwei_info: '当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌。', - xingwu: '星舞', - xingwu_info: '弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌。', - luoyan: '落雁', - luoyan_info: '锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”。', - yinbing: '引兵', - yinbing_info: '结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张「引兵」牌。', - juedi: '绝地', - juedi_info: '锁定技,准备阶段,若你的武将牌上有「引兵」牌,你选择一项:1.移去「引兵」牌,将手牌补至体力上限数;2.将「引兵」牌交给一名体力值不大于你的其他角色,其回复1点体力并摸等量的牌。', - kuangfu: '狂斧', - kuangfu_info: '当你使用【杀】造成伤害后,你可以选择一项:弃置其装备区内的一张牌,或将其装备区内的一张牌移动到你的装备区内。', - xintan: '心惔', - xintan_info: '出牌阶段限一次,你可以移去两张「焚」并选择一名角色,该角色失去1点体力。', - 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_info: '锁定技,一名其他角色死亡后,若其身份为:忠臣,你本局内发动〖竭缘〗减少伤害时无视体力值限制;反贼,你本局内发动〖竭缘〗增加伤害时无视体力值限制;内奸,你本局内选择发动〖竭缘〗的牌时无颜色和区域限制。', - fenxin_info_versus: '锁定技,一名其他角色首次受到伤害后,你选择本局游戏未选择过的一项:1.发动〖竭缘〗减少伤害时无视体力值限制;2.发动〖竭缘〗增加伤害时无视体力值限制;3.发动〖竭缘〗选择的牌时无颜色和区域限制。', - qingyi: '轻逸', - qingyi1: '轻逸', - qingyi2: '轻逸', - qingyi_info: '你可以跳过判定阶段和摸牌阶段。若如此做,视为对一名角色使用了一张无距离限制的【杀】。', - xiandeng: '先登', - xiandeng_info: '锁定技,出牌阶段,你使用的第一张【杀】不计入次数且无距离限制。', - shulv: '熟虑', - shulv_info: '出牌阶段限一次,若你的手牌数大于体力值,则你可以弃置一张牌并摸一张牌。', - xisheng: '牺牲', - xisheng_info: '每名其他角色的回合限一次,你可以将两张牌当做【桃】使用。', - yuhua: '羽化', - yuhua_info: '锁定技。①你的非基本牌不计入手牌上限。②准备阶段和结束阶段开始时,你卜算1。', - qirang: '祈禳', - qirang_info: '当有装备牌进入你的装备区时,你可获得牌堆中的一张锦囊牌。若此牌为:普通锦囊牌,则当你使用此“祈禳”牌选择唯一目标后,可为此牌增加一个目标;延时锦囊牌,则你下回合发动〖羽化〗时的卜算量+1(至多为5)。', - biluan: '避乱', - biluan_info: '摸牌阶段开始时,若有与你距离不大于1的其他角色,你可以放弃摸牌。若如此做,本局内其他角色计算与你的距离时+X。(X为势力数)', - lixia: '礼下', - lixia_info: '锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。本局内其他角色计算与你的距离时-1。', + zfengshi:'锋矢', + zfengshi_info:'当你使用【杀】指定目标后,你可以令目标弃置装备区内的一张牌。', + chuanxin:'穿心', + chuanxin_info:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能。', + chuanxin_info_guozhan:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将。', + hengjiang:'横江', + hengjiang2:'横江', + hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌。', + rehengjiang:'横江', + rehengjiang2:'横江', + rehengjiang3:'横江', + rehengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸X张牌(X为你本回合内对其发动过〖横江〗的次数)。', + shuangren:'双刃', + shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你本回合内不能对其他角色使用牌。', + 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:'限定技,回合开始时,你可以移去所有"梅影"标记并摸等量的牌,然后从X张蜀势力武将牌中选择并获得至多两个技能(限定技、觉醒技、隐匿技、使命技、主公技除外)。若此时你是体力值最低的角色,你回复1点体力(X为场上角色数,且X∈[4,+∞))。', + yjixi:'觊玺', + yjixi_info:'觉醒技,结束阶段,若你已连续三个自己回合未失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。', + xinyongsi:'庸肆', + xinyongsi1:'庸肆', + xinyongsi2:'庸肆', + xinyongsi_info:'锁定技,摸牌阶段,你令额定摸牌数改为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力。', + xiehui:'黠慧', + xiehui2:'黠慧', + xiehui_info:'锁定技,你的黑色牌不计入手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值扣减为止。', + lianzhu:'连诛', + lianzhu_info:'出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若此牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌。', + shanjia:'缮甲', + shanjia_info:'出牌阶段开始时,你可以摸X张牌,然后弃置等量的牌。若你以此法弃置了装备区内的牌,则你可以视为使用一张【杀】。(X为你于本局游戏内使用过的装备牌数且最大为7)', + tuifeng:'推锋', + tuifeng2:'推锋', + tuifeng_info:'1.当你受到伤害后,你可以将至多X张牌置于武将牌上(X为伤害值),称为“锋”。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_two:'出牌阶段限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:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去1点体力。', + yongdi:'拥嫡', + yongdi_info:'限定技,准备阶段开始时,你可令一名其他男性角色增加1点体力上限并回复1点体力,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技。', + regushe:'鼓舌', + regushe_info:'出牌阶段,若X小于7,则你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。(X为你的“饶舌”标记数与本回合因“鼓舌”拼点而胜利的次数之和)', + rejici:'激词', + rejici2:'激词', + rejici_info:'锁定技。①当你的拼点牌亮出后,若此牌的点数不大于X,则你令此牌点数+X,并获得此次拼点中点数最大的拼点牌。②当你死亡时,你令杀死你的角色弃置7-X张牌并失去1点体力(X为你的“饶舌”标记数)。', + gushe:'鼓舌', + gushe_bg:'舌', + gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记。当你获得第7个“饶舌”标记时,你死亡。', + jici:'激词', + jici_info:'当你因发动〖鼓舌〗而扣置的拼点牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动〖鼓舌〗的次数上限+1。(X为你“饶舌”标记的数量)', + shefu:'设伏', + shefu2:'设伏', + shefu_bg:'伏', + shefu_info:'结束阶段开始时,你可以将一张牌移出游戏,称为「伏兵」。并为「伏兵」记录一个基本牌或锦囊牌的名称(须与其他「伏兵」记录的名称均不同)。你的回合外,当有其他角色使用与你记录的「伏兵」牌名相同的手牌时,你可以取消此牌的所有目标,然后移去该「伏兵」。若此时处于使用者的回合内,则你令使用者当前的所有非Charlotte技失效直至回合结束。', + 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为你于此回合发动过〖奇制〗的次数)', + jiqiao:'机巧', + jiqiao_info:'出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶两倍数量的牌并获得其中的非装备牌。', + linglong:'玲珑', + linglong_info:'锁定技,若你的装备区没有武器牌,则你使用【杀】的次数上限+1;若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,则你视为拥有技能〖奇才〗。', + zhenwei:'镇卫', + zhenwei2:'镇卫', + zhenwei_info:'当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌。', + xingwu:'星舞', + xingwu_info:'弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌。', + luoyan:'落雁', + luoyan_info:'锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”。', + yinbing:'引兵', + yinbing_info:'结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张「引兵」牌。', + juedi:'绝地', + juedi_info:'锁定技,准备阶段,若你的武将牌上有「引兵」牌,你选择一项:1.移去「引兵」牌,将手牌补至体力上限数;2.将「引兵」牌交给一名体力值不大于你的其他角色,其回复1点体力并摸等量的牌。', + kuangfu:'狂斧', + kuangfu_info:'当你使用【杀】造成伤害后,你可以选择一项:弃置其装备区内的一张牌,或将其装备区内的一张牌移动到你的装备区内。', + xintan:'心惔', + xintan_info:'出牌阶段限一次,你可以移去两张「焚」并选择一名角色,该角色失去1点体力。', + 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_info:'锁定技,一名其他角色死亡后,若其身份为:忠臣,你本局内发动〖竭缘〗减少伤害时无视体力值限制;反贼,你本局内发动〖竭缘〗增加伤害时无视体力值限制;内奸,你本局内选择发动〖竭缘〗的牌时无颜色和区域限制。', + fenxin_info_versus:'锁定技,一名其他角色首次受到伤害后,你选择本局游戏未选择过的一项:1.发动〖竭缘〗减少伤害时无视体力值限制;2.发动〖竭缘〗增加伤害时无视体力值限制;3.发动〖竭缘〗选择的牌时无颜色和区域限制。', + qingyi:'轻逸', + qingyi1:'轻逸', + qingyi2:'轻逸', + qingyi_info:'你可以跳过判定阶段和摸牌阶段。若如此做,视为对一名角色使用了一张无距离限制的【杀】。', + xiandeng:'先登', + xiandeng_info:'锁定技,出牌阶段,你使用的第一张【杀】不计入次数且无距离限制。', + shulv:'熟虑', + shulv_info:'出牌阶段限一次,若你的手牌数大于体力值,则你可以弃置一张牌并摸一张牌。', + xisheng:'牺牲', + xisheng_info:'每名其他角色的回合限一次,你可以将两张牌当做【桃】使用。', + yuhua:'羽化', + yuhua_info:'锁定技。①你的非基本牌不计入手牌上限。②准备阶段和结束阶段开始时,你卜算1。', + qirang:'祈禳', + qirang_info:'当有装备牌进入你的装备区时,你可获得牌堆中的一张锦囊牌。若此牌为:普通锦囊牌,则当你使用此“祈禳”牌选择唯一目标后,可为此牌增加一个目标;延时锦囊牌,则你下回合发动〖羽化〗时的卜算量+1(至多为5)。', + biluan:'避乱', + biluan_info:'摸牌阶段开始时,若有与你距离不大于1的其他角色,你可以放弃摸牌。若如此做,本局内其他角色计算与你的距离时+X。(X为势力数)', + lixia:'礼下', + lixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。本局内其他角色计算与你的距离时-1。', olbiluan: '避乱', olbiluan_info: '结束阶段开始时,若有与你距离不大于1的其他角色,你可以弃置一张牌。若如此做,本局内其他角色计算与你的距离时+X。(X为场上的势力数)', - relixia: '礼下', - relixia_info: '锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你选择一至两项:1.摸一张牌;2.其摸两张牌;3.其回复1点体力。本局内其他角色计算与你的距离时-X(X为你选择的选项数)。', - rebiluan: '避乱', - rebiluan2: '避乱', - rebiluan_info: '结束阶段开始时,若有与你距离不大于1的其他角色,你可以弃置一张牌。若如此做,本局内其他角色计算与你的距离时+X。(X为场上角色数且至多为4)', + relixia:'礼下', + relixia_info:'锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你选择一至两项:1.摸一张牌;2.其摸两张牌;3.其回复1点体力。本局内其他角色计算与你的距离时-X(X为你选择的选项数)。', + rebiluan:'避乱', + rebiluan2:'避乱', + rebiluan_info:'结束阶段开始时,若有与你距离不大于1的其他角色,你可以弃置一张牌。若如此做,本局内其他角色计算与你的距离时+X。(X为场上角色数且至多为4)', ollixia: '礼下', ollixia_info: '锁定技,其他角色的结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸两张牌。本局内其他角色计算与你的距离时-1。', - yishe: '义舍', - yishe_bg: '米', - yishe_info: '结束阶段开始时,若你的武将牌上没有「米」,则你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为「米」;当有「米」移至其他区域后,若你的武将牌上没有「米」,则你回复1点体力。', - bushi: '布施', - midao: '米道', - bushi_info: '当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得你的一张「米」。', - midao_info: '一名角色的判定牌生效前,你可以打出一张「米」代替之。', - fengpo: '凤魄', - fengpo_info: '每种牌名各限一次。当你每回合使用的第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌,令此牌的伤害值基数+1;2.摸一张牌,令此牌的伤害值基数+X(X为其♦牌的数量)。', - chenqing: '陈情', - chenqing_info: '每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后其弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】。', - mozhi: '默识', - mozhi_info: '结束阶段开始时,你可以将一张手牌当作你本回合出牌阶段内使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当做你本回合出牌阶段内使用的第二张基本或普通锦囊牌使用。(你不能通过此技能使用【酒】)', - ranshang: '燃殇', - ranshang2: '燃殇', - ranshang_info: '锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力。若X大于2,则你减2点体力上限并摸两张牌。(X为“燃”标记的数量)', - hanyong: '悍勇', - hanyong_info: '当你使用【南蛮入侵】或【万箭齐发】或黑桃普通【杀】时,若你已受伤,则你可以令此牌的伤害值基数+1。然后若你的体力值不小于游戏轮数,则你获得一枚“燃”标记。', + yishe:'义舍', + yishe_bg:'米', + yishe_info:'结束阶段开始时,若你的武将牌上没有「米」,则你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为「米」;当有「米」移至其他区域后,若你的武将牌上没有「米」,则你回复1点体力。', + bushi:'布施', + midao:'米道', + bushi_info:'当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得你的一张「米」。', + midao_info:'一名角色的判定牌生效前,你可以打出一张「米」代替之。', + fengpo:'凤魄', + fengpo_info:'每种牌名各限一次。当你每回合使用的第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌,令此牌的伤害值基数+1;2.摸一张牌,令此牌的伤害值基数+X(X为其♦牌的数量)。', + chenqing:'陈情', + chenqing_info:'每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后其弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】。', + mozhi:'默识', + mozhi_info:'结束阶段开始时,你可以将一张手牌当作你本回合出牌阶段内使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当做你本回合出牌阶段内使用的第二张基本或普通锦囊牌使用。(你不能通过此技能使用【酒】)', + ranshang:'燃殇', + ranshang2:'燃殇', + ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力。若X大于2,则你减2点体力上限并摸两张牌。(X为“燃”标记的数量)', + hanyong:'悍勇', + hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】或黑桃普通【杀】时,若你已受伤,则你可以令此牌的伤害值基数+1。然后若你的体力值不小于游戏轮数,则你获得一枚“燃”标记。', - yicong: '义从', - yongsi: '庸肆', - yongsi1: '庸肆', - yongsi2: '庸肆', - bifa: '笔伐', - bifa2: '笔伐', - songci: '颂词', - songci_draw: '颂词', - baobian: '豹变', - lihun: '离魂', - chongzhen: '冲阵', - yuanhu: '援护', - tianming: '天命', - mizhao: '密诏', - duwu: '黩武', - duwu3: '黩武', - 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: '纳蛮', - taichen: '抬榇', - jilei: '鸡肋', - jilei2: '鸡肋', - jilei2_bg: '肋', - yawang: '雅望', - xunzhi: '殉志', - fanxiang: '返乡', - fanxiang_info: '觉醒技,准备阶段开始时,若场上有已受伤且你发动过〖良助〗的选项二的角色,则你加1点体力上限并回复1点体力,失去技能〖良助〗并获得技能〖枭姬〗。', - xunzhi_info: '准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你本局内手牌上限+2。', - yawang_info: '锁定技,摸牌阶段开始时,你改为摸X张牌,然后你于本回合的出牌阶段内至多使用X张牌(X为与你体力值相等的角色数)。', - jilei_info: '当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌直到其下个回合开始。', - danlao: '啖酪', - danlao_info: '当你成为【杀】或普通锦囊牌的目标后,若此牌的目标数大于1,则你可以摸一张牌,令此牌对你无效。', - gongao: '功獒', - zhuiji: '追击', - chouhai: '仇海', - chouhai_info: '锁定技,当你受到伤害时,若你没有手牌,此伤害+1。', - rechouhai: '仇海', - rechouhai_info: '锁定技,当你受到渠道为【杀】的伤害时,若你没有手牌,此伤害+1。', - guiming: '归命', - guiming_info: '主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”。', - 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: '锁定技,当一名角色死亡后,你增加1点体力上限,回复1点体力。', - juyi: '举义', - juyi_info: '觉醒技,准备阶段开始时,若你的体力上限大于存活角色数,你摸等同于体力上限张数的牌,然后获得技能〖崩坏〗和〖威重〗。', - weizhong: '威重', - weizhong_info: '锁定技,当你的体力上限增加或减少时,你摸一张牌。若你的手牌数为全场最少,则你改为摸两张牌。', - taichen_info: '出牌阶段限一次,你可以失去1点体力,视为对一名角色使用一张【杀】。(不计入出牌阶段的使用次数限制)', - 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为当前时机场上所有角色装备区内武器牌数之和)。', - 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为本回合内其他角色杀死过的角色数)', + yicong:'义从', + yongsi:'庸肆', + yongsi1:'庸肆', + yongsi2:'庸肆', + bifa:'笔伐', + bifa2:'笔伐', + songci:'颂词', + songci_draw:'颂词', + baobian:'豹变', + lihun:'离魂', + chongzhen:'冲阵', + yuanhu:'援护', + tianming:'天命', + mizhao:'密诏', + duwu:'黩武', + duwu3:'黩武', + 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:'纳蛮', + taichen:'抬榇', + jilei:'鸡肋', + jilei2:'鸡肋', + jilei2_bg:'肋', + yawang:'雅望', + xunzhi:'殉志', + fanxiang:'返乡', + fanxiang_info:'觉醒技,准备阶段开始时,若场上有已受伤且你发动过〖良助〗的选项二的角色,则你加1点体力上限并回复1点体力,失去技能〖良助〗并获得技能〖枭姬〗。', + xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你本局内手牌上限+2。', + yawang_info:'锁定技,摸牌阶段开始时,你改为摸X张牌,然后你于本回合的出牌阶段内至多使用X张牌(X为与你体力值相等的角色数)。', + jilei_info:'当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌直到其下个回合开始。', + danlao:'啖酪', + danlao_info:'当你成为【杀】或普通锦囊牌的目标后,若此牌的目标数大于1,则你可以摸一张牌,令此牌对你无效。', + gongao:'功獒', + zhuiji:'追击', + chouhai:'仇海', + chouhai_info:'锁定技,当你受到伤害时,若你没有手牌,此伤害+1。', + rechouhai:'仇海', + rechouhai_info:'锁定技,当你受到渠道为【杀】的伤害时,若你没有手牌,此伤害+1。', + guiming:'归命', + guiming_info:'主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”。', + 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:'锁定技,当一名角色死亡后,你增加1点体力上限,回复1点体力。', + juyi:'举义', + juyi_info:'觉醒技,准备阶段开始时,若你的体力上限大于存活角色数,你摸等同于体力上限张数的牌,然后获得技能〖崩坏〗和〖威重〗。', + weizhong:'威重', + weizhong_info:'锁定技,当你的体力上限增加或减少时,你摸一张牌。若你的手牌数为全场最少,则你改为摸两张牌。', + taichen_info:'出牌阶段限一次,你可以失去1点体力,视为对一名角色使用一张【杀】。(不计入出牌阶段的使用次数限制)', + 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为当前时机场上所有角色装备区内武器牌数之和)。', + 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: '一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成1点伤害。', + zhendu_info:'一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成1点伤害。', //zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成1点伤害。', - shangyi_info: '出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', - zniaoxiang_info: '锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。', - shoucheng_info: '当一名角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', - shengxi_info: '弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。', - hengzheng_info: '摸牌阶段开始时,若你的体力值为1或你没有手牌,则你可以放弃摸牌,改为获得每名其他角色区域内的一张牌。', - cunsi_info: '限定技,出牌阶段,你可以将所有手牌交给一名男性角色。该角色获得技能〖勇决〗,然后你将武将牌翻面。', - yongjue_info: '每回合限一次。当其他角色于回合内使用的【杀】结算完成后,若你不是此【杀】的目标角色,则你可以获得之。', - guixiu_info: '当你成为【杀】的目标后,若你的手牌数小于体力值,则你可以摸一张牌。', - fenming_info: '结束阶段开始时,若你处于横置状态,你可以弃置所有处于横置状态的角色的各一张牌。', - duanxie_info: '出牌阶段限一次,你可以令至多X名其他角色横置(X为你已损失的体力值且至少为1),然后你横置。', - xiaoguo_info: '其他角色的结束阶段开始时,你可以弃置一张手牌,令该角色选择一项:1.弃置一张装备牌,然后你摸一张牌;2.受到你对其造成的1点伤害。', - sijian_info: '当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', - suishi_info: '当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力。', - quji_info: '出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去1点体力。', - junbing_info: '一名角色的结束阶段开始时,若其手牌数不大于1,该角色可以摸一张牌。若如此做,该角色将所有手牌交给你,然后你交给其等量的牌。', - xiongyi_info: '限定技,出牌阶段,你可以选择任意名角色,这些角色各摸三张牌。然后若你的体力值最小,你回复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: '当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌(若你没有手牌则改为四张)。若你观看的牌中有此牌,你可以使用打出之。', - aocai_info_guozhan: '当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', - 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,你视为拥有技能〖神速〗。', - rebaobian: '豹变', - rebaobian_info: '锁定技。当你受到伤害后,你获得以下技能中第一个未拥有的技能:〖挑衅〗/〖咆哮〗/〖神速〗。', - bingzhao: '秉诏', - bingzhao_info: '主公技,游戏开始时,你选择一个其他势力。当你对该势力的角色发动〖骨疽〗时,其可令你额外摸一张牌。', - sunshao: '孙邵', - bizheng: '弼政', - bizheng_info: '摸牌阶段结束时,你可以令一名其他角色摸两张牌。然后,若你的手牌数大于体力上限,你弃置两张牌。若其的手牌数大于体力上限,其弃置两张牌。', - yidian: '佚典', - yidian_info: '当你使用牌选择目标时,若弃牌堆中没有与此牌名称相同的牌,则你可以为此牌增加一个目标(无距离限制)。', - xinlianji: '连计', - xinlianji_info: '出牌阶段限一次,你可以弃置一张手牌,令一名角色使用牌堆中的一张随机武器牌。然后其选择一项:对你指定的一名角色使用一张【杀】,或令你将其装备区里的武器牌交给任意角色。', - xinmoucheng: '谋逞', - xinmoucheng_info: '觉醒技,准备阶段,若有角色因你发动〖连计〗使用【杀】而造成过伤害,则你失去〖连计〗并获得〖矜功〗。', - xinjingong: '矜功', - xinjingong_backup: '矜功', - xinjingong_info: '出牌阶段限一次,你可以将一张【杀】或装备牌当做三张随机锦囊牌中的一张使用。', - caiyang: '蔡阳', - yinka: '印卡', - zhangling: '张陵', - zlhuji: '虎骑', - zlhuji_info: '锁定技,你与其他角色的距离-1,当你于回合外受到伤害后,你可进行判定,若结果为红色,视为你对伤害来源使用一张【杀】(无距离限制)。', - zlshoufu: '授符', - zlshoufu2: '授符', - zlshoufu_info: '出牌阶段限一次,你可摸一张牌,然后将一张手牌置于一名没有【箓】的角色的武将牌上,称为【箓】;其不能使用和打出与【箓】同类型的牌。该角色受到伤害后,或于弃牌阶段弃置至少两张与【箓】同类型的牌后,将【箓】置入弃牌堆。', - ol_zhangchangpu: 'OL张昌蒲', - ol_zhangchangpu_prefix: 'OL', - olxingshen: '省身', - olxingshen_info: '当你受到伤害后,你可以随机摸至多两张牌。若如此做,你获得X个“省”,且下一次发动〖严教〗展示牌时移去所有“省”并多展示等量的牌。(X为你已损失的体力值,且你至多拥有6个“省”)', - caoshuang: '曹爽', - tuogu: '托孤', - tuogu_info: '限定技,一名角色死亡时,你可以令其选择其武将牌上的一个技能(主公技,限定技,觉醒技,隐匿技、使命技等特殊技能除外),然后你获得其选择的技能。', - retuogu: '托孤', - retuogu_info: '一名角色死亡时,你可以令其选择其武将牌上的一个技能(主公技,限定技,觉醒技,隐匿技、使命技等特殊技能除外),然后你获得其选择的技能并失去上次因〖托孤〗获得的技能。', - shanzhuan: '擅专', - shanzhuan_info: '①当你对其他角色造成伤害后,若其判定区没有延时类锦囊牌,则你可以将其的一张牌置于其的判定区。若此牌不为延时锦囊牌且此牌为:红色,此牌视为【乐不思蜀】;黑色,此牌视为【兵粮寸断】。②回合结束时,若你本回合内未造成伤害,你可摸一张牌。', - spniluan: '逆乱', - spniluan_info: '出牌阶段,你可以将一张黑色牌当做【杀】使用。此【杀】使用结算完成后,若你未因此【杀】造成过伤害,则你令此【杀】不计入使用次数。', - spweiwu: '违忤', - spweiwu_info: '出牌阶段限一次,你可以将一张红色牌当无距离限制的【顺手牵羊】使用。', - spmouzhu: '谋诛', - spmouzhu_backup: '谋诛', - spmouzhu_info: '出牌阶段限一次,你可以选择任意名“距离为1”或“体力值等于你”的其他角色,这些角色依次进行以下结算:交给你一张手牌,然后若其手牌数小于你,则其视为对你使用一张【杀】或【决斗】。', - spyanhuo: '延祸', - spyanhuo_info: '当你死亡时,你可增加如下全局技能:当有角色使用【杀】时,此【杀】的伤害值基数+1。', - xiaoxi: '骁袭', - xiaoxi_info: '当你登场时,你可以视为使用一张【杀】。', - quyi: '麴义', - wolongfengchu: '卧龙凤雏', - youlong: '游龙', - youlong_info: '转换技,阴,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的普通锦囊牌;阳,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的基本牌。', - luanfeng: '鸾凤', + shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', + zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。', + shoucheng_info:'当一名角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', + shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。', + hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,则你可以放弃摸牌,改为获得每名其他角色区域内的一张牌。', + cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色。该角色获得技能〖勇决〗,然后你将武将牌翻面。', + yongjue_info:'每回合限一次。当其他角色于回合内使用的【杀】结算完成后,若你不是此【杀】的目标角色,则你可以获得之。', + guixiu_info:'当你成为【杀】的目标后,若你的手牌数小于体力值,则你可以摸一张牌。', + fenming_info:'结束阶段开始时,若你处于横置状态,你可以弃置所有处于横置状态的角色的各一张牌。', + duanxie_info:'出牌阶段限一次,你可以令至多X名其他角色横置(X为你已损失的体力值且至少为1),然后你横置。', + xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张手牌,令该角色选择一项:1.弃置一张装备牌,然后你摸一张牌;2.受到你对其造成的1点伤害。', + sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', + suishi_info:'当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力。', + quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去1点体力。', + junbing_info:'一名角色的结束阶段开始时,若其手牌数不大于1,该角色可以摸一张牌。若如此做,该角色将所有手牌交给你,然后你交给其等量的牌。', + xiongyi_info:'限定技,出牌阶段,你可以选择任意名角色,这些角色各摸三张牌。然后若你的体力值最小,你回复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:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌(若你没有手牌则改为四张)。若你观看的牌中有此牌,你可以使用打出之。', + aocai_info_guozhan:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', + 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,你视为拥有技能〖神速〗。', + rebaobian:'豹变', + rebaobian_info:'锁定技。当你受到伤害后,你获得以下技能中第一个未拥有的技能:〖挑衅〗/〖咆哮〗/〖神速〗。', + bingzhao:'秉诏', + bingzhao_info:'主公技,游戏开始时,你选择一个其他势力。当你对该势力的角色发动〖骨疽〗时,其可令你额外摸一张牌。', + sunshao:'孙邵', + bizheng:'弼政', + bizheng_info:'摸牌阶段结束时,你可以令一名其他角色摸两张牌。然后,若你的手牌数大于体力上限,你弃置两张牌。若其的手牌数大于体力上限,其弃置两张牌。', + yidian:'佚典', + yidian_info:'当你使用牌选择目标时,若弃牌堆中没有与此牌名称相同的牌,则你可以为此牌增加一个目标(无距离限制)。', + xinlianji:'连计', + xinlianji_info:'出牌阶段限一次,你可以弃置一张手牌,令一名角色使用牌堆中的一张随机武器牌。然后其选择一项:对你指定的一名角色使用一张【杀】,或令你将其装备区里的武器牌交给任意角色。', + xinmoucheng:'谋逞', + xinmoucheng_info:'觉醒技,准备阶段,若有角色因你发动〖连计〗使用【杀】而造成过伤害,则你失去〖连计〗并获得〖矜功〗。', + xinjingong:'矜功', + xinjingong_backup:'矜功', + xinjingong_info:'出牌阶段限一次,你可以将一张【杀】或装备牌当做三张随机锦囊牌中的一张使用。', + caiyang:'蔡阳', + yinka:'印卡', + zhangling:'张陵', + zlhuji:'虎骑', + zlhuji_info:'锁定技,你与其他角色的距离-1,当你于回合外受到伤害后,你可进行判定,若结果为红色,视为你对伤害来源使用一张【杀】(无距离限制)。', + zlshoufu:'授符', + zlshoufu2:'授符', + zlshoufu_info:'出牌阶段限一次,你可摸一张牌,然后将一张手牌置于一名没有【箓】的角色的武将牌上,称为【箓】;其不能使用和打出与【箓】同类型的牌。该角色受到伤害后,或于弃牌阶段弃置至少两张与【箓】同类型的牌后,将【箓】置入弃牌堆。', + ol_zhangchangpu:'OL张昌蒲', + ol_zhangchangpu_prefix:'OL', + olxingshen:'省身', + olxingshen_info:'当你受到伤害后,你可以随机摸至多两张牌。若如此做,你获得X个“省”,且下一次发动〖严教〗展示牌时移去所有“省”并多展示等量的牌。(X为你已损失的体力值,且你至多拥有6个“省”)', + caoshuang:'曹爽', + tuogu:'托孤', + tuogu_info:'限定技,一名角色死亡时,你可以令其选择其武将牌上的一个技能(主公技,限定技,觉醒技,隐匿技、使命技等特殊技能除外),然后你获得其选择的技能。', + retuogu:'托孤', + retuogu_info:'一名角色死亡时,你可以令其选择其武将牌上的一个技能(主公技,限定技,觉醒技,隐匿技、使命技等特殊技能除外),然后你获得其选择的技能并失去上次因〖托孤〗获得的技能。', + shanzhuan:'擅专', + shanzhuan_info:'①当你对其他角色造成伤害后,若其判定区没有延时类锦囊牌,则你可以将其的一张牌置于其的判定区。若此牌不为延时锦囊牌且此牌为:红色,此牌视为【乐不思蜀】;黑色,此牌视为【兵粮寸断】。②回合结束时,若你本回合内未造成伤害,你可摸一张牌。', + spniluan:'逆乱', + spniluan_info:'出牌阶段,你可以将一张黑色牌当做【杀】使用。此【杀】使用结算完成后,若你未因此【杀】造成过伤害,则你令此【杀】不计入使用次数。', + spweiwu:'违忤', + spweiwu_info:'出牌阶段限一次,你可以将一张红色牌当无距离限制的【顺手牵羊】使用。', + spmouzhu:'谋诛', + spmouzhu_backup:'谋诛', + spmouzhu_info:'出牌阶段限一次,你可以选择任意名“距离为1”或“体力值等于你”的其他角色,这些角色依次进行以下结算:交给你一张手牌,然后若其手牌数小于你,则其视为对你使用一张【杀】或【决斗】。', + spyanhuo:'延祸', + spyanhuo_info:'当你死亡时,你可增加如下全局技能:当有角色使用【杀】时,此【杀】的伤害值基数+1。', + xiaoxi:'骁袭', + xiaoxi_info:'当你登场时,你可以视为使用一张【杀】。', + quyi:'麴义', + wolongfengchu:'卧龙凤雏', + youlong:'游龙', + youlong_info:'转换技,阴,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的普通锦囊牌;阳,每轮限一次,你可以废除你的一个装备栏,视为使用一张未以此法使用过的基本牌。', + luanfeng:'鸾凤', //luanfeng_info_fullinfo:'限定技,一名角色进入濒死状态时,若其体力上限不小于你,你可令其回复至3点体力,恢复其被废除的装备栏,令其手牌补至6-X张(X为以此法恢复的装备栏数量),重置其因“改写”使用过的牌名。若该角色是你,重置你因“游龙”使用过的牌名。', - luanfeng_info: '限定技,一名角色进入濒死状态时,若其体力上限不小于你,你可令其回复至3点体力,恢复其被废除的装备栏,令其手牌补至6-X张(X为以此法恢复的装备栏数量)。若该角色是你,重置你因“游龙”使用过的牌名。', - reluanzhan: '乱战', - reluanzhan_add: '乱战', - reluanzhan_remove: '乱战', - reluanzhan_info: '当你受到或造成伤害后,你获得一个“乱”。当你使用【杀】或黑色普通锦囊牌选择目标后,你可为此牌增加至多X个目标。当你使用这些牌指定第一个目标后,若此牌目标数小于X,则你移去X/2(向上取整)个“乱”。(X为“乱”数)', - zhuixi: '追摄', - zhuixi_info: '锁定技,你使用【杀】的次数上限+1。', - reduanbing: '短兵', - reduanbing_info: '你使用【杀】选择目标后,可以为此【杀】增加一名距离为1的额外目标。你对距离为1的角色使用的【杀】需两张【闪】才能抵消。', - refenxun: '奋迅', - refenxun2: '奋迅', - refenxun_info: '出牌阶段限一次,你可以选择一名其他角色,然后本回合你计算与其的距离视为1;结束阶段开始时,若你未对其造成过伤害,你弃一张牌。', - zongyu: '宗预', - zyqiao: '气傲', - zyqiao_info: '每回合限两次。当你成为其他角色使用牌的目标后,你可以弃置其一张牌,然后你弃置一张牌。', - zyqiao_info_guozhan: '每回合限两次。当你成为其他势力的角色使用牌的目标后,你可以弃置其一张牌,然后你弃置一张牌。', - chengshang: '承赏', - chengshang_info: '当你于出牌阶段内使用的牌结算完成后,若此牌未造成过伤害且此牌的目标包含其他角色且你本阶段内未因〖承赏〗得到过牌,则你可以从牌堆中获得所有与此牌花色点数相同的牌。', - chengshang_info_guozhan: '当你于出牌阶段内使用的牌结算完成后,若此牌未造成过伤害且此牌的目标包含其他角色且你本阶段内未因〖承赏〗得到过牌,则你可以从牌堆中获得所有与此牌花色点数相同的牌。', - panshu: 'OL潘淑', - panshu_prefix: 'OL', - weiyi: '威仪', - weiyi_info: '每名角色限一次。当有角色受到伤害后,你可选择:①若其体力值不小于你,则其失去1点体力。②若其体力值不大于你且其已受伤,则其回复1点体力。', - jinzhi: '锦织', - jinzhi2: '锦织', - jinzhi_info: '当你需要使用或打出一张基本牌时,你可弃置X+1张颜色相同的牌并摸一张牌,然后视为你使用或打出了此牌。(X为你于本轮内发动此技能的次数)', - yanxiao_card: '言笑', - yanxiao_global: '言笑', - yanxiao_card_info: '判定阶段开始时,你获得判定区内的所有牌。', - gz_huangzu: '黄祖', - huangzu: 'OL黄祖', - huangzu_prefix: 'OL', - wangong: '挽弓', - wangong2: '挽弓', - wangong_info: '锁定技,当你使用基本牌时,你获得如下效果:当你使用下一张牌时,若此牌为【杀】,则此牌无次数和距离限制且伤害+1。', - huangchengyan: 'OL黄承彦', - huangchengyan_prefix: 'OL', - guanxu: '观虚', - guanxu_info: '出牌阶段限一次,你可以观看一名其他角色的手牌,然后你可将其中一张手牌与牌堆顶五张牌中的一张交换。若如此做,你弃置其手牌中三张花色相同的牌。', - yashi: '雅士', - yashi_info: '当你受到一次伤害后,你可选择一项:1. 令伤害来源的非锁定技无效直到其下个回合开始;2. 对一名其他角色发动〖观虚〗。', - olwuniang: '武娘', - olwuniang_info: '每回合限一次,当你于回合内使用的【杀】结算完成后,若此【杀】对应的目标数为1,则你可以令目标角色选择是否对你使用使用【杀】。你于其选择结算完成后摸一张牌,且本回合内使用【杀】的次数上限+1。', - olxushen: '许身', - olxushen_info: '限定技,当你进入濒死状态时,你可将体力回复至1点并获得技能〖镇南〗。然后若场上没有存活的“关索”,则你可以令一名其他男性角色选择是否将一张武将牌替换为“关索”。', - olzhennan: '镇南', - olzhennan2: '镇南', - olzhennan_info: '【南蛮入侵】对你无效。出牌阶段限一次,你可以将任意张手牌当做【南蛮入侵】对等量的角色使用。', - gaogan: '高干', - juguan: '拒关', - juguan_backup: '拒关', - juguan_info: '出牌阶段限一次,你可将一张手牌当【杀】或【决斗】使用。若受到此牌伤害的角色未在你的下回合开始前对你造成过伤害,你的下个摸牌阶段摸牌数+2。', - duxi: '杜袭', - quxi: '驱徙', - quxi_info: '限定技。出牌阶段结束时,你可跳过下个弃牌阶段并选择两名手牌数不同的其他角色。你将武将牌翻至背面,令这两名角色中手牌数较少的角色获得另一名角色的一张牌并获得一枚“丰”,另一名角色获得一枚“歉”。拥有“丰”/“歉”的角色的摸牌阶段额定摸牌数+1/-1。拥有“丰”/“歉”的角色死亡时,或一轮游戏开始时,你可转移“丰”/“歉”。', - bixiong: '避凶', - bixiong2: '避凶', - bixiong_info: '锁定技,当你于弃牌阶段弃置手牌后,其他角色不能使用与这些牌花色相同的牌指定你为目标直到你的下回合开始。', - fuwei: '扶危', - fuwei_info: '每回合限一次。当你的牌被其他角色弃置或获得后,你可从牌堆中获得一张与此牌名称相同的牌(若没有则改为摸一张牌)。', - yuejian: '约俭', - yuejian_info: '每回合限两次。当其他角色对你使用的牌A结算结束后,你可展示所有手牌。若牌A有花色且你的手牌中没有同花色的牌,则你获得牌A对应的所有实体牌。', - ol_dengzhi: 'OL邓芝', - ol_dengzhi_prefix: 'OL', - olxiuhao: '修好', - olxiuhao_info: '每回合限一次。当你受到其他角色造成的伤害时,或其他角色受到你造成的伤害时,你可防止此伤害,然后令伤害来源摸两张牌。', - olsujian: '素俭', - olsujian_given: '已分配', - olsujian_info: '锁定技。弃牌阶段开始前,你将此阶段的规则改为:{你选择一项:①将所有不为本回合得到的手牌分配给其他角色。②弃置这些手牌,然后弃置一名其他角色等量的牌}。', - ol_wangrong: 'OL王荣', - ol_wangrong_prefix: 'OL', - olfengzi: '丰姿', - olfengzi_info: '出牌阶段限一次。当你使用有目标的基本牌或普通锦囊牌时,你可弃置一张与此牌类型相同的牌,然后令此牌结算两次。', - oljizhan: '吉占', - oljizhan_info: '摸牌阶段开始时,你可以放弃摸牌。你展示牌堆顶的一张牌,并猜测牌堆顶的下一张牌点数大于或小于此牌。若你猜对,你可继续重复此流程。然后你获得以此法展示的所有牌。', - olfusong: '赋颂', - olfusong_info: '当你死亡时,你可以选择一名体力上限大于你的其他角色。其选择获得〖吉占〗或〖丰姿〗。', - zuofen: '左棻', - zhaosong: '诏颂', - zhaosong_info: '一名其他角色的摸牌阶段结束时,若其没有因〖诏颂〗而获得的标记,则你可令其正面向上交给你一张手牌。根据此牌的类型,该角色获得对应的标记和效果:
    锦囊牌:“诔”标记。当拥有者进入濒死状态时,其可弃置所有“诔”,将体力回复至1点并摸一张牌。
    装备牌:“赋”标记。拥有者的出牌阶段开始时,其可弃置所有“赋”,弃置一名角色区域内的至多两张牌。
    基本牌:“颂”标记。当使用者使用仅指定一个目标的【杀】时,其可弃置“颂”,为此【杀】增加至多两个目标。', - lisi: '离思', - lisi_info: '当你于回合外使用的牌结算结束后,你可将其交给一名手牌数不大于你的其他角色。', - ol_yangyi: '杨仪', - oljuanxia: '狷狭', - oljuanxia_info: '结束阶段,你可以选择一名其他角色。你依次视为对其使用至多三种单目标普通锦囊牌。然后其下回合结束时,可视为对你使用等量的【杀】。', - oldingcuo: '定措', - oldingcuo_info: '每回合限一次。当你受到或造成伤害后,你可摸两张牌。若这两张牌颜色不同,则你弃置一张手牌。', - fengfangnv: 'OL冯妤', - fengfangnv_prefix: 'OL', - zhuangshu: '妆梳', - zhuangshu_info: '①游戏开始时,你可将{【琼梳】,【犀梳】,【金梳】}中的一张牌置于装备区。②一名角色的回合开始时,若其宝物区为空,则你可以弃置一张牌,并根据此牌的类型,按如下关系将一张宝物牌置入该角色的装备区:{<基本牌,【琼梳】>,<锦囊牌,【犀梳】>,<装备牌,【金梳】>}。', - chuiti: '垂涕', - chuiti_info: '每回合限一次。当你或拥有〖妆梳〗牌角色的牌因弃置而进入弃牌堆后,你可使用其中的一张牌。', - zhuangshu_basic: '琼梳', - zhuangshu_basic_bg: '琼', - zhuangshu_basic_info: '当你受到伤害时,你可以弃置X张牌并防止此伤害(X为伤害值)。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', - zhuangshu_trick: '犀梳', - zhuangshu_trick_bg: '犀', - zhuangshu_trick_info: '判定阶段开始前,你可选择:①跳过此阶段。②跳过本回合的弃牌阶段。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', - zhuangshu_equip: '金梳', - zhuangshu_equip_bg: '金', - zhuangshu_equip_info: '锁定技。出牌阶段结束时,你将手牌摸至手牌上限(至多摸五张)。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', - ol_dongzhao: 'OL董昭', - ol_dongzhao_prefix: 'OL', - olxianlve: '先略', - olxianlve_info: '①主公的回合开始时,你可声明并记录一个锦囊牌的名称并移除先前的记录。②每回合限一次,其他角色使用〖先略〗记录过的锦囊牌后,你可摸两张牌并可以分配给任意其他角色,然后你可声明并记录一个锦囊牌的名称并移除先前的记录。', - olzaowang: '造王', - olzaowang2: '造王', - olzaowang_info: '限定技。出牌阶段,你可以令一名角色加1点体力上限,回复1点体力并摸三张牌,且获得如下效果:主公死亡时,若其身份为忠臣,则其和主公交换身份牌;其死亡时,若其身份为反贼且伤害来源的身份为主公或忠臣,则以主忠胜利结束本局游戏。', - sp_ol_zhanghe: 'SP张郃', - sp_ol_zhanghe_prefix: 'SP', - spolzhouxuan: '周旋', - spolzhouxuan_info: '①弃牌阶段开始时,你可将任意张置于武将牌上,称为“旋”(你至多拥有五张“旋”)。②当你使用牌时,你随机将一张“旋”置入弃牌堆,然后摸一张牌(若你的手牌数不为全场唯一最多则额外摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。', - wuyan: '吾彦', - lanjiang: '澜疆', - lanjiang_info: '结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以令其中一名手牌数小于你的角色摸一张牌。', - ol_zhuling: 'OL朱灵', - ol_zhuling_prefix: 'OL', - jixian: '急陷', - jixian_info: '摸牌阶段结束时,你可以选择一名满足以下至少一项条件的角色:⒈装备区内有防具牌;⒉拥有的普通技能数大于你;⒊体力值等于体力上限。你视为对其使用一张【杀】,然后摸X张牌(X为其于此【杀】结算前满足的条件数);若此【杀】未造成伤害,则你失去1点体力。', - ol_chendeng: 'OL陈登', - ol_chendeng_prefix: 'OL', - olfengji: '丰积', - olfengji_info: '摸牌阶段开始时,你选择:⒈本回合摸牌阶段的额定摸牌数-1,且令一名其他角色下回合摸牌阶段的额定摸牌数+2;⒉本回合摸牌阶段的额定摸牌数+1。然后你选择:⒈本回合使用【杀】的次数上限-1,且令一名其他角色下回合使用【杀】的次数上限+2;⒉本回合使用【杀】的次数上限+1。', - tianyu: '田豫', - saodi: '扫狄', - saodi_info: '当你使用【杀】或普通锦囊牌指定唯一其他角色为目标时,你可从逆时针方向和顺时针方向中选择一个你与其之间角色最少的方向。你令该方向下你与其之间的所有能成为此牌额外目标的角色均成为此牌的目标。', - zhuitao: '追讨', - zhuitao_info: '①准备阶段,你可选择一名未被〖追讨〗记录过的其他角色。②你至所有〖追讨〗记录过的角色的距离-1。③当你对一名被〖追讨〗记录过的角色造成伤害时,你从〖追讨〗记录里移除该角色。', - fanjiangzhangda_ab: '范疆张达', - fanjiangzhangda: '范强张达', - yuanchou: '怨仇', - yuanchou_info: '锁定技。当你使用黑色【杀】指定目标角色后或成为黑色【杀】的目标角色后,你令目标角色的防具技能无效直到此【杀】被抵消或造成伤害。', - juesheng: '决生', - juesheng_info: '限定技。出牌阶段,你可视为使用一张【决斗】。当你因此【决斗】造成伤害时,你将伤害值改为X(X为目标角色本局游戏内使用过【杀】的数量且至少为1)且令目标角色获得此技能直到其下回合结束。', - qinghegongzhu: '清河公主', - zengou: '谮构', - zengou_info: '当有角色使用【闪】时,若其在你的攻击范围内,则你可以弃置一张非基本牌或失去1点体力,然后取消此【闪】的目标并获得其对应的实体牌。', - qhzhangji: '长姬', - qhzhangji_info: '一名角色的回合结束时,若你本回合内:造成过伤害,则你可以令其摸两张牌;受到过伤害,则你可以令其弃置两张牌。', - sp_menghuo: 'SP孟获', - sp_menghuo_prefix: 'SP', - spmanwang: '蛮王', - spmanwang_info: '出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前等量项:⒈获得〖叛侵〗。⒉摸一张牌。⒊回复1点体力。⒋摸两张牌并失去〖叛侵〗。', - sppanqin: '叛侵', - sppanqin_info: '出牌阶段或弃牌阶段结束时,你可将你于本阶段内弃置且位于弃牌堆的所有牌当做【南蛮入侵】使用。然后若此牌被使用时对应的实体牌数不大于此牌的目标数,则你执行并移除〖蛮王〗中的最后一个选项。', - tengfanglan: 'OL滕芳兰', - tengfanglan_prefix: 'OL', - luochong: '落宠', - luochong_info: '准备阶段开始时/当你于一回合内首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):⒈令一名角色回复1点体力。⒉令一名角色失去1点体力。⒊令一名角色弃置两张牌。⒋令一名角色摸两张牌。', - aichen: '哀尘', - aichen_info: '锁定技。当你进入濒死状态时,若〖落宠〗中的剩余选项数大于1,则你选择移去〖落宠〗中的一个选项。', - weizi: '卫兹', - yuanzi: '援资', - yuanzi_info: '每轮限一次。其他角色的准备阶段开始时,你可将所有手牌交给该角色。若如此做,当该角色于本回合内造成伤害后,若其手牌数不小于你,则你摸两张牌。', - liejie: '烈节', - liejie_info: '当你受到伤害后,你可以弃置至多三张牌,摸等量的牌,然后可弃置伤害来源的至多X张牌(X为你以此法弃置的红色牌的数量)。', - ruiji: 'OL芮姬', - ruiji_prefix: 'OL', - qiaoli: '巧力', - qiaoli_info: '出牌阶段各限一次,你可以将一张武器牌/非武器装备牌当作【决斗】使用。若此【决斗】对应的实体牌为武器牌,当你以此【决斗】对目标角色造成伤害后,你摸X张牌(X为此牌的攻击范围),且可以将其中任意张牌分配给其他角色;若此【决斗】对应的实体牌不为武器牌,此牌不可被响应,且你于结束阶段从牌堆中获得一张装备牌。', - qiaoli_given: '已分配', - qingliang: '清靓', - qingliang_info: '每回合限一次,当你成为其他角色使用【杀】或伤害类锦囊牌的唯一目标时,你可展示所有手牌,然后选择一项:⒈你与其各摸一张牌,⒉取消此目标,然后弃置你手牌中一种花色的所有牌。', - chixueqingfeng: '赤血青锋', - chixueqingfeng2: '赤血青锋', - chixueqingfeng_info: '锁定技,当你使用【杀】指定目标后,你令目标角色不能使用或打出手牌且防具技能无效直到此【杀】结算结束。', - wushuangfangtianji: '无双方天戟', - wushuangfangtianji_skill: "无双方天戟", - wushuangfangtianji_info: "当你因执行【杀】的效果而造成伤害后,你可选择一项:⒈摸一张牌;⒉弃置目标角色的一张牌。", - guilongzhanyuedao: '鬼龙斩月刀', - guilongzhanyuedao_info: '锁定技,你使用的红色【杀】不可被响应。', - bintieshuangji: '镔铁双戟', - bintieshuangji_skill: '镔铁双戟', - bintieshuangji_info: '当你使用的【杀】被抵消后,你可失去1点体力。获得此【杀】对应的所有实体牌,摸一张牌,且本回合使用【杀】的次数上限+1。', - linglongshimandai: "玲珑狮蛮带", - linglongshimandai_info: "当你成为其他角色使用的牌的唯一目标后,你可以进行判定。若判定结果为♥,则此牌对你无效。", - linglongshimandai_skill: "玲珑狮蛮带", - hongmianbaihuapao_skill: "红棉百花袍", - hongmianbaihuapao: "红棉百花袍", - hongmianbaihuapao_info: "锁定技,当你受到属性伤害时,防止此伤害。", - qimenbagua: '奇门八卦', - qimenbagua_info: '锁定技,【杀】对你无效。', - guofengyupao: '国风玉袍', - guofengyupao_info: '锁定技,你不是其他角色使用普通锦囊牌的合法目标。', - shufazijinguan: '束发紫金冠', - shufazijinguan_skill: "束发紫金冠", - shufazijinguan_info: "准备阶段,你可以对一名其他角色造成1点伤害。", - sanlve: '三略', - sanlve_skill: '三略', - sanlve_info: '锁定技。你的攻击范围+1。你的手牌上限+1。你使用【杀】的次数上限+1。', - zhaogujing: '照骨镜', - zhaogujing_skill: '照骨镜', - zhaogujing_info: '出牌阶段结束时,你可展示手牌中的一张基本牌或普通锦囊牌,然后你视为使用一张牌名和属性与此牌相同的牌。', - xuwangzhimian: '虚妄之冕', - xuwangzhimian_info: '锁定技,摸牌阶段,你令额定摸牌数+2;你的手牌上限-1。', - ol_puyuan: 'OL蒲元', - ol_puyuan_prefix: 'OL', - olshengong: '神工', - olshengong_info: '出牌阶段每项限一次。你可以弃置一张武器牌/防具牌/其他装备牌,并发起一次“锻造”。然后你从锻造结果中选择一张牌,置于一名角色的装备区内(可替换原装备)。当有因你发动〖神工〗而加入游戏的牌进入弃牌堆后,你将此牌移出游戏,然后你于当前回合结束后摸一张牌。', - olqisi: '奇思', - olqisi_info: '①游戏开始时,你获得两张副类别不同的牌,并将这些牌置入你的装备区。②摸牌阶段开始时,你可以少摸一张牌并声明一种装备牌的副类别,然后从牌堆或弃牌堆中获得一张该副类别的牌。', - olzhuiji: '追击', - olzhuiji_info: '锁定技。①你至体力值不大于你的角色的距离为1。②当你使用【杀】指定距离为1的角色为目标后,你令其选择一项:⒈弃置一张牌。⒉重铸装备区内的所有牌。', - zhaoyǎn: 'OL赵俨', - zhaoyǎn_prefix: 'OL', - tongxie: '同协', - tongxie_info: '出牌阶段开始时,你可以选择包括你在内的至多三名角色(你与这些角色均称为“同协角色”)。这些角色中手牌数唯一最少的角色摸一张牌,且你获得如下效果直到你下回合开始:①当有“同协角色”对唯一目标角色使用的【杀】结算结束后,其他“同协角色”可以依次对目标角色使用一张【杀】(无距离和次数限制,且不能再触发此效果)。②当有“同协角色”受到伤害时,其他“同协角色”(本回合内失去过体力的角色除外)可以防止此伤害,失去1点体力。', - jin_zhouchu: '周处', - shanduan: '善断', - shanduan_info: '锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=[1,2,3,4]中分配数值。②当你于回合外受到伤害后,你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。', - yilie: '义烈', - yilie_info: '每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。', - caoxiancaohua: '曹宪曹华', - huamu: '化木', - huamu_info: '当你使用手牌后,若此牌和本回合内上一张被使用的牌颜色不同,则你可以将此牌对应的所有{位于处理区或装备区}的实体牌置于你的武将牌上。这些牌中的黑色牌称为“灵杉”,红色牌称为“玉树”。', - qianmeng: '前盟', - qianmeng_info: '锁定技。当有牌移动事件结算结束后,若有角色的“灵杉”和“玉树”数量发生了变化,且二者数量相等或有一项为0,则你摸一张牌。', - liangyuan: '良缘', - liangyuan_info: '每轮每项各限一次。你可以将场上所有的“灵杉”/“玉树”置于处理区,然后将这些牌当做【酒】/【桃】使用。', - jisi: '羁肆', - jisi_info: '限定技。准备阶段,你可以令一名其他角色获得你武将牌上的一个已发动过的其他技能。然后你弃置所有手牌,并视为对其使用一张【杀】(无距离关系的限制)。', - huojun: 'OL霍峻', - huojun_prefix: 'OL', - qiongshou: '穷守', - qiongshou_info: '锁定技。①游戏开始时,你废除所有装备栏并摸四张牌。②你的手牌上限+4。', - fenrui: '奋锐', - fenrui_info: '结束阶段,你可以弃置一张牌并恢复一个装备栏。系统检索一张对应的装备牌,你使用之。然后你可以选择一名装备区内牌数小于你的其他角色,对其造成X点伤害(X为你与其装备区内的牌数之差,且每局限一次)。', - wangyan: '王衍', - yangkuang: '阳狂', - yangkuang_info: '当你回复体力后,若你的体力值等于体力上限,则你可以视为使用一张【酒】,然后当前回合角色摸一张牌,你摸一张牌。', - cihuang: '雌黄', - cihuang_info: '当有牌被抵消后,若此牌的目标数为1且此牌的使用者A为当前回合角色,则你可以将一张牌当做一张你本轮内未使用过的属性【杀】或单目标锦囊牌对A使用(不可被响应)。', - sanku: '三窟', - sanku_info: '锁定技。①当你进入濒死状态时,你减1点体力上限,然后将体力回复至体力上限。②当你加体力上限前,取消之。', - dengzhong: '邓忠', - dzkanpo: '勘破', - dzkanpo_info: '①当你因执行【杀】的效果而造成伤害后,你可以观看目标角色的手牌,然后获得其中一张与此【杀】花色相同的牌。②每回合限一次,你可以将一张手牌当做【杀】使用。', - dzgengzhan: '更战', - dzgengzhan_info: '①其他角色的出牌阶段限一次,当有【杀】因弃置而进入弃牌堆后,你可以获得这些【杀】。②其他角色的结束阶段,若其本回合内未使用过【杀】,则你下个出牌阶段使用【杀】的次数上限+1。', - xiahouxuan: '夏侯玄', - olhuanfu: '宦浮', - olhuanfu_info: '当你使用【杀】指定第一个目标后,或成为【杀】的目标后,你可以弃置X张牌(X∈[1, 你的体力上限])。此【杀】结算结束后,若此【杀】累计因执行效果而造成的伤害值等于X,则你摸2X张牌。', - olqingyi: '清议', - olqingyi_info: '①出牌阶段限一次,你可以选择至多两名有牌的其他角色。你和这些角色同时弃置一张牌,然后若这些牌类型均相同,则你重复此流程。②结束阶段开始时,若你本回合内发动〖清议①〗弃置的牌包含两种颜色,则你获得每种颜色的牌各一张。', - olzeyue: '迮阅', - olzeyue_info: '限定技。准备阶段,你可以选择一名于你的上个回合结束后对你造成过伤害的角色A及其武将牌上的一个非锁定技B,令A的B失效。然后每轮游戏开始时,A依次视为对你使用X张【杀】(X为B失效状态下经过的完整轮数)。当你因这些【杀】受到伤害后,你令A恢复技能B。', - xindiaodu: "调度", - xindiaodu_info: "①每回合限一次,与你势力相同的角色使用装备牌时,其可以摸一张牌。②出牌阶段开始时,你可以获得与你势力相同的一名角色装备区内的一张牌,然后你可以将此牌交给另一名与你势力相同的其他角色。", - olhuanshi: '缓释', - olhuanshi_info: '一名角色的判定牌生效前,你可以令其观看你的手牌并选择你的一张牌,你打出此牌代替判定牌。然后你可以重铸任意张牌(每回合限重铸一次)。', - olhongyuan: '弘援', - olhongyuan_info: '每阶段限一次。当你一次性获得至少两张牌以后,你可以将至多两张牌交给等量名角色。', - olmingzhe: '明哲', - olmingzhe_info: '锁定技。当你于出牌阶段外失去红色牌后,你展示这些牌中所有背面朝上移动的牌(没有则不展示),然后摸一张牌。', - ahuinan: '阿会喃', - jueman: '蟨蛮', - jueman_info: '锁定技。一名角色的回合结束时,若本回合被使用过的基本牌数不小于2,且前两张基本牌的使用者:均不为你,你视为使用本回合被使用的第三张基本牌;有且仅有其中之一为你,你摸一张牌。', - ol_liuba: 'OL刘巴', - ol_liuba_prefix: 'OL', - oltongduo: '统度', - oltongduo_info: '准备阶段,你可以令一名角色交给你一张手牌,然后出牌阶段结束时,你将此牌置于牌堆顶。', - olzhubi: '铸币', - olzhubi_tag: '币', - olzhubi_info: '①出牌阶段限X次(X为你的体力上限)。你可以令一名角色重铸一张牌,以此法获得的牌称为“币”。②一名角色的结束阶段,若其有“币”,其观看牌堆底的五张牌,然后可以用任意“币”交换其中等量张牌。', - ol_furong: '傅肜', - olxiaosi: '效死', - olxiaosi_info: '出牌阶段限一次。你可以选择一名有手牌的其他角色并弃置一张基本牌。若其有可被弃置的基本牌,其弃置一张基本牌。然后你可以以任意顺序使用你与其以此法弃置的牌(无距离和次数限制)。最后若其未以此法弃置牌,你摸一张牌。', - zhangzhi: '张芝', - olbixin: '笔心', - olbixin_info: '一名角色的准备阶段或结束阶段,你可以声明一种牌的类型(每种类型限[1]次),并选择一种你本轮未使用过且有合法目标的的基本牌。你摸[3]张牌,然后若你有此类型的手牌,你将所有此类型的手牌当此基本牌使用。', - olximo: '洗墨', - olximo_info: '锁定技。当你发动〖笔心〗后,你移除其描述的前五个字符。若你已发动三次〖笔心〗,交换中括号中的两个数字,失去〖洗墨〗并获得〖飞白〗。', - olfeibai: '飞白', - olfeibai_info: '转换技,锁定技。阴:当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1;阳:当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。', - olqizhou: '绮冑', - olqizhou_info: '锁定技。每个回合开始前,或当你装备区内的牌发生变化后,你失去所有因此技能获得过的额外技能,然后根据你装备区内的花色数获得对应的技能。至少一种:〖短兵〗、至少两种:〖英姿〗、至少三种:〖奋威〗、至少四种:〖澜江〗。', - olshanxi: '闪袭', - olshanxi_info: '出牌阶段限一次。你可以选择一名攻击范围内不包含你的其他角色,展示你与其的至多X张手牌(X为你的空装备栏数)。若这些牌中有【闪】,则你弃置这些【闪】,然后获得对方的一张未展示的牌。', - macheng: '马承', - olchenglie: '骋烈', - olchenglie_info: '当你使用【杀】选择目标后,你可以令至多两名角色也成为此牌目标,并展示牌堆顶的等同于目标数张牌,然后你可以将一张手牌与其中一张牌交换,将这些牌扣置于每名目标角色武将牌上,称为“骋烈”牌。此牌结算结束后:1.若有红色“骋烈”牌的角色:响应过此【杀】,其交给你一张牌;未响应此【杀】,其回复1点体力;2.有“骋烈”牌的角色将其“骋烈”牌置入弃牌堆。', - quhuang: '屈晃', - olqiejian: '切谏', - olqiejian_info: '当一名角色失去最后的手牌后,你可以摸一张牌,然后令其摸一张牌,你选择一项:1.弃置你或其场上的一张牌;2.你于本轮不能再对其发动此技能。', - olnishou: '泥首', - olnishou_info: '锁定技。当你装备区里的牌进入弃牌堆后,你选择一项:1.将这些牌中第一张能当【闪电】对你使用的牌当【闪电】使用;2.本阶段结束时,你与一名手牌数最少的角色交换手牌。', - zhanghua: '张华', - olbihun: '弼昏', - olbihun_info: '锁定技。当你使用牌指定其他角色为目标时,若你的手牌数大于手牌上限且若此牌的目标数:大于1,取消此目标;为1,其获得此牌。', - olchuanwu: '穿屋', - olchuanwu_info: '锁定技。当你造成或受到伤害后,你令武将牌上的前X个未失效的技能失效直到回合结束。然后你摸等同于你此次失效的技能数张牌(X为你的攻击范围)。', - oljianhe: '剑合', - oljianhe_info: '出牌阶段每名角色限一次。你可以重铸至少两张同名牌或至少两张装备牌,然后令一名角色选择一项:1.重铸等量张与你以此法重铸的牌类型相同的牌;2.受到你造成的1点雷电伤害。', - dongtuna: '董荼那', - oljianman: '鹣蛮', - oljianman_info: '锁定技。一名角色的回合结束时,若本回合被使用过的基本牌数不小于2,且前两张基本牌的使用者:均为你,你视为使用其中的一张牌;有且仅有其中之一为你,你弃置另一名使用者一张牌。', - maxiumatie: '马休马铁', - olkenshang: '垦伤', - olkenshang_info: '你可以将任意张牌当【杀】使用,然后你可以将此牌目标改为所有你攻击范围外的角色。此牌结算结束后,若此牌对应的实体牌数大于X,你摸X张牌(X为此牌造成过的伤害值),否则你失去一个技能。', - rekenshang: '垦伤', - rekenshang_info: '你可以将至少两张牌当【杀】使用,然后你可以将此牌目标改为等量名角色。此牌结算结束后,若此牌对应的实体牌数大于此牌造成过的伤害值,你摸一张牌。', - ol_zhujun: 'OL朱儁', - ol_zhujun_prefix: 'OL', - olcuipo: '摧破', - olcuipo_info: '锁定技。当你使用牌时,若此牌是你本回合使用的第X张牌(X为此牌牌名的字数),则:{若此牌为【杀】或伤害类锦囊牌,则此牌的伤害值基数+1,否则你摸一张牌}。', - ol_zhangyì: 'OL张翼', - ol_zhangyì_prefix: 'OL', - oldianjun: '殿军', - oldianjun_info: '锁定技。回合结束时,你受到1点无来源伤害,然后执行一个额外的出牌阶段。', - olkangrui: '亢锐', - olkangrui_info: '当一名角色于其回合内首次受到伤害后,你可以摸一张牌并选择一项:1.令其回复1点体力;2.令其于本回合下次造成的伤害+1。然后当其于本回合造成伤害时,其本回合手牌上限基数为0。', - wangguan: '王瓘', - olmiuyan: '谬焰', - olmiuyan_tag: 'invisible', - olmiuyan_info: '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的手牌;处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。', - olshilu: '失路', - olshilu_info: '锁定技。当你受到伤害后,你摸X张牌(X为你的体力值且至多为5)。然后你展示攻击范围内一名角色的一张手牌,令此牌的牌名视为【杀】。', - ol_huban: 'OL胡班', - ol_huban_prefix: 'OL', - olhuiyun: '晖云', - olhuiyun_tag: 'invisible', - olhuiyun_info: '每轮每项各限一次。你可以将一张牌当【火攻】使用。此牌结算结束后,你选择一项,令目标角色选择是否执行:1.使用展示的牌,然后重铸所有手牌;2.使用一张手牌,然后重铸展示牌;3.摸一张牌。', - sunhong: '孙弘', - olxianbi: '险诐', - olxianbi_info: '出牌阶段限一次。你可以选择一名角色,然后将手牌摸至或弃置至等同于其装备区里的牌数(至多摸五张),且当你因此弃置一张牌后,你随机获得弃牌堆中的另一张类型相同的牌。', - olzenrun: '谮润', - olzenrun_info: '每阶段限一次。当你摸牌时,你可以改为获得一名其他角色等量的牌,然后其选择一项:1.摸等量的牌;2.令你本局游戏不能再对其发动〖险诐〗和〖谮润〗。', - luoxian: '罗宪', - oldaili: '带砺', - oldaili_tag: '带砺', - oldaili_info: '一名角色的回合结束时,若你被展示过的手牌数为偶数,则你可以翻面,摸三张牌并展示之。', - zhangshiping: '张世平', - olhongji: '鸿济', - olhongji_info: '每轮每项各限一次。一名角色的准备阶段,若其手牌数最少/最多,你可以令其于本回合第一个摸牌阶段/出牌阶段后执行一个额外的摸牌阶段/出牌阶段(若其条件同时满足则只能选择一项)。', - olxinggu: '行贾', - olxinggu_info: '①游戏开始时,你将牌堆中的三张坐骑牌扣置于武将牌上。②结束阶段,你可以将一张〖行贾①〗牌置于一名其他角色的装备区,然后你从牌堆获得一张♦牌。', - lushi: '卢氏', - olzhuyan: '驻颜', - olzhuyan_info: '每名角色每项各限一次。结束阶段,你可以令一名角色将以下一项调整至与其上一个准备阶段结束后相同:1.体力值;2.手牌数(体力值至多失去至1,手牌数至多摸至5;若其未执行过准备阶段则改为游戏开始时)。', - olleijie: '雷劫', - olleijie_info: '准备阶段,你可以令一名角色判定,若结果为♠2~9,其受到2点雷电伤害,否则其摸两张牌。', - ol_liuyan: 'OL刘焉', - ol_liuyan_prefix: 'OL', - olpianan: '偏安', - olpianan_info: '锁定技。游戏开始或弃牌阶段结束时,你弃置所有不为【闪】的手牌(没有则不弃)。若你的手牌数小于体力值,你获得牌堆或弃牌堆中的前X张【闪】(X为你的体力值与手牌数的差)。', - olyinji: '殷积', - olyinji_info: '锁定技。结束阶段,若你的体力值不为唯一最大,你选择回复1点体力或加1点体力上限。', - olkuisi: '窥伺', - olkuisi_info: '锁定技。摸牌阶段开始时,你跳过此阶段,然后观看牌堆顶的四张牌并可以使用其中任意张。若你以此法使用的牌数不为2或3,你减1点体力上限。', - ol_wanglang: 'OL王朗', - ol_wanglang_prefix: 'OL', - oljici: '激词', - oljici_info: '当你的拼点牌亮出后,若点数不大于X,你可令点数+X并令〖鼓舌〗视为未发动过(X为你的“饶舌”标记数)。', - ol_mengda: 'OL孟达', - ol_mengda_prefix: 'OL', - olgoude: '苟得', - olgoude_info: '一名角色的回合结束时,若有与你势力相同的角色执行过以下项,则你可以执行这些角色未执行过的一项:1.摸一张牌;2.弃置一名角色的一张手牌;3.使用一张无对应实体牌的【杀】;4.变更势力。', - haopu: '郝普', - olzhenying: '镇荧', - olzhenying_info: '出牌阶段限两次。你可以选择一名手牌数不大于你的其他角色,你与其同时将手牌摸或弃置至至多两张。然后你与其中手牌数较少的角色视为对另一名角色使用一张【决斗】。', - ol_wenqin: '文钦', - olguangao: '犷骜', - olguangao_info: '当你/其他角色使用【杀】时,你/该角色可以额外指定一个目标/你为目标(有距离限制)。然后若你的手牌数为偶数,你摸一张牌并令此牌对任意目标无效(可不选)。', - olhuiqi: '彗企', - olhuiqi_info: '觉醒技。一名角色回合结束后,若你与其他两名角色于此回合成为过牌的目标,你获得〖偕举〗并获得一个额外的回合。', - olxieju: '偕举', - olxieju_info: '出牌阶段限一次。你可以令任意名本回合成为过牌的目标的角色依次视为使用一张【杀】。', - ol_zhouqun: '周群', - oltianhou: '天候', - oltianhou_info: '锁定技。准备阶段,你观看牌堆顶的一张牌,且可以用你的一张牌交换此牌。然后你展示牌堆顶的牌,令一名角色根据此牌的花色获得对应的技能直到你下个准备阶段开始:♠〖骤雨〗;♥〖烈暑〗;♣〖严霜〗;♦〖凝雾〗。', - olchenshuo: '谶说', - olchenshuo_info: '结束阶段,你可以展示一张手牌,然后展示牌堆顶的一张牌。若这两张牌类型/花色/点数/牌名字数中任一项相同且已展示的牌数小于3,则你重复此流程,然后获得所有所有展示牌。', - oltianhou_spade: '骤雨', - oltianhou_spade_miehuo: '骤雨', - oltianhou_spade_info: '锁定技。其他角色造成火属性伤害时,取消之;一名角色受到雷属性伤害后,所有与其座次相邻的角色失去1点体力。', - oltianhou_heart: '烈暑', - oltianhou_heart_info: '锁定技。其他角色的结束阶段开始时,若其体力值为全场最大,则其失去1点体力。', - oltianhou_club: '严霜', - oltianhou_club_info: '锁定技。其他角色的结束阶段开始时,若其体力值为全场最小,则其失去1点体力。', - oltianhou_diamond: '凝雾', - oltianhou_diamond_info: '锁定技。其他角色使用【杀】指定与其座次不相邻唯一目标时,则其判定。若判定结果的点数大于此【杀】,则此【杀】对其无效。', - duanjiong: '段颎', - olsaogu: '扫谷', - olsaogu_info: '转换技。①出牌阶段,你可以。阴:弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。', - olcuorui: '挫锐', - olcuorui_info: '锁定技。①游戏开始时,你将手牌摸至场上存活人数张(至多摸至8张)。②当你成为延时锦囊牌的目标后,你跳过下个判定阶段。', - olmouzhu: '谋诛', - olmouzhu_info: '出牌阶段限一次,你可以令一名有手牌的其他角色交给你一张手牌。然后若其手牌数小于你,其视为使用一张【杀】或【决斗】。', - olyanhuo: '延祸', - olyanhuo_info: '当你死亡时,你可以弃置杀死你的角色至多X张牌(X为你的牌数)。', - olniluan: '逆乱', - olniluan_info: '体力值大于你的其他角色的结束阶段,若其本回合内使用过【杀】,则你可以将一张黑色牌当作【杀】对其使用(无距离限制)。', - olxiaoxi: '骁袭', - olxiaoxi_info: '一轮游戏开始时,你可以视为使用一张无距离限制的【杀】。', - ol_qianzhao: '牵招', - olweifu: '威抚', - olweifu_info: '出牌阶段,你可以弃置一张牌并判定。你本回合下次使用与结果类型相同的牌无距离限制,且可以额外指定一个目标。若你弃置的牌与判定牌类型相同,你摸一张牌。', - olkuansai: '款塞', - olkuansai_info: '每回合限一次,当一张牌指定第一个目标后,若目标数不小于你的体力值,你可以令其中一个目标选择一项:1.交给你一张牌;2.令你回复1点体力。', - ol_luyusheng: 'OL陆郁生', - ol_luyusheng_prefix: 'OL', - olcangxin: '藏心', - olcangxin_info: '锁定技。①当你受到伤害时,你观看牌堆底的三张牌并弃置其中任意张牌,若你以此法弃置了红桃牌,则防止此伤害。②摸牌阶段开始时,你展示牌堆底的三张牌,然后摸X张牌(X为其中红桃牌的数量)。', - olrunwei: '润微', - olrunwei_info: '其他角色的弃牌阶段开始时,若其已受伤,则你可以选择一项:①令其弃置一张牌,其本回合手牌上限+1;②令其摸一张牌,其本回合手牌上限-1。', - caoxi: '曹羲', - olgangshu: '刚述', - olgangshu_info: '①当你使用非基本牌结算结束后,你可以令以下一项数值+1(每项至多加至5):1.攻击范围;2.受〖刚述〗影响的下个摸牌阶段摸牌数;3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。', - oljianxuan: '谏旋', - oljianxuan_info: '当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。', - ol_pengyang: 'OL彭羕', - ol_pengyang_prefix: 'OL', - olqifan: '嚣翻', - olqifan_info: '当你需要使用不为【无懈可击】的牌时,你可以观看牌堆底的X张牌并使用其中的一张。此牌结算结束时,你依次弃置以下前X个区域中的所有牌:⒈判定区、⒉装备区、⒊手牌区(X为本回合使用过的牌中包含的类型数)。', - oltuishi: '侻失', - oltuishi_info: '锁定技。①你不能使用【无懈可击】。②当你使用点数为字母的牌时,你令此牌无效并摸一张牌,且你对手牌数小于你的角色使用的下一张牌无距离和次数限制。', - ol_tw_zhangji: '张既', - skill_zhangji_A: '技能', - skill_zhangji_A_info: '出牌阶段限X次(X为你的体力值),当你使用牌指定一名其他角色为目标后,你可以观看其手牌,然后你选择一项:
    1.弃置其一张牌,然后若弃置的牌是能造成火焰伤害的牌,你摸一张牌。
    2.重铸其手牌中的所有【杀】和【决斗】。
    3.若其没有【闪】,你与其互相对对方造成1点伤害。', - skill_zhangji_B: '技能', - skill_zhangji_B_info: '当你受到1点伤害后,你可令一名手牌数小于体力上限的角色摸三张牌,然后其将手牌数弃置至其体力上限数;当你进入濒死状态时,你可令一名其他角色观看五张魏势力武将牌,其可以选择其中一张代替自己的武将牌(体力和体力上限不变)。', - ol_feiyi: '费祎', - yanru: '宴如', - yanru_info: '出牌阶段各限一次,若你的手牌数为:①奇数,你可以摸三张牌,然后弃置至少一半手牌(向下取整);②偶数,你可以弃置至少一半手牌,然后摸三张牌。', - hezhong: '和衷', - hezhong_info: '每回合每项限一次,当你的手牌数变为1后,你可以展示唯一手牌并摸一张牌,然后你选择一项:①本回合使用的下一张点数大于此牌的点数的普通锦囊牌额外结算一次;②本回合使用的下一张点数小于此牌的点数的普通锦囊牌额外结算一次。', - lvboshe: '吕伯奢', - olfushi: '缚豕', - olfushi_info: '①一名角色使用【杀】结算结束后,若你至其的距离不大于1,你将此【杀】对应的所有实体牌置于武将牌上。②当你需要使用一张【杀】时,你可以将任意张“缚豕”牌置入弃牌堆并摸等量的牌,视为使用一张【杀】并选择X项(X为你以此法重铸的牌数且至多为3):1.你为此【杀】额外指定一个目标;2.你选择此【杀】的一个目标角色,此牌对其造成的伤害-1;3.你选择此【杀】的一个目标角色,此【杀】对其造成的伤害+1。当此【杀】指定最后一个目标后,若此牌被选择的效果选项相邻且此牌的目标角色座位连续,则此【杀】不计入次数限制。', - oldongdao: '东道', - oldongdao_info: '农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。', - zhangyan: '张燕', - olsuji: '肃疾', - olsuji_info: '一名角色的出牌阶段开始时,若其已受伤,你可以将一张黑色牌当【杀】使用。若其受到此【杀】的伤害,你获得其一张牌。', - ollangdao: '狼蹈', - ollangdao_info: '当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:1.令此【杀】伤害基数+1;2.令你可以为此【杀】多选择一个目标;3.令此【杀】不可被响应。然后若没有角色因此【杀】死亡,你移除本次被选择的项。', - ol_dingshangwan: 'OL丁尚涴', - ol_dingshangwan_prefix: 'OL', - olfudao: '抚悼', - olfudao_info: '①游戏开始时,你摸三张牌,然后可以将至多三张手牌交给一名其他角色,然后可以弃置任意张手牌,最后记录你的手牌数。②一名角色的回合结束时,若其手牌数和你发动〖抚悼①〗记录的数值相同,则你可以与其各摸一张牌。', - olfengyan: '讽言', - olfengyan_info: '锁定技。当你受到其他角色造成的伤害后或响应其他角色使用的牌时,你选择一项:①摸一张牌,然后交给其一张牌。②令其摸一张牌,然后其弃置两张牌。', - ol_liwan: 'OL李婉', - ol_liwan_prefix: 'OL', - ollianju: '联句', - ollianju_info: '结束阶段,你可以令一名其他角色获得你本回合使用的最后一张牌A对应的所有位于弃牌堆的实体牌并记录A的牌名,然后其下个结束阶段可以令你获得其本回合使用的最后一张牌B对应的所有位于弃牌堆的实体牌,然后若A与B的牌名相同,则你失去1点体力;若A与B的牌名不同,则你可以视为使用A。', - olsilv: '思闾', - olsilv_info: '锁定技,每回合每项限一次,当你获得或失去你发动〖联句〗记录的最后一次牌名的同名牌后,你展示这些牌,然后摸一张牌。', - xueji_old: '血祭', - xueji_old_info: '出牌阶段限一次,你可以弃置一张红色牌并对攻击范围内的至多X名角色各造成1点伤害(X为你已损失的体力值),然后这些角色各摸一张牌。', - oldhuxiao: '虎啸', - oldhuxiao_info: '锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。', - oldwuji: '武继', - oldwuji_info: '觉醒技,结束阶段,若你本回合造成了3点或更多伤害,你加1点体力上限并回复1点体力,并失去技能〖虎啸〗。', - olfeiyang: '飞扬', + luanfeng_info:'限定技,一名角色进入濒死状态时,若其体力上限不小于你,你可令其回复至3点体力,恢复其被废除的装备栏,令其手牌补至6-X张(X为以此法恢复的装备栏数量)。若该角色是你,重置你因“游龙”使用过的牌名。', + reluanzhan:'乱战', + reluanzhan_add:'乱战', + reluanzhan_remove:'乱战', + reluanzhan_info:'当你受到或造成伤害后,你获得一个“乱”。当你使用【杀】或黑色普通锦囊牌选择目标后,你可为此牌增加至多X个目标。当你使用这些牌指定第一个目标后,若此牌目标数小于X,则你移去X/2(向上取整)个“乱”。(X为“乱”数)', + zhuixi:'追摄', + zhuixi_info:'锁定技,你使用【杀】的次数上限+1。', + reduanbing:'短兵', + reduanbing_info:'你使用【杀】选择目标后,可以为此【杀】增加一名距离为1的额外目标。你对距离为1的角色使用的【杀】需两张【闪】才能抵消。', + refenxun:'奋迅', + refenxun2:'奋迅', + refenxun_info:'出牌阶段限一次,你可以选择一名其他角色,然后本回合你计算与其的距离视为1;结束阶段开始时,若你未对其造成过伤害,你弃一张牌。', + zongyu:'宗预', + zyqiao:'气傲', + zyqiao_info:'每回合限两次。当你成为其他角色使用牌的目标后,你可以弃置其一张牌,然后你弃置一张牌。', + zyqiao_info_guozhan:'每回合限两次。当你成为其他势力的角色使用牌的目标后,你可以弃置其一张牌,然后你弃置一张牌。', + chengshang:'承赏', + chengshang_info:'当你于出牌阶段内使用的牌结算完成后,若此牌未造成过伤害且此牌的目标包含其他角色且你本阶段内未因〖承赏〗得到过牌,则你可以从牌堆中获得所有与此牌花色点数相同的牌。', + chengshang_info_guozhan:'当你于出牌阶段内使用的牌结算完成后,若此牌未造成过伤害且此牌的目标包含其他角色且你本阶段内未因〖承赏〗得到过牌,则你可以从牌堆中获得所有与此牌花色点数相同的牌。', + panshu:'OL潘淑', + panshu_prefix:'OL', + weiyi:'威仪', + weiyi_info:'每名角色限一次。当有角色受到伤害后,你可选择:①若其体力值不小于你,则其失去1点体力。②若其体力值不大于你且其已受伤,则其回复1点体力。', + jinzhi:'锦织', + jinzhi2:'锦织', + jinzhi_info:'当你需要使用或打出一张基本牌时,你可弃置X+1张颜色相同的牌并摸一张牌,然后视为你使用或打出了此牌。(X为你于本轮内发动此技能的次数)', + yanxiao_card:'言笑', + yanxiao_global:'言笑', + yanxiao_card_info:'判定阶段开始时,你获得判定区内的所有牌。', + gz_huangzu:'黄祖', + huangzu:'OL黄祖', + huangzu_prefix:'OL', + wangong:'挽弓', + wangong2:'挽弓', + wangong_info:'锁定技,当你使用基本牌时,你获得如下效果:当你使用下一张牌时,若此牌为【杀】,则此牌无次数和距离限制且伤害+1。', + huangchengyan:'OL黄承彦', + huangchengyan_prefix:'OL', + guanxu:'观虚', + guanxu_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后你可将其中一张手牌与牌堆顶五张牌中的一张交换。若如此做,你弃置其手牌中三张花色相同的牌。', + yashi:'雅士', + yashi_info:'当你受到一次伤害后,你可选择一项:1. 令伤害来源的非锁定技无效直到其下个回合开始;2. 对一名其他角色发动〖观虚〗。', + olwuniang:'武娘', + olwuniang_info:'每回合限一次,当你于回合内使用的【杀】结算完成后,若此【杀】对应的目标数为1,则你可以令目标角色选择是否对你使用使用【杀】。你于其选择结算完成后摸一张牌,且本回合内使用【杀】的次数上限+1。', + olxushen:'许身', + olxushen_info:'限定技,当你进入濒死状态时,你可将体力回复至1点并获得技能〖镇南〗。然后若场上没有存活的“关索”,则你可以令一名其他男性角色选择是否将一张武将牌替换为“关索”。', + olzhennan:'镇南', + olzhennan2:'镇南', + olzhennan_info:'【南蛮入侵】对你无效。出牌阶段限一次,你可以将任意张手牌当做【南蛮入侵】对等量的角色使用。', + gaogan:'高干', + juguan:'拒关', + juguan_backup:'拒关', + juguan_info:'出牌阶段限一次,你可将一张手牌当【杀】或【决斗】使用。若受到此牌伤害的角色未在你的下回合开始前对你造成过伤害,你的下个摸牌阶段摸牌数+2。', + duxi:'杜袭', + quxi:'驱徙', + quxi_info:'限定技。出牌阶段结束时,你可跳过下个弃牌阶段并选择两名手牌数不同的其他角色。你将武将牌翻至背面,令这两名角色中手牌数较少的角色获得另一名角色的一张牌并获得一枚“丰”,另一名角色获得一枚“歉”。拥有“丰”/“歉”的角色的摸牌阶段额定摸牌数+1/-1。拥有“丰”/“歉”的角色死亡时,或一轮游戏开始时,你可转移“丰”/“歉”。', + bixiong:'避凶', + bixiong2:'避凶', + bixiong_info:'锁定技,当你于弃牌阶段弃置手牌后,其他角色不能使用与这些牌花色相同的牌指定你为目标直到你的下回合开始。', + fuwei:'扶危', + fuwei_info:'每回合限一次。当你的牌被其他角色弃置或获得后,你可从牌堆中获得一张与此牌名称相同的牌(若没有则改为摸一张牌)。', + yuejian:'约俭', + yuejian_info:'每回合限两次。当其他角色对你使用的牌A结算结束后,你可展示所有手牌。若牌A有花色且你的手牌中没有同花色的牌,则你获得牌A对应的所有实体牌。', + ol_dengzhi:'OL邓芝', + ol_dengzhi_prefix:'OL', + olxiuhao:'修好', + olxiuhao_info:'每回合限一次。当你受到其他角色造成的伤害时,或其他角色受到你造成的伤害时,你可防止此伤害,然后令伤害来源摸两张牌。', + olsujian:'素俭', + olsujian_given:'已分配', + olsujian_info:'锁定技。弃牌阶段开始前,你将此阶段的规则改为:{你选择一项:①将所有不为本回合得到的手牌分配给其他角色。②弃置这些手牌,然后弃置一名其他角色等量的牌}。', + ol_wangrong:'OL王荣', + ol_wangrong_prefix:'OL', + olfengzi:'丰姿', + olfengzi_info:'出牌阶段限一次。当你使用有目标的基本牌或普通锦囊牌时,你可弃置一张与此牌类型相同的牌,然后令此牌结算两次。', + oljizhan:'吉占', + oljizhan_info:'摸牌阶段开始时,你可以放弃摸牌。你展示牌堆顶的一张牌,并猜测牌堆顶的下一张牌点数大于或小于此牌。若你猜对,你可继续重复此流程。然后你获得以此法展示的所有牌。', + olfusong:'赋颂', + olfusong_info:'当你死亡时,你可以选择一名体力上限大于你的其他角色。其选择获得〖吉占〗或〖丰姿〗。', + zuofen:'左棻', + zhaosong:'诏颂', + zhaosong_info:'一名其他角色的摸牌阶段结束时,若其没有因〖诏颂〗而获得的标记,则你可令其正面向上交给你一张手牌。根据此牌的类型,该角色获得对应的标记和效果:
    锦囊牌:“诔”标记。当拥有者进入濒死状态时,其可弃置所有“诔”,将体力回复至1点并摸一张牌。
    装备牌:“赋”标记。拥有者的出牌阶段开始时,其可弃置所有“赋”,弃置一名角色区域内的至多两张牌。
    基本牌:“颂”标记。当使用者使用仅指定一个目标的【杀】时,其可弃置“颂”,为此【杀】增加至多两个目标。', + lisi:'离思', + lisi_info:'当你于回合外使用的牌结算结束后,你可将其交给一名手牌数不大于你的其他角色。', + ol_yangyi:'杨仪', + oljuanxia:'狷狭', + oljuanxia_info:'结束阶段,你可以选择一名其他角色。你依次视为对其使用至多三种单目标普通锦囊牌。然后其下回合结束时,可视为对你使用等量的【杀】。', + oldingcuo:'定措', + oldingcuo_info:'每回合限一次。当你受到或造成伤害后,你可摸两张牌。若这两张牌颜色不同,则你弃置一张手牌。', + fengfangnv:'OL冯妤', + fengfangnv_prefix:'OL', + zhuangshu:'妆梳', + zhuangshu_info:'①游戏开始时,你可将{【琼梳】,【犀梳】,【金梳】}中的一张牌置于装备区。②一名角色的回合开始时,若其宝物区为空,则你可以弃置一张牌,并根据此牌的类型,按如下关系将一张宝物牌置入该角色的装备区:{<基本牌,【琼梳】>,<锦囊牌,【犀梳】>,<装备牌,【金梳】>}。', + chuiti:'垂涕', + chuiti_info:'每回合限一次。当你或拥有〖妆梳〗牌角色的牌因弃置而进入弃牌堆后,你可使用其中的一张牌。', + zhuangshu_basic:'琼梳', + zhuangshu_basic_bg:'琼', + zhuangshu_basic_info:'当你受到伤害时,你可以弃置X张牌并防止此伤害(X为伤害值)。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', + zhuangshu_trick:'犀梳', + zhuangshu_trick_bg:'犀', + zhuangshu_trick_info:'判定阶段开始前,你可选择:①跳过此阶段。②跳过本回合的弃牌阶段。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', + zhuangshu_equip:'金梳', + zhuangshu_equip_bg:'金', + zhuangshu_equip_info:'锁定技。出牌阶段结束时,你将手牌摸至手牌上限(至多摸五张)。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。', + ol_dongzhao:'OL董昭', + ol_dongzhao_prefix:'OL', + olxianlve:'先略', + olxianlve_info:'①主公的回合开始时,你可声明并记录一个锦囊牌的名称并移除先前的记录。②每回合限一次,其他角色使用〖先略〗记录过的锦囊牌后,你可摸两张牌并可以分配给任意其他角色,然后你可声明并记录一个锦囊牌的名称并移除先前的记录。', + olzaowang:'造王', + olzaowang2:'造王', + olzaowang_info:'限定技。出牌阶段,你可以令一名角色加1点体力上限,回复1点体力并摸三张牌,且获得如下效果:主公死亡时,若其身份为忠臣,则其和主公交换身份牌;其死亡时,若其身份为反贼且伤害来源的身份为主公或忠臣,则以主忠胜利结束本局游戏。', + sp_ol_zhanghe:'SP张郃', + sp_ol_zhanghe_prefix:'SP', + spolzhouxuan:'周旋', + spolzhouxuan_info:'①弃牌阶段开始时,你可将任意张置于武将牌上,称为“旋”(你至多拥有五张“旋”)。②当你使用牌时,你随机将一张“旋”置入弃牌堆,然后摸一张牌(若你的手牌数不为全场唯一最多则额外摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。', + wuyan:'吾彦', + lanjiang:'澜疆', + lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以令其中一名手牌数小于你的角色摸一张牌。', + ol_zhuling:'OL朱灵', + ol_zhuling_prefix:'OL', + jixian:'急陷', + jixian_info:'摸牌阶段结束时,你可以选择一名满足以下至少一项条件的角色:⒈装备区内有防具牌;⒉拥有的普通技能数大于你;⒊体力值等于体力上限。你视为对其使用一张【杀】,然后摸X张牌(X为其于此【杀】结算前满足的条件数);若此【杀】未造成伤害,则你失去1点体力。', + ol_chendeng:'OL陈登', + ol_chendeng_prefix:'OL', + olfengji:'丰积', + olfengji_info:'摸牌阶段开始时,你选择:⒈本回合摸牌阶段的额定摸牌数-1,且令一名其他角色下回合摸牌阶段的额定摸牌数+2;⒉本回合摸牌阶段的额定摸牌数+1。然后你选择:⒈本回合使用【杀】的次数上限-1,且令一名其他角色下回合使用【杀】的次数上限+2;⒉本回合使用【杀】的次数上限+1。', + tianyu:'田豫', + saodi:'扫狄', + saodi_info:'当你使用【杀】或普通锦囊牌指定唯一其他角色为目标时,你可从逆时针方向和顺时针方向中选择一个你与其之间角色最少的方向。你令该方向下你与其之间的所有能成为此牌额外目标的角色均成为此牌的目标。', + zhuitao:'追讨', + zhuitao_info:'①准备阶段,你可选择一名未被〖追讨〗记录过的其他角色。②你至所有〖追讨〗记录过的角色的距离-1。③当你对一名被〖追讨〗记录过的角色造成伤害时,你从〖追讨〗记录里移除该角色。', + fanjiangzhangda_ab:'范疆张达', + fanjiangzhangda:'范强张达', + yuanchou:'怨仇', + yuanchou_info:'锁定技。当你使用黑色【杀】指定目标角色后或成为黑色【杀】的目标角色后,你令目标角色的防具技能无效直到此【杀】被抵消或造成伤害。', + juesheng:'决生', + juesheng_info:'限定技。出牌阶段,你可视为使用一张【决斗】。当你因此【决斗】造成伤害时,你将伤害值改为X(X为目标角色本局游戏内使用过【杀】的数量且至少为1)且令目标角色获得此技能直到其下回合结束。', + qinghegongzhu:'清河公主', + zengou:'谮构', + zengou_info:'当有角色使用【闪】时,若其在你的攻击范围内,则你可以弃置一张非基本牌或失去1点体力,然后取消此【闪】的目标并获得其对应的实体牌。', + qhzhangji:'长姬', + qhzhangji_info:'一名角色的回合结束时,若你本回合内:造成过伤害,则你可以令其摸两张牌;受到过伤害,则你可以令其弃置两张牌。', + sp_menghuo:'SP孟获', + sp_menghuo_prefix:'SP', + spmanwang:'蛮王', + spmanwang_info:'出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前等量项:⒈获得〖叛侵〗。⒉摸一张牌。⒊回复1点体力。⒋摸两张牌并失去〖叛侵〗。', + sppanqin:'叛侵', + sppanqin_info:'出牌阶段或弃牌阶段结束时,你可将你于本阶段内弃置且位于弃牌堆的所有牌当做【南蛮入侵】使用。然后若此牌被使用时对应的实体牌数不大于此牌的目标数,则你执行并移除〖蛮王〗中的最后一个选项。', + tengfanglan:'OL滕芳兰', + tengfanglan_prefix:'OL', + luochong:'落宠', + luochong_info:'准备阶段开始时/当你于一回合内首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):⒈令一名角色回复1点体力。⒉令一名角色失去1点体力。⒊令一名角色弃置两张牌。⒋令一名角色摸两张牌。', + aichen:'哀尘', + aichen_info:'锁定技。当你进入濒死状态时,若〖落宠〗中的剩余选项数大于1,则你选择移去〖落宠〗中的一个选项。', + weizi:'卫兹', + yuanzi:'援资', + yuanzi_info:'每轮限一次。其他角色的准备阶段开始时,你可将所有手牌交给该角色。若如此做,当该角色于本回合内造成伤害后,若其手牌数不小于你,则你摸两张牌。', + liejie:'烈节', + liejie_info:'当你受到伤害后,你可以弃置至多三张牌,摸等量的牌,然后可弃置伤害来源的至多X张牌(X为你以此法弃置的红色牌的数量)。', + ruiji:'OL芮姬', + ruiji_prefix:'OL', + qiaoli:'巧力', + qiaoli_info:'出牌阶段各限一次,你可以将一张武器牌/非武器装备牌当作【决斗】使用。若此【决斗】对应的实体牌为武器牌,当你以此【决斗】对目标角色造成伤害后,你摸X张牌(X为此牌的攻击范围),且可以将其中任意张牌分配给其他角色;若此【决斗】对应的实体牌不为武器牌,此牌不可被响应,且你于结束阶段从牌堆中获得一张装备牌。', + qiaoli_given:'已分配', + qingliang:'清靓', + qingliang_info:'每回合限一次,当你成为其他角色使用【杀】或伤害类锦囊牌的唯一目标时,你可展示所有手牌,然后选择一项:⒈你与其各摸一张牌,⒉取消此目标,然后弃置你手牌中一种花色的所有牌。', + chixueqingfeng:'赤血青锋', + chixueqingfeng2:'赤血青锋', + chixueqingfeng_info:'锁定技,当你使用【杀】指定目标后,你令目标角色不能使用或打出手牌且防具技能无效直到此【杀】结算结束。', + wushuangfangtianji:'无双方天戟', + wushuangfangtianji_skill:"无双方天戟", + wushuangfangtianji_info:"当你因执行【杀】的效果而造成伤害后,你可选择一项:⒈摸一张牌;⒉弃置目标角色的一张牌。", + guilongzhanyuedao:'鬼龙斩月刀', + guilongzhanyuedao_info:'锁定技,你使用的红色【杀】不可被响应。', + bintieshuangji:'镔铁双戟', + bintieshuangji_skill:'镔铁双戟', + bintieshuangji_info:'当你使用的【杀】被抵消后,你可失去1点体力。获得此【杀】对应的所有实体牌,摸一张牌,且本回合使用【杀】的次数上限+1。', + linglongshimandai:"玲珑狮蛮带", + linglongshimandai_info:"当你成为其他角色使用的牌的唯一目标后,你可以进行判定。若判定结果为♥,则此牌对你无效。", + linglongshimandai_skill:"玲珑狮蛮带", + hongmianbaihuapao_skill:"红棉百花袍", + hongmianbaihuapao:"红棉百花袍", + hongmianbaihuapao_info:"锁定技,当你受到属性伤害时,防止此伤害。", + qimenbagua:'奇门八卦', + qimenbagua_info:'锁定技,【杀】对你无效。', + guofengyupao:'国风玉袍', + guofengyupao_info:'锁定技,你不是其他角色使用普通锦囊牌的合法目标。', + shufazijinguan:'束发紫金冠', + shufazijinguan_skill:"束发紫金冠", + shufazijinguan_info:"准备阶段,你可以对一名其他角色造成1点伤害。", + sanlve:'三略', + sanlve_skill:'三略', + sanlve_info:'锁定技。你的攻击范围+1。你的手牌上限+1。你使用【杀】的次数上限+1。', + zhaogujing:'照骨镜', + zhaogujing_skill:'照骨镜', + zhaogujing_info:'出牌阶段结束时,你可展示手牌中的一张基本牌或普通锦囊牌,然后你视为使用一张牌名和属性与此牌相同的牌。', + xuwangzhimian:'虚妄之冕', + xuwangzhimian_info:'锁定技,摸牌阶段,你令额定摸牌数+2;你的手牌上限-1。', + ol_puyuan:'OL蒲元', + ol_puyuan_prefix:'OL', + olshengong:'神工', + olshengong_info:'出牌阶段每项限一次。你可以弃置一张武器牌/防具牌/其他装备牌,并发起一次“锻造”。然后你从锻造结果中选择一张牌,置于一名角色的装备区内(可替换原装备)。当有因你发动〖神工〗而加入游戏的牌进入弃牌堆后,你将此牌移出游戏,然后你于当前回合结束后摸一张牌。', + olqisi:'奇思', + olqisi_info:'①游戏开始时,你获得两张副类别不同的牌,并将这些牌置入你的装备区。②摸牌阶段开始时,你可以少摸一张牌并声明一种装备牌的副类别,然后从牌堆或弃牌堆中获得一张该副类别的牌。', + olzhuiji:'追击', + olzhuiji_info:'锁定技。①你至体力值不大于你的角色的距离为1。②当你使用【杀】指定距离为1的角色为目标后,你令其选择一项:⒈弃置一张牌。⒉重铸装备区内的所有牌。', + zhaoyǎn:'OL赵俨', + zhaoyǎn_prefix:'OL', + tongxie:'同协', + tongxie_info:'出牌阶段开始时,你可以选择包括你在内的至多三名角色(你与这些角色均称为“同协角色”)。这些角色中手牌数唯一最少的角色摸一张牌,且你获得如下效果直到你下回合开始:①当有“同协角色”对唯一目标角色使用的【杀】结算结束后,其他“同协角色”可以依次对目标角色使用一张【杀】(无距离和次数限制,且不能再触发此效果)。②当有“同协角色”受到伤害时,其他“同协角色”(本回合内失去过体力的角色除外)可以防止此伤害,失去1点体力。', + jin_zhouchu:'周处', + shanduan:'善断', + shanduan_info:'锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=[1,2,3,4]中分配数值。②当你于回合外受到伤害后,你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。', + yilie:'义烈', + yilie_info:'每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。', + caoxiancaohua:'曹宪曹华', + huamu:'化木', + huamu_info:'当你使用手牌后,若此牌和本回合内上一张被使用的牌颜色不同,则你可以将此牌对应的所有{位于处理区或装备区}的实体牌置于你的武将牌上。这些牌中的黑色牌称为“灵杉”,红色牌称为“玉树”。', + qianmeng:'前盟', + qianmeng_info:'锁定技。当有牌移动事件结算结束后,若有角色的“灵杉”和“玉树”数量发生了变化,且二者数量相等或有一项为0,则你摸一张牌。', + liangyuan:'良缘', + liangyuan_info:'每轮每项各限一次。你可以将场上所有的“灵杉”/“玉树”置于处理区,然后将这些牌当做【酒】/【桃】使用。', + jisi:'羁肆', + jisi_info:'限定技。准备阶段,你可以令一名其他角色获得你武将牌上的一个已发动过的其他技能。然后你弃置所有手牌,并视为对其使用一张【杀】(无距离关系的限制)。', + huojun:'OL霍峻', + huojun_prefix:'OL', + qiongshou:'穷守', + qiongshou_info:'锁定技。①游戏开始时,你废除所有装备栏并摸四张牌。②你的手牌上限+4。', + fenrui:'奋锐', + fenrui_info:'结束阶段,你可以弃置一张牌并恢复一个装备栏。系统检索一张对应的装备牌,你使用之。然后你可以选择一名装备区内牌数小于你的其他角色,对其造成X点伤害(X为你与其装备区内的牌数之差,且每局限一次)。', + wangyan:'王衍', + yangkuang:'阳狂', + yangkuang_info:'当你回复体力后,若你的体力值等于体力上限,则你可以视为使用一张【酒】,然后当前回合角色摸一张牌,你摸一张牌。', + cihuang:'雌黄', + cihuang_info:'当有牌被抵消后,若此牌的目标数为1且此牌的使用者A为当前回合角色,则你可以将一张牌当做一张你本轮内未使用过的属性【杀】或单目标锦囊牌对A使用(不可被响应)。', + sanku:'三窟', + sanku_info:'锁定技。①当你进入濒死状态时,你减1点体力上限,然后将体力回复至体力上限。②当你加体力上限前,取消之。', + dengzhong:'邓忠', + dzkanpo:'勘破', + dzkanpo_info:'①当你因执行【杀】的效果而造成伤害后,你可以观看目标角色的手牌,然后获得其中一张与此【杀】花色相同的牌。②每回合限一次,你可以将一张手牌当做【杀】使用。', + dzgengzhan:'更战', + dzgengzhan_info:'①其他角色的出牌阶段限一次,当有【杀】因弃置而进入弃牌堆后,你可以获得这些【杀】。②其他角色的结束阶段,若其本回合内未使用过【杀】,则你下个出牌阶段使用【杀】的次数上限+1。', + xiahouxuan:'夏侯玄', + olhuanfu:'宦浮', + olhuanfu_info:'当你使用【杀】指定第一个目标后,或成为【杀】的目标后,你可以弃置X张牌(X∈[1, 你的体力上限])。此【杀】结算结束后,若此【杀】累计因执行效果而造成的伤害值等于X,则你摸2X张牌。', + olqingyi:'清议', + olqingyi_info:'①出牌阶段限一次,你可以选择至多两名有牌的其他角色。你和这些角色同时弃置一张牌,然后若这些牌类型均相同,则你重复此流程。②结束阶段开始时,若你本回合内发动〖清议①〗弃置的牌包含两种颜色,则你获得每种颜色的牌各一张。', + olzeyue:'迮阅', + olzeyue_info:'限定技。准备阶段,你可以选择一名于你的上个回合结束后对你造成过伤害的角色A及其武将牌上的一个非锁定技B,令A的B失效。然后每轮游戏开始时,A依次视为对你使用X张【杀】(X为B失效状态下经过的完整轮数)。当你因这些【杀】受到伤害后,你令A恢复技能B。', + xindiaodu:"调度", + xindiaodu_info:"①每回合限一次,与你势力相同的角色使用装备牌时,其可以摸一张牌。②出牌阶段开始时,你可以获得与你势力相同的一名角色装备区内的一张牌,然后你可以将此牌交给另一名与你势力相同的其他角色。", + olhuanshi:'缓释', + olhuanshi_info:'一名角色的判定牌生效前,你可以令其观看你的手牌并选择你的一张牌,你打出此牌代替判定牌。然后你可以重铸任意张牌(每回合限重铸一次)。', + olhongyuan:'弘援', + olhongyuan_info:'每阶段限一次。当你一次性获得至少两张牌以后,你可以将至多两张牌交给等量名角色。', + olmingzhe:'明哲', + olmingzhe_info:'锁定技。当你于出牌阶段外失去红色牌后,你展示这些牌中所有背面朝上移动的牌(没有则不展示),然后摸一张牌。', + ahuinan:'阿会喃', + jueman:'蟨蛮', + jueman_info:'锁定技。一名角色的回合结束时,若本回合被使用过的基本牌数不小于2,且前两张基本牌的使用者:均不为你,你视为使用本回合被使用的第三张基本牌;有且仅有其中之一为你,你摸一张牌。', + ol_liuba:'OL刘巴', + ol_liuba_prefix:'OL', + oltongduo:'统度', + oltongduo_info:'准备阶段,你可以令一名角色交给你一张手牌,然后出牌阶段结束时,你将此牌置于牌堆顶。', + olzhubi:'铸币', + olzhubi_tag:'币', + olzhubi_info:'①出牌阶段限X次(X为你的体力上限)。你可以令一名角色重铸一张牌,以此法获得的牌称为“币”。②一名角色的结束阶段,若其有“币”,其观看牌堆底的五张牌,然后可以用任意“币”交换其中等量张牌。', + ol_furong:'傅肜', + olxiaosi:'效死', + olxiaosi_info:'出牌阶段限一次。你可以选择一名有手牌的其他角色并弃置一张基本牌。若其有可被弃置的基本牌,其弃置一张基本牌。然后你可以以任意顺序使用你与其以此法弃置的牌(无距离和次数限制)。最后若其未以此法弃置牌,你摸一张牌。', + zhangzhi:'张芝', + olbixin:'笔心', + olbixin_info:'一名角色的准备阶段或结束阶段,你可以声明一种牌的类型(每种类型限[1]次),并选择一种你本轮未使用过且有合法目标的的基本牌。你摸[3]张牌,然后若你有此类型的手牌,你将所有此类型的手牌当此基本牌使用。', + olximo:'洗墨', + olximo_info:'锁定技。当你发动〖笔心〗后,你移除其描述的前五个字符。若你已发动三次〖笔心〗,交换中括号中的两个数字,失去〖洗墨〗并获得〖飞白〗。', + olfeibai:'飞白', + olfeibai_info:'转换技,锁定技。阴:当你因执行你使用的非黑色牌的效果而造成伤害时,此伤害值+1;阳:当你因执行你使用的非红色牌的效果而回复体力时,此回复值+1。', + olqizhou:'绮冑', + olqizhou_info:'锁定技。每个回合开始前,或当你装备区内的牌发生变化后,你失去所有因此技能获得过的额外技能,然后根据你装备区内的花色数获得对应的技能。至少一种:〖短兵〗、至少两种:〖英姿〗、至少三种:〖奋威〗、至少四种:〖澜江〗。', + olshanxi:'闪袭', + olshanxi_info:'出牌阶段限一次。你可以选择一名攻击范围内不包含你的其他角色,展示你与其的至多X张手牌(X为你的空装备栏数)。若这些牌中有【闪】,则你弃置这些【闪】,然后获得对方的一张未展示的牌。', + macheng:'马承', + olchenglie:'骋烈', + olchenglie_info:'当你使用【杀】选择目标后,你可以令至多两名角色也成为此牌目标,并展示牌堆顶的等同于目标数张牌,然后你可以将一张手牌与其中一张牌交换,将这些牌扣置于每名目标角色武将牌上,称为“骋烈”牌。此牌结算结束后:1.若有红色“骋烈”牌的角色:响应过此【杀】,其交给你一张牌;未响应此【杀】,其回复1点体力;2.有“骋烈”牌的角色将其“骋烈”牌置入弃牌堆。', + quhuang:'屈晃', + olqiejian:'切谏', + olqiejian_info:'当一名角色失去最后的手牌后,你可以摸一张牌,然后令其摸一张牌,你选择一项:1.弃置你或其场上的一张牌;2.你于本轮不能再对其发动此技能。', + olnishou:'泥首', + olnishou_info:'锁定技。当你装备区里的牌进入弃牌堆后,你选择一项:1.将这些牌中第一张能当【闪电】对你使用的牌当【闪电】使用;2.本阶段结束时,你与一名手牌数最少的角色交换手牌。', + zhanghua:'张华', + olbihun:'弼昏', + olbihun_info:'锁定技。当你使用牌指定其他角色为目标时,若你的手牌数大于手牌上限且若此牌的目标数:大于1,取消此目标;为1,其获得此牌。', + olchuanwu:'穿屋', + olchuanwu_info:'锁定技。当你造成或受到伤害后,你令武将牌上的前X个未失效的技能失效直到回合结束。然后你摸等同于你此次失效的技能数张牌(X为你的攻击范围)。', + oljianhe:'剑合', + oljianhe_info:'出牌阶段每名角色限一次。你可以重铸至少两张同名牌或至少两张装备牌,然后令一名角色选择一项:1.重铸等量张与你以此法重铸的牌类型相同的牌;2.受到你造成的1点雷电伤害。', + dongtuna:'董荼那', + oljianman:'鹣蛮', + oljianman_info:'锁定技。一名角色的回合结束时,若本回合被使用过的基本牌数不小于2,且前两张基本牌的使用者:均为你,你视为使用其中的一张牌;有且仅有其中之一为你,你弃置另一名使用者一张牌。', + maxiumatie:'马休马铁', + olkenshang:'垦伤', + olkenshang_info:'你可以将任意张牌当【杀】使用,然后你可以将此牌目标改为所有你攻击范围外的角色。此牌结算结束后,若此牌对应的实体牌数大于X,你摸X张牌(X为此牌造成过的伤害值),否则你失去一个技能。', + rekenshang:'垦伤', + rekenshang_info:'你可以将至少两张牌当【杀】使用,然后你可以将此牌目标改为等量名角色。此牌结算结束后,若此牌对应的实体牌数大于此牌造成过的伤害值,你摸一张牌。', + ol_zhujun:'OL朱儁', + ol_zhujun_prefix:'OL', + olcuipo:'摧破', + olcuipo_info:'锁定技。当你使用牌时,若此牌是你本回合使用的第X张牌(X为此牌牌名的字数),则:{若此牌为【杀】或伤害类锦囊牌,则此牌的伤害值基数+1,否则你摸一张牌}。', + ol_zhangyì:'OL张翼', + ol_zhangyì_prefix:'OL', + oldianjun:'殿军', + oldianjun_info:'锁定技。回合结束时,你受到1点无来源伤害,然后执行一个额外的出牌阶段。', + olkangrui:'亢锐', + olkangrui_info:'当一名角色于其回合内首次受到伤害后,你可以摸一张牌并选择一项:1.令其回复1点体力;2.令其于本回合下次造成的伤害+1。然后当其于本回合造成伤害时,其本回合手牌上限基数为0。', + wangguan:'王瓘', + olmiuyan:'谬焰', + olmiuyan_tag:'invisible', + olmiuyan_info:'转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的手牌;处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。', + olshilu:'失路', + olshilu_info:'锁定技。当你受到伤害后,你摸X张牌(X为你的体力值且至多为5)。然后你展示攻击范围内一名角色的一张手牌,令此牌的牌名视为【杀】。', + ol_huban:'OL胡班', + ol_huban_prefix:'OL', + olhuiyun:'晖云', + olhuiyun_tag:'invisible', + olhuiyun_info:'每轮每项各限一次。你可以将一张牌当【火攻】使用。此牌结算结束后,你选择一项,令目标角色选择是否执行:1.使用展示的牌,然后重铸所有手牌;2.使用一张手牌,然后重铸展示牌;3.摸一张牌。', + sunhong:'孙弘', + olxianbi:'险诐', + olxianbi_info:'出牌阶段限一次。你可以选择一名角色,然后将手牌摸至或弃置至等同于其装备区里的牌数(至多摸五张),且当你因此弃置一张牌后,你随机获得弃牌堆中的另一张类型相同的牌。', + olzenrun:'谮润', + olzenrun_info:'每阶段限一次。当你摸牌时,你可以改为获得一名其他角色等量的牌,然后其选择一项:1.摸等量的牌;2.令你本局游戏不能再对其发动〖险诐〗和〖谮润〗。', + luoxian:'罗宪', + oldaili:'带砺', + oldaili_tag:'带砺', + oldaili_info:'一名角色的回合结束时,若你被展示过的手牌数为偶数,则你可以翻面,摸三张牌并展示之。', + zhangshiping:'张世平', + olhongji:'鸿济', + olhongji_info:'每轮每项各限一次。一名角色的准备阶段,若其手牌数最少/最多,你可以令其于本回合第一个摸牌阶段/出牌阶段后执行一个额外的摸牌阶段/出牌阶段(若其条件同时满足则只能选择一项)。', + olxinggu:'行贾', + olxinggu_info:'①游戏开始时,你将牌堆中的三张坐骑牌扣置于武将牌上。②结束阶段,你可以将一张〖行贾①〗牌置于一名其他角色的装备区,然后你从牌堆获得一张♦牌。', + lushi:'卢氏', + olzhuyan:'驻颜', + olzhuyan_info:'每名角色每项各限一次。结束阶段,你可以令一名角色将以下一项调整至与其上一个准备阶段结束后相同:1.体力值;2.手牌数(体力值至多失去至1,手牌数至多摸至5;若其未执行过准备阶段则改为游戏开始时)。', + olleijie:'雷劫', + olleijie_info:'准备阶段,你可以令一名角色判定,若结果为♠2~9,其受到2点雷电伤害,否则其摸两张牌。', + ol_liuyan:'OL刘焉', + ol_liuyan_prefix:'OL', + olpianan:'偏安', + olpianan_info:'锁定技。游戏开始或弃牌阶段结束时,你弃置所有不为【闪】的手牌(没有则不弃)。若你的手牌数小于体力值,你获得牌堆或弃牌堆中的前X张【闪】(X为你的体力值与手牌数的差)。', + olyinji:'殷积', + olyinji_info:'锁定技。结束阶段,若你的体力值不为唯一最大,你选择回复1点体力或加1点体力上限。', + olkuisi:'窥伺', + olkuisi_info:'锁定技。摸牌阶段开始时,你跳过此阶段,然后观看牌堆顶的四张牌并可以使用其中任意张。若你以此法使用的牌数不为2或3,你减1点体力上限。', + ol_wanglang:'OL王朗', + ol_wanglang_prefix:'OL', + oljici:'激词', + oljici_info:'当你的拼点牌亮出后,若点数不大于X,你可令点数+X并令〖鼓舌〗视为未发动过(X为你的“饶舌”标记数)。', + ol_mengda:'OL孟达', + ol_mengda_prefix:'OL', + olgoude:'苟得', + olgoude_info:'一名角色的回合结束时,若有与你势力相同的角色执行过以下项,则你可以执行这些角色未执行过的一项:1.摸一张牌;2.弃置一名角色的一张手牌;3.使用一张无对应实体牌的【杀】;4.变更势力。', + haopu:'郝普', + olzhenying:'镇荧', + olzhenying_info:'出牌阶段限两次。你可以选择一名手牌数不大于你的其他角色,你与其同时将手牌摸或弃置至至多两张。然后你与其中手牌数较少的角色视为对另一名角色使用一张【决斗】。', + ol_wenqin:'文钦', + olguangao:'犷骜', + olguangao_info:'当你/其他角色使用【杀】时,你/该角色可以额外指定一个目标/你为目标(有距离限制)。然后若你的手牌数为偶数,你摸一张牌并令此牌对任意目标无效(可不选)。', + olhuiqi:'彗企', + olhuiqi_info:'觉醒技。一名角色回合结束后,若你与其他两名角色于此回合成为过牌的目标,你获得〖偕举〗并获得一个额外的回合。', + olxieju:'偕举', + olxieju_info:'出牌阶段限一次。你可以令任意名本回合成为过牌的目标的角色依次视为使用一张【杀】。', + ol_zhouqun:'周群', + oltianhou:'天候', + oltianhou_info:'锁定技。准备阶段,你观看牌堆顶的一张牌,且可以用你的一张牌交换此牌。然后你展示牌堆顶的牌,令一名角色根据此牌的花色获得对应的技能直到你下个准备阶段开始:♠〖骤雨〗;♥〖烈暑〗;♣〖严霜〗;♦〖凝雾〗。', + olchenshuo:'谶说', + olchenshuo_info:'结束阶段,你可以展示一张手牌,然后展示牌堆顶的一张牌。若这两张牌类型/花色/点数/牌名字数中任一项相同且已展示的牌数小于3,则你重复此流程,然后获得所有所有展示牌。', + oltianhou_spade:'骤雨', + oltianhou_spade_miehuo:'骤雨', + oltianhou_spade_info:'锁定技。其他角色造成火属性伤害时,取消之;一名角色受到雷属性伤害后,所有与其座次相邻的角色失去1点体力。', + oltianhou_heart:'烈暑', + oltianhou_heart_info:'锁定技。其他角色的结束阶段开始时,若其体力值为全场最大,则其失去1点体力。', + oltianhou_club:'严霜', + oltianhou_club_info:'锁定技。其他角色的结束阶段开始时,若其体力值为全场最小,则其失去1点体力。', + oltianhou_diamond:'凝雾', + oltianhou_diamond_info:'锁定技。其他角色使用【杀】指定与其座次不相邻唯一目标时,则其判定。若判定结果的点数大于此【杀】,则此【杀】对其无效。', + duanjiong:'段颎', + olsaogu:'扫谷', + olsaogu_info:'转换技。①出牌阶段,你可以。阴:弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。', + olcuorui:'挫锐', + olcuorui_info:'锁定技。①游戏开始时,你将手牌摸至场上存活人数张(至多摸至8张)。②当你成为延时锦囊牌的目标后,你跳过下个判定阶段。', + olmouzhu:'谋诛', + olmouzhu_info:'出牌阶段限一次,你可以令一名有手牌的其他角色交给你一张手牌。然后若其手牌数小于你,其视为使用一张【杀】或【决斗】。', + olyanhuo:'延祸', + olyanhuo_info:'当你死亡时,你可以弃置杀死你的角色至多X张牌(X为你的牌数)。', + olniluan:'逆乱', + olniluan_info:'体力值大于你的其他角色的结束阶段,若其本回合内使用过【杀】,则你可以将一张黑色牌当作【杀】对其使用(无距离限制)。', + olxiaoxi:'骁袭', + olxiaoxi_info:'一轮游戏开始时,你可以视为使用一张无距离限制的【杀】。', + ol_qianzhao:'牵招', + olweifu:'威抚', + olweifu_info:'出牌阶段,你可以弃置一张牌并判定。你本回合下次使用与结果类型相同的牌无距离限制,且可以额外指定一个目标。若你弃置的牌与判定牌类型相同,你摸一张牌。', + olkuansai:'款塞', + olkuansai_info:'每回合限一次,当一张牌指定第一个目标后,若目标数不小于你的体力值,你可以令其中一个目标选择一项:1.交给你一张牌;2.令你回复1点体力。', + ol_luyusheng:'OL陆郁生', + ol_luyusheng_prefix:'OL', + olcangxin:'藏心', + olcangxin_info:'锁定技。①当你受到伤害时,你观看牌堆底的三张牌并弃置其中任意张牌,若你以此法弃置了红桃牌,则防止此伤害。②摸牌阶段开始时,你展示牌堆底的三张牌,然后摸X张牌(X为其中红桃牌的数量)。', + olrunwei:'润微', + olrunwei_info:'其他角色的弃牌阶段开始时,若其已受伤,则你可以选择一项:①令其弃置一张牌,其本回合手牌上限+1;②令其摸一张牌,其本回合手牌上限-1。', + caoxi:'曹羲', + olgangshu:'刚述', + olgangshu_info:'①当你使用非基本牌结算结束后,你可以令以下一项数值+1(每项至多加至5):1.攻击范围;2.受〖刚述〗影响的下个摸牌阶段摸牌数;3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。', + oljianxuan:'谏旋', + oljianxuan_info:'当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。', + ol_pengyang:'OL彭羕', + ol_pengyang_prefix:'OL', + olqifan:'嚣翻', + olqifan_info:'当你需要使用不为【无懈可击】的牌时,你可以观看牌堆底的X张牌并使用其中的一张。此牌结算结束时,你依次弃置以下前X个区域中的所有牌:⒈判定区、⒉装备区、⒊手牌区(X为本回合使用过的牌中包含的类型数)。', + oltuishi:'侻失', + oltuishi_info:'锁定技。①你不能使用【无懈可击】。②当你使用点数为字母的牌时,你令此牌无效并摸一张牌,且你对手牌数小于你的角色使用的下一张牌无距离和次数限制。', + ol_tw_zhangji:'张既', + skill_zhangji_A:'技能', + skill_zhangji_A_info:'出牌阶段限X次(X为你的体力值),当你使用牌指定一名其他角色为目标后,你可以观看其手牌,然后你选择一项:
    1.弃置其一张牌,然后若弃置的牌是能造成火焰伤害的牌,你摸一张牌。
    2.重铸其手牌中的所有【杀】和【决斗】。
    3.若其没有【闪】,你与其互相对对方造成1点伤害。', + skill_zhangji_B:'技能', + skill_zhangji_B_info:'当你受到1点伤害后,你可令一名手牌数小于体力上限的角色摸三张牌,然后其将手牌数弃置至其体力上限数;当你进入濒死状态时,你可令一名其他角色观看五张魏势力武将牌,其可以选择其中一张代替自己的武将牌(体力和体力上限不变)。', + ol_feiyi:'费祎', + yanru:'宴如', + yanru_info:'出牌阶段各限一次,若你的手牌数为:①奇数,你可以摸三张牌,然后弃置至少一半手牌(向下取整);②偶数,你可以弃置至少一半手牌,然后摸三张牌。', + hezhong:'和衷', + hezhong_info:'每回合每项限一次,当你的手牌数变为1后,你可以展示唯一手牌并摸一张牌,然后你选择一项:①本回合使用的下一张点数大于此牌的点数的普通锦囊牌额外结算一次;②本回合使用的下一张点数小于此牌的点数的普通锦囊牌额外结算一次。', + lvboshe:'吕伯奢', + olfushi:'缚豕', + olfushi_info:'①一名角色使用【杀】结算结束后,若你至其的距离不大于1,你将此【杀】对应的所有实体牌置于武将牌上。②当你需要使用一张【杀】时,你可以将任意张“缚豕”牌置入弃牌堆并摸等量的牌,视为使用一张【杀】并选择X项(X为你以此法重铸的牌数且至多为3):1.你为此【杀】额外指定一个目标;2.你选择此【杀】的一个目标角色,此牌对其造成的伤害-1;3.你选择此【杀】的一个目标角色,此【杀】对其造成的伤害+1。当此【杀】指定最后一个目标后,若此牌被选择的效果选项相邻且此牌的目标角色座位连续,则此【杀】不计入次数限制。', + oldongdao:'东道', + oldongdao_info:'农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。', + zhangyan:'张燕', + olsuji:'肃疾', + olsuji_info:'一名角色的出牌阶段开始时,若其已受伤,你可以将一张黑色牌当【杀】使用。若其受到此【杀】的伤害,你获得其一张牌。', + ollangdao:'狼蹈', + ollangdao_info:'当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:1.令此【杀】伤害基数+1;2.令你可以为此【杀】多选择一个目标;3.令此【杀】不可被响应。然后若没有角色因此【杀】死亡,你移除本次被选择的项。', + ol_dingshangwan:'OL丁尚涴', + ol_dingshangwan_prefix:'OL', + olfudao:'抚悼', + olfudao_info:'①游戏开始时,你摸三张牌,然后可以将至多三张手牌交给一名其他角色,然后可以弃置任意张手牌,最后记录你的手牌数。②一名角色的回合结束时,若其手牌数和你发动〖抚悼①〗记录的数值相同,则你可以与其各摸一张牌。', + olfengyan:'讽言', + olfengyan_info:'锁定技。当你受到其他角色造成的伤害后或响应其他角色使用的牌时,你选择一项:①摸一张牌,然后交给其一张牌。②令其摸一张牌,然后其弃置两张牌。', + ol_liwan:'OL李婉', + ol_liwan_prefix:'OL', + ollianju:'联句', + ollianju_info:'结束阶段,你可以令一名其他角色获得你本回合使用的最后一张牌A对应的所有位于弃牌堆的实体牌并记录A的牌名,然后其下个结束阶段可以令你获得其本回合使用的最后一张牌B对应的所有位于弃牌堆的实体牌,然后若A与B的牌名相同,则你失去1点体力;若A与B的牌名不同,则你可以视为使用A。', + olsilv:'思闾', + olsilv_info:'锁定技,每回合每项限一次,当你获得或失去你发动〖联句〗记录的最后一次牌名的同名牌后,你展示这些牌,然后摸一张牌。', + xueji_old:'血祭', + xueji_old_info:'出牌阶段限一次,你可以弃置一张红色牌并对攻击范围内的至多X名角色各造成1点伤害(X为你已损失的体力值),然后这些角色各摸一张牌。', + oldhuxiao:'虎啸', + oldhuxiao_info:'锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。', + oldwuji:'武继', + oldwuji_info:'觉醒技,结束阶段,若你本回合造成了3点或更多伤害,你加1点体力上限并回复1点体力,并失去技能〖虎啸〗。', + olfeiyang:'飞扬', //olfeiyang_info:'限定技。准备阶段,你可以弃置两张牌,然后弃置判定区的一张牌。', - olfeiyang_info: '准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。', - caoyu: '曹宇', - olgongjie: '恭节', - olgongjie_info: '每轮的首个回合开始时,你可以令任意名角色获得你的一张牌,然后你摸X张牌(X为你本次失去的花色数)。', - olxiangxv: '相胥', - olxiangxv_info: '当你的手牌数变为全场最少时,你可以获得以下效果:本回合结束时,将手牌数调整至与当前回合角色手牌数相同(至多摸至五张)。', - olxiangzuo: '襄胙', - olxiangzuo_info: '限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗或〖相胥〗,你回复等量的体力。', - liyi: '李异', - olchanshuang: '缠双', - olchanshuang_info: '①出牌阶段限一次,你可以选择一名其他角色。你与其依次选择〖缠双③〗的一项,然后你与其依次执行各自选择的项。②结束阶段,若X大于0,你执行〖缠双③〗的前X项(X为你本回合以任意形式执行过的〖缠双③〗的选项数)。③选项:1.重铸一张牌;2.使用一张【杀】;3.弃置两张牌。', - olzhanjin: '蘸金', - olzhanjin_info: '锁定技,若你有空置的武器栏,则你视为装备【贯石斧】。', - tianchou: '田畴', - olshandao: '善刀', - olshandao_info: '出牌阶段限一次,你可以选择任意名角色,你选择这些角色的各一张牌,依次将这些牌放置到牌堆顶,然后你视为对这些角色使用【五谷丰登】,然后你视为对这些角色外的所有其他角色使用【万箭齐发】。', - ol_hujinding: '胡金定', - olqingyuan: '轻缘', - olqingyuan_info: '锁定技。①游戏开始时,或当你于本局游戏首次受到伤害后,你选择一名未以此法选择过的其他角色。②每回合限一次,你发动〖轻缘①〗选择过的角色得到牌后,你随机获得其中一名角色的随机一张牌。', - olchongshen: '重身', - olchongshen_info: '你可以将本轮得到的手牌当作【闪】使用,且这些牌不计入你的手牌上限。', + olfeiyang_info:'准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。', + caoyu:'曹宇', + olgongjie:'恭节', + olgongjie_info:'每轮的首个回合开始时,你可以令任意名角色获得你的一张牌,然后你摸X张牌(X为你本次失去的花色数)。', + olxiangxv:'相胥', + olxiangxv_info:'当你的手牌数变为全场最少时,你可以获得以下效果:本回合结束时,将手牌数调整至与当前回合角色手牌数相同(至多摸至五张)。', + olxiangzuo:'襄胙', + olxiangzuo_info:'限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗或〖相胥〗,你回复等量的体力。', + liyi:'李异', + olchanshuang:'缠双', + olchanshuang_info:'①出牌阶段限一次,你可以选择一名其他角色。你与其依次选择〖缠双③〗的一项,然后你与其依次执行各自选择的项。②结束阶段,若X大于0,你执行〖缠双③〗的前X项(X为你本回合以任意形式执行过的〖缠双③〗的选项数)。③选项:1.重铸一张牌;2.使用一张【杀】;3.弃置两张牌。', + olzhanjin:'蘸金', + olzhanjin_info:'锁定技,若你有空置的武器栏,则你视为装备【贯石斧】。', + tianchou:'田畴', + olshandao:'善刀', + olshandao_info:'出牌阶段限一次,你可以选择任意名角色,你选择这些角色的各一张牌,依次将这些牌放置到牌堆顶,然后你视为对这些角色使用【五谷丰登】,然后你视为对这些角色外的所有其他角色使用【万箭齐发】。', + ol_hujinding:'胡金定', + olqingyuan:'轻缘', + olqingyuan_info:'锁定技。①游戏开始时,或当你于本局游戏首次受到伤害后,你选择一名未以此法选择过的其他角色。②每回合限一次,你发动〖轻缘①〗选择过的角色得到牌后,你随机获得其中一名角色的随机一张牌。', + olchongshen:'重身', + olchongshen_info:'你可以将本轮得到的手牌当作【闪】使用,且这些牌不计入你的手牌上限。', - sp_tianji: '天极·皇室宗亲', - sp_sibi: '四弼·辅国文曲', - sp_tianzhu: '天柱·势冠一方', - sp_nvshi: '女史·留史巾帼', - sp_shaowei: '少微·能人异士', - sp_huben: '虎贲·勇冠三军', - sp_liesi: '列肆·豪商巨贾', - sp_default: "天同·同名异势", - sp_qifu: '灯愿·祈福武将', - sp_wanglang: 'OL·限定专属', - sp_zhongdan: "忠胆英杰", - sp_guozhan: "国战", - sp_guozhan2: "国战移植", - sp_others: "其他", - sp_waitforsort: '等待分包', + sp_tianji:'天极·皇室宗亲', + sp_sibi:'四弼·辅国文曲', + sp_tianzhu:'天柱·势冠一方', + sp_nvshi:'女史·留史巾帼', + sp_shaowei:'少微·能人异士', + sp_huben:'虎贲·勇冠三军', + sp_liesi:'列肆·豪商巨贾', + sp_default:"天同·同名异势", + sp_qifu:'灯愿·祈福武将', + sp_wanglang:'OL·限定专属', + sp_zhongdan:"忠胆英杰", + sp_guozhan:"国战", + sp_guozhan2:"国战移植", + sp_others:"其他", + sp_waitforsort:'等待分包', } }; }); diff --git a/character/tw.js b/character/tw.js index c0b83d62c..ae9c495fe 100644 --- a/character/tw.js +++ b/character/tw.js @@ -1,1146 +1,1146 @@ import { game } from '../noname.js'; -game.import('character', function (lib, game, ui, get, ai, _status) { +game.import('character',function(lib,game,ui,get,ai,_status){ return { - name: 'tw', - connect: true, - characterSort: { - tw: { - tw_sp: ['tw_zhangzhao', 'tw_zhanghong', 'tw_fuwan', 'tw_yujin', 'tw_zhaoxiang', 'tw_hucheer', 'tw_hejin', 'tw_mayunlu', 'tw_re_caohong', 'tw_zangba', 'tw_liuhong', 'tw_tianyu', 'jiachong', 'duosidawang', 'wuban', 'yuejiu', 'tw_caocao', 'tw_zhangmancheng', 'tw_caozhao', 'tw_wangchang', 'tw_puyangxing', 'tw_jiangji', 'tw_niujin', 'tw_xiahouen', 'tw_xiahoushang', 'tw_zhangji', 'tw_zhangnan', 'tw_fengxí', 'tw_furong', 'tw_liwei', 'tw_yangyi', 'tw_daxiaoqiao', 'tw_dengzhi', 'tw_baoxin', 'tw_bingyuan', 'tw_fanchou', 'tw_haomeng', 'tw_huchuquan', 'tw_jianshuo', 'tw_jiling', 'tw_liufuren', 'tw_liuzhang', 'tw_mateng', 'tw_niufudongxie', 'tw_qiaorui', 'tw_weixu', 'tw_yanxiang', 'tw_yufuluo', 'tw_zhangning', 'tw_dengzhi', 'tw_yangyi', 'tw_yangang', 'tw_gongsunfan'], - tw_yunchouzhi: ['tw_wangcan', 'tw_dongzhao', 'tw_bianfuren', 'tw_feiyi', 'tw_chenzhen', 'tw_xunchen'], - tw_yunchouxin: ['tw_wangling', 'tw_huojun', 'tw_wujing', 'tw_zhouchu'], - tw_yunchouren: ['tw_xujing', 'tw_qiaogong'], - tw_yunchouyong: ['tw_zongyu', 'tw_chendong', 'tw_sunyi'], - tw_yunchouyan: ['tw_jiangqing'], - tw_zhu: ['tw_beimihu', 'tw_ol_sunjian', 'ol_liuyu', 'tw_menghuo'], - tw_swordsman: ['xia_yuzhenzi', 'xia_shie', 'xia_shitao', 'xia_guanyu', 'xia_liubei', 'xia_xiahousone', 'xia_xiahoudun', 'xia_zhangwei', 'xia_xushu', 'xia_wangyue', 'xia_liyàn', 'xia_tongyuan', 'xia_lusu', 'xia_dianwei', 'xia_zhaoe', 'xia_xiahouzie'], - tw_mobile: ['nashime', 'tw_gexuan', 'tw_zhugeguo'], - tw_mobile2: ['tw_chengpu', 'tw_guohuai', 'old_quancong', 'tw_caoxiu', 'tw_guanqiujian', 'tw_re_fazheng', 'tw_madai', 'tw_zhangfei', 'tw_guyong', 'tw_handang', 'tw_xuezong', 'tw_yl_luzhi'], - tw_yijiang: ['tw_caoang', 'tw_caohong', 'tw_zumao', 'tw_dingfeng', 'tw_maliang', 'tw_xiahouba'], - tw_english: ['kaisa'], + name:'tw', + connect:true, + characterSort:{ + tw:{ + tw_sp:['tw_zhangzhao','tw_zhanghong','tw_fuwan','tw_yujin','tw_zhaoxiang','tw_hucheer','tw_hejin','tw_mayunlu','tw_re_caohong','tw_zangba','tw_liuhong','tw_tianyu','jiachong','duosidawang','wuban','yuejiu','tw_caocao','tw_zhangmancheng','tw_caozhao','tw_wangchang','tw_puyangxing','tw_jiangji','tw_niujin','tw_xiahouen','tw_xiahoushang','tw_zhangji','tw_zhangnan','tw_fengxí','tw_furong','tw_liwei','tw_yangyi','tw_daxiaoqiao','tw_dengzhi','tw_baoxin','tw_bingyuan','tw_fanchou','tw_haomeng','tw_huchuquan','tw_jianshuo','tw_jiling','tw_liufuren','tw_liuzhang','tw_mateng','tw_niufudongxie','tw_qiaorui','tw_weixu','tw_yanxiang','tw_yufuluo','tw_zhangning','tw_dengzhi','tw_yangyi','tw_yangang','tw_gongsunfan'], + tw_yunchouzhi:['tw_wangcan','tw_dongzhao','tw_bianfuren','tw_feiyi','tw_chenzhen','tw_xunchen'], + tw_yunchouxin:['tw_wangling','tw_huojun','tw_wujing','tw_zhouchu'], + tw_yunchouren:['tw_xujing','tw_qiaogong'], + tw_yunchouyong:['tw_zongyu','tw_chendong','tw_sunyi'], + tw_yunchouyan:['tw_jiangqing'], + tw_zhu:['tw_beimihu','tw_ol_sunjian','ol_liuyu','tw_menghuo'], + tw_swordsman:['xia_yuzhenzi','xia_shie','xia_shitao','xia_guanyu','xia_liubei','xia_xiahousone','xia_xiahoudun','xia_zhangwei','xia_xushu','xia_wangyue','xia_liyàn','xia_tongyuan','xia_lusu','xia_dianwei','xia_zhaoe','xia_xiahouzie'], + tw_mobile:['nashime','tw_gexuan','tw_zhugeguo'], + tw_mobile2:['tw_chengpu','tw_guohuai','old_quancong','tw_caoxiu','tw_guanqiujian','tw_re_fazheng','tw_madai','tw_zhangfei','tw_guyong','tw_handang','tw_xuezong','tw_yl_luzhi'], + tw_yijiang:['tw_caoang','tw_caohong','tw_zumao','tw_dingfeng','tw_maliang','tw_xiahouba'], + tw_english:['kaisa'], }, }, - character: { - xia_yuzhenzi: ['male', 'qun', 3, ['twhuajing', 'twtianshou']], - xia_shie: ['male', 'wei', 4, ['twdengjian', 'twxinshou']], - xia_shitao: ['male', 'qun', 4, ['twjieqiu', 'twenchou']], - xia_guanyu: ['male', 'qun', 4, ['twzhongyi', 'twchue']], - xia_liubei: ['male', 'shu', 4, ['twshenyi', 'twxinghan']], - xia_xiahousone: ['female', 'qun', 3, ['twchengxi']], - xia_xiahoudun: ['male', 'qun', 4, ['twdanlie']], - xia_zhangwei: ['female', 'qun', 3, ['twhuzhong', 'twfenwang']], - tw_zhanghong: ['male', 'wu', 3, ['twquanqian', 'twrouke']], - tw_zhangzhao: ['male', 'wu', 3, ['twlijian', 'twchungang']], - tw_ol_sunjian: ['male', 'wu', '4/5', ['gzyinghun', 'wulie', 'twpolu'], ['zhu']], - tw_menghuo: ['male', 'qun', 4, ['huoshou', 'rezaiqi', 'twqiushou'], ['zhu']], - ol_liuyu: ['male', 'qun', 2, ['zongzuo', 'zhige', 'twchongwang'], ['zhu']], - tw_gongsunfan: ['male', 'qun', 4, ['twhuiyuan', 'twshoushou']], - tw_yangang: ['male', 'qun', 4, ['twzhiqu', 'twxianfeng']], - xia_xiahouzie: ['female', 'qun', '3/4', ['twxuechang', 'twduoren']], - xia_zhaoe: ['female', 'qun', 3, ['twyanshi', 'twrenchou']], - xia_lusu: ['male', 'qun', 4, ['twkaizeng', 'twyangming']], - xia_dianwei: ['male', 'qun', 4, ['twliexi', 'twshezhong']], - tw_bingyuan: ['male', 'qun', 3, ['twbingde', 'twqingtao']], - tw_niufudongxie: ['double', 'qun', 4, ['twjuntun', 'twxiongxi', 'twxiafeng']], - tw_jianshuo: ['male', 'qun', 6, ['twkunsi']], - tw_jiangji: ['male', 'wei', 3, ['twjichou', 'twjilun']], - tw_mateng: ['male', 'qun', 4, ['mashu', 'twxiongzheng', 'twluannian'], ['zhu']], - tw_baoxin: ['male', 'qun', 4, ['twmutao', 'twyimou']], - tw_liufuren: ['female', 'qun', 3, ['twzhuidu', 'twshigong']], - tw_yufuluo: ['male', 'qun', 6, ['twjiekuang', 'twneirao']], - tw_fengxí: ['male', 'shu', 4, ['twqingkou']], - tw_zhangji: ['male', 'wei', 3, ['twdingzhen', 'twyouye']], - tw_zhangnan: ['male', 'shu', 4, ['twfenwu']], - tw_huchuquan: ['male', 'qun', 4, ['twfupan']], - tw_liwei: ['male', 'shu', 4, ['twjiaohua']], - tw_yanxiang: ['male', 'qun', 3, ['twkujian', 'twruilian']], - tw_xiahouen: ['male', 'wei', 5, ['twfujian', 'twjianwei']], - tw_xiahoushang: ['male', 'wei', 4, ['twtanfeng']], - tw_qiaorui: ['male', 'qun', 5, ['twxiawei', 'twqiongji']], - tw_haomeng: ['male', 'qun', 4, ['twgongge']], - tw_weixu: ['male', 'qun', 4, ['twsuizheng', 'twtuidao']], - xia_xushu: ['male', 'qun', 4, ['twjiange', 'twxiawang']], - xia_wangyue: ['male', 'qun', 4, ['twyulong', 'twjianming']], - xia_liyàn: ['male', 'qun', 4, ['twzhenhu', 'twlvren']], - xia_tongyuan: ['male', 'qun', 4, ['twchaofeng', 'twchuanshu']], - tw_zhangning: ['female', 'qun', 3, ['twxingzhui', 'twjuchen']], - tw_yangyi: ['male', 'shu', 3, ['duoduan', 'twgongsun']], - tw_dengzhi: ['male', 'shu', 3, ['twjimeng', 'shuaiyan']], - tw_wangling: ['male', 'wei', 4, ['twmibei', 'twxingqi'], ['clan:太原王氏']], - tw_zhugeguo: ['female', 'shu', 3, ['twqirang', 'twyuhua']], - tw_fanchou: ['male', 'qun', 4, ['twxingluan']], - tw_xujing: ['male', 'shu', 3, ['twboming', 'twejian']], - tw_zhangfei: ['male', 'shu', 4, ['new_repaoxiao', 'twxuhe']], - tw_xuezong: ['male', 'wu', 3, ['funan', 'twjiexun']], - tw_xunchen: ['male', 'qun', 3, ['twweipo', 'mjchenshi', 'twmouzhi']], - tw_jiangqing: ['male', 'wu', 4, ['twshangyi', 'twxiangyu']], - tw_guyong: ['male', 'wu', 3, ['twgyshenxing', 'twbingyi']], - tw_chendong: ['male', 'wu', 4, ['twyilie', 'twfenming']], - tw_handang: ['male', 'wu', 4, ['twgongji', 'twjiefan']], - tw_jiling: ['male', 'qun', 4, ['twshuangren']], - tw_re_fazheng: ['male', 'shu', 3, ['twxuanhuo', 'twenyuan']], - tw_madai: ['male', 'shu', 4, ['mashu', 'twqianxi']], - tw_niujin: ['male', 'wei', 4, ['twcuorui', 'twliewei']], - tw_guanqiujian: ['male', 'wei', 3, ['twzhengrong', 'twhongju']], - tw_daxiaoqiao: ['female', 'wu', 3, ['twxingwu', 'twpingting'], ['tempname:daxiaoqiao']], - tw_furong: ['male', 'shu', 4, ['twxuewei', 'twliechi']], - tw_yl_luzhi: ['male', 'qun', 3, ['twmingren', 'twzhenliang']], - tw_liuzhang: ['male', 'qun', 3, ['jutu', 'twyaohu', 'rehuaibi']], - tw_zongyu: ['male', 'shu', 3, ['twzhibian', 'twyuyan']], - tw_zhouchu: ['male', 'wu', 4, ['twguoyi', 'twchuhai']], - tw_qiaogong: ['male', 'wu', 3, ['twyizhu', 'twluanchou']], - tw_feiyi: ['male', 'shu', 3, ['twshengxi', 'twkuanji']], - tw_bianfuren: ['female', 'wei', 3, ['twwanwei', 'twyuejian']], - tw_chenzhen: ['male', 'shu', 3, ['twmuyue', 'twchayi']], - tw_caoxiu: ['male', 'wei', 4, ['twqianju', 'twqingxi']], - tw_sunyi: ['male', 'wu', 4, ['twzaoli']], - tw_puyangxing: ['male', 'wu', 4, ['twzhengjian', 'twzhongchi']], - tw_tianyu: ['male', 'wei', 4, ['twzhenxi', 'twyangshi']], - old_quancong: ['male', 'wu', 4, ['zhenshan']], - tw_wujing: ['male', 'wu', 4, ['twfenghan', 'twcongji']], - tw_wangcan: ['male', 'wei', 3, ['twdianyi', 'twyingji', 'twshanghe']], - tw_wangchang: ['male', 'wei', 3, ['twkaiji', 'twshepan'], ['clan:太原王氏']], - tw_caozhao: ['male', 'wei', 4, ['twfuzuan', 'twchongqi']], - tw_guohuai: ["male", "wei", 4, ["twjingce", "yuzhang"]], - tw_chengpu: ['male', 'wu', 4, ['twlihuo', 'twchunlao']], - tw_zhangmancheng: ['male', 'qun', 4, ['twfengji', 'twyiju', 'twbudao']], - tw_caocao: ['male', 'qun', 4, ['twlingfa']], - tw_liuhong: ['male', 'qun', 4, ['twyujue', 'twgezhi', 'twfengqi'], ['zhu']], - tw_huojun: ['male', 'shu', 4, ['twsidai', 'twjieyu']], - tw_zangba: ['male', 'wei', 4, ['twhanyu', 'twhengjiang']], - tw_re_caohong: ['male', 'wei', 4, ['twyuanhu', 'twjuezhu']], - tw_mayunlu: ['female', 'shu', 4, ['mashu', 'twfengpo']], - tw_hejin: ['male', 'qun', 4, ['twmouzhu', 'twyanhuo']], - tw_hucheer: ['male', 'qun', 4, ['twshenxing', 'twdaoji']], - tw_yujin: ['male', 'qun', 4, ['xinzhenjun']], - tw_fuwan: ['male', 'qun', 4, ['twmoukui']], - tw_zhaoxiang: ['female', 'shu', 4, ['refanghun', 'twfuhan', 'twqueshi']], - yuejiu: ['male', 'qun', 4, ['cuijin']], - wuban: ['male', 'shu', 4, ['jintao'], ['clan:陈留吴氏']], - duosidawang: ['male', 'qun', '4/5', ['equan', 'manji']], - jiachong: ['male', 'qun', 3, ['beini', 'dingfa']], - tw_dongzhao: ['male', 'wei', 3, ['twmiaolve', 'twyingjia']], - tw_gexuan: ['male', 'qun', 3, ['twdanfa', 'twlingbao', 'twsidao']], - tw_beimihu: ['female', 'qun', 3, ['zongkui', 'guju', 'baijia', 'bingzhao'], ['zhu']], - nashime: ['male', 'qun', 3, ['chijie', 'waishi', 'renshe']], - tw_xiahouba: ['male', 'shu', 4, ['twyanqin', 'twbaobian']], - tw_zumao: ['male', 'wu', 4, ['twtijin']], - tw_caoang: ['male', 'wei', 4, ['twxiaolian']], - tw_dingfeng: ['male', 'wu', 4, ['twqijia', 'twzhuchen']], - tw_caohong: ['male', 'wei', 4, ['twhuzhu', 'twliancai']], - tw_maliang: ['male', 'shu', 3, ['twrangyi', 'twbaimei']], - kaisa: ["male", "western", 4, ["zhengfu"]], + character:{ + xia_yuzhenzi:['male','qun',3,['twhuajing','twtianshou']], + xia_shie:['male','wei',4,['twdengjian','twxinshou']], + xia_shitao:['male','qun',4,['twjieqiu','twenchou']], + xia_guanyu:['male','qun',4,['twzhongyi','twchue']], + xia_liubei:['male','shu',4,['twshenyi','twxinghan']], + xia_xiahousone:['female','qun',3,['twchengxi']], + xia_xiahoudun:['male','qun',4,['twdanlie']], + xia_zhangwei:['female','qun',3,['twhuzhong','twfenwang']], + tw_zhanghong:['male','wu',3,['twquanqian','twrouke']], + tw_zhangzhao:['male','wu',3,['twlijian','twchungang']], + tw_ol_sunjian:['male','wu','4/5',['gzyinghun','wulie','twpolu'],['zhu']], + tw_menghuo:['male','qun',4,['huoshou','rezaiqi','twqiushou'],['zhu']], + ol_liuyu:['male','qun',2,['zongzuo','zhige','twchongwang'],['zhu']], + tw_gongsunfan:['male','qun',4,['twhuiyuan','twshoushou']], + tw_yangang:['male','qun',4,['twzhiqu','twxianfeng']], + xia_xiahouzie:['female','qun','3/4',['twxuechang','twduoren']], + xia_zhaoe:['female','qun',3,['twyanshi','twrenchou']], + xia_lusu:['male','qun',4,['twkaizeng','twyangming']], + xia_dianwei:['male','qun',4,['twliexi','twshezhong']], + tw_bingyuan:['male','qun',3,['twbingde','twqingtao']], + tw_niufudongxie:['double','qun',4,['twjuntun','twxiongxi','twxiafeng']], + tw_jianshuo:['male','qun',6,['twkunsi']], + tw_jiangji:['male','wei',3,['twjichou','twjilun']], + tw_mateng:['male','qun',4,['mashu','twxiongzheng','twluannian'],['zhu']], + tw_baoxin:['male','qun',4,['twmutao','twyimou']], + tw_liufuren:['female','qun',3,['twzhuidu','twshigong']], + tw_yufuluo:['male','qun',6,['twjiekuang','twneirao']], + tw_fengxí:['male','shu',4,['twqingkou']], + tw_zhangji:['male','wei',3,['twdingzhen','twyouye']], + tw_zhangnan:['male','shu',4,['twfenwu']], + tw_huchuquan:['male','qun',4,['twfupan']], + tw_liwei:['male','shu',4,['twjiaohua']], + tw_yanxiang:['male','qun',3,['twkujian','twruilian']], + tw_xiahouen:['male','wei',5,['twfujian','twjianwei']], + tw_xiahoushang:['male','wei',4,['twtanfeng']], + tw_qiaorui:['male','qun',5,['twxiawei','twqiongji']], + tw_haomeng:['male','qun',4,['twgongge']], + tw_weixu:['male','qun',4,['twsuizheng','twtuidao']], + xia_xushu:['male','qun',4,['twjiange','twxiawang']], + xia_wangyue:['male','qun',4,['twyulong','twjianming']], + xia_liyàn:['male','qun',4,['twzhenhu','twlvren']], + xia_tongyuan:['male','qun',4,['twchaofeng','twchuanshu']], + tw_zhangning:['female','qun',3,['twxingzhui','twjuchen']], + tw_yangyi:['male','shu',3,['duoduan','twgongsun']], + tw_dengzhi:['male','shu',3,['twjimeng','shuaiyan']], + tw_wangling:['male','wei',4,['twmibei','twxingqi'],['clan:太原王氏']], + tw_zhugeguo:['female','shu',3,['twqirang','twyuhua']], + tw_fanchou:['male','qun',4,['twxingluan']], + tw_xujing:['male','shu',3,['twboming','twejian']], + tw_zhangfei:['male','shu',4,['new_repaoxiao','twxuhe']], + tw_xuezong:['male','wu',3,['funan','twjiexun']], + tw_xunchen:['male','qun',3,['twweipo','mjchenshi','twmouzhi']], + tw_jiangqing:['male','wu',4,['twshangyi','twxiangyu']], + tw_guyong:['male','wu',3,['twgyshenxing','twbingyi']], + tw_chendong:['male','wu',4,['twyilie','twfenming']], + tw_handang:['male','wu',4,['twgongji','twjiefan']], + tw_jiling:['male','qun',4,['twshuangren']], + tw_re_fazheng:['male','shu',3,['twxuanhuo','twenyuan']], + tw_madai:['male','shu',4,['mashu','twqianxi']], + tw_niujin:['male','wei',4,['twcuorui','twliewei']], + tw_guanqiujian:['male','wei',3,['twzhengrong','twhongju']], + tw_daxiaoqiao:['female','wu',3,['twxingwu','twpingting'],['tempname:daxiaoqiao']], + tw_furong:['male','shu',4,['twxuewei','twliechi']], + tw_yl_luzhi:['male','qun',3,['twmingren','twzhenliang']], + tw_liuzhang:['male','qun',3,['jutu','twyaohu','rehuaibi']], + tw_zongyu:['male','shu',3,['twzhibian','twyuyan']], + tw_zhouchu:['male','wu',4,['twguoyi','twchuhai']], + tw_qiaogong:['male','wu',3,['twyizhu','twluanchou']], + tw_feiyi:['male','shu',3,['twshengxi','twkuanji']], + tw_bianfuren:['female','wei',3,['twwanwei','twyuejian']], + tw_chenzhen:['male','shu',3,['twmuyue','twchayi']], + tw_caoxiu:['male','wei',4,['twqianju','twqingxi']], + tw_sunyi:['male','wu',4,['twzaoli']], + tw_puyangxing:['male','wu',4,['twzhengjian','twzhongchi']], + tw_tianyu:['male','wei',4,['twzhenxi','twyangshi']], + old_quancong:['male','wu',4,['zhenshan']], + tw_wujing:['male','wu',4,['twfenghan','twcongji']], + tw_wangcan:['male','wei',3,['twdianyi','twyingji','twshanghe']], + tw_wangchang:['male','wei',3,['twkaiji','twshepan'],['clan:太原王氏']], + tw_caozhao:['male','wei',4,['twfuzuan','twchongqi']], + tw_guohuai:["male","wei",4,["twjingce","yuzhang"]], + tw_chengpu:['male','wu',4,['twlihuo','twchunlao']], + tw_zhangmancheng:['male','qun',4,['twfengji','twyiju','twbudao']], + tw_caocao:['male','qun',4,['twlingfa']], + tw_liuhong:['male','qun',4,['twyujue','twgezhi','twfengqi'],['zhu']], + tw_huojun:['male','shu',4,['twsidai','twjieyu']], + tw_zangba:['male','wei',4,['twhanyu','twhengjiang']], + tw_re_caohong:['male','wei',4,['twyuanhu','twjuezhu']], + tw_mayunlu:['female','shu',4,['mashu','twfengpo']], + tw_hejin:['male','qun',4,['twmouzhu','twyanhuo']], + tw_hucheer:['male','qun',4,['twshenxing','twdaoji']], + tw_yujin:['male','qun',4,['xinzhenjun']], + tw_fuwan:['male','qun',4,['twmoukui']], + tw_zhaoxiang:['female','shu',4,['refanghun','twfuhan','twqueshi']], + yuejiu:['male','qun',4,['cuijin']], + wuban:['male','shu',4,['jintao'],['clan:陈留吴氏']], + duosidawang:['male','qun','4/5',['equan','manji']], + jiachong:['male','qun',3,['beini','dingfa']], + tw_dongzhao:['male','wei',3,['twmiaolve','twyingjia']], + tw_gexuan:['male','qun',3,['twdanfa','twlingbao','twsidao']], + tw_beimihu:['female','qun',3,['zongkui','guju','baijia','bingzhao'],['zhu']], + nashime:['male','qun',3,['chijie','waishi','renshe']], + tw_xiahouba:['male','shu',4,['twyanqin','twbaobian']], + tw_zumao:['male','wu',4,['twtijin']], + tw_caoang:['male','wei',4,['twxiaolian']], + tw_dingfeng:['male','wu',4,['twqijia','twzhuchen']], + tw_caohong:['male','wei',4,['twhuzhu','twliancai']], + tw_maliang:['male','shu',3,['twrangyi','twbaimei']], + kaisa:["male","western",4,["zhengfu"]], }, - characterIntro: { - yuzhenzi: '评书三国中的人物,其人有徒弟兼义子童渊、徒弟并州李彦,有徒孙常山赵子龙、北地枪王张绣、张任等人。', - shie: '三国人物,善剑术。桓、灵间,有虎贲王越以剑术称于京师,阿得其法。魏帝曹丕曾从阿学剑术。曹丕在《典论·自叙》中说:“余又学击剑,阅师多矣,四方之法各异,唯京师为善。桓、灵之间,有虎贲王越善斯术,称於京师。河南史阿言昔与越游,具得其法,余从阿学精熟。尝与平虏将军刘勋、奋威将军邓展等共饮,宿闻展善有手臂,晓五兵,又称其能空手入白刃。余与论剑良久,谓将军非法也,余顾尝好之,又得善术,因求与余对。', - shitao: '石韬,字广元,即石广元,颍川(今河南禹州)人,仕魏,官拜典农校尉、郡守。初平年间,石韬与徐庶一同来到荆州,在荆州时与诸葛亮和庞统等人相善。与崔州平(名钧)、孟公威(名建)、徐元直(名庶)为“诸葛四友”。', - xiahousone: '夏侯子萼,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为在貂蝉不在时血婆娑的实际首领。在海外服中,设定为夏侯惇的养女,继承了夏侯紫萼的血婆娑,之后“夏侯紫萼”这个名字就被隐匿于历史之中,而“夏侯子萼”则成为了血婆娑的首领“血蔷薇”的固定名号。', - zhangwei: '张葳,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为被夏侯子萼救下后加入的血婆娑成员。在海外服中,设定为张奂的养女,张奂为宦官迫害时与其失散,为神秘女子所救并学得武艺,后与夏侯紫萼一起建立血婆娑。在李儒分成时为了保护百姓而牺牲。', - nashime: '难升米(なしめ,或なんしょうまい)是倭国大夫。景初二年六月,受女王卑弥呼之命,与都市牛利出使魏国,被魏国拜为率善中郎将。', - jiachong: '贾充(217年—282年),字公闾,平阳襄陵(今山西襄汾)人,三国曹魏至西晋时期大臣,曹魏豫州刺史贾逵之子。西晋王朝的开国元勋。出身平阳贾氏。曾参与镇压淮南二叛和弑杀魏帝曹髦,因此深得司马氏信任,其女儿贾褒(一名荃)及贾南风分别嫁予司马炎弟司马攸及次子司马衷,与司马氏结为姻亲,地位显赫。晋朝建立后,转任车骑将军、散骑常侍、尚书仆射,后升任司空、太尉等要职。更封鲁郡公。咸宁末,为使持节、假黄钺、大都督征讨吴国。吴国平定后,增邑八千户。太康三年(282年),贾充去世。西晋朝廷追赠他为太宰,礼官议谥曰荒,司马炎不采纳,改谥为武。有集五卷。', - duosidawang: '朵思大王是《三国演义》中人物,南蛮秃龙洞的元帅,孟获弟弟孟优的朋友,据说是南蛮第一智者。', - wuban: '吴班,字元雄,生卒年不详,兖州陈留郡(治今河南省开封市)人。三国时期蜀汉将领。为领军,随刘备参加伐吴之战,后又随蜀汉丞相诸葛亮参加北伐曹魏的战争,并于公元231年(建兴九年)的北伐中大破司马懿。官至骠骑将军,封绵竹侯。吴班以豪爽侠义著称于当时,又因族妹吴氏是蜀汉穆皇后,在蜀汉将领中有较高的地位。', - yuejiu: '乐就(?-197),在袁术为攻徐州而大兴七军之际,以督战官之身份担任联络之役。但是,袁术军不幸战败,其也在寿春被曹操军逮捕并遭到斩首。', - huojun: '霍峻(178年—217年),字仲邈,南郡枝江(今湖北枝江)人,东汉末年刘备麾下名将。其兄霍笃曾在故乡聚部众数百人。后霍笃逝世,刘表以霍峻继承其部曲。208年(建安十三年),刘表病逝,霍峻便率部曲归降刘备,并被任为中郎将。后随刘备入蜀,刘备从葭萌还袭刘璋,留霍峻守葭萌城。张鲁遣将杨帛劝降霍峻,霍峻严词拒绝,杨帛退去。后刘璋将扶禁、向存等率万余人由阆水上,攻围霍峻,城中兵不过数百人,霍峻坚守一年,伺机将其击破。刘备定蜀,嘉霍峻之功,于是分广汉为梓潼郡,以峻为梓潼太守、裨将军。三年后去世,还葬成都。刘备亲率群僚临会吊祭,留宿墓上,当时的人都为他感到荣幸。', - zhangmancheng: '张曼成(?—184年6月),东汉末年黄巾之乱时南阳黄巾军首领,杀郡守褚贡,一度占据宛城数月,后为秦颉所杀。', - caozhao: '曹肇(?-244年),字长思,沛国谯县(今安徽亳州)人。三国时期魏国大臣,大司马曹休之子。容貌俊美,有当世才度,深得魏明帝宠信,官至散骑常侍、屯骑校尉。魏明帝临死,与燕王曹宇等托付后事。不果,以长平侯归第。正始五年(244年)卒,追赠为卫将军。', - wangchang: '王昶(2世纪-259年),字文舒,太原郡晋阳县(今山西太原)人。三国时期曹魏将领,东汉代郡太守王泽之子。出身太原王氏,少有名气,进入曹丕幕府,授太子文学。曹丕即位后,拜散骑侍郎,迁兖州刺史,撰写《治论》、《兵书》,作为朝廷提供施政参考。魏明帝曹叡即位后,升任扬烈将军,封关内侯。齐王曹芳即位,迁徐州刺史,拜征南将军。太傅司马懿掌权后,深得器重,奏请伐吴,在江陵取得重大胜利,升任征南大将军、开府仪同三司,晋爵京陵侯。正元年间(255年),参与平定“淮南三乱”有功,迁骠骑大将军,守司空。甘露四年(259年),去世,赠司徒,谥号为穆。', - puyangxing: '濮阳兴(?-264年),字子元,陈留(治今河南开封)人,三国时期东吴大臣,吴景帝孙休末年至末帝孙皓初年任丞相。孙权时为上虞县令,后升任尚书左曹、五官中郎将、会稽太守。孙休即位,征召为太常卫将军、平军国事,封外黄侯。永安三年(260年),力主建丹杨湖田,事倍功半,百姓大怨。后升任丞相。永安七年(264年),孙休去世,濮阳兴与张布迎立孙皓。担任侍郎,兼任青州牧。同年被万彧谮毁,流放广州,途中被孙皓派人追杀,并夷三族。', - re_caohong: '字子廉,沛国谯(今安徽亳县)人,曹操从弟,曾献马并救护曹操。后多随军征伐,平兖州、征刘表、讨祝臂。曹丕即位时封曹洪为骠骑将军。曹叡即位,拜曹洪为后将军,更封乐城侯,后复拜为骠骑将军。曹洪逝世,追谥曰恭侯。', - jiangji: '蒋济(?—249年5月18日),字子通,楚国平阿(今安徽省怀远县常坟镇孔岗)人。三国后期曹魏名臣,历仕曹操、曹丕、曹睿、曹芳四朝。蒋济在汉末出任九江郡吏、扬州别驾。后被曹操聘为丹杨太守,不久升任丞相府主薄,西曹属,成为曹操的心腹谋士。魏文帝时期,蒋济出任东中郎将,代替曹仁统率大军,后升任尚书。魏明帝时期,蒋济出任中护军,封侯关内,功勋颇多。景初年间担任护军将军、散骑常侍等职。曹芳继位之后,转任领军将军,封昌陵亭侯,又代司马懿为太尉。正始十年(249年),蒋济随司马懿推翻曹爽势力之后,晋封都乡侯,同年卒(一说为蒋济觉得失信于曹爽,不久后自责忧愤而死),谥曰景侯。', - huchuquan: '呼厨泉(生卒年不详),东汉末年、三国时期匈奴单于。南匈奴羌渠单于之子,于夫罗之弟。于夫罗死后继任成为单于,曾数次依附,又反叛东汉。建安七年(公元202年),呼厨泉统领南匈奴诸部作乱平阳,钟繇率诸军围之。河北袁氏将领高干、郭援等前来增援呼厨泉,与钟繇及关中诸将大战于平阳。最终,呼厨泉惨败,从此归降曹操。建安二十一年(216年),呼厨泉被留在了邺城,南匈奴遂被分为五部。', - xiahouen: '夏侯恩是古典小说《三国演义》中的人物,为曹操随身之背剑心腹。曹操有宝剑二口:一名“倚天剑”,一名“青釭剑”。倚天剑镇威,青釭剑杀人。倚天剑曹操自佩之,青釭剑令夏侯恩佩之。那青釭剑削铁如泥,锋利无比。《三国演义》第四十一回《刘玄德携民渡江 赵子龙单骑救主》中描写:当时夏侯恩自恃勇力,背着曹操,只顾引人抢夺掳掠。不想撞着赵云,被他一枪刺死。青釭剑自此归赵云所有。', - xiahoushang: '夏侯尚(?~226年),字伯仁,沛国谯郡(今安徽省亳州市)人。三国时期曹魏将领,征西将军夏侯渊的堂侄。曹操平定冀州,以为军司马、五官将文学,迁黄门侍郎,随曹彰远征乌桓,得胜归来。与魏文帝曹丕亲近友好,以为征南将军,领荆州刺史,假节、都督南方诸军事,攻拔蜀国上庸,平定三郡九县,升为征南大将军;江陵击败吴将诸葛瑾,升为荆州牧,封昌陵乡侯。黄初七年(226年),去世,谥号为悼,其子夏侯玄继嗣。正始四年,配享魏武帝曹操庙庭。', - zhangnan: '张南(?-公元222年),字文进。三国时期蜀汉将领。刘备攻伐吴国时,张南担任前部。后刘备被陆逊击败,张南兵败战死。', - fengxí: '冯习(?—222年),字休元,南郡(治今湖北省荆州市公安县)人。三国时期蜀汉将领。随刘备入川,并于刘备攻伐孙吴时担任领军,后在猇亭被吴将陆逊击败,兵败战死。', - liwei: '李遗,生卒年不详,三国时期蜀汉名臣李恢之子,关羽女儿关银屏之夫。正史鲜有其生平记载,多见于关银屏的民间传说,其名在民间传说中被传为“李蔚”,因为遗为多音字且民间传说为口头相传并不知道具体字形之故,当以史书《三国志》作李遗为正。死后夫妇二人合葬于俞元县(今云南澄江)关三小姐墓。其父去世后,继承了汉兴亭候的爵位。', - baoxin: '鲍信(151年-192年),泰山平阳(今山东新泰)人。东汉末年济北相,讨伐董卓的诸路人马之一。鲍信受何进征召在外募兵,回到洛阳时适逢董卓进京,鲍信劝袁绍除掉董卓,袁绍不同意。后袁绍、曹操等人起兵对抗董卓,鲍信也起兵响应。后联盟破裂,鲍信劝戒曹操静观其变。青州黄巾军进攻兖州,刺史刘岱不听鲍信所劝贸然出战,兵败战死。鲍信便把曹操迎立为兖州牧。在与黄巾军交战期间,鲍信为救曹操不幸战死,曹操后来追记功绩,赐封其子。', - bingyuan: '邴原(生卒年不详),字根矩,北海朱虚(今山东临朐东)人。东汉末年名士、大臣。邴原家贫、早孤。初为北海相孔融所举。曹操为司空时,任邴原为东阁祭酒。建安十五年(210年),邴原担任丞相征事,后又代凉茂为五官将长史,闭门自守,非公事不出。随曹操征吴,于途中去世。', - jianshuo: '蹇硕(?—189年),东汉末宦官。中平五年(188年),蹇硕为上军校尉,汉灵帝以蹇硕壮健而有武略,对其特别信任,并以其为西园军元帅,领导袁绍、曹操等八校尉,以监督司隶校尉以下诸官。蹇硕虽然握有兵权,但对何进非常畏忌,曾和宦官们一起说服灵帝派遣何进西击边章、韩遂。中平六年(189年),灵帝在病重时将刘协托给蹇硕。灵帝去世后,蹇硕想先杀何进再立刘协为天子,但因手下司马潘隐与何进有旧对何进使眼色而失败。刘辩继承帝位后,蹇硕与中常侍赵忠、郭胜等写信欲合谋除去何进兄弟,因郭胜与何进为同郡且何进及何皇后发迹亦有其功劳于是亲信何氏便怂恿赵忠等人不听蹇硕之计,且将蹇硕的书信告知何进,何进于是便派黄门将之诛杀,其部下士兵亦被何进所领。', - liufuren: '刘夫人,东汉末年军阀袁绍的后妻,袁谭与袁尚的母亲。袁绍的二子中,袁谭年长而贤惠,袁尚年幼相貌美好。袁绍的后妻刘夫人有宠,她偏爱少子袁尚而讨厌长子袁谭,多次称赞袁尚的才能,袁绍也为三子的容貌感到惊奇,想要作为继承人,于是让袁谭做哥哥的后代,出外任青州刺史,后导致二子相争。。', - niufudongxie: '牛辅,东汉末年武将,东汉相国董卓的女婿。董翓,牛辅之妻,董卓之女。牛辅曾任中郎将,征讨白波军,不能取胜。董卓被杀时,牛辅别屯于陕地。吕布派李肃前去征讨牛辅,被牛辅击败。后来,牛辅营中有士兵半夜背叛出逃,造成内乱,牛辅以为整营皆叛,于是带着金银珠宝,独与亲信胡赤儿等五六人逾城北渡河。赤儿等人以绳索系在牛辅腰间将其从城头放下,但赤儿等因为谋财而在离地面数丈高的地方就松开了绳子使得牛辅重重摔在地上腰部受伤,而后赤儿与诸胡人将牛辅斩首,将其首级送去长安。', - tw_zhangji: '张既(?—223年),字德容,冯翊高陵(今陕西西安市高陵区)人。汉末三国时期曹魏名臣。举秀才出身,授新丰县令,治绩为三辅第一。河东之战时,劝说马腾参与讨伐高干、张晟叛乱。迁京兆尹,抚民兴政,联合夏侯渊平宋建,定临洮,取狄道,安郡民,迁徙氐人。张鲁投降后,建议曹操迁徙汉中百姓充实三辅,辅助曹洪击败吴兰。魏国建立后,拜尚书。黄初二年(221年),临危受命,拜雍州刺史,平定诸胡叛乱。迁凉州刺史,封西乡侯。在任期间,降苏衡,邻戴众,修工事,安抚百姓,平定西平郡麹光叛乱。一生以惠政闻名,征辟杨阜、胡遵等人,皆有名位。黄初四年(223年)去世。魏明帝曹叡即位后,追谥肃侯,其子张缉为关内侯。', - qiaorui: '桥蕤(?—197年),东汉末年袁术部下将领,为袁术开拓地盘立下了一定战功。曹操进攻袁术时,担任迎击军的先锋。在寿春与曹操军大战,被夏侯惇杀死。据正史记载,他曾经被袁术任命为大将军。', - weixu: '魏续,东汉末年吕布帐下名将。与吕布有亲,吕布将高顺兵归续管。汉献帝建安三年(198年),曹操率军攻吕布,围之三月。魏续与侯成、宋宪缚陈宫,降曹。吕布被迫降,被缢杀在白门楼。', - yanxiang: '阎象,东汉末期人物,袁术的主簿。献帝兴平二年(195),手执玉玺的袁术要称帝时,问于部下,只有阎象引用周文王虽拥有三分之二的天下还向殷称臣的故事进行劝谏。却未被采纳。', - yufuluo: '东汉时匈奴单于。亦称於夫罗、栾提于夫罗、于扶罗。羌渠单于子,右贤王。前赵刘渊之祖。于东汉中平年间带兵来到中原协助东汉政府镇压起义,赶上本国叛乱,其父被杀,于是留在中原,与白波军联合,在太原、河东等地劫掠。汉末军阀混战之际,于夫罗先后与袁绍、张杨、袁术等人联合,两次与曹操交战,均被击败。后来,于夫罗去世,其弟呼厨泉继任成为单于,其子刘豹被立为左贤王。', - sp_xunchen: '荀谌,字友若,荀彧之兄(一说荀彧之弟),荀绲之子,颍川人。曾任军阀袁绍的幕僚。帮助袁绍游说韩馥,夺取了冀州。', - sp_xujing: '许靖(?—222年),字文休。汝南郡平舆县(今河南省平舆县)人。汉末至三国蜀汉时期重臣、名士、评论家。许靖因与从弟许邵俱以品评人物而闻名于世。后被刘翊推举为孝廉,任尚书郎。曾先后投奔孔伷、陈祎、许贡、王朗等人,于孙策攻王朗前与家属俱避难交州,受到交趾太守士燮礼待。其后受益州牧刘璋邀请,相继为巴郡、广汉、蜀郡太守。于刘备包围成都时欲越墙叛逃,为刘璋所获。刘备定蜀后欲将其弃用,在法正的建议下方以其为左将军长史。建安二十三年(218年),刘备称汉中王,任命许靖为汉中王傅。章武元年(221年),刘备称帝,任命许靖为司徒,位列三公。章武二年(222年),去世。有文集二卷。', - sp_zongyu: '宗预(?-264年),字德艳 ,荆州南阳郡安众县(今河南省南阳市)人。三国时期蜀汉官员、将领。曾随张飞入蜀助平益州,又受辟为丞相诸葛亮手下主簿,升任参军、右中郎将。诸葛亮逝世后,宗预受命出使孙吴,得到孙权的赞赏。迁后将军,出督永安,又升任征西大将军,并受封关内侯。公元258年(景耀元年),因病回成都,受任镇军大将军。蜀汉灭亡后,宗预随后主刘禅徙往洛阳,在中途病逝。宗预为人坦率耿直,多次出使孙吴并深得孙权的敬重,为吴、汉两国同盟的巩固作出了一定的贡献。', - sp_chendong: '陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。', - xia_wangyue: '王越,东汉末年游侠(生卒年不详),乃辽东燕山人士,擅使剑术, 三国时期史阿的师父,曹丕的师公,官职虎贲将军。在史书《典论》中略有记载。', - liyàn: '李彦,号称"并州第一戟",是童渊的师兄。早年间两人在玉真子门下一起习武,后成年出师开枝散叶。同为并州人的吕布在得知李彦的名声后,投入其门下学习武艺。', - re_fazheng: '字孝直,本为刘璋部下,刘备围成都时劝说刘璋投降,而后又与刘备进取汉中,献计将曹操大将夏侯渊斩首。法正善奇谋,深受刘备信任和敬重。', - xin_guyong: '为蔡邕之徒。其为人少言语,不饮酒,严厉正大,被张纮推荐仕于孙权。孙权任命他为会稽郡丞,行太守事,后不断升迁,官至吴国丞相。顾雍为官,多进良言,有功于吴。', - zhaoe: '赵娥,东汉酒泉郡禄福县(即肃州)人。丈夫庞子夏,表氏县(今高台县)人。庞子夏去世后,赵娥在禄福县抚养其子庞淯。她的父亲被李寿杀死。灵帝光和二年(公元179年)二月上旬的一天早晨,赵娥在都亭前与李寿相遇,她奋力挥刀杀死了李寿,随后到了都亭尊长的面前认罪伏法。后来,凉州刺史周洪、酒泉太守刘班等人共同上表朝廷,禀奏赵娥的烈义行为,刻石立碑显其赵家门户。黄门侍郎梁宽还著书追述赵娥的事迹,为其作传。西晋政治家傅玄为其作《秦女休行》诗,加以赞美。', - xiahouzie: '夏侯紫萼,游卡桌游《三国杀阵面对决》中虚构的人物。幼年因天天帮病种的母亲采紫萼得其名。亲眼目睹母亲被宦官所杀,愤怒之下夺过佩剑斩下宦官的头颅。被神秘人所救,发现了自己的身世,决心与宦官争斗到底。后再闯荡江湖的过程中,与夏侯惇义结金兰,以夏侯家姓氏称呼。', - yangang: '严纲(163~191年),东汉末年公孙瓒部下的冀州刺史。汉献帝初平二年(191年),袁绍与公孙瓒在界桥交战,严纲为袁绍部下麹义所斩。', - gongsunfan: '公孙范,辽西令支(今河北迁安)人。东汉末年武将,公孙瓒从弟,官至勃海太守。公孙瓒起兵攻打袁绍之时,袁绍畏惧公孙瓒的势力,将自己的勃海太守印绶给予公孙范,意图和解,结果公孙范反而起勃海之兵帮助公孙瓒。初平二年(191年),公孙范以勃海兵助公孙瓒率二万人大破青、徐黄巾军。最后于界桥之战与公孙瓒一同败走。', - zhangzhao: '张昭(156年-236年),字子布。徐州彭城县(今江苏省徐州市)人。汉末三国时期孙吴政权重臣。东汉末年,张昭为避战乱而南渡至扬州。孙策创业时,任命其为长史、抚军中郎将,将文武之事都委任于张昭。孙策临终前,将其弟孙权托付给张昭,张昭率群僚辅立孙权,并安抚百姓、讨伐叛军,与周瑜等辅助孙权稳定局势。孙权每次出征,常留张昭镇守后方,领幕府事,并敬称他为“张公”。赤壁之战时,张昭鉴于曹操势大,持主降论,从而被排挤出军政决策中心。孙权代理车骑将军时,任命张昭为军师。孙权被封为吴王后,任绥远将军,封由拳侯。此后曾参与撰定朝仪。孙权两次要设立丞相时,众人都推举张昭,孙权以张昭敢于直谏、性格刚直为由而不用他,先后用孙邵、顾雍。黄龙元年(229年),孙权称帝,张昭以年老多病为由,上还官位及所统领部属,改拜辅吴将军、班亚三司,改封娄侯。晚年时一度不参与政事,在家著书,即使偶有参加朝议,也常与孙权产生激烈冲突。嘉禾五年(236年),张昭去世,享年八十一岁,谥号“文”。张昭容貌严正,敢于直言谏诤,一生以忠于孙氏基业为任,但因其与孙权在个性、军政策略等方面的深层矛盾,使其以“入宫则拜孤,出宫则拜君”的地位,却终身不得任丞相。著有《春秋左氏传解》及《论语注》,今皆佚失。', - zhanghong: '张纮(153年~212年),字子纲,徐州广陵(江苏省扬州市广陵区人)人。东汉末年文学家、官员,和张昭一起合称“二张”。曾被大将军何进、太尉朱儁、司空荀爽辟为掾属,皆不就,避难江东。孙策平定江东前,亲自多次登门邀请,张纮出仕为官。孙权即位时,建议孙权迁都秣陵。建安十七年(212年),病逝,时年六十岁,孙权为之流涕。', + characterIntro:{ + yuzhenzi:'评书三国中的人物,其人有徒弟兼义子童渊、徒弟并州李彦,有徒孙常山赵子龙、北地枪王张绣、张任等人。', + shie:'三国人物,善剑术。桓、灵间,有虎贲王越以剑术称于京师,阿得其法。魏帝曹丕曾从阿学剑术。曹丕在《典论·自叙》中说:“余又学击剑,阅师多矣,四方之法各异,唯京师为善。桓、灵之间,有虎贲王越善斯术,称於京师。河南史阿言昔与越游,具得其法,余从阿学精熟。尝与平虏将军刘勋、奋威将军邓展等共饮,宿闻展善有手臂,晓五兵,又称其能空手入白刃。余与论剑良久,谓将军非法也,余顾尝好之,又得善术,因求与余对。', + shitao:'石韬,字广元,即石广元,颍川(今河南禹州)人,仕魏,官拜典农校尉、郡守。初平年间,石韬与徐庶一同来到荆州,在荆州时与诸葛亮和庞统等人相善。与崔州平(名钧)、孟公威(名建)、徐元直(名庶)为“诸葛四友”。', + xiahousone:'夏侯子萼,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为在貂蝉不在时血婆娑的实际首领。在海外服中,设定为夏侯惇的养女,继承了夏侯紫萼的血婆娑,之后“夏侯紫萼”这个名字就被隐匿于历史之中,而“夏侯子萼”则成为了血婆娑的首领“血蔷薇”的固定名号。', + zhangwei:'张葳,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为被夏侯子萼救下后加入的血婆娑成员。在海外服中,设定为张奂的养女,张奂为宦官迫害时与其失散,为神秘女子所救并学得武艺,后与夏侯紫萼一起建立血婆娑。在李儒分成时为了保护百姓而牺牲。', + nashime:'难升米(なしめ,或なんしょうまい)是倭国大夫。景初二年六月,受女王卑弥呼之命,与都市牛利出使魏国,被魏国拜为率善中郎将。', + jiachong:'贾充(217年—282年),字公闾,平阳襄陵(今山西襄汾)人,三国曹魏至西晋时期大臣,曹魏豫州刺史贾逵之子。西晋王朝的开国元勋。出身平阳贾氏。曾参与镇压淮南二叛和弑杀魏帝曹髦,因此深得司马氏信任,其女儿贾褒(一名荃)及贾南风分别嫁予司马炎弟司马攸及次子司马衷,与司马氏结为姻亲,地位显赫。晋朝建立后,转任车骑将军、散骑常侍、尚书仆射,后升任司空、太尉等要职。更封鲁郡公。咸宁末,为使持节、假黄钺、大都督征讨吴国。吴国平定后,增邑八千户。太康三年(282年),贾充去世。西晋朝廷追赠他为太宰,礼官议谥曰荒,司马炎不采纳,改谥为武。有集五卷。', + duosidawang:'朵思大王是《三国演义》中人物,南蛮秃龙洞的元帅,孟获弟弟孟优的朋友,据说是南蛮第一智者。', + wuban:'吴班,字元雄,生卒年不详,兖州陈留郡(治今河南省开封市)人。三国时期蜀汉将领。为领军,随刘备参加伐吴之战,后又随蜀汉丞相诸葛亮参加北伐曹魏的战争,并于公元231年(建兴九年)的北伐中大破司马懿。官至骠骑将军,封绵竹侯。吴班以豪爽侠义著称于当时,又因族妹吴氏是蜀汉穆皇后,在蜀汉将领中有较高的地位。', + yuejiu:'乐就(?-197),在袁术为攻徐州而大兴七军之际,以督战官之身份担任联络之役。但是,袁术军不幸战败,其也在寿春被曹操军逮捕并遭到斩首。', + huojun:'霍峻(178年—217年),字仲邈,南郡枝江(今湖北枝江)人,东汉末年刘备麾下名将。其兄霍笃曾在故乡聚部众数百人。后霍笃逝世,刘表以霍峻继承其部曲。208年(建安十三年),刘表病逝,霍峻便率部曲归降刘备,并被任为中郎将。后随刘备入蜀,刘备从葭萌还袭刘璋,留霍峻守葭萌城。张鲁遣将杨帛劝降霍峻,霍峻严词拒绝,杨帛退去。后刘璋将扶禁、向存等率万余人由阆水上,攻围霍峻,城中兵不过数百人,霍峻坚守一年,伺机将其击破。刘备定蜀,嘉霍峻之功,于是分广汉为梓潼郡,以峻为梓潼太守、裨将军。三年后去世,还葬成都。刘备亲率群僚临会吊祭,留宿墓上,当时的人都为他感到荣幸。', + zhangmancheng:'张曼成(?—184年6月),东汉末年黄巾之乱时南阳黄巾军首领,杀郡守褚贡,一度占据宛城数月,后为秦颉所杀。', + caozhao:'曹肇(?-244年),字长思,沛国谯县(今安徽亳州)人。三国时期魏国大臣,大司马曹休之子。容貌俊美,有当世才度,深得魏明帝宠信,官至散骑常侍、屯骑校尉。魏明帝临死,与燕王曹宇等托付后事。不果,以长平侯归第。正始五年(244年)卒,追赠为卫将军。', + wangchang:'王昶(2世纪-259年),字文舒,太原郡晋阳县(今山西太原)人。三国时期曹魏将领,东汉代郡太守王泽之子。出身太原王氏,少有名气,进入曹丕幕府,授太子文学。曹丕即位后,拜散骑侍郎,迁兖州刺史,撰写《治论》、《兵书》,作为朝廷提供施政参考。魏明帝曹叡即位后,升任扬烈将军,封关内侯。齐王曹芳即位,迁徐州刺史,拜征南将军。太傅司马懿掌权后,深得器重,奏请伐吴,在江陵取得重大胜利,升任征南大将军、开府仪同三司,晋爵京陵侯。正元年间(255年),参与平定“淮南三乱”有功,迁骠骑大将军,守司空。甘露四年(259年),去世,赠司徒,谥号为穆。', + puyangxing:'濮阳兴(?-264年),字子元,陈留(治今河南开封)人,三国时期东吴大臣,吴景帝孙休末年至末帝孙皓初年任丞相。孙权时为上虞县令,后升任尚书左曹、五官中郎将、会稽太守。孙休即位,征召为太常卫将军、平军国事,封外黄侯。永安三年(260年),力主建丹杨湖田,事倍功半,百姓大怨。后升任丞相。永安七年(264年),孙休去世,濮阳兴与张布迎立孙皓。担任侍郎,兼任青州牧。同年被万彧谮毁,流放广州,途中被孙皓派人追杀,并夷三族。', + re_caohong:'字子廉,沛国谯(今安徽亳县)人,曹操从弟,曾献马并救护曹操。后多随军征伐,平兖州、征刘表、讨祝臂。曹丕即位时封曹洪为骠骑将军。曹叡即位,拜曹洪为后将军,更封乐城侯,后复拜为骠骑将军。曹洪逝世,追谥曰恭侯。', + jiangji:'蒋济(?—249年5月18日),字子通,楚国平阿(今安徽省怀远县常坟镇孔岗)人。三国后期曹魏名臣,历仕曹操、曹丕、曹睿、曹芳四朝。蒋济在汉末出任九江郡吏、扬州别驾。后被曹操聘为丹杨太守,不久升任丞相府主薄,西曹属,成为曹操的心腹谋士。魏文帝时期,蒋济出任东中郎将,代替曹仁统率大军,后升任尚书。魏明帝时期,蒋济出任中护军,封侯关内,功勋颇多。景初年间担任护军将军、散骑常侍等职。曹芳继位之后,转任领军将军,封昌陵亭侯,又代司马懿为太尉。正始十年(249年),蒋济随司马懿推翻曹爽势力之后,晋封都乡侯,同年卒(一说为蒋济觉得失信于曹爽,不久后自责忧愤而死),谥曰景侯。', + huchuquan:'呼厨泉(生卒年不详),东汉末年、三国时期匈奴单于。南匈奴羌渠单于之子,于夫罗之弟。于夫罗死后继任成为单于,曾数次依附,又反叛东汉。建安七年(公元202年),呼厨泉统领南匈奴诸部作乱平阳,钟繇率诸军围之。河北袁氏将领高干、郭援等前来增援呼厨泉,与钟繇及关中诸将大战于平阳。最终,呼厨泉惨败,从此归降曹操。建安二十一年(216年),呼厨泉被留在了邺城,南匈奴遂被分为五部。', + xiahouen:'夏侯恩是古典小说《三国演义》中的人物,为曹操随身之背剑心腹。曹操有宝剑二口:一名“倚天剑”,一名“青釭剑”。倚天剑镇威,青釭剑杀人。倚天剑曹操自佩之,青釭剑令夏侯恩佩之。那青釭剑削铁如泥,锋利无比。《三国演义》第四十一回《刘玄德携民渡江 赵子龙单骑救主》中描写:当时夏侯恩自恃勇力,背着曹操,只顾引人抢夺掳掠。不想撞着赵云,被他一枪刺死。青釭剑自此归赵云所有。', + xiahoushang:'夏侯尚(?~226年),字伯仁,沛国谯郡(今安徽省亳州市)人。三国时期曹魏将领,征西将军夏侯渊的堂侄。曹操平定冀州,以为军司马、五官将文学,迁黄门侍郎,随曹彰远征乌桓,得胜归来。与魏文帝曹丕亲近友好,以为征南将军,领荆州刺史,假节、都督南方诸军事,攻拔蜀国上庸,平定三郡九县,升为征南大将军;江陵击败吴将诸葛瑾,升为荆州牧,封昌陵乡侯。黄初七年(226年),去世,谥号为悼,其子夏侯玄继嗣。正始四年,配享魏武帝曹操庙庭。', + zhangnan:'张南(?-公元222年),字文进。三国时期蜀汉将领。刘备攻伐吴国时,张南担任前部。后刘备被陆逊击败,张南兵败战死。', + fengxí:'冯习(?—222年),字休元,南郡(治今湖北省荆州市公安县)人。三国时期蜀汉将领。随刘备入川,并于刘备攻伐孙吴时担任领军,后在猇亭被吴将陆逊击败,兵败战死。', + liwei:'李遗,生卒年不详,三国时期蜀汉名臣李恢之子,关羽女儿关银屏之夫。正史鲜有其生平记载,多见于关银屏的民间传说,其名在民间传说中被传为“李蔚”,因为遗为多音字且民间传说为口头相传并不知道具体字形之故,当以史书《三国志》作李遗为正。死后夫妇二人合葬于俞元县(今云南澄江)关三小姐墓。其父去世后,继承了汉兴亭候的爵位。', + baoxin:'鲍信(151年-192年),泰山平阳(今山东新泰)人。东汉末年济北相,讨伐董卓的诸路人马之一。鲍信受何进征召在外募兵,回到洛阳时适逢董卓进京,鲍信劝袁绍除掉董卓,袁绍不同意。后袁绍、曹操等人起兵对抗董卓,鲍信也起兵响应。后联盟破裂,鲍信劝戒曹操静观其变。青州黄巾军进攻兖州,刺史刘岱不听鲍信所劝贸然出战,兵败战死。鲍信便把曹操迎立为兖州牧。在与黄巾军交战期间,鲍信为救曹操不幸战死,曹操后来追记功绩,赐封其子。', + bingyuan:'邴原(生卒年不详),字根矩,北海朱虚(今山东临朐东)人。东汉末年名士、大臣。邴原家贫、早孤。初为北海相孔融所举。曹操为司空时,任邴原为东阁祭酒。建安十五年(210年),邴原担任丞相征事,后又代凉茂为五官将长史,闭门自守,非公事不出。随曹操征吴,于途中去世。', + jianshuo:'蹇硕(?—189年),东汉末宦官。中平五年(188年),蹇硕为上军校尉,汉灵帝以蹇硕壮健而有武略,对其特别信任,并以其为西园军元帅,领导袁绍、曹操等八校尉,以监督司隶校尉以下诸官。蹇硕虽然握有兵权,但对何进非常畏忌,曾和宦官们一起说服灵帝派遣何进西击边章、韩遂。中平六年(189年),灵帝在病重时将刘协托给蹇硕。灵帝去世后,蹇硕想先杀何进再立刘协为天子,但因手下司马潘隐与何进有旧对何进使眼色而失败。刘辩继承帝位后,蹇硕与中常侍赵忠、郭胜等写信欲合谋除去何进兄弟,因郭胜与何进为同郡且何进及何皇后发迹亦有其功劳于是亲信何氏便怂恿赵忠等人不听蹇硕之计,且将蹇硕的书信告知何进,何进于是便派黄门将之诛杀,其部下士兵亦被何进所领。', + liufuren:'刘夫人,东汉末年军阀袁绍的后妻,袁谭与袁尚的母亲。袁绍的二子中,袁谭年长而贤惠,袁尚年幼相貌美好。袁绍的后妻刘夫人有宠,她偏爱少子袁尚而讨厌长子袁谭,多次称赞袁尚的才能,袁绍也为三子的容貌感到惊奇,想要作为继承人,于是让袁谭做哥哥的后代,出外任青州刺史,后导致二子相争。。', + niufudongxie:'牛辅,东汉末年武将,东汉相国董卓的女婿。董翓,牛辅之妻,董卓之女。牛辅曾任中郎将,征讨白波军,不能取胜。董卓被杀时,牛辅别屯于陕地。吕布派李肃前去征讨牛辅,被牛辅击败。后来,牛辅营中有士兵半夜背叛出逃,造成内乱,牛辅以为整营皆叛,于是带着金银珠宝,独与亲信胡赤儿等五六人逾城北渡河。赤儿等人以绳索系在牛辅腰间将其从城头放下,但赤儿等因为谋财而在离地面数丈高的地方就松开了绳子使得牛辅重重摔在地上腰部受伤,而后赤儿与诸胡人将牛辅斩首,将其首级送去长安。', + tw_zhangji:'张既(?—223年),字德容,冯翊高陵(今陕西西安市高陵区)人。汉末三国时期曹魏名臣。举秀才出身,授新丰县令,治绩为三辅第一。河东之战时,劝说马腾参与讨伐高干、张晟叛乱。迁京兆尹,抚民兴政,联合夏侯渊平宋建,定临洮,取狄道,安郡民,迁徙氐人。张鲁投降后,建议曹操迁徙汉中百姓充实三辅,辅助曹洪击败吴兰。魏国建立后,拜尚书。黄初二年(221年),临危受命,拜雍州刺史,平定诸胡叛乱。迁凉州刺史,封西乡侯。在任期间,降苏衡,邻戴众,修工事,安抚百姓,平定西平郡麹光叛乱。一生以惠政闻名,征辟杨阜、胡遵等人,皆有名位。黄初四年(223年)去世。魏明帝曹叡即位后,追谥肃侯,其子张缉为关内侯。', + qiaorui:'桥蕤(?—197年),东汉末年袁术部下将领,为袁术开拓地盘立下了一定战功。曹操进攻袁术时,担任迎击军的先锋。在寿春与曹操军大战,被夏侯惇杀死。据正史记载,他曾经被袁术任命为大将军。', + weixu:'魏续,东汉末年吕布帐下名将。与吕布有亲,吕布将高顺兵归续管。汉献帝建安三年(198年),曹操率军攻吕布,围之三月。魏续与侯成、宋宪缚陈宫,降曹。吕布被迫降,被缢杀在白门楼。', + yanxiang:'阎象,东汉末期人物,袁术的主簿。献帝兴平二年(195),手执玉玺的袁术要称帝时,问于部下,只有阎象引用周文王虽拥有三分之二的天下还向殷称臣的故事进行劝谏。却未被采纳。', + yufuluo:'东汉时匈奴单于。亦称於夫罗、栾提于夫罗、于扶罗。羌渠单于子,右贤王。前赵刘渊之祖。于东汉中平年间带兵来到中原协助东汉政府镇压起义,赶上本国叛乱,其父被杀,于是留在中原,与白波军联合,在太原、河东等地劫掠。汉末军阀混战之际,于夫罗先后与袁绍、张杨、袁术等人联合,两次与曹操交战,均被击败。后来,于夫罗去世,其弟呼厨泉继任成为单于,其子刘豹被立为左贤王。', + sp_xunchen:'荀谌,字友若,荀彧之兄(一说荀彧之弟),荀绲之子,颍川人。曾任军阀袁绍的幕僚。帮助袁绍游说韩馥,夺取了冀州。', + sp_xujing:'许靖(?—222年),字文休。汝南郡平舆县(今河南省平舆县)人。汉末至三国蜀汉时期重臣、名士、评论家。许靖因与从弟许邵俱以品评人物而闻名于世。后被刘翊推举为孝廉,任尚书郎。曾先后投奔孔伷、陈祎、许贡、王朗等人,于孙策攻王朗前与家属俱避难交州,受到交趾太守士燮礼待。其后受益州牧刘璋邀请,相继为巴郡、广汉、蜀郡太守。于刘备包围成都时欲越墙叛逃,为刘璋所获。刘备定蜀后欲将其弃用,在法正的建议下方以其为左将军长史。建安二十三年(218年),刘备称汉中王,任命许靖为汉中王傅。章武元年(221年),刘备称帝,任命许靖为司徒,位列三公。章武二年(222年),去世。有文集二卷。', + sp_zongyu:'宗预(?-264年),字德艳 ,荆州南阳郡安众县(今河南省南阳市)人。三国时期蜀汉官员、将领。曾随张飞入蜀助平益州,又受辟为丞相诸葛亮手下主簿,升任参军、右中郎将。诸葛亮逝世后,宗预受命出使孙吴,得到孙权的赞赏。迁后将军,出督永安,又升任征西大将军,并受封关内侯。公元258年(景耀元年),因病回成都,受任镇军大将军。蜀汉灭亡后,宗预随后主刘禅徙往洛阳,在中途病逝。宗预为人坦率耿直,多次出使孙吴并深得孙权的敬重,为吴、汉两国同盟的巩固作出了一定的贡献。', + sp_chendong:'陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。', + xia_wangyue:'王越,东汉末年游侠(生卒年不详),乃辽东燕山人士,擅使剑术, 三国时期史阿的师父,曹丕的师公,官职虎贲将军。在史书《典论》中略有记载。', + liyàn:'李彦,号称"并州第一戟",是童渊的师兄。早年间两人在玉真子门下一起习武,后成年出师开枝散叶。同为并州人的吕布在得知李彦的名声后,投入其门下学习武艺。', + re_fazheng:'字孝直,本为刘璋部下,刘备围成都时劝说刘璋投降,而后又与刘备进取汉中,献计将曹操大将夏侯渊斩首。法正善奇谋,深受刘备信任和敬重。', + xin_guyong:'为蔡邕之徒。其为人少言语,不饮酒,严厉正大,被张纮推荐仕于孙权。孙权任命他为会稽郡丞,行太守事,后不断升迁,官至吴国丞相。顾雍为官,多进良言,有功于吴。', + zhaoe:'赵娥,东汉酒泉郡禄福县(即肃州)人。丈夫庞子夏,表氏县(今高台县)人。庞子夏去世后,赵娥在禄福县抚养其子庞淯。她的父亲被李寿杀死。灵帝光和二年(公元179年)二月上旬的一天早晨,赵娥在都亭前与李寿相遇,她奋力挥刀杀死了李寿,随后到了都亭尊长的面前认罪伏法。后来,凉州刺史周洪、酒泉太守刘班等人共同上表朝廷,禀奏赵娥的烈义行为,刻石立碑显其赵家门户。黄门侍郎梁宽还著书追述赵娥的事迹,为其作传。西晋政治家傅玄为其作《秦女休行》诗,加以赞美。', + xiahouzie:'夏侯紫萼,游卡桌游《三国杀阵面对决》中虚构的人物。幼年因天天帮病种的母亲采紫萼得其名。亲眼目睹母亲被宦官所杀,愤怒之下夺过佩剑斩下宦官的头颅。被神秘人所救,发现了自己的身世,决心与宦官争斗到底。后再闯荡江湖的过程中,与夏侯惇义结金兰,以夏侯家姓氏称呼。', + yangang:'严纲(163~191年),东汉末年公孙瓒部下的冀州刺史。汉献帝初平二年(191年),袁绍与公孙瓒在界桥交战,严纲为袁绍部下麹义所斩。', + gongsunfan:'公孙范,辽西令支(今河北迁安)人。东汉末年武将,公孙瓒从弟,官至勃海太守。公孙瓒起兵攻打袁绍之时,袁绍畏惧公孙瓒的势力,将自己的勃海太守印绶给予公孙范,意图和解,结果公孙范反而起勃海之兵帮助公孙瓒。初平二年(191年),公孙范以勃海兵助公孙瓒率二万人大破青、徐黄巾军。最后于界桥之战与公孙瓒一同败走。', + zhangzhao:'张昭(156年-236年),字子布。徐州彭城县(今江苏省徐州市)人。汉末三国时期孙吴政权重臣。东汉末年,张昭为避战乱而南渡至扬州。孙策创业时,任命其为长史、抚军中郎将,将文武之事都委任于张昭。孙策临终前,将其弟孙权托付给张昭,张昭率群僚辅立孙权,并安抚百姓、讨伐叛军,与周瑜等辅助孙权稳定局势。孙权每次出征,常留张昭镇守后方,领幕府事,并敬称他为“张公”。赤壁之战时,张昭鉴于曹操势大,持主降论,从而被排挤出军政决策中心。孙权代理车骑将军时,任命张昭为军师。孙权被封为吴王后,任绥远将军,封由拳侯。此后曾参与撰定朝仪。孙权两次要设立丞相时,众人都推举张昭,孙权以张昭敢于直谏、性格刚直为由而不用他,先后用孙邵、顾雍。黄龙元年(229年),孙权称帝,张昭以年老多病为由,上还官位及所统领部属,改拜辅吴将军、班亚三司,改封娄侯。晚年时一度不参与政事,在家著书,即使偶有参加朝议,也常与孙权产生激烈冲突。嘉禾五年(236年),张昭去世,享年八十一岁,谥号“文”。张昭容貌严正,敢于直言谏诤,一生以忠于孙氏基业为任,但因其与孙权在个性、军政策略等方面的深层矛盾,使其以“入宫则拜孤,出宫则拜君”的地位,却终身不得任丞相。著有《春秋左氏传解》及《论语注》,今皆佚失。', + zhanghong:'张纮(153年~212年),字子纲,徐州广陵(江苏省扬州市广陵区人)人。东汉末年文学家、官员,和张昭一起合称“二张”。曾被大将军何进、太尉朱儁、司空荀爽辟为掾属,皆不就,避难江东。孙策平定江东前,亲自多次登门邀请,张纮出仕为官。孙权即位时,建议孙权迁都秣陵。建安十七年(212年),病逝,时年六十岁,孙权为之流涕。', }, - card: { - dz_mantianguohai: { - fullskin: true, - type: 'trick', - enable: true, - derivation: 'tw_dongzhao', - global: ['dz_mantianguohai'], - selectTarget: [1, 2], - filterTarget: function (card, player, target) { - return target != player && target.countCards('hej') > 0; + card:{ + dz_mantianguohai:{ + fullskin:true, + type:'trick', + enable:true, + derivation:'tw_dongzhao', + global:['dz_mantianguohai'], + selectTarget:[1,2], + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('hej')>0; }, - content: function () { - player.gainPlayerCard(target, 'hej', true); + content:function(){ + player.gainPlayerCard(target,'hej',true); }, - contentAfter: function () { + contentAfter:function(){ 'step 0' - var evtx = event.getParent(); - event.targets = targets.filter(function (target) { - return target.hasHistory('lose', function (evt) { - return evt.getParent(3).name == 'dz_mantianguohai' && evt.getParent(4) == evtx; + var evtx=event.getParent(); + event.targets=targets.filter(function(target){ + return target.hasHistory('lose',function(evt){ + return evt.getParent(3).name=='dz_mantianguohai'&&evt.getParent(4)==evtx; }); }); - if (!event.targets.length || !player.countCards('he')) event.finish(); + if(!event.targets.length||!player.countCards('he')) event.finish(); 'step 1' - var target = targets.shift(); - event.target = target; - var next = player.chooseCard('he', true, '交给' + get.translation(target) + '一张牌'); - if (player.hasSkill('twyingjia') && player.countUsed('dz_mantianguohai') == 1) next.set('ai', function (card) { - if (card.name == 'dz_mantianguohai') return -10; - return -get.value(card, _status.event.getParent().target); + var target=targets.shift(); + event.target=target; + var next=player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌'); + if(player.hasSkill('twyingjia')&&player.countUsed('dz_mantianguohai')==1) next.set('ai',function(card){ + if(card.name=='dz_mantianguohai') return -10; + return -get.value(card,_status.event.getParent().target); }); 'step 2' - if (result.bool) { - player.give(result.cards, target); + if(result.bool){ + player.give(result.cards,target); } 'step 3' - if (targets.length && player.countCards('h') > 0) event.goto(1); + if(targets.length&&player.countCards('h')>0) event.goto(1); }, - ai: { - order: 6, - tag: { - lose: 1, - loseCard: 1, + ai:{ + order:6, + tag:{ + lose:1, + loseCard:1, }, - result: { - target: -0.1, + result:{ + target:-0.1, }, }, }, - gx_lingbaoxianhu: { - fullskin: true, - type: 'equip', - subtype: 'equip1', - derivation: 'tw_gexuan', - distance: { attackFrom: -2 }, - ai: { - basic: { - equipValue: 4.5, + gx_lingbaoxianhu:{ + fullskin:true, + type:'equip', + subtype:'equip1', + derivation:'tw_gexuan', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:4.5, } }, - skills: ['gx_lingbaoxianhu'] + skills:['gx_lingbaoxianhu'] }, - gx_taijifuchen: { - fullskin: true, - type: 'equip', - subtype: 'equip1', - derivation: 'tw_gexuan', - distance: { attackFrom: -4 }, - ai: { - basic: { - equipValue: 4.5, + gx_taijifuchen:{ + fullskin:true, + type:'equip', + subtype:'equip1', + derivation:'tw_gexuan', + distance:{attackFrom:-4}, + ai:{ + basic:{ + equipValue:4.5, } }, - skills: ['gx_taijifuchen'] + skills:['gx_taijifuchen'] }, - gx_chongyingshenfu: { - fullskin: true, - type: 'equip', - subtype: 'equip2', - derivation: 'tw_gexuan', - ai: { - basic: { - equipValue: 7, + gx_chongyingshenfu:{ + fullskin:true, + type:'equip', + subtype:'equip2', + derivation:'tw_gexuan', + ai:{ + basic:{ + equipValue:7, } }, - skills: ['gx_chongyingshenfu'], - loseDelay: false, + skills:['gx_chongyingshenfu'], + loseDelay:false, }, - meiyingqiang: { - fullskin: true, - type: 'equip', - subtype: 'equip1', - cardimage: 'yinyueqiang', - derivation: 'tw_zhaoxiang', - distance: { attackFrom: -2 }, - ai: { - basic: { - equipValue: 4.5, + meiyingqiang:{ + fullskin:true, + type:'equip', + subtype:'equip1', + cardimage:'yinyueqiang', + derivation:'tw_zhaoxiang', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:4.5, } }, - skills: ['meiyingqiang'], + skills:['meiyingqiang'], }, }, - characterFilter: { - nashime: function (mode) { - return mode != 'guozhan'; + characterFilter:{ + nashime:function(mode){ + return mode!='guozhan'; }, - tw_xiahouba: function (mode) { - return mode != 'guozhan'; + tw_xiahouba:function(mode){ + return mode!='guozhan'; }, }, - skill: { + skill:{ //玉真子 - twhuajing: { - audio: 2, - getSkills(player) { - return player.getCards('e', card => get.subtype(card) == 'equip1').reduce((list, card) => { - const info = get.info(card); - if (info && info.skills) return list.addArray(info.skills); + twhuajing:{ + audio:2, + getSkills(player){ + return player.getCards('e',card=>get.subtype(card)=='equip1').reduce((list,card)=>{ + const info=get.info(card); + if(info&&info.skills) return list.addArray(info.skills); return list; - }, []); + },[]); }, - trigger: { global: 'phaseBefore', player: 'enterGame' }, - filter(event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + trigger:{global:'phaseBefore',player:'enterGame'}, + filter(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - locked: false, - async content(event, trigger, player) { - const skills = lib.skill.twhuajing.derivation; - for (const eff of skills) { - player.addMark(eff, 1); + forced:true, + locked:false, + async content(event,trigger,player){ + const skills=lib.skill.twhuajing.derivation; + for(const eff of skills){ + player.addMark(eff,1); player.unmarkSkill(eff); } player.markSkill('twhuajing'); }, - global: 'twhuajing_global', - group: 'twhuajing_use', - derivation: ['twhuajing_jian', 'twhuajing_dao', 'twhuajing_fu', 'twhuajing_qiang', 'twhuajing_ji', 'twhuajing_gong'], - marktext: '武', - intro: { - markcount(storage, player) { - return lib.skill.twhuajing.derivation.filter(skill => player.hasMark(skill)).length; + global:'twhuajing_global', + group:'twhuajing_use', + derivation:['twhuajing_jian','twhuajing_dao','twhuajing_fu','twhuajing_qiang','twhuajing_ji','twhuajing_gong'], + marktext:'武', + intro:{ + markcount(storage,player){ + return lib.skill.twhuajing.derivation.filter(skill=>player.hasMark(skill)).length; }, - content(storage, player) { - const skills = lib.skill.twhuajing.derivation.filter(skill => player.hasMark(skill)); - if (!skills.length) return '功力已消耗殆尽'; - let str = '当前武功:'; - for (const eff of skills) { - str += '
  • '; - str += lib.translate[eff]; - str += ':'; - str += lib.translate[eff + '_info']; + content(storage,player){ + const skills=lib.skill.twhuajing.derivation.filter(skill=>player.hasMark(skill)); + if(!skills.length) return '功力已消耗殆尽'; + let str='当前武功:'; + for(const eff of skills){ + str+='
  • '; + str+=lib.translate[eff]; + str+=':'; + str+=lib.translate[eff+'_info']; } return str; }, }, - subSkill: { - global: { - mod: { - attackRange(player, num) { - const skills = lib.skill.twhuajing.derivation.filter(skill => player.hasMark(skill) || player.hasSkill(skill)); - if (skills.length) return num + skills.length * game.countPlayer(target => target.hasSkill('twhuajing')); + subSkill:{ + global:{ + mod:{ + attackRange(player,num){ + const skills=lib.skill.twhuajing.derivation.filter(skill=>player.hasMark(skill)||player.hasSkill(skill)); + if(skills.length) return num+skills.length*game.countPlayer(target=>target.hasSkill('twhuajing')); }, }, }, - use: { - audio: 'twhuajing', - enable: 'phaseUse', - filter(event, player) { - return lib.skill.twhuajing.derivation.some(skill => player.hasMark(skill)); + use:{ + audio:'twhuajing', + enable:'phaseUse', + filter(event,player){ + return lib.skill.twhuajing.derivation.some(skill=>player.hasMark(skill)); }, - filterCard: true, - selectCard: [1, 4], - position: 'h', - complexCard: true, - discard: false, - lose: false, - delay: false, - check(card) { - const player = get.event('player'), skills = lib.skill.twhuajing.derivation.filter(skill => player.hasMark(skill)); - if (ui.selected.cards.some(cardx => get.suit(cardx, player) == get.suit(card, player))) return 0; - return skills.length - ui.selected.cards.length; + filterCard:true, + selectCard:[1,4], + position:'h', + complexCard:true, + discard:false, + lose:false, + delay:false, + check(card){ + const player=get.event('player'),skills=lib.skill.twhuajing.derivation.filter(skill=>player.hasMark(skill)); + if(ui.selected.cards.some(cardx=>get.suit(cardx,player)==get.suit(card,player))) return 0; + return skills.length-ui.selected.cards.length; }, - usable: 1, - prompt: '展示至多四张手牌,然后根据这些牌含有的花色数于本回合获得等量你拥有的“武”标记的效果', - async content(event, trigger, player) { - await player.showCards(event.cards, get.translation(player) + '发动了【化境】'); - const skills = lib.skill.twhuajing.derivation.filter(skill => player.hasMark(skill)); - const gainSkills = skills.randomGets(Math.min(skills.length, event.cards.reduce((list, cardx) => list.add(get.suit(cardx, player)), []).length)); - for (const eff of gainSkills) player.popup(eff); + usable:1, + prompt:'展示至多四张手牌,然后根据这些牌含有的花色数于本回合获得等量你拥有的“武”标记的效果', + async content(event,trigger,player){ + await player.showCards(event.cards,get.translation(player)+'发动了【化境】'); + const skills=lib.skill.twhuajing.derivation.filter(skill=>player.hasMark(skill)); + const gainSkills=skills.randomGets(Math.min(skills.length,event.cards.reduce((list,cardx)=>list.add(get.suit(cardx,player)),[]).length)); + for(const eff of gainSkills) player.popup(eff); player.addTempSkill(gainSkills); player.addTempSkill('twhuajing_blocker'); - player.getHistory('custom').push({ twhuajing_skills: gainSkills }); + player.getHistory('custom').push({twhuajing_skills:gainSkills}); }, }, - jian: { - charlotte: true, - mark: true, - marktext: '剑', - intro: { - name: '化境·剑', - name2: '剑', - markcount: () => 0, - content: () => lib.translate.twhuajing_jian_info, + jian:{ + charlotte:true, + mark:true, + marktext:'剑', + intro:{ + name:'化境·剑', + name2:'剑', + markcount:()=>0, + content:()=>lib.translate.twhuajing_jian_info, }, - nopop: true, - trigger: { player: 'useCardToPlayered' }, - filter(event, player) { - return event.card.name == 'sha' && event.target.countCards('he'); + nopop:true, + trigger:{player:'useCardToPlayered'}, + filter(event,player){ + return event.card.name=='sha'&&event.target.countCards('he'); }, - forced: true, - logTarget: 'target', - async content(event, trigger, player) { - const target = trigger.target; - const cards = target.getDiscardableCards(player, 'he'); - target.discard(cards.randomGets(Math.min(2, cards.length))).discarder = player; + forced:true, + logTarget:'target', + async content(event,trigger,player){ + const target=trigger.target; + const cards=target.getDiscardableCards(player,'he'); + target.discard(cards.randomGets(Math.min(2,cards.length))).discarder=player; }, }, - dao: { - charlotte: true, - mark: true, - marktext: '刀', - intro: { - name: '化境·刀', - name2: '刀', - markcount: () => 0, - content: () => lib.translate.twhuajing_dao_info, + dao:{ + charlotte:true, + mark:true, + marktext:'刀', + intro:{ + name:'化境·刀', + name2:'刀', + markcount:()=>0, + content:()=>lib.translate.twhuajing_dao_info, }, - nopop: true, - inherit: 'guding_skill', - equipSkill: false, + nopop:true, + inherit:'guding_skill', + equipSkill:false, }, - fu: { - charlotte: true, - mark: true, - marktext: '斧', - intro: { - name: '化境·斧', - name2: '斧', - markcount: () => 0, - content: () => lib.translate.twhuajing_fu_info, + fu:{ + charlotte:true, + mark:true, + marktext:'斧', + intro:{ + name:'化境·斧', + name2:'斧', + markcount:()=>0, + content:()=>lib.translate.twhuajing_fu_info, }, - nopop: true, - trigger: { player: 'shaMiss' }, - forced: true, - logTarget: 'target', - async content(event, trigger, player) { + nopop:true, + trigger:{player:'shaMiss'}, + forced:true, + logTarget:'target', + async content(event,trigger,player){ trigger.target.damage(); }, - ai: { - directHit_ai: true, - skillTagFilter(player, tag, arg) { - if (!arg || !arg.card || arg.card.name != 'sha' || !arg.baseDamage || arg.baseDamage <= 1) return false; + ai:{ + directHit_ai:true, + skillTagFilter(player,tag,arg){ + if(!arg||!arg.card||arg.card.name!='sha'||!arg.baseDamage||arg.baseDamage<=1) return false; return true; }, }, }, - qiang: { - charlotte: true, - mark: true, - marktext: '枪', - intro: { - name: '化境·枪', - name2: '枪', - markcount: () => 0, - content: () => lib.translate.twhuajing_qiang_info, + qiang:{ + charlotte:true, + mark:true, + marktext:'枪', + intro:{ + name:'化境·枪', + name2:'枪', + markcount:()=>0, + content:()=>lib.translate.twhuajing_qiang_info, }, - nopop: true, - trigger: { player: 'useCardAfter' }, - filter(event, player) { - return event.card.name == 'sha' && get.color(event.card) == 'black'; + nopop:true, + trigger:{player:'useCardAfter'}, + filter(event,player){ + return event.card.name=='sha'&&get.color(event.card)=='black'; }, - forced: true, - async content(event, trigger, player) { - const card = get.cardPile(card => card.name == 'shan'); - if (card) player.gain(card, 'gain2'); + forced:true, + async content(event,trigger,player){ + const card=get.cardPile(card=>card.name=='shan'); + if(card) player.gain(card,'gain2'); }, }, - ji: { - charlotte: true, - mark: true, - marktext: '戟', - intro: { - name: '化境·戟', - name2: '戟', - markcount: () => 0, - content: () => lib.translate.twhuajing_ji_info, + ji:{ + charlotte:true, + mark:true, + marktext:'戟', + intro:{ + name:'化境·戟', + name2:'戟', + markcount:()=>0, + content:()=>lib.translate.twhuajing_ji_info, }, - nopop: true, - trigger: { source: 'damageBegin3' }, - filter(event, player) { - return event.card && event.card.name == 'sha'; + nopop:true, + trigger:{source:'damageBegin3'}, + filter(event,player){ + return event.card&&event.card.name=='sha'; }, - forced: true, - async content(event, trigger, player) { + forced:true, + async content(event,trigger,player){ player.draw(trigger.num); }, }, - gong: { - charlotte: true, - mark: true, - marktext: '弓', - intro: { - name: '化境·弓', - name2: '弓', - markcount: () => 0, - content: () => lib.translate.twhuajing_gong_info, + gong:{ + charlotte:true, + mark:true, + marktext:'弓', + intro:{ + name:'化境·弓', + name2:'弓', + markcount:()=>0, + content:()=>lib.translate.twhuajing_gong_info, }, - nopop: true, - trigger: { source: 'damageSource' }, - filter(event, player) { - return event.card && event.card.name == 'sha' && event.player.countDiscardableCards(player, 'e'); + nopop:true, + trigger:{source:'damageSource'}, + filter(event,player){ + return event.card&&event.card.name=='sha'&&event.player.countDiscardableCards(player,'e'); }, - forced: true, - logTarget: 'player', - async content(event, trigger, player) { - trigger.player.discard(trigger.player.getDiscardableCards(player, 'e').randomGets(1)).discarder = player; + forced:true, + logTarget:'player', + async content(event,trigger,player){ + trigger.player.discard(trigger.player.getDiscardableCards(player,'e').randomGets(1)).discarder=player; }, }, - blocker: { - charlotte: true, - init(player, skill) { - player.disableSkill(skill, lib.skill.twhuajing.getSkills(player)); + blocker:{ + charlotte:true, + init(player,skill){ + player.disableSkill(skill,lib.skill.twhuajing.getSkills(player)); }, - onremove(player, skill) { + onremove(player,skill){ player.enableSkill(skill); }, - mod: { - attackRange(player, num) { - return num - player.getEquipRange(); + mod:{ + attackRange(player,num){ + return num-player.getEquipRange(); }, }, - trigger: { - player: 'loseAfter', - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter', 'phaseBefore'], + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','phaseBefore'], }, - filter(event, player) { - if (event.name == 'phase') return true; - if (event.name == 'equip' && event.player == player && get.subtype(event.card) == 'equip1') return true; - const evt = event.getl(player); - return evt && evt.player == player && evt.es && evt.es.some(card => get.subtype(card) == 'equip1'); + filter(event,player){ + if(event.name=='phase') return true; + if(event.name=='equip'&&event.player==player&&get.subtype(event.card)=='equip1') return true; + const evt=event.getl(player); + return evt&&evt.player==player&&evt.es&&evt.es.some(card=>get.subtype(card)=='equip1'); }, - forced: true, - popup: false, - firstDo: true, - async content(event, trigger, player) { + forced:true, + popup:false, + firstDo:true, + async content(event,trigger,player){ player.enableSkill('twhuajing_blocker'); - player.disableSkill('twhuajing_blocker', lib.skill.twhuajing.getSkills(player)); + player.disableSkill('twhuajing_blocker',lib.skill.twhuajing.getSkills(player)); }, - ai: { unequip_equip1: true }, + ai:{unequip_equip1:true}, }, }, }, - twtianshou: { - audio: 2, - trigger: { player: 'phaseEnd' }, - filter(event, player) { - return player.getHistory('sourceDamage', evt => { - return evt.card && evt.card.name == 'sha'; - }).length && player.getHistory('custom', evt => { + twtianshou:{ + audio:2, + trigger:{player:'phaseEnd'}, + filter(event,player){ + return player.getHistory('sourceDamage',evt=>{ + return evt.card&&evt.card.name=='sha'; + }).length&&player.getHistory('custom',evt=>{ return evt.twhuajing_skills; - }).reduce((list, evt) => list.addArray(evt.twhuajing_skills), []).some(skill => player.hasMark(skill)); + }).reduce((list,evt)=>list.addArray(evt.twhuajing_skills),[]).some(skill=>player.hasMark(skill)); }, - forced: true, - async content(event, trigger, player) { - const { result: { bool, targets } } = await player.chooseTarget(lib.filter.notMe, true) - .set('prompt', '天授:令一名其他角色获得1枚“武”并获得此标记的效果') - .set('ai', target => { - const player = get.event('player'), att = get.attitude(player, target); - const card = new lib.element.VCard({ name: 'sha' }); - if (att > 0) return game.countPlayer(aim => { - return target.canUse(card, target) && get.effect(aim, card, target, player) > 0 && get.effect(aim, card, target, target) > 0; - }) + 10; - if (att == 0) return 1.5 + Math.random(); - return 0.1 + Math.random(); - }); - if (bool) { - const target = targets[0]; - const skills = player.getHistory('custom', evt => { + forced:true, + async content(event,trigger,player){ + const {result:{bool,targets}}=await player.chooseTarget(lib.filter.notMe,true) + .set('prompt','天授:令一名其他角色获得1枚“武”并获得此标记的效果') + .set('ai',target=>{ + const player=get.event('player'),att=get.attitude(player,target); + const card=new lib.element.VCard({name:'sha'}); + if(att>0) return game.countPlayer(aim=>{ + return target.canUse(card,target)&&get.effect(aim,card,target,player)>0&&get.effect(aim,card,target,target)>0; + })+10; + if(att==0) return 1.5+Math.random(); + return 0.1+Math.random(); + }); + if(bool){ + const target=targets[0]; + const skills=player.getHistory('custom',evt=>{ return evt.twhuajing_skills; - }).reduce((list, evt) => list.addArray(evt.twhuajing_skills), []).filter(skill => player.hasMark(skill)); - let choiceList = skills.map(i => { - return '
    【' + get.translation(lib.translate[i + '_ab'] || get.translation(i).slice(0, 2)) + '】
    ' + - '
    ' + get.skillInfoTranslation(i, player) + '
    '; + }).reduce((list,evt)=>list.addArray(evt.twhuajing_skills),[]).filter(skill=>player.hasMark(skill)); + let choiceList=skills.map(i=>{ + return '
    【'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'】
    ' + + '
    '+get.skillInfoTranslation(i,player)+'
    '; }); - const { result: { control } } = await player.chooseControl(skills) - .set('prompt', '选择令' + get.translation(target) + '获得的“武”') - .set('choiceList', choiceList).set('displayIndex', false).set('ai', () => get.event('controls').randomGet()); - if (control) { - player.removeMark(control, 1); + const {result:{control}}=await player.chooseControl(skills) + .set('prompt','选择令'+get.translation(target)+'获得的“武”') + .set('choiceList',choiceList).set('displayIndex',false).set('ai',()=>get.event('controls').randomGet()); + if(control){ + player.removeMark(control,1); player.markSkill('twhuajing'); - player.popup(control, 'metal'); - target.addTempSkill(control, { player: 'phaseAfter' }); - target.addTempSkill('twhuajing_blocker', { player: 'phaseAfter' }); - target.getHistory('custom').push({ twhuajing_skills: [control] }); + player.popup(control,'metal'); + target.addTempSkill(control,{player:'phaseAfter'}); + target.addTempSkill('twhuajing_blocker',{player:'phaseAfter'}); + target.getHistory('custom').push({twhuajing_skills:[control]}); await player.draw(); } } }, - ai: { combo: 'twhuajing' }, + ai:{combo:'twhuajing'}, }, //史阿 - twdengjian: { - audio: 2, - trigger: { global: 'phaseDiscardEnd' }, - filter(event, player) { - if (player.hasSkill('twdengjian_ban')) return false; - return event.player != player && lib.skill.twdengjian.getCards(player, event.player).length; + twdengjian:{ + audio:2, + trigger:{global:'phaseDiscardEnd'}, + filter(event,player){ + if(player.hasSkill('twdengjian_ban')) return false; + return event.player!=player&&lib.skill.twdengjian.getCards(player,event.player).length; }, - getCards(player, target) { - let cards = target.getHistory('useCard', evt => { - return evt.cards && evt.cards.filterInD('d').some(card => get.name(card, false) == 'sha') && target.getHistory('sourceDamage', evtx => { - return evtx.card && evtx.card == evt.card; + getCards(player,target){ + let cards=target.getHistory('useCard',evt=>{ + return evt.cards&&evt.cards.filterInD('d').some(card=>get.name(card,false)=='sha')&&target.getHistory('sourceDamage',evtx=>{ + return evtx.card&&evtx.card==evt.card; }).length; - }).reduce((list, evt) => list.addArray(evt.cards.filterInD('d').filter(card => get.name(card, false) == 'sha')), []); - if (cards.length) { - const history = player.actionHistory; - for (let i = history.length - 1; i >= 0; i--) { - for (let evt of history[i].gain) { - if (evt.getParent().name == 'twdengjian') { - const card = evt.cards[0]; - cards = cards.filter(cardx => get.color(cardx) != get.color(card)); - if (!cards.length) break; + }).reduce((list,evt)=>list.addArray(evt.cards.filterInD('d').filter(card=>get.name(card,false)=='sha')),[]); + if(cards.length){ + const history=player.actionHistory; + for(let i=history.length-1;i>=0;i--){ + for(let evt of history[i].gain){ + if(evt.getParent().name=='twdengjian'){ + const card=evt.cards[0]; + cards=cards.filter(cardx=>get.color(cardx)!=get.color(card)); + if(!cards.length) break; } } - if (history[i].isRound) break; + if(history[i].isRound) break; } } return cards; }, - direct: true, - async content(event, trigger, player) { - const cards = lib.skill.twdengjian.getCards(player, trigger.player); - const { result: { bool } } = await player.chooseToDiscard(get.prompt('twdengjian'), 'he') - .set('prompt2', '弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】') - .set('ai', card => 7 - get.value(card)) - .set('logSkill', 'twdengjian'); - if (bool) player.gain(cards.randomGet(), 'gain2').gaintag.add('twdengjianx'); + direct:true, + async content(event,trigger,player){ + const cards=lib.skill.twdengjian.getCards(player,trigger.player); + const {result:{bool}}=await player.chooseToDiscard(get.prompt('twdengjian'),'he') + .set('prompt2','弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】') + .set('ai',card=>7-get.value(card)) + .set('logSkill','twdengjian'); + if(bool) player.gain(cards.randomGet(),'gain2').gaintag.add('twdengjianx'); }, - group: 'twdengjian_buff', - subSkill: { - ban: { charlotte: true }, - buff: { - mod: { - aiOrder: function (player, card, num) { - if (get.itemtype(card) == 'card' && card.hasGaintag('twdengjianx')) return num + 0.1; + group:'twdengjian_buff', + subSkill:{ + ban:{charlotte:true}, + buff:{ + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('twdengjianx')) return num+0.1; }, }, - audio: 'twdengjian', - trigger: { player: 'useCard1' }, - filter(event, player) { - return event.cards && event.cards.length == 1 && player.getHistory('lose', evt => { - if (evt.getParent() != event) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twdengjianx')) return true; + audio:'twdengjian', + trigger:{player:'useCard1'}, + filter(event,player){ + return event.cards&&event.cards.length==1&&player.getHistory('lose',evt=>{ + if(evt.getParent()!=event) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twdengjianx')) return true; } return false; - }).length && event.addCount !== false; + }).length&&event.addCount!==false; }, - forced: true, - locked: false, - async content(event, trigger, player) { - trigger.addCount = false; - if (player.stat[player.stat.length - 1].card.sha > 0) player.stat[player.stat.length - 1].card.sha--; - game.log(trigger.card, '不计入次数限制'); + forced:true, + locked:false, + async content(event,trigger,player){ + trigger.addCount=false; + if(player.stat[player.stat.length-1].card.sha>0) player.stat[player.stat.length-1].card.sha--; + game.log(trigger.card,'不计入次数限制'); }, }, }, }, - twdengjianx: {}, - twxinshou: { - audio: 2, - trigger: { player: 'useCard' }, - filter(event, player) { - if (event.card.name != 'sha') return false; - const goon = (!player.getHistory('useCard', evt => { - return evt != event && evt.card.name == 'sha' && get.color(evt.card) == get.color(event.card); - }).length && player.isPhaseUsing()); - if (!player.hasSkill('twxinshou_0')) return goon; - if (!player.hasSkill('twxinshou_1')) return goon && game.hasPlayer(target => target != player); - return !player.hasSkill('twdengjian_ban') && game.hasPlayer(target => { - if (target == player) return false; - return !target.hasSkill('twdengjian', null, false, false); - }) && player.hasSkill('twdengjian', null, false, false); + twdengjianx:{}, + twxinshou:{ + audio:2, + trigger:{player:'useCard'}, + filter(event,player){ + if(event.card.name!='sha') return false; + const goon=(!player.getHistory('useCard',evt=>{ + return evt!=event&&evt.card.name=='sha'&&get.color(evt.card)==get.color(event.card); + }).length&&player.isPhaseUsing()); + if(!player.hasSkill('twxinshou_0')) return goon; + if(!player.hasSkill('twxinshou_1')) return goon&&game.hasPlayer(target=>target!=player); + return !player.hasSkill('twdengjian_ban')&&game.hasPlayer(target=>{ + if(target==player) return false; + return !target.hasSkill('twdengjian',null,false,false); + })&&player.hasSkill('twdengjian',null,false,false); }, - direct: true, - async content(event, trigger, player) { - if (player.hasSkill('twxinshou_0') && player.hasSkill('twxinshou_1')) { - const { result: { bool, targets } } = await player.chooseTarget((card, player, target) => { - return target != player && !target.hasSkill('twdengjian', null, false, false); - }).set('ai', target => { - const player = get.event('player'); - if (get.attitude(player, target) > 0) { - if (target.isTurnedOver()) return 0; - const card = new lib.element.VCard({ name: 'sha' }); - if (game.hasPlayer(aim => { - return target.canUse(card, target) && get.effect(aim, card, target, player) > 0 && get.effect(aim, card, target, target) > 0; - })) return target.countCards('h') - 3; + direct:true, + async content(event,trigger,player){ + if(player.hasSkill('twxinshou_0')&&player.hasSkill('twxinshou_1')){ + const {result:{bool,targets}}=await player.chooseTarget((card,player,target)=>{ + return target!=player&&!target.hasSkill('twdengjian',null,false,false); + }).set('ai',target=>{ + const player=get.event('player'); + if(get.attitude(player,target)>0){ + if(target.isTurnedOver()) return 0; + const card=new lib.element.VCard({name:'sha'}); + if(game.hasPlayer(aim=>{ + return target.canUse(card,target)&&get.effect(aim,card,target,player)>0&&get.effect(aim,card,target,target)>0; + })) return target.countCards('h')-3; return 0; } return 0; }) - .set('prompt', get.prompt('twxinshou')) - .set('prompt2', '令【登剑】失效并令一名其他角色获得【登剑】,你的下个回合开始时,其失去【登剑】,若其这期间使用【杀】造成过伤害,则你结束【登剑】的失效状态') - if (bool) { - const target = targets[0]; - player.logSkill('twxinshou', target); + .set('prompt',get.prompt('twxinshou')) + .set('prompt2','令【登剑】失效并令一名其他角色获得【登剑】,你的下个回合开始时,其失去【登剑】,若其这期间使用【杀】造成过伤害,则你结束【登剑】的失效状态') + if(bool){ + const target=targets[0]; + player.logSkill('twxinshou',target); player.addSkill('twdengjian_ban'); - target.addAdditionalSkill('twxinshou_' + player.playerid, 'twdengjian'); + target.addAdditionalSkill('twxinshou_'+player.playerid,'twdengjian'); player.popup('登剑'); target.popup('登剑'); - game.log(player, '将', '#g【登剑】', '传授给了', target); - game.log(player, '的', '#g【登剑】', '被失效了'); - player.when('phaseBegin').then(() => { - target.removeAdditionalSkill('twxinshou_' + player.playerid); - const history = game.getAllGlobalHistory('everything'); - for (let i = history.length - 1; i >= 0; i--) { - const evt = history[i]; - if (evt.name == 'damage' && evt.card && evt.source && evt.card.name == 'sha' && evt.source == target) { + game.log(player,'将','#g【登剑】','传授给了',target); + game.log(player,'的','#g【登剑】','被失效了'); + player.when('phaseBegin').then(()=>{ + target.removeAdditionalSkill('twxinshou_'+player.playerid); + const history=game.getAllGlobalHistory('everything'); + for(let i=history.length-1;i>=0;i--){ + const evt=history[i]; + if(evt.name=='damage'&&evt.card&&evt.source&&evt.card.name=='sha'&&evt.source==target){ player.popup('洗具'); player.removeSkill('twdengjian_ban'); - game.log(player, '结束了', '#g【登剑】', '的失效状态'); + game.log(player,'结束了','#g【登剑】','的失效状态'); return; } - if (evt == evtx) break; + if(evt==evtx) break; } player.popup('杯具'); - }).vars({ target: target, evtx: event }); + }).vars({target:target,evtx:event}); } } - else { - let choice = [], choiceList = ['摸一张牌', '交给一名其他角色一张牌',]; - if (!player.hasSkill('twxinshou_0')) choice.push('摸牌'); - else choiceList[0] = '' + choiceList[0] + ''; - if (!player.hasSkill('twxinshou_1') && game.hasPlayer(target => target != player)) choice.push('给牌'); - else choiceList[1] = '' + choiceList[1] + ''; - const { result: { control } } = await player.chooseControl(choice, 'cancel2') - .set('prompt', get.prompt('twxinshou')).set('choiceList', choiceList) - .set('ai', () => { - if (get.event('controls').includes('摸牌')) return '摸牌'; - const player = get.event('player'); - return (game.hasPlayer(target => { - if (target == player) return false; - if (player.countCards('he', card => card.name == 'du') && get.attitude(player, target) <= 0) return true; - if (player.countCards('he', card => get.value(card, player) < 0 && get.attitude(player, target) * get.value(card, target) > 0)) return true; - return get.attitude(player, target) > 0; - }) && get.event('controls').includes('给牌')) ? '给牌' : 'cancel2'; - }); - if (control == 'cancel2') return; + else{ + let choice=[],choiceList=['摸一张牌','交给一名其他角色一张牌',]; + if(!player.hasSkill('twxinshou_0')) choice.push('摸牌'); + else choiceList[0]=''+choiceList[0]+''; + if(!player.hasSkill('twxinshou_1')&&game.hasPlayer(target=>target!=player)) choice.push('给牌'); + else choiceList[1]=''+choiceList[1]+''; + const {result:{control}}=await player.chooseControl(choice,'cancel2') + .set('prompt',get.prompt('twxinshou')).set('choiceList',choiceList) + .set('ai',()=>{ + if(get.event('controls').includes('摸牌')) return '摸牌'; + const player=get.event('player'); + return (game.hasPlayer(target=>{ + if(target==player) return false; + if(player.countCards('he',card=>card.name=='du')&&get.attitude(player,target)<=0) return true; + if(player.countCards('he',card=>get.value(card,player)<0&&get.attitude(player,target)*get.value(card,target)>0)) return true; + return get.attitude(player,target)>0; + })&&get.event('controls').includes('给牌'))?'给牌':'cancel2'; + }); + if(control=='cancel2') return; player.logSkill('twxinshou'); - if (control == '摸牌') { + if(control=='摸牌'){ player.addTempSkill('twxinshou_0'); player.draw(); } - if (control == '给牌') { + if(control=='给牌'){ player.addTempSkill('twxinshou_1'); - const { result: { bool, targets } } = await player.chooseTarget('交给一名其他角色一张牌', lib.filter.notMe, true).set('ai', target => { - const player = get.event('player'), att = get.attitude(player, target); - if (player.countCards('he', card => card.name == 'du')) return -att; - let cards = player.getCards('he', card => get.value(card, player) < 0); - if (cards.length) { - cards.sort((a, b) => get.value(a, player) - get.value(b, player)); - return get.value(cards[0], target) * att; + const {result:{bool,targets}}=await player.chooseTarget('交给一名其他角色一张牌',lib.filter.notMe,true).set('ai',target=>{ + const player=get.event('player'),att=get.attitude(player,target); + if(player.countCards('he',card=>card.name=='du')) return -att; + let cards=player.getCards('he',card=>get.value(card,player)<0); + if(cards.length){ + cards.sort((a,b)=>get.value(a,player)-get.value(b,player)); + return get.value(cards[0],target)*att; } return att; }); - if (bool) { - const target = targets[0]; + if(bool){ + const target=targets[0]; player.line(target); - player.chooseToGive(target, 'he', true); + player.chooseToGive(target,'he',true); } } } }, - subSkill: { - '0': { charlotte: true }, - '1': { charlotte: true }, + subSkill:{ + '0':{charlotte:true}, + '1':{charlotte:true}, }, }, //石韬 - twjieqiu: { - audio: 2, - enable: 'phaseUse', - filter(event, player) { - return game.hasPlayer(target => lib.skill.twjieqiu.filterTarget(null, player, target)); + twjieqiu:{ + audio:2, + enable:'phaseUse', + filter(event,player){ + return game.hasPlayer(target=>lib.skill.twjieqiu.filterTarget(null,player,target)); }, - filterTarget(card, player, target) { - return target != player && !target.hasDisabledSlot(); + filterTarget(card,player,target){ + return target!=player&&!target.hasDisabledSlot(); }, - usable: 1, - async content(event, trigger, player) { - const target = event.target, num = target.countCards('e'); - let disables = []; - for (let i = 1; i <= 5; i++) { - for (let j = 0; j < target.countEnabledSlot(i); j++) { + usable:1, + async content(event,trigger,player){ + const target=event.target,num=target.countCards('e'); + let disables=[]; + for(let i=1;i<=5;i++){ + for(let j=0;j !p.hasDisabledSlot()) - .then(() => player.removeSkill('twjieqiu_buff')); + .filter((e,p)=>!p.hasDisabledSlot()) + .then(()=>player.removeSkill('twjieqiu_buff')); }, - ai: { - order: 7, - result: { - target(player, target) { - return -target.countCards('e') - (get.attitude(player, target) < 0 ? 1 : 0); + ai:{ + order:7, + result:{ + target(player,target){ + return -target.countCards('e')-(get.attitude(player,target)<0?1:0); }, }, }, - subSkill: { - used: { charlotte: true }, - buff: { - charlotte: true, - onremove: true, - trigger: { player: 'phaseDiscardEnd' }, - filter(event, player) { - return player.hasDisabledSlot() && event.cards && event.cards.length; + subSkill:{ + used:{charlotte:true}, + buff:{ + charlotte:true, + onremove:true, + trigger:{player:'phaseDiscardEnd'}, + filter(event,player){ + return player.hasDisabledSlot()&&event.cards&&event.cards.length; }, - forced: true, - popup: false, - async content(event, trigger, player) { - const num = trigger.cards.length; - let list = [], map = {}; - for (let i = 1; i < 6; i++) { - map[get.translation('equip' + i)] = ('equip' + i); - if (player.hasDisabledSlot(i)) { - for (let j = 0; j < player.countDisabledSlot(i); j++) { - list.push('equip' + i); + forced:true, + popup:false, + async content(event,trigger,player){ + const num=trigger.cards.length; + let list=[],map={}; + for(let i=1;i<6;i++){ + map[get.translation('equip'+i)]=('equip'+i); + if(player.hasDisabledSlot(i)){ + for(let j=0;j get.translation(i)); - const { result: { bool, links } } = await player.chooseButton([ + const transList=list.map(i=>get.translation(i)); + const {result:{bool,links}}=await player.chooseButton([ '劫囚:请选择你要恢复的装备栏', - [transList, 'tdnodes'], - ], num, true).set('map', map) - .set('ai', button => ['equip5', 'equip4', 'equip1', 'equip3', 'equip2'].indexOf(get.event('map')[button.link]) + 2); - if (bool) player.enableEquip(links.slice().map(i => map[i])); + [transList,'tdnodes'], + ],num,true).set('map',map) + .set('ai',button=>['equip5','equip4','equip1','equip3','equip2'].indexOf(get.event('map')[button.link])+2); + if(bool) player.enableEquip(links.slice().map(i=>map[i])); }, - group: ['twjieqiu_end'], + group:['twjieqiu_end'], }, - end: { - charlotte: true, - trigger: { player: 'phaseEnd' }, - filter(event, player) { - return player.hasDisabledSlot() && player.getStorage('twjieqiu_buff').some(target => { - return target.isIn() && !target.hasSkill('twjieqiu_used'); + end:{ + charlotte:true, + trigger:{player:'phaseEnd'}, + filter(event,player){ + return player.hasDisabledSlot()&&player.getStorage('twjieqiu_buff').some(target=>{ + return target.isIn()&&!target.hasSkill('twjieqiu_used'); }); }, - forced: true, - popup: false, - async content(event, trigger, player) { - const targets = player.getStorage('twjieqiu_buff').filter(target => { - return target.isIn() && !target.hasSkill('twjieqiu_used'); + forced:true, + popup:false, + async content(event,trigger,player){ + const targets=player.getStorage('twjieqiu_buff').filter(target=>{ + return target.isIn()&&!target.hasSkill('twjieqiu_used'); }).sortBySeat(); - for (const target of targets) { + for(const target of targets){ target.popup('劫囚'); - target.addTempSkill('twjieqiu_used', 'roundStart'); + target.addTempSkill('twjieqiu_used','roundStart'); target.insertPhase(); } }, }, }, }, - twenchou: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return game.hasPlayer(current => lib.skill.twenchou.filterTarget(null, player, current)); + twenchou:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(current=>lib.skill.twenchou.filterTarget(null,player,current)); }, - position: 'he', - filterTarget: function (card, player, target) { - return target != player && target.countCards('h') && target.hasDisabledSlot(); + position:'he', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')&&target.hasDisabledSlot(); }, - usable: 1, - async content(event, trigger, player) { - const target = event.target; - await player.gainPlayerCard(target, 'h', true, 'visible'); - let list = [], map = {}; - for (let i = 1; i < 6; i++) { - map[get.translation('equip' + i)] = ('equip' + i); - if (target.hasDisabledSlot(i)) { - list.push('equip' + i); + usable:1, + async content(event,trigger,player){ + const target=event.target; + await player.gainPlayerCard(target,'h',true,'visible'); + let list=[],map={}; + for(let i=1;i<6;i++){ + map[get.translation('equip'+i)]=('equip'+i); + if(target.hasDisabledSlot(i)){ + list.push('equip'+i); } } - const transList = list.map(i => get.translation(i)); - const { result: { bool, links } } = await player.chooseButton([ - '恩仇:请选择' + get.translation(target) + '要恢复的装备栏', - [transList, 'tdnodes'], - ], true).set('map', map) - .set('ai', button => 1 / (['equip5', 'equip4', 'equip1', 'equip3', 'equip2'].indexOf(get.event('map')[button.link]) + 2)); - if (bool) target.enableEquip(links.slice().map(i => map[i])); + const transList=list.map(i=>get.translation(i)); + const {result:{bool,links}}=await player.chooseButton([ + '恩仇:请选择'+get.translation(target)+'要恢复的装备栏', + [transList,'tdnodes'], + ],true).set('map',map) + .set('ai',button=>1/(['equip5','equip4','equip1','equip3','equip2'].indexOf(get.event('map')[button.link])+2)); + if(bool) target.enableEquip(links.slice().map(i=>map[i])); }, - ai: { - order: 9, - result: { target: -1 }, + ai:{ + order:9, + result:{target:-1}, }, }, //侠关羽 - twzhongyi: { - mod: { - targetInRange(card) { - if (card.name == 'sha') return true; + twzhongyi:{ + mod:{ + targetInRange(card){ + if(card.name=='sha') return true; }, }, - audio: 2, - trigger: { player: 'useCardAfter' }, - filter(event, player) { - if (event.card.name != 'sha') return false; - return player.getHistory('sourceDamage', evt => evt.card && evt.card == event.card).length; + audio:2, + trigger:{player:'useCardAfter'}, + filter(event,player){ + if(event.card.name!='sha') return false; + return player.getHistory('sourceDamage',evt=>evt.card&&evt.card==event.card).length; }, - forced: true, - async content(event, trigger, player) { - const num = player.getHistory('sourceDamage', evt => evt.card && evt.card == trigger.card).reduce((sum, evt) => sum + evt.num, 0); - const num2 = 1 + player.getAllHistory('custom', evt => evt.twzhongyi).length; - let choice = ['摸牌'], choiceList = ['摸' + get.cnNumber(num) + '张牌']; - if (player.isDamaged()) { - choice.addArray(['回血', '背水!']); + forced:true, + async content(event,trigger,player){ + const num=player.getHistory('sourceDamage',evt=>evt.card&&evt.card==trigger.card).reduce((sum,evt)=>sum+evt.num,0); + const num2=1+player.getAllHistory('custom',evt=>evt.twzhongyi).length; + let choice=['摸牌'],choiceList=['摸'+get.cnNumber(num)+'张牌']; + if(player.isDamaged()){ + choice.addArray(['回血','背水!']); choiceList.addArray([ - '回复' + num + '点体力', - '失去' + num2 + '点体力,依次执行以上所有项', + '回复'+num+'点体力', + '失去'+num2+'点体力,依次执行以上所有项', ]); } - const { result: { control } } = await player.chooseControl(choice) - .set('prompt', '忠义:请选择一项').set('choiceList', choiceList) - .set('ai', () => { - const player = get.event('player'); - const num = get.event('num'), num2 = get.event('num2'); - if (player.isHealthy()) return '摸牌'; - return (player.hp + player.countCards('hs', card => player.canSaveCard(card, player)) - num2 > 0 && num > num2) ? '背水!' : '回血'; - }).set('num', num).set('num2', num2); - if (control != 'cancel2') { - if (control == '背水!') { + const {result:{control}}=await player.chooseControl(choice) + .set('prompt','忠义:请选择一项').set('choiceList',choiceList) + .set('ai',()=>{ + const player=get.event('player'); + const num=get.event('num'),num2=get.event('num2'); + if(player.isHealthy()) return '摸牌'; + return (player.hp+player.countCards('hs',card=>player.canSaveCard(card,player))-num2>0&&num>num2)?'背水!':'回血'; + }).set('num',num).set('num2',num2); + if(control!='cancel2'){ + if(control=='背水!'){ await player.loseHp(num2); - player.getHistory('custom').push({ twzhongyi: true }); + player.getHistory('custom').push({twzhongyi:true}); } - if (control != '回血') await player.draw(num); - if (control != '摸牌') await player.recover(num); + if(control!='回血') await player.draw(num); + if(control!='摸牌') await player.recover(num); } }, }, - twchue: { - audio: 2, - trigger: { player: 'useCardToPlayer' }, - filter(event, player) { - return event.card.name == 'sha' && event.isFirstTarget && event.targets.length == 1 && game.hasPlayer(target => !event.targets.includes(target) && player.canUse(event.card, target)); + twchue:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + filter(event,player){ + return event.card.name=='sha'&&event.isFirstTarget&&event.targets.length==1&&game.hasPlayer(target=>!event.targets.includes(target)&&player.canUse(event.card,target)); }, - prompt2: '失去1点体力,额外指定至多等同于你体力值的目标', - check(event, player) { - return player.hp + player.countCards('hs', card => player.canSaveCard(card, player)) - 1 > 0; + prompt2:'失去1点体力,额外指定至多等同于你体力值的目标', + check(event,player){ + return player.hp+player.countCards('hs',card=>player.canSaveCard(card,player))-1>0; }, - async content(event, trigger, player) { + async content(event,trigger,player){ await player.loseHp(); - const targetx = trigger.targets.slice(), num = player.getHp(); - if (!num) return; - const { result: { bool, targets } } = await player.chooseTarget('额外指定至多' + get.cnNumber(num) + '名目标', [1, num], (card, player, target) => { - const trigger = _status.event.getTrigger(); - return !trigger.targets.includes(target) && player.canUse(trigger.card, target); - }).set('ai', target => { - const player = get.event('player'), trigger = _status.event.getTrigger(); - return get.effect(target, trigger.card, player, player); + const targetx=trigger.targets.slice(),num=player.getHp(); + if(!num) return; + const {result:{bool,targets}}=await player.chooseTarget('额外指定至多'+get.cnNumber(num)+'名目标',[1,num],(card,player,target)=>{ + const trigger=_status.event.getTrigger(); + return !trigger.targets.includes(target)&&player.canUse(trigger.card,target); + }).set('ai',target=>{ + const player=get.event('player'),trigger=_status.event.getTrigger(); + return get.effect(target,trigger.card,player,player); }); - if (!bool) return; + if(!bool) return; player.line(targets); trigger.targets.addArray(targets); }, - group: ['twchue_gain', 'twchue_effect'], - marktext: '勇', - intro: { - name: '勇', - content: 'mark', + group:['twchue_gain','twchue_effect'], + marktext:'勇', + intro:{ + name:'勇', + content:'mark', }, - subSkill: { - gain: { - audio: 'twchue', - trigger: { player: ['damageEnd', 'loseHpEnd'] }, - forced: true, - locked: false, - async content(event, trigger, player) { + subSkill:{ + gain:{ + audio:'twchue', + trigger:{player:['damageEnd','loseHpEnd']}, + forced:true, + locked:false, + async content(event,trigger,player){ await player.draw(); - player.addMark('twchue', 1); + player.addMark('twchue',1); }, }, - effect: { - audio: 'twchue', - trigger: { global: 'phaseEnd' }, - filter(event, player) { - const card = new lib.element.VCard({ name: 'sha' }); - return player.hasUseTarget(card) && player.getHistory('useSkill', evt => { - return evt.skill == 'twchue_gain'; - }).length && player.getHp() && player.countMark('twchue') >= player.getHp(); + effect:{ + audio:'twchue', + trigger:{global:'phaseEnd'}, + filter(event,player){ + const card=new lib.element.VCard({name:'sha'}); + return player.hasUseTarget(card)&&player.getHistory('useSkill',evt=>{ + return evt.skill=='twchue_gain'; + }).length&&player.getHp()&&player.countMark('twchue')>=player.getHp(); }, - check(event, player) { - return player.hasValueTarget(new lib.element.VCard({ name: 'sha' })); + check(event,player){ + return player.hasValueTarget(new lib.element.VCard({name:'sha'})); }, - prompt2(event, player) { - const num = player.getHp(); - return '失去' + num + '个“勇”标记,视为使用一张造成的伤害+1且可以额外指定' + num + '个目标的【杀】'; + prompt2(event,player){ + const num=player.getHp(); + return '失去'+num+'个“勇”标记,视为使用一张造成的伤害+1且可以额外指定'+num+'个目标的【杀】'; }, - async content(event, trigger, player) { - const num = player.getHp(); - player.removeMark('twchue', num); - const card = new lib.element.VCard({ name: 'sha' }); + async content(event,trigger,player){ + const num=player.getHp(); + player.removeMark('twchue',num); + const card=new lib.element.VCard({name:'sha'}); player.when('useCard2') - .filter(evt => evt.getParent(2) == event && game.hasPlayer(target => !evt.targets.includes(target) && player.canUse(evt.card, target))) - .assign({ - firstDo: true, - }) - .then(() => { - trigger.baseDamage++; - player.chooseTarget('额外指定至多' + get.cnNumber(num) + '名目标', [1, num], (card, player, target) => { - const trigger = _status.event.getTrigger(); - return !trigger.targets.includes(target) && player.canUse(trigger.card, target); - }).set('ai', target => { - const player = get.event('player'), trigger = _status.event.getTrigger(); - return get.effect(target, trigger.card, player, player); - }); - }) - .then(() => { - if (result.bool) { - const targets = result.targets; - player.line(targets); - trigger.targets.addArray(targets); - } - }).vars({ num: num }); - player.chooseUseTarget('视为使用造成的伤害+1且可以额外指定' + num + '个目标的【杀】', card, false, true); + .filter(evt=>evt.getParent(2)==event&&game.hasPlayer(target=>!evt.targets.includes(target)&&player.canUse(evt.card,target))) + .assign({ + firstDo:true, + }) + .then(()=>{ + trigger.baseDamage++; + player.chooseTarget('额外指定至多'+get.cnNumber(num)+'名目标',[1,num],(card,player,target)=>{ + const trigger=_status.event.getTrigger(); + return !trigger.targets.includes(target)&&player.canUse(trigger.card,target); + }).set('ai',target=>{ + const player=get.event('player'),trigger=_status.event.getTrigger(); + return get.effect(target,trigger.card,player,player); + }); + }) + .then(()=>{ + if(result.bool){ + const targets=result.targets; + player.line(targets); + trigger.targets.addArray(targets); + } + }).vars({num:num}); + player.chooseUseTarget('视为使用造成的伤害+1且可以额外指定'+num+'个目标的【杀】',card,false,true); }, }, }, }, //夏侯惇 - twdanlie: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return game.hasPlayer(target => player.canCompare(target)); + twdanlie:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(target=>player.canCompare(target)); }, - filterTarget: function (card, player, target) { + filterTarget:function(card,player,target){ return player.canCompare(target); }, - usable: 1, - selectTarget: [1, 3], - multitarget: true, - multiline: true, - group: 'twdanlie_add', - content: function () { + usable:1, + selectTarget:[1,3], + multitarget:true, + multiline:true, + group:'twdanlie_add', + content:function(){ 'step 0' player.chooseToCompare(targets).setContent('chooseToCompareMeanwhile'); 'step 1' - if (result.winner && result.winner == player) { + if(result.winner&&result.winner==player){ player.line(targets); - targets.forEach(target => target.damage()); + targets.forEach(target=>target.damage()); } else player.loseHp(); }, - ai: { - order: 10, - result: { - target: function (player, target) { - var att = get.attitude(player, target); - if (att >= 0) return 0; - if (player.getHp() > 2) return -get.damageEffect(target, player, player) - 10 / target.countCards('h'); - var hs = player.getCards('h').sort((a, b) => b.number - a.number); - var ts = target.getCards('h').sort((a, b) => b.number - a.number); - if (!hs.length || !ts.length) return 0; - if (Math.min(13, hs[0].number + player.getDamagedHp()) > ts[0].number) return -get.damageEffect(target, player, player); + ai:{ + order:10, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + if(att>=0) return 0; + if(player.getHp()>2) return -get.damageEffect(target,player,player)-10/target.countCards('h'); + var hs=player.getCards('h').sort((a,b)=>b.number-a.number); + var ts=target.getCards('h').sort((a,b)=>b.number-a.number); + if(!hs.length||!ts.length) return 0; + if(Math.min(13,hs[0].number+player.getDamagedHp())>ts[0].number) return -get.damageEffect(target,player,player); return 0; }, }, }, - subSkill: { - add: { - audio: 'twdanlie', - trigger: { player: 'compare', target: 'compare' }, - filter: function (event, player) { - if (!player.isDamaged()) return false; - if (player != event.target && event.iwhile) return false; + subSkill:{ + add:{ + audio:'twdanlie', + trigger:{player:'compare',target:'compare'}, + filter:function(event,player){ + if(!player.isDamaged()) return false; + if(player!=event.target&&event.iwhile) return false; return true; }, - forced: true, - locked: false, - content: function () { - var num = player.getDamagedHp(); - if (player == trigger.player) { - trigger.num1 += num; - if (trigger.num1 > 13) trigger.num1 = 13; + forced:true, + locked:false, + content:function(){ + var num=player.getDamagedHp(); + if(player==trigger.player){ + trigger.num1+=num; + if(trigger.num1>13) trigger.num1=13; } - else { - trigger.num2 += num; - if (trigger.num2 > 13) trigger.num2 = 13; + else{ + trigger.num2+=num; + if(trigger.num2>13) trigger.num2=13; } - game.log(player, '的拼点牌点数+', num); + game.log(player,'的拼点牌点数+',num); }, }, }, }, //张葳 - twhuzhong: { - audio: 2, - trigger: { player: 'useCardToPlayer' }, - filter: function (event, player) { - return event.card.name == 'sha' && !game.hasNature(event.card, 'linked') && event.targets.length == 1 && player.isPhaseUsing() && (game.hasPlayer(target => !event.targets.includes(target) && player.canUse(event.card, target)) || event.target.countCards('h') > 0); + twhuzhong:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + return event.card.name=='sha'&&!game.hasNature(event.card,'linked')&&event.targets.length==1&&player.isPhaseUsing()&&(game.hasPlayer(target=>!event.targets.includes(target)&&player.canUse(event.card,target))||event.target.countCards('h')>0); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var target = trigger.target; - event.target = target; - var list = ['cancel2']; - var choiceList = [ + var target=trigger.target; + event.target=target; + var list=['cancel2']; + var choiceList=[ '令此【杀】可以额外指定一个目标', - '弃置' + get.translation(target) + '一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】', + '弃置'+get.translation(target)+'一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】', ]; - if (target.countCards('h')) list.unshift('其弃置'); - else choiceList[1] = '' + choiceList[1] + ''; - if (game.hasPlayer(targetx => !trigger.targets.includes(targetx) && player.canUse(trigger.card, targetx))) list.unshift('多指'); - else choiceList[0] = '' + choiceList[0] + ''; - player.chooseControl(list).set('choiceList', choiceList).set('ai', () => { - var controls = _status.event.controls; - var trigger = _status.event.getTrigger(); - var player = trigger.player; - var target = trigger.target; - if (controls.includes('其弃置') && _status.event.goon) return '其弃置'; - if (controls.includes('多指')) { - if (game.hasPlayer(targetx => !trigger.targets.includes(targetx) && player.canUse(trigger.card, targetx) && get.effect(targetx, trigger.card, player, player) > 0)) return '你弃置'; + if(target.countCards('h')) list.unshift('其弃置'); + else choiceList[1]=''+choiceList[1]+''; + if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx))) list.unshift('多指'); + else choiceList[0]=''+choiceList[0]+''; + player.chooseControl(list).set('choiceList',choiceList).set('ai',()=>{ + var controls=_status.event.controls; + var trigger=_status.event.getTrigger(); + var player=trigger.player; + var target=trigger.target; + if(controls.includes('其弃置')&&_status.event.goon) return '其弃置'; + if(controls.includes('多指')){ + if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx)&&get.effect(targetx,trigger.card,player,player)>0)) return '你弃置'; } return 'cancel2'; - }).set('goon', function () { - var d1 = true; - if (player.hasSkill('jueqing') || player.hasSkill('gangzhi')) d1 = false; - if (!target.mayHaveShan(player, 'use', target.getCards('h', i => { + }).set('goon',function(){ + var d1=true; + if(player.hasSkill('jueqing')||player.hasSkill('gangzhi')) d1=false; + if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - })) || player.hasSkillTag('directHit_ai', true, { - target: target, - card: trigger.card, - }, true)) { - if (!target.hasSkill('gangzhi')) d1 = false; - if (!target.hasSkillTag('filterDamage', null, { - player: player, - card: trigger.card, - }) && get.attitude(player, target) < 0) return true; + }))||player.hasSkillTag('directHit_ai',true,{ + target:target, + card:trigger.card, + },true)){ + if(!target.hasSkill('gangzhi')) d1=false; + if(!target.hasSkillTag('filterDamage',null,{ + player:player, + card:trigger.card, + })&&get.attitude(player,target)<0) return true; } - if (d1) return get.damageEffect(player, player, player) > 0; + if(d1) return get.damageEffect(player,player,player)>0; return false; - }()).set('prompt', '护众:是否摸一张牌并执行其中一项?'); + }()).set('prompt','护众:是否摸一张牌并执行其中一项?'); 'step 1' - if (result.control != 'cancel2') { - player.logSkill('twhuzhong', target); + if(result.control!='cancel2'){ + player.logSkill('twhuzhong',target); player.draw(); - if (result.control == '其弃置') { - player.discardPlayerCard(target, 'h', true); - player.when('useCardAfter').filter(evt => evt == trigger.getParent()).then(() => { - if (player.getHistory('sourceDamage', evt => evt.card == trigger.card).length) { + if(result.control=='其弃置'){ + player.discardPlayerCard(target,'h',true); + player.when('useCardAfter').filter(evt=>evt==trigger.getParent()).then(()=>{ + if(player.getHistory('sourceDamage',evt=>evt.card==trigger.card).length){ player.draw(); - player.addTempSkill('twhuzhong_sha', 'phaseUseAfter'); - player.addMark('twhuzhong_sha', 1, false); + player.addTempSkill('twhuzhong_sha','phaseUseAfter'); + player.addMark('twhuzhong_sha',1,false); } }); event.finish(); @@ -1148,682 +1148,682 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } else event.finish(); 'step 2' - player.chooseTarget('请选择' + get.translation(trigger.card) + '的额外目标', function (card, player, target) { - var trigger = _status.event.getTrigger(); - return !trigger.targets.includes(target) && player.canUse(trigger.card, target); - }).set('ai', function (target) { - var player = _status.event.player; - var trigger = _status.event.getTrigger(); - return get.effect(target, trigger.card, player, player); + player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',function(card,player,target){ + var trigger=_status.event.getTrigger(); + return !trigger.targets.includes(target)&&player.canUse(trigger.card,target); + }).set('ai',function(target){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + return get.effect(target,trigger.card,player,player); }); 'step 3' - if (result.bool) { + if(result.bool){ player.line(result.targets); trigger.getParent().targets.addArray(result.targets); - game.log(result.targets, '成为了', trigger.card, '的额外目标'); + game.log(result.targets,'成为了',trigger.card,'的额外目标'); } }, - subSkill: { - sha: { - charlotte: true, - onremove: true, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + player.countMark('twhuzhong_sha'); + subSkill:{ + sha:{ + charlotte:true, + onremove:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('twhuzhong_sha'); }, }, } } }, - twfenwang: { - audio: 2, - trigger: { source: 'damageBegin2', player: 'damageBegin4' }, - filter: function (event, player, name) { - if (name == 'damageBegin2') { - return !event.hasNature() && player.countCards('h') >= event.player.countCards('h'); + twfenwang:{ + audio:2, + trigger:{source:'damageBegin2',player:'damageBegin4'}, + filter:function(event,player,name){ + if(name=='damageBegin2'){ + return !event.hasNature()&&player.countCards('h')>=event.player.countCards('h'); } return event.hasNature(); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - if (event.triggername == 'damageBegin2') { + if(event.triggername=='damageBegin2'){ player.line(trigger.player); trigger.num++; event.finish(); } - else player.chooseToDiscard('h', '弃置一张手牌,或令此伤害+1').set('ai', function (card) { - return 8 - get.value(card); + else player.chooseToDiscard('h','弃置一张手牌,或令此伤害+1').set('ai',function(card){ + return 8-get.value(card); }); 'step 1' - if (!result.bool) trigger.num++; + if(!result.bool) trigger.num++; }, }, //夏侯子萼 //差点和夏侯紫萼搞混 - twchengxi: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return game.hasPlayer(target => lib.skill.twchengxi.filterTarget(null, player, target)); + twchengxi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(target=>lib.skill.twchengxi.filterTarget(null,player,target)); }, - filterTarget: function (card, player, target) { - if (player.getStorage('twchengxi_used').includes(target) || target == player) return false; - return !player.hasSkillTag('noCompareSource') && target.countCards('h') > 0 && !target.hasSkillTag('noCompareTarget'); + filterTarget:function(card,player,target){ + if(player.getStorage('twchengxi_used').includes(target)||target==player) return false; + return !player.hasSkillTag('noCompareSource')&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget'); }, - content: function () { + content:function(){ 'step 0' - if (!player.storage.twchengxi_used) { - player.when('phaseUseAfter').then(() => delete player.storage.twchengxi_used); + if(!player.storage.twchengxi_used){ + player.when('phaseUseAfter').then(()=>delete player.storage.twchengxi_used); } - player.markAuto('twchengxi_used', [target]); + player.markAuto('twchengxi_used',[target]); player.draw(); 'step 1' - if (player.canCompare(target)) player.chooseToCompare(target); + if(player.canCompare(target)) player.chooseToCompare(target); else event.finish(); 'step 2' - if (result.bool) { + if(result.bool){ player.addSkill('twchengxi_effect'); } - else { - var card = { name: 'sha', isCard: true }; - if (target.canUse(card, player, false)) target.useCard(card, player, false); + else{ + var card={name:'sha',isCard:true}; + if(target.canUse(card,player,false)) target.useCard(card,player,false); } }, - ai: { - order: 8, - result: { - target: function (player, target) { - if (player.hasSkill('twchengxi_effect')) return 0; - var hs = player.getCards('h').sort((a, b) => b.number - a.number); - var ts = target.getCards('h').sort((a, b) => b.number - a.number); - if (!hs.length || !ts.length) return 0; - if (hs[0].number > ts[0].number) return -3; - if (!target.canUse({ name: 'sha', isCard: true }, player, false)) return -1; + ai:{ + order:8, + result:{ + target:function(player,target){ + if(player.hasSkill('twchengxi_effect')) return 0; + var hs=player.getCards('h').sort((a,b)=>b.number-a.number); + var ts=target.getCards('h').sort((a,b)=>b.number-a.number); + if(!hs.length||!ts.length) return 0; + if(hs[0].number>ts[0].number) return -3; + if(!target.canUse({name:'sha',isCard:true},player,false)) return -1; return 0; }, }, }, - subSkill: { - effect: { - charlotte: true, - trigger: { player: 'useCard1' }, - filter: function (event, player) { - return get.type(event.card) == 'basic' || get.type(event.card) == 'trick'; + subSkill:{ + effect:{ + charlotte:true, + trigger:{player:'useCard1'}, + filter:function(event,player){ + return get.type(event.card)=='basic'||get.type(event.card)=='trick'; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ player.removeSkill('twchengxi_effect'); - player.when('useCardAfter').filter(evt => evt == trigger).then(() => { - if (trigger.targets) { - var card = { - name: trigger.card.name, - isCard: true, + player.when('useCardAfter').filter(evt=>evt==trigger).then(()=>{ + if(trigger.targets){ + var card={ + name:trigger.card.name, + isCard:true, }; - var targets = trigger.targets.filter(i => i.isIn() && player.canUse(card, i, false)); - if (targets.length) player.useCard(card, targets, false); + var targets=trigger.targets.filter(i=>i.isIn()&&player.canUse(card,i,false)); + if(targets.length) player.useCard(card,targets,false); } }); }, - mark: true, - marktext: '袭', - intro: { content: '使用的下一张基本牌或非延时锦囊牌结算完毕后视为对相同目标再使用一张无次数限制的同名牌' }, + mark:true, + marktext:'袭', + intro:{content:'使用的下一张基本牌或非延时锦囊牌结算完毕后视为对相同目标再使用一张无次数限制的同名牌'}, }, }, }, //侠刘备 - twshenyi: { - audio: 2, - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - if (!event.player.isIn()) return false; - if (event.player.getHistory('damage').indexOf(event) != 0) return false; - return event.player == player || player.inRange(event.player); + twshenyi:{ + audio:2, + trigger:{global:'damageEnd'}, + filter:function(event,player){ + if(!event.player.isIn()) return false; + if(event.player.getHistory('damage').indexOf(event)!=0) return false; + return event.player==player||player.inRange(event.player); }, - usable: 1, - direct: true, - content: function* (event, map) { - var player = map.player, trigger = map.trigger; - var list = get.inpileVCardList(info => { - return ['basic', 'trick', 'delay'].includes(info[0]) && !player.getStorage('twshenyi').includes(info[2]); + usable:1, + direct:true, + content:function*(event,map){ + var player=map.player,trigger=map.trigger; + var list=get.inpileVCardList(info=>{ + return ['basic','trick','delay'].includes(info[0])&&!player.getStorage('twshenyi').includes(info[2]); }); - var dialog = [`###${get.prompt('twshenyi', trigger.player)}###
    从牌堆中将一张牌作为“侠义”置于武将牌上${player != trigger.player && player.countCards('h') ? ',然后将任意张手牌交给其' : ''}
    `, [list, 'vcard']]; - var result = yield player.chooseButton(dialog).set('ai', function (button) { - var trigger = _status.event.getTrigger(); - var player = _status.event.player, name = button.link[2]; - if (!get.cardPile2(card => card.name == name)) return 0; - var value = get.value({ name: name }); - if (['tao', 'jiu', 'caochuan', 'wuxie'].includes(name) && get.event().getRand() > 0.4) return value * 2; + var dialog=[`###${get.prompt('twshenyi',trigger.player)}###
    从牌堆中将一张牌作为“侠义”置于武将牌上${player!=trigger.player&&player.countCards('h')?',然后将任意张手牌交给其':''}
    `,[list,'vcard']]; + var result=yield player.chooseButton(dialog).set('ai',function(button){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player,name=button.link[2]; + if(!get.cardPile2(card=>card.name==name)) return 0; + var value=get.value({name:name}); + if(['tao','jiu','caochuan','wuxie'].includes(name)&&get.event().getRand()>0.4) return value*2; return value; }); - if (result.bool) { - var name = result.links[0][2], nature = result.links[0][3]; - var cardx = { name: name, nature: nature }; - player.logSkill('twshenyi', trigger.player); + if(result.bool){ + var name=result.links[0][2],nature=result.links[0][3]; + var cardx={name:name,nature:nature}; + player.logSkill('twshenyi',trigger.player); player.popup(cardx); - player.markAuto('twshenyi', [name]); - game.log(player, '声明了', `#y${get.translation(cardx)}`); - var card = get.cardPile2(card => get.name(card, false) == name && get.nature(card, false) == nature); - if (card) player.addToExpansion([card], 'gain2').gaintag.add('twshenyi'); - else { - var card = get.cardPile2(card => get.type2(card) == get.type2(name)); - if (card) player.addToExpansion([card], 'gain2').gaintag.add('twshenyi'); + player.markAuto('twshenyi',[name]); + game.log(player,'声明了',`#y${get.translation(cardx)}`); + var card=get.cardPile2(card=>get.name(card,false)==name&&get.nature(card,false)==nature); + if(card) player.addToExpansion([card],'gain2').gaintag.add('twshenyi'); + else{ + var card=get.cardPile2(card=>get.type2(card)==get.type2(name)); + if(card) player.addToExpansion([card],'gain2').gaintag.add('twshenyi'); else player.chat('无牌可得?!'); } - if (trigger.player != player && player.countCards('h')) { + if(trigger.player!=player&&player.countCards('h')){ game.delayex(); - var skill = 'twshenyi_' + player.playerid; - game.broadcastAll(lib.skill.twshenyi.createGainTag, skill, player.name); - game.addVideo('skill', player, ['twshenyi', [skill, player.name]]); - var result2 = yield player.chooseCard('伸义:是否将任意张牌交给' + get.translation(trigger.player) + '?', [1, player.countCards('h')]).set('ai', card => { - if (!_status.event.goon) return 0; - return 7 - get.value(card); - }).set('goon', get.attitude(player, trigger.player) > 0); - if (result2.bool) { - player.give(result2.cards, trigger.player).gaintag.add(skill); + var skill='twshenyi_'+player.playerid; + game.broadcastAll(lib.skill.twshenyi.createGainTag,skill,player.name); + game.addVideo('skill',player,['twshenyi',[skill,player.name]]); + var result2=yield player.chooseCard('伸义:是否将任意张牌交给'+get.translation(trigger.player)+'?',[1,player.countCards('h')]).set('ai',card=>{ + if(!_status.event.goon) return 0; + return 7-get.value(card); + }).set('goon',get.attitude(player,trigger.player)>0); + if(result2.bool){ + player.give(result2.cards,trigger.player).gaintag.add(skill); player.addSkill('twshenyi_draw'); } } } else player.storage.counttrigger.twshenyi--; }, - video: (player, info) => lib.skill.twshenyi.createGainTag(info[0], info[1]), - createGainTag: function (skill, name) { - if (!lib.skill[skill]) { - lib.skill[skill] = { charlotte: true }; - lib.translate[skill] = '义·' + get.translation(name); + video:(player,info)=>lib.skill.twshenyi.createGainTag(info[0],info[1]), + createGainTag:function(skill,name){ + if(!lib.skill[skill]){ + lib.skill[skill]={charlotte:true}; + lib.translate[skill]='义·'+get.translation(name); } - if (!_status.postReconnect.twshenyi) { - _status.postReconnect.twshenyi = [ - lib.skill.twshenyi.createGainTag, [], [] + if(!_status.postReconnect.twshenyi){ + _status.postReconnect.twshenyi=[ + lib.skill.twshenyi.createGainTag,[],[] ]; } _status.postReconnect.twshenyi[1].add(skill); _status.postReconnect.twshenyi[2].add(name); }, - marktext: '义', - intro: { - name: '侠义', - content: 'expansion', - markcount: 'expansion', + marktext:'义', + intro:{ + name:'侠义', + content:'expansion', + markcount:'expansion', }, - onremove: function (player, skill) { + onremove:function(player,skill){ delete player.storage[skill]; //var cards=player.getExpansions(skill); //if(cards.length) player.loseToDiscardpile(cards); }, - subSkill: { - draw: { - charlotte: true, - audio: 'twshenyi', - trigger: { - global: ['loseAfter', 'equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + subSkill:{ + draw:{ + charlotte:true, + audio:'twshenyi', + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - var skill = 'twshenyi_' + player.playerid; - return game.hasPlayer(target => { - var evt = event.getl(target); - if (!evt || !evt.hs || !evt.hs.length) return false; - for (let i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes(skill)) return true; + filter:function(event,player){ + var skill='twshenyi_'+player.playerid; + return game.hasPlayer(target=>{ + var evt=event.getl(target); + if(!evt||!evt.hs||!evt.hs.length) return false; + for(let i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes(skill)) return true; } return false; }); }, - forced: true, - direct: true, - content: function () { - var skill = 'twshenyi_' + player.playerid; - var num = 0; - var targets = game.filterPlayer(target => { - var evt = trigger.getl(target); - var numx = 0; - if (!evt || !evt.hs || !evt.hs.length) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes(skill)) numx++; + forced:true, + direct:true, + content:function(){ + var skill='twshenyi_'+player.playerid; + var num=0; + var targets=game.filterPlayer(target=>{ + var evt=trigger.getl(target); + var numx=0; + if(!evt||!evt.hs||!evt.hs.length) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes(skill)) numx++; } - if (numx > 0) return num += numx; + if(numx>0) return num+=numx; return false; }); - if (num > 0) { - player.logSkill('twshenyi_draw', targets); + if(num>0){ + player.logSkill('twshenyi_draw',targets); player.draw(num); } }, }, }, }, - twxinghan: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return player.getExpansions('twshenyi').length > game.countPlayer(); + twxinghan:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.getExpansions('twshenyi').length>game.countPlayer(); }, - check: function (event, player) { - if (player.hp >= 3 || (player.countCards('h') >= 4 && player.getExpansions('twshenyi').every(card => !player.hasValueTarget(card) || !get.tag(card, 'damage') || !lib.skill.xunshi.isXunshi(card)))) return false; - return player.getExpansions('twshenyi').some(card => player.hasValueTarget(card)); + check:function(event,player){ + if(player.hp>=3||(player.countCards('h')>=4&&player.getExpansions('twshenyi').every(card=>!player.hasValueTarget(card)||!get.tag(card,'damage')||!lib.skill.xunshi.isXunshi(card)))) return false; + return player.getExpansions('twshenyi').some(card=>player.hasValueTarget(card)); }, - direct: true, - content: function* (event, map) { - var player = map.player; - var result = yield player.chooseBool().set('createDialog', [ + direct:true, + content:function*(event,map){ + var player=map.player; + var result=yield player.chooseBool().set('createDialog',[ get.prompt('twxinghan'), `
    按顺序使用以下“侠义”牌。但是回合结束时你须弃置所有手牌并失去X点体力(X为你的体力值-1且X至少为1)
    `, - player.getExpansions('twshenyi').filter(card => player.hasUseTarget(card)).reverse(), + player.getExpansions('twshenyi').filter(card=>player.hasUseTarget(card)).reverse(), 'hidden', - ]).set('choice', lib.skill.twxinghan.check(null, player)); - if (!result.bool) { + ]).set('choice',lib.skill.twxinghan.check(null,player)); + if(!result.bool){ event.finish(); return; } - while (true) { - var cards = player.getExpansions('twshenyi').filter(card => player.hasUseTarget(card)).reverse(); - if (!cards.length) break; - yield player.chooseUseTarget(true, cards[0], false); + while(true){ + var cards=player.getExpansions('twshenyi').filter(card=>player.hasUseTarget(card)).reverse(); + if(!cards.length) break; + yield player.chooseUseTarget(true,cards[0],false); } - player.when('phaseEnd').then(() => { - if (player.countCards('h')) player.chooseToDiscard(player.countCards('h'), true); - var num = Math.max(1, player.getHp() - 1); + player.when('phaseEnd').then(()=>{ + if(player.countCards('h')) player.chooseToDiscard(player.countCards('h'),true); + var num=Math.max(1,player.getHp()-1); player.loseHp(num); }); }, - group: 'twxinghan_init', - subSkill: { - init: { - audio: 'twxinghan', - trigger: { - player: ['loseEnd', 'dying', 'phaseBefore', 'phaseAfter', 'dyingAfter', 'die'], - global: ['equipEnd', 'addJudgeEnd', 'gainEnd', 'loseAsyncEnd', 'addToExpansionEnd'], + group:'twxinghan_init', + subSkill:{ + init:{ + audio:'twxinghan', + trigger:{ + player:['loseEnd','dying','phaseBefore','phaseAfter','dyingAfter','die'], + global:['equipEnd','addJudgeEnd','gainEnd','loseAsyncEnd','addToExpansionEnd'], }, - filter: function (event, player) { - return (player.getExpansions('twshenyi').length && event.name != 'die' && (_status.currentPhase != player || player.isDying())) ^ player.hasSkill('twxinghan_in'); + filter:function(event,player){ + return (player.getExpansions('twshenyi').length&&event.name!='die'&&(_status.currentPhase!=player||player.isDying()))^player.hasSkill('twxinghan_in'); }, - forced: true, - firstDo: true, - silent: true, - forceDie: true, - content: function () { - if (player.getExpansions('twshenyi').length && trigger.name != 'die' && (_status.currentPhase != player || player.isDying())) { - var cards = player.getExpansions('twshenyi'); - var cardsx = cards.map(card => { - var cardx = ui.create.card(); + forced:true, + firstDo:true, + silent:true, + forceDie:true, + content:function(){ + if(player.getExpansions('twshenyi').length&&trigger.name!='die'&&(_status.currentPhase!=player||player.isDying())){ + var cards=player.getExpansions('twshenyi'); + var cardsx=cards.map(card=>{ + var cardx=ui.create.card(); cardx.init(get.cardInfo(card)); - cardx._cardid = card.cardid; + cardx._cardid=card.cardid; return cardx; }); - player.directgains(cardsx, null, 'twxinghan_tag'); + player.directgains(cardsx,null,'twxinghan_tag'); player.addSkill('twxinghan_in'); } else player.removeSkill('twxinghan_in'); }, }, - in: { - charlotte: true, - audio: 'twxinghan', - trigger: { player: 'addToExpansionEnd' }, - filter: function (event, player) { + in:{ + charlotte:true, + audio:'twxinghan', + trigger:{player:'addToExpansionEnd'}, + filter:function(event,player){ return event.gaintag.includes('twshenyi'); }, - forced: true, - locked: false, - silent: true, - content: function () { + forced:true, + locked:false, + silent:true, + content:function(){ 'step 0' - var cards2 = player.getCards('s', card => card.hasGaintag('twxinghan_tag')); - if (player.isOnline2()) { - player.send(function (cards, player) { - cards.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); - }, cards2, player); + var cards2=player.getCards('s',card=>card.hasGaintag('twxinghan_tag')); + if(player.isOnline2()){ + player.send(function(cards,player){ + cards.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); + },cards2,player); } - cards2.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); + cards2.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); 'step 1' - var cards = player.getExpansions('twshenyi'); - var cardsx = cards.map(card => { - var cardx = ui.create.card(); + var cards=player.getExpansions('twshenyi'); + var cardsx=cards.map(card=>{ + var cardx=ui.create.card(); cardx.init(get.cardInfo(card)); - cardx._cardid = card.cardid; + cardx._cardid=card.cardid; return cardx; }); - player.directgains(cardsx, null, 'twxinghan_tag'); + player.directgains(cardsx,null,'twxinghan_tag'); }, - onremove: function (player) { - var cards2 = player.getCards('s', card => card.hasGaintag('twxinghan_tag')); - if (player.isOnline2()) { - player.send(function (cards, player) { - cards.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); - }, cards2, player); + onremove:function(player){ + var cards2=player.getCards('s',card=>card.hasGaintag('twxinghan_tag')); + if(player.isOnline2()){ + player.send(function(cards,player){ + cards.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); + },cards2,player); } - cards2.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); + cards2.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); }, - group: 'twxinghan_use', + group:'twxinghan_use', }, - use: { - charlotte: true, - trigger: { player: ['useCardBefore', 'respondBefore'] }, - filter: function (event, player) { - var cards = player.getCards('s', card => card.hasGaintag('twxinghan_tag') && card._cardid); - return event.cards && event.cards.some(card => { + use:{ + charlotte:true, + trigger:{player:['useCardBefore','respondBefore']}, + filter:function(event,player){ + var cards=player.getCards('s',card=>card.hasGaintag('twxinghan_tag')&&card._cardid); + return event.cards&&event.cards.some(card=>{ return cards.includes(card); }); }, - forced: true, - popup: false, - firstDo: true, - content: function () { - var idList = player.getCards('s', card => card.hasGaintag('twxinghan_tag')).map(i => i._cardid); - var cards = player.getExpansions('twshenyi'); - var cards2 = []; - for (var card of trigger.cards) { - var cardx = cards.find(cardx => cardx.cardid == card._cardid); - if (cardx) cards2.push(cardx); + forced:true, + popup:false, + firstDo:true, + content:function(){ + var idList=player.getCards('s',card=>card.hasGaintag('twxinghan_tag')).map(i=>i._cardid); + var cards=player.getExpansions('twshenyi'); + var cards2=[]; + for(var card of trigger.cards){ + var cardx=cards.find(cardx=>cardx.cardid==card._cardid); + if(cardx) cards2.push(cardx); } - var cards3 = trigger.cards.slice(); - trigger.cards = cards2; - trigger.card.cards = cards2; - if (player.isOnline2()) { - player.send(function (cards, player) { - cards.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); - }, cards3, player); + var cards3=trigger.cards.slice(); + trigger.cards=cards2; + trigger.card.cards=cards2; + if(player.isOnline2()){ + player.send(function(cards,player){ + cards.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); + },cards3,player); } - cards3.forEach(i => i.delete()); - if (player == game.me) ui.updatehl(); + cards3.forEach(i=>i.delete()); + if(player==game.me) ui.updatehl(); }, }, }, }, //张纮 - twquanqian: { - audio: 2, - sunbenSkill: true, - enable: 'phaseUse', - filter: function (event, player) { - return !player.hasSkill('twquanqian_sunben') && player.countCards('h') && game.countPlayer() > 1; + twquanqian:{ + audio:2, + sunbenSkill:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('twquanqian_sunben')&&player.countCards('h')&&game.countPlayer()>1; }, - filterCard: function (card, player) { - return !ui.selected.cards.some(cardx => get.suit(cardx, player) == get.suit(card, player)); + filterCard:function(card,player){ + return !ui.selected.cards.some(cardx=>get.suit(cardx,player)==get.suit(card,player)); }, - selectCard: [1, 4], - check: function (card) { - return 1 / (get.value(card) || 0.5); + selectCard:[1,4], + check:function(card){ + return 1/(get.value(card)||0.5); }, - position: 'h', - complexCard: true, - discard: false, - lose: false, - delay: false, - filterTarget: lib.filter.notMe, - usable: 1, - content: function () { + position:'h', + complexCard:true, + discard:false, + lose:false, + delay:false, + filterTarget:lib.filter.notMe, + usable:1, + content:function(){ 'step 0' player.addSkill('twquanqian_sunben'); - player.give(cards, target); - if (cards.length < 2) event.finish(); + player.give(cards,target); + if(cards.length<2) event.finish(); 'step 1' - var card = get.cardPile2(card => get.type(card) == 'equip'); - if (card) player.gain(card, 'gain2'); + var card=get.cardPile2(card=>get.type(card)=='equip'); + if(card) player.gain(card,'gain2'); 'step 2' - if (player.countCards('h') >= target.countCards('h')) { - if (target.countCards('h')) event._result = { index: 1 }; + if(player.countCards('h')>=target.countCards('h')){ + if(target.countCards('h')) event._result={index:1}; else event.finish(); } - else { - var str = get.translation(target); - player.chooseControl().set('choiceList', [ - '将手牌数摸至与' + str + '相同', - '观看' + str + '的手牌并获得其一种花色的所有手牌', - ]).set('ai', () => { - var player = _status.event.player; - var target = _status.event.target; - if (target.countCards('h') - player.countCards('h') > target.countCards('h') / 4 || get.attitude(player, target) > 0) return 0; + else{ + var str=get.translation(target); + player.chooseControl().set('choiceList',[ + '将手牌数摸至与'+str+'相同', + '观看'+str+'的手牌并获得其一种花色的所有手牌', + ]).set('ai',()=>{ + var player=_status.event.player; + var target=_status.event.target; + if(target.countCards('h')-player.countCards('h')>target.countCards('h')/4||get.attitude(player,target)>0) return 0; return 1; - }).set('target', target); + }).set('target',target); } 'step 3' - if (result.index == 0) { + if(result.index==0){ player.drawTo(target.countCards('h')); event.finish(); return; } - var list = []; - var dialog = ['劝迁:获得' + get.translation(target) + '一种花色的所有牌']; - for (var suit of lib.suit.concat('none')) { - if (target.countCards('h', { suit: suit })) { - dialog.push('
    ' + get.translation(suit + '2') + '牌
    '); - dialog.push(target.getCards('h', { suit: suit })); + var list=[]; + var dialog=['劝迁:获得'+get.translation(target)+'一种花色的所有牌']; + for(var suit of lib.suit.concat('none')){ + if(target.countCards('h',{suit:suit})){ + dialog.push('
    '+get.translation(suit+'2')+'牌
    '); + dialog.push(target.getCards('h',{suit:suit})); list.push(suit); } } - if (!list.length) { + if(!list.length){ event.finish(); return; } - player.chooseControl(list).set('dialog', dialog).set('ai', () => { + player.chooseControl(list).set('dialog',dialog).set('ai',()=>{ return _status.event.control; - }).set('control', (() => { - var getv = (cards) => cards.map(i => get.value(i)).reduce((p, c) => p + c, 0); - return list.sort((a, b) => { - return getv(target.getCards('h', { suit: b })) - getv(target.getCards('h', { suit: a })); + }).set('control',(()=>{ + var getv=(cards)=>cards.map(i=>get.value(i)).reduce((p,c)=>p+c,0); + return list.sort((a,b)=>{ + return getv(target.getCards('h',{suit:b}))-getv(target.getCards('h',{suit:a})); })[0]; })()); 'step 4' - if (result.control) player.gain(target.getCards('h', { suit: result.control }), target, 'give'); + if(result.control) player.gain(target.getCards('h',{suit:result.control}),target,'give'); }, - ai: { - order: 7, - result: { - target: function (player, target) { + ai:{ + order:7, + result:{ + target:function(player,target){ return target.countCards('h'); }, }, }, - subSkill: { - sunben: { - charlotte: true, - init: function (player) { - player.storage.twquanqian_sunben = 0; + subSkill:{ + sunben:{ + charlotte:true, + init:function(player){ + player.storage.twquanqian_sunben=0; }, - onremove: true, - mark: true, - intro: { - markcount: function (num) { - return (num || 0).toString(); + onremove:true, + mark:true, + intro:{ + markcount:function(num){ + return (num||0).toString(); }, - content: '弃牌进度:#/6', + content:'弃牌进度:#/6', }, - trigger: { - player: 'loseAfter', - global: 'loseAsyncAfter', + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', }, - filter: function (event, player) { - if (event.type != 'discard') return false; - var evt = event.getl(player); - return evt && evt.hs && evt.hs.length; + filter:function(event,player){ + if(event.type!='discard') return false; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length; }, - forced: true, - popup: false, - firstDo: true, - content: function () { + forced:true, + popup:false, + firstDo:true, + content:function(){ 'step 0' - player.addMark('twquanqian_sunben', trigger.getl(player).hs.length, false); + player.addMark('twquanqian_sunben',trigger.getl(player).hs.length,false); 'step 1' - if (player.countMark('twquanqian_sunben') >= 6) { + if(player.countMark('twquanqian_sunben')>=6){ player.removeSkill('twquanqian_sunben'); player.popup('劝迁'); - game.log(player, '恢复了技能', '#g【劝迁】'); + game.log(player,'恢复了技能','#g【劝迁】'); } }, }, }, }, - twrouke: { - audio: 2, - trigger: { - player: 'gainAfter', - global: 'loseAsyncAfter' + twrouke:{ + audio:2, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter' }, - filter: function (event, player) { - var evt = event.getParent('phaseDraw'); - if (evt && evt.player == player) return false; - return event.getg(player).length > 1; + filter:function(event,player){ + var evt=event.getParent('phaseDraw'); + if(evt&&evt.player==player) return false; + return event.getg(player).length>1; }, - forced: true, - content: function () { + forced:true, + content:function(){ player.draw(); }, }, //张昭 - twlijian: { - getCards: function (event) { - var cards = []; - game.countPlayer2(function (current) { - current.checkHistory('lose', function (evt) { - if (evt.position == ui.discardPile && evt.getParent('phaseDiscard') == event) cards.addArray(evt.cards); + twlijian:{ + getCards:function(event){ + var cards=[]; + game.countPlayer2(function(current){ + current.checkHistory('lose',function(evt){ + if(evt.position==ui.discardPile&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards); }) }); - game.checkGlobalHistory('cardMove', function (evt) { - if (evt.name == 'cardsDiscard' && evt.getParent('phaseDiscard') == event) cards.addArray(evt.cards); + game.checkGlobalHistory('cardMove',function(evt){ + if(evt.name=='cardsDiscard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards); }); return cards.filterInD('d'); }, - audio: 2, - sunbenSkill: true, - trigger: { global: 'phaseDiscardEnd' }, - filter: function (event, player) { - if (player.hasSkill('twlijian_sunben')) return false; - if (event.player != player && event.player.isIn()) { + audio:2, + sunbenSkill:true, + trigger:{global:'phaseDiscardEnd'}, + filter:function(event,player){ + if(player.hasSkill('twlijian_sunben')) return false; + if(event.player!=player&&event.player.isIn()){ return lib.skill.twlijian.getCards(event).length; } return false; }, - prompt2: () => '选择任意张本阶段进入弃牌堆的牌令其获得,然后你获得剩余的牌,若其获得的牌数大于你,则你可以对其造成1点伤害', - logTarget: 'player', - content: function () { + prompt2:()=>'选择任意张本阶段进入弃牌堆的牌令其获得,然后你获得剩余的牌,若其获得的牌数大于你,则你可以对其造成1点伤害', + logTarget:'player', + content:function(){ 'step 0' player.addSkill('twlijian_sunben'); - var cards = lib.skill.twlijian.getCards(trigger), target = trigger.player; - event.cards = cards; event.target = target; - player.chooseToMove('力荐:请分配' + get.translation(target) + '和你获得的牌', true).set('list', [ - [get.translation(target) + '获得的牌', cards], + var cards=lib.skill.twlijian.getCards(trigger),target=trigger.player; + event.cards=cards;event.target=target; + player.chooseToMove('力荐:请分配'+get.translation(target)+'和你获得的牌',true).set('list',[ + [get.translation(target)+'获得的牌',cards], ['你获得的牌'], - ]).set('processAI', function (list) { - var player = _status.event.player; - var target = _status.event.getTrigger().player; - var att = get.attitude(player, target); - var cards = _status.event.cards; - var cardx = cards.filter(card => card.name == 'du'); - var cardy = cards.removeArray(cardx); - switch (get.sgn(att)) { + ]).set('processAI',function(list){ + var player=_status.event.player; + var target=_status.event.getTrigger().player; + var att=get.attitude(player,target); + var cards=_status.event.cards; + var cardx=cards.filter(card=>card.name=='du'); + var cardy=cards.removeArray(cardx); + switch(get.sgn(att)){ case 1: - return [cards, []]; + return [cards,[]]; case 0: - return [cardx, cardy]; + return [cardx,cardy]; case -1: - var num = Math.ceil(cards.length / 2) + (cards.length % 2 == 0 ? 1 : 0); - if (num > 1 && player.hasSkill('twchungang')) num--; - if (get.damageEffect(target, player, player) <= 0 || num > 2 || cardx.length > cardy.length) return [cardx, cardy]; - var num2 = cardy.length - cardx.length; - num2 = Math.ceil(num2 / 2) + (num2 % 2 == 0 ? 1 : 0); - cardy.sort((a, b) => get.value(b) - get.value(a)); - cardx.addArray(cardy.slice(num, cardy.length)); - return [cardx, cardy.slice(0, num)]; + var num=Math.ceil(cards.length/2)+(cards.length%2==0?1:0); + if(num>1&&player.hasSkill('twchungang')) num--; + if(get.damageEffect(target,player,player)<=0||num>2||cardx.length>cardy.length) return [cardx,cardy]; + var num2=cardy.length-cardx.length; + num2=Math.ceil(num2/2)+(num2%2==0?1:0); + cardy.sort((a,b)=>get.value(b)-get.value(a)); + cardx.addArray(cardy.slice(num,cardy.length)); + return [cardx,cardy.slice(0,num)]; } - }).set('cards', cards); + }).set('cards',cards); 'step 1' - if (result.bool) { - target.gain(result.moved[0], 'gain2'); - player.gain(result.moved[1], 'gain2'); - if (result.moved[0].length > result.moved[1].length) { - player.chooseBool('是否对' + get.translation(target) + '造成1点伤害?').set('choice', get.damageEffect(target, player, player) > 0); + if(result.bool){ + target.gain(result.moved[0],'gain2'); + player.gain(result.moved[1],'gain2'); + if(result.moved[0].length>result.moved[1].length){ + player.chooseBool('是否对'+get.translation(target)+'造成1点伤害?').set('choice',get.damageEffect(target,player,player)>0); } else event.finish(); } else event.finish(); 'step 2' - if (result.bool) { + if(result.bool){ player.line(target); target.damage(); } }, - subSkill: { - sunben: { - charlotte: true, - init: function (player) { - player.storage.twlijian_sunben = 0; + subSkill:{ + sunben:{ + charlotte:true, + init:function(player){ + player.storage.twlijian_sunben=0; }, - onremove: true, - mark: true, - intro: { - markcount: function (num) { - return (num || 0).toString(); + onremove:true, + mark:true, + intro:{ + markcount:function(num){ + return (num||0).toString(); }, - content: '弃牌堆进入牌进度:#/8', + content:'弃牌堆进入牌进度:#/8', }, - trigger: { global: ['loseAfter', 'cardsDiscardAfter', 'loseAsyncAfter', 'equipAfter'] }, - filter: function (event, player) { - var cards = event.getd(); - if (!cards.length) return false; - var list = cards.slice(); - game.checkGlobalHistory('cardMove', function (evt) { - if (evt == event || evt.getParent() == event || (evt.name != 'lose' && evt.name != 'cardsDiscard')) return false; - if (evt.name == 'lose' && evt.position != ui.discardPile) return false; + trigger:{global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter']}, + filter:function(event,player){ + var cards=event.getd(); + if(!cards.length) return false; + var list=cards.slice(); + game.checkGlobalHistory('cardMove',function(evt){ + if(evt==event||evt.getParent()==event||(evt.name!='lose'&&evt.name!='cardsDiscard')) return false; + if(evt.name=='lose'&&evt.position!=ui.discardPile) return false; list.removeArray(evt.cards); - }, event); - return list.length > 0; + },event); + return list.length>0; }, - forced: true, - popup: false, - firstDo: true, - content: function () { + forced:true, + popup:false, + firstDo:true, + content:function(){ 'step 0' - var cards = trigger.getd().slice(); - game.checkGlobalHistory('cardMove', function (evt) { - if (evt == trigger || evt.getParent() == trigger || (evt.name != 'lose' && evt.name != 'cardsDiscard')) return false; - if (evt.name == 'lose' && evt.position != ui.discardPile) return false; + var cards=trigger.getd().slice(); + game.checkGlobalHistory('cardMove',function(evt){ + if(evt==trigger||evt.getParent()==trigger||(evt.name!='lose'&&evt.name!='cardsDiscard')) return false; + if(evt.name=='lose'&&evt.position!=ui.discardPile) return false; cards.removeArray(evt.cards); - }, trigger); - player.addMark('twlijian_sunben', cards.length, false); + },trigger); + player.addMark('twlijian_sunben',cards.length,false); 'step 1' - if (player.countMark('twlijian_sunben') >= 8) { + if(player.countMark('twlijian_sunben')>=8){ player.removeSkill('twlijian_sunben'); player.popup('力荐'); - game.log(player, '恢复了技能', '#g【力荐】'); + game.log(player,'恢复了技能','#g【力荐】'); } }, }, }, }, - twchungang: { - audio: 2, - trigger: { global: ['gainAfter', 'loseAsyncAfter'] }, - filter: function (event, player) { - var evt = event.getParent('phaseDraw'); - return game.hasPlayer(target => { - if (target == player || (evt && evt.player == target)) return false; - return event.getg(target).length > 1 && target.countCards('he'); + twchungang:{ + audio:2, + trigger:{global:['gainAfter','loseAsyncAfter']}, + filter:function(event,player){ + var evt=event.getParent('phaseDraw'); + return game.hasPlayer(target=>{ + if(target==player||(evt&&evt.player==target)) return false; + return event.getg(target).length>1&&target.countCards('he'); }); }, - forced: true, - logTarget: function (event, player) { - var evt = event.getParent('phaseDraw'); - return game.filterPlayer(target => { - if (target == player || evt && evt.player == target) return false; - return event.getg(target).length > 1 && target.countCards('he'); + forced:true, + logTarget:function(event,player){ + var evt=event.getParent('phaseDraw'); + return game.filterPlayer(target=>{ + if(target==player||evt&&evt.player==target) return false; + return event.getg(target).length>1&&target.countCards('he'); }); }, - content: function () { - for (var i of lib.skill.twchungang.logTarget(trigger, player)) { - i.chooseToDiscard('he', true); + content:function(){ + for(var i of lib.skill.twchungang.logTarget(trigger,player)){ + i.chooseToDiscard('he',true); } }, - ai: { + ai:{ //能和一技能有配合,但仍旧搅shi棍技能 - threaten: 3, + threaten:3, }, }, //海外主公技 @@ -1880,11 +1880,11 @@ game.import('character', function (lib, game, ui, get, ai, _status) { forceaudio: true, filter: function (event, player) { return player.countCards('e') && player.group == 'qun' && game.hasPlayer(function (target) { - return target != player && target.hasZhuSkill('twjuxiang', player) && player.countCards('e', card => target.hasEmptySlot(get.subtype(card)) || target.hasDisabledSlot(get.subtype(card))); + return target != player && target.hasZhuSkill('twjuxiang', player) && player.countCards('e',card=>target.hasEmptySlot(get.subtype(card))||target.hasDisabledSlot(get.subtype(card))); }); }, filterTarget: function (card, player, target) { - return target != player && target.hasZhuSkill('twjuxiang', player) && (target.hasEmptySlot(get.subtype(ui.selected.cards[0])) || target.hasDisabledSlot(get.subtype(ui.selected.cards[0]))); + return target != player && target.hasZhuSkill('twjuxiang', player) && (target.hasEmptySlot(get.subtype(ui.selected.cards[0]))||target.hasDisabledSlot(get.subtype(ui.selected.cards[0]))); }, filterCard: { type: 'equip' }, position: 'e', @@ -1977,145 +1977,145 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //刘协 - twzhuiting: { - unique: true, - zhuSkill: true, - audio: 2, - global: 'twzhuiting_global', - subSkill: { - global: { - hiddenWuxie: function (player, info) { - if (player.group != 'wei' && player.group != 'qun') return false; - const target = info.target, card = info.card; - if (!target || target == player || !target.hasZhuSkill('twzhuiting')) return false; - if (_status.connectMode && player.countCards('hs') > 0) return true; - const color = get.color(card, false); - if (color == 'none') return false; - return player.hasCard(card => get.color(card) == color, 'hes'); + twzhuiting:{ + unique:true, + zhuSkill:true, + audio:2, + global:'twzhuiting_global', + subSkill:{ + global:{ + hiddenWuxie:function(player,info){ + if(player.group!='wei'&&player.group!='qun') return false; + const target=info.target,card=info.card; + if(!target||target==player||!target.hasZhuSkill('twzhuiting')) return false; + if(_status.connectMode&&player.countCards('hs')>0) return true; + const color=get.color(card,false); + if(color=='none') return false; + return player.hasCard(card=>get.color(card)==color,'hes'); }, - audio: 'twzhuiting', - forceaudio: true, - enable: 'chooseToUse', - filter: function (event, player) { - if (event.type != 'wuxie' || player.group != 'wei' && player.group != 'qun') return false; - const info = event.info_map, target = info.target, card = info.card; - if (!target || target == player || !target.hasZhuSkill('twzhuiting')) return false; - const color = get.color(card, false); - if (color == 'none') return false; - return player.hasCard(card => get.color(card) == color, 'hes'); + audio:'twzhuiting', + forceaudio:true, + enable:'chooseToUse', + filter:function(event,player){ + if(event.type!='wuxie'||player.group!='wei'&&player.group!='qun') return false; + const info=event.info_map,target=info.target,card=info.card; + if(!target||target==player||!target.hasZhuSkill('twzhuiting')) return false; + const color=get.color(card,false); + if(color=='none') return false; + return player.hasCard(card=>get.color(card)==color,'hes'); }, - filterCard: function (card) { - const info = _status.event.info_map; - return info && get.color(card) == get.color(info.card, false); + filterCard:function(card){ + const info=_status.event.info_map; + return info&&get.color(card)==get.color(info.card,false); }, - viewAs: { name: 'wuxie' }, - position: 'hes', - prompt: function () { - const info = _status.event.info_map; - return '将一张' + get.translation(get.color(info.card)) + '牌当作【无懈可击】对' + get.translation(info.target) + '使用'; + viewAs:{name:'wuxie'}, + position:'hes', + prompt:function(){ + const info=_status.event.info_map; + return '将一张'+get.translation(get.color(info.card))+'牌当作【无懈可击】对'+get.translation(info.target)+'使用'; }, - check: function (card) { - return 8 - get.value(card); + check:function(card){ + return 8-get.value(card); }, }, }, }, //刘繇 - twniju: { - audio: 2, - zhuSkill: true, - trigger: { - global: 'compare', + twniju:{ + audio:2, + zhuSkill:true, + trigger:{ + global:'compare', }, - priority: 1, - filter(event, player) { - if (!player.hasZhuSkill('twniju')) return false; - if (event.iwhile || (event.target && event.compareMeanwhile)) return false; + priority:1, + filter(event,player){ + if(!player.hasZhuSkill('twniju')) return false; + if(event.iwhile||(event.target&&event.compareMeanwhile)) return false; return true; }, - direct: true, - async content(event, trigger, player) { - const num = game.countPlayer(current => current.group === 'qun'); - const dialog = [ + direct:true, + async content(event,trigger,player){ + const num=game.countPlayer(current=>current.group==='qun'); + const dialog=[ get.prompt('twniju'), `
    令一张拼点牌的点数+${num}或-${num}
    `, [[ - ['addNumber', '增加'], - ['subtractNumber', '减少'] - ], 'tdnodes'], + ['addNumber','增加'], + ['subtractNumber','减少'] + ],'tdnodes'], ]; - const lose_list = trigger.lose_list.slice().sort((a, b) => lib.sort.seat(a[0], b[0])); - dialog.push(`
    ${lose_list.map(list => { + const lose_list=trigger.lose_list.slice().sort((a,b)=>lib.sort.seat(a[0],b[0])); + dialog.push(`
    ${lose_list.map(list=>{ return get.translation(list[0]); }).join('  /  ')}
    `); - const cards = lose_list.map(list => list[1]).flat(); + const cards=lose_list.map(list=>list[1]).flat(); dialog.push(cards); - const result = await player.chooseButton(dialog, 2) - .set('filterButton', button => { - const type = typeof button.link; - if (ui.selected.buttons.length && type === typeof ui.selected.buttons[0].link) return false; + const result=await player.chooseButton(dialog,2) + .set('filterButton',button=>{ + const type=typeof button.link; + if(ui.selected.buttons.length&&type===typeof ui.selected.buttons[0].link) return false; return true; }) .forResult() - if (!result.bool) return; - const { links } = result; - if (typeof links[0] !== 'string') links.reverse(); - let [fn, card] = links; - const selectedPlayer = lose_list[cards.indexOf(card)][0]; - player.logSkill('twniju', selectedPlayer); + if(!result.bool) return; + const {links}=result; + if(typeof links[0]!=='string') links.reverse(); + let [fn,card]=links; + const selectedPlayer=lose_list[cards.indexOf(card)][0]; + player.logSkill('twniju',selectedPlayer); selectedPlayer.addTempSkill('twniju_change'); - if (!selectedPlayer.storage.twniju_change) selectedPlayer.storage.twniju_change = []; - selectedPlayer.storage.twniju_change.push([fn, num, card]); + if(!selectedPlayer.storage.twniju_change) selectedPlayer.storage.twniju_change=[]; + selectedPlayer.storage.twniju_change.push([fn,num,card]); player.when('chooseToCompareAfter') - .filter(evt => evt === trigger) + .filter(evt=>evt===trigger) .vars({ - toDraw: num, + toDraw:num, }) - .then(() => { - const num1 = trigger.result.num1, num2 = trigger.result.num2; - let bool = false; - if (typeof num1 === 'number' && typeof num2 === 'number') { - if (num1 === num2) { - bool = true; + .then(()=>{ + const num1=trigger.result.num1,num2=trigger.result.num2; + let bool=false; + if(typeof num1==='number'&&typeof num2==='number'){ + if(num1===num2){ + bool=true; } } - else { - const num1List = num1.toUniqued(); - const totalList = num1List.concat(num2).toUniqued(); - if (totalList.length < num1List.length + num2.length) { - bool = true; + else{ + const num1List=num1.toUniqued(); + const totalList=num1List.concat(num2).toUniqued(); + if(totalList.length { - const cards = Array.isArray(list[1]) ? list[1] : [list[1]]; - return list[0] === player && storage.some(s => cards.includes(s[2])); + subSkill:{ + change:{ + trigger:{global:'compare'}, + filter(event,player){ + const storage=player.getStorage('twniju_change'); + if(!storage.length) return false; + if((player!==event.player||event.iwhile)&&player!==event.target) return false; + return event.lose_list.some(list=>{ + const cards=Array.isArray(list[1])?list[1]:[list[1]]; + return list[0]===player&&storage.some(s=>cards.includes(s[2])); }); }, - charlotte: true, - forced: true, - silent: true, - async content(event, trigger, player) { - const [fn, num] = player.getStorage('twniju_change').find(s => { - return trigger.lose_list.some(list => { - const cards = Array.isArray(list[1]) ? list[1] : [list[1]]; - return list[0] === player && cards.includes(s[2]); + charlotte:true, + forced:true, + silent:true, + async content(event,trigger,player){ + const [fn,num]=player.getStorage('twniju_change').find(s=>{ + return trigger.lose_list.some(list=>{ + const cards=Array.isArray(list[1])?list[1]:[list[1]]; + return list[0]===player&&cards.includes(s[2]); }); }); - const numId = player === trigger.player ? 'num1' : 'num2'; - trigger[fn](numId, num); - if (trigger[numId] > 13) trigger[numId] = 13; - else if (trigger[numId] < 1) trigger[numId] = 1; - game.log(player, '的拼点牌点数', fn === 'addNumber' ? '+' : '-', num); + const numId=player===trigger.player?'num1':'num2'; + trigger[fn](numId,num); + if(trigger[numId]>13) trigger[numId]=13; + else if(trigger[numId]<1) trigger[numId]=1; + game.log(player,'的拼点牌点数',fn==='addNumber'?'+':'-',num); } }, }, @@ -2136,7 +2136,7 @@ game.import('character', function (lib, game, ui, get, ai, _status) { if (get.tag(card, 'damage') > 0 && target.storage.twchongwangx.includes(player)) return false; }, }, - locked: false, + locked:false, unique: true, onremove: true, global: 'twchongwang_global', @@ -2198,356 +2198,356 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //公孙范 - twhuiyuan: { - audio: 2, - trigger: { player: 'useCardAfter' }, - filter: function (event, player) { - var evt = event.getParent('phaseUse'); - if (!evt || evt.player != player) return false; - var type = get.type2(event.card); - return !player.hasHistory('gain', evtx => { - if (evtx.getParent('phaseUse') != evt) return false; - return evtx.cards.some(card => get.type2(card) == type); + twhuiyuan:{ + audio:2, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var type=get.type2(event.card); + return !player.hasHistory('gain',evtx=>{ + if(evtx.getParent('phaseUse')!=evt) return false; + return evtx.cards.some(card=>get.type2(card)==type); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var prompt2 = '展示一名角色的一张手牌。若展示牌为' + get.translation(get.type2(trigger.card)) + '牌,则你获得之,否则其弃置之并摸一张牌。然后若其在你的攻击范围内,且你不在其攻击范围内,你对其造成1点伤害'; - player.chooseTarget(get.prompt('twhuiyuan'), prompt2, (card, player, target) => { + var prompt2='展示一名角色的一张手牌。若展示牌为'+get.translation(get.type2(trigger.card))+'牌,则你获得之,否则其弃置之并摸一张牌。然后若其在你的攻击范围内,且你不在其攻击范围内,你对其造成1点伤害'; + player.chooseTarget(get.prompt('twhuiyuan'),prompt2,(card,player,target)=>{ return target.countCards('h'); - }).set('ai', target => { - var player = _status.event.player; - var att = get.attitude(player, target); - return -att + (player.inRange(target) && !target.inRange(player) ? get.damageEffect(target, player, player) / 3 : 0); + }).set('ai',target=>{ + var player=_status.event.player; + var att=get.attitude(player,target); + return -att+(player.inRange(target)&&!target.inRange(player)?get.damageEffect(target,player,player)/3:0); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twhuiyuan', target); - player.choosePlayerCard(target, 'h', true, '回援:展示' + get.translation(target) + '一张手牌'); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twhuiyuan',target); + player.choosePlayerCard(target,'h',true,'回援:展示'+get.translation(target)+'一张手牌'); } else event.finish(); 'step 2' - if (result.bool) { - var card = result.cards[0]; - target.showCards([card], get.translation(target) + '【回援】展示'); - if (get.type2(card) == get.type2(trigger.card)) { - if (lib.filter.canBeGained(card, target, player)) { - player.gain(card, target, 'giveAuto', 'bySelf'); + if(result.bool){ + var card=result.cards[0]; + target.showCards([card],get.translation(target)+'【回援】展示'); + if(get.type2(card)==get.type2(trigger.card)){ + if(lib.filter.canBeGained(card,target,player)){ + player.gain(card,target,'giveAuto','bySelf'); } } - else { - if (lib.filter.canBeDiscarded(card, target, player)) { - target.discard(card, 'notBySelf'); + else{ + if(lib.filter.canBeDiscarded(card,target,player)){ + target.discard(card,'notBySelf'); target.draw(); } } } else event.finish(); 'step 3' - if (player.inRange(target) && !target.inRange(player)) { - game.log(player, '触发了', '#y搏击', '效果'); + if(player.inRange(target)&&!target.inRange(player)){ + game.log(player,'触发了','#y搏击','效果'); player.line(target); target.damage(); } }, - ai: { - expose: 0.2, - threaten: 3, + ai:{ + expose:0.2, + threaten:3, } }, - twshoushou: { - audio: 2, - trigger: { - player: 'gainAfter', - global: 'loseAsyncAfter', + twshoushou:{ + audio:2, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', }, - filter: function (event, player) { - var cards = event.getg(player); - if (!cards.length) return false; - return game.hasPlayer(current => { + filter:function(event,player){ + var cards=event.getg(player); + if(!cards.length) return false; + return game.hasPlayer(current=>{ return event.getl(current).cards2.length; - }) && game.hasPlayer(current => { + })&&game.hasPlayer(current=>{ return current.inRange(player); }); }, - forced: true, - locked: false, - group: 'twshoushou_damage', - onremove: function (player) { - if (player.countMark('twshoushou_plus') - player.countMark('twshoushou_minus') == 0) { + forced:true, + locked:false, + group:'twshoushou_damage', + onremove:function(player){ + if(player.countMark('twshoushou_plus')-player.countMark('twshoushou_minus')==0){ player.removeSkill('twshoushou_distance'); } }, - content: function () { + content:function(){ player.addSkill('twshoushou_distance'); - player.addMark('twshoushou_plus', 1, false); + player.addMark('twshoushou_plus',1,false); }, - ai: { - halfneg: true, + ai:{ + halfneg:true, }, - subSkill: { - damage: { - trigger: { - player: 'damageEnd', - source: 'damageSource' + subSkill:{ + damage:{ + trigger:{ + player:'damageEnd', + source:'damageSource' }, - filter: function (event, player) { - return game.hasPlayer(current => { - return current != player && !current.inRange(player); + filter:function(event,player){ + return game.hasPlayer(current=>{ + return current!=player&&!current.inRange(player); }); }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ player.addSkill('twshoushou_distance'); - player.addMark('twshoushou_minus', 1, false); + player.addMark('twshoushou_minus',1,false); } }, - distance: { - mark: true, - marktext: '绶', - intro: { - markcount: function (storage, player) { - return player.countMark('twshoushou_plus') - player.countMark('twshoushou_minus'); + distance:{ + mark:true, + marktext:'绶', + intro:{ + markcount:function(storage,player){ + return player.countMark('twshoushou_plus')-player.countMark('twshoushou_minus'); }, - content: function (storage, player) { - var dis = player.countMark('twshoushou_plus') - player.countMark('twshoushou_minus'); - return '其他角色至你的距离' + (dis >= 0 ? '+' : '') + dis; + content:function(storage,player){ + var dis=player.countMark('twshoushou_plus')-player.countMark('twshoushou_minus'); + return '其他角色至你的距离'+(dis>=0?'+':'')+dis; } }, - mod: { - globalTo: function (from, to, distance) { - return distance + to.countMark('twshoushou_plus') - to.countMark('twshoushou_minus'); + mod:{ + globalTo:function(from,to,distance){ + return distance+to.countMark('twshoushou_plus')-to.countMark('twshoushou_minus'); } } } } }, //严纲 - twzhiqu: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - content: function () { + twzhiqu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ 'step 0' - var count = get.cnNumber(game.countPlayer(current => { - return get.distance(player, current) <= 1; + var count=get.cnNumber(game.countPlayer(current=>{ + return get.distance(player,current)<=1; })); - player.chooseTarget(get.prompt('twzhiqu'), '选择一名其他角色并视为使用牌堆顶' + count + '张牌中的【杀】。若你与其均在对方的攻击范围内,你改为依次对其使用牌堆顶' + count + '张牌中的【杀】或锦囊牌。', lib.filter.notMe).set('ai', target => { - var player = _status.event.player; - return get.effect(target, { name: 'sha' }, player, player) * (get.distance(player, target) == 1 ? 2 : 1); + player.chooseTarget(get.prompt('twzhiqu'),'选择一名其他角色并视为使用牌堆顶'+count+'张牌中的【杀】。若你与其均在对方的攻击范围内,你改为依次对其使用牌堆顶'+count+'张牌中的【杀】或锦囊牌。',lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player)*(get.distance(player,target)==1?2:1); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twzhiqu', target); - event.fight = player.inRange(target) && target.inRange(player); - if (event.fight) game.log(player, '触发了', '#y搏击', '效果'); - event.cards = game.cardsGotoOrdering(get.cards(game.countPlayer(current => { - return get.distance(player, current) <= 1; + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twzhiqu',target); + event.fight=player.inRange(target)&&target.inRange(player); + if(event.fight) game.log(player,'触发了','#y搏击','效果'); + event.cards=game.cardsGotoOrdering(get.cards(game.countPlayer(current=>{ + return get.distance(player,current)<=1; }))).cards.slice(); } else event.finish(); 'step 2' - if (player.isIn() && target.isIn() && cards.length) { - do var card = cards.shift(); - while (get.name(card) != 'sha' && (!event.fight || get.type2(card) != 'trick') && cards.length); - if (get.name(card) != 'sha' && (!event.fight || get.type2(card) != 'trick')) return; - player.showCards([card], get.translation(player) + '发动了【直取】'); - player.chooseUseTarget(card, true, false, 'nodistance').set('filterTarget', function (card, player, target) { - var evt = _status.event; - if (_status.event.name == 'chooseTarget') evt = evt.getParent(); - if (target != player && target != evt.twzhiqu_target) return false; - return lib.filter.targetEnabledx(card, player, target); - }).set('twzhiqu_target', target); + if(player.isIn()&&target.isIn()&&cards.length){ + do var card=cards.shift(); + while(get.name(card)!='sha'&&(!event.fight||get.type2(card)!='trick')&&cards.length); + if(get.name(card)!='sha'&&(!event.fight||get.type2(card)!='trick')) return; + player.showCards([card],get.translation(player)+'发动了【直取】'); + player.chooseUseTarget(card,true,false,'nodistance').set('filterTarget',function(card,player,target){ + var evt=_status.event; + if(_status.event.name=='chooseTarget') evt=evt.getParent(); + if(target!=player&&target!=evt.twzhiqu_target) return false; + return lib.filter.targetEnabledx(card,player,target); + }).set('twzhiqu_target',target); event.redo(); } } }, - twxianfeng: { - audio: 2, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - if (!player.isPhaseUsing()) return false; - if (player == event.player) return false; - if (!event.player.isIn()) return false; - if (!event.card) return false; - return event.card.name == 'sha' || get.type(event.card) == 'trick' && get.tag(event.card, 'damage'); + twxianfeng:{ + audio:2, + trigger:{source:'damageSource'}, + filter:function(event,player){ + if(!player.isPhaseUsing()) return false; + if(player==event.player) return false; + if(!event.player.isIn()) return false; + if(!event.card) return false; + return event.card.name=='sha'||get.type(event.card)=='trick'&&get.tag(event.card,'damage'); }, - logTarget: 'player', - check: function (event, player) { - let att = get.attitude(player, event.player); - if (att > 0) return true; - if (!player.hasSkill('twzhiqu')) return false; - let cnt = game.countPlayer(current => get.distance(player, current) === 2); - if (cnt > 2 || cnt === 2 && Math.abs(att) < 2 || cnt && Math.abs(att) < 1) return true; + logTarget:'player', + check:function(event,player){ + let att=get.attitude(player,event.player); + if(att>0) return true; + if(!player.hasSkill('twzhiqu')) return false; + let cnt=game.countPlayer(current=>get.distance(player,current)===2); + if(cnt>2||cnt===2&&Math.abs(att)<2||cnt&&Math.abs(att)<1) return true; return false; }, - content: function () { + content:function(){ 'step 0' - var target = trigger.player; - event.target = target; - target.chooseControl().set('choiceList', [ - '你摸一张牌,然后直到' + get.translation(player) + '下个回合开始时,其至其他角色的距离-1', - get.translation(player) + '摸一张牌,然后直到其下个回合开始时,你至其的距离-1', - ]).set('prompt', '先锋:请选择一项').set('ai', () => { + var target=trigger.player; + event.target=target; + target.chooseControl().set('choiceList',[ + '你摸一张牌,然后直到'+get.translation(player)+'下个回合开始时,其至其他角色的距离-1', + get.translation(player)+'摸一张牌,然后直到其下个回合开始时,你至其的距离-1', + ]).set('prompt','先锋:请选择一项').set('ai',()=>{ return _status.event.choice; - }).set('choice', function () { - var att = get.attitude(target, player); - if (att === 0) return 0; - if (player.hasSkill('twzhiqu')) { - var cnt = game.countPlayer(current => get.distance(player, current) === 2); - if (att > 0) { - if (cnt || player.needsToDiscard(1)) return 0; + }).set('choice',function(){ + var att=get.attitude(target,player); + if(att===0) return 0; + if(player.hasSkill('twzhiqu')){ + var cnt=game.countPlayer(current=>get.distance(player,current)===2); + if(att>0){ + if(cnt||player.needsToDiscard(1)) return 0; return 1; } - if (!cnt) return 0; - if (cnt >= 2 || get.distance(target, player, 'attack') === 2 || get.distance(target, player) === 2) return 1; + if(!cnt) return 0; + if(cnt>=2||get.distance(target,player,'attack')===2||get.distance(target,player)===2) return 1; return 0; } - if (att < 0 || player.needsToDiscard(1) && game.hasPlayer(function (current) { - return current !== player && current !== target && !player.inRange(current); + if(att<0||player.needsToDiscard(1)&&game.hasPlayer(function(current){ + return current!==player&¤t!==target&&!player.inRange(current); })) return 0; - return [0, 1].randomGet(); + return [0,1].randomGet(); }()); 'step 1' - if (result.index == 0) { + if(result.index==0){ target.draw(); - player.addTempSkill('twxianfeng_me', { player: 'phaseBegin' }); - player.addMark('twxianfeng_me', 1, false); + player.addTempSkill('twxianfeng_me',{player:'phaseBegin'}); + player.addMark('twxianfeng_me',1,false); } - else { + else{ player.draw(); target.addSkill('twxianfeng_others'); - if (!target.storage.twxianfeng_others) target.storage.twxianfeng_others = {}; - if (typeof target.storage.twxianfeng_others[player.playerid] != 'number') target.storage.twxianfeng_others[player.playerid] = 0; + if(!target.storage.twxianfeng_others) target.storage.twxianfeng_others={}; + if(typeof target.storage.twxianfeng_others[player.playerid]!='number') target.storage.twxianfeng_others[player.playerid]=0; target.storage.twxianfeng_others[player.playerid]++; } }, - subSkill: { - me: { - charlotte: true, - mark: true, - intro: { content: '至其他角色的距离-#' }, - mod: { - globalFrom: function (from, to, distance) { - return distance - from.countMark('twxianfeng_me'); + subSkill:{ + me:{ + charlotte:true, + mark:true, + intro:{content:'至其他角色的距离-#'}, + mod:{ + globalFrom:function(from,to,distance){ + return distance-from.countMark('twxianfeng_me'); } } }, - others: { - trigger: { global: ['phaseBegin', 'die'] }, - filter: function (event, player) { - return player.storage.twxianfeng_others && player.storage.twxianfeng_others[event.player.playerid]; + others:{ + trigger:{global:['phaseBegin','die']}, + filter:function(event,player){ + return player.storage.twxianfeng_others&&player.storage.twxianfeng_others[event.player.playerid]; }, - charlotte: true, - mark: true, - forced: true, - intro: { - markcount: function (storage, player) { - var max = 0; - for (var id in storage) { - if (storage[id] > max) max = storage[id]; + charlotte:true, + mark:true, + forced:true, + intro:{ + markcount:function(storage,player){ + var max=0; + for(var id in storage){ + if(storage[id]>max) max=storage[id]; } return max; }, - content: function (storage, player) { - if (!storage) return ''; - var str = ''; - var map = (_status.connectMode ? lib.playerOL : game.playerMap); - for (var id in storage) { - str += '至' + get.translation(map[id]) + '的距离-' + storage[id] + '、'; + content:function(storage,player){ + if(!storage) return ''; + var str=''; + var map=(_status.connectMode?lib.playerOL:game.playerMap); + for(var id in storage){ + str+='至'+get.translation(map[id])+'的距离-'+storage[id]+'、'; } - return str.slice(0, -1); + return str.slice(0,-1); }, }, - content: function () { + content:function(){ delete player.storage.twxianfeng_others[trigger.player.playerid]; - if (get.is.empty(player.storage.twxianfeng_others)) player.removeSkill('twxianfeng_others'); + if(get.is.empty(player.storage.twxianfeng_others)) player.removeSkill('twxianfeng_others'); }, - mod: { - globalFrom: function (from, to, distance) { - if (from.storage.twxianfeng_others && typeof from.storage.twxianfeng_others[to.playerid] == 'number') return distance - from.storage.twxianfeng_others[to.playerid]; + mod:{ + globalFrom:function(from,to,distance){ + if(from.storage.twxianfeng_others&&typeof from.storage.twxianfeng_others[to.playerid]=='number') return distance-from.storage.twxianfeng_others[to.playerid]; } } }, } }, //夏侯紫萼 - twxuechang: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { + twxuechang:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ return player.canCompare(target); }, - content: function () { + content:function(){ 'step 0' player.chooseToCompare(target); 'step 1' - if (result.bool) { - if (!target.countGainableCards(player, 'he')) event.finish(); - else player.gainPlayerCard(target, 'he', true); + if(result.bool){ + if(!target.countGainableCards(player,'he')) event.finish(); + else player.gainPlayerCard(target,'he',true); } - else { + else{ player.damage(target); player.addSkill('twxuechang_add'); - if (!player.storage.twxuechang_add) player.storage.twxuechang_add = {}; - if (!player.storage.twxuechang_add[target.playerid]) player.storage.twxuechang_add[target.playerid] = 0; + if(!player.storage.twxuechang_add) player.storage.twxuechang_add={}; + if(!player.storage.twxuechang_add[target.playerid]) player.storage.twxuechang_add[target.playerid]=0; player.storage.twxuechang_add[target.playerid]++; player.markSkill('twxuechang_add'); event.finish(); } 'step 2' - var card = result.cards[0]; - if (get.type(card) == 'equip') { - var card = { name: 'sha', isCard: true }; - if (player.canUse(card, target, false)) player.useCard(card, target, 'noai', false); + var card=result.cards[0]; + if(get.type(card)=='equip'){ + var card={name:'sha',isCard:true}; + if(player.canUse(card,target,false)) player.useCard(card,target,'noai',false); } }, - ai: { - order: 6.5, - result: { - target: function (player, target) { - var hs = player.getCards('h').sort(function (a, b) { - return get.number(b) - get.number(a); + ai:{ + order:6.5, + result:{ + target:function(player,target){ + var hs=player.getCards('h').sort(function(a,b){ + return get.number(b)-get.number(a); }); - var ts = target.getCards('h').sort(function (a, b) { - return get.number(b) - get.number(a); + var ts=target.getCards('h').sort(function(a,b){ + return get.number(b)-get.number(a); }); - if (!hs.length || !ts.length) return 0; - if (get.number(hs[0]) > get.number(ts[0]) || get.number(hs[0]) - ts.length >= (9 + Math.min(2, player.hp / 2))) return get.sgnAttitude(player, target) * get.effect(target, { name: 'shunshou_copy2' }, player, player); + if(!hs.length||!ts.length) return 0; + if(get.number(hs[0])>get.number(ts[0])||get.number(hs[0])-ts.length>=(9+Math.min(2,player.hp/2))) return get.sgnAttitude(player,target)*get.effect(target,{name:'shunshou_copy2'},player,player); return 0; } } }, - subSkill: { - add: { - audio: 'twxuechang', - trigger: { source: 'damageBegin1' }, - filter: function (event, player) { - return player.storage.twxuechang_add && player.storage.twxuechang_add[event.player.playerid]; + subSkill:{ + add:{ + audio:'twxuechang', + trigger:{source:'damageBegin1'}, + filter:function(event,player){ + return player.storage.twxuechang_add&&player.storage.twxuechang_add[event.player.playerid]; }, - forced: true, - charlotte: true, - content: function () { - trigger.num += player.storage.twxuechang_add[trigger.player.playerid]; + forced:true, + charlotte:true, + content:function(){ + trigger.num+=player.storage.twxuechang_add[trigger.player.playerid]; delete player.storage.twxuechang_add[trigger.player.playerid]; - if (get.is.empty(player.storage.twxuechang_add)) player.removeSkill('twxuechang_add'); + if(get.is.empty(player.storage.twxuechang_add)) player.removeSkill('twxuechang_add'); else player.markSkill('twxuechang_add'); }, - marktext: '偿', - intro: { - content: function (storage, player) { - if (!storage) return ''; - var str = ''; - var map = (_status.connectMode ? lib.playerOL : game.playerMap); - for (var i in storage) { - str += '
  • 下次对' + get.translation(map[i]) + '造成的伤害+' + storage[i]; + marktext:'偿', + intro:{ + content:function(storage,player){ + if(!storage) return ''; + var str=''; + var map=(_status.connectMode?lib.playerOL:game.playerMap); + for(var i in storage){ + str+='
  • 下次对'+get.translation(map[i])+'造成的伤害+'+storage[i]; } return str; } @@ -2555,68 +2555,68 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } }, - twduoren: { - audio: 2, - trigger: { source: 'dieAfter' }, - check: function (event, player) { - if (player.hp < 3 && !player.isDamaged()) return false; - var skills = event.player.getSkills(null, false, false).filter(skill => { - if (player.hasSkill(skill, null, false, false)) return false; - var info = get.info(skill); - return info && !info.hiddenSkill && !info.zhuSkill && !info.charlotte; + twduoren:{ + audio:2, + trigger:{source:'dieAfter'}, + check:function(event,player){ + if(player.hp<3&&!player.isDamaged()) return false; + var skills=event.player.getSkills(null,false,false).filter(skill=>{ + if(player.hasSkill(skill,null,false,false)) return false; + var info=get.info(skill); + return info&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte; }); - return skills.length > 0; + return skills.length>0; }, - group: 'twduoren_remove', - prompt2: function (event, player) { - var skills = event.player.getSkills(null, false, false).filter(skill => { - if (player.hasSkill(skill, null, false, false)) return false; - var info = get.info(skill); - return info && !info.hiddenSkill && !info.zhuSkill && !info.charlotte; + group:'twduoren_remove', + prompt2:function(event,player){ + var skills=event.player.getSkills(null,false,false).filter(skill=>{ + if(player.hasSkill(skill,null,false,false)) return false; + var info=get.info(skill); + return info&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte; }); - var str = ''; - for (var i of skills) { - str += '〖' + get.translation(i) + '〗、'; + var str=''; + for(var i of skills){ + str+='〖'+get.translation(i)+'〗、'; } - str = str.slice(0, str.length - 1); - return '减1点体力上限,然后' + (str.length ? '获得' + str : '听一句技能配音'); + str=str.slice(0,str.length-1); + return '减1点体力上限,然后'+(str.length?'获得'+str:'听一句技能配音'); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' player.loseMaxHp(); 'step 1' - var skills = trigger.player.getSkills(null, false, false).filter(skill => { - if (player.hasSkill(skill, null, false, false)) return false; - var info = get.info(skill); - return info && !info.hiddenSkill && !info.zhuSkill && !info.charlotte; + var skills=trigger.player.getSkills(null,false,false).filter(skill=>{ + if(player.hasSkill(skill,null,false,false)) return false; + var info=get.info(skill); + return info&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte; }); - if (skills.length) { + if(skills.length){ //for(var i of skills) player.addSkillLog(i); player.addSkills(skills); - player.markAuto('twduoren', skills); - game.broadcastAll(function (list) { + player.markAuto('twduoren',skills); + game.broadcastAll(function(list){ game.expandSkills(list); - for (var i of list) { - var info = lib.skill[i]; - if (!info) continue; - if (!info.audioname2) info.audioname2 = {}; - info.audioname2.xia_xiahouzie = 'twduoren'; + for(var i of list){ + var info=lib.skill[i]; + if(!info) continue; + if(!info.audioname2) info.audioname2={}; + info.audioname2.xia_xiahouzie='twduoren'; } - }, skills); + },skills); } }, - subSkill: { - remove: { - trigger: { source: 'dying' }, - filter: function (event, player) { - return event.player != player && player.getStorage('twduoren').some(skill => { - return player.hasSkill(skill, null, false, false); + subSkill:{ + remove:{ + trigger:{source:'dying'}, + filter:function(event,player){ + return event.player!=player&&player.getStorage('twduoren').some(skill=>{ + return player.hasSkill(skill,null,false,false); }); }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ player.removeSkills(player.getStorage('twduoren')); delete player.storage.twduoren; } @@ -2624,141 +2624,141 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //赵娥 - twyanshi: { - audio: 2, - trigger: { global: 'phaseBefore', player: 'enterGame' }, - forced: true, - locked: false, - direct: true, - onremove: true, - intro: { - content: 'players' + twyanshi:{ + audio:2, + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + locked:false, + direct:true, + onremove:true, + intro:{ + content:'players' }, - filter: function (event, player) { - return game.hasPlayer(current => current != player) && (event.name != 'phase' || game.phaseNumber == 0); + filter:function(event,player){ + return game.hasPlayer(current=>current!=player)&&(event.name!='phase'||game.phaseNumber==0); }, - group: ['twyanshi_hurt', 'twyanshi_damage'], - content: function () { + group:['twyanshi_hurt','twyanshi_damage'], + content:function(){ 'step 0' - player.chooseTarget('言誓:选择一名其他角色', lib.filter.notMe, true).set('ai', target => get.attitude(_status.event.player, target)); + player.chooseTarget('言誓:选择一名其他角色',lib.filter.notMe,true).set('ai',target=>get.attitude(_status.event.player,target)); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twyanshi', target); - player.markAuto('twyanshi', [target]); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twyanshi',target); + player.markAuto('twyanshi',[target]); } }, - mod: { - targetInRange: function (card, player, target) { - if (target.hasMark('twyanshi_mark')) return true; + mod:{ + targetInRange:function(card,player,target){ + if(target.hasMark('twyanshi_mark')) return true; }, }, - subSkill: { - hurt: { - audio: 'twyanshi', - trigger: { - global: 'damageEnd', + subSkill:{ + hurt:{ + audio:'twyanshi', + trigger:{ + global:'damageEnd', }, - forced: true, - locked: false, - filter: function (event, player) { - if (!event.source || !event.source.isIn()) return false; - return player == event.player && !player.getStorage('twyanshi').includes(event.source) || player != event.source && player.getStorage('twyanshi').includes(event.player); + forced:true, + locked:false, + filter:function(event,player){ + if(!event.source||!event.source.isIn()) return false; + return player==event.player&&!player.getStorage('twyanshi').includes(event.source)||player!=event.source&&player.getStorage('twyanshi').includes(event.player); }, - content: function () { - trigger.source.addMark('twyanshi_mark', 1); + content:function(){ + trigger.source.addMark('twyanshi_mark',1); } }, - damage: { - audio: 'twyanshi', - trigger: { - source: ['damageBegin1', 'damageSource'], + damage:{ + audio:'twyanshi', + trigger:{ + source:['damageBegin1','damageSource'], }, - forced: true, - locked: false, - filter: function (event, player) { + forced:true, + locked:false, + filter:function(event,player){ return event.player.hasMark('twyanshi_mark'); }, - content: function () { + content:function(){ 'step 0' - if (event.triggername == 'damageBegin1') { + if(event.triggername=='damageBegin1'){ trigger.num++; } - else { + else{ player.draw(trigger.num); - trigger.player.removeMark('twyanshi_mark', trigger.player.countMark('twyanshi_mark')); + trigger.player.removeMark('twyanshi_mark',trigger.player.countMark('twyanshi_mark')); } } }, - mark: { - marktext: '誓', - intro: { - name: '誓', - name2: '誓', - content: 'mark' + mark:{ + marktext:'誓', + intro:{ + name:'誓', + name2:'誓', + content:'mark' }, } } }, - twrenchou: { - audio: 2, - trigger: { global: 'die' }, - forced: true, - forceDie: true, - filter: function (event, player) { - if (!event.source || !event.source.isIn()) return false; - if (event.player == player) { - return player.getStorage('twyanshi').some(i => i.isIn() && i.hp > 0); + twrenchou:{ + audio:2, + trigger:{global:'die'}, + forced:true, + forceDie:true, + filter:function(event,player){ + if(!event.source||!event.source.isIn()) return false; + if(event.player==player){ + return player.getStorage('twyanshi').some(i=>i.isIn()&&i.hp>0); } - if (player.getStorage('twyanshi').includes(event.player)) { - return player.isIn() && player.hp > 0; + if(player.getStorage('twyanshi').includes(event.player)){ + return player.isIn()&&player.hp>0; } return false; }, - logTarget: 'source', - line: false, - skillAnimation: true, - animationColor: 'water', - global: 'twrenchou_ai', - content: function () { + logTarget:'source', + line:false, + skillAnimation:true, + animationColor:'water', + global:'twrenchou_ai', + content:function(){ 'step 0' - var avengers = []; - if (trigger.player == player) { - avengers = player.getStorage('twyanshi').filter(i => i.isIn() && i.hp > 0); + var avengers=[]; + if(trigger.player==player){ + avengers=player.getStorage('twyanshi').filter(i=>i.isIn()&&i.hp>0); } - if (player.getStorage('twyanshi').includes(trigger.player)) { - avengers = [player]; + if(player.getStorage('twyanshi').includes(trigger.player)){ + avengers=[player]; } - event.avengers = avengers; + event.avengers=avengers; 'step 1' - var avenger = event.avengers.shift(); - avenger.line(trigger.source, 'fire'); - trigger.source.damage(avenger, avenger.hp); + var avenger=event.avengers.shift(); + avenger.line(trigger.source,'fire'); + trigger.source.damage(avenger,avenger.hp); 'step 2' - if (event.avengers.length && trigger.source.isIn()) event.goto(1); + if(event.avengers.length&&trigger.source.isIn()) event.goto(1); }, - ai: { - combo: 'twyanshi', + ai:{ + combo:'twyanshi', }, - subSkill: { - ai: { - ai: { - effect: { - target: function (card, player, target) { - if (!get.tag(card, 'damage')) return; - if (target.hp > 1) return; - var num = 0; - game.filterPlayer(current => { - if (current.getStorage('twyanshi').some(i => target == i)) { - num += current.hp; + subSkill:{ + ai:{ + ai:{ + effect:{ + target:function(card,player,target){ + if(!get.tag(card,'damage')) return; + if(target.hp>1) return; + var num=0; + game.filterPlayer(current=>{ + if(current.getStorage('twyanshi').some(i=>target==i)){ + num+=current.hp; } }); - var targets = target.getStorage('twyanshi').filter(i => i.isIn()); - for (var targetx of targets) { - num += targetx.hp; + var targets=target.getStorage('twyanshi').filter(i=>i.isIn()); + for(var targetx of targets){ + num+=targetx.hp; } - if (num >= player.hp) return 0; - if (num > 0) return [1, 0, 0, 0.5 - 1.5 * num]; + if(num>=player.hp) return 0; + if(num>0) return [1,0,0,0.5-1.5*num]; } } } @@ -2766,84 +2766,84 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //侠典韦 - twliexi: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { + twliexi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ return player.countCards('he'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = [[], []]; - for (var current of game.players) { - if (current == player) continue; - var cards = []; - var weapon = false; - for (var card of player.getCards('he')) { - if (!lib.filter.cardDiscardable(card, player)) continue; - if (get.subtype(card) == 'equip1' && !ui.selected.cards.some(i => get.subtype(i) == 'equip1')) { - if (16 - get.value(card) > 0) { + var list=[[],[]]; + for(var current of game.players){ + if(current==player) continue; + var cards=[]; + var weapon=false; + for(var card of player.getCards('he')){ + if(!lib.filter.cardDiscardable(card,player)) continue; + if(get.subtype(card)=='equip1'&&!ui.selected.cards.some(i=>get.subtype(i)=='equip1')){ + if(16-get.value(card)>0){ cards.push(card); - weapon = true; + weapon=true; } } - if (7 - get.value(card) > 0) cards.push(card); + if(7-get.value(card)>0) cards.push(card); } - if (cards.length > current.hp) { - var val = 0; - for (var card of cards) { - if (get.subtype(card) != 'equip1') val += get.value(card); + if(cards.length>current.hp){ + var val=0; + for(var card of cards){ + if(get.subtype(card)!='equip1') val+=get.value(card); } - if (val < 30) list[0].push(current); + if(val<30) list[0].push(current); } - if (weapon && player.hp > 2 || get.damageEffect(player, current, player) > 10) list[1].push(current); + if(weapon&&player.hp>2||get.damageEffect(player,current,player)>10) list[1].push(current); } - list[0].sort((a, b) => { - return get.damageEffect(b, player, player) - get.damageEffect(a, player, player); + list[0].sort((a,b)=>{ + return get.damageEffect(b,player,player)-get.damageEffect(a,player,player); }); player.chooseCardTarget({ - filterCard: lib.filter.cardDiscardable, - selectCard: [1, Infinity], - position: 'he', - filterTarget: lib.filter.notMe, - prompt: get.prompt2('twliexi'), - targetsx: [list[0][0], list[1][0]], - ai1: function (card) { - var targetx = _status.event.targetsx[0]; - var hasWeapon = ui.selected.cards.some(i => get.subtype(i) == 'equip1'); - if (!targetx) { - var targetx = _status.event.targetsx[1]; - if (get.subtype(card) == 'equip1' && !hasWeapon) return 30 - get.value(card); + filterCard:lib.filter.cardDiscardable, + selectCard:[1,Infinity], + position:'he', + filterTarget:lib.filter.notMe, + prompt:get.prompt2('twliexi'), + targetsx:[list[0][0],list[1][0]], + ai1:function(card){ + var targetx=_status.event.targetsx[0]; + var hasWeapon=ui.selected.cards.some(i=>get.subtype(i)=='equip1'); + if(!targetx){ + var targetx=_status.event.targetsx[1]; + if(get.subtype(card)=='equip1'&&!hasWeapon) return 30-get.value(card); return -get.value(card); } - if (ui.selected.cards.length > targetx.hp) return 0; - if (get.subtype(card) == 'equip1' && !hasWeapon) return 30 - get.value(card); - return 7 - get.value(card); + if(ui.selected.cards.length>targetx.hp) return 0; + if(get.subtype(card)=='equip1'&&!hasWeapon) return 30-get.value(card); + return 7-get.value(card); }, - ai2: function (target) { - var targetx = _status.event.targetsx[0] || _status.event.targetsx[1]; - if (targetx == target) return 10; + ai2:function(target){ + var targetx=_status.event.targetsx[0]||_status.event.targetsx[1]; + if(targetx==target) return 10; return 0; }, }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - var cards = result.cards; - player.logSkill('twliexi', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + var cards=result.cards; + player.logSkill('twliexi',target); player.discard(cards); - if (cards.length > target.hp) target.damage(); + if(cards.length>target.hp) target.damage(); else player.damage(target); - var goon = false; - for (var card of cards) { - if (get.subtype(card) == 'equip1') { - goon = true; + var goon=false; + for(var card of cards){ + if(get.subtype(card)=='equip1'){ + goon=true; break; } } - if (!goon) event.finish(); + if(!goon) event.finish(); } else event.finish(); 'step 2' @@ -2851,98 +2851,98 @@ game.import('character', function (lib, game, ui, get, ai, _status) { target.damage(); } }, - twshezhong: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - content: function () { + twshezhong:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ 'step 0' - var damage = player.getHistory('sourceDamage').length; - if (damage) { - player.chooseTarget(get.prompt('twshezhong'), '令至多' + get.cnNumber(damage) + '名其他角色下个摸牌阶段的摸牌数-1', [1, damage], lib.filter.notMe).set('ai', target => { - return -get.attitude(_status.event.player, target); + var damage=player.getHistory('sourceDamage').length; + if(damage){ + player.chooseTarget(get.prompt('twshezhong'),'令至多'+get.cnNumber(damage)+'名其他角色下个摸牌阶段的摸牌数-1',[1,damage],lib.filter.notMe).set('ai',target=>{ + return -get.attitude(_status.event.player,target); }); } else event.goto(2); 'step 1' - if (result.bool) { - var targets = result.targets; - player.logSkill('twshezhong', targets); - for (var target of targets) { + if(result.bool){ + var targets=result.targets; + player.logSkill('twshezhong',targets); + for(var target of targets){ target.addSkill('twshezhong_minus'); - target.addMark('twshezhong_minus', 1, false); + target.addMark('twshezhong_minus',1,false); } } 'step 2' - var targets = []; - for (var evt of player.getHistory('damage')) { - if (evt.source && evt.source.isIn()) targets.add(evt.source); + var targets=[]; + for(var evt of player.getHistory('damage')){ + if(evt.source&&evt.source.isIn()) targets.add(evt.source); } - if (targets.length) { - player.chooseTarget(get.prompt('twshezhong'), '将手牌摸至一名与一名本回合对你造成过伤害的角色的体力值相同,且至多摸至五张', (card, player, target) => { + if(targets.length){ + player.chooseTarget(get.prompt('twshezhong'),'将手牌摸至一名与一名本回合对你造成过伤害的角色的体力值相同,且至多摸至五张',(card,player,target)=>{ return _status.event.targets.includes(target); - }).set('ai', target => { - return Math.max(0.1, target.hp - _status.event.player.countCards('h')); - }).set('targets', targets); + }).set('ai',target=>{ + return Math.max(0.1,target.hp-_status.event.player.countCards('h')); + }).set('targets',targets); } else event.finish(); 'step 3' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twshezhong', target); - var num = Math.min(target.hp, 5) - player.countCards('h'); - if (num > 0) player.draw(num); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twshezhong',target); + var num=Math.min(target.hp,5)-player.countCards('h'); + if(num>0) player.draw(num); } }, - subSkill: { - minus: { - trigger: { player: 'phaseDrawBegin' }, - forced: true, - onremove: true, - content: function () { - var num = player.countMark('twshezhong_minus'); - trigger.num -= num; - game.log(player, '的额定摸牌数', '#g-' + num); + subSkill:{ + minus:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + onremove:true, + content:function(){ + var num=player.countMark('twshezhong_minus'); + trigger.num-=num; + game.log(player,'的额定摸牌数','#g-'+num); player.removeSkill('twshezhong_minus'); }, - mark: true, - intro: { - content: '额定摸牌数-#', + mark:true, + intro:{ + content:'额定摸牌数-#', }, } } }, //侠鲁肃 - twkaizeng: { - audio: 2, - global: 'twkaizeng_want', - refuseInfo: ['不给', '拒绝'], - subSkill: { - want: { - audio: 'twkaizeng', - forceaudio: true, - enable: 'phaseUse', - usable: 1, - charlotte: true, - filter: function (event, player) { - return game.hasPlayer(current => { - return current != player && current.hasSkill('twkaizeng'); + twkaizeng:{ + audio:2, + global:'twkaizeng_want', + refuseInfo:['不给','拒绝'], + subSkill:{ + want:{ + audio:'twkaizeng', + forceaudio:true, + enable:'phaseUse', + usable:1, + charlotte:true, + filter:function(event,player){ + return game.hasPlayer(current=>{ + return current!=player&¤t.hasSkill('twkaizeng'); }); }, - chooseButton: { - dialog: function (event, player) { - var targets = game.filterPlayer(current => { - return current != player && current.hasSkill('twkaizeng'); + chooseButton:{ + dialog:function(event,player){ + var targets=game.filterPlayer(current=>{ + return current!=player&¤t.hasSkill('twkaizeng'); }); - return ui.create.dialog('###慨赠###' + '选择一种基本牌的牌名或非基本牌的类型,然后令' + get.translation(targets) + (targets.length > 1 ? '中的一人' : '') + '选择是否交给你任意张牌'); + return ui.create.dialog('###慨赠###'+'选择一种基本牌的牌名或非基本牌的类型,然后令'+get.translation(targets)+(targets.length>1?'中的一人':'')+'选择是否交给你任意张牌'); }, - chooseControl: function () { - var list = []; - var basic = []; - for (var i = 0; i < lib.inpile.length; i++) { - var name = lib.inpile[i]; - var type = get.type(name, 'trick'); - if (type == 'basic') { + chooseControl:function(){ + var list=[]; + var basic=[]; + for(var i=0;i current != player && current.hasSkill('twkaizeng')); - targets.sort((a, b) => get.attitude(player, b) - get.attitude(player, a)); - var cards = targets[0].getCards('h'); - var list = []; - for (var card of cards) { - var type = get.type2(card); - if (type == 'basic') list.add(get.name(card)); + var targets=game.filterPlayer(current=>current!=player&¤t.hasSkill('twkaizeng')); + targets.sort((a,b)=>get.attitude(player,b)-get.attitude(player,a)); + var cards=targets[0].getCards('h'); + var list=[]; + for(var card of cards){ + var type=get.type2(card); + if(type=='basic') list.add(get.name(card)); else list.add(type); } - var need = ['trick', 'equip'].randomSort(); - need.addArray(['sha', 'jiu'].randomSort()); - for (var type of need) { - if (list.includes(type)) return type; + var need=['trick','equip'].randomSort(); + need.addArray(['sha','jiu'].randomSort()); + for(var type of need){ + if(list.includes(type)) return type; } return list.randomGet(); }, - backup: function (result, player) { + backup:function(result,player){ return { - audio: 'twkaizeng', - type: result.control, - log: false, - delay: false, - filterTarget: function (card, player, target) { + audio:'twkaizeng', + type:result.control, + log:false, + delay:false, + filterTarget:function(card,player,target){ return target.hasSkill('twkaizeng'); }, - selectTarget: function () { - var player = _status.event.player; - var targets = game.filterPlayer(function (current) { - return current != player && current.hasSkill('twkaizeng'); + selectTarget:function(){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('twkaizeng'); }); - return targets.length > 1 ? 1 : -1; + return targets.length>1?1:-1; }, - prepare: function (cards, player, targets) { - targets[0].logSkill('twkaizeng_want', player); + prepare:function(cards,player,targets){ + targets[0].logSkill('twkaizeng_want',player); }, - content: function () { + content:function(){ 'step 0' - var type = lib.skill.twkaizeng_want_backup.type; - var isbasic = lib.card[type]; - target.chooseCard('慨赠:是否交给' + get.translation(player) + '任意张手牌?', '若你以此法:交给其至少两张牌,你摸一张牌;交给其的牌包含其选择的牌名或类型,你获得一张不为此牌名或类型的牌', [1, Infinity]).set('ai', card => { - if (!_status.event.goon) return -get.value(card); - var player = _status.event.player, target = _status.event.getParent().player; - if (ui.selected.cards.length > player.countCards('h') / 2 && ui.selected.cards.length >= 2) return 0; - var type = _status.event.type; - var isbasic = lib.card[type]; - var add = 0; - if (!ui.selected.cards.some(i => get[isbasic ? 'name' : 'type2'](i, target) == type)) add += 3; - if (ui.selected.cards.length < 2) add += 3; - return get.value(card, target) - get.value(card, player) + add; - }).set('type', type).set('goon', get.attitude(target, player) > 0); + var type=lib.skill.twkaizeng_want_backup.type; + var isbasic=lib.card[type]; + target.chooseCard('慨赠:是否交给'+get.translation(player)+'任意张手牌?','若你以此法:交给其至少两张牌,你摸一张牌;交给其的牌包含其选择的牌名或类型,你获得一张不为此牌名或类型的牌',[1,Infinity]).set('ai',card=>{ + if(!_status.event.goon) return -get.value(card); + var player=_status.event.player,target=_status.event.getParent().player; + if(ui.selected.cards.length>player.countCards('h')/2&&ui.selected.cards.length>=2) return 0; + var type=_status.event.type; + var isbasic=lib.card[type]; + var add=0; + if(!ui.selected.cards.some(i=>get[isbasic?'name':'type2'](i,target)==type)) add+=3; + if(ui.selected.cards.length<2) add+=3; + return get.value(card,target)-get.value(card,player)+add; + }).set('type',type).set('goon',get.attitude(target,player)>0); 'step 1' - if (result.bool) { - var cards = result.cards; - event.cards = cards; - target.give(cards, player); + if(result.bool){ + var cards=result.cards; + event.cards=cards; + target.give(cards,player); } - else { - var refuseInfo = lib.skill.twkaizeng.refuseInfo.slice(); - if (get.attitude(target, player) < 0) refuseInfo.push('没门'); + else{ + var refuseInfo=lib.skill.twkaizeng.refuseInfo.slice(); + if(get.attitude(target,player)<0) refuseInfo.push('没门'); target.chat(refuseInfo.randomGet()); event.finish(); } 'step 2' - if (cards.length > 1) target.draw(); + if(cards.length>1) target.draw(); 'step 3' - var type = lib.skill.twkaizeng_want_backup.type; - var isbasic = lib.card[type]; - var fn = isbasic ? 'name' : 'type2'; - if (cards.some(card => get[fn](card, player) == type)) { - var card = get.cardPile(cardx => { - return get[fn](cardx, target) != type; + var type=lib.skill.twkaizeng_want_backup.type; + var isbasic=lib.card[type]; + var fn=isbasic?'name':'type2'; + if(cards.some(card=>get[fn](card,player)==type)){ + var card=get.cardPile(cardx=>{ + return get[fn](cardx,target)!=type; }); - if (card) target.gain(card, 'gain2'); + if(card) target.gain(card,'gain2'); } 'step 4' game.delayx(); }, - ai: { - result: { - target: 1, + ai:{ + result:{ + target:1, }, }, } }, - prompt: () => '请选择一名有【慨赠】的角色', + prompt:()=>'请选择一名有【慨赠】的角色', }, - ai: { - order: 10, - result: { - player: function (player) { - var targets = game.filterPlayer(current => { - return current != player && current.hasSkill('twkaizeng'); + ai:{ + order:10, + result:{ + player:function(player){ + var targets=game.filterPlayer(current=>{ + return current!=player&¤t.hasSkill('twkaizeng'); }); - for (var i of targets) if (get.attitude(player, i) > 0) return 1; + for(var i of targets) if(get.attitude(player,i)>0) return 1; return 0; } }, }, }, - want_backup: {}, + want_backup:{}, }, - ai: { - threaten: 3 + ai:{ + threaten:3 } }, - twyangming: { - audio: 2, - trigger: { - player: 'phaseUseEnd', + twyangming:{ + audio:2, + trigger:{ + player:'phaseUseEnd', }, - frequent: true, - filter: function (event, player) { - return player.hasHistory('useCard', evt => evt.getParent('phaseUse') == event); + frequent:true, + filter:function(event,player){ + return player.hasHistory('useCard',evt=>evt.getParent('phaseUse')==event); }, - content: function () { - var types = []; - var history = player.getHistory('useCard', evt => evt.getParent('phaseUse') == trigger); - for (var evt of history) { + content:function(){ + var types=[]; + var history=player.getHistory('useCard',evt=>evt.getParent('phaseUse')==trigger); + for(var evt of history){ types.add(get.type2(evt.card)); } - var num = types.length; + var num=types.length; player.draw(num); player.addTempSkill('twyangming_limit'); - player.addMark('twyangming_limit', num, false); - game.log(player, '本回合的手牌上限', '#g+' + num); + player.addMark('twyangming_limit',num,false); + game.log(player,'本回合的手牌上限','#g+'+num); }, - subSkill: { - limit: { - charlotte: true, - onremove: true, - mod: { - maxHandcard: function (player, num) { - return num + player.countMark('twyangming_limit'); + subSkill:{ + limit:{ + charlotte:true, + onremove:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('twyangming_limit'); } } } } }, //邴原 - twbingde: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('he') && player.getStorage('twbingde_clear').length < 4; + twbingde:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')&&player.getStorage('twbingde_clear').length<4; }, - onChooseToUse: function (event) { - if (event.type == 'phase' && !game.online) { - var map = {}; - event.player.getHistory('useCard', evt => { - var evtx = evt.getParent('phaseUse'), suit = get.suit(evt.card); - if (!lib.suit.includes(suit)) return; - if (evtx != event.getParent('phaseUse')) return; - if (typeof map[suit] != 'number') map[suit] = 0; + onChooseToUse:function(event){ + if(event.type=='phase'&&!game.online){ + var map={}; + event.player.getHistory('useCard',evt=>{ + var evtx=evt.getParent('phaseUse'),suit=get.suit(evt.card); + if(!lib.suit.includes(suit)) return; + if(evtx!=event.getParent('phaseUse')) return; + if(typeof map[suit]!='number') map[suit]=0; map[suit]++; }); - event.set('twbingde_map', map); + event.set('twbingde_map',map); } }, - chooseButton: { - dialog: function (event, player) { - var str = get.translation('twbingde_info'), str2 = ''; - if (event.twbingde_map) { - str2 = '
    本回合使用牌对应花色数:
    '; - str2 += '
    '; - for (var suit of lib.suit) { - str2 += get.translation(suit) + ':' + get.cnNumber(event.twbingde_map[suit] || 0) + '张;'; + chooseButton:{ + dialog:function(event,player){ + var str=get.translation('twbingde_info'),str2=''; + if(event.twbingde_map){ + str2='
    本回合使用牌对应花色数:
    '; + str2+='
    '; + for(var suit of lib.suit){ + str2+=get.translation(suit)+':'+get.cnNumber(event.twbingde_map[suit]||0)+'张;'; } - str2 = str2.slice(0, str2.length - 1) + '
    '; + str2=str2.slice(0,str2.length-1)+'
    '; } - return ui.create.dialog('###秉德###' + str, str2); + return ui.create.dialog('###秉德###'+str,str2); }, - chooseControl: function (event, player) { - var list = lib.suit.slice(); + chooseControl:function(event,player){ + var list=lib.suit.slice(); list.removeArray(player.getStorage('twbingde_clear')); list.push('cancel2'); return list; }, - check: function (event, player) { - var map = event.twbingde_map; - var suit = lib.suit.filter(i => !player.getStorage('twbingde_clear').includes(i)).sort((a, b) => { - return map[b] - map[a]; + check:function(event,player){ + var map=event.twbingde_map; + var suit=lib.suit.filter(i=>!player.getStorage('twbingde_clear').includes(i)).sort((a,b)=>{ + return map[b]-map[a]; })[0]; - if (map[suit] == 0) return 'cancel2'; + if(map[suit]==0) return 'cancel2'; return suit; }, - backup: function (result, player) { + backup:function(result,player){ return { - audio: 'twbingde', - filterCard: true, - selectCard: 1, - position: 'he', - suit: result.control, - check: function (card) { - var suit = lib.skill.twbingde.suit; - if (get.suit(card) == suit) return 10 - get.value(card); - return 6 - get.value(card); + audio:'twbingde', + filterCard:true, + selectCard:1, + position:'he', + suit:result.control, + check:function(card){ + var suit=lib.skill.twbingde.suit; + if(get.suit(card)==suit) return 10-get.value(card); + return 6-get.value(card); }, - content: function () { + content:function(){ 'step 0' - var suit = lib.skill.twbingde_backup.suit, num = 0; - player.popup(suit + 2); - game.log(player, '选择了', '#y' + suit + 2); - player.addTempSkill('twbingde_clear', 'phaseUseAfter'); - player.markAuto('twbingde_clear', [suit]); - player.getHistory('useCard', evt => { - var evtx = evt.getParent('phaseUse'), suitx = get.suit(evt.card); - if (!evtx || evtx != event.getParent('phaseUse') || suit != suitx) return false; + var suit=lib.skill.twbingde_backup.suit,num=0; + player.popup(suit+2); + game.log(player,'选择了','#y'+suit+2); + player.addTempSkill('twbingde_clear','phaseUseAfter'); + player.markAuto('twbingde_clear',[suit]); + player.getHistory('useCard',evt=>{ + var evtx=evt.getParent('phaseUse'),suitx=get.suit(evt.card); + if(!evtx||evtx!=event.getParent('phaseUse')||suit!=suitx) return false; num++; }); - if (num > 0) player.draw(num); + if(num>0) player.draw(num); 'step 1' - if (get.suit(cards[0], player) == lib.skill.twbingde_backup.suit) { + if(get.suit(cards[0],player)==lib.skill.twbingde_backup.suit){ delete player.getStat('skill').twbingde; } }, - ai: { - result: { - player: 1, + ai:{ + result:{ + player:1, }, }, } }, - prompt: () => '秉德:弃置一张牌', + prompt:()=>'秉德:弃置一张牌', }, - ai: { - order: 2, - result: { player: 1 } + ai:{ + order:2, + result:{player:1} }, - subSkill: { - backup: {}, - clear: { - charlotte: true, - onremove: true, + subSkill:{ + backup:{}, + clear:{ + charlotte:true, + onremove:true, } }, }, - twqingtao: { - audio: 2, - trigger: { player: 'phaseDrawEnd' }, - filter: function (event, player) { + twqingtao:{ + audio:2, + trigger:{player:'phaseDrawEnd'}, + filter:function(event,player){ return player.countCards('he'); }, - direct: true, - group: 'twqingtao_jieshu', - content: function () { + direct:true, + group:'twqingtao_jieshu', + content:function(){ 'step 0' - player.chooseCard(get.prompt2('twqingtao'), 'he', lib.filter.cardRecastable).set('ai', function (card) { - if (card.name == 'jiu' || get.type(card) != 'basic') return 10 - get.value(card); - return 6 - get.value(card); + player.chooseCard(get.prompt2('twqingtao'),'he',lib.filter.cardRecastable).set('ai',function(card){ + if(card.name=='jiu'||get.type(card)!='basic') return 10-get.value(card); + return 6-get.value(card); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twqingtao'); player.recast(result.cards); - if (get.name(result.cards[0]) == 'jiu' || get.type(result.cards[0], false, player) != 'basic') player.draw(); + if(get.name(result.cards[0])=='jiu'||get.type(result.cards[0],false,player)!='basic') player.draw(); } }, - subSkill: { - jieshu: { - audio: 'twqingtao', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return player.countCards('he') > 0 && !player.hasHistory('useSkill', evt => evt.skill == 'twqingtao'); + subSkill:{ + jieshu:{ + audio:'twqingtao', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.countCards('he')>0&&!player.hasHistory('useSkill',evt=>evt.skill=='twqingtao'); }, - direct: true, - content: function () { - var next = game.createEvent('twqingtao'); - next.player = player; + direct:true, + content:function(){ + var next=game.createEvent('twqingtao'); + next.player=player; next.setContent(lib.skill.twqingtao.content); }, } } }, //牛董 - twjuntun: { - audio: 2, - trigger: { - global: ['phaseBefore', 'dieAfter'], - player: 'enterGame', + twjuntun:{ + audio:2, + trigger:{ + global:['phaseBefore','dieAfter'], + player:'enterGame', }, - init: function (player) { lib.skill.baonvezhi.change(player, 0) }, - direct: true, - derivation: ['twxiongjun', 'baonvezhi_faq'], - group: 'twjuntun_extra', - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0) && game.hasPlayer(current => { + init:function(player){lib.skill.baonvezhi.change(player,0)}, + direct:true, + derivation:['twxiongjun','baonvezhi_faq'], + group:'twjuntun_extra', + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer(current=>{ return !current.hasSkill('twxiongjun'); }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twjuntun'), '令一名角色获得〖凶军〗', (card, player, target) => { + player.chooseTarget(get.prompt('twjuntun'),'令一名角色获得〖凶军〗',(card,player,target)=>{ return !target.hasSkill('twxiongjun'); - }).set('ai', target => get.attitude(player, target) - 2); + }).set('ai',target=>get.attitude(player,target)-2); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twjuntun', target); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twjuntun',target); target.addSkills('twxiongjun'); - if (target != player) player.addExpose(0.25); + if(target!=player) player.addExpose(0.25); } }, - subSkill: { - extra: { - audio: 2, - trigger: { global: 'damageSource' }, - forced: true, - locked: false, - filter: function (event, player) { - return event.source && event.source.hasSkill('twxiongjun') && event.source != player; + subSkill:{ + extra:{ + audio:2, + trigger:{global:'damageSource'}, + forced:true, + locked:false, + filter:function(event,player){ + return event.source&&event.source.hasSkill('twxiongjun')&&event.source!=player; }, - logTarget: 'source', - content: function () { - lib.skill.baonvezhi.change(player, trigger.num); + logTarget:'source', + content:function(){ + lib.skill.baonvezhi.change(player,trigger.num); } }, }, }, - baonvezhi: { - audio: 2, - trigger: { - player: 'damageEnd', - source: 'damageSource', + baonvezhi:{ + audio:2, + trigger:{ + player:'damageEnd', + source:'damageSource', }, - silent: true, - forced: true, - charlotte: true, - baonvezhi_max: 5, - change: function (player, num) { - var baonvezhi_max = lib.skill.baonvezhi.baonvezhi_max; + silent:true, + forced:true, + charlotte:true, + baonvezhi_max:5, + change:function(player,num){ + var baonvezhi_max=lib.skill.baonvezhi.baonvezhi_max; player.addSkill('baonvezhi'); - var tmp = player.countMark('baonvezhi'); - if (tmp + num > baonvezhi_max) num = baonvezhi_max - tmp; - else if (tmp + num < 0) num = -tmp; - if (num === 0) return; - player[num > 0 ? 'addMark' : 'removeMark']('baonvezhi', Math.abs(num), false); - game.log(player, num >= 0 ? '获得了' : '失去了', get.cnNumber(Math.abs(num)) + '点暴虐值'); - player[player.countMark('baonvezhi') > 0 ? 'markSkill' : 'unmarkSkill']('baonvezhi'); + var tmp=player.countMark('baonvezhi'); + if(tmp+num>baonvezhi_max) num=baonvezhi_max-tmp; + else if(tmp+num<0) num=-tmp; + if(num===0) return; + player[num>0?'addMark':'removeMark']('baonvezhi',Math.abs(num),false); + game.log(player,num>=0?'获得了':'失去了',get.cnNumber(Math.abs(num))+'点暴虐值'); + player[player.countMark('baonvezhi')>0?'markSkill':'unmarkSkill']('baonvezhi'); }, - filter: function (event, player) { - return player.countMark('baonvezhi') < lib.skill.baonvezhi.baonvezhi_max; + filter:function(event,player){ + return player.countMark('baonvezhi') current.hasSkill('twxiongjun')).sortBySeat(); - player.line(targets, 'green'); + baonvezhi_faq:{}, + twxiongjun:{ + init:function(player){lib.skill.baonvezhi.change(player,0)}, + trigger:{source:'damageSource'}, + forced:true, + usable:1, + content:function(){ + var targets=game.filterPlayer(current=>current.hasSkill('twxiongjun')).sortBySeat(); + player.line(targets,'green'); game.asyncDraw(targets); }, }, - twxiongxi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - init: function (player) { lib.skill.baonvezhi.change(player, 0) }, - filterCard: () => true, - selectCard: function () { - return (lib.skill.baonvezhi.baonvezhi_max || 5) - _status.event.player.countMark('baonvezhi'); + twxiongxi:{ + audio:2, + enable:'phaseUse', + usable:1, + init:function(player){lib.skill.baonvezhi.change(player,0)}, + filterCard:()=>true, + selectCard:function(){ + return (lib.skill.baonvezhi.baonvezhi_max||5)-_status.event.player.countMark('baonvezhi'); }, - check: function (card) { - return 6 - get.value(card); + check:function(card){ + return 6-get.value(card); }, - position: 'he', - filterTarget: function (card, player, target) { - return target != player; + position:'he', + filterTarget:function(card,player,target){ + return target!=player; }, - content: function () { + content:function(){ target.damage(); }, - ai: { - expose: 0.25, - order: 8, - result: { - target: function (player, target) { - return get.damageEffect(target, player, player); + ai:{ + expose:0.25, + order:8, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,player); } } } }, - twxiafeng: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - filter: function (event, player) { - return player.countMark('baonvezhi') > 0; + twxiafeng:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countMark('baonvezhi')>0; }, - init: function (player) { lib.skill.baonvezhi.change(player, 0) }, - direct: true, - content: function () { + init:function(player){lib.skill.baonvezhi.change(player,0)}, + direct:true, + content:function(){ 'step 0' - player.chooseButton(['黠凤:选择要消耗的暴虐值', [['tw_bn_1', 'tw_bn_2', 'tw_bn_3'], 'vcard']], (button) => { - var num = player.countCards('hs', card => get.tag(card, 'damage') && game.hasPlayer(current => get.effect(current, card, player, player) > 0)); - if (num <= 0) return 0; - if (num >= 3) num = 3; - if (button.link[2] == 'tw_bn_' + num) return 10; + player.chooseButton(['黠凤:选择要消耗的暴虐值',[['tw_bn_1','tw_bn_2','tw_bn_3'],'vcard']],(button)=>{ + var num=player.countCards('hs',card=>get.tag(card,'damage')&&game.hasPlayer(current=>get.effect(current,card,player,player)>0)); + if(num<=0) return 0; + if(num>=3) num=3; + if(button.link[2]=='tw_bn_'+num) return 10; return 1; - }).set('filterButton', (button) => { - var player = _status.event.player; - var link = button.link[2]; - if (link[link.length - 1] * 1 > player.storage.baonvezhi) return false; + }).set('filterButton',(button)=>{ + var player=_status.event.player; + var link=button.link[2]; + if(link[link.length-1]*1>player.storage.baonvezhi) return false; return true; }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twxiafeng'); - var link = result.links[0][2], num = link[link.length - 1] * 1; + var link=result.links[0][2],num=link[link.length-1]*1; player.addTempSkill('twxiafeng_effect'); - player.storage.twxiafeng_effect = num; - lib.skill.baonvezhi.change(player, -num); + player.storage.twxiafeng_effect=num; + lib.skill.baonvezhi.change(player,-num); } }, - subSkill: { - effect: { - trigger: { player: 'useCard' }, - filter: function (event, player) { + subSkill:{ + effect:{ + trigger:{player:'useCard'}, + filter:function(event,player){ return !player.storage.twxiafeng_effect2; }, - forced: true, - content: function () { - var count = player.getHistory('useCard', evt => evt.getParent('phaseUse').player == player).length; - if (count == player.storage.twxiafeng_effect) { - player.storage.twxiafeng_effect2 = true; + forced:true, + content:function(){ + var count=player.getHistory('useCard',evt=>evt.getParent('phaseUse').player==player).length; + if(count==player.storage.twxiafeng_effect){ + player.storage.twxiafeng_effect2=true; } - if (count <= player.storage.twxiafeng_effect) { + if(count<=player.storage.twxiafeng_effect){ trigger.directHit.addArray(game.players); - if (trigger.addCount !== false) { - trigger.addCount = false; - var stat = player.getStat().card, name = trigger.card.name; - if (typeof stat[name] == 'number') stat[name]--; + if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat().card,name=trigger.card.name; + if(typeof stat[name]=='number') stat[name]--; } } }, - onremove: function (player) { + onremove:function(player){ delete player.storage.twxiafeng_effect; delete player.storage.twxiafeng_effect2; }, - mod: { - targetInRange: function (card, player, target, now) { - if (!player.storage.twxiafeng_effect2) return true; + mod:{ + targetInRange:function(card,player,target,now){ + if(!player.storage.twxiafeng_effect2) return true; }, - cardUsableTarget: function (card, player, target) { - if (!player.storage.twxiafeng_effect2) return true; + cardUsableTarget:function(card,player,target){ + if(!player.storage.twxiafeng_effect2) return true; }, - maxHandcard: function (player, num) { - return num + (player.storage.twxiafeng_effect || 0); + maxHandcard:function(player,num){ + return num+(player.storage.twxiafeng_effect||0); } }, } } }, //蒋济 - twjichou: { - audio: 2, - enable: 'chooseToUse', - group: ['twjichou_ban', 'twjichou_give'], - filter: function (event, player) { - if (player.hasSkill('twjichou_used') && player.hasSkill('twjichou_given')) return false; - if (!player.hasSkill('twjichou_used')) { - var record = player.getStorage('twjichou'); - for (var i of lib.inpile) { - var type = get.type(i); - if (type == 'trick' && !record.includes(i) && event.filterCard({ name: i, isCard: true }, player, event)) return true; + twjichou:{ + audio:2, + enable:'chooseToUse', + group:['twjichou_ban','twjichou_give'], + filter:function(event,player){ + if(player.hasSkill('twjichou_used')&&player.hasSkill('twjichou_given')) return false; + if(!player.hasSkill('twjichou_used')){ + var record=player.getStorage('twjichou'); + for(var i of lib.inpile){ + var type=get.type(i); + if(type=='trick'&&!record.includes(i)&&event.filterCard({name:i,isCard:true},player,event)) return true; } } return false; }, - chooseButton: { - dialog: function (event, player) { - var dialog = ui.create.dialog('急筹'); - if (!player.hasSkill('twjichou_used') && !player.hasSkill('twjichou_given') && event.type == 'phase' && player.countCards('h', card => { + chooseButton:{ + dialog:function(event,player){ + var dialog=ui.create.dialog('急筹'); + if(!player.hasSkill('twjichou_used')&&!player.hasSkill('twjichou_given')&&event.type=='phase'&&player.countCards('h',card=>{ return player.getStorage('twjichou').includes(get.name(card)); - })) { - dialog._chosenOpt = []; - var table = document.createElement('div'); + })){ + dialog._chosenOpt=[]; + var table=document.createElement('div'); table.classList.add('add-setting'); - table.style.margin = '0'; - table.style.width = '100%'; - table.style.position = 'relative'; - var list = ['视为使用牌', '交出锦囊牌']; - for (var i of list) { - var td = ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode'); - td.innerHTML = '' + i + ''; - td.link = i; - if (i == list[0]) { + table.style.margin='0'; + table.style.width='100%'; + table.style.position='relative'; + var list=['视为使用牌','交出锦囊牌']; + for(var i of list){ + var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode'); + td.innerHTML=''+i+''; + td.link=i; + if(i==list[0]){ td.classList.add('bluebg'); dialog._chosenOpt.add(td); } - td.addEventListener(lib.config.touchscreen ? 'touchend' : 'click', function () { - if (_status.dragged) return; - if (_status.clicked) return; - if (_status.justdragged) return; - _status.tempNoButton = true; - _status.clicked = true; - setTimeout(function () { - _status.tempNoButton = false; - }, 500); - var link = this.link; - if (link == '交出锦囊牌') game.uncheck(); - var current = this.parentNode.querySelector('.bluebg'); - if (current) { + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.clicked) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + _status.clicked=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + if(link=='交出锦囊牌') game.uncheck(); + var current=this.parentNode.querySelector('.bluebg'); + if(current){ current.classList.remove('bluebg'); dialog._chosenOpt.remove(current); } @@ -3484,275 +3484,275 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } dialog.content.appendChild(table); } - var list = [], record = player.getStorage('twjichou'); - for (var name of lib.inpile) { - if (get.type(name) == 'trick' && !record.includes(name) && event.filterCard({ name: name, isCard: true }, player, event)) list.push(['锦囊', '', name]); + var list=[],record=player.getStorage('twjichou'); + for(var name of lib.inpile){ + if(get.type(name)=='trick'&&!record.includes(name)&&event.filterCard({name:name,isCard:true},player,event)) list.push(['锦囊','',name]); } - dialog.add([list, 'vcard']); + dialog.add([list,'vcard']); return dialog; }, - filter: function (button) { - if (_status.event.dialog) { - var opts = _status.event.dialog._chosenOpt; - if (opts && opts.length && opts[0].link == '交出锦囊牌' && typeof button.link != typeof opts[0].link) { + filter:function(button){ + if(_status.event.dialog){ + var opts=_status.event.dialog._chosenOpt; + if(opts&&opts.length&&opts[0].link=='交出锦囊牌'&&typeof button.link!=typeof opts[0].link){ return false; } return true; } return false; }, - select: function () { - if (_status.event.dialog) { - var opts = _status.event.dialog._chosenOpt; - return opts && opts.length && opts[0].link == '交出锦囊牌' ? 0 : 1; + select:function(){ + if(_status.event.dialog){ + var opts=_status.event.dialog._chosenOpt; + return opts&&opts.length&&opts[0].link=='交出锦囊牌'?0:1; } return 0; }, - check: function (button) { - if (_status.event.getParent().type != 'phase') return 1; - var player = _status.event.player; - if (['wugu', 'zhulu_card', 'yiyi', 'lulitongxin', 'lianjunshengyan', 'diaohulishan'].includes(button.link[2])) return 0.1; - return player.getUseValue({ name: button.link[2] }); + check:function(button){ + if(_status.event.getParent().type!='phase') return 1; + var player=_status.event.player; + if(['wugu','zhulu_card','yiyi','lulitongxin','lianjunshengyan','diaohulishan'].includes(button.link[2])) return 0.1; + return player.getUseValue({name:button.link[2]}); }, - backup: function (links, player) { - var isUse = links.length == 1; - var backup = get.copy(lib.skill['twjichou_' + (isUse ? 'use' : 'give')]); - if (isUse) backup.viewAs = { name: links[0][2], isCard: true }; + backup:function(links,player){ + var isUse=links.length==1; + var backup=get.copy(lib.skill['twjichou_'+(isUse?'use':'give')]); + if(isUse) backup.viewAs={name:links[0][2],isCard:true}; return backup; }, - prompt: function (links, player) { - var isUse = links.length == 1; - return '急筹:' + (isUse ? ('视为使用' + get.translation(links[0][2]) + '') : '选择要交出的牌和要交给的目标'); + prompt:function(links,player){ + var isUse=links.length==1; + return '急筹:'+(isUse?('视为使用'+get.translation(links[0][2])+''):'选择要交出的牌和要交给的目标'); } }, - hiddenCard: function (player, name) { - if (player.hasSkill('twjichou_used')) return false; - var type = get.type(name); - return type == 'trick' && !player.getStorage('twjichou').includes(name); + hiddenCard:function(player,name){ + if(player.hasSkill('twjichou_used')) return false; + var type=get.type(name); + return type=='trick'&&!player.getStorage('twjichou').includes(name); }, - marktext: '筹', - intro: { - markcount: function (storage, player) { - if (storage && storage.length) return storage.length; + marktext:'筹', + intro:{ + markcount:function(storage,player){ + if(storage&&storage.length) return storage.length; return 0; }, - content: '已记录牌名:$', + content:'已记录牌名:$', }, - ai: { - order: 1, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying); + ai:{ + order:1, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; }, }, }, - subSkill: { - backup: {}, - used: { charlotte: true }, - given: { charlotte: true }, - ban: { - trigger: { global: 'useCard1' }, - filter: function (event, player) { + subSkill:{ + backup:{}, + used:{charlotte:true}, + given:{charlotte:true}, + ban:{ + trigger:{global:'useCard1'}, + filter:function(event,player){ return player.getStorage('twjichou').includes(event.card.name); }, - forced: true, - locked: false, - silent: true, - content: function () { + forced:true, + locked:false, + silent:true, + content:function(){ trigger.directHit.add(player); }, - mod: { - cardEnabled: function (card, player) { - if (player.getStorage('twjichou').includes(card.name) && (get.position(card) == 'h' || card.cards && card.cards.some(i => get.position(i) == 'h'))) return false; + mod:{ + cardEnabled:function(card,player){ + if(player.getStorage('twjichou').includes(card.name)&&(get.position(card)=='h'||card.cards&&card.cards.some(i=>get.position(i)=='h'))) return false; }, - cardSavable: function (card, player) { - if (player.getStorage('twjichou').includes(card.name) && (get.position(card) == 'h' || card.cards && card.cards.some(i => get.position(i) == 'h'))) return false; + cardSavable:function(card,player){ + if(player.getStorage('twjichou').includes(card.name)&&(get.position(card)=='h'||card.cards&&card.cards.some(i=>get.position(i)=='h'))) return false; }, - aiValue: function (player, card) { - if (get.type(card) != 'trick' || _status.twjichou_give_aiCheck) return; - if (!player.getFriends().length && player.getStorage('twjichou').includes(get.name(card))) return 0; + aiValue:function(player,card){ + if(get.type(card)!='trick'||_status.twjichou_give_aiCheck) return; + if(!player.getFriends().length&&player.getStorage('twjichou').includes(get.name(card))) return 0; }, - aiUseful: function () { - return lib.skill.twjichou_ban.mod.aiValue.apply(this, arguments); + aiUseful:function(){ + return lib.skill.twjichou_ban.mod.aiValue.apply(this,arguments); }, }, }, - use: { - filterCard: () => false, - selectCard: -1, - audio: 'twjichou', - popname: true, - onuse: function (links, player) { - player.markAuto('twjichou', [links.card.name]); + use:{ + filterCard:()=>false, + selectCard:-1, + audio:'twjichou', + popname:true, + onuse:function(links,player){ + player.markAuto('twjichou',[links.card.name]); player.syncStorage('twjichou'); player.addTempSkill('twjichou_used'); }, }, - give: { - audio: 'twjichou', - enable: 'phaseUse', - filter: function (event, player) { - return player.hasSkill('twjichou_used') && !player.hasSkill('twjichou_given') && player.countCards('h', i => player.getStorage('twjichou').includes(get.name(i))); + give:{ + audio:'twjichou', + enable:'phaseUse', + filter:function(event,player){ + return player.hasSkill('twjichou_used')&&!player.hasSkill('twjichou_given')&&player.countCards('h',i=>player.getStorage('twjichou').includes(get.name(i))); }, - filterTarget: function (card, player, target) { - return target != player; + filterTarget:function(card,player,target){ + return target!=player; }, - filterCard: function (card, player) { + filterCard:function(card,player){ return player.getStorage('twjichou').includes(get.name(card)); }, - check: function (card) { - _status.twjichou_give_aiCheck = true; - var val = get.value(card); + check:function(card){ + _status.twjichou_give_aiCheck=true; + var val=get.value(card); delete _status.twjichou_give_aiCheck; return val; }, - prompt: () => '选择要交出的牌和要交给的目标', - selectCard: 1, - discard: false, - lose: false, - delay: false, - content: function () { - player.give(cards, target); - player.addTempSkill('twjichou_given', 'phaseUseAfter'); + prompt:()=>'选择要交出的牌和要交给的目标', + selectCard:1, + discard:false, + lose:false, + delay:false, + content:function(){ + player.give(cards,target); + player.addTempSkill('twjichou_given','phaseUseAfter'); }, - ai: { - order: 0.9, - result: { - target: function (player, target) { - if (target.hasSkillTag('nogain')) return 0; - if (target.hasJudge('lebu')) return 0; - return target.getCards('h', card => player.getStorage('twjichou').includes(get.name(card))).reduce((p, c) => p + (target.getUseValue(c) || 1), 0); + ai:{ + order:0.9, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(target.hasJudge('lebu')) return 0; + return target.getCards('h',card=>player.getStorage('twjichou').includes(get.name(card))).reduce((p,c)=>p+(target.getUseValue(c)||1),0); } }, } }, } }, - twjilun: { - audio: 2, - trigger: { player: 'damageEnd' }, - direct: true, - content: function () { + twjilun:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ 'step 0' - var num = Math.min(Math.max(1, player.getStorage('twjichou').length), 5); - event.num = num; - var choices = ['选项一']; - var choiceList = ['摸' + get.cnNumber(num) + '张牌', '视为使用一张在〖急筹〗记录内且不在〖机论〗记录内的普通锦囊牌']; - if ((!player.getStorage('twjichou').length) || player.getStorage('twjichou').filter(name => { - return !player.getStorage('twjilun').includes(name) && player.hasUseTarget({ name: name }); - }).length == 0) - choiceList[1] = '' + choiceList[1] + ''; + var num=Math.min(Math.max(1,player.getStorage('twjichou').length),5); + event.num=num; + var choices=['选项一']; + var choiceList=['摸'+get.cnNumber(num)+'张牌','视为使用一张在〖急筹〗记录内且不在〖机论〗记录内的普通锦囊牌']; + if((!player.getStorage('twjichou').length)||player.getStorage('twjichou').filter(name=>{ + return !player.getStorage('twjilun').includes(name)&&player.hasUseTarget({name:name}); + }).length==0) + choiceList[1]=''+choiceList[1]+''; else choices.push('选项二'); - player.chooseControl(choices, 'cancel2').set('choiceList', choiceList).set('prompt', get.prompt('twjilun')).set('ai', () => { - if (_status.event.choiceList.length == 1 || !player.getStorage('twjichou').length) return 0; - var val = _status.event.num > 3 ? Math.min(1.5, 1 + (_status.event.num - 3) * 0.1) : 1; - for (var name of player.getStorage('twjichou')) { - if (player.getStorage('twjilun').includes(name)) continue; - if (player.getUseValue({ name: name }) > 4 * val) return 1; + player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('prompt',get.prompt('twjilun')).set('ai',()=>{ + if(_status.event.choiceList.length==1||!player.getStorage('twjichou').length) return 0; + var val=_status.event.num>3?Math.min(1.5,1+(_status.event.num-3)*0.1):1; + for(var name of player.getStorage('twjichou')){ + if(player.getStorage('twjilun').includes(name)) continue; + if(player.getUseValue({name:name})>4*val) return 1; } return 0; - }).set('num', num); + }).set('num',num); 'step 1' - if (result.control != 'cancel2') { - if (result.control == '选项一') { + if(result.control!='cancel2'){ + if(result.control=='选项一'){ player.logSkill('twjilun'); player.draw(num); event.finish(); } - else { - var list = []; - for (var name of player.getStorage('twjichou')) { - if (!player.getStorage('twjilun').includes(name)) { - list.push(['锦囊', '', name]); + else{ + var list=[]; + for(var name of player.getStorage('twjichou')){ + if(!player.getStorage('twjilun').includes(name)){ + list.push(['锦囊','',name]); } } - player.chooseButton(['###机论###
    是否视为使用一张〖急筹〗已记录的普通锦囊牌?
    ', [list, 'vcard']]).set('filterButton', button => { - return _status.event.player.hasUseTarget({ name: button.link[2] }); - }).set('ai', button => { - return _status.event.getParent().player.getUseValue({ name: button.link[2] }, null, true); + player.chooseButton(['###机论###
    是否视为使用一张〖急筹〗已记录的普通锦囊牌?
    ',[list,'vcard']]).set('filterButton',button=>{ + return _status.event.player.hasUseTarget({name:button.link[2]}); + }).set('ai',button=>{ + return _status.event.getParent().player.getUseValue({name:button.link[2]},null,true); }); } } else event.finish(); 'step 2' - if (result.bool) { - var card = { name: result.links[0][2], isCard: true }; - player.chooseUseTarget(card, true).set('logSkill', 'twjilun'); - player.markAuto('twjilun', [card.name]); + if(result.bool){ + var card={name:result.links[0][2],isCard:true}; + player.chooseUseTarget(card,true).set('logSkill','twjilun'); + player.markAuto('twjilun',[card.name]); player.syncStorage('twjilun'); } else event.goto(0); }, - marktext: '论', - intro: { - markcount: function (storage, player) { - if (storage && storage.length) return storage.length; + marktext:'论', + intro:{ + markcount:function(storage,player){ + if(storage&&storage.length) return storage.length; return 0; }, - content: '已记录牌名:$', + content:'已记录牌名:$', }, - ai: { - maixie: true, - maixie_defend: true, - threaten: 0.7, + ai:{ + maixie:true, + maixie_defend:true, + threaten:0.7, } }, //蹇硕 - twkunsi: { - audio: 2, - enable: 'phaseUse', - onremove: true, - derivation: 'twlinglu', - filter: function (event, player) { - return game.hasPlayer(function (current) { - return player.canUse({ name: 'sha', isCard: true }, current, false) && current != player && !player.getStorage('twkunsi').includes(current); + twkunsi:{ + audio:2, + enable:'phaseUse', + onremove:true, + derivation:'twlinglu', + filter:function(event,player){ + return game.hasPlayer(function(current){ + return player.canUse({name:'sha',isCard:true},current,false)&¤t!=player&&!player.getStorage('twkunsi').includes(current); }); }, - filterTarget: function (card, player, target) { - return player.canUse({ name: 'sha', isCard: true }, target, false) && target != player && !player.getStorage('twkunsi').includes(target); + filterTarget:function(card,player,target){ + return player.canUse({name:'sha',isCard:true},target,false)&&target!=player&&!player.getStorage('twkunsi').includes(target); }, - content: function () { + content:function(){ 'step 0' - player.markAuto('twkunsi', [target]); + player.markAuto('twkunsi',[target]); player.storage.twkunsi.sortBySeat(); player.markSkill('twkunsi'); - player.useCard({ name: 'sha', isCard: true }, target, false).animate = false; + player.useCard({name:'sha',isCard:true},target,false).animate=false; 'step 1' - if (!player.hasHistory('sourceDamage', function (evt) { - var card = evt.card; - if (!card || card.name != 'sha') return false; - var evtx = evt.getParent('useCard'); - return evtx.card == card && evtx.getParent() == event; - })) { + if(!player.hasHistory('sourceDamage',function(evt){ + var card=evt.card; + if(!card||card.name!='sha') return false; + var evtx=evt.getParent('useCard'); + return evtx.card==card&&evtx.getParent()==event; + })){ player.line(target); - target.markAuto('twlinglu', [player]); - target.addAdditionalSkills('twkunsi_temp', 'twlinglu'); - player.markAuto('twkunsi_clear', [target]); - player.addTempSkill('twkunsi_clear', { player: 'phaseBegin' }); + target.markAuto('twlinglu',[player]); + target.addAdditionalSkills('twkunsi_temp','twlinglu'); + player.markAuto('twkunsi_clear',[target]); + player.addTempSkill('twkunsi_clear',{player:'phaseBegin'}); } }, - intro: { content: '已对$发动过〖困兕〗' }, - ai: { - order: function () { - return get.order({ name: 'sha' }) - 0.1; + intro:{content:'已对$发动过〖困兕〗'}, + ai:{ + order:function(){ + return get.order({name:'sha'})-0.1; }, - expose: 0.2, - result: { - target: function (player, target) { - if (target.countCards('h') <= target.hp && !target.mayHaveShan(player, 'use', target.getCards('h', i => { + expose:0.2, + result:{ + target:function(player,target){ + if(target.countCards('h')<=target.hp&&!target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - })) && get.effect(target, { name: 'sha', isCard: true }, player, player) > 0) return -1; - else if (target.countCards('h') > target.hp && target.hp > 2 && target.hasShan()) return 1; + }))&&get.effect(target,{name:'sha',isCard:true},player,player)>0) return -1; + else if(target.countCards('h')>target.hp&&target.hp>2&&target.hasShan()) return 1; return 0; }, }, }, - subSkill: { - clear: { - forced: true, - onremove: function (player, skill) { - var targets = player.getStorage(skill); - for (var target of targets) { - if (target.isIn()) { + subSkill:{ + clear:{ + forced:true, + onremove:function(player,skill){ + var targets=player.getStorage(skill); + for(var target of targets){ + if(target.isIn()){ target.removeAdditionalSkill('twkunsi_temp'); } } @@ -3760,100 +3760,100 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - twlinglu: { - audio: 2, - trigger: { player: 'phaseUseBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player; + twlinglu:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player; }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twlinglu'), function (card, player, target) { - return target != player; - }).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target); - if (target.countCards('hs') > 4 && target.hp >= 3) return att; - if (player.getStorage('twlinglu').includes(target)) return -2 * att; + player.chooseTarget(get.prompt2('twlinglu'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.countCards('hs')>4&&target.hp>=3) return att; + if(player.getStorage('twlinglu').includes(target)) return -2*att; return -att; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twlinglu', target); - target.addTempSkill('twlinglu_order', { player: 'phaseAfter' }); - if (!target.storage.twlinglu_settle) target.storage.twlinglu_settle = []; - target.storage.twlinglu_settle.unshift([player, 1]); - if (player.getStorage('twlinglu').includes(target)) player.chooseBool('是否令' + get.translation(target) + '于〖令戮〗失败时进行两次结算?').set('ai', function () { return true }); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twlinglu',target); + target.addTempSkill('twlinglu_order',{player:'phaseAfter'}); + if(!target.storage.twlinglu_settle) target.storage.twlinglu_settle=[]; + target.storage.twlinglu_settle.unshift([player,1]); + if(player.getStorage('twlinglu').includes(target)) player.chooseBool('是否令'+get.translation(target)+'于〖令戮〗失败时进行两次结算?').set('ai',function(){return true}); else event.finish(); } else event.finish(); 'step 2' - if (result.bool) { + if(result.bool){ target.storage.twlinglu_settle[0][1]++; - game.log(target, '于本次强令失败时进行两次结算'); + game.log(target,'于本次强令失败时进行两次结算'); } }, - ai: { expose: 0.2 }, - subSkill: { - order: { - audio: 2, - trigger: { source: 'damageSource' }, - group: 'twlinglu_settle', - silent: true, - charlotte: true, - onremove: true, - mark: true, - marktext: '令', - intro: { - content: function (storage, player) { - return '
  • 任务目标:于你下回合结束前造成的伤害不小于2点
  • 已造成' + player.countMark('twlinglu_order') + '点伤害'; + ai:{expose:0.2}, + subSkill:{ + order:{ + audio:2, + trigger:{source:'damageSource'}, + group:'twlinglu_settle', + silent:true, + charlotte:true, + onremove:true, + mark:true, + marktext:'令', + intro:{ + content:function(storage,player){ + return '
  • 任务目标:于你下回合结束前造成的伤害不小于2点
  • 已造成'+player.countMark('twlinglu_order')+'点伤害'; } }, - content: function () { - player.addMark('twlinglu_order', trigger.num, false); + content:function(){ + player.addMark('twlinglu_order',trigger.num,false); }, }, - settle: { - audio: 'twlinglu_order', - trigger: { player: 'phaseEnd' }, - charlotte: true, - silent: true, - onremove: true, - filter: function (event, player) { - return player.getStorage('twlinglu_settle').length > 0; + settle:{ + audio:'twlinglu_order', + trigger:{player:'phaseEnd'}, + charlotte:true, + silent:true, + onremove:true, + filter:function(event,player){ + return player.getStorage('twlinglu_settle').length>0; }, - content: function () { + content:function(){ 'step 0' - var list = player.getStorage('twlinglu_settle').shift(); - var target = list[0], count = list[1] || 1; - event.target = target; event.count = count; + var list=player.getStorage('twlinglu_settle').shift(); + var target=list[0],count=list[1]||1; + event.target=target; event.count=count; 'step 1' - if (player.countMark('twlinglu_order') >= 2) { - game.log(player, '成功完成了', target, '发布的', '#g【令戮】', '强令'); - player.popup('强令成功', 'wood'); + if(player.countMark('twlinglu_order')>=2){ + game.log(player,'成功完成了',target,'发布的','#g【令戮】','强令'); + player.popup('强令成功','wood'); player.draw(2); event.finish(); } - else { - game.log(player, '未完成', target, '发布的', '#g【令戮】', '强令'); - player.popup('强令失败', 'fire'); + else{ + game.log(player,'未完成',target,'发布的','#g【令戮】','强令'); + player.popup('强令失败','fire'); } 'step 2' - if (player.countMark('twlinglu_order') >= 2) { + if(player.countMark('twlinglu_order')>=2){ game.delayx(); } - else { + else{ event.count--; player.loseHp(); } 'step 3' - if (event.count > 0) event.goto(2); + if(event.count>0) event.goto(2); 'step 4' - if (player.getStorage('twlinglu_settle').length > 0) { + if(player.getStorage('twlinglu_settle').length>0){ event.goto(0); game.delayx(); } @@ -3862,359 +3862,359 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //马腾 - twxiongzheng: { - audio: 2, - onremove: true, - trigger: { global: 'roundStart' }, - direct: true, - content: function () { + twxiongzheng:{ + audio:2, + onremove:true, + trigger:{global:'roundStart'}, + direct:true, + content:function(){ 'step 0' - var target = player.storage.twxiongzheng_target; + var target=player.storage.twxiongzheng_target; delete player.storage.twxiongzheng_target; - if (!target) { event.goto(4); return; } - event.target = target; - var list = [], list2 = []; - var history = target.actionHistory; - if (history.length < 2) { event.goto(4); return; } - for (var i = history.length - 2; i >= 0; i--) { - for (var evt of history[i].damage) { - if (evt.source) list.add(evt.source); + if(!target){event.goto(4);return;} + event.target=target; + var list=[],list2=[]; + var history=target.actionHistory; + if(history.length<2){event.goto(4);return;} + for(var i=history.length-2;i>=0;i--){ + for(var evt of history[i].damage){ + if(evt.source) list.add(evt.source); } - if (history[i].isRound) break; + if(history[i].isRound) break; } - var list2 = game.filterPlayer(i => i != player).removeArray(list); - event.list = list; event.list2 = list2; - var choiceList = [ - '视为对任意名上一轮未对' + get.translation(target) + '造成过伤害的角色使用一张【杀】', - '令任意名上一轮对' + get.translation(target) + '造成过伤害的角色摸两张牌' + var list2=game.filterPlayer(i=>i!=player).removeArray(list); + event.list=list; event.list2=list2; + var choiceList=[ + '视为对任意名上一轮未对'+get.translation(target)+'造成过伤害的角色使用一张【杀】', + '令任意名上一轮对'+get.translation(target)+'造成过伤害的角色摸两张牌' ]; - var choices = []; - if (list2.length) { + var choices=[]; + if(list2.length){ choices.push('选项一'); - choiceList[0] += '(' + get.translation(list2) + ')'; + choiceList[0]+='('+get.translation(list2)+')'; } - else choiceList[0] = '' + choiceList[0] + ''; - if (list.length) { + else choiceList[0]=''+choiceList[0]+''; + if(list.length){ choices.push('选项二'); - choiceList[1] += '(' + get.translation(list) + ')'; + choiceList[1]+='('+get.translation(list)+')'; } - else choiceList[1] = '' + choiceList[1] + ''; + else choiceList[1]=''+choiceList[1]+''; choices.push('cancel2'); - player.chooseControl(choices).set('prompt', '雄争:是否选择一项?').set('choiceList', choiceList).set('ai', function () { - var player = _status.event.player; - var list = _status.event.getParent().list, list2 = _status.event.getParent().list2; - var eff = list.map(target => { - if (target == player) return 0; - return get.effect(target, { name: 'sha' }, player, player); - }).reduce((p, c) => p + c, 0), eff2 = list2.map(target => 2 * get.effect(target, { name: 'draw' }, player, player)).reduce((p, c) => p + c, 0); - if (_status.event.controls.includes('选项二') && eff2 > eff) return '选项二'; - if (eff > 0) return 0; + player.chooseControl(choices).set('prompt','雄争:是否选择一项?').set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player; + var list=_status.event.getParent().list,list2=_status.event.getParent().list2; + var eff=list.map(target=>{ + if(target==player) return 0; + return get.effect(target,{name:'sha'},player,player); + }).reduce((p,c)=>p+c,0),eff2=list2.map(target=>2*get.effect(target,{name:'draw'},player,player)).reduce((p,c)=>p+c,0); + if(_status.event.controls.includes('选项二')&&eff2>eff) return '选项二'; + if(eff>0) return 0; return 'cancel2'; }); 'step 1' - if (result.control == '选项一') { - event.bool = true; - if (event.list2.length) player.chooseTarget('雄争:请选择任意名满足条件的角色,你视为依次对这些角色使用一张杀', [1, Infinity], true, function (card, player, target) { - return player.canUse('sha', target, false, false) && _status.event.getParent().list2.includes(target); - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'sha' }, player, player); + if(result.control=='选项一'){ + event.bool=true; + if(event.list2.length) player.chooseTarget('雄争:请选择任意名满足条件的角色,你视为依次对这些角色使用一张杀',[1,Infinity],true,function(card,player,target){ + return player.canUse('sha',target,false,false)&&_status.event.getParent().list2.includes(target); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); }); else event.finish(); } - else if (result.control == '选项二') { - event.bool = false; - if (event.list.length) player.chooseTarget('雄争:请选择任意名满足条件的角色,这些角色摸两张牌', [1, Infinity], true, function (card, player, target) { + else if(result.control=='选项二'){ + event.bool=false; + if(event.list.length) player.chooseTarget('雄争:请选择任意名满足条件的角色,这些角色摸两张牌',[1,Infinity],true,function(card,player,target){ return _status.event.getParent().list.includes(target); - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'draw' }, player, player); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'draw'},player,player); }); else event.finish(); } else event.goto(3); 'step 2' result.targets.sortBySeat(); - player.logSkill('twxiongzheng', result.targets); - if (event.bool) { - for (var i of result.targets) player.useCard({ name: 'sha', isCard: true }, i, false); + player.logSkill('twxiongzheng',result.targets); + if(event.bool){ + for(var i of result.targets) player.useCard({name:'sha',isCard:true},i,false); } - else game.asyncDraw(result.targets, 2); + else game.asyncDraw(result.targets,2); 'step 3' - if (!game.hasPlayer(function (current) { + if(!game.hasPlayer(function(current){ return !player.getStorage('twxiongzheng').includes(current); })) event.finish(); else game.delayx(); 'step 4' - player.chooseTarget(get.prompt('twxiongzheng'), '选择一名未选择过的角色,称为“雄争”角色', function (card, player, target) { + player.chooseTarget(get.prompt('twxiongzheng'),'选择一名未选择过的角色,称为“雄争”角色',function(card,player,target){ return !player.getStorage('twxiongzheng').includes(target); - }).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target); - if (game.roundNumber <= 1 && player.hasUnknown()) return 0; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(game.roundNumber<=1&&player.hasUnknown()) return 0; return -att; }); 'step 5' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twxiongzheng', target); - player.markAuto('twxiongzheng', [target]); - player.storage.twxiongzheng_target = target; - player.addTempSkill('twxiongzheng_mark', 'roundStart'); - target.addTempSkill('twxiongzheng_threaten', 'roundStart'); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twxiongzheng',target); + player.markAuto('twxiongzheng',[target]); + player.storage.twxiongzheng_target=target; + player.addTempSkill('twxiongzheng_mark','roundStart'); + target.addTempSkill('twxiongzheng_threaten','roundStart'); game.delayx(); } }, - subSkill: { - mark: { - intro: { - content: '$参与了〖雄争〗的争斗', - onunmark: true, + subSkill:{ + mark:{ + intro:{ + content:'$参与了〖雄争〗的争斗', + onunmark:true, }, - charlotte: true, - onremove: true, - trigger: { global: 'damage' }, - firstDo: true, - direct: true, - filter: function (event, player) { - return event.player == player.storage.twxiongzheng_target && get.itemtype(event.source) == 'player'; + charlotte:true, + onremove:true, + trigger:{global:'damage'}, + firstDo:true, + direct:true, + filter:function(event,player){ + return event.player==player.storage.twxiongzheng_target&&get.itemtype(event.source)=='player'; }, - content: function () { - player.markAuto('twxiongzheng_mark', [trigger.source]); + content:function(){ + player.markAuto('twxiongzheng_mark',[trigger.source]); }, }, - threaten: { - mark: true, - intro: { content: '本轮〖雄争〗目标' }, - ai: { threaten: 10 }, + threaten:{ + mark:true, + intro:{content:'本轮〖雄争〗目标'}, + ai:{threaten:10}, }, }, }, - twluannian: { - audio: 2, - global: 'twluannian_global', - unique: true, - zhuSkill: true, - subSkill: { - global: { - audio: 'twluannian', - enable: 'phaseUse', - usable: 1, - forceaudio: true, - onChooseToUse: function (event) { - if (!game.online) { - var num = 1; - game.countPlayer2(current => { - var history = current.actionHistory; - for (var i = history.length - 1; i >= 0; i--) { - for (var evt of history[i].useSkill) { - if (evt.skill == 'twluannian_global') num++; + twluannian:{ + audio:2, + global:'twluannian_global', + unique:true, + zhuSkill:true, + subSkill:{ + global:{ + audio:'twluannian', + enable:'phaseUse', + usable:1, + forceaudio:true, + onChooseToUse:function(event){ + if(!game.online){ + var num=1; + game.countPlayer2(current=>{ + var history=current.actionHistory; + for(var i=history.length-1;i>=0;i--){ + for(var evt of history[i].useSkill){ + if(evt.skill=='twluannian_global') num++; } - if (history[i].isRound) break; + if(history[i].isRound) break; } }); - event.set('twluannian_num', num); + event.set('twluannian_num',num); } }, - filter: function (event, player) { - if (!event.twluannian_num) return false; - return player.group == 'qun' && player.countCards('he') >= event.twluannian_num && game.hasPlayer(function (current) { - var target = current.storage.twxiongzheng_target; - return target && target.isIn() && current != player && current.hasZhuSkill('twluannian', player) + filter:function(event,player){ + if(!event.twluannian_num) return false; + return player.group=='qun'&&player.countCards('he')>=event.twluannian_num&&game.hasPlayer(function(current){ + var target=current.storage.twxiongzheng_target; + return target&&target.isIn()&¤t!=player&¤t.hasZhuSkill('twluannian',player) }) }, - filterCard: true, - position: 'he', - prompt: function () { - var player = _status.event.player; - var num = _status.event.twluannian_num - var list = game.filterPlayer(function (current) { - return current.hasZhuSkill('twluannian', player); - }).map(i => i.storage.twxiongzheng_target).sortBySeat(); - return '弃置' + get.cnNumber(num) + '张牌,对' + get.translation(list) + (list.length > 1 ? '中的一人' : '') + '造成1点伤害'; + filterCard:true, + position:'he', + prompt:function(){ + var player=_status.event.player; + var num=_status.event.twluannian_num + var list=game.filterPlayer(function(current){ + return current.hasZhuSkill('twluannian',player); + }).map(i=>i.storage.twxiongzheng_target).sortBySeat(); + return '弃置'+get.cnNumber(num)+'张牌,对'+get.translation(list)+(list.length>1?'中的一人':'')+'造成1点伤害'; }, - selectCard: function () { + selectCard:function(){ return _status.event.twluannian_num; }, - complexSelect: true, - complexCard: true, - filterTarget: function (card, player, target) { - return game.filterPlayer(function (current) { - return current.hasZhuSkill('twluannian', player); - }).map(i => i.storage.twxiongzheng_target).includes(target); + complexSelect:true, + complexCard:true, + filterTarget:function(card,player,target){ + return game.filterPlayer(function(current){ + return current.hasZhuSkill('twluannian',player); + }).map(i=>i.storage.twxiongzheng_target).includes(target); }, - selectTarget: function () { - return game.filterPlayer(function (current) { - return current.hasZhuSkill('twluannian', _status.event.player); - }).map(i => i.storage.twxiongzheng_target).filter(i => i && i.isIn()).length > 1 ? 1 : -1; + selectTarget:function(){ + return game.filterPlayer(function(current){ + return current.hasZhuSkill('twluannian',_status.event.player); + }).map(i=>i.storage.twxiongzheng_target).filter(i=>i&&i.isIn()).length>1?1:-1; }, - check: function (card) { - return 6 - get.value(card); + check:function(card){ + return 6-get.value(card); }, - content: function () { + content:function(){ target.damage(); }, - ai: { - order: 7, - result: { - target: function (player, target) { - return get.damageEffect(target, player, target); + ai:{ + order:7, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target); } }, - expose: 0.25, + expose:0.25, }, }, }, }, //鲍信 - twmutao: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: function (card, player, target) { + twmutao:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ return target.countCards('h'); }, - content: function () { + content:function(){ 'step 0' - event.togive = target.getNext(); - var cards = target.getCards('h', { name: 'sha' }); - if (!cards.length) { - game.log('但', target, '没有', '#y杀', '!'); + event.togive=target.getNext(); + var cards=target.getCards('h',{name:'sha'}); + if(!cards.length){ + game.log('但',target,'没有','#y杀','!'); event.finish(); } 'step 1' - var cards = target.getCards('h', { name: 'sha' }), card = cards.randomRemove(1)[0]; - target.give(card, event.togive); - if (cards.length) { - event.togive = event.togive.getNext(); + var cards=target.getCards('h',{name:'sha'}),card=cards.randomRemove(1)[0]; + target.give(card,event.togive); + if(cards.length){ + event.togive=event.togive.getNext(); event.redo(); } 'step 2' target.line(event.togive); - event.togive.damage(Math.min(2, event.togive.countCards('h', { name: 'sha' })), target); + event.togive.damage(Math.min(2,event.togive.countCards('h',{name:'sha'})),target); }, - ai: { - order: 10, - result: { - target: function (player, target) { - var num = 0, numx = target.countCards('h', { name: 'sha' }), targetx = target; - for (var i = 0; i < numx; i++) { - targetx = targetx.next; - if (targetx == player) targetx = targetx.next; + ai:{ + order:10, + result:{ + target:function(player,target){ + var num=0,numx=target.countCards('h',{name:'sha'}),targetx=target; + for(var i=0; i 0 && att2 < 0) num = 0.25; - if (att1 < 0 && att2 < 0) num = 4; - return att1 * num * numx * (targetx.countCards('h', { name: 'sha' }) + 1); + var att1=get.attitude(player,target),att2=get.attitude(player,targetx); + if(att1>0&&att2<0) num=0.25; + if(att1<0&&att2<0) num=4; + return att1*num*numx*(targetx.countCards('h',{name:'sha'})+1); }, }, }, }, - twyimou: { - audio: 2, - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - return event.player.isIn() && get.distance(player, event.player) <= 1; + twyimou:{ + audio:2, + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return event.player.isIn()&&get.distance(player,event.player)<=1; }, - logTarget: 'player', - check: function (event, player) { - return get.attitude(player, event.player) > 0; + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)>0; }, - content: function () { + content:function(){ 'step 0' - if (trigger.player != player) player.addExpose(0.3); - var target = get.translation(trigger.player); - var choiceList = [ - '令' + target + '获得牌堆里的一张【杀】', - '令' + target + '将一张牌交给另一名角色,然后' + target + '摸两张牌', - '背水!' + (trigger.player != player ? '将所有手牌交给' + target + ',然后' : '') + '依次执行以上所有选项', + if(trigger.player!=player) player.addExpose(0.3); + var target=get.translation(trigger.player); + var choiceList=[ + '令'+target+'获得牌堆里的一张【杀】', + '令'+target+'将一张牌交给另一名角色,然后'+target+'摸两张牌', + '背水!'+(trigger.player!=player?'将所有手牌交给'+target+',然后':'')+'依次执行以上所有选项', ]; - var list = ['选项一']; - if (trigger.player.countCards('h')) list.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - if (player.countCards('h')) list.push('背水!'); - else choiceList[2] = '' + choiceList[2] + ''; - player.chooseControl(list).set('prompt', '毅谋:请选择一项').set('choiceList', choiceList).set('ai', function () { - var evt = _status.event.getTrigger(), list = _status.event.list; - var player = _status.event.player; - var target = evt.player; - if ((target.hp >= target.countCards('h') + 2 || target == player) && list.includes('背水!')) return '背水!'; - if (target.countCards('h') && list.includes('选项二')) return '选项二'; + var list=['选项一']; + if(trigger.player.countCards('h')) list.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(player.countCards('h')) list.push('背水!'); + else choiceList[2]=''+choiceList[2]+''; + player.chooseControl(list).set('prompt','毅谋:请选择一项').set('choiceList',choiceList).set('ai',function(){ + var evt=_status.event.getTrigger(),list=_status.event.list; + var player=_status.event.player; + var target=evt.player; + if((target.hp>=target.countCards('h')+2||target==player)&&list.includes('背水!')) return '背水!'; + if(target.countCards('h')&&list.includes('选项二')) return '选项二'; return '选项一'; - }).set('list', list); + }).set('list',list); 'step 1' - event.choice = result.control; - if (event.choice == '背水!' && player != trigger.player) player.give(player.getCards('h'), trigger.player); + event.choice=result.control; + if(event.choice=='背水!'&&player!=trigger.player) player.give(player.getCards('h'),trigger.player); 'step 2' - if (event.choice != '选项二') { - var card = get.cardPile2(function (card) { - return card.name == 'sha'; + if(event.choice!='选项二'){ + var card=get.cardPile2(function(card){ + return card.name=='sha'; }); - if (card) trigger.player.gain(card, 'gain2'); - else game.log('但牌堆里已经没有', '#y杀', '了!'); - if (event.choice == '选项一') event.finish(); + if(card) trigger.player.gain(card,'gain2'); + else game.log('但牌堆里已经没有','#y杀','了!'); + if(event.choice=='选项一') event.finish(); } 'step 3' - if (event.choice != '选项一') { - if (trigger.player.countCards('h')) trigger.player.chooseCardTarget({ - prompt: '将一张手牌交给另一名其他角色并摸两张牌', - filterCard: true, - forced: true, - filterTarget: lib.filter.notMe, - ai1: function (card) { - return 1 / Math.max(0.1, get.value(card)); + if(event.choice!='选项一'){ + if(trigger.player.countCards('h')) trigger.player.chooseCardTarget({ + prompt:'将一张手牌交给另一名其他角色并摸两张牌', + filterCard:true, + forced:true, + filterTarget:lib.filter.notMe, + ai1:function(card){ + return 1/Math.max(0.1,get.value(card)); }, - ai2: function (target) { - var player = _status.event.player, att = get.attitude(player, target); - if (target.hasSkillTag('nogain')) att /= 9; - return 4 + att; + ai2:function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) att/=9; + return 4+att; }, }); else event.finish(); } 'step 4' - var target = result.targets[0]; + var target=result.targets[0]; trigger.player.line(target); - trigger.player.give(result.cards, target); + trigger.player.give(result.cards,target); trigger.player.draw(2); }, - ai: { - threaten: 2.5, + ai:{ + threaten:2.5, }, }, //刘夫人 - twzhuidu: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player && current.isDamaged(); + twzhuidu:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged(); }); }, - filterTarget: function (card, player, target) { - if (player == target) return false; + filterTarget:function(card,player,target){ + if(player==target) return false; return target.isDamaged(); }, - chooseButton: { - dialog: function (event, player) { - var name = get.translation(event.result.targets[0]); - var dialog = ui.create.dialog('追妒:选择一项', 'hidden'); + chooseButton:{ + dialog:function(event,player){ + var name=get.translation(event.result.targets[0]); + var dialog=ui.create.dialog('追妒:选择一项','hidden'); dialog.add([[ - ['damage', '对' + name + '造成1点伤害'], - ['discard', '弃置' + name + '装备区里的一张牌'], - ['both', '背水!若该角色为女性,弃置一张牌,然后依次执行以上所有选项'], - ], 'textbutton']); + ['damage','对'+name+'造成1点伤害'], + ['discard','弃置'+name+'装备区里的一张牌'], + ['both','背水!若该角色为女性,弃置一张牌,然后依次执行以上所有选项'], + ],'textbutton']); return dialog; }, - filter: function (button, player) { - var target = _status.event.getParent().result.targets[0]; - var link = button.link; - if (link == 'damage') return true; - if (link == 'discard') return target.countCards('e'); - return target.hasSex('female') && player.countDiscardableCards(player, 'he') > 0; + filter:function(button,player){ + var target=_status.event.getParent().result.targets[0]; + var link=button.link; + if(link=='damage') return true; + if(link=='discard') return target.countCards('e'); + return target.hasSex('female')&&player.countDiscardableCards(player,'he')>0; }, - check: function (button) { - switch (button.link) { + check:function(button){ + switch (button.link){ case 'damage': return 10; case 'discard': @@ -4223,1081 +4223,1081 @@ game.import('character', function (lib, game, ui, get, ai, _status) { return 15; } }, - backup: function (links) { - var backup = { - audio: 'twzhuidu', - target: _status.event.result.targets[0], - choice: links[0], - filterTarget: function (card, player, target) { - return target == lib.skill.twzhuidu_backup.target; + backup:function(links){ + var backup={ + audio:'twzhuidu', + target:_status.event.result.targets[0], + choice:links[0], + filterTarget:function(card,player,target){ + return target==lib.skill.twzhuidu_backup.target; }, - selectTarget: -1, - content: function () { - var target = lib.skill.twzhuidu_backup.target; - var choice = lib.skill.twzhuidu_backup.choice; - if (choice != 'discard') target.damage(); - if (choice != 'damage') player.discardPlayerCard(target, 'e', true); + selectTarget:-1, + content:function(){ + var target=lib.skill.twzhuidu_backup.target; + var choice=lib.skill.twzhuidu_backup.choice; + if(choice!='discard') target.damage(); + if(choice!='damage') player.discardPlayerCard(target,'e',true); } } - if (links[0] == 'both') { - backup.filterCard = true; - backup.position = 'he'; + if(links[0]=='both'){ + backup.filterCard=true; + backup.position='he'; } return backup; }, - prompt: function (links) { - var name = get.translation(_status.event.result.targets[0]); - switch (links[0]) { + prompt:function(links){ + var name=get.translation(_status.event.result.targets[0]); + switch (links[0]){ case 'damage': - return '对' + name + '造成1点伤害'; + return '对'+name+'造成1点伤害'; case 'discard': - return '弃置' + name + '装备区里的一张牌'; + return '弃置'+name+'装备区里的一张牌'; case 'both': - return '背水!弃置一张牌,然后对' + name + '造成1点伤害并弃置其装备区里的一张牌'; + return '背水!弃置一张牌,然后对'+name+'造成1点伤害并弃置其装备区里的一张牌'; } }, }, - subSkill: { - backup: {}, + subSkill:{ + backup:{}, }, - ai: { - order: 7, - result: { - target: function (player, target) { - if (target.hasSex('female') && target.countCards('e') && player.countCards('he')) return -2; + ai:{ + order:7, + result:{ + target:function(player,target){ + if(target.hasSex('female')&&target.countCards('e')&&player.countCards('he')) return -2; return -1; }, }, }, }, - twshigong: { - audio: 2, - trigger: { player: 'dying' }, - filter: function (event, player) { - var target = _status.currentPhase; - return player.hp <= 0 && target && target.isIn() && target != player; + twshigong:{ + audio:2, + trigger:{player:'dying'}, + filter:function(event,player){ + var target=_status.currentPhase; + return player.hp<=0&&target&&target.isIn()&&target!=player; }, - skillAnimation: true, - animationColor: 'gray', - limited: true, - logTarget: function (event, player) { + skillAnimation:true, + animationColor:'gray', + limited:true, + logTarget:function(event,player){ return _status.currentPhase; }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twshigong'); - var target = _status.currentPhase; - if (target.hp <= 0) event._result = { bool: false }; - else target.chooseToDiscard('h', target.hp, get.translation(player) + '对你发动了【示恭】,是否弃置' + get.cnNumber(target.hp) + '张手牌?', '若如此做,其将体力回复至1点;或者点击“取消”加1点体力上限并回复1点体力,摸一张牌,然后其将体力回复至体力上限').set('ai', card => { - if (!_status.event.goon) return 0; - return 7 - get.value(card); - }).set('goon', get.attitude(target, player) >= 0); + var target=_status.currentPhase; + if(target.hp<=0) event._result={bool:false}; + else target.chooseToDiscard('h',target.hp,get.translation(player)+'对你发动了【示恭】,是否弃置'+get.cnNumber(target.hp)+'张手牌?','若如此做,其将体力回复至1点;或者点击“取消”加1点体力上限并回复1点体力,摸一张牌,然后其将体力回复至体力上限').set('ai',card=>{ + if(!_status.event.goon) return 0; + return 7-get.value(card); + }).set('goon',get.attitude(target,player)>=0); 'step 1' - var target = _status.currentPhase; - if (result.bool) { - var num = 1 - player.hp; - if (num > 0) player.recover(num); + var target=_status.currentPhase; + if(result.bool){ + var num=1-player.hp; + if(num>0) player.recover(num); event.finish(); } - else { + else{ target.gainMaxHp(); target.recover(); target.draw(); } 'step 2' - var num = player.maxHp - player.hp; - if (num > 0) player.recover(num); + var num=player.maxHp-player.hp; + if(num>0) player.recover(num); }, }, //王淩 - twmibei: { - audio: 'mibei', - trigger: { player: 'useCardAfter' }, - group: ['twmibei_mark', 'twmibei_fail'], - forced: true, - locked: false, - direct: true, - dutySkill: true, - derivation: 'twmouli', - filter: function (event, player) { - var map = { basic: 0, trick: 0, equip: 0 }; - for (var name of player.getStorage('twmibei')) { - var type = get.type2(name); - if (typeof map[type] == 'number') map[type]++; + twmibei:{ + audio:'mibei', + trigger:{player:'useCardAfter'}, + group:['twmibei_mark','twmibei_fail'], + forced:true, + locked:false, + direct:true, + dutySkill:true, + derivation:'twmouli', + filter:function(event,player){ + var map={basic:0,trick:0,equip:0}; + for(var name of player.getStorage('twmibei')){ + var type=get.type2(name); + if(typeof map[type]=='number') map[type]++; } - for (var i in map) { - if (map[i] < 2) return false; + for(var i in map){ + if(map[i]<2) return false; } return true; }, - content: function () { + content:function(){ player.awakenSkill('twmibei'); player.logSkill('twmibei_achieve'); - game.log(player, '成功完成使命'); - player.addSkills('twmouli'); + game.log(player,'成功完成使命'); + player.addSkils('twmouli'); }, - intro: { content: '已使用牌名:$' }, - subSkill: { - achieve: { - audio: 'mibei1', - skillAnimation: true, - animationColor: 'water', + intro:{content:'已使用牌名:$'}, + subSkill:{ + achieve:{ + audio:'mibei1', + skillAnimation:true, + animationColor:'water', }, - mark: { - trigger: { player: 'useCard1' }, - filter: function (event, player) { + mark:{ + trigger:{player:'useCard1'}, + filter:function(event,player){ return !player.getStorage('twmibei').includes(event.card.name); }, - charlotte: true, - forced: true, - silent: true, - dutySkill: true, - content: function () { - player.markAuto('twmibei', [trigger.card.name]); + charlotte:true, + forced:true, + silent:true, + dutySkill:true, + content:function(){ + player.markAuto('twmibei',[trigger.card.name]); }, }, - fail: { - audio: 'mibei2', - trigger: { player: 'phaseUseEnd' }, - forced: true, - filter: function (event, player) { + fail:{ + audio:'mibei2', + trigger:{player:'phaseUseEnd'}, + forced:true, + filter:function(event,player){ return !player.getHistory('useCard').length; }, - content: function () { - game.log(player, '使命失败'); + content:function(){ + game.log(player,'使命失败'); delete player.storage.twmibei; player.addTempSkill('twmibei_less'); - player.addMark('twmibei_less', 1, false); + player.addMark('twmibei_less',1,false); }, }, - less: { - charlotte: true, - marktext: '缚', - intro: { content: '本回合手牌上限-#' }, - mod: { - maxHandcard: function (player, num) { - return num - player.countMark('twmibei_less'); + less:{ + charlotte:true, + marktext:'缚', + intro:{content:'本回合手牌上限-#'}, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('twmibei_less'); }, }, }, }, }, - twxingqi: { - audio: 'xingqi', - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - var num = 0; - game.countPlayer(function (current) { - num += current.countCards('ej'); + twxingqi:{ + audio:'xingqi', + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + var num=0; + game.countPlayer(function(current){ + num+=current.countCards('ej'); }); - return num > player.hp; + return num>player.hp; }, - forced: true, - juexingji: true, - skillAnimation: true, - animationColor: 'thunder', - content: function () { + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ player.awakenSkill('twxingqi'); player.recover(); - if (!player.awakenedSkills.includes('twmibei')) { - var list = ['basic', 'equip', 'trick'], cards = []; - for (var i of list) { - var card = get.cardPile2(function (card) { - return get.type(card) == i; + if(!player.awakenedSkills.includes('twmibei')){ + var list=['basic','equip','trick'],cards=[]; + for(var i of list){ + var card=get.cardPile2(function(card){ + return get.type(card)==i; }); - if (card) cards.push(card); + if(card) cards.push(card); } - if (cards.length) player.gain(cards, 'gain2'); + if(cards.length) player.gain(cards,'gain2'); } else player.addSkill('twxingqi_range'); }, - subSkill: { - range: { - charlotte: true, - mark: true, - marktext: '启', - mod: { - targetInRange: () => true, + subSkill:{ + range:{ + charlotte:true, + mark:true, + marktext:'启', + mod:{ + targetInRange:()=>true, }, - intro: { content: '使用牌无距离限制' }, + intro:{content:'使用牌无距离限制'}, }, }, }, - twmouli: { - audio: 'mouli', - enable: 'chooseToUse', - filter: function (event, player) { - if (event.type == 'wuxie') return false; - if (player.hasSkill('twmouli_used')) return false; - if (!Array.isArray(event.twmouli)) return false; - for (var card of event.twmouli) { - if (event.filterCard(card, player, event)) return true; + twmouli:{ + audio:'mouli', + enable:'chooseToUse', + filter:function(event,player){ + if(event.type=='wuxie') return false; + if(player.hasSkill('twmouli_used')) return false; + if(!Array.isArray(event.twmouli)) return false; + for(var card of event.twmouli){ + if(event.filterCard(card,player,event)) return true; } return false; }, - onChooseToUse: function (event) { - if (game.online || !event.player.hasSkill('twmouli')) return; - var cards = []; - for (var i = 0; i < ui.cardPile.childNodes.length; i++) { - var card = ui.cardPile.childNodes[i]; - if (get.type(card) == 'basic') cards.push(card); + onChooseToUse:function(event){ + if(game.online||!event.player.hasSkill('twmouli')) return; + var cards=[]; + for(var i=0;i false, - selectCard: -1, - viewAs: { name: links[0].name, isCard: true, cards: [links[0]] }, - popname: true, - precontent: function () { + audio:'mouli', + filterCard:()=>false, + selectCard:-1, + viewAs:{name:links[0].name,isCard:true,cards:[links[0]]}, + popname:true, + precontent:function(){ player.logSkill('twmouli'); player.addTempSkill('twmouli_used'); delete event.result.skill; - var name = event.result.card.name; - event.result.cards = event.result.card.cards; - event.result.card = get.autoViewAs(event.result.cards[0]); - event.result.card.name = name; - var next = game.createEvent('twmouli_update'); + var name=event.result.card.name; + event.result.cards=event.result.card.cards; + event.result.card=get.autoViewAs(event.result.cards[0]); + event.result.card.name=name; + var next=game.createEvent('twmouli_update'); event.next.remove(next); event.getParent().after.push(next); - next.setContent(function () { game.updateRoundNumber() }); + next.setContent(function(){game.updateRoundNumber()}); }, } }, - prompt: function (links, player) { - return '使用牌堆中的' + get.translation(links); + prompt:function(links,player){ + return '使用牌堆中的'+get.translation(links); }, }, - hiddenCard: function (player, name) { - return get.type(name) == 'basic' && !player.getStat('skill').twmouli; + hiddenCard:function(player,name){ + return get.type(name)=='basic'&&!player.getStat('skill').twmouli; }, - subSkill: { - used: { charlotte: true }, + subSkill:{ + used:{charlotte:true}, }, - ai: { - effect: { - target: function (card, player, target, effect) { - if (get.tag(card, 'respondShan')) return 0.7; - if (get.tag(card, 'respondSha')) return 0.7; + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')) return 0.7; + if(get.tag(card,'respondSha')) return 0.7; }, }, - order: 11, - respondSha: true, - respondShan: true, - fireAttack: true, - skillTagFilter: function (player, tag, arg) { - if (arg == 'respond') return false; - var list = []; - for (var i = 0; i < ui.cardPile.childNodes.length; i++) { - var card = ui.cardPile.childNodes[i]; - if (get.type(card, player) == 'basic' && !list.includes(card.name)) list.push(card.name); + order:11, + respondSha:true, + respondShan:true, + fireAttack:true, + skillTagFilter:function(player,tag,arg){ + if(arg=='respond') return false; + var list=[]; + for(var i=0;i cards.some(card => get.type2(card) == type)); - player.chooseControl(list).set('ai', function () { - var listy = ['basic', 'trick', 'equip'], listz = [0, 0, 0]; - var num = 0, numx = 0, num2 = 0, numx2 = 0; - for (var i of _status.event.getParent().cards) { - for (var j = 0; j < 2; j++) { - if (get.type2(i) == listy[j]) listz[j]++; + var list=['basic','trick','equip'].filter(type=>cards.some(card=>get.type2(card)==type)); + player.chooseControl(list).set('ai',function(){ + var listy=['basic','trick','equip'],listz=[0,0,0]; + var num=0,numx=0,num2=0,numx2=0; + for(var i of _status.event.getParent().cards){ + for(var j=0;j<2;j++){ + if(get.type2(i)==listy[j]) listz[j]++; } } - for (var k = 0; k < 2; k++) { - if (listz[k] > num) { - num = listz[k]; - numx = k; + for(var k=0;k<2;k++){ + if(listz[k]>num){ + num=listz[k]; + numx=k; } - if (listz[k] < num2) { - num2 = listz[k]; - numx2 = k; + if(listz[k] 2) return listy[numx2]; + if(!_status.event.player.hasFriend()&&player.hp>2) return listy[numx2]; return listy[numx]; }); 'step 2' - game.broadcastAll('closeDialog', event.videoId); - event.cardsx = []; - var type = result.control; - for (var j of cards) { - if (type == get.type2(j)) event.cardsx.push(j); + game.broadcastAll('closeDialog',event.videoId); + event.cardsx=[]; + var type=result.control; + for(var j of cards){ + if(type==get.type2(j)) event.cardsx.push(j); } - var time = 1000 - (get.utc() - event.time); - if (time > 0) game.delay(0, time); - player.$gain2(event.cardsx, false); + var time=1000-(get.utc()-event.time); + if(time>0) game.delay(0,time); + player.$gain2(event.cardsx,false); game.delayx(); - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; - event.num = 0; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + event.num=0; 'step 3' - if (event.cardsx.length > 1) { - player.chooseCardButton('兴乱:请选择要分配的牌', true, event.cardsx, [1, Math.min(3, event.cardsx.length)]).set('ai', function (button) { - if (ui.selected.buttons.length == 0) return 1; + if(event.cardsx.length>1){ + player.chooseCardButton('兴乱:请选择要分配的牌',true,event.cardsx,[1,Math.min(3,event.cardsx.length)]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; return 0; }); } - else if (event.cardsx.length == 1) { - event._result = { links: event.cardsx.slice(0), bool: true }; + else if(event.cardsx.length==1){ + event._result={links:event.cardsx.slice(0),bool:true}; } - else { + else{ event.goto(6); } 'step 4' - if (result.bool) { - var cards = result.links; - event.togive = cards.slice(0); - player.chooseTarget('选择获得' + get.translation(cards) + '的角色', event.cardsx.length == 1, (card, player, target) => { - var map = _status.event.getParent().given_map; - var togive = _status.event.getParent().togive; - return (map[target.playerid] || []).length + togive.length <= 3; - }).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target); - var map = _status.event.getParent().given_map; - var togive = _status.event.getParent().togive; - var num = (map[player.playerid] || []).length, num2 = (map[target.playerid] || []).length; - var value = _status.event.value, eff = get.effect(target, { name: 'losehp' }, player, player); - if (num2 + togive.length == num && player != target) return value * Math.sign(att) + eff + 1000; - else { - if (value < 0) return -att + 1000; - else if (att > 0) return 1.5 * att / (1 + target.countCards('h')) + (player == target ? eff / 3 : 0) + 1000; - else return att / 100 + 1000; + if(result.bool){ + var cards=result.links; + event.togive=cards.slice(0); + player.chooseTarget('选择获得'+get.translation(cards)+'的角色',event.cardsx.length==1,(card,player,target)=>{ + var map=_status.event.getParent().given_map; + var togive=_status.event.getParent().togive; + return (map[target.playerid]||[]).length+togive.length<=3; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + var map=_status.event.getParent().given_map; + var togive=_status.event.getParent().togive; + var num=(map[player.playerid]||[]).length,num2=(map[target.playerid]||[]).length; + var value=_status.event.value,eff=get.effect(target,{name:'losehp'},player,player); + if(num2+togive.length==num&&player!=target) return value*Math.sign(att)+eff+1000; + else{ + if(value<0) return -att+1000; + else if(att>0) return 1.5*att/(1+target.countCards('h'))+(player==target?eff/3:0)+1000; + else return att/100+1000; } - }).set('value', cards.reduce((p, c) => p + get.value(c, player, 'raw'), 0)); + }).set('value',cards.reduce((p,c)=>p+get.value(c,player,'raw'),0)); } 'step 5' - if (result.bool) { + if(result.bool){ event.cardsx.removeArray(event.togive); - if (result.targets.length) { - var id = result.targets[0].playerid, map = event.given_map; - if (!map[id]) map[id] = []; + if(result.targets.length){ + var id=result.targets[0].playerid,map=event.given_map; + if(!map[id]) map[id]=[]; map[id].addArray(event.togive); } - if (event.cardsx.length > 0) event.goto(3); + if(event.cardsx.length>0) event.goto(3); } else event.goto(3); 'step 6' - if (_status.connectMode) { - game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - var list = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - if (player == source) event.num += event.given_map[i].length; - player.line(source, 'green'); - game.log(source, '获得了', event.given_map[i]); - list.push([source, event.given_map[i]]); + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + if(player==source) event.num+=event.given_map[i].length; + player.line(source,'green'); + game.log(source,'获得了',event.given_map[i]); + list.push([source,event.given_map[i]]); } game.loseAsync({ - gain_list: list, - giver: player, - animate: 'gain2', + gain_list:list, + giver:player, + animate:'gain2', }).setContent('gaincardMultiple'); 'step 7' - var list = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - if (event.given_map[i].length >= num) list.push(source); + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + if(event.given_map[i].length>=num) list.push(source); } list.sortBySeat(); player.line(list); - for (var i of list) { + for(var i of list){ i.loseHp(); } }, }, //许靖 - twboming: { - audio: 'boming', - enable: 'phaseUse', - usable: 2, - filter: function (event, player) { + twboming:{ + audio:'boming', + enable:'phaseUse', + usable:2, + filter:function(event,player){ return player.countCards('he'); }, - filterCard: true, - position: 'he', - filterTarget: lib.filter.notMe, - discard: false, - lose: false, - delay: false, - content: function () { - player.give(cards, target); + filterCard:true, + position:'he', + filterTarget:lib.filter.notMe, + discard:false, + lose:false, + delay:false, + content:function(){ + player.give(cards,target); }, - check: function (card) { - return 5 - get.value(card); + check:function(card){ + return 5-get.value(card); }, - ai: { - order: 10, - result: { - target: function (player, target) { - if (!ui.selected.cards.length) return 0; - var card = ui.selected.cards[0]; - if (get.attitude(player, target) < 0 && player.hasSkill('twejian')) { - var dam = get.damageEffect(target, player, target); - if (dam > 0) return dam; - var type = get.type(card, target), ts = target.getCards('he', function (card) { - return get.type(card) == type; + ai:{ + order:10, + result:{ + target:function(player,target){ + if(!ui.selected.cards.length) return 0; + var card=ui.selected.cards[0]; + if(get.attitude(player,target)<0&&player.hasSkill('twejian')){ + var dam=get.damageEffect(target,player,target); + if(dam>0) return dam; + var type=get.type(card,target),ts=target.getCards('he',function(card){ + return get.type(card)==type; }); - if (ts.length) { - var val = get.value(ts, target); - if (val > get.value(card)) return -Math.max(1, val); + if(ts.length){ + var val=get.value(ts,target); + if(val>get.value(card)) return -Math.max(1,val); return 0; } } - return get.value(card, target) / 1.5; + return get.value(card,target)/1.5; }, }, }, - group: 'twboming_draw', - subSkill: { - draw: { - audio: 'boming', - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - locked: false, - filter: function (event, player) { - var num = 0; - for (var target of game.filterPlayer(i => i != player)) { - target.getHistory('gain', evt => num += evt.cards.length); - if (num > 1) return true; + group:'twboming_draw', + subSkill:{ + draw:{ + audio:'boming', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + var num=0; + for(var target of game.filterPlayer(i=>i!=player)){ + target.getHistory('gain',evt=>num+=evt.cards.length); + if(num>1) return true; } return false; }, - content: function () { + content:function(){ player.draw(2); }, }, }, }, - twejian: { - audio: 'ejian', - trigger: { - global: ['gainAfter', 'loseAsyncAfter'] + twejian:{ + audio:'ejian', + trigger:{ + global:['gainAfter','loseAsyncAfter'] }, - filter: function (event, player) { - if (event.name == 'gain') { - var cards = event.getg(event.player); - if (!cards.length) return false; - var cards2 = event.getl(player).cards2; - for (var i of cards2) { - if (cards.includes(i) && event.player.countCards('he', card => { - return card != i && get.type2(card) == get.type2(i); + filter:function(event,player){ + if(event.name=='gain'){ + var cards=event.getg(event.player); + if(!cards.length) return false; + var cards2=event.getl(player).cards2; + for(var i of cards2){ + if(cards.includes(i)&&event.player.countCards('he',card=>{ + return card!=i&&get.type2(card)==get.type2(i); })) return true; } return false; } - else { - if (event.type != 'gain') return false; - var cards = event.getl(player).cards2; - if (!cards.length) return false; - return game.hasPlayer(current => { - if (current == player) return false; - var cardsx = event.getg(current); - for (var i of cardsx) { - if (cards.includes(i) && current.countCards('he', card => { - return card != i && get.type2(card) == get.type2(i); + else{ + if(event.type!='gain') return false; + var cards=event.getl(player).cards2; + if(!cards.length) return false; + return game.hasPlayer(current=>{ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.includes(i)&¤t.countCards('he',card=>{ + return card!=i&&get.type2(card)==get.type2(i); })) return true; } return false; }); } }, - logTarget: function (event, player) { - if (event.name == 'gain') return event.player; - else { - var cards = event.getl(player).cards2; - return game.filterPlayer(current => { - if (current == player) return false; - var cardsx = event.getg(current); - for (var i of cardsx) { - if (cards.includes(i) && current.countCards('he', card => { - return card != i && get.type2(card) == get.type2(i); + logTarget:function(event,player){ + if(event.name=='gain') return event.player; + else{ + var cards=event.getl(player).cards2; + return game.filterPlayer(current=>{ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.includes(i)&¤t.countCards('he',card=>{ + return card!=i&&get.type2(card)==get.type2(i); })) return true; } return false; }); } }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - if (trigger.name == 'gain') event.targets = [trigger.player]; - else { - var cards = trigger.getl(player).cards2; - event.targets = game.filterPlayer(current => { - if (current == player) return false; - var cardsx = trigger.getg(current); - for (var i of cardsx) { - if (cards.includes(i) && current.countCards('he', card => { - return card != i && get.type2(card) == get.type2(i); + if(trigger.name=='gain') event.targets=[trigger.player]; + else{ + var cards=trigger.getl(player).cards2; + event.targets=game.filterPlayer(current=>{ + if(current==player) return false; + var cardsx=trigger.getg(current); + for(var i of cardsx){ + if(cards.includes(i)&¤t.countCards('he',card=>{ + return card!=i&&get.type2(card)==get.type2(i); })) return true; } return false; }); } 'step 1' - var target = event.targets.shift(); - event.target = target; - player.chooseBool(get.prompt('twejian', target), '当其他角色得到你的牌后,若其有其他与此牌类型相同的牌,你可以令其选择一项:1.受到你造成的1点伤害;2.弃置这些牌').set('ai', () => { - return get.attitude(player, _status.event.getParent().target) < 0; + var target=event.targets.shift(); + event.target=target; + player.chooseBool(get.prompt('twejian',target),'当其他角色得到你的牌后,若其有其他与此牌类型相同的牌,你可以令其选择一项:1.受到你造成的1点伤害;2.弃置这些牌').set('ai',()=>{ + return get.attitude(player,_status.event.getParent().target)<0; }); 'step 2' - if (result.bool) { - player.logSkill('twejian', target); - var cards = trigger.getg(target); - event.cards = cards; - event.cardType = []; - for (var card of cards) { - event.cardType.add(get.type(card, 'trick', target)); + if(result.bool){ + player.logSkill('twejian',target); + var cards=trigger.getg(target); + event.cards=cards; + event.cardType=[]; + for(var card of cards){ + event.cardType.add(get.type(card,'trick',target)); } - var list = ['选项一', '选项二']; - target.chooseControl(list).set('prompt', '恶荐:请选择一项').set('choiceList', [ + var list=['选项一','选项二']; + target.chooseControl(list).set('prompt','恶荐:请选择一项').set('choiceList',[ '受到1点伤害', - '弃置所有除' + get.translation(cards) + '外的' + get.translation(event.cardType) + '牌', - ]).set('ai', function () { - var player = _status.event.player; - var types = _status.event.cardType, cards = player.getCards('he', function (card) { + '弃置所有除'+get.translation(cards)+'外的'+get.translation(event.cardType)+'牌', + ]).set('ai',function(){ + var player=_status.event.player; + var types=_status.event.cardType,cards=player.getCards('he',function(card){ return types.includes(get.type2(card)); }); - if (cards.length == 1) return '选项二'; - if (cards.length >= 2) { - for (var i = 0; i < cards.length; i++) { - if (get.tag(cards[i], 'save')) return '选项一'; + if(cards.length==1) return '选项二'; + if(cards.length>=2){ + for(var i=0; i= 8) return '选项一'; + if(player.hp==1) return '选项二'; + for(var i=0; i=8) return '选项一'; } - if (cards.length > 2 && player.hp > 2) return '选项一'; - if (cards.length > 3) return '选项一'; + if(cards.length>2&&player.hp>2) return '选项一'; + if(cards.length>3) return '选项一'; return '选项二'; - }).set('cardType', event.cardType); + }).set('cardType',event.cardType); } else event.goto(4); 'step 3' - if (result.control == '选项一') target.damage(); - else target.discard(target.getCards('he', card => { - return event.cardType.includes(get.type2(card)) && !cards.includes(card); + if(result.control=='选项一') target.damage(); + else target.discard(target.getCards('he',card=>{ + return event.cardType.includes(get.type2(card))&&!cards.includes(card); })); 'step 4' - if (event.targets.length > 0) event.goto(1); + if(event.targets.length>0) event.goto(1); else event.finish(); }, - ai: { - expose: 0.3, + ai:{ + expose:0.3, }, }, //张飞 - twxuhe: { - audio: 'retishen', - trigger: { player: 'shaMiss' }, - check: function (event, player) { - return get.attitude(player, event.target) < 0; + twxuhe:{ + audio:'retishen', + trigger:{player:'shaMiss'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; }, - logTarget: 'target', - content: function () { + logTarget:'target', + content:function(){ 'step 0' - trigger.target.chooseControl().set('choiceList', [ - '受到' + get.translation(player) + '对你造成的1点伤害', - '令' + get.translation(player) + '使用的下一张牌对你造成的伤害+2' - ]).set('ai', function () { - var target = _status.event.player, player = _status.event.getParent().player; - if (target.hp <= 3 && target.hp > 1 && player.countCards('hs', function (card) { - return get.tag(card, 'damage') && player.canUse(card, target); - }) > 0) return 0; + trigger.target.chooseControl().set('choiceList',[ + '受到'+get.translation(player)+'对你造成的1点伤害', + '令'+get.translation(player)+'使用的下一张牌对你造成的伤害+2' + ]).set('ai',function(){ + var target=_status.event.player,player=_status.event.getParent().player; + if(target.hp<=3&&target.hp>1&&player.countCards('hs',function(card){ + return get.tag(card,'damage')&&player.canUse(card,target); + })>0) return 0; return 1; }); 'step 1' - var target = trigger.target; - switch (result.index) { + var target=trigger.target; + switch (result.index){ case 0: - player.line(target, 'fire'); + player.line(target,'fire'); target.damage(); break; case 1: - target.line(player, 'fire'); - player.storage.twxuhe_damage = target; - trigger.getParent().twxuhe = true; + target.line(player,'fire'); + player.storage.twxuhe_damage=target; + trigger.getParent().twxuhe=true; player.addTempSkill('twxuhe_damage'); break; } }, - subSkill: { - damage: { - charlotte: true, - onremove: true, - mark: true, - intro: { content: '本回合使用的下一张牌对$造成伤害时,此伤害+2' }, - trigger: { - source: 'damageBegin1', - player: 'useCardAfter', + subSkill:{ + damage:{ + charlotte:true, + onremove:true, + mark:true, + intro:{content:'本回合使用的下一张牌对$造成伤害时,此伤害+2'}, + trigger:{ + source:'damageBegin1', + player:'useCardAfter', }, - direct: true, - filter: function (event, player) { - if (event.name == 'useCard') return !event.twxuhe; - if (!event.card) return false; - var evt = event.getParent(2); - var history = player.getHistory('useCard'); - return evt.name == 'useCard' && history[history.indexOf(evt) - 1].twxuhe; + direct:true, + filter:function(event,player){ + if(event.name=='useCard') return !event.twxuhe; + if(!event.card) return false; + var evt=event.getParent(2); + var history=player.getHistory('useCard'); + return evt.name=='useCard'&&history[history.indexOf(evt)-1].twxuhe; }, - content: function () { - if (trigger.name != 'useCard') trigger.num += 2; + content:function(){ + if(trigger.name!='useCard') trigger.num+=2; player.removeSkill('twxuhe_damage'); }, } }, }, //薛综 - twjiexun: { - intro: { content: '已发动#次' }, - audio: 'jiexun', - trigger: { player: 'phaseJieshuBegin' }, - onremove: true, - direct: true, - derivation: ['twfunanx', 'twjiexunx'], - content: function () { + twjiexun:{ + intro:{content:'已发动#次'}, + audio:'jiexun', + trigger:{player:'phaseJieshuBegin'}, + onremove:true, + direct:true, + derivation:['twfunanx','twjiexunx'], + content:function(){ 'step 0' - var suits = {}; - game.countPlayer(current => { - for (var card of current.getCards('ej')) { - if (typeof suits[get.suit(card)] != 'number') suits[get.suit(card)] = 0; + var suits={}; + game.countPlayer(current=>{ + for(var card of current.getCards('ej')) { + if(typeof suits[get.suit(card)]!='number') suits[get.suit(card)]=0; suits[get.suit(card)]++; } }); - var choices = lib.suit.slice(); + var choices=lib.suit.slice(); choices.push('cancel2'); - var str = lib.suit.map(suit => { - return get.translation(suit) + ':' + get.cnNumber(suits[suit] || 0) + '张' + var str=lib.suit.map(suit=>{ + return get.translation(suit)+':'+get.cnNumber(suits[suit]||0)+'张' }).join(';'); - player.chooseControl(choices).set('prompt', get.prompt('twjiexun') + '(已发动过' + get.cnNumber(player.countMark('twjiexun')) + '次)').set('ai', function () { - var player = _status.event.player; - var map = {}; - game.countPlayer(current => { - for (var card of current.getCards('ej')) { - if (typeof map[get.suit(card)] != 'number') map[get.suit(card)] = 0; + player.chooseControl(choices).set('prompt',get.prompt('twjiexun')+'(已发动过'+get.cnNumber(player.countMark('twjiexun'))+'次)').set('ai',function(){ + var player=_status.event.player; + var map={}; + game.countPlayer(current=>{ + for(var card of current.getCards('ej')) { + if(typeof map[get.suit(card)]!='number') map[get.suit(card)]=0; map[get.suit(card)]++; } }); - for (var suit in map) map[suit] = Math.abs(map[suit]); - var bool = game.hasPlayer(current => get.attitude(player, current) > 0 && player != current); - var list = lib.suit.slice().sort((a, b) => (bool ? 1 : -1) * ((map[b] || 0) - (map[a] || 0))); - if (bool && map[list[0]] > 0 || !bool || player.hasMark('twjiexun')) return list[0]; + for(var suit in map) map[suit]=Math.abs(map[suit]); + var bool=game.hasPlayer(current=>get.attitude(player,current)>0&&player!=current); + var list=lib.suit.slice().sort((a,b)=>(bool?1:-1)*((map[b]||0)-(map[a]||0))); + if(bool&&map[list[0]]>0||!bool||player.hasMark('twjiexun')) return list[0]; return 'cancel2'; - }).set('prompt2', get.skillInfoTranslation('twjiexun', player) + '
    ' + str); + }).set('prompt2',get.skillInfoTranslation('twjiexun',player)+'
    '+str); 'step 1' - if (result.control != 'cancel2') { - var suit = result.control; - event.suit = suit; - var num1 = game.countPlayer(function (current) { - return current.countCards('ej', { suit: suit }); + if(result.control!='cancel2'){ + var suit=result.control; + event.suit=suit; + var num1=game.countPlayer(function(current){ + return current.countCards('ej',{suit:suit}); }); - var num2 = player.countMark('twjiexun'); - event.num1 = num1; - event.num2 = num2; - var str = '令一名其他角色摸' + get.cnNumber(num1) + '张牌'; - if (num2) str += ',然后弃置' + get.cnNumber(num2) + '张牌'; - player.chooseTarget('请选择【诫训】的目标', str, lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target); - return _status.event.eff * get.sgn(att) + att / 114514; - }).set('eff', num1 >= num2 && num1 > 0 ? 1 : -1); + var num2=player.countMark('twjiexun'); + event.num1=num1; + event.num2=num2; + var str='令一名其他角色摸'+get.cnNumber(num1)+'张牌'; + if(num2) str+=',然后弃置'+get.cnNumber(num2)+'张牌'; + player.chooseTarget('请选择【诫训】的目标',str,lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + return _status.event.eff*get.sgn(att)+att/114514; + }).set('eff',num1>=num2&&num1>0?1:-1); } else event.finish(); 'step 2' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twjiexun', target); - if (player.hasMark('twjiexun') || event.num1) player.addExpose(0.2); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twjiexun',target); + if(player.hasMark('twjiexun')||event.num1) player.addExpose(0.2); player.popup(event.suit); - game.log(player, '选择了', '#y' + get.translation(event.suit)); - player.addMark('twjiexun', 1, false); - if (event.num1) target.draw(event.num1); + game.log(player,'选择了','#y'+get.translation(event.suit)); + player.addMark('twjiexun',1,false); + if(event.num1) target.draw(event.num1); } else event.finish(); 'step 3' - if (event.num2) target.chooseToDiscard(event.num2, true, 'he'); + if(event.num2) target.chooseToDiscard(event.num2,true,'he'); else event.finish(); 'step 4' - if (result.bool && result.autochoose && result.cards.length == result.rawcards.length && !player.hasSkill('funan_jiexun')) { - player.chooseControl().set('choiceList', [ - '摸' + get.cnNumber(event.num2) + '张牌,将【诫训】的发动次数归零', + if(result.bool&&result.autochoose&&result.cards.length==result.rawcards.length&&!player.hasSkill('funan_jiexun')){ + player.chooseControl().set('choiceList',[ + '摸'+get.cnNumber(event.num2)+'张牌,将【诫训】的发动次数归零', '修改【复难】和【诫训】' - ]).set('ai', () => _status.event.choice).set('prompt', '诫训:选择一项').set('choice', event.num2 >= 4 ? 0 : (event.num2 <= 1 ? 1 : [0, 1].randomGet())); + ]).set('ai',()=>_status.event.choice).set('prompt','诫训:选择一项').set('choice',event.num2>=4?0:(event.num2<=1?1:[0,1].randomGet())); } else event.finish(); 'step 5' - if (result.index == 0) { + if(result.index==0){ player.draw(event.num2); - player.removeMark('twjiexun', player.countMark('twjiexun'), false); - game.log(player, '归零了', '#g【诫训】', '的发动次数'); + player.removeMark('twjiexun',player.countMark('twjiexun'),false); + game.log(player,'归零了','#g【诫训】','的发动次数'); } else { - game.log(player, '修改了', '#g【复难】', '和', '#g【诫训】'); + game.log(player,'修改了','#g【复难】','和','#g【诫训】'); player.addSkill('funan_jiexun'); } }, }, //张宁 - twxingzhui: { - audio: 2, - enable: 'phaseUse', - usable: 1, - mahouSkill: true, - filter: function (event, player) { + twxingzhui:{ + audio:2, + enable:'phaseUse', + usable:1, + mahouSkill:true, + filter:function(event,player){ return !player.hasSkill('twxingzhui_mahou'); }, - content: function () { + content:function(){ 'step 0' player.loseHp(); - player.chooseControl('1回合', '2回合', '3回合').set('prompt', '请选择施法时长').set('ai', function () { + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ return 2; }); 'step 1' - player.storage.twxingzhui_mahou = [result.index + 1, result.index + 1]; - player.addTempSkill('twxingzhui_mahou', { player: 'die' }); + player.storage.twxingzhui_mahou=[result.index+1,result.index+1]; + player.addTempSkill('twxingzhui_mahou',{player:'die'}); }, - ai: { - order: 2, - result: { - player: function (player, target) { - if (!player.hasFriend()) return 0; - if (player.hp > 1) return 1; + ai:{ + order:2, + result:{ + player:function(player,target){ + if(!player.hasFriend()) return 0; + if(player.hp>1) return 1; return 0; }, }, }, - subSkill: { - mahou: { - trigger: { global: 'phaseEnd' }, - forced: true, - popup: false, - charlotte: true, - content: function () { + subSkill:{ + mahou:{ + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ 'step 0' - var list = player.storage.twxingzhui_mahou; + var list=player.storage.twxingzhui_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的', '#g星坠', '魔法生效'); + if(list[1]==0){ + game.log(player,'的','#g星坠','魔法生效'); player.logSkill('twxingzhui'); - var num = list[0]; - event.num = num; - var cards = game.cardsGotoOrdering(get.cards(num * 2)).cards; - event.cards = cards; - player.showCards(cards, get.translation(player) + '发动了【星坠】'); + var num=list[0]; + event.num=num; + var cards=game.cardsGotoOrdering(get.cards(num*2)).cards; + event.cards=cards; + player.showCards(cards,get.translation(player)+'发动了【星坠】'); player.removeSkill('twxingzhui_mahou'); } - else { - game.log(player, '的', '#g星坠', '魔法剩余', '#g' + (list[1]) + '回合'); + else{ + game.log(player,'的','#g星坠','魔法剩余','#g'+(list[1])+'回合'); player.markSkill('twxingzhui_mahou'); event.finish(); } 'step 1' - var cards2 = []; - for (var card of event.cards) { - if (get.color(card, false) == 'black') cards2.push(card); + var cards2=[]; + for(var card of event.cards){ + if(get.color(card,false)=='black') cards2.push(card); } - if (!cards2.length) event.finish(); - else { - event.cards2 = cards2; - var str = '令一名其他角色获得其中的黑色牌(' + get.translation(cards2) + ')'; - if (cards2.length >= event.num) str += ',然后对其造成' + get.cnNumber(event.num) + '点伤害'; - player.chooseTarget('请选择〖星坠〗的目标', str, lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - if (_status.event.getParent().cards2.length >= _status.event.getParent().num) return get.damageEffect(target, player, player, 'thunder'); - return get.attitude(player, target); + if(!cards2.length) event.finish(); + else{ + event.cards2=cards2; + var str='令一名其他角色获得其中的黑色牌('+get.translation(cards2)+')'; + if(cards2.length>=event.num) str+=',然后对其造成'+get.cnNumber(event.num)+'点伤害'; + player.chooseTarget('请选择〖星坠〗的目标',str,lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.getParent().cards2.length>=_status.event.getParent().num) return get.damageEffect(target,player,player,'thunder'); + return get.attitude(player,target); }); } 'step 2' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - target.gain(event.cards2, 'gain2'); - if (event.cards2.length >= num) target.damage(event.num, 'thunder'); + target.gain(event.cards2,'gain2'); + if(event.cards2.length>=num) target.damage(event.num,'thunder'); } }, - mark: true, - onremove: true, - marktext: '♗', - intro: { - name: '施法:星坠', - markcount: function (storage) { - if (storage) return storage[1]; + mark:true, + onremove:true, + marktext:'♗', + intro:{ + name:'施法:星坠', + markcount:function(storage){ + if(storage) return storage[1]; return 0; }, - content: function (storage) { - if (storage) return '经过' + storage[1] + '个“回合结束时”后,亮出牌堆顶的' + get.cnNumber(storage[0] * 2) + '张牌并执行后续效果'; + content:function(storage){ + if(storage) return '经过'+storage[1]+'个“回合结束时”后,亮出牌堆顶的'+get.cnNumber(storage[0]*2)+'张牌并执行后续效果'; return '未指定施法效果'; }, }, }, }, }, - twjuchen: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player && current.countCards('h') > player.countCards('h'); - }) && game.hasPlayer(function (current) { - return current != player && current.hp > player.hp; + twjuchen:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>player.countCards('h'); + })&&game.hasPlayer(function(current){ + return current!=player&¤t.hp>player.hp; }); }, - logTarget: function (event, player) { + logTarget:function(event,player){ return game.players.sortBySeat(player); }, - content: function () { + content:function(){ 'step 0' - event.num = 0; - event.cards = []; - event.targets = game.players.sortBySeat(player); + event.num=0; + event.cards=[]; + event.targets=game.players.sortBySeat(player); 'step 1' - var target = targets[num]; - if (target.countCards('he')) target.chooseToDiscard('he', true); - else event._result = { bool: false }; + var target=targets[num]; + if(target.countCards('he')) target.chooseToDiscard('he',true); + else event._result={bool:false}; 'step 2' - if (result.bool && Array.isArray(result.cards)) event.cards.addArray(result.cards); + if(result.bool&&Array.isArray(result.cards)) event.cards.addArray(result.cards); event.num++; - if (event.num < targets.length) event.goto(1); + if(event.num 1) return false; - if (_status.dying.length) return false; - if (player == event.player) return false; - if (event.target.hp >= player.hp) return false; - if (!['basic', 'trick'].includes(get.type(event.card))) return false; + twjiekuang:{ + audio:2, + trigger:{global:'useCardToTargeted'}, + filter:function(event,player){ + if(!event.target||event.targets.length>1) return false; + if(_status.dying.length) return false; + if(player==event.player) return false; + if(event.target.hp>=player.hp) return false; + if(!['basic','trick'].includes(get.type(event.card))) return false; return true; }, - usable: 1, - direct: true, - content: function () { + usable:1, + direct:true, + content:function(){ 'step 0' - player.chooseControl('失去体力', '减体力上限', 'cancel2').set('prompt', get.prompt2('twjiekuang', trigger.target)).set('ai', function (card) { - if (_status.event.aisave) { - if (player.isDamaged()) return '减体力上限'; + player.chooseControl('失去体力','减体力上限','cancel2').set('prompt',get.prompt2('twjiekuang',trigger.target)).set('ai',function(card){ + if(_status.event.aisave){ + if(player.isDamaged()) return '减体力上限'; return '失去体力'; } return 'cancel2'; - }).set('aisave', function () { - 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') < player.countCards('h')) { - save = true; + }).set('aisave',function(){ + 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') { - return current.hasHistory('damage', evt => evt.card == trigger.card); - }) && player.canUse(card, trigger.player, false)) { - player.useCard(card, trigger.player, false); + if(!game.countPlayer2(current=>{ + return current.hasHistory('damage',evt=>evt.card==trigger.card); + })&&player.canUse(card,trigger.player,false)){ + player.useCard(card,trigger.player,false); } }, }, }, }, - twneirao: { - audio: 2, - derivation: 'twluanlve', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - juexingji: true, - skillAnimation: true, - animationColor: 'gray', - filter: function (event, player) { - return Math.max(0, player.hp) + player.maxHp <= 9; + twneirao:{ + audio:2, + derivation:'twluanlve', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return Math.max(0,player.hp)+player.maxHp<=9; }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twneirao'); player.removeSkills('twjiekuang'); 'step 1' - var num = player.countCards('he'), cards = []; + var num=player.countCards('he'),cards=[]; player.discard(player.getCards('he')); - for (var i = 0; i < num; i++) { - var card = get.cardPile(function (card) { - return card.name == 'sha' && !cards.includes(card); + for(var i=0;i= player.countMark('twluanlve'); + viewAsFilter:function(player){ + return player.isPhaseUsing()&&player.countCards('hs',{name:'sha'})>=player.countMark('twluanlve'); }, - filterCard: function (card, player) { - if (player.countMark('twluanlve') == 0) return false; - return card.name == 'sha'; + filterCard:function(card,player){ + if(player.countMark('twluanlve')==0) return false; + return card.name=='sha'; }, - selectCard: function () { - var player = _status.event.player; - if (player.countMark('twluanlve') == 0) return -1; + selectCard:function(){ + var player=_status.event.player; + if(player.countMark('twluanlve')==0) return -1; return player.countMark('twluanlve'); }, - onChooseToUse: function (event) { - if (!game.online && event.type == 'phase') { - var targets = []; - game.countPlayer2(current => { - var history = current.getHistory('useCard'); - if (!history.length) return false; - for (var evt of history) { - if (evt.card && evt.card.name == 'shunshou') { + onChooseToUse:function(event){ + if(!game.online&&event.type=='phase'){ + var targets=[]; + game.countPlayer2(current=>{ + var history=current.getHistory('useCard'); + if(!history.length) return false; + for(var evt of history){ + if(evt.card&&evt.card.name=='shunshou'){ targets.addArray(evt.targets); } } }); - event.set('twluanlve_ban', targets); + event.set('twluanlve_ban',targets); } }, - position: 'hs', - log: false, - group: ['twluanlve_directHit'], - precontent: function () { + position:'hs', + log:false, + group:['twluanlve_directHit'], + precontent:function(){ player.logSkill('twluanlve'); - player.addMark('twluanlve', 1, false); + player.addMark('twluanlve',1,false); }, - ai: { - order: function () { - return get.order({ name: 'shunshou' }) + 1; + ai:{ + order:function(){ + return get.order({name:'shunshou'})+1; }, }, - mod: { - playerEnabled: function (card, player, target) { - if (!_status.event.twluanlve_ban || !Array.isArray(_status.event.twluanlve_ban)) return; - if (player.isPhaseUsing() && card.name == 'shunshou' && card.storage && card.storage.twluanlve && _status.event.twluanlve_ban.includes(target)) return false; + mod:{ + playerEnabled:function(card,player,target){ + if(!_status.event.twluanlve_ban||!Array.isArray(_status.event.twluanlve_ban)) return; + if(player.isPhaseUsing()&&card.name=='shunshou'&&card.storage&&card.storage.twluanlve&&_status.event.twluanlve_ban.includes(target)) return false; }, }, - subSkill: { - directHit: { - trigger: { player: 'useCard' }, - filter: function (event, player) { - return event.card.name == 'shunshou'; + subSkill:{ + directHit:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='shunshou'; }, - direct: true, - content: function () { + direct:true, + content:function(){ trigger.directHit.addArray(game.players); - game.log(trigger.card, '不可被响应'); + game.log(trigger.card,'不可被响应'); }, - ai: { - directHit_ai: true, - skillTagFilter: function (player, tag, arg) { - return arg && arg.card && arg.card.name == 'shunshou'; + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.card&&arg.card.name=='shunshou'; }, }, } }, }, //冯习 - twqingkou: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return player.canUse('juedou', current, false); + twqingkou:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return player.canUse('juedou',current,false); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twqingkou'), '视为对一名其他角色使用一张【决斗】', function (card, player, target) { - return player.canUse('juedou', target, false); - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'juedou' }, player, player); + player.chooseTarget(get.prompt('twqingkou'),'视为对一名其他角色使用一张【决斗】',function(card,player,target){ + return player.canUse('juedou',target,false); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'juedou'},player,player); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twqingkou', target); - player.useCard({ name: 'juedou', isCard: true, storage: { twqingkou: true } }, target, false); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twqingkou',target); + player.useCard({name:'juedou',isCard:true,storage:{twqingkou:true}},target,false); player.addTempSkill('twqingkou_after'); } }, - subSkill: { - after: { - trigger: { global: 'useCardAfter' }, - filter: function (event, player) { - return event.card.storage && event.card.storage.twqingkou; + subSkill:{ + after:{ + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + return event.card.storage&&event.card.storage.twqingkou; }, - charlotte: true, - direct: true, - content: function () { - var targets = game.filterPlayer(current => { - return current.hasHistory('sourceDamage', function (evt) { - return evt.card == trigger.card; + charlotte:true, + direct:true, + content:function(){ + var targets=game.filterPlayer(current=>{ + return current.hasHistory('sourceDamage',function(evt){ + return evt.card==trigger.card; }); }).sortBySeat(); - for (var target of targets) { + for(var target of targets){ target.draw(); - if (target == player) { + if(target==player){ player.skip('phaseJudge'); - game.log(player, '跳过了', '#y判定阶段'); + game.log(player,'跳过了','#y判定阶段'); player.skip('phaseDiscard'); - game.log(player, '跳过了', '#y弃牌阶段'); + game.log(player,'跳过了','#y弃牌阶段'); } } }, @@ -5489,763 +5489,763 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //张既 - twdingzhen: { - audio: 2, - trigger: { global: 'roundStart' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return get.distance(player, current) <= Math.max(0, player.hp); + twdingzhen:{ + audio:2, + trigger:{global:'roundStart'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return get.distance(player,current)<=Math.max(0,player.hp); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twdingzhen'), [1, Infinity], function (card, player, target) { - return get.distance(player, target) <= player.hp; - }).set('ai', function (target) { - var player = _status.event.player; - if (target == player) return 0; - return Math.max(-get.attitude(player, target), 1); + player.chooseTarget(get.prompt2('twdingzhen'),[1,Infinity],function(card,player,target){ + return get.distance(player,target)<=player.hp; + }).set('ai',function(target){ + var player=_status.event.player; + if(target==player) return 0; + return Math.max(-get.attitude(player,target),1); }); 'step 1' - if (result.bool) { + if(result.bool){ result.targets.sortBySeat(); - var targets = result.targets; - event.targets = targets; - player.logSkill('twdingzhen', targets); - event.num = 0; + var targets=result.targets; + event.targets=targets; + player.logSkill('twdingzhen',targets); + event.num=0; } else event.finish(); 'step 2' - var target = targets[num]; - event.target = target; - target.chooseToDiscard('h', { name: 'sha' }, '定镇:弃置一张【杀】,或本轮你于回合内使用的第一张牌不能指定' + get.translation(player) + '为目标').set('ai', function (card) { - if (_status.event.goon) return 1; + var target=targets[num]; + event.target=target; + target.chooseToDiscard('h',{name:'sha'},'定镇:弃置一张【杀】,或本轮你于回合内使用的第一张牌不能指定'+get.translation(player)+'为目标').set('ai',function(card){ + if(_status.event.goon) return 1; return 0; - }).set('goon', get.attitude(target, player) < 0 && player.countCards('hs') <= 3 && target.countCards('hs', card => { + }).set('goon',get.attitude(target,player)<0&&player.countCards('hs')<=3&&target.countCards('hs',card=>{ return target.hasValueTarget(card); - }) > 1); + })>1); 'step 3' - if (result.bool) target.addExpose(0.1); - else { + if(result.bool) target.addExpose(0.1); + else{ target.addSkill('twdingzhen_target'); - target.markAuto('twdingzhen_target', [player]); + target.markAuto('twdingzhen_target',[player]); } 'step 4' - if (event.num < event.targets.length - 1) { + if(event.num 0, - content: '回合内使用的第一张牌不能指定$为目标', + intro:{ + markcount:()=>0, + content:'回合内使用的第一张牌不能指定$为目标', }, - mod: { - playerEnabled: function (card, player, target) { - if (_status.currentPhase == player && !player.countUsed() && player.getStorage('twdingzhen_target').includes(target)) return false; + mod:{ + playerEnabled:function(card,player,target){ + if(_status.currentPhase==player&&!player.countUsed()&&player.getStorage('twdingzhen_target').includes(target)) return false; }, }, }, }, }, - twyouye: { - audio: 2, - trigger: { global: 'phaseJieshuBegin' }, - filter: function (event, player) { - return event.player != player && !event.player.getHistory('sourceDamage', function (evt) { - return evt.player == player; - }).length && player.getExpansions('twyouye').length < 5; + twyouye:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return event.player!=player&&!event.player.getHistory('sourceDamage',function(evt){ + return evt.player==player; + }).length&&player.getExpansions('twyouye').length<5; }, - forced: true, - group: 'twyouye_give', - content: function () { - player.addToExpansion(get.cards(), 'gain2').gaintag.add('twyouye'); + forced:true, + group:'twyouye_give', + content:function(){ + player.addToExpansion(get.cards(),'gain2').gaintag.add('twyouye'); }, - marktext: '蓄', - intro: { - name: '蓄(攸业)', - content: 'expansion', - markcount: 'expansion', + marktext:'蓄', + intro:{ + name:'蓄(攸业)', + content:'expansion', + markcount:'expansion', }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - subSkill: { - give: { - audio: 'twyouye', - trigger: { source: 'damageSource', player: 'damageEnd' }, - filter: function (event, player) { + subSkill:{ + give:{ + audio:'twyouye', + trigger:{source:'damageSource',player:'damageEnd'}, + filter:function(event,player){ return player.getExpansions('twyouye').length; }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - event.boolx = _status.currentPhase && _status.currentPhase.isIn(); - event.cards = player.getExpansions('twyouye'); - if (_status.connectMode) game.broadcastAll(function () { _status.noclearcountdown = true }); - event.given_map = {}; + event.boolx=_status.currentPhase&&_status.currentPhase.isIn(); + event.cards=player.getExpansions('twyouye'); + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; '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) return 0; - return get.value(button.link, _status.event.player); + if(event.cards.length>1){ + player.chooseCardButton('攸业:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length) return 0; + return get.value(button.link,_status.event.player); }); } - else if (event.cards.length == 1) event._result = { links: event.cards.slice(0), bool: true }; + else if(event.cards.length==1) event._result={links:event.cards.slice(0),bool:true}; else event.finish(); 'step 2' - if (result.bool) { - var cards = result.links; - event.cards2 = cards; - player.chooseTarget('选择一名角色获得' + get.translation(cards), function (card, player, target) { - var evt = _status.event.getParent(); - var cards = evt.cards, cards2 = evt.cards2.slice(); - if (cards.removeArray(cards2).length > 0 || !evt.boolx) return true; - return target == _status.currentPhase; - }, event.cards.length == 1).set('ai', function (target) { - var att = get.attitude(_status.event.player, target); - if (_status.event.enemy) return Math.max(0.01, 100 - att); - else if (att > 0) return Math.max(0.1, att / (1 + target.countCards('h') + (_status.event.getParent().given_map[target.playerid] || 0))); - else return Math.max(0.01, (100 + att) / 100); - }).set('enemy', get.value(cards[0], player, 'raw') < 0); + if(result.bool){ + var cards=result.links; + event.cards2=cards; + player.chooseTarget('选择一名角色获得'+get.translation(cards),function(card,player,target){ + var evt=_status.event.getParent(); + var cards=evt.cards,cards2=evt.cards2.slice(); + if(cards.removeArray(cards2).length>0||!evt.boolx) return true; + return target==_status.currentPhase; + },event.cards.length==1).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.enemy) return Math.max(0.01,100-att); + else if(att>0) return Math.max(0.1,att/(1+target.countCards('h')+(_status.event.getParent().given_map[target.playerid]||0))); + else return Math.max(0.01,(100+att)/100); + }).set('enemy',get.value(cards[0],player,'raw')<0); } 'step 3' - if (result.bool) { - var cards = event.cards2; + if(result.bool){ + var cards=event.cards2; event.cards.removeArray(cards); - event.togive = cards.slice(0); - if (result.targets.length) { - if (result.targets[0] == _status.currentPhase) event.boolx = false; - var id = result.targets[0].playerid, map = event.given_map; - if (!map[id]) map[id] = []; + event.togive=cards.slice(0); + if(result.targets.length){ + if(result.targets[0]==_status.currentPhase) event.boolx=false; + var id=result.targets[0].playerid,map=event.given_map; + if(!map[id]) map[id]=[]; map[id].addArray(event.togive); } - if (event.cards.length > 0) event.goto(1); + if(event.cards.length>0) event.goto(1); } else event.goto(1); 'step 4' - if (_status.connectMode) game.broadcastAll(function () { delete _status.noclearcountdown; game.stopCountChoose() }); - var list = []; - for (var i in event.given_map) { - var source = (_status.connectMode ? lib.playerOL : game.playerMap)[i]; - player.line(source, 'green'); - list.push([source, event.given_map[i]]); - game.log(source, '获得了', event.given_map[i]); + if(_status.connectMode) game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); + game.log(source,'获得了',event.given_map[i]); } game.loseAsync({ - gain_list: list, - giver: player, - animate: 'gain2', + gain_list:list, + giver:player, + animate:'gain2', }).setContent('gaincardMultiple'); }, }, }, }, //荀谌 - twweipo: { - audio: 'mjweipo', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return game.hasPlayer(function (current) { + twweipo:{ + audio:'mjweipo', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ return current.countCards('he'); }); }, - filterTarget: function (card, player, target) { + filterTarget:function(card,player,target){ return target.countCards('he'); }, - content: function () { + content:function(){ 'step 0' - target.chooseToDiscard('he', true); + target.chooseToDiscard('he',true); 'step 1' - var list = ['binglinchengxiax']; + var list=['binglinchengxiax']; list.addArray(get.zhinangs()); - player.chooseButton(['危迫:令其获得一张智囊牌或【兵临城下】', [list, 'vcard']], true).set('ai', function (button) { - return _status.event.getParent().target.getUseValue({ name: button.link[2] }); + player.chooseButton(['危迫:令其获得一张智囊牌或【兵临城下】',[list,'vcard']],true).set('ai',function(button){ + return _status.event.getParent().target.getUseValue({name:button.link[2]}); }); 'step 2' - if (result.bool) { - var name = result.links[0][2], card = false; - game.log(player, '选择了', '#y' + get.translation(name)); - if (name == 'binglinchengxiax') { - if (!_status.binglinchengxiax) { - _status.binglinchengxiax = [ - ['spade', 7], - ['club', 7], - ['club', 13], + if(result.bool){ + var name=result.links[0][2],card=false; + game.log(player,'选择了','#y'+get.translation(name)); + if(name=='binglinchengxiax'){ + if(!_status.binglinchengxiax){ + _status.binglinchengxiax=[ + ['spade',7], + ['club',7], + ['club',13], ]; - game.broadcastAll(function () { lib.inpile.add('binglinchengxiax') }); + game.broadcastAll(function(){lib.inpile.add('binglinchengxiax')}); } - if (_status.binglinchengxiax.length) { - var info = _status.binglinchengxiax.randomRemove(); - card = game.createCard2('binglinchengxiax', info[0], info[1]); + if(_status.binglinchengxiax.length){ + var info=_status.binglinchengxiax.randomRemove(); + card=game.createCard2('binglinchengxiax',info[0],info[1]); } } - if (!card) card = get.cardPile(name); - if (card) target.gain(card, 'gain2'); + if(!card) card=get.cardPile(name); + if(card) target.gain(card,'gain2'); } }, - ai: { - order: 7.1, - result: { - target: function (player, target) { - if (target == player) return player.countCards('he') ? 10 : 0.01; - return (target.countCards('he') + 0.5) * Math.sqrt(Math.max(1, target.hp)); + ai:{ + order:7.1, + result:{ + target:function(player,target){ + if(target==player) return player.countCards('he')?10:0.01; + return (target.countCards('he')+0.5)*Math.sqrt(Math.max(1,target.hp)); }, }, }, }, - twmouzhi: { - audio: 'mjmouzhi', - intro: { content: '上次受到伤害的颜色:$' }, - trigger: { player: 'damageBegin4' }, - forced: true, - group: 'twmouzhi_mark', - filter: function (event, player) { - if (!event.card || get.color(event.card) == 'none') return false; - var all = player.getAllHistory('damage'); - if (!all.length) return false; - return all[all.length - 1].card && get.color(all[all.length - 1].card) == get.color(event.card); + twmouzhi:{ + audio:'mjmouzhi', + intro:{content:'上次受到伤害的颜色:$'}, + trigger:{player:'damageBegin4'}, + forced:true, + group:'twmouzhi_mark', + filter:function(event,player){ + if(!event.card||get.color(event.card)=='none') return false; + var all=player.getAllHistory('damage'); + if(!all.length) return false; + return all[all.length-1].card&&get.color(all[all.length-1].card)==get.color(event.card); }, - content: function () { + content:function(){ trigger.cancel(); }, - ai: { - effect: { - target: (card, player, target) => { - if (typeof card === 'object' && get.tag(card, 'damage')) { - let color = get.color(card); - if (color === 'none') return; - let all = target.getAllHistory('damage'); - if (!all.length || !all[all.length - 1].card) return; - if (get.color(all[all.length - 1].card) === color) return 'zeroplayertarget'; + ai:{ + effect:{ + target:(card,player,target)=>{ + if(typeof card==='object'&&get.tag(card,'damage')){ + let color=get.color(card); + if(color==='none') return; + let all=target.getAllHistory('damage'); + if(!all.length||!all[all.length-1].card) return; + if(get.color(all[all.length-1].card)===color) return 'zeroplayertarget'; } }, }, }, - subSkill: { - mark: { - trigger: { player: 'damage' }, - silent: true, - firstDo: true, - content: function () { - if (!trigger.card || get.color(trigger.card) == 'none') player.unmarkSkill('twmouzhi'); + subSkill:{ + mark:{ + trigger:{player:'damage'}, + silent:true, + firstDo:true, + content:function(){ + if(!trigger.card||get.color(trigger.card)=='none') player.unmarkSkill('twmouzhi'); else { player.markSkill('twmouzhi'); - player.storage.twmouzhi = get.color(trigger.card); - game.broadcastAll(function (player, color) { - if (player.marks.twmouzhi) { - player.marks.twmouzhi.firstChild.innerHTML = ''; + player.storage.twmouzhi=get.color(trigger.card); + game.broadcastAll(function(player,color){ + if(player.marks.twmouzhi){ + player.marks.twmouzhi.firstChild.innerHTML=''; } - player.storage.twmouzhi = color; - }, player, player.storage.twmouzhi) + player.storage.twmouzhi=color; + },player,player.storage.twmouzhi) } }, }, }, }, //蒋钦 - twshangyi: { - audio: 'shangyi', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('he') && game.hasPlayer(function (current) { - return current != player && current.countCards('h'); + twshangyi:{ + audio:'shangyi', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h'); }); }, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h'); + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h'); }, - filterCard: true, - position: 'he', - content: function () { + filterCard:true, + position:'he', + content:function(){ 'step 0' target.viewHandcards(player); var chooseButton; - if (player.countCards('h')) chooseButton = player.chooseButton([1, 2], ['###尚义###
    选择' + get.translation(target) + '的一张手牌以弃置,或选择你与其的各一张牌以交换
    ', '
    ' + get.translation(target) + '的手牌
    ', target.getCards('h'), '
    你的手牌
    ', player.getCards('h')], true); - else chooseButton = player.chooseButton(['###尚义###
    弃置' + get.translation(target) + '的一张手牌
    ', '
    ' + get.translation(target) + '的手牌
    ', target.getCards('h')], true); - chooseButton.set('target', target); - chooseButton.set('ai', function (button) { - var player = _status.event.player, owner = get.owner(button.link), color = get.color(button.link, owner), value = get.value(button.link, owner); - if (player.countCards('h')) { - if (!ui.selected.buttons.length) { - if (player.countCards('h', function (card) { - return get.color(card, player) == 'red' && get.value(card) < 6; - }) && color == 'red' && value > 7) return value * 3; + if(player.countCards('h')) chooseButton=player.chooseButton([1,2],['###尚义###
    选择'+get.translation(target)+'的一张手牌以弃置,或选择你与其的各一张牌以交换
    ','
    '+get.translation(target)+'的手牌
    ',target.getCards('h'),'
    你的手牌
    ',player.getCards('h')],true); + else chooseButton=player.chooseButton(['###尚义###
    弃置'+get.translation(target)+'的一张手牌
    ','
    '+get.translation(target)+'的手牌
    ',target.getCards('h')],true); + chooseButton.set('target',target); + chooseButton.set('ai',function(button){ + var player=_status.event.player,owner=get.owner(button.link),color=get.color(button.link,owner),value=get.value(button.link,owner); + if(player.countCards('h')){ + if(!ui.selected.buttons.length){ + if(player.countCards('h',function(card){ + return get.color(card,player)=='red'&&get.value(card)<6; + })&&color=='red'&&value>7) return value*3; return value; } else { - if (get.value(ui.selected.buttons[0].link) < 4) return 0; - return 4 + (get.color(ui.selected.buttons[0].link, get.owner(ui.selected.buttons[0].link)) == 'red' ? 3 : 1) - value; + if(get.value(ui.selected.buttons[0].link)<4) return 0; + return 4+(get.color(ui.selected.buttons[0].link,get.owner(ui.selected.buttons[0].link))=='red'?3:1)-value; } } else { - if (color == 'black') return value * 1.5; + if(color=='black') return value*1.5; return value; } }); - chooseButton.set('filterButton', function (button) { - if (get.itemtype(button.link) != 'card') return false; - if (!ui.selected.buttons.length && get.owner(button.link) != _status.event.target) return false; - if (ui.selected.buttons.length && get.owner(ui.selected.buttons[0].link) == get.owner(button.link)) return false; + chooseButton.set('filterButton',function(button){ + if(get.itemtype(button.link)!='card') return false; + if(!ui.selected.buttons.length&&get.owner(button.link)!=_status.event.target) return false; + if(ui.selected.buttons.length&&get.owner(ui.selected.buttons[0].link)==get.owner(button.link)) return false; return true; }); 'step 1' - if (result.bool) { - if (result.links.length == 1) { - target.discard(result.links[0]).discarder = player; - if (get.color(result.links[0], target) != 'black') event.finish(); + if(result.bool){ + if(result.links.length==1){ + target.discard(result.links[0]).discarder=player; + if(get.color(result.links[0],target)!='black') event.finish(); } else { - var links = result.links.slice(); - if (get.owner(links[0]) != player) links.reverse(); - var card1 = links[0], card2 = links[1]; - player.swapHandcards(target, [card1], [card2]); - if (get.color(card1, player) != 'red' || get.color(card2, target) != 'red') event.finish(); + var links=result.links.slice(); + if(get.owner(links[0])!=player) links.reverse(); + var card1=links[0],card2=links[1]; + player.swapHandcards(target,[card1],[card2]); + if(get.color(card1,player)!='red'||get.color(card2,target)!='red') event.finish(); } } else event.finish(); 'step 2' player.draw(); }, - ai: { - order: 10, - result: { target: -1 }, + ai:{ + order:10, + result:{target:-1}, }, }, - twxiangyu: { - group: 'twxiangyu_lose', - shaRelated: true, - audio: 'zniaoxiang', - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - return event.card.name == 'sha' && get.distance(player, event.player) < player.getAttackRange(); + twxiangyu:{ + group:'twxiangyu_lose', + shaRelated:true, + audio:'zniaoxiang', + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&get.distance(player,event.player) { + forced:true, + logTarget:'target', + init:function(player){ + var target=_status.currentPhase; + if(!target||!target!=player) return; + if(!player.getStorage('twxiangyu_range').length){ + var targets=game.filterPlayer(current=>{ return current.getHistory('lose').length; }); - if (targets.length) { + if(targets.length){ player.addTempSkill('twxiangyu_range'); - player.markAuto('twxiangyu_range', targets); + player.markAuto('twxiangyu_range',targets); } } }, - content: function () { - var id = trigger.target.playerid; - var map = trigger.getParent().customArgs; - if (!map[id]) map[id] = {}; - if (typeof map[id].shanRequired == 'number') { + 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; + else map[id].shanRequired=2; }, - mod: { - attackRange: function (player, num) { - return num + Math.min(5, player.getStorage('twxiangyu_range').length); + mod:{ + attackRange:function(player,num){ + return num+Math.min(5,player.getStorage('twxiangyu_range').length); }, }, - subSkill: { - lose: { - trigger: { - global: ['loseAfter', 'equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + subSkill:{ + lose:{ + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - return player == _status.currentPhase && game.hasPlayer(function (current) { - if (player.getStorage('twxiangyu_range').includes(current)) return false; - var evt = event.getl(current); - return evt && evt.cards2 && evt.cards2.length > 0; + filter:function(event,player){ + return player==_status.currentPhase&&game.hasPlayer(function(current){ + if(player.getStorage('twxiangyu_range').includes(current)) return false; + var evt=event.getl(current); + return evt&&evt.cards2&&evt.cards2.length>0; }); }, - silent: true, - charlotte: true, - content: function () { + silent:true, + charlotte:true, + content:function(){ player.addTempSkill('twxiangyu_range'); - player.markAuto('twxiangyu_range', game.filterPlayer(function (current) { - if (player.getStorage('twxiangyu_range').includes(current)) return false; - var evt = trigger.getl(current); - return evt && evt.cards2 && evt.cards2.length > 0; + player.markAuto('twxiangyu_range',game.filterPlayer(function(current){ + if(player.getStorage('twxiangyu_range').includes(current)) return false; + var evt=trigger.getl(current); + return evt&&evt.cards2&&evt.cards2.length>0; })); player.syncStorage('twxiangyu_range'); }, }, - range: { - marktext: '羽', - intro: { - content: function (storage, player) { - var num = Math.min(5, storage ? storage.length : 0); - return '攻击范围+' + num; + range:{ + marktext:'羽', + intro:{ + content:function(storage,player){ + var num=Math.min(5,storage?storage.length:0); + return '攻击范围+'+num; }, }, - charlotte: true, - onremove: true, + charlotte:true, + onremove:true, }, }, }, //顾雍 - twgyshenxing: { - audio: 'xinshenxing', - enable: 'phaseUse', - filter: function (event, player) { - return player.countCards('he') >= Math.min(2, player.countMark('twgyshenxing')); + twgyshenxing:{ + audio:'xinshenxing', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he')>=Math.min(2,player.countMark('twgyshenxing')); }, - selectCard: function () { - return Math.min(2, _status.event.player.countMark('twgyshenxing')); + selectCard:function(){ + return Math.min(2,_status.event.player.countMark('twgyshenxing')); }, - prompt: function () { - return '弃置' + get.cnNumber(Math.min(2, _status.event.player.countMark('twgyshenxing'))) + '张牌并摸一张牌'; + prompt:function(){ + return '弃置'+get.cnNumber(Math.min(2,_status.event.player.countMark('twgyshenxing')))+'张牌并摸一张牌'; }, - check: function (card) { - var num = _status.event.player.countCards('h', { color: get.color(card) }); - if (get.position(card) == 'e') num++; - return (Math.max(4, 7.1 - num) - get.value(card)) / num; + check:function(card){ + var num=_status.event.player.countCards('h',{color:get.color(card)}); + if(get.position(card)=='e') num++; + return (Math.max(4,7.1-num)-get.value(card))/num; }, - filterCard: true, - position: 'he', - content: function () { + filterCard:true, + position:'he', + content:function(){ player.draw(); - player.addMark('twgyshenxing', 1); + player.addMark('twgyshenxing',1); }, - marktext: '慎', - intro: { content: '已发动过#次' }, - ai: { - order: function (item, player) { - if (!player.hasMark('twgyshenxing')) return 10; + marktext:'慎', + intro:{content:'已发动过#次'}, + ai:{ + order:function(item,player){ + if(!player.hasMark('twgyshenxing')) return 10; return 1; }, - result: { player: 1 }, + result:{player:1}, }, }, - twbingyi: { - audio: 'bingyi_xin_guyong', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { + twbingyi:{ + audio:'bingyi_xin_guyong', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ return player.countCards('h'); }, - filterx: function (event, player) { - var cards = player.getCards('h'); - if (cards.length == 1) return true; - var color = get.color(cards[0], player), type = get.type2(cards[0], player); - for (var i = 1; i < cards.length; i++) { - if (color && get.color(cards[i], player) != color) color = false; - if (type && get.type2(cards[i], player) != type) type = false; - if (!color && !type) return false; + filterx:function(event,player){ + var cards=player.getCards('h'); + if(cards.length==1) return true; + var color=get.color(cards[0],player),type=get.type2(cards[0],player); + for(var i=1; i player.getCardUsable({ name: 'sha' })) { - return player.hp > 2 ? 2 : 0; + ]).set('ai',function(){ + if(player.countCards('hs',function(card){ + return get.name(card)=='sha'&&player.hasValueTarget(card); + })>player.getCardUsable({name:'sha'})){ + return player.hp>2?2:0; } return 1; - }).set('prompt', get.prompt('twyilie')); + }).set('prompt',get.prompt('twyilie')); 'step 1' - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.logSkill('twyilie'); - game.log(player, '选择了', '#g【毅烈】', '的', '#y' + result.control); - if (result.index % 2 == 0) player.addTempSkill('twyilie_add', 'phaseUseEnd'); - if (result.index > 0) player.addTempSkill('twyilie_miss'); - if (result.index == 2) player.loseHp(); + game.log(player,'选择了','#g【毅烈】','的','#y'+result.control); + if(result.index%2==0) player.addTempSkill('twyilie_add','phaseUseEnd'); + if(result.index>0) player.addTempSkill('twyilie_miss'); + if(result.index==2) player.loseHp(); } }, - subSkill: { - add: { - charlotte: true, - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + subSkill:{ + add:{ + charlotte:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; }, }, - mark: true, - intro: { content: '本阶段使用【杀】的次数上限+1' }, + mark:true, + intro:{content:'本阶段使用【杀】的次数上限+1'}, }, - miss: { - charlotte: true, - audio: 'spyilie', - trigger: { player: ['useCardToTargeted', 'shaMiss'] }, - filter: function (event, player, name) { - if (name == 'useCardToTargeted') return event.card.name == 'sha' && event.target.isLinked(); + miss:{ + charlotte:true, + audio:'spyilie', + trigger:{player:['useCardToTargeted','shaMiss']}, + filter:function(event,player,name){ + if(name=='useCardToTargeted') return event.card.name=='sha'&&event.target.isLinked(); return true; }, - forced: true, - content: function () { + forced:true, + content:function(){ player.draw(); }, }, }, }, - twfenming: { - audio: 'spfenming', - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (target) { - return target != player && (target.countCards('he') || !target.isLinked()); + twfenming:{ + audio:'spfenming', + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(target){ + return target!=player&&(target.countCards('he')||!target.isLinked()); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twfenming'), function (card, player, target) { - return target != player && (target.countCards('he') || !target.isLinked()); - }).set('ai', function (target) { - var player = _status.event.player; - return get.damageEffect(target, player, player); + player.chooseTarget(get.prompt2('twfenming'),function(card,player,target){ + return target!=player&&(target.countCards('he')||!target.isLinked()); + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twfenming', target); - var list = [], choiceList = [ - '令' + get.translation(target) + '弃置一张牌', - '令' + get.translation(target) + '横置', - '背水!横置并依次令' + get.translation(target) + '执行上述所有选项', + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twfenming',target); + var list=[],choiceList=[ + '令'+get.translation(target)+'弃置一张牌', + '令'+get.translation(target)+'横置', + '背水!横置并依次令'+get.translation(target)+'执行上述所有选项', ]; - if (target.countCards('he')) list.push('选项一'); - else choiceList[0] = '' + choiceList[0] + ''; - if (!target.isLinked()) list.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - if (target.countCards('he') && !target.isLinked() && !player.isLinked()) list.push('背水!'); - else choiceList[2] = '' + choiceList[2] + ''; - if (list.length == 1) event._result = { control: list[0] }; - else player.chooseControl(list).set('choiceList', choiceList).set('ai', function () { - var list = _status.event.controls; - if (list.includes('背水!')) return '背水!'; - if (list.includes('选项一')) return '选项一'; + if(target.countCards('he')) list.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(!target.isLinked()) list.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(target.countCards('he')&&!target.isLinked()&&!player.isLinked()) list.push('背水!'); + else choiceList[2]=''+choiceList[2]+''; + if(list.length==1) event._result={control:list[0]}; + else player.chooseControl(list).set('choiceList',choiceList).set('ai',function(){ + var list=_status.event.controls; + if(list.includes('背水!')) return '背水!'; + if(list.includes('选项一')) return '选项一'; return '选项二'; - }).set('prompt', '奋命:请选择一项'); + }).set('prompt','奋命:请选择一项'); } else event.finish(); 'step 2' - game.log(player, '选择了', '#y' + result.control); - if (result.control == '背水!' && !player.isLinked()) player.link(true); - if (result.control != '选项二') target.chooseToDiscard('he', true); - if (result.control != '选项一' && !target.isLinked()) target.link(true); + game.log(player,'选择了','#y'+result.control); + if(result.control=='背水!'&&!player.isLinked()) player.link(true); + if(result.control!='选项二') target.chooseToDiscard('he',true); + if(result.control!='选项一'&&!target.isLinked()) target.link(true); }, }, //韩当 - twgongji: { - audio: 'regongji', - enable: 'phaseUse', - usable: 1, - position: 'he', - filterCard: true, - locked: false, - filter: function (event, player) { + twgongji:{ + audio:'regongji', + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + locked:false, + filter:function(event,player){ return player.countCards('he'); }, - check: function (card) { - var base = 0, player = _status.event.player, suit = get.suit(card, player), added = false, added2 = false, added3; - if (get.type(card) == 'equip' && game.hasPlayer(function (target) { - var att = get.attitude(player, target); - if (att >= 0) return 0; - if (target.countCards('he', function (card) { - return get.value(card) > 5; + check:function(card){ + var base=0,player=_status.event.player,suit=get.suit(card,player),added=false,added2=false,added3; + if(get.type(card)=='equip'&&game.hasPlayer(function(target){ + var att=get.attitude(player,target); + if(att>=0) return 0; + if(target.countCards('he',function(card){ + return get.value(card)>5; })) return -att; - })) base += 6; - var hs = player.getCards('h'); - var muniu = player.getEquip('muniu'); - if (muniu && card != muniu && muniu.cards) hs = hs.concat(muniu.cards); - for (var i of hs) { - if (i != card && get.name(i) == 'sha') { - if (get.suit(i, player) == suit) { - if (player.hasValueTarget(i, false)) { - added3 = true; - base += 5.5; + })) base+=6; + var hs=player.getCards('h'); + var muniu=player.getEquip('muniu'); + if(muniu&&card!=muniu&&muniu.cards) hs=hs.concat(muniu.cards); + for(var i of hs){ + if(i!=card&&get.name(i)=='sha'){ + if(get.suit(i,player)==suit){ + if(player.hasValueTarget(i,false)){ + added3=true; + base+=5.5; } } else { - if (player.hasValueTarget(i, false)) added2 = true; - if (!added && !player.hasValueTarget(i, null, true) && player.hasValueTarget(i, false, true)) { - base += 4; - added = true; + if(player.hasValueTarget(i,false)) added2=true; + if(!added&&!player.hasValueTarget(i,null,true)&&player.hasValueTarget(i,false,true)){ + base+=4; + added=true; } } } } - if (added3 && !added2) base -= 4.5; - return base - get.value(card); + if(added3&&!added2) base-=4.5; + return base-get.value(card); }, - content: function () { + content:function(){ 'step 0' player.addTempSkill('twgongji2'); - player.markAuto('twgongji2', [get.suit(cards[0], player)]); + player.markAuto('twgongji2',[get.suit(cards[0],player)]); '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'); - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'guohe_copy2' }, player, player); + 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'); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe_copy2'},player,player); }); } else event.finish(); 'step 2' - if (result.bool) { - player.line(result.targets, 'green'); - player.discardPlayerCard(result.targets[0], 'he', true); + if(result.bool){ + player.line(result.targets,'green'); + player.discardPlayerCard(result.targets[0],'he',true); } }, - mod: { - attackRangeBase: function () { + mod:{ + attackRangeBase:function(){ return Infinity; }, }, - ai: { - order: 4.5, - result: { player: 1 }, + ai:{ + order:4.5, + result:{player:1}, }, }, - twgongji2: { - charlotte: true, - onremove: true, - mark: true, - intro: { content: '使用$花色的杀无任何次数限制' }, - trigger: { player: 'useCard1' }, - filter: function (event, player) { - if (_status.currentPhase == player && event.card.name == 'sha' && - player.getStorage('twgongji2').includes(get.suit(event.card)) && event.addCount !== false) return true; + twgongji2:{ + charlotte:true, + onremove:true, + mark:true, + intro:{content:'使用$花色的杀无任何次数限制'}, + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(_status.currentPhase==player&&event.card.name=='sha'&& + player.getStorage('twgongji2').includes(get.suit(event.card))&&event.addCount!==false) return true; return false; }, - forced: true, - locked: false, - 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--; + forced:true, + locked:false, + 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--; } }, - mod: { - cardUsable: function (card, player) { - if (card.name == 'sha' && player.getStorage('twgongji2').includes(get.suit(card))) return Infinity; + mod:{ + cardUsable:function(card,player){ + if(card.name=='sha'&&player.getStorage('twgongji2').includes(get.suit(card))) return Infinity; }, - aiOrder: function (player, card, num) { - if (get.name(card) == 'sha' && !player.getStorage('twgongji2').includes(get.suit(card))) return num + 1; + aiOrder:function(player,card,num){ + if(get.name(card)=='sha'&&!player.getStorage('twgongji2').includes(get.suit(card))) return num+1; }, }, }, - twjiefan: { - skillAnimation: true, - animationColor: 'wood', - audio: 'jiefan_re_handang', - limited: true, - enable: 'phaseUse', - filterTarget: true, - content: function () { + twjiefan:{ + skillAnimation:true, + animationColor:'wood', + audio:'jiefan_re_handang', + limited:true, + enable:'phaseUse', + filterTarget:true, + content:function(){ 'step 0' player.awakenSkill('twjiefan'); - event.players = game.filterPlayer(function (current) { - return current != target && current.inRange(target); + event.players=game.filterPlayer(function(current){ + return current!=target&¤t.inRange(target); }); event.players.sortBySeat(); 'step 1' - if (event.players.length) { - event.current = event.players.shift(); + if(event.players.length){ + event.current=event.players.shift(); event.current.addTempClass('target'); - player.line(event.current, 'green'); - if (!event.current.countCards('he') || !target.isIn()) event._result = { bool: false }; - else { - event.current.chooseToDiscard({ subtype: 'equip1' }, 'he', '解烦:弃置一张武器牌,或令' + get.translation(target) + '摸一张牌').set('ai', function (card) { - if (!_status.event.target.isIn()) return 0; - if (get.attitude(_status.event.player, _status.event.target) < 0) return 7 - get.value(card); + player.line(event.current,'green'); + if(!event.current.countCards('he')||!target.isIn()) event._result={bool:false}; + else{ + event.current.chooseToDiscard({subtype:'equip1'},'he','解烦:弃置一张武器牌,或令'+get.translation(target)+'摸一张牌').set('ai',function(card){ + if(!_status.event.target.isIn()) return 0; + if(get.attitude(_status.event.player,_status.event.target)<0) return 7-get.value(card); return -1; - }).set('target', target); + }).set('target',target); } } else { player.addSkill('twjiefan2'); - player.markAuto('twjiefan2', [target]); + player.markAuto('twjiefan2',[target]); event.finish(); } 'step 2' - if (!result.bool && target.isIn()) target.draw(); + if(!result.bool&&target.isIn()) target.draw(); event.goto(1); }, - ai: { - order: 5, - result: { - target: function (player, target) { - if (player.hp > 2 && game.phaseNumber < game.players.length * 2) return 0; - var num = 0, players = game.filterPlayer(); - for (var i = 0; i < players.length; i++) { - if (players[i] != target && players[i].inRange(target)) { + ai:{ + order:5, + result:{ + target:function(player,target){ + if(player.hp>2&&game.phaseNumber { + var forced=event.getParent(2).name=='twshuangren_end'&&game.hasPlayer(current=>{ return player.canCompare(current); }); - var str = '与一名角色拼点,若你:赢,你可以视为对至多两名至其的距离不大于1的角色使用一张【杀】;没赢,其可以视为对你使用一张【杀】'; - player.chooseTarget(forced ? '双刃:选择一名角色' : get.prompt('twshuangren'), str, forced, (card, player, target) => { + var str='与一名角色拼点,若你:赢,你可以视为对至多两名至其的距离不大于1的角色使用一张【杀】;没赢,其可以视为对你使用一张【杀】'; + player.chooseTarget(forced?'双刃:选择一名角色':get.prompt('twshuangren'),str,forced,(card,player,target)=>{ return player.canCompare(target); - }).set('ai', target => { - if (_status.event.goon) return get.effect(target, { name: 'sha' }, _status.event.player); + }).set('ai',target=>{ + if(_status.event.goon) return get.effect(target,{name:'sha'},_status.event.player); return 0; - }).set('goon', event.triggername != 'phaseUseBegin' || (player.countCards('hs', 'sha') > 0 && player.hasValueTarget({ name: 'sha' }))); + }).set('goon',event.triggername!='phaseUseBegin'||(player.countCards('hs','sha')>0&&player.hasValueTarget({name:'sha'}))); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twshuangren', target); - if (player.canCompare(target)) player.chooseToCompare(target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twshuangren',target); + if(player.canCompare(target)) player.chooseToCompare(target); else event.finish(); } else event.finish(); 'step 2' - if (result.bool) { - event.sha = true; - player.chooseTarget([1, 2], '请选择【杀】的目标', true, function (card, player, target) { - if (!player.canUse('sha', target, false, false)) return false; - return get.distance(target, _status.event.targetx) <= 1; - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'sha' }, player, player); - }).set('targetx', target); + if(result.bool){ + event.sha=true; + player.chooseTarget([1,2],'请选择【杀】的目标',true,function(card,player,target){ + if(!player.canUse('sha',target,false,false)) return false; + return get.distance(target,_status.event.targetx)<=1; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }).set('targetx',target); } - else target.chooseBool('双刃:是否视为对' + get.translation(player) + '使用一张杀?').set('choice', get.effect(player, { name: 'sha' }, target, target) > 0); + else target.chooseBool('双刃:是否视为对'+get.translation(player)+'使用一张杀?').set('choice',get.effect(player,{name:'sha'},target,target)>0); 'step 3' - if (result.bool) { - if (event.sha == true) { + if(result.bool){ + if(event.sha==true) { result.targets.sortBySeat(); - for (var i of result.targets) { - player.useCard({ name: 'sha', isCard: true }, i, false); + for(var i of result.targets){ + player.useCard({name:'sha',isCard:true},i,false); } } - else target.useCard({ name: 'sha', isCard: true }, player, false); + else target.useCard({name:'sha',isCard:true},player,false); } }, - subSkill: { - end: { - audio: 'shuangren', - trigger: { player: 'phaseUseEnd' }, - filter: function (event, player, name) { - if (!player.countCards('h')) return false; - return !player.hasHistory('useSkill', function (evt) { - return evt.skill == 'twshuangren'; - }) && !player.hasHistory('sourceDamage', function (evt) { - return evt.card.name == 'sha'; + subSkill:{ + end:{ + audio:'shuangren', + trigger:{player:'phaseUseEnd'}, + filter:function(event,player,name){ + if(!player.countCards('h')) return false; + return !player.hasHistory('useSkill',function(evt){ + return evt.skill=='twshuangren'; + })&&!player.hasHistory('sourceDamage',function(evt){ + return evt.card.name=='sha'; }); }, - direct: true, - preHidden: true, - content: function () { + direct:true, + preHidden:true, + content:function(){ 'step 0' - player.chooseToDiscard(get.prompt('twshuangren'), '弃置一张牌发动〖双刃〗', 'he').set('ai', function (card) { - if (_status.event.goon) return 5 - get.value(card); + player.chooseToDiscard(get.prompt('twshuangren'),'弃置一张牌发动〖双刃〗','he').set('ai',function(card){ + if(_status.event.goon) return 5-get.value(card); return 0; - }).set('goon', function () { - return player.hasCard(function (card) { - if (player.needsToDiscard() > 1) return card.number > 10 && get.value(card) <= 5; - return (card.number >= 9 && get.value(card) <= 5) || get.value(card) <= 3; + }).set('goon',function(){ + return player.hasCard(function(card){ + if(player.needsToDiscard()>1) return card.number>10&&get.value(card)<=5; + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; }); - }()).setHiddenSkill('twshuangren').set('logSkill', 'twshuangren'); + }()).setHiddenSkill('twshuangren').set('logSkill','twshuangren'); 'step 1' - if (result.bool) { + if(result.bool){ player.useSkill('twshuangren'); } } @@ -6361,927 +6361,927 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } }, //法正 - twxuanhuo: { - audio: 'rexuanhuo', - trigger: { player: 'phaseDrawEnd' }, - filter: function (event, player) { - return player.countCards('he') > 1 && game.countPlayer() > 2; + twxuanhuo:{ + audio:'rexuanhuo', + trigger:{player:'phaseDrawEnd'}, + filter:function(event,player){ + return player.countCards('he')>1&&game.countPlayer()>2; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var ai2 = function (target) { - var player = _status.event.player; - if (get.attitude(player, target) <= 0) return 0; - var list = ['sha', 'juedou']; - var num = Math.max.apply(Math, list.map(function (i) { - return target.getUseValue({ name: i, isCard: true }, false); + var ai2=function(target){ + var player=_status.event.player; + if(get.attitude(player,target)<=0) return 0; + var list=['sha','juedou']; + var num=Math.max.apply(Math,list.map(function(i){ + return target.getUseValue({name:i,isCard:true},false); })); - if (target.hasSkillTag('nogain')) num /= 4; + if(target.hasSkillTag('nogain')) num/=4; return num; }; player.chooseCardTarget({ - prompt: get.prompt2('twxuanhuo'), - filterCard: true, - selectCard: 2, - position: 'he', - filterTarget: lib.filter.notMe, - goon: game.hasPlayer(function (current) { - return current != player && ai2(player, current) > 0; + prompt:get.prompt2('twxuanhuo'), + filterCard:true, + selectCard:2, + position:'he', + filterTarget:lib.filter.notMe, + goon:game.hasPlayer(function(current){ + return current!=player&&ai2(player,current)>0; }), - ai1: function (card) { - if (!_status.event.goon) return 0; - return 7 - get.value(card); + ai1:function(card){ + if(!_status.event.goon) return 0; + return 7-get.value(card); }, - ai2: ai2, + ai2:ai2, }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twxuanhuo', target); - player.give(result.cards, target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twxuanhuo',target); + player.give(result.cards,target); } else event.finish(); 'step 2' - if (game.hasPlayer(function (current) { - return current != player && current != target; - })) player.chooseTarget(function (card, player, target) { - return target != player && target != _status.event.target; - }, '选择' + get.translation(target) + '使用【杀】或【决斗】的目标', true).set('target', target).set('ai', function (target) { - var evt = _status.event; - var list = ['sha', 'juedou']; - return Math.max.apply(Math, list.map(function (i) { - var card = { name: i, isCard: true }; - if (!evt.target.canUse(card, target, false)) return 0; - return get.effect(target, card, evt.target, evt.player); + if(game.hasPlayer(function(current){ + return current!=player&¤t!=target; + })) player.chooseTarget(function(card,player,target){ + return target!=player&&target!=_status.event.target; + },'选择'+get.translation(target)+'使用【杀】或【决斗】的目标',true).set('target',target).set('ai',function(target){ + var evt=_status.event; + var list=['sha','juedou']; + return Math.max.apply(Math,list.map(function(i){ + var card={name:i,isCard:true}; + if(!evt.target.canUse(card,target,false)) return 0; + return get.effect(target,card,evt.target,evt.player); })); }); else event.finish(); 'step 3' - var target2 = result.targets[0]; - event.target2 = target2; + var target2=result.targets[0]; + event.target2=target2; player.line(target2); - var vcards = []; - if (target.canUse({ name: 'sha', isCard: true }, target2, false)) vcards.push(['基本', '', 'sha']); - if (target.canUse({ name: 'juedou', isCard: true }, target2, false)) vcards.push(['锦囊', '', 'juedou']); - if (!vcards.length) { - if (!target.countCards('h')) event.finish(); - else event._result = { index: 1 }; + var vcards=[]; + if(target.canUse({name:'sha',isCard:true},target2,false)) vcards.push(['基本','','sha']); + if(target.canUse({name:'juedou',isCard:true},target2,false)) vcards.push(['锦囊','','juedou']); + if(!vcards.length){ + if(!target.countCards('h')) event.finish(); + else event._result={index:1}; } - else if (!target.countCards('h')) { - event.vcards = vcards; - event._result = { index: 0 }; + else if(!target.countCards('h')){ + event.vcards=vcards; + event._result={index:0}; } else { - event.vcards = vcards; - target.chooseControl().set('choiceList', [ - '视为对' + get.translation(target2) + '使用一张【杀】或【决斗】', - '令' + get.translation(player) + '获得你的两张牌', + event.vcards=vcards; + target.chooseControl().set('choiceList',[ + '视为对'+get.translation(target2)+'使用一张【杀】或【决斗】', + '令'+get.translation(player)+'获得你的两张牌', ]); } 'step 4' - if (result.index == 0) { - if (event.vcards.length == 1) event._result = { links: event.vcards, bool: true }; - else target.chooseButton(['请选择要对' + get.translation(event.target2) + '使用的牌', [event.vcards, 'vcard']], true).set('ai', function (button) { - var player = _status.event.player; - return get.effect(_status.event.getParent().target2, { name: button.link[2], isCard: true }, player, player); + if(result.index==0){ + if(event.vcards.length==1) event._result={links:event.vcards,bool:true}; + else target.chooseButton(['请选择要对'+get.translation(event.target2)+'使用的牌',[event.vcards,'vcard']],true).set('ai',function(button){ + var player=_status.event.player; + return get.effect(_status.event.getParent().target2,{name:button.link[2],isCard:true},player,player); }); } else { - player.gainPlayerCard(target, 2, 'he', true); + player.gainPlayerCard(target,2,'he',true); event.finish(); } 'step 5' - if (result.bool) target.useCard({ name: result.links[0][2], isCard: true }, false, event.target2); + if(result.bool) target.useCard({name:result.links[0][2],isCard:true},false,event.target2); }, - ai: { - expose: 0.15, + ai:{ + expose:0.15, }, }, - twenyuan: { - audio: 'reenyuan', - group: ['twenyuan1', 'twenyuan2'], + twenyuan:{ + audio:'reenyuan', + group:['twenyuan1','twenyuan2'], }, - twenyuan1: { - audio: 'reenyuan', - trigger: { - global: ['gainAfter', 'loseAsyncAfter'] + twenyuan1:{ + audio:'reenyuan', + trigger:{ + global:['gainAfter','loseAsyncAfter'] }, - direct: true, - filter: function (event, player) { - var cards = event.getg(player); - if (!cards.length || cards.length < 2) return false; - return game.countPlayer(current => { - if (current == player) return false; - var evt = event.getl(current); - if (evt && evt.cards && evt.cards.filter(card => cards.includes(card)).length >= 2) return true; + direct:true, + filter:function(event,player){ + var cards=event.getg(player); + if(!cards.length||cards.length<2) return false; + return game.countPlayer(current=>{ + if(current==player) return false; + var evt=event.getl(current); + if(evt&&evt.cards&&evt.cards.filter(card=>cards.includes(card)).length>=2) return true; return false; }); }, - check: function (event, player) { - var cards = event.getg(player); - var target = game.filterPlayer(current => { - if (current == player) return false; - var evt = event.getl(current); - if (evt && evt.cards && evt.cards.filter(card => cards.includes(card)).length >= 2) return true; + check:function(event,player){ + var cards=event.getg(player); + var target=game.filterPlayer(current=>{ + if(current==player) return false; + var evt=event.getl(current); + if(evt&&evt.cards&&evt.cards.filter(card=>cards.includes(card)).length>=2) return true; return false; })[0]; - return get.attitude(player, target) > 0; + return get.attitude(player,target)>0; }, - logTarget: function (event, player) { - var cards = event.getg(player); - return game.filterPlayer(current => { - if (current == player) return false; - var evt = event.getl(current); - if (evt && evt.cards && evt.cards.filter(card => cards.includes(card)).length >= 2) return true; + logTarget:function(event,player){ + var cards=event.getg(player); + return game.filterPlayer(current=>{ + if(current==player) return false; + var evt=event.getl(current); + if(evt&&evt.cards&&evt.cards.filter(card=>cards.includes(card)).length>=2) return true; return false; }); }, - content: function () { + content:function(){ 'step 0' - var target = lib.skill.twenyuan1.logTarget(trigger, player)[0]; - event.target = target; - var list = ['摸一张牌']; - var prompt2 = '令' + get.translation(target) + '摸一张牌'; - if ((!target.countCards('h') || !target.countCards('e')) && target.isDamaged()) { + var target=lib.skill.twenyuan1.logTarget(trigger,player)[0]; + event.target=target; + var list=['摸一张牌']; + var prompt2='令'+get.translation(target)+'摸一张牌'; + if((!target.countCards('h')||!target.countCards('e'))&&target.isDamaged()){ list.push('回复1点体力'); - prompt2 += '或回复1点体力'; + prompt2+='或回复1点体力'; } list.push('cancel2'); - player.chooseControl(list).set('prompt', get.prompt('twenyuan', target)).set('prompt2', prompt2).set('ai', () => _status.event.choice).set('choice', function () { - if (get.attitude(player, target) > 0) { - if (target.hp <= 2 && list.includes('回复1点体力')) return '回复1点体力'; + player.chooseControl(list).set('prompt',get.prompt('twenyuan',target)).set('prompt2',prompt2).set('ai',()=>_status.event.choice).set('choice',function(){ + if(get.attitude(player,target)>0){ + if(target.hp<=2&&list.includes('回复1点体力')) return '回复1点体力'; return 0; } return 'cancel2'; }()); 'step 1' - if (result.control == 'cancel2') { + if(result.control=='cancel2'){ event.finish(); return; } - player.logSkill('twenyuan1', target); - if (result.control == '回复1点体力') target.recover(); + player.logSkill('twenyuan1',target); + if(result.control=='回复1点体力') target.recover(); else target.draw(); }, }, - twenyuan2: { - audio: 'reenyuan', - trigger: { player: 'damageEnd' }, - logTarget: 'source', - filter: function (event, player) { - return event.source && event.source.isIn(); + twenyuan2:{ + audio:'reenyuan', + trigger:{player:'damageEnd'}, + logTarget:'source', + filter:function(event,player){ + return event.source&&event.source.isIn(); }, - check: function (event, player) { - var att = get.attitude(player, event.source); - var num = event.source.countCards('h'); - if (att <= 0) return true; - if (get.effect(event.source, { name: 'losehp' }, player, event.source) > 0) return true; - if (num > 2) return true; - if (num) return att < 4; + check:function(event,player){ + var att=get.attitude(player,event.source); + var num=event.source.countCards('h'); + if(att<=0) return true; + if(get.effect(event.source,{name:'losehp'},player,event.source)>0) return true; + if(num>2) return true; + if(num) return att<4; return false; }, - prompt2: '令其选择一项:1.失去1点体力;2.交给你一张手牌,若此牌的花色不为♥,你摸一张牌。', - content: function () { + prompt2:'令其选择一项:1.失去1点体力;2.交给你一张手牌,若此牌的花色不为♥,你摸一张牌。', + content:function(){ 'step 0' - event.count = trigger.num; + event.count=trigger.num; 'step 1' - var target = trigger.source; + var target=trigger.source; event.count--; - if (!target.countCards('h')) event._result = { bool: false }; - else target.chooseCard('h', '恩怨:将一张手牌交给' + get.translation(player) + ',或失去1点体力').set('ai', function (card) { - if (get.attitude(_status.event.player, _status.event.getParent().player) > 0) { - if (get.suit(card) != 'heart') return 15 - get.value(card); - return 11 - get.value(card); + if(!target.countCards('h')) event._result={bool:false}; + else target.chooseCard('h','恩怨:将一张手牌交给'+get.translation(player)+',或失去1点体力').set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + if(get.suit(card)!='heart') return 15-get.value(card); + return 11-get.value(card); } else { - var num = 12 - _status.event.player.hp * 2; - if (get.suit(card) != 'heart') num -= 2; - return num - get.value(card); + var num=12-_status.event.player.hp*2; + if(get.suit(card)!='heart') num-=2; + return num-get.value(card); } }); 'step 2' - var target = trigger.source; - if (result.bool) { - var card = result.cards[0]; - event.card = card; - target.give(card, player); + var target=trigger.source; + if(result.bool){ + var card=result.cards[0]; + event.card=card; + target.give(card,player); } - else { + else{ target.loseHp(); event.goto(4); } 'step 3' - if (get.suit(card) != 'heart') player.draw(); + if(get.suit(card)!='heart') player.draw(); 'step 4' - var target = trigger.source; - if (target.isIn() && event.count > 0 && player.hasSkill('twenyuan')) player.chooseBool(get.prompt('twenyuan', target), lib.skill.twenyuan2.prompt2).set('ai', function () { - var evt = _status.event.getTrigger(); - return lib.skill.twenyuan2.check(evt, evt.player); + var target=trigger.source; + if(target.isIn()&&event.count>0&&player.hasSkill('twenyuan')) player.chooseBool(get.prompt('twenyuan',target),lib.skill.twenyuan2.prompt2).set('ai',function(){ + var evt=_status.event.getTrigger(); + return lib.skill.twenyuan2.check(evt,evt.player); }); else event.finish(); 'step 5' - if (result.bool) { - player.logSkill('twenyuan2', trigger.source); + if(result.bool){ + player.logSkill('twenyuan2',trigger.source); event.goto(1); } }, }, //马岱 - twqianxi: { - audio: 'qianxi', - trigger: { player: 'phaseZhunbeiBegin' }, - preHidden: true, - content: function () { + twqianxi:{ + audio:'qianxi', + trigger:{player:'phaseZhunbeiBegin'}, + preHidden:true, + content:function(){ 'step 0' player.draw(); 'step 1' - if (player.hasCard((card) => lib.filter.cardDiscardable(card, player, 'tweqianxi'), 'he')) player.chooseToDiscard('he', true); + if(player.hasCard((card)=>lib.filter.cardDiscardable(card,player,'tweqianxi'),'he')) player.chooseToDiscard('he',true); else event.finish(); 'step 2' - if (!result.bool || !game.hasPlayer(target => { - return player != target && get.distance(player, target) <= 1; - })) { + if(!result.bool||!game.hasPlayer(target=>{ + return player!=target&&get.distance(player,target)<=1; + })){ event.finish(); return; } - event.color = get.color(result.cards[0], player); - player.chooseTarget(function (card, player, target) { - return player != target && get.distance(player, target) <= 1; - }, true).set('ai', function (target) { - return get.effect(target, { name: 'sha' }, _status.event.player, _status.event.player) + 5; + event.color=get.color(result.cards[0],player); + player.chooseTarget(function(card,player,target){ + return player!=target&&get.distance(player,target)<=1; + },true).set('ai',function(target){ + return get.effect(target,{name:'sha'},_status.event.player,_status.event.player)+5; }); 'step 3' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - target.storage.twqianxi2 = event.color; + target.storage.twqianxi2=event.color; target.addTempSkill('twqianxi2'); player.addTempSkill('twqianxi_self'); - player.markAuto('twqianxi_self', [target]); + player.markAuto('twqianxi_self',[target]); } }, - subSkill: { - self: { - audio: 'qianxi', - charlotte: true, - onremove: true, - forced: true, - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return player.hasHistory('sourceDamage', evt => { - if (!evt.card || evt.card.name != 'sha' || !evt.player.isIn()) return false; - if (player.getStorage('twqianxi_self').includes(evt.player)) return true; + subSkill:{ + self:{ + audio:'qianxi', + charlotte:true, + onremove:true, + forced:true, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.hasHistory('sourceDamage',evt=>{ + if(!evt.card||evt.card.name!='sha'||!evt.player.isIn()) return false; + if(player.getStorage('twqianxi_self').includes(evt.player)) return true; return false; }); }, - content: function () { + content:function(){ 'step 0' - var targets = []; - player.getHistory('sourceDamage', evt => { - if (!evt.card || evt.card.name != 'sha') return false; - if (player.getStorage('twqianxi_self').includes(evt.player)) { + var targets=[]; + player.getHistory('sourceDamage',evt=>{ + if(!evt.card||evt.card.name!='sha') return false; + if(player.getStorage('twqianxi_self').includes(evt.player)){ targets.add(evt.player); } return false; }); player.line(targets); - for (var target of targets) { - target.storage.twqianxi3 = target.storage.twqianxi2; - target.addTempSkill('twqianxi3', { player: 'phaseAfter' }); + for(var target of targets){ + target.storage.twqianxi3=target.storage.twqianxi2; + target.addTempSkill('twqianxi3',{player:'phaseAfter'}); } } } } }, - twqianxi2: { - mark: true, - charlotte: true, - onremove: true, - intro: { - markcount: () => 0, - content: function (storage) { - return '不能使用或打出' + get.translation(storage) + '手牌'; + twqianxi2:{ + mark:true, + charlotte:true, + onremove:true, + intro:{ + markcount:()=>0, + content:function(storage){ + return '不能使用或打出'+get.translation(storage)+'手牌'; }, }, - mod: { - cardEnabled2: function (card, player) { - if (get.itemtype(card) == 'card' && get.color(card) == player.getStorage('twqianxi2') && get.position(card) == 'h') return false; + mod:{ + cardEnabled2:function(card,player){ + if(get.itemtype(card)=='card'&&get.color(card)==player.getStorage('twqianxi2')&&get.position(card)=='h') return false; }, }, }, - twqianxi3: { - mod: { - cardEnabled2: function (card, player) { - if (get.itemtype(card) == 'card' && get.color(card) != player.getStorage('twqianxi3') && get.position(card) == 'h') return false; + twqianxi3:{ + mod:{ + cardEnabled2:function(card,player){ + if(get.itemtype(card)=='card'&&get.color(card)!=player.getStorage('twqianxi3')&&get.position(card)=='h') return false; }, }, - mark: true, - intro: { - content: function (storage) { - return '不能使用或打出非' + get.translation(storage) + '手牌'; + mark:true, + intro:{ + content:function(storage){ + return '不能使用或打出非'+get.translation(storage)+'手牌'; }, }, - charlotte: true, - onremove: true, + charlotte:true, + onremove:true, }, //牛金 - twcuorui: { - audio: 'cuorui', - limited: true, - skillAnimation: true, - animationColor: 'thunder', - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.countCards('h') > player.countCards('h'); + twcuorui:{ + audio:'cuorui', + limited:true, + skillAnimation:true, + animationColor:'thunder', + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('h')>player.countCards('h'); }); }, - check: function (event, player) { - var num = 0; - for (var target of game.players) { - if (target != player && target.countCards('h') > num) num = target.countCards('h'); + check:function(event,player){ + var num=0; + for(var target of game.players){ + if(target!=player&&target.countCards('h')>num) num=target.countCards('h'); } - num = Math.min(num, 5 + player.countCards('h')); - return num - player.countCards('h') >= 2; + num=Math.min(num,5+player.countCards('h')); + return num-player.countCards('h')>=2; }, - prompt: function (event, player) { - var num = 0; - for (var target of game.players) { - if (target != player && target.countCards('h') > num) num = target.countCards('h'); + prompt:function(event,player){ + var num=0; + for(var target of game.players){ + if(target!=player&&target.countCards('h')>num) num=target.countCards('h'); } - num = Math.min(num, 5 + player.countCards('h')); - return get.prompt('twcuorui') + '(可摸' + get.cnNumber(num - player.countCards('h')) + '张牌)'; + num=Math.min(num,5+player.countCards('h')); + return get.prompt('twcuorui')+'(可摸'+get.cnNumber(num-player.countCards('h'))+'张牌)'; }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twcuorui'); - var num = 0; - for (var target of game.players) { - if (target != player && target.countCards('h') > num) num = target.countCards('h'); + var num=0; + for(var target of game.players){ + if(target!=player&&target.countCards('h')>num) num=target.countCards('h'); } - num = Math.min(num, 5 + player.countCards('h')); + num=Math.min(num,5+player.countCards('h')); player.drawTo(num); - if (!player.isDisabledJudge()) { + if(!player.isDisabledJudge()){ player.disableJudge(); event.finish(); } - else player.chooseTarget('挫锐:是否对一名其他角色造成1点伤害?', lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - return get.damageEffect(target, player, player); + else player.chooseTarget('挫锐:是否对一名其他角色造成1点伤害?',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); }); 'step 1' - if (result.bool) { + if(result.bool){ player.line(result.targets[0]); result.targets[0].damage(); } }, }, - twliewei: { - audio: 'liewei', - trigger: { source: 'dieAfter' }, - forced: true, - content: function () { + twliewei:{ + audio:'liewei', + trigger:{source:'dieAfter'}, + forced:true, + content:function(){ 'step 0' - if (!player.hasSkill('twcuorui', null, null, false) || !player.awakenedSkills.includes('twcuorui')) event._result = { index: 0 }; - else player.chooseControl().set('prompt', '裂围:请选择一项').set('choiceList', [ + if(!player.hasSkill('twcuorui',null,null,false)||!player.awakenedSkills.includes('twcuorui')) event._result={index:0}; + else player.chooseControl().set('prompt','裂围:请选择一项').set('choiceList',[ '摸两张牌', '重置〖挫锐〗' - ]).set('ai', function () { + ]).set('ai',function(){ return 1; }); 'step 1' - if (result.index == 0) player.draw(2); + if(result.index==0) player.draw(2); else player.restoreSkill('twcuorui'); }, }, //母兵脸 - twzhengrong: { - audio: 'drlt_zhenrong', - trigger: { player: 'useCardAfter', source: 'damageSource' }, - filter: function (event, player) { - if (!event.isPhaseUsing(player)) return false; - if (event.name == 'damage') return player.getHistory('sourceDamage', evt => { - return evt.getParent('phaseUse') == event.getParent('phaseUse'); - }).indexOf(event) == 0; - if (!event.targets || event.targets.every(target => target == player)) return false; - return player.getAllHistory('useCard', function (evt) { - if (!evt.isPhaseUsing(player)) return false; - if (evt.targets.every(target => target == player)) return false; + twzhengrong:{ + audio:'drlt_zhenrong', + trigger:{player:'useCardAfter',source:'damageSource'}, + filter:function(event,player){ + if(!event.isPhaseUsing(player)) return false; + if(event.name=='damage') return player.getHistory('sourceDamage',evt=>{ + return evt.getParent('phaseUse')==event.getParent('phaseUse'); + }).indexOf(event)==0; + if(!event.targets||event.targets.every(target=>target==player)) return false; + return player.getAllHistory('useCard',function(evt){ + if(!evt.isPhaseUsing(player)) return false; + if(evt.targets.every(target=>target==player)) return false; return true; - }).indexOf(event) % 2 == 1; + }).indexOf(event)%2==1; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - if (!game.hasPlayer(function (target) { - return target != player && target.countCards('he'); - })) { + if(!game.hasPlayer(function(target){ + return target!=player&&target.countCards('he'); + })){ event.finish(); return; } - player.chooseTarget(get.prompt('twzhengrong'), '将一名其他角色的一张牌置于武将牌上,称为“荣”', function (card, player, target) { - return target != player && target.countCards('he'); - }).set('ai', function (target) { - return get.effect(target, { name: 'guohe_copy2' }, _status.event.player, _status.event.player); + player.chooseTarget(get.prompt('twzhengrong'),'将一名其他角色的一张牌置于武将牌上,称为“荣”',function(card,player,target){ + return target!=player&&target.countCards('he'); + }).set('ai',function(target){ + return get.effect(target,{name:'guohe_copy2'},_status.event.player,_status.event.player); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = result.targets[0]; - player.logSkill('twzhengrong', target); - player.choosePlayerCard(target, 'he', true); + if(result.bool){ + var target=result.targets[0]; + event.target=result.targets[0]; + player.logSkill('twzhengrong',target); + player.choosePlayerCard(target,'he',true); } else event.finish(); 'step 2' - if (result.bool) player.addToExpansion(result.links, target, 'give').gaintag.add('twzhengrong'); + if(result.bool) player.addToExpansion(result.links,target,'give').gaintag.add('twzhengrong'); }, - marktext: '荣', - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + marktext:'荣', + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - intro: { - content: 'expansion', - markcount: 'expansion', + intro:{ + content:'expansion', + markcount:'expansion', } }, - twhongju: { - derivation: ['twqingce', 'twsaotao'], - audio: 'drlt_hongju', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - juexingji: true, - skillAnimation: true, - animationColor: 'thunder', - filter: function (event, player) { - return player.getExpansions('twzhengrong').length >= 3; + twhongju:{ + derivation:['twqingce','twsaotao'], + audio:'drlt_hongju', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return player.getExpansions('twzhengrong').length>=3; }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twhongju'); player.draw(player.getExpansions('twzhengrong').length); 'step 1' - if (player.countCards('h') == 0) event.goto(3); - else { - var next = player.chooseToMove('鸿举:请选择要交换的手牌和“荣”'); - next.set('list', [ - [get.translation(player) + '(你)的“荣”', player.getExpansions('twzhengrong'), 'twzhengrong_tag'], - ['手牌区', player.getCards('h')], + if(player.countCards('h')==0) event.goto(3); + else{ + var next=player.chooseToMove('鸿举:请选择要交换的手牌和“荣”'); + next.set('list',[ + [get.translation(player)+'(你)的“荣”',player.getExpansions('twzhengrong'),'twzhengrong_tag'], + ['手牌区',player.getCards('h')], ]); - next.set('filterMove', function (from, to) { - return typeof to != 'number'; + next.set('filterMove',function(from,to){ + return typeof to!='number'; }); - next.set('processAI', function (list) { - var player = _status.event.player, cards = list[0][1].concat(list[1][1]).sort(function (a, b) { - return player.getUseValue(a) - player.getUseValue(b); - }), cards2 = cards.splice(0, player.getExpansions('twzhengrong').length); - return [cards2, cards]; + next.set('processAI',function(list){ + var player=_status.event.player,cards=list[0][1].concat(list[1][1]).sort(function(a,b){ + return player.getUseValue(a)-player.getUseValue(b); + }),cards2=cards.splice(0,player.getExpansions('twzhengrong').length); + return [cards2,cards]; }); } 'step 2' - if (result.bool) { - var pushs = result.moved[0], gains = result.moved[1]; + if(result.bool){ + var pushs=result.moved[0],gains=result.moved[1]; pushs.removeArray(player.getExpansions('twzhengrong')); gains.removeArray(player.getCards('h')); - if (!pushs.length || pushs.length != gains.length) return; - player.addToExpansion(pushs, player, 'giveAuto').gaintag.add('twzhengrong'); - game.log(player, '将', pushs, '作为“荣”置于武将牌上'); - player.gain(gains, 'gain2'); + if(!pushs.length||pushs.length!=gains.length) return; + player.addToExpansion(pushs,player,'giveAuto').gaintag.add('twzhengrong'); + game.log(player,'将',pushs,'作为“荣”置于武将牌上'); + player.gain(gains,'gain2'); } 'step 3' player.addSkills('twqingce'); - player.chooseBool('是否减1点体力上限并获得〖扫讨〗?').set('ai', () => _status.event.bool).set('bool', player.isDamaged() && player.countCards('h') >= 3 ? (Math.random() < 0.5 ? true : false) : false); + player.chooseBool('是否减1点体力上限并获得〖扫讨〗?').set('ai',()=>_status.event.bool).set('bool',player.isDamaged()&&player.countCards('h')>=3?(Math.random()<0.5?true:false):false); 'step 4' - if (result.bool) { + if(result.bool){ player.loseMaxHp(); player.addSkills('twsaotao'); game.delayx(); } }, }, - twqingce: { - enable: 'phaseUse', - audio: 'drlt_qingce', - filter: function (event, player) { - return player.getExpansions('twzhengrong').length > 0; + twqingce:{ + enable:'phaseUse', + audio:'drlt_qingce', + filter:function(event,player){ + return player.getExpansions('twzhengrong').length>0; }, - chooseButton: { - dialog: function (event, player) { - return ui.create.dialog('清侧:请选择要移去的“荣”', player.getExpansions('twzhengrong'), 'hidden'); + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('清侧:请选择要移去的“荣”',player.getExpansions('twzhengrong'),'hidden'); }, - backup: function (links, player) { + backup:function(links,player){ return { - card: links[0], - filterCard: function () { return false }, - selectCard: -1, - filterTarget: function (card, player, target) { - return target.countDiscardableCards(player, 'hej') > 0; + card:links[0], + filterCard:function(){return false}, + selectCard:-1, + filterTarget:function(card,player,target){ + return target.countDiscardableCards(player,'hej')>0; }, - delay: false, - audio: 'drlt_qingce', - content: lib.skill.twqingce.contentx, - ai: { - result: { - target: function (player, target) { - return get.effect(target, { name: 'guohe' }, player, target); + delay:false, + audio:'drlt_qingce', + content:lib.skill.twqingce.contentx, + ai:{ + result:{ + target:function(player,target){ + return get.effect(target,{name:'guohe'},player,target); }, }, }, } }, - prompt: () => '弃置一名角色区域内的一张牌', + prompt:()=>'弃置一名角色区域内的一张牌', }, - contentx: function () { + contentx:function(){ 'step 0' - var card = lib.skill.twqingce_backup.card; + var card=lib.skill.twqingce_backup.card; player.loseToDiscardpile([card]); 'step 1' - if (target.countDiscardableCards(player, 'hej') > 0) player.discardPlayerCard('hej', true, target); + if(target.countDiscardableCards(player,'hej')>0) player.discardPlayerCard('hej',true,target); }, - ai: { - order: 8, - result: { - player: function (player) { - if (game.hasPlayer(function (target) { - return get.effect(target, { name: 'guohe' }, player, player) > 4 * Math.max(0, 5 - player.getExpansions('twzhengrong').length); + ai:{ + order:8, + result:{ + player:function(player){ + if(game.hasPlayer(function(target){ + return get.effect(target,{name:'guohe'},player,player)>4*Math.max(0,5-player.getExpansions('twzhengrong').length); })) return 1; return 0; }, }, }, }, - twsaotao: { - audio: 2, - trigger: { player: 'useCard' }, - filter: function (event, player) { - return event.card.name == 'sha' || get.type(event.card) == 'trick'; + twsaotao:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='sha'||get.type(event.card)=='trick'; }, - forced: true, - content: function () { + forced:true, + content:function(){ trigger.directHit.addArray(game.players); }, - ai: { directHit_ai: true }, + ai:{directHit_ai:true}, }, //大小乔 - twxingwu: { - audio: 'xingwu', - trigger: { player: 'phaseDiscardBegin' }, - filter: function (event, player) { + twxingwu:{ + audio:'xingwu', + trigger:{player:'phaseDiscardBegin'}, + filter:function(event,player){ return player.countCards('he'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard('he', get.prompt('twxingwu'), '将一张牌置于武将牌上作为“星舞”').set('ai', function (card) { - if (_status.event.goon) return 20 - get.value(card); - return 7 - get.value(card); - }).set('goon', player.needsToDiscard() || player.getExpansions('twxingwu').length > 1); + player.chooseCard('he',get.prompt('twxingwu'),'将一张牌置于武将牌上作为“星舞”').set('ai',function(card){ + if(_status.event.goon) return 20-get.value(card); + return 7-get.value(card); + }).set('goon',player.needsToDiscard()||player.getExpansions('twxingwu').length>1); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twxingwu'); - var cards = result.cards; - player.addToExpansion(cards, player, 'give').gaintag.add('twxingwu'); + var cards=result.cards; + player.addToExpansion(cards,player,'give').gaintag.add('twxingwu'); } else event.finish(); 'step 2' game.delayx(); - if (player.getExpansions('twxingwu').length < 3 || !game.hasPlayer(current => current != player)) event.finish(); + if(player.getExpansions('twxingwu').length<3||!game.hasPlayer(current=>current!=player)) event.finish(); 'step 3' - player.chooseButton(['是否移去三张“星舞”牌并发射核弹?', player.getExpansions('twxingwu')], 3).set('ai', function (button) { - if (_status.event.goon) return 1; + player.chooseButton(['是否移去三张“星舞”牌并发射核弹?',player.getExpansions('twxingwu')],3).set('ai',function(button){ + if(_status.event.goon) return 1; return 0; - }).set('goon', game.hasPlayer(current => get.damageEffect(current, player, player) < 0)); + }).set('goon',game.hasPlayer(current=>get.damageEffect(current,player,player)<0)); 'step 4' - if (result.bool) player.loseToDiscardpile(result.links); + if(result.bool) player.loseToDiscardpile(result.links); else event.finish(); 'step 5' - player.chooseTarget('星舞:选择一名其他角色', '弃置其装备区内的所有牌。然后对其造成2点伤害(若其性别包含女性则改为1点)', true, lib.filter.notMe).set('ai', function (target) { - return get.damageEffect(target, player, player) * Math.sqrt(4 + target.countCards('e', function (card) { - return get.value(card, target) > 0; - })) * (target.hasSex('female') ? 1 : 2); + player.chooseTarget('星舞:选择一名其他角色','弃置其装备区内的所有牌。然后对其造成2点伤害(若其性别包含女性则改为1点)',true,lib.filter.notMe).set('ai',function(target){ + return get.damageEffect(target,player,player)*Math.sqrt(4+target.countCards('e',function(card){ + return get.value(card,target)>0; + }))*(target.hasSex('female')?1:2); }); 'step 6' - if (result.bool && result.targets && result.targets.length) { - var target = result.targets[0]; - player.line(target, 'green'); - var num = target.countCards('e'); - if (num) player.discardPlayerCard(target, 'e', num, true); - target.damage(target.hasSex('female') ? 1 : 2); + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'green'); + var num=target.countCards('e'); + if(num) player.discardPlayerCard(target,'e',num,true); + target.damage(target.hasSex('female')?1:2); } }, - intro: { - content: 'expansion', - markcount: 'expansion', - onunmark: function (storage, player) { - if (player.hasSkill('twpingting')) return; + intro:{ + content:'expansion', + markcount:'expansion', + onunmark:function(storage,player){ + if(player.hasSkill('twpingting')) return; player.removeAdditionalSkill('twpingting'); }, }, - onremove: function (player, skill) { - if (player.hasSkill('twpingting')) return; - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + if(player.hasSkill('twpingting')) return; + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, }, - twpingting: { - audio: 2, - trigger: { global: ['roundStart', 'dying'] }, - init: function (player, skill) { - if (player.getExpansions('twxingwu').length) player.addAdditionalSkill(skill, ['tianxiang', 'liuli']); + twpingting:{ + audio:2, + trigger:{global:['roundStart','dying']}, + init:function(player,skill){ + if(player.getExpansions('twxingwu').length) player.addAdditionalSkill(skill,['tianxiang','liuli']); else player.removeAdditionalSkill(skill); }, - filter: function (event, player) { - if (event.name == 'dying') return player == _status.currentPhase && event.player != player; + filter:function(event,player){ + if(event.name=='dying') return player==_status.currentPhase&&event.player!=player; return true; }, - forced: true, - group: 'twpingting_update', - derivation: ['tianxiang', 'liuli'], - content: function () { + forced:true, + group:'twpingting_update', + derivation:['tianxiang','liuli'], + content:function(){ 'step 0' player.draw(); - player.chooseCard('he', '娉婷:将一张牌置于武将牌上,称为“星舞”', true).set('ai', function (card) { + player.chooseCard('he','娉婷:将一张牌置于武将牌上,称为“星舞”',true).set('ai',function(card){ return -get.value(card); }); 'step 1' - if (result.bool) { - var cards = result.cards; - player.addToExpansion(cards, player, 'give').gaintag.add('twxingwu'); + if(result.bool){ + var cards=result.cards; + player.addToExpansion(cards,player,'give').gaintag.add('twxingwu'); } }, - onremove: function (player, skill) { - if (player.hasSkill('twxingwu')) return; - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + if(player.hasSkill('twxingwu')) return; + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - subSkill: { - update: { - trigger: { player: ['loseAfter', 'loseAsyncAfter', 'addToExpansionAfter'] }, - filter: function (event, player) { - var cards = player.getExpansions('twxingwu'), skills = player.additionalSkills.twpingting; - return !((cards.length && skills && skills.length) || (!cards.length && (!skills || !skills.length))); + subSkill:{ + update:{ + trigger:{player:['loseAfter','loseAsyncAfter','addToExpansionAfter']}, + filter:function(event,player){ + var cards=player.getExpansions('twxingwu'),skills=player.additionalSkills.twpingting; + return !((cards.length&&skills&&skills.length)||(!cards.length&&(!skills||!skills.length))); }, - forced: true, - silent: true, - content: function () { - lib.skill.twpingting.init(player, 'twpingting'); + forced:true, + silent:true, + content:function(){ + lib.skill.twpingting.init(player,'twpingting'); } } } }, - tianxiang_daxiaoqiao: { audio: 2, inherit: 'tianxiang' }, - liuli_daxiaoqiao: { audio: 2, inherit: 'liuli' }, + tianxiang_daxiaoqiao:{audio:2,inherit:'tianxiang'}, + liuli_daxiaoqiao:{audio:2,inherit:'liuli'}, //傅肜 - twxuewei: { - audio: 'xuewei', - trigger: { global: 'phaseUseBegin' }, - filter: function (event, player) { - return event.player != player && game.players.length > 2 && !player.hasSkill('twxuewei_round'); + twxuewei:{ + audio:'xuewei', + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player!=player&&game.players.length>2&&!player.hasSkill('twxuewei_round'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twxuewei'), function (card, player, target) { - return target != player && target != _status.event.getTrigger().player; - }).set('ai', function (target) { - if (get.attitude(player, _status.event.getTrigger().player) >= 0) return 0; - return get.attitude(player, target); + player.chooseTarget(get.prompt2('twxuewei'),function(card,player,target){ + return target!=player&&target!=_status.event.getTrigger().player; + }).set('ai',function(target){ + if(get.attitude(player,_status.event.getTrigger().player)>=0) return 0; + return get.attitude(player,target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twxuewei', trigger.player, false); - player.addTempSkill('twxuewei_round', 'roundStart'); - player.line2([trigger.player, target]); - trigger.player.chooseControl('选项一', '选项二').set('choiceList', [ - '本回合不能对' + get.translation(target) + '使用【杀】且手牌上限-2', - '令' + get.translation(player) + '视为对你使用一张【决斗】', - ]).set('ai', function () { - var player = _status.event.player, source = _status.event.getParent().player; - if (get.effect(player, { name: 'juedou' }, source, player) > 0) return 1; - if (player.hp - player.countCards('h') > 2 || player.hp <= 2) return 0; + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twxuewei',trigger.player,false); + player.addTempSkill('twxuewei_round','roundStart'); + player.line2([trigger.player,target]); + trigger.player.chooseControl('选项一','选项二').set('choiceList',[ + '本回合不能对'+get.translation(target)+'使用【杀】且手牌上限-2', + '令'+get.translation(player)+'视为对你使用一张【决斗】', + ]).set('ai',function(){ + var player=_status.event.player,source=_status.event.getParent().player; + if(get.effect(player,{name:'juedou'},source,player)>0) return 1; + if(player.hp-player.countCards('h')>2||player.hp<=2) return 0; return 1; }); } else event.finish(); 'step 2' - game.log(trigger.player, '选择了', '#g【血卫】', '的', '#y' + result.control); - if (result.control == '选项一') { - trigger.player.markAuto('twxuewei_block', [target]); + game.log(trigger.player,'选择了','#g【血卫】','的','#y'+result.control); + if(result.control=='选项一'){ + trigger.player.markAuto('twxuewei_block',[target]); trigger.player.addTempSkill('twxuewei_block'); } - else player.useCard({ name: 'juedou', isCard: true }, trigger.player, false); + else player.useCard({name:'juedou',isCard:true},trigger.player,false); }, - subSkill: { - round: { charlotte: true }, - block: { - charlotte: true, - onremove: true, - locked: true, - mark: true, - marktext: '卫', - intro: { - content: function (storage, player) { - if (!storage || !storage.length) return; - return '不能对' + get.translation(storage) + '使用【杀】;手牌上限-' + (2 * storage.length); + subSkill:{ + round:{charlotte:true}, + block:{ + charlotte:true, + onremove:true, + locked:true, + mark:true, + marktext:'卫', + intro:{ + content:function(storage,player){ + if(!storage||!storage.length) return; + return '不能对'+get.translation(storage)+'使用【杀】;手牌上限-'+(2*storage.length); } }, - mod: { - maxHandcard: function (player, num) { - return num - 2 * player.getStorage('twxuewei_block').length; + mod:{ + maxHandcard:function(player,num){ + return num-2*player.getStorage('twxuewei_block').length; }, - playerEnabled: function (card, player, target) { - if (card.name == 'sha' && player.getStorage('twxuewei_block').includes(target)) return false; + playerEnabled:function(card,player,target){ + if(card.name=='sha'&&player.getStorage('twxuewei_block').includes(target)) return false; }, }, }, }, }, - twliechi: { - audio: 'liechi', - trigger: { player: 'damageEnd' }, - filter: function (event, player) { - return event.source && event.source.hp >= player.hp && (event.source.countCards('h') > player.countCards('h') || event.source.countCards('he')); + twliechi:{ + audio:'liechi', + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.hp>=player.hp&&(event.source.countCards('h')>player.countCards('h')||event.source.countCards('he')); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var num = trigger.source.countCards('h') - player.countCards('h'); - event.num = num; - var list = [], choiceList = [ - '令' + get.translation(trigger.source) + '弃置' + get.cnNumber(num) + '张手牌', - '弃置' + get.translation(trigger.source) + '一张牌', + var num=trigger.source.countCards('h')-player.countCards('h'); + event.num=num; + var list=[],choiceList=[ + '令'+get.translation(trigger.source)+'弃置'+get.cnNumber(num)+'张手牌', + '弃置'+get.translation(trigger.source)+'一张牌', '背水!弃置一张装备牌,然后依次执行以上所有选项', ]; - if (trigger.source.countCards('h') > player.countCards('h')) list.push('选项一'); - else choiceList[0] = '' + choiceList[0] + ''; - if (trigger.source.countCards('he')) list.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - if (trigger.source.countCards('h') > player.countCards('h') && trigger.source.countCards('he') && player.countCards('he', { type: 'equip' }) && game.getGlobalHistory('changeHp', evt => { - return evt.player == player && evt.getParent()._dyinged; + if(trigger.source.countCards('h')>player.countCards('h')) list.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(trigger.source.countCards('he')) list.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(trigger.source.countCards('h')>player.countCards('h')&&trigger.source.countCards('he')&&player.countCards('he',{type:'equip'})&&game.getGlobalHistory('changeHp',evt=>{ + return evt.player==player&&evt.getParent()._dyinged; }).length) list.push('背水!'); - else choiceList[2] = '' + choiceList[2] + '(未进入过濒死状态)'; - player.chooseControl(list, 'cancel2').set('prompt', get.prompt('twliechi', trigger.source)).set('choiceList', choiceList).set('ai', () => _status.event.choice).set('choice', function () { - if (get.attitude(player, trigger.source) > 0) return 'cancel2'; - if (list.includes('背水!')) return '背水!'; - if (num > 1) return '选项一'; + else choiceList[2]=''+choiceList[2]+'(未进入过濒死状态)'; + player.chooseControl(list,'cancel2').set('prompt',get.prompt('twliechi',trigger.source)).set('choiceList',choiceList).set('ai',()=>_status.event.choice).set('choice',function(){ + if(get.attitude(player,trigger.source)>0) return 'cancel2'; + if(list.includes('背水!')) return '背水!'; + if(num>1) return '选项一'; return '选项二'; }()); 'step 1' - if (result.control != 'cancel2') { - player.logSkill('twliechi', trigger.source); - game.log(player, '选择了', '#g【烈斥】', '的', '#y' + result.control); - if (result.control == '背水!') player.chooseToDiscard('he', { type: 'equip' }, true); - if (result.control != '选项二') trigger.source.chooseToDiscard('h', num, true); - if (result.control != '选项一') player.discardPlayerCard(trigger.source, 'he', true); + if(result.control!='cancel2'){ + player.logSkill('twliechi',trigger.source); + game.log(player,'选择了','#g【烈斥】','的','#y'+result.control); + if(result.control=='背水!') player.chooseToDiscard('he',{type:'equip'},true); + if(result.control!='选项二') trigger.source.chooseToDiscard('h',num,true); + if(result.control!='选项一') player.discardPlayerCard(trigger.source,'he',true); } } }, //卢植 - twmingren: { - marktext: '任', - intro: { - content: 'expansion', - markcount: 'expansion', + twmingren:{ + marktext:'任', + intro:{ + content:'expansion', + markcount:'expansion', }, - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - group: 'twmingren_change', - audio: 'nzry_mingren_1', - trigger: { global: 'phaseBefore', player: 'enterGame' }, - forced: true, - locked: false, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0) && !player.getExpansions('twmingren').length; + group:'twmingren_change', + audio:'nzry_mingren_1', + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&!player.getExpansions('twmingren').length; }, - content: function () { + content:function(){ 'step 0' player.draw(); 'step 1' - if (!player.countCards('h')) event.finish(); - else player.chooseCard('h', '明任:将一张手牌置于武将牌上,称为“任”', true).set('ai', function (card) { - return 6 - get.value(card); + if(!player.countCards('h')) event.finish(); + else player.chooseCard('h','明任:将一张手牌置于武将牌上,称为“任”',true).set('ai',function(card){ + return 6-get.value(card); }); 'step 2' - if (result.bool) player.addToExpansion(result.cards[0], player, 'give', 'log').gaintag.add('twmingren'); + if(result.bool) player.addToExpansion(result.cards[0],player,'give','log').gaintag.add('twmingren'); }, - subSkill: { - change: { - audio: 'nzry_mingren_1', - trigger: { player: ['phaseUseBegin', 'phaseUseEnd'] }, - filter: function (event, player) { - return player.countCards('he') && player.getExpansions('twmingren').length; + subSkill:{ + change:{ + audio:'nzry_mingren_1', + trigger:{player:['phaseUseBegin','phaseUseEnd']}, + filter:function(event,player){ + return player.countCards('he')&&player.getExpansions('twmingren').length; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard('he', get.prompt('twmingren'), '用一张牌替换“任”(' + get.translation(player.getExpansions('twmingren')[0]) + ')').set('ai', function (card) { - var player = _status.event.player; - var color = get.color(card); - if (color == get.color(player.getExpansions('twmingren')[0])) return false; - var num = 0; - var list = []; - player.countCards('he', function (cardx) { - if (cardx != card || get.color(cardx) != color) return false; - if (list.includes(cardx.name)) return false; + player.chooseCard('he',get.prompt('twmingren'),'用一张牌替换“任”('+get.translation(player.getExpansions('twmingren')[0])+')').set('ai',function(card){ + var player=_status.event.player; + var color=get.color(card); + if(color==get.color(player.getExpansions('twmingren')[0])) return false; + var num=0; + var list=[]; + player.countCards('he',function(cardx){ + if(cardx!=card||get.color(cardx)!=color) return false; + if(list.includes(cardx.name)) return false; list.push(cardx.name); - switch (cardx.name) { - case 'wuxie': num += (game.countPlayer() / 2.2); break; - case 'caochuan': num += 1.1; break; - case 'shan': num += 1; break; + switch (cardx.name){ + case 'wuxie':num+=(game.countPlayer()/2.2); break; + case 'caochuan':num+=1.1; break; + case 'shan':num+=1; break; } }); - return num * (30 - get.value(card)); + return num*(30-get.value(card)); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twmingren'); - player.addToExpansion(result.cards[0], 'log', 'give', player).gaintag.add('twmingren'); - var card = player.getExpansions('twmingren')[0]; - if (card) player.gain(card, 'gain2'); + player.addToExpansion(result.cards[0],'log','give',player).gaintag.add('twmingren'); + var card=player.getExpansions('twmingren')[0]; + if(card) player.gain(card,'gain2'); } }, }, }, }, - twzhenliang: { - group: ['twzhenliang_1', 'twzhenliang_2'], - audio: 'nzry_zhenliang_1', - mark: true, - zhuanhuanji: true, - marktext: '☯', - intro: { - content: function (storage, player, skill) { - if (player.storage.twzhenliang == true) return '当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; + twzhenliang:{ + group:['twzhenliang_1','twzhenliang_2'], + audio:'nzry_zhenliang_1', + mark:true, + zhuanhuanji:true, + marktext:'☯', + intro:{ + content:function(storage,player,skill){ + if(player.storage.twzhenliang==true) return '当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; return '出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; }, }, - subSkill: { - 1: { - audio: 'nzry_zhenliang_1', - enable: 'phaseUse', - filter: function (event, player) { - if (player.storage.twzhenliang) return false; - return game.hasPlayer(function (current) { + subSkill:{ + 1:{ + audio:'nzry_zhenliang_1', + enable:'phaseUse', + filter:function(event,player){ + if(player.storage.twzhenliang) return false; + return game.hasPlayer(function(current){ return player.inRange(current); }); }, - position: 'he', - filterCard: true, - filterTarget: function (card, player, target) { + position:'he', + filterCard:true, + filterTarget:function(card,player,target){ return player.inRange(target); }, - check: function (card) { - var player = _status.event.player, cardx = player.getExpansions('twmingren')[0]; - if (cardx && get.color(cardx, player) == get.color(card, player)) return 10 - get.value(card); - return 7 - get.value(card); + check:function(card){ + var player=_status.event.player,cardx=player.getExpansions('twmingren')[0]; + if(cardx&&get.color(cardx,player)==get.color(card,player)) return 10-get.value(card); + return 7-get.value(card); }, - prompt: '弃置一张牌并对攻击范围内的一名角色造成1点伤害', - content: function () { + prompt:'弃置一张牌并对攻击范围内的一名角色造成1点伤害', + content:function(){ 'step 0' player.changeZhuanhuanji('twzhenliang'); - var cardx = player.getExpansions('twmingren')[0]; + var cardx=player.getExpansions('twmingren')[0]; target.damage('nocard'); - if (!cardx || get.color(cards[0], player) != get.color(cardx, player)) event.finish(); + if(!cardx||get.color(cards[0],player)!=get.color(cardx,player)) event.finish(); 'step 1' player.draw(); }, - ai: { - order: 5, - result: { - player: function (player, target) { - return get.damageEffect(target, player, player); + ai:{ + order:5, + result:{ + player:function(player,target){ + return get.damageEffect(target,player,player); }, }, }, }, - 2: { - audio: 'nzry_zhenliang_1', - trigger: { global: 'damageBegin4' }, - filter: function (event, player) { - if (_status.currentPhase == player || !player.storage.twzhenliang) return false; - return player.countCards('he') && event.num > 0 && (event.player == player || player.inRange(event.player)); + 2:{ + audio:'nzry_zhenliang_1', + trigger:{global:'damageBegin4'}, + filter:function(event,player){ + if(_status.currentPhase==player||!player.storage.twzhenliang) return false; + return player.countCards('he')&&event.num>0&&(event.player==player||player.inRange(event.player)); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseToDiscard('he', get.prompt('twzhenliang', trigger.player), '弃置一张牌令此伤害-1').set('ai', function (card) { - if (_status.event.goon) { - var player = _status.event.player, cardx = player.getExpansions('twmingren')[0]; - if (cardx && get.color(cardx, player) == get.color(card, player)) return 10 - get.value(card); - return 6 - get.value(card); + player.chooseToDiscard('he',get.prompt('twzhenliang',trigger.player),'弃置一张牌令此伤害-1').set('ai',function(card){ + if(_status.event.goon){ + var player=_status.event.player,cardx=player.getExpansions('twmingren')[0]; + if(cardx&&get.color(cardx,player)==get.color(card,player)) return 10-get.value(card); + return 6-get.value(card); } return 0; - }).set('goon', get.attitude(player, trigger.player) > 0).logSkill = ['twzhenliang', trigger.player]; + }).set('goon',get.attitude(player,trigger.player)>0).logSkill=['twzhenliang',trigger.player]; 'step 1' - if (result.bool) { + if(result.bool){ player.changeZhuanhuanji('twzhenliang'); - var cardx = player.getExpansions('twmingren')[0]; - if (cardx && get.color(result.cards[0], player) == get.color(cardx, player)) player.draw(); + var cardx=player.getExpansions('twmingren')[0]; + if(cardx&&get.color(result.cards[0],player)==get.color(cardx,player)) player.draw(); trigger.num--; } }, @@ -7289,253 +7289,253 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //张南 - twfenwu: { - audio: 2, - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player && player.canUse('sha', current, false, false); + twfenwu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&player.canUse('sha',current,false,false); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = []; - player.getHistory('useCard', function (evt) { - if (get.type(evt.card) != 'basic') return; - var name = evt.card.name, nature = game.hasNature(evt.card) ? get.nature(evt.card) : ''; - if (!list.includes(name + nature)) list.push(name + nature); + var list=[]; + player.getHistory('useCard',function(evt){ + if(get.type(evt.card)!='basic') return; + var name=evt.card.name,nature=game.hasNature(evt.card)?get.nature(evt.card):''; + if(!list.includes(name+nature)) list.push(name+nature); }); - event.addDamage = list.length > 1; - player.chooseTarget(get.prompt('twfenwu'), '失去1点体力并视为使用一张无距离限制的【杀】' + (event.addDamage ? '(伤害基数+1)' : ''), function (card, player, target) { - return target != player && player.canUse('sha', target, false, false); - }).set('ai', function (target) { - var player = _status.event.player; - if (player.hp + player.countCards('hs', { name: ['tao', 'jiu'] }) <= 1) return -1; - var num = 1; - if ((!target.mayHaveShan(player, 'use', target.getCards('h', i => { + event.addDamage=list.length>1; + player.chooseTarget(get.prompt('twfenwu'),'失去1点体力并视为使用一张无距离限制的【杀】'+(event.addDamage?'(伤害基数+1)':''),function(card,player,target){ + return target!=player&&player.canUse('sha',target,false,false); + }).set('ai',function(target){ + var player=_status.event.player; + if(player.hp+player.countCards('hs',{name:['tao','jiu']})<=1) return -1; + var num=1; + if((!target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - })) || player.hasSkillTag('directHit_ai', true, { - target: target, - card: { name: 'sha' }, - }, true)) && !target.hasSkillTag('filterDamage', null, { - player: player, - card: { name: 'sha' }, - })) { - num = 1.3; + }))||player.hasSkillTag('directHit_ai',true,{ + target:target, + card:{name:'sha'}, + },true))&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:{name:'sha'}, + })){ + num=1.3; } - return get.effect(target, { name: 'sha' }, player, player) * num; + return get.effect(target,{name:'sha'},player,player)*num; }); 'step 1' - if (result.bool) { - var num = 1; - var target = result.targets[0]; - player.logSkill('twfenwu', target); + if(result.bool){ + var num=1; + var target=result.targets[0]; + player.logSkill('twfenwu',target); player.loseHp(); - if (event.addDamage) { - num = 2; - game.log('#y杀', '的伤害基数+1'); + if(event.addDamage){ + num=2; + game.log('#y杀','的伤害基数+1'); } - player.useCard({ name: 'sha', isCard: true }, target, false).baseDamage = num; + player.useCard({name:'sha',isCard:true},target,false).baseDamage=num; } }, }, //呼厨泉 - twfupan: { - audio: 3, - trigger: { - player: 'damageEnd', - source: 'damageSource' + twfupan:{ + audio:3, + trigger:{ + player:'damageEnd', + source:'damageSource' }, - check: () => true, - onremove: true, - content: function () { + check:()=>true, + onremove:true, + content:function(){ 'step 0' - if (!player.storage.twfupan) player.storage.twfupan = {}; + if(!player.storage.twfupan) player.storage.twfupan={}; player.draw(trigger.num); 'step 1' - if (player.countCards('he') && game.hasPlayer(current => { - return !(player.storage.twfupan[current.playerid] >= 2) && player != current; - })) { + if(player.countCards('he')&&game.hasPlayer(current=>{ + return !(player.storage.twfupan[current.playerid]>=2)&&player!=current; + })){ player.chooseCardTarget({ - filterCard: true, - selectCard: 1, - position: 'he', - forced: true, - targetprompt: function (target) { - return !_status.event.player.storage.twfupan[target.playerid] ? '你摸两张牌' : '对其
    造成伤害'; + filterCard:true, + selectCard:1, + position:'he', + forced:true, + targetprompt:function(target){ + return !_status.event.player.storage.twfupan[target.playerid]?'你摸两张牌':'对其
    造成伤害'; }, - filterTarget: function (card, player, target) { - return !(player.storage.twfupan[target.playerid] >= 2) && player != target; + filterTarget:function(card,player,target){ + return !(player.storage.twfupan[target.playerid]>=2)&&player!=target; }, - ai1: function (card) { - var player = _status.event.player; - if (get.value(card, false, 'raw') < 0) return 20 * get.value(card); - if (player == _status.currentPhase) return 20 - player.getUseValue(card); - return 20 - get.value(card); + ai1:function(card){ + var player=_status.event.player; + if(get.value(card,false,'raw')<0) return 20*get.value(card); + if(player==_status.currentPhase) return 20-player.getUseValue(card); + return 20-get.value(card); }, - ai2: function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (ui.selected.cards.length && get.value(ui.selected.cards[0], false, 'raw') < 0) { - return -0.1 - att; + ai2:function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(ui.selected.cards.length&&get.value(ui.selected.cards[0],false,'raw')<0){ + return -0.1-att; } - if (player.storage.twfupan[target.playerid] === undefined) return 5; - else if (player.storage.twfupan[target.playerid] === 1) return get.damageEffect(target, player, player); + if(player.storage.twfupan[target.playerid]===undefined) return 5; + else if(player.storage.twfupan[target.playerid]===1) return get.damageEffect(target,player,player); return 1; }, - prompt: '请选择要交出的卡牌和目标角色' + prompt:'请选择要交出的卡牌和目标角色' }); - } else event.finish(); + }else event.finish(); 'step 2' - if (result.bool) { - var cards = result.cards, target = result.targets[0]; - player.line(target, 'green'); - player.give(cards, target); - event.target = target; - if (!player.storage.twfupan[target.playerid]) { - player.storage.twfupan[target.playerid] = 1; + if(result.bool){ + var cards=result.cards,target=result.targets[0]; + player.line(target,'green'); + player.give(cards,target); + event.target=target; + if(!player.storage.twfupan[target.playerid]){ + player.storage.twfupan[target.playerid]=1; player.draw(2); event.finish(); - } else { - player.chooseBool('复叛:是否对' + get.translation(target) + '造成1点伤害?', '然后你不能再因此技能交给其牌').set('ai', () => _status.event.bool).set('bool', get.damageEffect(target, player, player) > 0); + }else{ + player.chooseBool('复叛:是否对'+get.translation(target)+'造成1点伤害?','然后你不能再因此技能交给其牌').set('ai',()=>_status.event.bool).set('bool',get.damageEffect(target,player,player)>0); } } 'step 3' - if (result.bool) { - player.line(target, 'fire'); + if(result.bool){ + player.line(target,'fire'); target.damage(); player.storage.twfupan[target.playerid]++; } }, - ai: { - maixie: true, - maixie_hp: true, - threaten: 0.9, + ai:{ + maixie:true, + maixie_hp:true, + threaten:0.9, } }, //刘璋 - twyaohu: { - audio: 'yinlang', - trigger: { player: 'phaseBegin' }, - direct: true, - filter: function (event, player) { - return !player.hasSkill('twyaohu_round') && game.hasPlayer(function (current) { - return current.group && current.group != 'unknown'; + twyaohu:{ + audio:'yinlang', + trigger:{player:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return !player.hasSkill('twyaohu_round')&&game.hasPlayer(function(current){ + return current.group&¤t.group!='unknown'; }); }, - content: function () { + content:function(){ 'step 0' - var list = []; - game.countPlayer(function (current) { - if (current.group && current.group != 'unknown') list.add(current.group); + var list=[]; + game.countPlayer(function(current){ + if(current.group&¤t.group!='unknown') list.add(current.group); }); - list.sort(function (a, b) { - return lib.group.indexOf(a) - lib.group.indexOf(b); + list.sort(function(a,b){ + return lib.group.indexOf(a)-lib.group.indexOf(b); }); - if (!player.hasSkill('twyaohu')) list.push('cancel2'); - player.chooseControl(list).set('prompt', '邀虎:请选择一个势力').set('ai', function () { + if(!player.hasSkill('twyaohu')) list.push('cancel2'); + player.chooseControl(list).set('prompt','邀虎:请选择一个势力').set('ai',function(){ return _status.event.choice; - }).set('choice', function () { - var getn = function (group) { - return game.countPlayer(function (current) { - if (current.group != group) return false; - if (player == current) return 2; - if (get.attitude(current, player) > 0) return 1; + }).set('choice',function(){ + var getn=function(group){ + return game.countPlayer(function(current){ + if(current.group!=group) return false; + if(player==current) return 2; + if(get.attitude(current,player)>0) return 1; return 1.3; }); } - list.sort(function (a, b) { - return getn(b) - getn(a); + list.sort(function(a,b){ + return getn(b)-getn(a); }); return list[0]; }()); 'step 1' - if (result.control != 'cancel2') { - player.logSkill('twyaohu', game.filterPlayer(function (current) { - return current.group == result.control; + if(result.control!='cancel2'){ + player.logSkill('twyaohu',game.filterPlayer(function(current){ + return current.group==result.control; })); - game.log(player, '选择了', '#y' + get.translation(result.control + 2)); - player.storage.yaohu = result.control; - player.storage.twyaohu = result.control; + game.log(player,'选择了','#y'+get.translation(result.control+2)); + player.storage.yaohu=result.control; + player.storage.twyaohu=result.control; player.markSkill('twyaohu'); } }, - ai: { combo: 'jutu' }, - intro: { content: '已选择了$势力' }, - group: 'twyaohu_gain', - subSkill: { - round: {}, - gain: { - audio: 'yinlang', - trigger: { global: 'phaseUseBegin' }, - filter: function (event, player) { - return event.player.group == player.storage.yaohu && event.player.isIn() && player.getExpansions('jutu').length > 0; + ai:{combo:'jutu'}, + intro:{content:'已选择了$势力'}, + group:'twyaohu_gain', + subSkill:{ + round:{}, + gain:{ + audio:'yinlang', + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player.group==player.storage.yaohu&&event.player.isIn()&&player.getExpansions('jutu').length>0; }, - forced: true, - locked: false, - logTarget: 'player', - content: function () { + forced:true, + locked:false, + logTarget:'player', + content:function(){ 'step 0' - var target = trigger.player; - event.target = target; - target.chooseButton(['选择获得一张“生”', player.getExpansions('jutu')], true).set('ai', function (button) { - return get.value(button.link, player); + var target=trigger.player; + event.target=target; + target.chooseButton(['选择获得一张“生”',player.getExpansions('jutu')],true).set('ai',function(button){ + return get.value(button.link,player); }); 'step 1' - if (result.bool) { - target.gain(result.links, 'give', player); + if(result.bool){ + target.gain(result.links,'give',player); } 'step 2' - if (game.hasPlayer(function (current) { - return current != player && current != target; - })) { - player.chooseTarget(true, '选择' + get.translation(target) + '使用【杀】的目标', function (card, player, target) { - return target != player && target != _status.event.source; - }).set('source', target).set('ai', function (target) { - var evt = _status.event; - return get.effect(target, { name: 'sha' }, evt.source, evt.player); + if(game.hasPlayer(function(current){ + return current!=player&¤t!=target; + })){ + player.chooseTarget(true,'选择'+get.translation(target)+'使用【杀】的目标',function(card,player,target){ + return target!=player&&target!=_status.event.source; + }).set('source',target).set('ai',function(target){ + var evt=_status.event; + return get.effect(target,{name:'sha'},evt.source,evt.player); }); } else { - event._result = { bool: false }; + event._result={bool:false}; event.goto(4); } 'step 3' - var target2 = result.targets[0]; - player.line(target2, 'green'); - target.chooseToUse(function (card, player, event) { - if (get.name(card) != 'sha') return false; - return lib.filter.filterCard.apply(this, arguments); - }, '对' + get.translation(target2) + '使用一张杀,否则本回合使用伤害牌指定' + get.translation(player) + '为目标时须交给' + get.translation(player) + '两张牌,否则此牌对' + get.translation(player) + '无效').set('targetRequired', true).set('complexSelect', true).set('filterTarget', function (card, player, target) { - if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this, arguments); - }).set('sourcex', target2).set('addCount', false); + var target2=result.targets[0]; + player.line(target2,'green'); + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'对'+get.translation(target2)+'使用一张杀,否则本回合使用伤害牌指定'+get.translation(player)+'为目标时须交给'+get.translation(player)+'两张牌,否则此牌对'+get.translation(player)+'无效').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',target2).set('addCount',false); 'step 4' - if (!result.bool) player.addTempSkill('twyaohu_effect'); + if(!result.bool) player.addTempSkill('twyaohu_effect'); }, }, - effect: { - audio: 'yinlang', - trigger: { global: 'useCardToPlayer' }, - charlotte: true, - forced: true, - filter: function (event, player) { - return event.target == player && get.tag(event.card, 'damage'); + effect:{ + audio:'yinlang', + trigger:{global:'useCardToPlayer'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return event.target==player&&get.tag(event.card,'damage'); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' - var hs = trigger.player.getCards('he'); - if (hs.length < 2) event._result = { bool: false }; - else trigger.player.chooseCard(2, '交给' + get.translation(player) + '两张牌,否则取消' + get.translation(trigger.card) + '对其的目标', 'he').set('ai', card => { - if (_status.event.goon) return 5 - get.value(card); + var hs=trigger.player.getCards('he'); + if(hs.length<2) event._result={bool:false}; + else trigger.player.chooseCard(2,'交给'+get.translation(player)+'两张牌,否则取消'+get.translation(trigger.card)+'对其的目标','he').set('ai',card=>{ + if(_status.event.goon) return 5-get.value(card); return 0; - }).set('goon', get.effect(player, trigger.card, trigger.player, trigger.player) > 0); + }).set('goon',get.effect(player,trigger.card,trigger.player,trigger.player)>0); 'step 1' - if (result.bool) { - trigger.player.give(result.cards, player); - } else { + if(result.bool){ + trigger.player.give(result.cards,player); + }else{ trigger.untrigger(); trigger.targets.remove(player); trigger.getParent().triggeredTargets1.remove(player); @@ -7545,111 +7545,111 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //李遗 - twjiaohua: { - audio: 2, - trigger: { global: 'gainAfter' }, - filter: function (event, player) { - if (event.getParent().name != 'draw') return false; - if (event.player != player && !event.player.isMinHp()) return false; - var cards = event.cards, list = ['basic', 'trick', 'equip']; - for (var card of cards) if (list.includes(get.type2(card))) list.remove(get.type2(card)); - for (var type of event.player.getStorage('twjiaohua_gained')) if (list.includes(type)) list.remove(type); - return list.length > 0; + twjiaohua:{ + audio:2, + trigger:{global:'gainAfter'}, + filter:function(event,player){ + if(event.getParent().name!='draw') return false; + if(event.player!=player&&!event.player.isMinHp()) return false; + var cards=event.cards,list=['basic','trick','equip']; + for(var card of cards) if(list.includes(get.type2(card))) list.remove(get.type2(card)); + for(var type of event.player.getStorage('twjiaohua_gained')) if(list.includes(type)) list.remove(type); + return list.length>0; }, - check: function (event, player) { - return get.attitude(player, event.player) > 0; + check:function(event,player){ + return get.attitude(player,event.player)>0; }, - prompt2: function (event, player) { - var cards = event.cards, list = ['basic', 'trick', 'equip']; - for (var card of cards) if (list.includes(get.type2(card))) list.remove(get.type2(card)); - for (var type of event.player.getStorage('twjiaohua_gained')) if (list.includes(type)) list.remove(type); - var name = event.player == player ? '你' : get.translation(event.player); - return '令' + name + '从牌堆或弃牌堆中获得一张' + (event.player.isUnderControl(true) ? list.map(i => get.translation(i) + '牌').join('、').replace(/(.*)、/, '$1或') : '本次未获得的类别的牌'); + prompt2:function(event,player){ + var cards=event.cards,list=['basic','trick','equip']; + for(var card of cards) if(list.includes(get.type2(card))) list.remove(get.type2(card)); + for(var type of event.player.getStorage('twjiaohua_gained')) if(list.includes(type)) list.remove(type); + var name=event.player==player?'你':get.translation(event.player); + return '令'+name+'从牌堆或弃牌堆中获得一张'+(event.player.isUnderControl(true)?list.map(i=>get.translation(i)+'牌').join('、').replace(/(.*)、/, '$1或'):'本次未获得的类别的牌'); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ trigger.player.addTempSkill('twjiaohua_gained'); - var cards = trigger.cards, list = ['basic', 'trick', 'equip']; - for (var card of cards) if (list.includes(get.type2(card))) list.remove(get.type2(card)); - for (var type of trigger.player.getStorage('twjiaohua_gained')) if (list.includes(type)) list.remove(type); + var cards=trigger.cards,list=['basic','trick','equip']; + for(var card of cards) if(list.includes(get.type2(card))) list.remove(get.type2(card)); + for(var type of trigger.player.getStorage('twjiaohua_gained')) if(list.includes(type)) list.remove(type); list.randomSort(); - var card = get.cardPile(function (card) { + var card=get.cardPile(function(card){ return list.includes(get.type2(card)); }); - if (card) { - trigger.player.gain(card, 'gain2'); - trigger.player.markAuto('twjiaohua_gained', [get.type2(card)]); + if(card){ + trigger.player.gain(card,'gain2'); + trigger.player.markAuto('twjiaohua_gained',[get.type2(card)]); } }, - subSkill: { - gained: { onremove: true, charlotte: true } + subSkill:{ + gained:{onremove:true,charlotte:true} } }, //阎象 - twkujian: { - audio: 3, - enable: 'phaseUse', - filterCard: true, - selectCard: [1, 3], - usable: 1, - discard: false, - lose: false, - delay: false, - filterTarget: lib.filter.notMe, - global: 'twkujian_ai', - check: function (card) { - 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); - if (ui.selected.cards.length >= Math.max(2, player.countCards('h') - player.hp)) return 0; - if (player.hp == player.maxHp || player.storage.jsprende < 0 || player.countCards('h') <= 1) { - var players = game.filterPlayer(); - for (var i = 0; i < players.length; i++) { - if (players[i].hasSkill('haoshi') && + twkujian:{ + audio:3, + enable:'phaseUse', + filterCard:true, + selectCard:[1,3], + usable:1, + discard:false, + lose:false, + delay:false, + filterTarget:lib.filter.notMe, + global:'twkujian_ai', + check:function(card){ + 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); + if(ui.selected.cards.length>=Math.max(2,player.countCards('h')-player.hp)) return 0; + if(player.hp==player.maxHp||player.storage.jsprende<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); + get.attitude(player,players[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); + 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); + return 10-get.value(card); }, - content: function () { - player.give(cards, target).gaintag.add('twkujianx'); + content:function(){ + player.give(cards,target).gaintag.add('twkujianx'); player.addSkill('twkujian_draw'); player.addSkill('twkujian_discard'); }, - ai: { - expose: 0.2, - order: 7, - 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; + ai:{ + expose:0.2, + order:7, + 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.jsprende < 0 || player.countCards('h') <= 1) { - if (nh >= np - 1 && np <= player.hp && !target.hasSkill('haoshi')) return 0; + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.jsprende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; } - return Math.max(1, 5 - nh); + 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; - })) { + 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; } } @@ -7657,386 +7657,386 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - subSkill: { - draw: { - audio: 'twkujian', - trigger: { global: ['useCardAfter', 'respondAfter'] }, - forced: true, - logTarget: 'player', - charlotte: true, - filter: function (event, player) { - return event.player.hasHistory('lose', evt => { - if (event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twkujianx')) return true; + subSkill:{ + draw:{ + audio:'twkujian', + trigger:{global:['useCardAfter','respondAfter']}, + forced:true, + logTarget:'player', + charlotte:true, + filter:function(event,player){ + return event.player.hasHistory('lose',evt=>{ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twkujianx')) return true; } }); }, - content: function () { + content:function(){ 'step 0' - game.asyncDraw([player, trigger.player]); + game.asyncDraw([player,trigger.player]); 'step 1' game.delayx(); } }, - discard: { - audio: 'twkujian', - trigger: { global: ['loseAfter', 'equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'] }, - forced: true, - logTarget: function (event, player) { - return game.filterPlayer(function (current) { - var evt = event.getl(current); - if (!evt || !evt.hs || !evt.hs.length) return false; - if (event.name == 'lose') { - var name = event.getParent().name; - if (name == 'useCard' || name == 'respond') return false; - for (var i in event.gaintag_map) { - if (event.gaintag_map[i].includes('twkujianx')) return true; + discard:{ + audio:'twkujian', + trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']}, + forced:true, + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + var evt=event.getl(current); + if(!evt||!evt.hs||!evt.hs.length) return false; + if(event.name=='lose'){ + var name=event.getParent().name; + if(name=='useCard'||name=='respond') return false; + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].includes('twkujianx')) return true; } return false; } - return current.hasHistory('lose', function (evt) { - if (event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twkujianx')) return true; + return current.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twkujianx')) return true; } return false; }); }); }, - charlotte: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - var evt = event.getl(current); - if (!evt || !evt.hs || !evt.hs.length) return false; - if (event.name == 'lose') { - var name = event.getParent().name; - if (name == 'useCard' || name == 'respond') return false; - for (var i in event.gaintag_map) { - if (event.gaintag_map[i].includes('twkujianx')) return true; + charlotte:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + var evt=event.getl(current); + if(!evt||!evt.hs||!evt.hs.length) return false; + if(event.name=='lose'){ + var name=event.getParent().name; + if(name=='useCard'||name=='respond') return false; + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].includes('twkujianx')) return true; } return false; } - return current.hasHistory('lose', function (evt) { - if (event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twkujianx')) return true; + return current.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twkujianx')) return true; } return false; }); }); }, - content: function () { + content:function(){ 'step 0' - var event = trigger; - var targets = game.filterPlayer(function (current) { - var evt = event.getl(current); - if (!evt || !evt.hs || !evt.hs.length) return false; - if (event.name == 'lose') { - var name = event.getParent().name; - if (name == 'useCard' || name == 'respond') return false; - for (var i in event.gaintag_map) { - if (event.gaintag_map[i].includes('twkujianx')) return true; + var event=trigger; + var targets=game.filterPlayer(function(current){ + var evt=event.getl(current); + if(!evt||!evt.hs||!evt.hs.length) return false; + if(event.name=='lose'){ + var name=event.getParent().name; + if(name=='useCard'||name=='respond') return false; + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].includes('twkujianx')) return true; } return false; } - return current.hasHistory('lose', function (evt) { - if (event != evt.getParent()) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twkujianx')) return true; + return current.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twkujianx')) return true; } return false; }); }); targets.add(player); targets.sortBySeat(); - _status.event.targets = targets; + _status.event.targets=targets; 'step 1' - var target = targets.shift(); - if (target.countCards('he') > 0) target.chooseToDiscard('he', true); - if (targets.length > 0) event.redo(); + var target=targets.shift(); + if(target.countCards('he')>0) target.chooseToDiscard('he',true); + if(targets.length>0) event.redo(); } }, - ai: { - charlotte: true, - ai: { - effect: { - player_use: function (card, player, target) { - if (card.cards && card.cards.some(i => i.hasGaintag('twkujianx')) && game.hasPlayer(current => { - return get.attitude(player, current) > 0; - })) return [1, 1]; + ai:{ + charlotte:true, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(card.cards&&card.cards.some(i=>i.hasGaintag('twkujianx'))&&game.hasPlayer(current=>{ + return get.attitude(player,current)>0; + })) return [1,1]; }, }, }, - mod: { - aiOrder: function (player, card, num) { - if (get.itemtype(card) == 'card' && card.hasGaintag('twkujianx') && game.hasPlayer(current => { - return get.attitude(player, current) > 0; - })) return num + 0.5; + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('twkujianx')&&game.hasPlayer(current=>{ + return get.attitude(player,current)>0; + })) return num+0.5; }, - aiValue: function (player, card, num) { - if (get.itemtype(card) == 'card' && card.hasGaintag('twkujianx') && game.hasPlayer(current => { - return get.attitude(player, current) > 0; - })) return num + 0.5; + aiValue:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('twkujianx')&&game.hasPlayer(current=>{ + return get.attitude(player,current)>0; + })) return num+0.5; } } } } }, - twruilian: { - audio: 2, - trigger: { global: 'roundStart' }, - direct: true, - content: function () { + twruilian:{ + audio:2, + trigger:{global:'roundStart'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twruilian')).set('ai', function (target) { - var player = _status.event.player, att = get.attitude(player, target), eff = att / (player == target ? 2 : 1) + 1; - if (att >= 0) { - if (target.hasSkill('yongsi')) return eff * 5; - if (target.hasSkill('zhiheng') || target.hasSkill('rezhiheng')) return eff * 4; - if (target.hasSkill('rekurou')) return eff * 3; - if (target.hasSkill('xinlianji') || target.hasSkill('dclianji')) return eff * 2; - if (target.needsToDiscard()) return eff * 1.5; + player.chooseTarget(get.prompt2('twruilian')).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target),eff=att/(player==target?2:1)+1; + if(att>=0){ + if(target.hasSkill('yongsi')) return eff*5; + if(target.hasSkill('zhiheng')||target.hasSkill('rezhiheng')) return eff*4; + if(target.hasSkill('rekurou')) return eff*3; + if(target.hasSkill('xinlianji')||target.hasSkill('dclianji')) return eff*2; + if(target.needsToDiscard()) return eff*1.5; return eff; } return 0; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twruilian', target); - player.markAuto('twruilian2', [target]); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twruilian',target); + player.markAuto('twruilian2',[target]); player.addSkill('twruilian2'); } }, }, - twruilian2: { - trigger: { global: 'phaseEnd' }, - direct: true, - charlotte: true, - onremove: true, - filter: function (event, player) { + twruilian2:{ + trigger:{global:'phaseEnd'}, + direct:true, + charlotte:true, + onremove:true, + filter:function(event,player){ return player.getStorage('twruilian2').includes(event.player); }, - intro: { content: '已选择$' }, - content: function () { + intro:{content:'已选择$'}, + content:function(){ 'step 0' player.removeSkill('twruilian2'); - var target = trigger.player; - event.target = target; - var cards = []; - target.getHistory('lose', function (evt) { - if (evt.type == 'discard') cards.addArray(evt.cards2); + var target=trigger.player; + event.target=target; + var cards=[]; + target.getHistory('lose',function(evt){ + if(evt.type=='discard') cards.addArray(evt.cards2); }); - if (cards.length < 2) event.finish(); - else event.cards = cards; + if(cards.length<2) event.finish(); + else event.cards=cards; 'step 1' - var list = []; - for (var type of ['basic', 'trick', 'equip']) { - for (var card of event.cards) { - if (get.type2(card) == type) { + var list=[]; + for(var type of ['basic','trick','equip']){ + for(var card of event.cards){ + if(get.type2(card)==type){ list.push(type); break; } } } list.push('cancel2'); - player.chooseControl(list).set('prompt', '睿敛:是否与' + get.translation(target) + '各获得一种类型的牌?').set('ai', function () { - var player = _status.event.player, list = _status.event.controls; - if (player.hp <= 3 && !player.countCards('h', { name: ['shan', 'tao'] }) && list.includes('basic')) return 'basic'; - if (player.countCards('he', { type: 'equip' }) < 2 && list.includes('equip')) return 'equip'; - if (list.includes('trick')) return 'trick'; + player.chooseControl(list).set('prompt','睿敛:是否与'+get.translation(target)+'各获得一种类型的牌?').set('ai',function(){ + var player=_status.event.player,list=_status.event.controls; + if(player.hp<=3&&!player.countCards('h',{name:['shan','tao']})&&list.includes('basic')) return 'basic'; + if(player.countCards('he',{type:'equip'})<2&&list.includes('equip')) return 'equip'; + if(list.includes('trick')) return 'trick'; return list.remove('cancel2').randomGet(); }); 'step 2' - if (result.control != 'cancel2') { - player.logSkill('twruilian2', target); - var type = result.control; - var list = [target, player].sortBySeat(_status.currentPhase), cards = []; - for (var current of list) { - var card = get.discardPile(function (card) { - return get.type2(card) == type && !cards.includes(card); + if(result.control!='cancel2'){ + player.logSkill('twruilian2',target); + var type=result.control; + var list=[target,player].sortBySeat(_status.currentPhase),cards=[]; + for(var current of list){ + var card=get.discardPile(function(card){ + return get.type2(card)==type&&!cards.includes(card); }); - if (card) { + if(card){ cards.push(card); - current.gain(card, 'gain2'); + current.gain(card,'gain2'); } } } }, }, //夏侯恩 - twfujian: { - audio: 2, - group: 'twfujian_lose', - trigger: { - global: 'phaseBefore', - player: ['enterGame', 'phaseZhunbeiBegin'] + twfujian:{ + audio:2, + group:'twfujian_lose', + trigger:{ + global:'phaseBefore', + player:['enterGame','phaseZhunbeiBegin'] }, - filter: function (event, player) { - if (player.getEquips(1).length) return false; - return event.name != 'phase' || game.phaseNumber == 0; + filter:function(event,player){ + if(player.getEquips(1).length) return false; + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - content: function () { - var card = get.cardPile2(function (card) { - return get.type(card) == 'equip' && get.subtype(card) == 'equip1'; + forced:true, + content:function(){ + var card=get.cardPile2(function(card){ + return get.type(card)=='equip'&&get.subtype(card)=='equip1'; }); - event.card = card; - if (card) player.equip(card); - else { + event.card=card; + if(card) player.equip(card); + else{ game.log('但是牌堆中没有武器牌了!'); event.finish(); } }, - subSkill: { - lose: { - audio: 'twfujian', - trigger: { - player: 'loseAfter', - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + subSkill:{ + lose:{ + audio:'twfujian', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - if (player == _status.currentPhase) return false; - if (event.name == 'gain' && event.player == player) return false; - var evt = event.getl(player); - if (evt && evt.cards2 && evt.cards2.some(i => get.subtype(i) == 'equip1')) return true; + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.name=='gain'&&event.player==player) return false; + var evt=event.getl(player); + if(evt&&evt.cards2&&evt.cards2.some(i=>get.subtype(i)=='equip1')) return true; return false; }, - forced: true, - content: function () { + forced:true, + content:function(){ player.loseHp(); }, }, }, }, - twjianwei: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - if (!player.getEquips(1).length) return false; - return game.hasPlayer(function (current) { - return player.inRange(current) && player.canCompare(current); + twjianwei:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(!player.getEquips(1).length) return false; + return game.hasPlayer(function(current){ + return player.inRange(current)&&player.canCompare(current); }); }, - pindianCheck: function (player, target) { - var hs = player.getCards('h').sort(function (a, b) { - return b.number - a.number; + pindianCheck:function(player,target){ + 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; + var ts=target.getCards('h').sort(function(a,b){ + return b.number-a.number; }); - if (!hs.length || !ts.length) return 0; - if (Math.min(13, hs[0].number + player.getAttackRange()) > ts[0].number || ts[0].number > 9 && get.value(ts[0]) <= 5 || target.countCards('j')) return true; + if(!hs.length||!ts.length) return 0; + if(Math.min(13,hs[0].number+player.getAttackRange())>ts[0].number||ts[0].number>9&&get.value(ts[0])<=5||target.countCards('j')) return true; return false; }, - direct: true, - locked: false, - group: ['twjianwei_pindian', 'twjianwei_zhaocha'], - content: function () { + direct:true, + locked:false, + group:['twjianwei_pindian','twjianwei_zhaocha'], + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twjianwei'), '与攻击范围内的一名角色拼点。若你赢,你获得其每个区域里的一张牌;若其赢,其获得你装备区里的武器牌', function (card, player, target) { - return player.inRange(target) && player.canCompare(target); - }).set('ai', function (target) { - var player = _status.event.player; - if (lib.skill.twjianwei.pindianCheck(player, target)) return -5 * get.attitude(player, target); - return -get.attitude(player, target); + player.chooseTarget(get.prompt('twjianwei'),'与攻击范围内的一名角色拼点。若你赢,你获得其每个区域里的一张牌;若其赢,其获得你装备区里的武器牌',function(card,player,target){ + return player.inRange(target)&&player.canCompare(target); + }).set('ai',function(target){ + var player=_status.event.player; + if(lib.skill.twjianwei.pindianCheck(player,target)) return -5*get.attitude(player,target); + return -get.attitude(player,target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twjianwei', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twjianwei',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; i < ui.selected.buttons.length; i++) { - if (get.position(button.link) == get.position(ui.selected.buttons[i].link)) return false; + 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; i 13) trigger.num1 = 13; + forced:true, + locked:false, + content:function(){ + var num=player.getAttackRange(); + if(player==trigger.player){ + trigger.num1+=num; + if(trigger.num1>13) trigger.num1=13; } else { - trigger.num2 += num; - if (trigger.num2 > 13) trigger.num2 = 13; + trigger.num2+=num; + if(trigger.num2>13) trigger.num2=13; } - game.log(player, '的拼点牌点数+' + num); + game.log(player,'的拼点牌点数+'+num); }, }, //你是故意找茬是不是 - zhaocha: { - trigger: { global: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - if (event.player == player) return false; + zhaocha:{ + trigger:{global:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(event.player==player) return false; return event.player.canCompare(player); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - trigger.player.chooseBool('剑威:是否与' + get.translation(player) + '拼点?', '若你赢,你获得其装备区里的武器牌;若其赢,其获得你每个区域里的一张牌').set('ai', () => _status.event.choice).set('choice', get.attitude(trigger.player, player) < 0 && !lib.skill.twjianwei.pindianCheck(player, trigger.player)); + trigger.player.chooseBool('剑威:是否与'+get.translation(player)+'拼点?','若你赢,你获得其装备区里的武器牌;若其赢,其获得你每个区域里的一张牌').set('ai',()=>_status.event.choice).set('choice',get.attitude(trigger.player,player)<0&&!lib.skill.twjianwei.pindianCheck(player,trigger.player)); 'step 1' - if (result.bool) { - trigger.player.logSkill('twjianwei', player); + if(result.bool){ + trigger.player.logSkill('twjianwei',player); trigger.player.chooseToCompare(player); } else event.finish(); 'step 2' - if (!result.tie) { - if (result.bool) { - var card = player.getEquips(1); - if (card.length) trigger.player.gain(card, player, 'give'); + if(!result.tie){ + if(result.bool){ + var card=player.getEquips(1); + if(card.length) trigger.player.gain(card,player,'give'); } else { - 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; i < ui.selected.buttons.length; i++) { - if (get.position(button.link) == get.position(ui.selected.buttons[i].link)) return false; + 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; i 0; + twtanfeng:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countDiscardableCards(player,'hej')>0; }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twtanfeng'), function (card, player, target) { - return target != player && target.countDiscardableCards(player, 'hej') > 0; - }).set('ai', function (target) { - var player = _status.event.player, num = 1; - if (get.attitude(player, target) > 0) num = 3; - else if (!target.countCards('he') || !target.canUse('sha', player)) { - if (target.hp + target.countCards('hs', { name: ['tao', 'jiu'] }) <= 1) num = 2; - else num = 1.2; + player.chooseTarget(get.prompt2('twtanfeng'),function(card,player,target){ + return target!=player&&target.countDiscardableCards(player,'hej')>0; + }).set('ai',function(target){ + var player=_status.event.player,num=1; + if(get.attitude(player,target)>0) num=3; + else if(!target.countCards('he')||!target.canUse('sha',player)){ + if(target.hp+target.countCards('hs',{name:['tao','jiu']})<=1) num=2; + else num=1.2; } - return get.effect(target, { name: 'guohe' }, player, player) * num * ((player.hp <= 1 && get.attitude(player, target) <= 0) ? 0 : 1); + return get.effect(target,{name:'guohe'},player,player)*num*((player.hp<=1&&get.attitude(player,target)<=0)?0:1); }).setHiddenSkill(event.name); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twtanfeng', target); - player.discardPlayerCard(target, 'hej', true); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twtanfeng',target); + player.discardPlayerCard(target,'hej',true); } else event.finish(); 'step 2' target.chooseCardTarget({ - position: 'hes', - prompt: '选择一张牌当做【杀】对' + get.translation(player) + '使用', - prompt2: '或点击“取消”,受到其造成的1点火焰伤害,并令其跳过本回合的一个阶段(准备阶段和结束阶段除外)', - filterCard: function (card, player) { - return player.canUse(get.autoViewAs({ name: 'sha' }, [card]), _status.event.getParent().player, false); + position:'hes', + prompt:'选择一张牌当做【杀】对'+get.translation(player)+'使用', + prompt2:'或点击“取消”,受到其造成的1点火焰伤害,并令其跳过本回合的一个阶段(准备阶段和结束阶段除外)', + filterCard:function(card,player){ + return player.canUse(get.autoViewAs({name:'sha'},[card]),_status.event.getParent().player,false); }, - filterTarget: function (card, player, target) { - var source = _status.event.getParent().player; - if (target != source && !ui.selected.targets.includes(source)) return false; - card = get.autoViewAs({ name: 'sha' }, [card]); - return lib.filter.filterTarget.apply(this, arguments); + filterTarget:function(card,player,target){ + var source=_status.event.getParent().player; + if(target!=source&&!ui.selected.targets.includes(source)) return false; + card=get.autoViewAs({name:'sha'},[card]); + return lib.filter.filterTarget.apply(this,arguments); }, - selectTarget: function () { - var card = get.card(), player = get.player(); - if (!card) return; - card = get.autoViewAs({ name: 'sha' }, [card]); - var range = [1, 1]; - game.checkMod(card, player, range, 'selectTarget', player); + selectTarget:function(){ + var card=get.card(),player=get.player(); + if(!card) return; + card=get.autoViewAs({name:'sha'},[card]); + var range=[1,1]; + game.checkMod(card,player,range,'selectTarget',player); return range; }, - ai1: function (card) { - var player = _status.event.player, target = _status.event.getParent().player; - var eff = get.effect(target, get.autoViewAs({ name: 'sha' }, [card]), player, player); - var eff2 = get.damageEffect(player, target, player, 'fire'); - if (eff < 0 || eff2 > 0 || eff2 > eff || get.tag(card, 'recover')) return 0; - return (player.hp == 1 ? 10 : 6) - get.value(card); + ai1:function(card){ + var player=_status.event.player,target=_status.event.getParent().player; + var eff=get.effect(target,get.autoViewAs({name:'sha'},[card]),player,player); + var eff2=get.damageEffect(player,target,player,'fire'); + if(eff<0||eff2>0||eff2>eff||get.tag(card,'recover')) return 0; + return (player.hp==1?10:6)-get.value(card); }, - ai2: function (target) { - if (target == _status.event.getParent().player) return 100; - return get.effect(target, { name: 'sha' }, _status.event.player); + ai2:function(target){ + if(target==_status.event.getParent().player) return 100; + return get.effect(target,{name:'sha'},_status.event.player); } }); 'step 3' - if (result.bool) { - var cards = result.cards, targets = result.targets; - var cardx = get.autoViewAs({ name: 'sha' }, cards); - target.useCard(cardx, cards, targets, false); + if(result.bool){ + var cards=result.cards,targets=result.targets; + var cardx=get.autoViewAs({name:'sha'},cards); + target.useCard(cardx,cards,targets,false); event.finish(); } - else { - player.line(target, 'fire'); - target.damage(1, 'fire'); + else{ + player.line(target,'fire'); + target.damage(1,'fire'); } 'step 4' - if (!target.isIn()) { + if(!target.isIn()){ event.finish(); return; } - var list = []; - var list2 = []; - event.map = { phaseJudge: '判定阶段', phaseDraw: '摸牌阶段', phaseUse: '出牌阶段', phaseDiscard: '弃牌阶段' }; - for (var i of ['phaseJudge', 'phaseDraw', 'phaseUse', 'phaseDiscard']) { - if (!player.skipList.includes(i)) { - i = event.map[i]; + var list=[]; + var list2=[]; + event.map={phaseJudge:'判定阶段',phaseDraw:'摸牌阶段',phaseUse:'出牌阶段',phaseDiscard:'弃牌阶段'}; + for(var i of ['phaseJudge','phaseDraw','phaseUse','phaseDiscard']){ + if(!player.skipList.includes(i)){ + i=event.map[i]; list.push(i); - if (i != '判定阶段' && i != '弃牌阶段') list2.push(i); + if(i!='判定阶段'&&i!='弃牌阶段') list2.push(i); } } - target.chooseControl(list).set('prompt', '探锋:令' + get.translation(player) + '跳过一个阶段').set('ai', function () { + target.chooseControl(list).set('prompt','探锋:令'+get.translation(player)+'跳过一个阶段').set('ai',function(){ return _status.event.choice; - }).set('choice', function () { - var att = get.attitude(target, player); - var num = player.countCards('j'); - if (att > 0) { - if (list.includes('判定阶段') && num > 0) return '判定阶段'; + }).set('choice',function(){ + var att=get.attitude(target,player); + var num=player.countCards('j'); + if(att>0){ + if(list.includes('判定阶段')&&num>0) return '判定阶段'; return '弃牌阶段'; } - if (list.includes('摸牌阶段') && player.hasJudge('lebu')) return '摸牌阶段'; - if (list.includes('出牌阶段') && player.hasJudge('bingliang') || player.needsToDiscard() > 0) return '出牌阶段'; + if(list.includes('摸牌阶段')&&player.hasJudge('lebu')) return '摸牌阶段'; + if(list.includes('出牌阶段')&&player.hasJudge('bingliang')||player.needsToDiscard()>0) return '出牌阶段'; return list2.randomGet(); }()); 'step 5' - for (var i in event.map) { - if (event.map[i] == result.control) player.skip(i); + for(var i in event.map){ + if(event.map[i]==result.control) player.skip(i); } target.popup(result.control); target.line(player); - game.log(player, '跳过了', '#y' + result.control); + game.log(player,'跳过了','#y'+result.control); }, }, //宗预 - twzhibian: { - audio: 'zhibian', - trigger: { player: 'phaseUseBegin' }, - filter: function (event, player) { - return game.hasPlayer((current) => (current != player && player.canCompare(current))); + twzhibian:{ + audio:'zhibian', + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return game.hasPlayer((current)=>(current!=player&&player.canCompare(current))); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twzhibian'), '与一名其他角色拼点', function (card, player, target) { - return target != player && player.canCompare(target); - }).set('ai', function (target) { - if (!_status.event.goon) return false; - var att = get.attitude(player, target); - if (att < 0 && (target.countCards('h') > 1 || target.countCards('e', function (card) { - return player.canEquip(card) && get.effect(player, card, target, player) > 0; - }))) return -att / Math.sqrt(target.countCards('h')); - if (!player.isDamaged()) return false; - if (att <= 0) return (1 - att) / Math.sqrt(target.countCards('h')); - return Math.sqrt(2 / att * Math.sqrt(target.countCards('h'))); - }).set('goon', function () { - if (!player.hasCard(function (card) { - return (card.number >= 14 - player.hp && get.value(card) <= 5); + player.chooseTarget(get.prompt('twzhibian'),'与一名其他角色拼点',function(card,player,target){ + return target!=player&&player.canCompare(target); + }).set('ai',function(target){ + if(!_status.event.goon) return false; + var att=get.attitude(player,target); + if(att<0&&(target.countCards('h')>1||target.countCards('e',function(card){ + return player.canEquip(card)&&get.effect(player,card,target,player)>0; + }))) return -att/Math.sqrt(target.countCards('h')); + if(!player.isDamaged()) return false; + if(att<=0) return (1-att)/Math.sqrt(target.countCards('h')); + return Math.sqrt(2/att*Math.sqrt(target.countCards('h'))); + }).set('goon',function(){ + if(!player.hasCard(function(card){ + return (card.number>=14-player.hp&&get.value(card)<=5); })) return false; return true; }()); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twzhibian', target); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twzhibian',target); player.chooseToCompare(target); } else event.finish(); 'step 2' - if (result.bool) { - var list = [], list2 = [ - '将' + get.translation(target) + '区域中的一张牌移动到你的区域内', + if(result.bool){ + var list=[],list2=[ + '将'+get.translation(target)+'区域中的一张牌移动到你的区域内', '回复1点体力', '背水!弃置一张非基本牌,并依次执行上述所有选项', ]; - if (target.countCards('h') || target.hasCard(function (card) { + if(target.countCards('h')||target.hasCard(function(card){ return player.canEquip(card); - }, 'e') || target.hasCard(function (card) { + },'e')||target.hasCard(function(card){ return player.canAddJudge(card); - }, 'j')) list.push('选项一'); - else list2[0] = '' + list2[0] + ''; - if (player.isDamaged()) list.push('选项二'); - else list2[1] = '' + list2[1] + ''; - if (!list.length) { event.finish(); return; } - if (player.countCards('he', card => get.type(card) != 'basic')) list.push('背水!') - else list2[2] = '' + list2[2] + ''; + },'j')) list.push('选项一'); + else list2[0]=''+list2[0]+''; + if(player.isDamaged()) list.push('选项二'); + else list2[1]=''+list2[1]+''; + if(!list.length){event.finish(); return;} + if(player.countCards('he',card=>get.type(card)!='basic')) list.push('背水!') + else list2[2]=''+list2[2]+''; list.push('cancel2'); - player.chooseControl(list).set('prompt', '直辩:选择一项').set('choiceList', list2).set('ai', function () { - var target = _status.event.getParent().target; - if (_status.event.controls.includes('背水!') && player.isDamaged() && (target.countCards('h') || target.countCards('e', function (card) { - return player.canEquip(card) && get.value(card, target) >= 4 + player.getDamagedHp(); + player.chooseControl(list).set('prompt','直辩:选择一项').set('choiceList',list2).set('ai',function(){ + var target=_status.event.getParent().target; + if(_status.event.controls.includes('背水!')&&player.isDamaged()&&(target.countCards('h')||target.countCards('e',function(card){ + return player.canEquip(card)&&get.value(card,target)>=4+player.getDamagedHp(); }))) return 2; - if (player.isDamaged() && (player.hp <= 2 || (!target.countCards('h') && !target.countCards('e', function (card) { - return player.canEquip(card) && get.value(card, target) >= 4 + player.getDamagedHp(); + if(player.isDamaged()&&(player.hp<=2||(!target.countCards('h')&&!target.countCards('e',function(card){ + return player.canEquip(card)&&get.value(card,target)>=4+player.getDamagedHp(); })))) return 1; return 0; }); @@ -8228,330 +8228,330 @@ game.import('character', function (lib, game, ui, get, ai, _status) { event.finish(); } 'step 3' - if (result.control != 'cancel2') { - event.control = result.control; - if (result.control == '背水!' && player.countCards('he', function (card) { - return get.type(card) != 'basic'; - })) player.chooseToDiscard('he', true, function (card) { - return get.type(card) != 'basic'; + if(result.control!='cancel2'){ + event.control=result.control; + if(result.control=='背水!'&&player.countCards('he',function(card){ + return get.type(card)!='basic'; + })) player.chooseToDiscard('he',true,function(card){ + return get.type(card)!='basic'; }); } else event.finish(); 'step 4' - if (event.control == '选项一' || event.control == '背水!') { - player.choosePlayerCard(target, 'hej', true).set('ai', get.buttonValue); + if(event.control=='选项一'||event.control=='背水!'){ + player.choosePlayerCard(target,'hej',true).set('ai',get.buttonValue); } else event.goto(6); 'step 5' - if (result.bool) { - var card = result.cards[0]; - switch (get.position(card)) { - case 'h': player.gain(card, target, 'giveAuto'); break; - case 'e': target.$give(card, player, false); player.equip(card); break; - case 'j': target.$give(card, player, false); player.addJudge(card); break; + if(result.bool){ + var card=result.cards[0]; + switch (get.position(card)){ + case 'h':player.gain(card,target,'giveAuto'); break; + case 'e':target.$give(card,player,false); player.equip(card); break; + case 'j':target.$give(card,player,false); player.addJudge(card); break; } } 'step 6' - if (event.control == '选项二' || event.control == '背水!') player.recover(); + if(event.control=='选项二'||event.control=='背水!') player.recover(); }, }, - twyuyan: { - audio: 'yuyan', - trigger: { target: 'useCardToTarget' }, - filter: function (event, player) { - return event.card.name == 'sha' && event.card.isCard && player.hp < event.player.hp; + twyuyan:{ + audio:'yuyan', + trigger:{target:'useCardToTarget'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.card.isCard&&player.hp= 13 || !trigger.player.hasCard(function (card) { - if (_status.connectMode && get.position(card) == 'h') return true; - return get.number(card) > num; - }, 'he'))) || (typeof num != 'number' && !trigger.player.hasCard(function (card) { - if (_status.connectMode && get.position(card) == 'h') return true; - return get.type(card) != 'basic'; - }, 'he'))) event._result = { bool: false }; - else trigger.player.chooseCard('he', function (card) { - if (typeof _status.event.number == 'number') return get.number(card) > _status.event.number; - return get.type(card) != 'basic'; - }, '交给' + get.translation(player) + '一张' + str + '牌,或取消' + get.translation(trigger.card) + '对其的目标').set('number', num).set('ai', function (card) { - if (card.name == 'shan' || card.name == 'tao' || card.name == 'jiu') return false; - return 6 - get.value(card); + var num=get.number(trigger.card),str=''; + if(typeof num=='number') str='点数大于'+get.cnNumber(num)+'的'; + else str='非基本'; + if((typeof num=='number'&&(num>=13||!trigger.player.hasCard(function(card){ + if(_status.connectMode&&get.position(card)=='h') return true; + return get.number(card)>num; + },'he')))||(typeof num!='number'&&!trigger.player.hasCard(function(card){ + if(_status.connectMode&&get.position(card)=='h') return true; + return get.type(card)!='basic'; + },'he'))) event._result={bool:false}; + else trigger.player.chooseCard('he',function(card){ + if(typeof _status.event.number=='number') return get.number(card)>_status.event.number; + return get.type(card)!='basic'; + },'交给'+get.translation(player)+'一张'+str+'牌,或取消'+get.translation(trigger.card)+'对其的目标').set('number',num).set('ai',function(card){ + if(card.name=='shan'||card.name=='tao'||card.name=='jiu') return false; + return 6-get.value(card); }); 'step 1' - if (result.bool) trigger.player.give(result.cards, player); - else { + if(result.bool) trigger.player.give(result.cards,player); + else{ trigger.targets.remove(player); trigger.getParent().triggeredTargets2.remove(player); trigger.untrigger(); } }, - ai: { - effect: { - target: function (card, player, target, current) { - if (card.name == 'sha' && player.hp > target.hp && get.attitude(player, target) < 0) { - var num = get.number(card); - var bs = player.getCards('h', function (cardx) { - return (typeof num == 'number' ? (get.number(cardx) > num) : (get.type(cardx) != 'basic')) && !['', '', ''].includes(cardx.name); + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&player.hp>target.hp&&get.attitude(player,target)<0){ + var num=get.number(card); + var bs=player.getCards('h',function(cardx){ + return (typeof num=='number'?(get.number(cardx)>num):(get.type(cardx)!='basic'))&&!['','',''].includes(cardx.name); }); - if (bs.length < 2) return 0; - if (player.hasSkill('jiu') || player.hasSkill('tianxianjiu')) return; - if (bs.length <= 2) { - for (var i = 0; i < bs.length; i++) { - if (get.value(bs[i]) < 6) { - return [1, 0, 1, -0.5]; + if(bs.length<2) return 0; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; + if(bs.length<=2){ + for(var i=0; i { - if (player != evt.player && evt._dyinged) targets.add(evt.player); + twchuhai:{ + audio:'chuhai', + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + var targets=[]; + player.getHistory('sourceDamage',evt=>{ + if(player!=evt.player&&evt._dyinged) targets.add(evt.player); }); - return targets.length >= 2; + return targets.length>=2; }, - forced: true, - locked: false, - dutySkill: true, - skillAnimation: true, - animationColor: 'wood', - group: 'twchuhai_lose', - content: function () { + forced:true, + locked:false, + dutySkill:true, + skillAnimation:true, + animationColor:'wood', + group:'twchuhai_lose', + content:function(){ 'step 0' - game.log(player, '成功完成使命'); + game.log(player,'成功完成使命'); player.awakenSkill('twchuhai'); - if (!player.isDisabledJudge()) player.disableJudge(); - event.current = player.next; + if(!player.isDisabledJudge()) player.disableJudge(); + event.current=player.next; 'step 1' - if (!event.current.countCards('he')) event.goto(3); - else event.current.chooseCard('交给' + get.translation(player) + '一张牌', 'he', true).set('ai', get.disvalue2); + if(!event.current.countCards('he')) event.goto(3); + else event.current.chooseCard('交给'+get.translation(player)+'一张牌','he',true).set('ai',get.disvalue2); 'step 2' - if (result.bool && result.cards && result.cards.length) event.current.give(result.cards, player); + if(result.bool&&result.cards&&result.cards.length) event.current.give(result.cards,player); 'step 3' - event.current = event.current.next; - if (event.current != player) event.goto(1); + event.current=event.current.next; + if(event.current!=player) event.goto(1); }, - subSkill: { - lose: { - audio: 'chuhai', - trigger: { - global: ['gainAfter', 'loseAsyncAfter'] + subSkill:{ + lose:{ + audio:'chuhai', + trigger:{ + global:['gainAfter','loseAsyncAfter'] }, - forced: true, - dutySkill: true, - filter: function (event, player) { - var cards = event.getg(player); - if (!cards.length) return false; - return game.hasPlayer(current => { - if (current == player) return false; - var evt = event.getl(current); - if (evt && evt.cards && evt.cards.length) return true; + forced:true, + dutySkill:true, + filter:function(event,player){ + var cards=event.getg(player); + if(!cards.length) return false; + return game.hasPlayer(current=>{ + if(current==player) return false; + var evt=event.getl(current); + if(evt&&evt.cards&&evt.cards.length) return true; return false; }); }, - content: function () { + content:function(){ 'step 0' - var cards = trigger.getg(player); - if (!cards.length) { + var cards=trigger.getg(player); + if(!cards.length){ event.finish(); return; } - player.chooseCard('h', '除害:将其中一张得到的牌置入弃牌堆', true, function (card) { + player.chooseCard('h','除害:将其中一张得到的牌置入弃牌堆',true,function(card){ return _status.event.cards.includes(card); - }).set('ai', function (card) { + }).set('ai',function(card){ return -get.value(card); - }).set('cards', cards); + }).set('cards',cards); 'step 1' - if (result.bool) player.loseToDiscardpile(result.cards); + if(result.bool) player.loseToDiscardpile(result.cards); }, }, }, }, //桥公 - twyizhu: { - audio: 'yizhu', - group: ['twyizhu_use', 'twyizhu_discard'], - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - locked: false, - content: function () { + twyizhu:{ + audio:'yizhu', + group:['twyizhu_use','twyizhu_discard'], + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + content:function(){ 'step 0' player.draw(2); 'step 1' - var hs = player.getCards('he'); - if (!hs.length) event.finish(); - else if (hs.length <= 2) event._result = { bool: true, cards: hs }; - else player.chooseCard('he', true, 2, '选择两张牌洗入牌堆'); + var hs=player.getCards('he'); + if(!hs.length) event.finish(); + else if(hs.length<=2) event._result={bool:true,cards:hs}; + else player.chooseCard('he',true,2,'选择两张牌洗入牌堆'); 'step 2' - if (result.bool) { - player.$throw(result.cards.length, 1000); - player.lose(result.cards, ui.cardPile).insert_index = function () { - return ui.cardPile.childNodes[get.rand(0, game.players.length * 2 - 2)]; + if(result.bool){ + player.$throw(result.cards.length,1000); + player.lose(result.cards,ui.cardPile).insert_index=function(){ + return ui.cardPile.childNodes[get.rand(0,game.players.length*2-2)]; } - player.markAuto('twyizhu', result.cards); + player.markAuto('twyizhu',result.cards); } else event.finish(); 'step 3' game.updateRoundNumber(); game.delayx(); }, - intro: { - mark: function (dialog, content, player) { - if (player == game.me || player.isUnderControl()) dialog.addAuto(content); + intro:{ + mark:function(dialog,content,player){ + if(player==game.me||player.isUnderControl()) dialog.addAuto(content); else { - var names = []; - for (var i of content) names.add(i.name); + var names=[]; + for(var i of content) names.add(i.name); return get.translation(names); } }, }, - subSkill: { - use: { - audio: 'yizhu', - trigger: { global: 'useCardToPlayer' }, - filter: function (event, player) { - return player.getStorage('twyizhu').length && - event.player != player && event.targets.length == 1 && - event.cards.filter(function (i) { + subSkill:{ + use:{ + audio:'yizhu', + trigger:{global:'useCardToPlayer'}, + filter:function(event,player){ + return player.getStorage('twyizhu').length&& + event.player!=player&&event.targets.length==1&& + event.cards.filter(function(i){ return player.getStorage('twyizhu').includes(i); - }).length > 0; + }).length>0; }, - logTarget: 'player', - forced: true, - locked: false, - content: function () { + logTarget:'player', + forced:true, + locked:false, + content:function(){ 'step 0' - var list = []; - if (!game.hasPlayer(function (current) { - return current != trigger.target && lib.filter.targetEnabled2(trigger.card, trigger.player, current); + var list=[]; + if(!game.hasPlayer(function(current){ + return current!=trigger.target&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); })) event.goto(3); - var filter = function (event, player) { - var card = event.card, info = get.info(card); - if (info.allowMultiple == false) return false; - if (!info.multitarget) { - return game.hasPlayer(current => lib.filter.targetEnabled2(card, player, current)); + var filter=function(event,player){ + var card=event.card,info=get.info(card); + if(info.allowMultiple==false) return false; + if(!info.multitarget){ + return game.hasPlayer(current=>lib.filter.targetEnabled2(card,player,current)); } return false; } - var enable = filter(trigger.getParent(), trigger.player); - var prompt2 = '操作提示:'; - if (enable) prompt2 += '选择一名合法的其他角色,以增加其为目标;或'; - prompt2 += '选择目标角色(' + get.translation(trigger.target) + ')和另一名合法的角色,以取消前者为目标并增加后者为目标'; - player.chooseTarget('遗珠:是否' + (enable ? '增加或' : '') + '修改目标?', prompt2, [enable ? 1 : 2, 2], (card, player, target) => { - var evt = _status.event.getTrigger(), card = evt.card; - if (target == evt.target) return true; - if (ui.selected.targets.length && ui.selected.targets[0] != evt.target) return false; - return lib.filter.targetEnabled2(card, evt.player, target); - }).set('targetprompt', target => { - return target == _status.event.targetx ? '取消目标' : '增加目标'; - }).set('filterOk', () => { - if (ui.selected.targets.length == 1 && ui.selected.targets[0] == _status.event.targetx) return false; + var enable=filter(trigger.getParent(),trigger.player); + var prompt2='操作提示:'; + if(enable) prompt2+='选择一名合法的其他角色,以增加其为目标;或'; + prompt2+='选择目标角色('+get.translation(trigger.target)+')和另一名合法的角色,以取消前者为目标并增加后者为目标'; + player.chooseTarget('遗珠:是否'+(enable?'增加或':'')+'修改目标?',prompt2,[enable?1:2,2],(card,player,target)=>{ + var evt=_status.event.getTrigger(),card=evt.card; + if(target==evt.target) return true; + if(ui.selected.targets.length&&ui.selected.targets[0]!=evt.target) return false; + return lib.filter.targetEnabled2(card,evt.player,target); + }).set('targetprompt',target=>{ + return target==_status.event.targetx?'取消目标':'增加目标'; + }).set('filterOk',()=>{ + if(ui.selected.targets.length==1&&ui.selected.targets[0]==_status.event.targetx) return false; return true; - }).set('ai', target => { - var evt = _status.event.getTrigger(), card = evt.card, player = _status.event.player; - if (target == evt.target && get.effect(evt.target, card, evt.player, player) < 0) return 100; - if (target == evt.target) return -100; - return get.effect(target, card, evt.player, player); - }).set('targetx', trigger.target).set('card', trigger.card); + }).set('ai',target=>{ + var evt=_status.event.getTrigger(),card=evt.card,player=_status.event.player; + if(target==evt.target&&get.effect(evt.target,card,evt.player,player)<0) return 100; + if(target==evt.target) return -100; + return get.effect(target,card,evt.player,player); + }).set('targetx',trigger.target).set('card',trigger.card); 'step 1' - if (result.bool) { - var target = result.targets[result.targets[0] == trigger.target ? 1 : 0]; - if (result.targets.length > 1) { - player.line2([trigger.target, target]); + if(result.bool){ + var target=result.targets[result.targets[0]==trigger.target?1:0]; + if(result.targets.length>1) { + player.line2([trigger.target,target]); trigger.targets.remove(trigger.target); trigger.getParent().triggeredTargets1.remove(trigger.target); trigger.untrigger(); @@ -8560,160 +8560,160 @@ game.import('character', function (lib, game, ui, get, ai, _status) { trigger.targets.push(target); } 'step 2' - var list = trigger.cards.filter(function (i) { + var list=trigger.cards.filter(function(i){ return player.getStorage('twyizhu').includes(i); }); - player.unmarkAuto('twyizhu', list); + player.unmarkAuto('twyizhu',list); player.draw(); game.delayx(); }, }, - discard: { - trigger: { - global: ['loseAfter', 'cardsDiscardAfter', 'loseAsyncAfter', 'equipAfter'], + discard:{ + trigger:{ + global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter'], }, - silent: true, - forced: true, - locked: false, - filter: function (event, player) { - return player.getStorage('twyizhu').length && event.getd().filter(function (i) { + silent:true, + forced:true, + locked:false, + filter:function(event,player){ + return player.getStorage('twyizhu').length&&event.getd().filter(function(i){ return player.getStorage('twyizhu').includes(i); - }).length > 0; + }).length>0; }, - content: function () { - var list = trigger.getd().filter(function (i) { + content:function(){ + var list=trigger.getd().filter(function(i){ return player.getStorage('twyizhu').includes(i); }); - player.unmarkAuto('twyizhu', list); + player.unmarkAuto('twyizhu',list); }, }, }, }, - twluanchou: { - audio: 'luanchou', - enable: 'phaseUse', - usable: 1, - selectTarget: 2, - filterTarget: true, - multitarget: true, - multiline: true, - content: function () { + twluanchou:{ + audio:'luanchou', + enable:'phaseUse', + usable:1, + selectTarget:2, + filterTarget:true, + multitarget:true, + multiline:true, + content:function(){ 'step 0' - game.filterPlayer().sortBySeat().forEach(function (current) { + game.filterPlayer().sortBySeat().forEach(function(current){ current.removeSkills('twgonghuan'); }); 'step 1' targets.sortBySeat(); - for (var i of targets) i.addSkills('twgonghuan'); + for(var i of targets) i.addSkills('twgonghuan'); }, - derivation: 'twgonghuan', - ai: { - order: 10, - expose: 0.2, - result: { - target: function (player, target) { - return Math.max(0.1, target.hp) * (get.attitude(player, target) + 20); + derivation:'twgonghuan', + ai:{ + order:10, + expose:0.2, + result:{ + target:function(player,target){ + return Math.max(0.1,target.hp)*(get.attitude(player,target)+20); }, }, }, }, - twgonghuan: { - audio: 'gonghuan', - trigger: { global: 'damageBegin4' }, - usable: 1, - filter: function (event, player) { - if (event.player == player) return false; - return !event.twgonghuan && event.player.hp <= player.hp && event.player.hasSkill('twgonghuan'); + twgonghuan:{ + audio:'gonghuan', + trigger:{global:'damageBegin4'}, + usable:1, + filter:function(event,player){ + if(event.player==player) return false; + return !event.twgonghuan&&event.player.hp<=player.hp&&event.player.hasSkill('twgonghuan'); }, - check: function (event, player) { - if (get.damageEffect(event.player, event.source, player) > 0 || (get.attitude(player, event.player) > 0 && get.damageEffect(event.player, event.source, event.player) > 0)) return false; - return get.attitude(player, event.player) > 0 && event.player.hp < player.hp && ((['君', '主'].includes(lib.translate[event.player.identity]) && !['野', '内'].includes(lib.translate[player.identity])) || player.hp + player.hujia - event.num > 0); + check:function(event,player){ + if(get.damageEffect(event.player,event.source,player)>0||(get.attitude(player,event.player)>0&&get.damageEffect(event.player,event.source,event.player)>0)) return false; + return get.attitude(player,event.player)>0&&event.player.hp0); }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ trigger.cancel(); - player.damage(trigger.source ? trigger.source : 'nosource', trigger.nature, trigger.num).set('card', trigger.card).set('cards', trigger.cards).twgonghuan = true; + player.damage(trigger.source?trigger.source:'nosource',trigger.nature,trigger.num).set('card',trigger.card).set('cards',trigger.cards).twgonghuan=true; }, }, //桥蕤 - twxiawei: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - locked: false, - group: ['twxiawei_init', 'twxiawei_lose', 'twxiawei_unmark'], - content: function () { + twxiawei:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + locked:false, + group:['twxiawei_init','twxiawei_lose','twxiawei_unmark'], + content:function(){ 'step 0' - player.chooseControl('1', '2', '3', '4', 'cancel2').set('prompt', get.prompt('twxiawei')).set('prompt2', '妄行:将X+1张牌置于武将牌上,称为“威”').set('ai', function () { - var player = _status.event.player; - if (player.maxHp > 3) return 3; - return Math.min(3, player.countCards('he') + 1); + player.chooseControl('1','2','3','4','cancel2').set('prompt',get.prompt('twxiawei')).set('prompt2','妄行:将X+1张牌置于武将牌上,称为“威”').set('ai',function(){ + var player=_status.event.player; + if(player.maxHp>3) return 3; + return Math.min(3,player.countCards('he')+1); }); 'step 1' - if (result.control != 'cancel2') { - var num = result.index + 1, cards = get.cards(num + 1); + if(result.control!='cancel2'){ + var num=result.index+1,cards=get.cards(num+1); player.logSkill('twxiawei'); player.addTempSkill('wangxing'); - player.addMark('wangxing', num, false); - player.$gain2(cards, false); - game.log(player, '将', cards, '作为“威”置于了武将牌上'); - player.loseToSpecial(cards, 'twxiawei').visible = true; + player.addMark('wangxing',num,false); + player.$gain2(cards,false); + game.log(player,'将',cards,'作为“威”置于了武将牌上'); + player.loseToSpecial(cards,'twxiawei').visible=true; } else event.finish(); 'step 2' player.markSkill('twxiawei'); game.delayx(); }, - marktext: '威', - intro: { - mark: function (dialog, storage, player) { - var cards = player.getCards('s', function (card) { + marktext:'威', + intro:{ + mark:function(dialog,storage,player){ + var cards=player.getCards('s',function(card){ return card.hasGaintag('twxiawei'); }); - if (!cards || !cards.length) return; + if(!cards||!cards.length) return; dialog.addAuto(cards); }, - markcount: function (storage, player) { - return player.countCards('s', function (card) { + markcount:function(storage,player){ + return player.countCards('s',function(card){ return card.hasGaintag('twxiawei'); }); }, - onunmark: function (storage, player) { - var cards = player.getCards('s', function (card) { + onunmark:function(storage,player){ + var cards=player.getCards('s',function(card){ return card.hasGaintag('twxiawei'); }); - if (cards.length) { + if(cards.length){ player.loseToDiscardpile(cards); } }, }, - mod: { - aiOrder: function (player, card, num) { - if (get.itemtype(card) == 'card' && card.hasGaintag('twxiawei')) return num + 0.5; + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('twxiawei')) return num+0.5; }, }, - subSkill: { - init: { - audio: 'twxiawei', - trigger: { global: 'phaseBefore', player: 'enterGame' }, - filter: function (event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + subSkill:{ + init:{ + audio:'twxiawei', + trigger:{global:'phaseBefore',player:'enterGame'}, + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - locked: false, - content: function () { + forced:true, + locked:false, + content:function(){ 'step 0' - var cards = []; - for (var i = 1; i <= 2; i++) { - var card = get.cardPile2(function (card) { - return !cards.includes(card) && get.type(card) == 'basic'; + var cards=[]; + for(var i=1;i<=2;i++){ + var card=get.cardPile2(function(card){ + return !cards.includes(card)&&get.type(card)=='basic'; }); - if (card) cards.push(card); + if(card) cards.push(card); } - if (cards.length) { - player.$gain2(cards, false); - game.log(player, '将', cards, '作为“威”置于了武将牌上'); - player.loseToSpecial(cards, 'twxiawei').visible = true; + if(cards.length){ + player.$gain2(cards,false); + game.log(player,'将',cards,'作为“威”置于了武将牌上'); + player.loseToSpecial(cards,'twxiawei').visible=true; } else event.finish(); 'step 1' @@ -8721,1018 +8721,1018 @@ game.import('character', function (lib, game, ui, get, ai, _status) { game.delayx(); }, }, - lose: { - audio: 'twxiawei', - trigger: { player: 'phaseBegin' }, - filter: function (event, player) { - return player.countCards('s', function (card) { + lose:{ + audio:'twxiawei', + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.countCards('s',function(card){ return card.hasGaintag('twxiawei'); }); }, - forced: true, - locked: false, - content: function () { - var cards = player.getCards('s', function (card) { + forced:true, + locked:false, + content:function(){ + var cards=player.getCards('s',function(card){ return card.hasGaintag('twxiawei'); }); player.loseToDiscardpile(cards); }, }, - unmark: { - trigger: { player: 'loseAfter' }, - filter: function (event, player) { - if (!event.ss || !event.ss.length) return false; - return !player.countCards('s', function (card) { + unmark:{ + trigger:{player:'loseAfter'}, + filter:function(event,player){ + if(!event.ss||!event.ss.length) return false; + return !player.countCards('s',function(card){ return card.hasGaintag('twxiawei'); }); }, - charlotte: true, - forced: true, - silent: true, - content: function () { + charlotte:true, + forced:true, + silent:true, + content:function(){ player.unmarkSkill('twxiawei'); }, }, }, }, - wangxing: { - trigger: { player: 'phaseEnd' }, - charlotte: true, - onremove: true, - forced: true, - popup: false, - filter: function (event, player) { - return player.countMark('wangxing') > 0; + wangxing:{ + trigger:{player:'phaseEnd'}, + charlotte:true, + onremove:true, + forced:true, + popup:false, + filter:function(event,player){ + return player.countMark('wangxing')>0; }, - content: function () { + content:function(){ 'step 0' - player.chooseToDiscard('he', player.countMark('wangxing'), '妄行:请弃置' + get.cnNumber(player.countMark('wangxing')) + '张牌,或减1点体力上限').set('ai', function (card) { - var player = _status.event.player; - if (player.maxHp == 1) return 100 - get.value(card); - return 5 + Math.max(0, 5 - player.maxHp) - get.value(card); + player.chooseToDiscard('he',player.countMark('wangxing'),'妄行:请弃置'+get.cnNumber(player.countMark('wangxing'))+'张牌,或减1点体力上限').set('ai',function(card){ + var player=_status.event.player; + if(player.maxHp==1) return 100-get.value(card); + return 5+Math.max(0,5-player.maxHp)-get.value(card); }); 'step 1' - if (!result.bool) player.loseMaxHp(); + if(!result.bool) player.loseMaxHp(); }, - intro: { content: '回合结束时,你须弃置#张牌,否则减1点体力上限' }, + intro:{content:'回合结束时,你须弃置#张牌,否则减1点体力上限'}, }, - twqiongji: { - audio: 2, - trigger: { player: ['useCardAfter', 'respondAfter', 'damageBegin3'] }, - filter: function (event, player) { - if (event.name == 'damage') return !player.countCards('s', function (card) { + twqiongji:{ + audio:2, + trigger:{player:['useCardAfter','respondAfter','damageBegin3']}, + filter:function(event,player){ + if(event.name=='damage') return !player.countCards('s',function(card){ return card.hasGaintag('twxiawei'); }); - return !player.hasSkill('twqiongji_silent') && player.getHistory('lose', function (evt) { - if (evt.getParent() != event) return false; - for (var i in evt.gaintag_map) { - if (evt.gaintag_map[i].includes('twxiawei')) return true; + return !player.hasSkill('twqiongji_silent')&&player.getHistory('lose',function(evt){ + if(evt.getParent()!=event) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('twxiawei')) return true; } return false; - }).length > 0; + }).length>0; }, - forced: true, - content: function () { - if (trigger.name == 'damage') trigger.num++; + forced:true, + content:function(){ + if(trigger.name=='damage') trigger.num++; else { player.draw(); player.addTempSkill('twqiongji_silent'); } }, - ai: { combo: 'twxiawei' }, - subSkill: { silent: { charlotte: true } }, + ai:{combo:'twxiawei'}, + subSkill:{silent:{charlotte:true}}, }, //卞夫人 - twwanwei: { - audio: 'wanwei', - trigger: { global: 'damageBegin4' }, - filter: function (event, player) { + twwanwei:{ + audio:'wanwei', + trigger:{global:'damageBegin4'}, + filter:function(event,player){ return event.player.isMinHp(); }, - check: function (event, player) { - return get.attitude(player, event.player) > 0 && event.player.hp < player.hp; + check:function(event,player){ + return get.attitude(player,event.player)>0&&event.player.hp player.maxHp - })) { + else if(event.player==player||!game.hasPlayer(function(current){ + return current!=player&¤t.maxHp>player.maxHp + })){ return '于当前回合的结束阶段获得牌堆顶的牌并展示牌堆底的牌,若展示的牌能被使用,你使用之'; } }, - content: function () { - if (trigger.player != player) { + content:function(){ + if(trigger.player!=player){ trigger.cancel(); player.loseHp(); } - if (trigger.player == player || !game.hasPlayer(function (current) { - return current != player && current.maxHp > player.maxHp + if(trigger.player==player||!game.hasPlayer(function(current){ + return current!=player&¤t.maxHp>player.maxHp })) player.addTempSkill('twwanwei_effect'); }, - subSkill: { - effect: { - audio: 'wanwei', - charlotte: true, - trigger: { global: 'phaseJieshuBegin' }, - prompt2: '获得牌堆顶的牌并展示牌堆底的牌,若展示的牌能被使用,你使用之', - content: function () { + subSkill:{ + effect:{ + audio:'wanwei', + charlotte:true, + trigger:{global:'phaseJieshuBegin'}, + prompt2:'获得牌堆顶的牌并展示牌堆底的牌,若展示的牌能被使用,你使用之', + content:function(){ 'step 0' - var card = get.cards()[0]; - player.gain(card, 'gain2'); + var card=get.cards()[0]; + player.gain(card,'gain2'); 'step 1' - var card = get.bottomCards()[0]; + var card=get.bottomCards()[0]; ui.cardPile.appendChild(card); game.updateRoundNumber(); - player.showCards([card], get.translation(player) + '挽危:牌堆底的牌'); - if (player.hasUseTarget(card)) player.chooseUseTarget(card, true); + player.showCards([card],get.translation(player)+'挽危:牌堆底的牌'); + if(player.hasUseTarget(card)) player.chooseUseTarget(card,true); }, }, }, }, - twyuejian: { - audio: 'yuejian', - enable: 'phaseUse', - filterCard: true, - selectCard: function () { - var player = _status.event.player; - var num = Math.max(1, player.countCards('h') - player.getHandcardLimit()); - return [1, num]; + twyuejian:{ + audio:'yuejian', + enable:'phaseUse', + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + var num=Math.max(1,player.countCards('h')-player.getHandcardLimit()); + return [1,num]; }, - complexCard: true, - discard: false, - loseTo: 'cardPile', - insert: true, - visible: true, - delay: false, - position: 'he', - usable: 1, - check: function (card) { - if (ui.selected.cards.length >= 3) return 0; - var player = _status.event.player; - var num = Math.max(1, player.countCards('h') - player.getHandcardLimit()); - if (num >= 3) return 5 - get.value(card); - if (num >= 2 && player.isDamaged() && ui.selected.cards.length < 1) return 7 - get.value(card); - if (num >= 1 && player.isDamaged() && !ui.selected.cards.length) return 6 - get.value(card); + complexCard:true, + discard:false, + loseTo:'cardPile', + insert:true, + visible:true, + delay:false, + position:'he', + usable:1, + check:function(card){ + if(ui.selected.cards.length>=3) return 0; + var player=_status.event.player; + var num=Math.max(1,player.countCards('h')-player.getHandcardLimit()); + if(num>=3) return 5-get.value(card); + if(num>=2&&player.isDamaged()&&ui.selected.cards.length<1) return 7-get.value(card); + if(num>=1&&player.isDamaged()&&!ui.selected.cards.length) return 6-get.value(card); return 0; }, - content: function () { + content:function(){ 'step 0' player.$throw(cards.length); - var next = player.chooseToMove(); - next.set('list', [ - ['牌堆顶', cards], + var next=player.chooseToMove(); + next.set('list',[ + ['牌堆顶',cards], ['牌堆底'], ]); - next.set('prompt', '约俭:将这些牌置于牌堆顶或牌堆底'); - next.set('processAI', function (list) { - var cards = list[0][1], player = _status.event.player; - var target = player.next; - var att = get.sgn(get.attitude(player, target)); - var top = []; - var judges = target.getCards('j'); - var stopped = false; - if (player != target || !target.hasWuxie()) { - for (var i = 0; i < judges.length; i++) { - var judge = get.judge(judges[i]); - cards.sort(function (a, b) { - return (judge(b) - judge(a)) * att; + next.set('prompt','约俭:将这些牌置于牌堆顶或牌堆底'); + next.set('processAI',function(list){ + var cards=list[0][1],player=_status.event.player; + var target=player.next; + var att=get.sgn(get.attitude(player,target)); + var top=[]; + var judges=target.getCards('j'); + var stopped=false; + if(player!=target||!target.hasWuxie()){ + for(var i=0;i 0)) break; + while(cards.length){ + if((get.value(cards[0],player)<=5)==(att>0)) break; top.unshift(cards.shift()); } } - bottom = cards.sort(function (a, b) { - return player.getUseValue(a) - player.getUseValue(b); + bottom=cards.sort(function(a,b){ + return player.getUseValue(a)-player.getUseValue(b); }); - return [top, bottom]; + return [top,bottom]; }); 'step 1' - var top = result.moved[0]; - var bottom = result.moved[1]; + var top=result.moved[0]; + var bottom=result.moved[1]; top.reverse(); - for (var i = 0; i < top.length; i++) { + for(var i=0;i= 3) player.gainMaxHp(); + if(cards.length>=3) player.gainMaxHp(); 'step 3' - if (cards.length >= 2) player.recover(); + if(cards.length>=2) player.recover(); 'step 4' - if (cards.length >= 1) { + if(cards.length>=1){ player.addSkill('twyuejian_effect'); - player.addMark('twyuejian_effect', 1, false); + player.addMark('twyuejian_effect',1,false); } }, - ai: { - order: 5, - result: { player: 1 }, + ai:{ + order:5, + result:{player:1}, }, - subSkill: { - effect: { - charlotte: true, - onremove: true, - marktext: '俭', - intro: { - content: '手牌上限+#', + subSkill:{ + effect:{ + charlotte:true, + onremove:true, + marktext:'俭', + intro:{ + content:'手牌上限+#', }, - mod: { - maxHandcard: function (player, num) { - return num + player.countMark('twyuejian_effect'); + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('twyuejian_effect'); }, }, }, }, }, //陈震 - twmuyue: { - audio: 1, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('he') || player.hasSkill('twmuyue_effect'); + twmuyue:{ + audio:1, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')||player.hasSkill('twmuyue_effect'); }, - chooseButton: { - dialog: function () { - var list = []; - for (var i of lib.inpile) { - var type = get.type(i); - if (type == 'basic' || type == 'trick') list.push([type, '', i]); + chooseButton:{ + dialog:function(){ + var list=[]; + for(var i of lib.inpile){ + var type=get.type(i); + if(type=='basic'||type=='trick') list.push([type,'',i]); } - return ui.create.dialog('睦约', [list, 'vcard']); + return ui.create.dialog('睦约',[list,'vcard']); }, - check: function (button) { - if (!get.cardPile2(function (cardx) { - return cardx.name == button.link[2]; + check:function(button){ + if(!get.cardPile2(function(cardx){ + return cardx.name==button.link[2]; })) return 0; - return get.value({ name: button.link[2] }); + return get.value({name:button.link[2]}); }, - backup: function (links, player) { - return { - audio: 'twmuyue', - filterCard: function (card, player, target) { + backup:function(links,player){ + return{ + audio:'twmuyue', + filterCard:function(card,player,target){ return !player.hasSkill('twmuyue_effect'); }, - selectCard: function () { - var player = _status.event.player; - return player.hasSkill('twmuyue_effect') ? -1 : 1; + selectCard:function(){ + var player=_status.event.player; + return player.hasSkill('twmuyue_effect')?-1:1; }, - check: function (card) { - return 7 - get.value(card); + check:function(card){ + return 7-get.value(card); }, - position: 'he', - card: links[0], - filterTarget: true, - content: function () { + position:'he', + card:links[0], + filterTarget:true, + content:function(){ 'step 0' - var card = lib.skill.twmuyue_backup.card; - event.card = card; + var card=lib.skill.twmuyue_backup.card; + event.card=card; player.removeSkill('twmuyue_effect'); - var cardx = get.cardPile2(function (cardx) { - return cardx.name == card[2]; + var cardx=get.cardPile2(function(cardx){ + return cardx.name==card[2]; }); - player.line(target, 'green'); - if (cardx) target.gain(cardx, 'gain2'); - else { + player.line(target,'green'); + if(cardx) target.gain(cardx,'gain2'); + else{ player.chat('无牌可得了吗?!'); - game.log('但是牌堆中已经没有', '#g【' + get.translation(card[2]) + '】', '了!'); + game.log('但是牌堆中已经没有','#g【'+get.translation(card[2])+'】','了!'); } 'step 1' - if (cards && cards.length && get.name(cards[0], player) == card[2]) player.addSkill('twmuyue_effect'); + if(cards&&cards.length&&get.name(cards[0],player)==card[2]) player.addSkill('twmuyue_effect'); }, - ai: { - result: { - target: function (player, target) { - var att = Math.abs(get.attitude(player, target)); - if (target.hasSkill('nogain')) att /= 10; - return att / Math.sqrt(get.distance(player, target, 'absolute')); + ai:{ + result:{ + target:function(player,target){ + var att=Math.abs(get.attitude(player,target)); + if(target.hasSkill('nogain')) att/=10; + return att/Math.sqrt(get.distance(player,target,'absolute')); } } }, } }, - prompt: function (links, player) { - return (player.hasSkill('twmuyue_effect') ? '' : '弃置一张牌,') + '令一名角色从牌堆中获得一张【' + get.translation(links[0][2]) + '】'; + prompt:function(links,player){ + return (player.hasSkill('twmuyue_effect')?'':'弃置一张牌,')+'令一名角色从牌堆中获得一张【'+get.translation(links[0][2])+'】'; } }, - ai: { - order: 3, - result: { player: 1 }, + ai:{ + order:3, + result:{player:1}, }, - subSkill: { - effect: { - charlotte: true, - mark: true, - intro: { content: '下一次发动【睦约】无需弃牌' }, + subSkill:{ + effect:{ + charlotte:true, + mark:true, + intro:{content:'下一次发动【睦约】无需弃牌'}, }, - backup: {}, + backup:{}, }, }, - twchayi: { - audio: 1, - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - content: function () { + twchayi:{ + audio:1, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twchayi'), lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - return -get.attitude(player, target); + player.chooseTarget(get.prompt2('twchayi'),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return -get.attitude(player,target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twchayi', target); - if (!target.countCards('h')) event._result = { index: 1 }; - else target.chooseControl().set('choiceList', [ + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twchayi',target); + if(!target.countCards('h')) event._result={index:1}; + else target.chooseControl().set('choiceList',[ '展示手牌', '下一次使用牌时候弃一张牌', ]); } else event.finish(); 'step 2' - target.storage.twchayi_re = [result.index, target.countCards('h')]; + target.storage.twchayi_re=[result.index,target.countCards('h')]; target.addSkill('twchayi_re'); target.markSkill('twchayi_re'); - if (result.index == 0) target.showCards(target.getCards('h'), get.translation(target) + '的手牌'); - else { - target.addMark('twchayi_effect', 1, false); + if(result.index==0) target.showCards(target.getCards('h'),get.translation(target)+'的手牌'); + else{ + target.addMark('twchayi_effect',1,false); target.addSkill('twchayi_effect'); } }, - subSkill: { - effect: { - intro: { content: '使用下一张牌时弃置&张牌' }, - charlotte: true, - onremove: true, - audio: 'twchayi', - trigger: { player: 'useCard' }, - forced: true, - content: function () { - player.chooseToDiscard('he', true, player.countMark('twchayi_effect')); + subSkill:{ + effect:{ + intro:{content:'使用下一张牌时弃置&张牌'}, + charlotte:true, + onremove:true, + audio:'twchayi', + trigger:{player:'useCard'}, + forced:true, + content:function(){ + player.chooseToDiscard('he',true,player.countMark('twchayi_effect')); player.removeSkill('twchayi_effect'); }, }, - re: { - charlotte: true, - onremove: true, - audio: 'twchayi', - trigger: { player: 'phaseEnd' }, - direct: true, - filter: function (event, player) { + re:{ + charlotte:true, + onremove:true, + audio:'twchayi', + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ return player.storage.twchayi_re; }, - content: function () { - if (player.countCards('h') != player.storage.twchayi_re[1]) { + content:function(){ + if(player.countCards('h')!=player.storage.twchayi_re[1]){ player.popup('察异'); - if (player.storage.twchayi_re[0] == 0) { - player.addMark('twchayi_effect', 1, false); + if(player.storage.twchayi_re[0]==0){ + player.addMark('twchayi_effect',1,false); player.addSkill('twchayi_effect'); } - else player.showCards(player.getCards('h'), get.translation(player) + '的手牌'); + else player.showCards(player.getCards('h'),get.translation(player)+'的手牌'); } player.removeSkill('twchayi_re'); }, - marktext: '异', - intro: { - markcount: function (storage, player) { - if (!storage || !storage.length) return 0; + marktext:'异', + intro:{ + markcount:function(storage,player){ + if(!storage||!storage.length) return 0; return storage[1]; }, - content: function (storage, player) { - if (!storage || !storage.length) return; - return '下个回合结束时,若你的手牌数不为' + storage[1] + ',你' + (storage[0] == 0 ? '下次使用牌时弃置一张牌' : '展示所有手牌'); + content:function(storage,player){ + if(!storage||!storage.length) return; + return '下个回合结束时,若你的手牌数不为'+storage[1]+',你'+(storage[0]==0?'下次使用牌时弃置一张牌':'展示所有手牌'); } } }, }, }, //费祎 - twshengxi: { - audio: 'shengxi_feiyi', - trigger: { player: 'phaseJieshuBegin' }, - filter: function (event, player) { - return player.getHistory('useCard').length > 0 && player.getHistory('sourceDamage').length == 0; + twshengxi:{ + audio:'shengxi_feiyi', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.getHistory('useCard').length>0&&player.getHistory('sourceDamage').length==0; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var list = get.zhinangs(); - player.chooseButton(['###' + get.prompt('twshengxi') + '###获得一张智囊并摸一张牌', [list, 'vcard']]).set('ai', function (card) { - return (Math.random() + 0.5) * get.value({ name: card.link[2] }, _status.event.player) + var list=get.zhinangs(); + player.chooseButton(['###'+get.prompt('twshengxi')+'###获得一张智囊并摸一张牌',[list,'vcard']]).set('ai',function(card){ + return (Math.random()+0.5)*get.value({name:card.link[2]},_status.event.player) }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twshengxi'); - var card = get.cardPile2(function (card) { - return card.name == result.links[0][2]; + var card=get.cardPile2(function(card){ + return card.name==result.links[0][2]; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); player.draw(); } }, - group: 'twshengxi_zhunbei', - subfrequent: ['zhunbei'], - subSkill: { - zhunbei: { - audio: 'shengxi_feiyi', - trigger: { player: 'phaseZhunbeiBegin' }, - frequent: true, - prompt2: '从游戏外或牌堆中获得一张【调剂盐梅】', - content: function () { - if (!_status.tiaojiyanmei_suits || _status.tiaojiyanmei_suits.length > 0) { - if (!lib.inpile.includes('tiaojiyanmei')) { - game.broadcastAll(function () { lib.inpile.add('tiaojiyanmei') }); + group:'twshengxi_zhunbei', + subfrequent:['zhunbei'], + subSkill:{ + zhunbei:{ + audio:'shengxi_feiyi', + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】', + content:function(){ + if(!_status.tiaojiyanmei_suits||_status.tiaojiyanmei_suits.length>0){ + if(!lib.inpile.includes('tiaojiyanmei')){ + game.broadcastAll(function(){lib.inpile.add('tiaojiyanmei')}); } - if (!_status.tiaojiyanmei_suits) _status.tiaojiyanmei_suits = lib.suit.slice(0); - player.gain(game.createCard2('tiaojiyanmei', _status.tiaojiyanmei_suits.randomRemove(), 6), 'gain2'); + if(!_status.tiaojiyanmei_suits) _status.tiaojiyanmei_suits=lib.suit.slice(0); + player.gain(game.createCard2('tiaojiyanmei',_status.tiaojiyanmei_suits.randomRemove(),6),'gain2'); } else { - var card = get.cardPile2(function (card) { - return card.name == 'tiaojiyanmei'; + var card=get.cardPile2(function(card){ + return card.name=='tiaojiyanmei'; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); } }, }, }, }, - twkuanji: { - audio: 'fyjianyu', - trigger: { - player: 'loseAfter', - global: ['cardsDiscardAfter', 'loseAsyncAfter', 'equipAfter'], + twkuanji:{ + audio:'fyjianyu', + trigger:{ + player:'loseAfter', + global:['cardsDiscardAfter','loseAsyncAfter','equipAfter'], }, - filter: function (event, player) { - if (event.name != 'cardsDiscard') { - return event.getd(player, 'cards2').length > 0; + filter:function(event,player){ + if(event.name!='cardsDiscard'){ + return event.getd(player,'cards2').length>0; } - else { - if (event.cards.filterInD('d').length <= 0) return false; - var evt = event.getParent(); - if (evt.name != 'orderingDiscard') return false; - var evtx = (evt.relatedEvent || evt.getParent()); - if (evtx.player != player) return false; - if (evtx.name == 'useCard') return false; - return player.hasHistory('lose', evtxx => { - return evtx == (evtxx.relatedEvent || evtxx.getParent()); + else{ + if(event.cards.filterInD('d').length<=0) return false; + var evt=event.getParent(); + if(evt.name!='orderingDiscard') return false; + var evtx=(evt.relatedEvent||evt.getParent()); + if(evtx.player!=player) return false; + if(evtx.name=='useCard') return false; + return player.hasHistory('lose',evtxx=>{ + return evtx==(evtxx.relatedEvent||evtxx.getParent()); }); } }, - usable: 1, - direct: true, - content: function () { + usable:1, + direct:true, + content:function(){ 'step 0' - var cards = []; - if (trigger.name != 'cardsDiscard') { - cards = trigger.getd(player, 'cards2'); + var cards=[]; + if(trigger.name!='cardsDiscard'){ + cards=trigger.getd(player,'cards2'); } - else cards = trigger.cards.filterInD('d'); - player.chooseButton(['宽济:是否将一张牌交给一名其他角色?', cards]).set('ai', function (button) { - var player = _status.event.player; - if (game.hasPlayer(function (current) { - return current != player && get.attitude(player, current) > 0; - })) return Math.abs(get.value(button.link, 'raw')) + 1; - return -get.value(button.link, 'raw'); + else cards=trigger.cards.filterInD('d'); + player.chooseButton(['宽济:是否将一张牌交给一名其他角色?',cards]).set('ai',function(button){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })) return Math.abs(get.value(button.link,'raw'))+1; + return -get.value(button.link,'raw'); }); 'step 1' - if (result.bool) { - var card = result.links[0]; - event.card = card; - player.chooseTarget('请选择【宽济】的目标', '令一名其他角色获得' + get.translation(card), lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - return get.attitude(player, target) * get.value(_status.event.getParent().card, target) * (target.hasSkillTag('nogain') ? 0.1 : 1); + if(result.bool){ + var card=result.links[0]; + event.card=card; + player.chooseTarget('请选择【宽济】的目标','令一名其他角色获得'+get.translation(card),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target)*get.value(_status.event.getParent().card,target)*(target.hasSkillTag('nogain')?0.1:1); }); } - else { + else{ player.storage.counttrigger.twkuanji--; event.finish(); } 'step 2' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twkuanji', target); - target.gain(card, 'gain2'); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twkuanji',target); + target.gain(card,'gain2'); } }, }, - shengxi_feiyi: { audio: 2 }, + shengxi_feiyi:{audio:2}, //王越 - twyulong: { - audio: 2, - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - if (!event.isFirstTarget) return false; - if (event.card.name != 'sha') return false; - return event.targets.some(target => player.canCompare(target)); + twyulong:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.isFirstTarget) return false; + if(event.card.name!='sha') return false; + return event.targets.some(target=>player.canCompare(target)); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twyulong'), (card, player, target) => { - return _status.event.getTrigger().targets.includes(target) && player.canCompare(target); - }).set('ai', target => { - if (player.hasCard(card => get.value(card) < 6, 'h')) return -get.attitude(_status.event.player, target); + player.chooseTarget(get.prompt2('twyulong'),(card,player,target)=>{ + return _status.event.getTrigger().targets.includes(target)&&player.canCompare(target); + }).set('ai',target=>{ + if(player.hasCard(card=>get.value(card)<6,'h')) return -get.attitude(_status.event.player,target); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twyulong', target); - if (player.canCompare(target)) { + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twyulong',target); + if(player.canCompare(target)){ player.chooseToCompare(target); } } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { - var color = get.color(result.player, false); - if (color == 'black') trigger.getParent().baseDamage++; - else if (color == 'red') trigger.directHit.addArray(game.players); - trigger.getParent().twyulong = true; + if(result.bool){ + var color=get.color(result.player,false); + if(color=='black') trigger.getParent().baseDamage++; + else if(color=='red') trigger.directHit.addArray(game.players); + trigger.getParent().twyulong=true; player.addTempSkill('twyulong_addCount'); } }, - subSkill: { - addCount: { - charlotte: true, - forced: true, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - if (!event.card || event.card.name != 'sha') return false; - var evt = event.getParent(2); - if (evt.name != 'useCard' || !evt.twyulong) return false; + subSkill:{ + addCount:{ + charlotte:true, + forced:true, + trigger:{source:'damageSource'}, + filter:function(event,player){ + if(!event.card||event.card.name!='sha') return false; + var evt=event.getParent(2); + if(evt.name!='useCard'||!evt.twyulong) return false; return true; }, - content: function () { - var evt = trigger.getParent(2); - if (evt.addCount !== false) { - evt.addCount = false; - if (player.stat[player.stat.length - 1].card.sha > 0) { - player.stat[player.stat.length - 1].card.sha--; + content:function(){ + var evt=trigger.getParent(2); + if(evt.addCount!==false){ + evt.addCount=false; + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; } } } } } }, - twjianming: { - audio: 2, - trigger: { player: ['useCard', 'respond'] }, - filter: function (event, player) { - if (event.card.name != 'sha' || !lib.suit.includes(get.suit(event.card))) return false; - var list = []; - player.getHistory('useCard', function (evt) { - if (evt.card.name == 'sha') { - if (event.card != evt.card) list.push(get.suit(evt.card)); + twjianming:{ + audio:2, + trigger:{player:['useCard','respond']}, + filter:function(event,player){ + if(event.card.name!='sha'||!lib.suit.includes(get.suit(event.card))) return false; + var list=[]; + player.getHistory('useCard',function(evt){ + if(evt.card.name=='sha'){ + if(event.card!=evt.card) list.push(get.suit(evt.card)); } }); - player.getHistory('respond', function (evt) { - if (evt.card.name == 'sha') { - if (event.card != evt.card) list.push(get.suit(evt.card)); + player.getHistory('respond',function(evt){ + if(evt.card.name=='sha'){ + if(event.card!=evt.card) list.push(get.suit(evt.card)); } }); return !list.includes(get.suit(event.card)); }, - forced: true, - content: function () { + forced:true, + content:function(){ player.draw(); }, }, //李彦 - twzhenhu: { - audio: 2, - trigger: { player: 'useCardToPlayer' }, - filter: function (event, player) { - if (!event.isFirstTarget || !get.tag(event.card, 'damage')) return false; - return !player.hasSkillTag('noCompareSource') && game.hasPlayer(target => { - return player.canCompare(target, true); + twzhenhu:{ + audio:2, + trigger:{player:'useCardToPlayer'}, + filter:function(event,player){ + if(!event.isFirstTarget||!get.tag(event.card,'damage')) return false; + return !player.hasSkillTag('noCompareSource')&&game.hasPlayer(target=>{ + return player.canCompare(target,true); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twzhenhu'), [1, 3], function (card, player, target) { - return player.canCompare(target, true); - }).set('ai', function (target) { - var player = _status.event.player, targets = _status.event.getTrigger().targets; - var num = 0; - if (player.hasSkill('twlvren')) num += 2 * (ui.selected.targets.length + 1); - if (player.hasSkill('twchuanshu_effect')) num += 3; - var hs = player.getCards('h').sort((a, b) => get.number(b) - get.number(a)); - if (hs.length == 0) return -1; - var ts = target.getCards('h').sort((a, b) => get.number(b) - get.number(a)); - if (Math.min(13, get.number(hs[0]) + num) <= get.number(ts[0])) return -1; - return get.effect(target, { name: 'guohe_copy2' }, player, player) / 2 + (targets.includes(target) ? get.damageEffect(target, player, player) : 0); + player.chooseTarget(get.prompt2('twzhenhu'),[1,3],function(card,player,target){ + return player.canCompare(target,true); + }).set('ai',function(target){ + var player=_status.event.player,targets=_status.event.getTrigger().targets; + var num=0; + if(player.hasSkill('twlvren')) num+=2*(ui.selected.targets.length+1); + if(player.hasSkill('twchuanshu_effect')) num+=3; + var hs=player.getCards('h').sort((a,b)=>get.number(b)-get.number(a)); + if(hs.length==0) return -1; + var ts=target.getCards('h').sort((a,b)=>get.number(b)-get.number(a)); + if(Math.min(13,get.number(hs[0])+num)<=get.number(ts[0])) return -1; + return get.effect(target,{name:'guohe_copy2'},player,player)/2+(targets.includes(target)?get.damageEffect(target,player,player):0); }); 'step 1' - if (result.bool) { - var targets = result.targets.sortBySeat(); - event.targets = targets; - player.logSkill('twzhenhu', targets); + if(result.bool){ + var targets=result.targets.sortBySeat(); + event.targets=targets; + player.logSkill('twzhenhu',targets); player.draw(); } else event.finish(); 'step 2' - player.chooseToCompare(targets, function (card) { + player.chooseToCompare(targets,function(card){ return get.number(card); }).setContent('chooseToCompareMeanwhile'); 'step 3' - if (result.winner && result.winner == player) { + if(result.winner&&result.winner==player){ event.targets.remove(result.winner); - player.line(event.targets, trigger.card.nature); + player.line(event.targets,trigger.card.nature); player.addTempSkill('twzhenhu_add'); - if (!trigger.card.storage) trigger.card.storage = {}; - trigger.card.storage.twzhenhu = event.targets; + if(!trigger.card.storage) trigger.card.storage={}; + trigger.card.storage.twzhenhu=event.targets; } else player.loseHp(); }, - subSkill: { - add: { - charlotte: true, - onremove: true, - forced: true, - popup: false, - trigger: { global: 'damageBegin1' }, - filter: function (event, player) { - if (!event.card || !event.card.storage) return false; - var targets = event.card.storage.twzhenhu; - return targets && targets.includes(event.player); + subSkill:{ + add:{ + charlotte:true, + onremove:true, + forced:true, + popup:false, + trigger:{global:'damageBegin1'}, + filter:function(event,player){ + if(!event.card||!event.card.storage) return false; + var targets=event.card.storage.twzhenhu; + return targets&&targets.includes(event.player); }, - content: function () { + content:function(){ trigger.num++; }, }, }, }, - twlvren: { - audio: 2, - trigger: { source: 'damageBegin3' }, - filter: function (event, player) { - return event.player != player && event.player.isIn() && !event.player.hasMark('twlvren'); + twlvren:{ + audio:2, + trigger:{source:'damageBegin3'}, + filter:function(event,player){ + return event.player!=player&&event.player.isIn()&&!event.player.hasMark('twlvren'); }, - logTarget: 'player', - forced: true, - locked: false, - group: ['twlvren_more', 'twlvren_add'], - content: function () { - trigger.player.addMark('twlvren', 1); + logTarget:'player', + forced:true, + locked:false, + group:['twlvren_more','twlvren_add'], + content:function(){ + trigger.player.addMark('twlvren',1); }, - ai: { - effect: { - player: function (card, player, target) { - if (target && target.hasMark('twlvren')) return 0.33; + ai:{ + effect:{ + player:function(card,player,target){ + if(target&&target.hasMark('twlvren')) return 0.33; } } }, - marktext: '刃', - intro: { name2: '刃', content: 'mark' }, - subSkill: { - more: { - audio: 'twlvren', - trigger: { player: 'useCard2' }, - filter: function (event, player) { - var card = event.card, info = get.info(card); - if (info.allowMultiple == false) return false; - if (event.targets && !info.multitarget) { - return get.tag(card, 'damage') && event.targets && game.hasPlayer(function (target) { - return target.hasMark('twlvren') && !event.targets.includes(target) && lib.filter.targetEnabled2(card, player, target); + marktext:'刃', + intro:{name2:'刃',content:'mark'}, + subSkill:{ + more:{ + audio:'twlvren', + trigger:{player:'useCard2'}, + filter:function(event,player){ + var card=event.card,info=get.info(card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + return get.tag(card,'damage')&&event.targets&&game.hasPlayer(function(target){ + return target.hasMark('twlvren')&&!event.targets.includes(target)&&lib.filter.targetEnabled2(card,player,target); }); } return false; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twlvren'), '为' + get.translation(trigger.card) + '额外指定一个有“刃”的角色为目标', function (card, player, target) { - var evt = _status.event.getTrigger(); - return target.hasMark('twlvren') && !evt.targets.includes(target) && lib.filter.targetEnabled2(evt.card, player, target); - }).set('ai', function (target) { - return get.effect(target, _status.event.getTrigger().card, _status.event.player); + player.chooseTarget(get.prompt('twlvren'),'为'+get.translation(trigger.card)+'额外指定一个有“刃”的角色为目标',function(card,player,target){ + var evt=_status.event.getTrigger(); + return target.hasMark('twlvren')&&!evt.targets.includes(target)&&lib.filter.targetEnabled2(evt.card,player,target); + }).set('ai',function(target){ + return get.effect(target,_status.event.getTrigger().card,_status.event.player); }); 'step 1' - if (result.bool) { - var targets = result.targets; - player.logSkill('twlvren', targets); - player.line(targets, trigger.card.nature); + if(result.bool){ + var targets=result.targets; + player.logSkill('twlvren',targets); + player.line(targets,trigger.card.nature); trigger.targets.addArray(targets); - for (var i of targets) i.removeMark('twlvren', i.countMark('twlvren'), false); + for(var i of targets) i.removeMark('twlvren',i.countMark('twlvren'),false); } }, }, - add: { - audio: 'twlvren', - trigger: { player: 'compare', target: 'compare' }, - filter: function (event, player) { - if (player != event.target && event.iwhile) return false; + add:{ + audio:'twlvren', + trigger:{player:'compare',target:'compare'}, + filter:function(event,player){ + if(player!=event.target&&event.iwhile) return false; return true; }, - forced: true, - locked: false, - content: function () { - var num = 2 * trigger.lose_list.length; - if (player == trigger.player) { - trigger.num1 += num; - if (trigger.num1 > 13) trigger.num1 = 13; + forced:true, + locked:false, + content:function(){ + var num=2*trigger.lose_list.length; + if(player==trigger.player){ + trigger.num1+=num; + if(trigger.num1>13) trigger.num1=13; } - else { - trigger.num2 += num; - if (trigger.num2 > 13) trigger.num2 = 13; + else{ + trigger.num2+=num; + if(trigger.num2>13) trigger.num2=13; } - game.log(player, '的拼点牌点数+', num); + game.log(player,'的拼点牌点数+',num); }, }, }, }, //童渊 - twchaofeng: { - audio: 2, - enable: ['chooseToUse', 'chooseToRespond'], - hiddenCard: function (player, name) { - if (!['sha', 'shan'].includes(name)) return false; - return player.hasCard(function (card) { - const name2 = get.name(card); - return (name2 == 'sha' || name2 == 'shan') && name != name2; - }, 'hs'); + twchaofeng:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + if(!['sha','shan'].includes(name)) return false; + return player.hasCard(function(card){ + const name2=get.name(card); + return (name2=='sha'||name2=='shan')&&name!=name2; + },'hs'); }, - filter: function (event, player) { - const names = []; - if (event.filterCard({ name: 'sha' }, player, event)) names.push('shan'); - if (event.filterCard({ name: 'shan' }, player, event)) names.push('sha'); - return names.length > 0 && player.hasCard(function (card) { + filter:function(event,player){ + const names=[]; + if(event.filterCard({name:'sha'},player,event)) names.push('shan'); + if(event.filterCard({name:'shan'},player,event)) names.push('sha'); + return names.length>0&&player.hasCard(function(card){ return names.includes(get.name(card)); - }, 'hs'); + },'hs'); //return false; }, - group: 'twchaofeng_compare', - chooseButton: { - dialog: function (event, player) { - var list = []; - if (event.filterCard({ name: 'sha' }, player, event)) { - list.push(['基本', '', 'sha']); - for (var j of lib.inpile_nature) list.push(['基本', '', 'sha', j]); + group:'twchaofeng_compare', + chooseButton:{ + dialog:function(event,player){ + var list=[]; + if(event.filterCard({name:'sha'},player,event)){ + list.push(['基本','','sha']); + for(var j of lib.inpile_nature) list.push(['基本','','sha',j]); } - if (event.filterCard({ name: 'shan' }, player, event)) { - list.push(['基本', '', 'shan']); + if(event.filterCard({name:'shan'},player,event)){ + list.push(['基本','','shan']); } - var dialog = ui.create.dialog('朝凤', [list, 'vcard'], 'hidden'); - dialog.direct = true; + var dialog=ui.create.dialog('朝凤',[list,'vcard'],'hidden'); + dialog.direct=true; return dialog; }, - check: function (button) { - var player = _status.event.player; - var card = { name: button.link[2], nature: button.link[3] }; - if (_status.event.getParent().type != 'phase' || game.hasPlayer(function (current) { - return player.canUse(card, current) && get.effect(current, card, player, player) > 0; - })) { - switch (button.link[2]) { - case 'shan': return 5; + check:function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(_status.event.getParent().type!='phase'||game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })){ + switch (button.link[2]){ + case 'shan':return 5; case 'sha': - if (button.link[3] == 'fire') return 2.95; - else if (button.link[3] == 'thunder' || button.link[3] == 'ice') return 2.92; + if(button.link[3]=='fire') return 2.95; + else if(button.link[3]=='thunder'||button.link[3]=='ice') return 2.92; else return 2.9; } } return 0; }, - backup: function (links, player) { + backup:function(links,player){ return { - audio: 'twchaofeng', - name: links[0][2], - filterCard: function (card, player, target) { - if (lib.skill.twchaofeng_backup.name == 'sha') return get.name(card) == 'shan'; - else return get.name(card) == 'sha'; + audio:'twchaofeng', + name:links[0][2], + filterCard:function(card,player,target){ + if(lib.skill.twchaofeng_backup.name=='sha') return get.name(card)=='shan'; + else return get.name(card)=='sha'; }, - selectCard: 1, - check: function (card, player, target) { - return 6 - get.value(card); + selectCard:1, + check:function(card,player,target){ + return 6-get.value(card); }, - viewAs: { name: links[0][2], nature: links[0][3] }, - position: 'hs', - popname: true, + viewAs:{name:links[0][2],nature:links[0][3]}, + position:'hs', + popname:true, } }, - prompt: function (links, player) { - var view, use; - if (links[0][2] == 'sha') { - use = '【闪】'; - view = get.translation(links[0][3] || '') + '【' + get.translation(links[0][2]) + '】'; + prompt:function(links,player){ + var view,use; + if(links[0][2]=='sha'){ + use='【闪】'; + view=get.translation(links[0][3]||'')+'【'+get.translation(links[0][2])+'】'; } - else { - use = '【杀】'; - view = '【闪】'; + else{ + use='【杀】'; + view='【闪】'; } - return '将一张' + use + '当做' + view + (_status.event.name == 'chooseToUse' ? '使用' : '打出'); + return '将一张'+use+'当做'+view+(_status.event.name=='chooseToUse'?'使用':'打出'); }, }, - ai: { - skillTagFilter: function (player, tag) { + ai:{ + skillTagFilter:function(player,tag){ var name; - switch (tag) { - case 'respondSha': name = 'shan'; break; - case 'respondShan': name = 'sha'; break; + switch (tag){ + case 'respondSha':name='shan'; break; + case 'respondShan':name='sha'; break; } - if (!player.countCards('hs', name)) return false; + if(!player.countCards('hs',name)) return false; }, - order: function (item, player) { - if (player && _status.event.type == 'phase') { - var max = 0; - if (player.countCards('hs', 'shan') > 0 && lib.inpile_nature.some(i => player.getUseValue({ name: 'sha', nature: i }) > 0)) { - var temp = get.order({ name: 'sha' }); - if (temp > max) max = temp; + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + if(player.countCards('hs','shan')>0&&lib.inpile_nature.some(i=>player.getUseValue({name:'sha',nature:i})>0)){ + var temp=get.order({name:'sha'}); + if(temp>max) max=temp; } - if (max > 0) max += 0.3; + if(max>0) max+=0.3; return max; } return 4; }, - result: { - player: 1, + result:{ + player:1, }, - respondSha: true, - respondShan: true, - fireAttack: true, + respondSha:true, + respondShan:true, + fireAttack:true, }, - subSkill: { - compare: { - audio: 'twchaofeng', - trigger: { player: 'phaseUseBegin' }, - direct: true, - content: function () { + subSkill:{ + compare:{ + audio:'twchaofeng', + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twchaofeng'), '选择至多三名角色共同拼点。赢的角色视为对所有没赢的角色使用一张火【杀】', [1, 3], (card, player, target) => { + player.chooseTarget(get.prompt('twchaofeng'),'选择至多三名角色共同拼点。赢的角色视为对所有没赢的角色使用一张火【杀】',[1,3],(card,player,target)=>{ return player.canCompare(target); - }).set('ai', function (target) { - var player = _status.event.player, targets = _status.event.getTrigger().targets; - var num = 0, card = { name: 'sha', nature: 'fire', isCard: true }; - if (target.hasSkill('twlvren')) num += 2 * (ui.selected.targets.length + 1); - if (target.hasSkill('twchuanshu_effect')) num += 3; - var hs = player.getCards('h').sort((a, b) => get.number(b) - get.number(a)); - var ts = target.getCards('h').sort((a, b) => get.number(b) - get.number(a)); - if (get.number(hs[0]) <= Math.min(13, get.number(ts[0]) + num)) { - return 6 + get.effect(player, card, target, target); + }).set('ai',function(target){ + var player=_status.event.player,targets=_status.event.getTrigger().targets; + var num=0,card={name:'sha',nature:'fire',isCard:true}; + if(target.hasSkill('twlvren')) num+=2*(ui.selected.targets.length+1); + if(target.hasSkill('twchuanshu_effect')) num+=3; + var hs=player.getCards('h').sort((a,b)=>get.number(b)-get.number(a)); + var ts=target.getCards('h').sort((a,b)=>get.number(b)-get.number(a)); + if(get.number(hs[0])<=Math.min(13,get.number(ts[0])+num)){ + return 6+get.effect(player,card,target,target); } - return get.effect(target, { name: 'guohe_copy2' }, player, player) / 2 + get.effect(target, card, player, player); + return get.effect(target,{name:'guohe_copy2'},player,player)/2+get.effect(target,card,player,player); }); 'step 1' - if (result.bool) { - event.targets = result.targets; - player.logSkill('twchaofeng_compare', event.targets); + if(result.bool){ + event.targets=result.targets; + player.logSkill('twchaofeng_compare',event.targets); player.chooseToCompare(event.targets).setContent('chooseToCompareMeanwhile'); } 'step 2' - if (result.winner) { - var targets = [player].addArray(event.targets).sortBySeat(player); + if(result.winner){ + var targets=[player].addArray(event.targets).sortBySeat(player); targets.remove(result.winner); - var card = { name: 'sha', nature: 'fire', isCard: true }; - var targetsx = targets.filter(function (target) { - return result.winner.canUse(card, target, false); + var card={name:'sha',nature:'fire',isCard:true}; + var targetsx=targets.filter(function(target){ + return result.winner.canUse(card,target,false); }); - if (targetsx.length) result.winner.useCard(card, targetsx, 'noai').set('addCount', false); + if(targetsx.length) result.winner.useCard(card,targetsx,'noai').set('addCount',false); } } } } }, - twchuanshu: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - limited: true, - skillAnimation: true, - animationColor: 'qun', - direct: true, - content: function () { + twchuanshu:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + limited:true, + skillAnimation:true, + animationColor:'qun', + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twchuanshu')).set('ai', target => get.attitude(_status.event.player, target)); + player.chooseTarget(get.prompt2('twchuanshu')).set('ai',target=>get.attitude(_status.event.player,target)); 'step 1' - if (result.bool) { + if(result.bool){ player.awakenSkill('twchuanshu'); - var target = result.targets[0]; - player.logSkill('twchuanshu', target); - target.addMark('twchuanshu_mark', 1, false); + var target=result.targets[0]; + player.logSkill('twchuanshu',target); + target.addMark('twchuanshu_mark',1,false); target.addSkill('twchuanshu_effect'); - target.markAuto('twchuanshu_effect', [player]); + target.markAuto('twchuanshu_effect',[player]); player.addSkill('twchuanshu_clear'); - player.markAuto('twchuanshu_clear', [target]); + player.markAuto('twchuanshu_clear',[target]); } }, - subSkill: { - mark: { - charlotte: true, + subSkill:{ + mark:{ + charlotte:true, }, - effect: { - audio: 'twchuanshu', - trigger: { - player: 'compare', - target: 'compare', + effect:{ + audio:'twchuanshu', + trigger:{ + player:'compare', + target:'compare', }, - direct: true, - forced: true, - charlotte: true, - nopop: true, - mark: true, - intro: { - content: function (storage, player) { - var shisyou = player.getStorage('twchuanshu_effect').filter(i => i.isIn()); - var str = '
  • 拼点牌点数+3;' - if (player.hasMark('twchuanshu_mark')) { - str += '
  • 使用的下一张【杀】对除' + get.translation(shisyou) + '外的角色造成伤害时,此伤害+' + player.countMark('twchuanshu_mark') + ';'; - if (!shisyou.includes(player)) { - str += '
  • 使用的下一张【杀】结算结束后,' + get.translation(shisyou) + '摸等同于伤害值的牌;'; + direct:true, + forced:true, + charlotte:true, + nopop:true, + mark:true, + intro:{ + content:function(storage,player){ + var shisyou=player.getStorage('twchuanshu_effect').filter(i=>i.isIn()); + var str='
  • 拼点牌点数+3;' + if(player.hasMark('twchuanshu_mark')){ + str+='
  • 使用的下一张【杀】对除'+get.translation(shisyou)+'外的角色造成伤害时,此伤害+'+player.countMark('twchuanshu_mark')+';'; + if(!shisyou.includes(player)){ + str+='
  • 使用的下一张【杀】结算结束后,'+get.translation(shisyou)+'摸等同于伤害值的牌;'; } } - str = str.slice(0, -1) + '。'; + str=str.slice(0,-1)+'。'; return str; } }, - filter: function (event, player, name) { - if (event.player == player && event.iwhile > 0) return false; - return (player == event.player ? event.num1 : event.num2) < 13; + filter:function(event,player,name){ + if(event.player==player&&event.iwhile>0) return false; + return (player==event.player?event.num1:event.num2)<13; }, - content: function () { - game.log(player, '的拼点牌点数+3'); - if (player == trigger.player) trigger.num1 = Math.min(13, trigger.num1 + 3); - else trigger.num2 = Math.min(13, trigger.num2 + 3); + content:function(){ + game.log(player,'的拼点牌点数+3'); + if(player==trigger.player) trigger.num1=Math.min(13,trigger.num1+3); + else trigger.num2=Math.min(13,trigger.num2+3); }, - group: 'twchuanshu_damage', + group:'twchuanshu_damage', }, - damage: { - charlotte: true, - trigger: { player: ['useCard', 'useCardAfter'], source: 'damageBegin1' }, - filter: function (event, player, name) { - if (name == 'useCard') return (event.card.name == 'sha' && player.hasMark('twchuanshu_mark')); - if (name == 'damageBegin1') return event.card && event.card.twchuanshu_mark && !player.getStorage('twchuanshu_effect').includes(event.player); - return event.card.twchuanshu_mark && player.hasHistory('sourceDamage', function (evt) { - return evt.card == event.card; - }) && player.getStorage('twchuanshu_effect').filter(function (target) { - return target.isIn() && target != player; + damage:{ + charlotte:true, + trigger:{player:['useCard','useCardAfter'],source:'damageBegin1'}, + filter:function(event,player,name){ + if(name=='useCard') return (event.card.name=='sha'&&player.hasMark('twchuanshu_mark')); + if(name=='damageBegin1') return event.card&&event.card.twchuanshu_mark&&!player.getStorage('twchuanshu_effect').includes(event.player); + return event.card.twchuanshu_mark&&player.hasHistory('sourceDamage',function(evt){ + return evt.card==event.card; + })&&player.getStorage('twchuanshu_effect').filter(function(target){ + return target.isIn()&&target!=player; }).length; }, - forced: true, - content: function () { - var name = event.triggername; - if (name == 'useCard') { - var num = player.countMark('twchuanshu_mark'); - trigger.card.twchuanshu_mark = num; - player.removeMark('twchuanshu_mark', num, false); + forced:true, + content:function(){ + var name=event.triggername; + if(name=='useCard'){ + var num=player.countMark('twchuanshu_mark'); + trigger.card.twchuanshu_mark=num; + player.removeMark('twchuanshu_mark',num,false); } - else if (name == 'damageBegin1') trigger.num++; - else { - var num1 = trigger.card.twchuanshu_mark; - var num2 = 0; - player.getHistory('sourceDamage', function (evt) { - if (evt.card == trigger.card) num2 += evt.num; + else if(name=='damageBegin1') trigger.num++; + else{ + var num1=trigger.card.twchuanshu_mark; + var num2=0; + player.getHistory('sourceDamage',function(evt){ + if(evt.card==trigger.card) num2+=evt.num; }); - var targets = player.getStorage('twchuanshu_effect').filter(function (target) { - return target.isIn() && target != player; + var targets=player.getStorage('twchuanshu_effect').filter(function(target){ + return target.isIn()&&target!=player; }); - if (targets.length == 1) targets[0].draw(num1 * num2); - else game.asyncDraw(targets, num1 * num2); + if(targets.length==1) targets[0].draw(num1*num2); + else game.asyncDraw(targets,num1*num2); } }, }, - clear: { - charlotte: true, - onremove: true, - trigger: { player: 'phaseBegin' }, - filter: function (event, player) { + clear:{ + charlotte:true, + onremove:true, + trigger:{player:'phaseBegin'}, + filter:function(event,player){ return player.getStorage('twchuanshu_clear').length; }, - forced: true, - silent: true, - content: function () { + forced:true, + silent:true, + content:function(){ 'step 0' - var targets = player.getStorage('twchuanshu_clear'); - for (var target of targets) { - target.unmarkAuto('twchuanshu_effect', [player]); - if (!target.getStorage('twchuanshu_effect').length) target.removeSkill('twchuanshu_effect'); + var targets=player.getStorage('twchuanshu_clear'); + for(var target of targets){ + target.unmarkAuto('twchuanshu_effect',[player]); + if(!target.getStorage('twchuanshu_effect').length) target.removeSkill('twchuanshu_effect'); } 'step 1' player.removeSkill('twchuanshu_clear'); @@ -9741,104 +9741,104 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //徐庶 - twjiange: { - audio: 2, - enable: ['chooseToUse', 'chooseToRespond'], - filterCard: function (card, player) { - return get.type(card) != 'basic'; + twjiange:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + filterCard:function(card,player){ + return get.type(card)!='basic'; }, - usable: 1, - locked: false, - viewAs: { name: 'sha', storage: { twjiange: true } }, - viewAsFilter: function (player) { - if (!player.countCards('hes', function (card) { - return get.type(card) != 'basic'; + usable:1, + locked:false, + viewAs:{name:'sha',storage:{twjiange:true}}, + viewAsFilter:function(player){ + if(!player.countCards('hes',function(card){ + return get.type(card)!='basic'; })) return false; }, - position: 'hes', - selectCard: function () { - return _status.event.skill == 'twjiange' ? 1 : Infinity; + position:'hes', + selectCard:function(){ + return _status.event.skill=='twjiange'?1:Infinity; }, - precontent: function () { - if (player != _status.currentPhase) { - player.when({ player: ['useCard', 'respond'] }) - .filter(evt => evt.skill == 'twjiange') - .then(() => player.draw()); + precontent:function(){ + if(player!=_status.currentPhase){ + player.when({player:['useCard','respond']}) + .filter(evt=>evt.skill=='twjiange') + .then(()=>player.draw()); } - event.getParent().addCount = false; + event.getParent().addCount=false; }, - prompt: '将一张非基本牌当杀使用或打出', - check: function (card) { - var val = get.value(card); - if (_status.event.name == 'chooseToRespond') return 1 / Math.max(0.1, val); - return 6 - val; + prompt:'将一张非基本牌当杀使用或打出', + check:function(card){ + var val=get.value(card); + if(_status.event.name=='chooseToRespond') return 1/Math.max(0.1,val); + return 6-val; }, - ai: { - order: function (item, player) { - var target = _status.currentPhase; - if (!target || target != player) return 7; + ai:{ + order:function(item,player){ + var target=_status.currentPhase; + if(!target||target!=player) return 7; return 1; }, - respondSha: true, - skillTagFilter: function (player) { - if (!player.countCards('hes', function (card) { - return get.type(card) != 'basic'; + respondSha:true, + skillTagFilter:function(player){ + if(!player.countCards('hes',function(card){ + return get.type(card)!='basic'; })) return false; }, }, - mod: { - targetInRange: function (card) { - if (card.storage && card.storage.twjiange) return true; + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.twjiange) return true; }, - cardUsable: function (card, player, num) { - if (card.storage && card.storage.twjiange) return Infinity; + cardUsable:function(card,player,num){ + if(card.storage&&card.storage.twjiange) return Infinity; }, } }, - twxiawang: { - audio: 2, - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - if (!event.source || get.distance(player, event.player) > 1 || !player.canUse('sha', event.source, false, false)) return false; - return player.countCards('h') > 0; + twxiawang:{ + audio:2, + trigger:{global:'damageEnd'}, + filter:function(event,player){ + if(!event.source||get.distance(player,event.player)>1||!player.canUse('sha',event.source,false,false)) return false; + return player.countCards('h')>0; }, - direct: true, - 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.source) + '使用一张杀?').set('logSkill', 'twxiawang').set('complexSelect', true).set('filterTarget', function (card, player, target) { - if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false; - return lib.filter.filterTarget.apply(this, arguments); - }).set('sourcex', trigger.source); + direct:true, + 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.source)+'使用一张杀?').set('logSkill','twxiawang').set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',trigger.source); player.addTempSkill('twxiawang_damage'); }, - subSkill: { - damage: { - trigger: { player: 'useCardAfter' }, - forced: true, - popup: false, - charlotte: true, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - if (event.getParent(2).name != 'twxiawang') return false; - if (!player.hasHistory('sourceDamage', evt => evt.card == event.card)) return false; - for (var phase of lib.phaseName) { - var evt = event.getParent(phase); - if (evt && evt.name == phase) return true; + subSkill:{ + damage:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(event.getParent(2).name!='twxiawang') return false; + if(!player.hasHistory('sourceDamage',evt=>evt.card==event.card)) return false; + for(var phase of lib.phaseName){ + var evt=event.getParent(phase); + if(evt&&evt.name==phase) return true; } return false; }, - content: function () { + content:function(){ player.popup() player.removeSkill('twjiange_damage'); - for (var phase of lib.phaseName) { - var evt = event.getParent(phase); - if (evt && evt.name == phase) { - var name = ['准备', '判定', '摸牌', '出牌', '弃牌', '结束'][lib.phaseName.indexOf(phase)]; - game.log(player, '令', _status.currentPhase, '结束了' + name + '阶段'); - player.line(_status.currentPhase, 'thunder'); - evt.skipped = true; + for(var phase of lib.phaseName){ + var evt=event.getParent(phase); + if(evt&&evt.name==phase){ + var name=['准备','判定','摸牌','出牌','弃牌','结束'][lib.phaseName.indexOf(phase)]; + game.log(player,'令',_status.currentPhase,'结束了'+name+'阶段'); + player.line(_status.currentPhase,'thunder'); + evt.skipped=true; } } } @@ -9846,517 +9846,517 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //好萌 - twgongge: { - audio: 3, - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - if (!event.isFirstTarget || !event.targets) return false; - return get.tag(event.card, 'damage'); + twgongge:{ + audio:3, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.isFirstTarget||!event.targets) return false; + return get.tag(event.card,'damage'); }, - direct: true, - usable: 1, - content: function () { + direct:true, + usable:1, + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twgongge'), function (card, player, target) { - var trigger = _status.event.getTrigger(); + player.chooseTarget(get.prompt2('twgongge'),function(card,player,target){ + var trigger=_status.event.getTrigger(); return trigger.targets.includes(target); - }).set('ai', function (target) { - var player = _status.event.player; - var trigger = _status.event.getTrigger(); - var att = get.attitude(player, target); - var damageNum = trigger.getParent().baseDamage; - var map = trigger.getParent().customArgs, id = target.playerid; - if (map[id]) { - if (typeof map[id].baseDamage == 'number') damageNum = map[id].baseDamage; - if (typeof map[id].extraDamage == 'number') damageNum += map[id].extraDamage; + }).set('ai',function(target){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + var att=get.attitude(player,target); + var damageNum=trigger.getParent().baseDamage; + var map=trigger.getParent().customArgs,id=target.playerid; + if(map[id]){ + if(typeof map[id].baseDamage=='number') damageNum=map[id].baseDamage; + if(typeof map[id].extraDamage=='number') damageNum+=map[id].extraDamage; } - if (target.hasSkillTag('filterDamage', null, { - player: trigger.player, - card: trigger.card, - })) damageNum = 1; - var num = target.getSkills(null, false, false).filter(function (skill) { - var info = get.info(skill); - return info && !info.charlotte; - }).length + 1; - var list = [0, 0, 0]; - var player = _status.event.player; - list[0] = num; - list[1] = (get.effect(target, { name: 'guohe_copy2' }, player, player) > 0 ? ((target.hp - damageNum < player.hp) ? num : (num - Math.min(player.getCards('he'), num - 1))) : 0); - if (_status.event.yimie(trigger, player, target, damageNum)) list[2] = (get.recoverEffect(target, player, player) > get.damageEffect(target, player, player) ? (Math.min(num - 1, target.getDamagedHp())) : (num - 1)) * 2; - return Math.max.apply(Math, list); - }).set('yimie', function (trigger, player, target, damageNum) { - var hit = true; - var att = get.attitude(player, target); - if (get.type(trigger.card) == 'trick' && trigger.player.countCards('hs', { name: 'wuxie' })) hit = false; - if (trigger.card.name == 'huogong' && trigger.player.countCards('h', function (card) { - var list = []; - for (var i of player.getCards('h')) list.push(get.suit(i)); + if(target.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:trigger.card, + })) damageNum=1; + var num=target.getSkills(null,false,false).filter(function(skill){ + var info=get.info(skill); + return info&&!info.charlotte; + }).length+1; + var list=[0,0,0]; + var player=_status.event.player; + list[0]=num; + list[1]=(get.effect(target,{name:'guohe_copy2'},player,player)>0?((target.hp-damageNumget.damageEffect(target,player,player)?(Math.min(num-1,target.getDamagedHp())):(num-1))*2; + return Math.max.apply(Math,list); + }).set('yimie',function(trigger,player,target,damageNum){ + var hit=true; + var att=get.attitude(player,target); + if(get.type(trigger.card)=='trick'&&trigger.player.countCards('hs',{name:'wuxie'})) hit=false; + if(trigger.card.name=='huogong'&&trigger.player.countCards('h',function(card){ + var list=[]; + for(var i of player.getCards('h')) list.push(get.suit(i)); return !list.includes(get.suit(card)); - })) hit = false; + })) hit=false; var key; - switch (trigger.card.name) { - case 'sha': case 'wanjian': key = ['shan']; break; - case 'juedou': case 'nanman': case 'jiedao': key = ['sha']; break; - default: key = []; break; + switch (trigger.card.name){ + case 'sha':case 'wanjian':key=['shan']; break; + case 'juedou':case 'nanman':case 'jiedao':key=['sha']; break; + default:key=[]; break; } - if (get.type(trigger.card) == 'trick') key.push('wuxie'); + if(get.type(trigger.card)=='trick') key.push('wuxie'); key.push('caochuan'); - var bool1 = ((get.recoverEffect(target, player, player) > 0) ? 1 : -1); - var bool2 = (((att > 0 && !hit) || (target.countCards('hs', { name: key }) && !trigger.getParent().directHit.includes(target))) ? 1 : -1); - if (att <= 0 && target.hp - damageNum > 0) return false; - return bool1 = bool2 && att != 0; + var bool1=((get.recoverEffect(target,player,player)>0)?1:-1); + var bool2=(((att>0&&!hit)||(target.countCards('hs',{name:key})&&!trigger.getParent().directHit.includes(target)))?1:-1); + if(att<=0&&target.hp-damageNum>0) return false; + return bool1=bool2&&att!=0; }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twgongge', target); - var num = target.getSkills(null, false, false).filter(function (skill) { - var info = get.info(skill); - return info && !info.charlotte; - }).length + 1; - event.num = num; - var list = []; - var choiceList = [ - '摸' + get.cnNumber(num) + '张牌,若' + get.translation(target) + '响应此牌,则你跳过下个摸牌阶段', - '弃置' + get.translation(target) + get.cnNumber(num) + '张牌,此牌结算完毕后,若' + get.translation(target) + '的体力值不小于你,你交给' + get.translation(target) + get.cnNumber(num - 1) + '张牌', - '令此牌对' + get.translation(target) + '造成的伤害+' + (num - 1) + ',此伤害结算完成后,其回复等量的体力值' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twgongge',target); + var num=target.getSkills(null,false,false).filter(function(skill){ + var info=get.info(skill); + return info&&!info.charlotte; + }).length+1; + event.num=num; + var list=[]; + var choiceList=[ + '摸'+get.cnNumber(num)+'张牌,若'+get.translation(target)+'响应此牌,则你跳过下个摸牌阶段', + '弃置'+get.translation(target)+get.cnNumber(num)+'张牌,此牌结算完毕后,若'+get.translation(target)+'的体力值不小于你,你交给'+get.translation(target)+get.cnNumber(num-1)+'张牌', + '令此牌对'+get.translation(target)+'造成的伤害+'+(num-1)+',此伤害结算完成后,其回复等量的体力值' ]; list.push('摸牌'); - if (target.countDiscardableCards(player, 'he')) list.push('拆牌'); - else choiceList[1] = '' + choiceList[1] + ''; + if(target.countDiscardableCards(player,'he')) list.push('拆牌'); + else choiceList[1]=''+choiceList[1]+''; list.push('加伤'); - player.chooseControl(list).set('prompt', '攻阁:请选择一项(' + get.translation(target) + '对应X值:' + (num - 1) + ')').set('ai', () => _status.event.choice).set('choice', function () { - var att = get.attitude(player, target); - var damageNum = trigger.getParent().baseDamage; - var map = trigger.getParent().customArgs, id = target.playerid; - if (map[id]) { - if (typeof map[id].baseDamage == 'number') damageNum = map[id].baseDamage; - if (typeof map[id].extraDamage == 'number') damageNum += map[id].extraDamage; + player.chooseControl(list).set('prompt','攻阁:请选择一项('+get.translation(target)+'对应X值:'+(num-1)+')').set('ai',()=>_status.event.choice).set('choice',function(){ + var att=get.attitude(player,target); + var damageNum=trigger.getParent().baseDamage; + var map=trigger.getParent().customArgs,id=target.playerid; + if(map[id]){ + if(typeof map[id].baseDamage=='number') damageNum=map[id].baseDamage; + if(typeof map[id].extraDamage=='number') damageNum+=map[id].extraDamage; } - if (target.hasSkillTag('filterDamage', null, { - player: trigger.player, - card: trigger.card, - })) damageNum = 1; - var yimie = function () { - var hit = true; - if (get.type(trigger.card) == 'trick' && trigger.player.countCards('hs', { name: 'wuxie' })) hit = false; - if (trigger.card.name == 'huogong' && trigger.player.countCards('h', function (card) { - var list = []; - for (var i of player.getCards('h')) list.push(get.suit(i)); + if(target.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:trigger.card, + })) damageNum=1; + var yimie=function(){ + var hit=true; + if(get.type(trigger.card)=='trick'&&trigger.player.countCards('hs',{name:'wuxie'})) hit=false; + if(trigger.card.name=='huogong'&&trigger.player.countCards('h',function(card){ + var list=[]; + for(var i of player.getCards('h')) list.push(get.suit(i)); return !list.includes(get.suit(card)); - })) hit = false; + })) hit=false; var key; - switch (trigger.card.name) { - case 'sha': case 'wanjian': key = ['shan']; break; - case 'juedou': case 'nanman': case 'jiedao': key = ['sha']; break; - default: key = []; break; + switch (trigger.card.name){ + case 'sha':case 'wanjian':key=['shan']; break; + case 'juedou':case 'nanman':case 'jiedao':key=['sha']; break; + default:key=[]; break; } key.push('caochuan'); - var bool1 = ((get.recoverEffect(target, player, player) > 0) ? 1 : -1); - var bool2 = (((att > 0 && !hit) || (target.countCards('hs', { name: key }) && !trigger.getParent().directHit.includes(target))) ? 1 : -1); - if (att <= 0 && target.hp - damageNum > 0) return false; - return bool1 = bool2 && att != 0; + var bool1=((get.recoverEffect(target,player,player)>0)?1:-1); + var bool2=(((att>0&&!hit)||(target.countCards('hs',{name:key})&&!trigger.getParent().directHit.includes(target)))?1:-1); + if(att<=0&&target.hp-damageNum>0) return false; + return bool1=bool2&&att!=0; }; - if (yimie()) return '加伤'; - if (list.includes('拆牌') && get.effect(target, { name: 'guohe_copy2' }, player, player) > 0 && target.hp - damageNum < player.hp) return '拆牌'; + if(yimie()) return '加伤'; + if(list.includes('拆牌')&&get.effect(target,{name:'guohe_copy2'},player,player)>0&&target.hp-damageNum= player.hp) return true; + buff2:{ + charlotte:true, + onremove:true, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + if(!player.countCards('he')) return false; + var evt=player.storage.twgongge_buff2; + if(evt.card==event.card&&evt.target.isIn()&&evt.target.hp>=player.hp) return true; return false; }, - direct: true, - popup: false, - content: function () { + direct:true, + popup:false, + content:function(){ 'step 0' - var evt = player.storage.twgongge_buff2; - var target = evt.target, num = evt.num; - event.target = target; - if (player.countCards('he') <= num) event._result = { bool: true, cards: player.getCards('he') }; - else player.chooseCard('he', num, '攻阁:交给' + get.translation(target) + get.cnNumber(num) + '张牌', true); + var evt=player.storage.twgongge_buff2; + var target=evt.target,num=evt.num; + event.target=target; + if(player.countCards('he')<=num) event._result={bool:true,cards:player.getCards('he')}; + else player.chooseCard('he',num,'攻阁:交给'+get.translation(target)+get.cnNumber(num)+'张牌',true); 'step 1' - if (result.bool) player.give(result.cards, target); + if(result.bool) player.give(result.cards,target); }, }, //加伤后续 - buff3: { - charlotte: true, - onremove: true, - trigger: { source: 'damageBegin1', player: 'useCardAfter' }, - filter: function (event, player) { - if (!event.card) return false; - var evt = player.storage.twgongge_buff3; - if (evt.card == event.card && evt.target.isIn() && (event.name == 'useCard' || event.player == evt.target)) return true; + buff3:{ + charlotte:true, + onremove:true, + trigger:{source:'damageBegin1',player:'useCardAfter'}, + filter:function(event,player){ + if(!event.card) return false; + var evt=player.storage.twgongge_buff3; + if(evt.card==event.card&&evt.target.isIn()&&(event.name=='useCard'||event.player==evt.target)) return true; return false; }, - direct: true, - popup: false, - content: function () { - var evt = player.storage.twgongge_buff3; - if (trigger.name == 'damage') trigger.num += evt.num; - else if (evt.target.isIn()) evt.target.recover(evt.num); + direct:true, + popup:false, + content:function(){ + var evt=player.storage.twgongge_buff3; + if(trigger.name=='damage') trigger.num+=evt.num; + else if(evt.target.isIn()) evt.target.recover(evt.num); }, }, - buff1_mark: { - mark: true, - intro: { - content: '跳过下一个摸牌阶段', + buff1_mark:{ + mark:true, + intro:{ + content:'跳过下一个摸牌阶段', }, } }, }, //魏续 - twsuizheng: { - audio: 3, - trigger: { global: 'phaseBefore', player: 'enterGame' }, - filter: function (event, player) { - return game.hasPlayer(current => current != player) && (event.name != 'phase' || game.phaseNumber == 0); + twsuizheng:{ + audio:3, + trigger:{global:'phaseBefore',player:'enterGame'}, + filter:function(event,player){ + return game.hasPlayer(current=>current!=player)&&(event.name!='phase'||game.phaseNumber==0); }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - player.chooseTarget('请选择【随征】的目标', lib.translate.twsuizheng_info, lib.filter.notMe, true).set('ai', function (target) { - var player = _status.event.player; - return Math.max(1 + get.attitude(player, target) * get.threaten(target), Math.random()); + player.chooseTarget('请选择【随征】的目标',lib.translate.twsuizheng_info,lib.filter.notMe,true).set('ai',function(target){ + var player=_status.event.player; + return Math.max(1+get.attitude(player,target)*get.threaten(target),Math.random()); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - game.log(player, '选择了', target, '作为', '“随征”角色'); - player.markAuto('twsuizheng', [target]); + game.log(player,'选择了',target,'作为','“随征”角色'); + player.markAuto('twsuizheng',[target]); player.addSkill('twsuizheng_draw'); player.addSkill('twsuizheng_xianfu'); } }, - ai: { expose: 0.3 }, - intro: { content: '已选择$为“随征”角色' }, - subSkill: { - draw: { - charlotte: true, - audio: 'twsuizheng', - trigger: { global: 'damageSource' }, - filter: function (event, player) { + ai:{expose:0.3}, + intro:{content:'已选择$为“随征”角色'}, + subSkill:{ + draw:{ + charlotte:true, + audio:'twsuizheng', + trigger:{global:'damageSource'}, + filter:function(event,player){ return player.getStorage('twsuizheng').includes(event.source); }, - forced: true, - logTarget: 'source', - content: function () { + forced:true, + logTarget:'source', + content:function(){ player.draw(); }, }, - xianfu: { - audio: 'twsuizheng', - trigger: { global: 'damageEnd' }, - filter: function (event, player) { - return player.getStorage('twsuizheng').includes(event.player) && event.player.isIn(); + xianfu:{ + audio:'twsuizheng', + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return player.getStorage('twsuizheng').includes(event.player)&&event.player.isIn(); }, - forced: true, - charlotte: true, - logTarget: 'player', - content: function () { + forced:true, + charlotte:true, + logTarget:'player', + content:function(){ 'step 0' - player.chooseToDiscard(2, '随征:弃置两张基本牌', '若你弃牌,你令' + get.translation(trigger.player) + '回复1点体力;或点击“取消”失去1点体力,令' + get.translation(trigger.player) + '获得一张【杀】或【决斗】', { type: 'basic' }).set('ai', function (card) { - if (_status.event.refuse) return -1; - return 6 - get.value(card); - }).set('refuse', get.attitude(player, trigger.player) <= 0 || get.effect(player, { name: 'losehp' }) >= 0); + player.chooseToDiscard(2,'随征:弃置两张基本牌','若你弃牌,你令'+get.translation(trigger.player)+'回复1点体力;或点击“取消”失去1点体力,令'+get.translation(trigger.player)+'获得一张【杀】或【决斗】',{type:'basic'}).set('ai',function(card){ + if(_status.event.refuse) return -1; + return 6-get.value(card); + }).set('refuse',get.attitude(player,trigger.player)<=0||get.effect(player,{name:'losehp'})>=0); 'step 1' - if (result.bool) trigger.player.recover(); + if(result.bool) trigger.player.recover(); else { player.loseHp(); - var card = get.cardPile(function (card) { - return card.name == 'sha' || card.name == 'juedou'; + var card=get.cardPile(function(card){ + return card.name=='sha'||card.name=='juedou'; }); - if (card) trigger.player.gain(card, 'gain2'); + if(card) trigger.player.gain(card,'gain2'); } }, }, }, }, - twtuidao: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - filter: function (event, player) { - var targets = player.getStorage('twsuizheng'); - if (!targets.length) return false; - return targets.some(target => target.hp <= 2 || !target.isIn()); + twtuidao:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + var targets=player.getStorage('twsuizheng'); + if(!targets.length) return false; + return targets.some(target=>target.hp<=2||!target.isIn()); }, - check: function (event, player) { - var targets = player.getStorage('twsuizheng'); - var val = 0; - for (var target of targets) { - if (target.hp <= 2 && target.isIn()) val -= get.attitude(player, target); - else if (!target.isIn()) val += 6; + check:function(event,player){ + var targets=player.getStorage('twsuizheng'); + var val=0; + for(var target of targets){ + if(target.hp<=2&&target.isIn()) val-=get.attitude(player,target); + else if(!target.isIn()) val+=6; } - return val > 0; + return val>0; }, - limited: true, - skillAnimation: true, - animationColor: 'thunder', - content: function () { + limited:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ 'step 0' player.awakenSkill('twtuidao'); - var list1 = ['equip3', 'equip4'].map(i => get.translation(i)), list2 = ['basic', 'trick', 'equip'].map(i => get.translation(i)); - var targets = player.getStorage('twsuizheng'), str = get.translation(targets); - if (targets.length) str = '与' + str; - player.chooseButton(2, true, [ - '颓盗:废除你' + str + '的一个坐骑栏废除并选择一个类别', + var list1=['equip3','equip4'].map(i=>get.translation(i)),list2=['basic','trick','equip'].map(i=>get.translation(i)); + var targets=player.getStorage('twsuizheng'),str=get.translation(targets); + if(targets.length) str='与'+str; + player.chooseButton(2,true,[ + '颓盗:废除你'+str+'的一个坐骑栏废除并选择一个类别', '坐骑栏', - [list1, 'tdnodes'], + [list1,'tdnodes'], '类别', - [list2, 'tdnodes'], - ]).set('filterButton', function (button) { - var list = _status.event.list, link = button.link; - if (ui.selected.buttons.length) { - if (list.includes(ui.selected.buttons[0].link) && list.includes(link)) return false; - if (!list.includes(ui.selected.buttons[0].link) && !list.includes(link)) return false; + [list2,'tdnodes'], + ]).set('filterButton',function(button){ + var list=_status.event.list,link=button.link; + if(ui.selected.buttons.length){ + if(list.includes(ui.selected.buttons[0].link)&&list.includes(link)) return false; + if(!list.includes(ui.selected.buttons[0].link)&&!list.includes(link)) return false; } return true; - }).set('ai', function (button) { - var player = _status.event.player; - var list = _status.event.list, link = button.link; - if (list.includes(link)) { - if (player.hasDisabledSlot(4)) return '攻击马'; - if (player.hasDisabledSlot(3)) return '防御马'; + }).set('ai',function(button){ + var player=_status.event.player; + var list=_status.event.list,link=button.link; + if(list.includes(link)){ + if(player.hasDisabledSlot(4)) return '攻击马'; + if(player.hasDisabledSlot(3)) return '防御马'; return '攻击马'; } - if (!list.includes(link)) { - var player = _status.event.player; - var targets = player.getStorage('twsuizheng'); - for (var target of targets) { - if (target.isIn()) { - var listx = [0, 0, 0], list2 = ['basic', 'trick', 'equip'].map(i => get.translation(i)); - for (var i of target.getCards('he')) listx[list2.indexOf(get.translation(get.type2(i)))]++; - return list2[listx.indexOf(Math.max.apply(Math, listx))]; + if(!list.includes(link)){ + var player=_status.event.player; + var targets=player.getStorage('twsuizheng'); + for(var target of targets){ + if(target.isIn()){ + var listx=[0,0,0],list2=['basic','trick','equip'].map(i=>get.translation(i)); + for(var i of target.getCards('he')) listx[list2.indexOf(get.translation(get.type2(i)))]++; + return list2[listx.indexOf(Math.max.apply(Math,listx))]; } } - return 1 + Math.random(); + return 1+Math.random(); } - }).set('list', list1); + }).set('list',list1); 'step 1' - if (result.links[0].indexOf('马') == -1) result.links.reverse(); - var subtype = result.links[0] == '防御马' ? 'equip3' : 'equip4', type = { 基本: 'basic', 锦囊: 'trick', 装备: 'equip' }[result.links[1]]; + if(result.links[0].indexOf('马')==-1) result.links.reverse(); + var subtype=result.links[0]=='防御马'?'equip3':'equip4',type={基本:'basic',锦囊:'trick',装备:'equip'}[result.links[1]]; player.disableEquip(subtype); - var targets = player.getStorage('twsuizheng') - for (var target of targets) { - if (target && target.isIn()) { + var targets=player.getStorage('twsuizheng') + for(var target of targets){ + if(target&&target.isIn()){ target.disableEquip(subtype); - var cards = target.getCards('he', card => get.type2(card) == type); - player.gain(cards, target, 'give'); - event.gainners = cards; + var cards=target.getCards('he',card=>get.type2(card)==type); + player.gain(cards,target,'give'); + event.gainners=cards; } - else { - var cards = []; - for (var i = 1; i <= 2; i++) { - var card = get.cardPile2(function (card) { - return !cards.includes(card) && get.type2(card) == type; + else{ + var cards=[]; + for(var i=1; i<=2; i++){ + var card=get.cardPile2(function(card){ + return !cards.includes(card)&&get.type2(card)==type; }); - if (card) cards.push(card); + if(card) cards.push(card); else break; } - player.gain(cards, 'gain2'); - event.gainners = cards; + player.gain(cards,'gain2'); + event.gainners=cards; } } 'step 2' - player.chooseTarget('请重新选择【随征】目标', true, function (card, player, target) { + player.chooseTarget('请重新选择【随征】目标',true,function(card,player,target){ return !player.getStorage('twsuizheng').includes(target); - }).set('ai', function (target) { - var player = _status.event.player; - return Math.max(1 + get.attitude(player, target) * get.threaten(target), Math.random()); + }).set('ai',function(target){ + var player=_status.event.player; + return Math.max(1+get.attitude(player,target)*get.threaten(target),Math.random()); }); 'step 3' - if (result.bool) { - var target = result.targets[0]; + if(result.bool){ + var target=result.targets[0]; player.line(target); - game.log(player, '选择了', target, '作为', '“随征”角色'); + game.log(player,'选择了',target,'作为','“随征”角色'); delete player.storage.twsuizheng - player.markAuto('twsuizheng', [target]); + player.markAuto('twsuizheng',[target]); } }, - ai: { combo: 'twsuizheng' }, + ai:{combo:'twsuizheng'}, }, //曹休 - twqianju: { - audio: 2, - trigger: { source: 'damageSource' }, - filter: function (event, player) { - return get.distance(player, event.player) <= 1 && player.countCards('e') < 5; + twqianju:{ + audio:2, + trigger:{source:'damageSource'}, + filter:function(event,player){ + return get.distance(player,event.player)<=1&&player.countCards('e')<5; }, - forced: true, - usable: 1, - content: function () { - var card = get.cardPile(function (card) { - return get.type(card) == 'equip' && player.canEquip(card); + forced:true, + usable:1, + content:function(){ + var card=get.cardPile(function(card){ + return get.type(card)=='equip'&&player.canEquip(card); }); - if (card) { + if(card){ player.$gain2(card); game.delayx(); player.equip(card); } }, - mod: { - globalFrom: function (from, to, distance) { - return distance - from.countCards('e'); + mod:{ + globalFrom:function(from,to,distance){ + return distance-from.countCards('e'); }, }, }, - twqingxi: { - audio: 'xinqingxi', - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - return event.card.name == 'sha' && player.getHistory('useCard', evt => evt.card.name == 'sha').indexOf(event.getParent()) == 0; + twqingxi:{ + audio:'xinqingxi', + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&player.getHistory('useCard',evt=>evt.card.name=='sha').indexOf(event.getParent())==0; }, - check: function (event, player) { + check:function(event,player){ return true; }, - logTarget: 'target', - content: function () { + logTarget:'target', + content:function(){ 'step 0' - var target = trigger.target; - event.target = target; - if (!target.countCards('e')) event._result = { index: 0 }; - else target.chooseControl().set('ai', function () { - if (_status.event.goon || player.hp > 2) return 0; + var target=trigger.target; + event.target=target; + if(!target.countCards('e')) event._result={index:0}; + else target.chooseControl().set('ai',function(){ + if(_status.event.goon||player.hp>2) return 0; return 1; - }).set('choiceList', [ - '令' + get.translation(player) + '摸' + get.cnNumber(Math.max(1, player.countCards('e'))) + '张牌,且此【杀】不可被响应', - '弃置装备区中的所有牌并弃置' + get.translation(player) + '装备区等量的牌,此【杀】造成的伤害+1' - ]).set('goon', get.attitude(target, player) > 0); + }).set('choiceList',[ + '令'+get.translation(player)+'摸'+get.cnNumber(Math.max(1,player.countCards('e')))+'张牌,且此【杀】不可被响应', + '弃置装备区中的所有牌并弃置'+get.translation(player)+'装备区等量的牌,此【杀】造成的伤害+1' + ]).set('goon',get.attitude(target,player)>0); 'step 1' - if (result.index == 0) { - player.draw(Math.max(1, player.countCards('e'))); + if(result.index==0){ + player.draw(Math.max(1,player.countCards('e'))); trigger.getParent().directHit.add(target); - game.log(trigger.card, '不可被', target, '响应'); + game.log(trigger.card,'不可被',target,'响应'); event.finish(); } - else { - var num = target.countCards('e'); + else{ + var num=target.countCards('e'); target.discard(target.getCards('e')); - target.discardPlayerCard(player, 'e', num, true); + target.discardPlayerCard(player,'e',num,true); } 'step 2' - var map = trigger.customArgs; - var id = target.playerid; - if (!map[id]) map[id] = {}; - if (!map[id].extraDamage) map[id].extraDamage = 0; + var map=trigger.customArgs; + var id=target.playerid; + if(!map[id]) map[id]={}; + if(!map[id].extraDamage) map[id].extraDamage=0; map[id].extraDamage++; - game.log(trigger.card, '对', target, '造成的伤害+1'); + game.log(trigger.card,'对',target,'造成的伤害+1'); game.delayx(); }, }, //孙翊 - twzaoli: { - audio: 'zaoli', - trigger: { player: 'phaseUseBegin' }, - init: function (player) { - if (player.isPhaseUsing()) { - var hs = player.getCards('h'); - player.getHistory('gain', function (evt) { + twzaoli:{ + audio:'zaoli', + trigger:{player:'phaseUseBegin'}, + init:function(player){ + if(player.isPhaseUsing()){ + var hs=player.getCards('h'); + player.getHistory('gain',function(evt){ hs.removeArray(evt.cards); }); - if (hs.length) player.addGaintag(hs, 'twzaoli'); + if(hs.length) player.addGaintag(hs,'twzaoli'); } }, - filter: function (event, player) { + filter:function(event,player){ return player.countCards('he'); }, - forced: true, - group: 'twzaoli_mark', - content: function () { + forced:true, + group:'twzaoli_mark', + content:function(){ 'step 0' - if (player.countCards('h', card => get.type(card) != 'equip')) { - player.chooseCard('h', [1, Infinity], true, '躁厉:请选择至少一张非装备手牌,你弃置这些牌和所有装备牌', (card, player) => { - return get.type(card) != 'equip' && lib.filter.cardDiscardable(card, player, 'twzaoli'); - }).set('ai', function (card) { - if (!card.hasGaintag('twzaoli_temp')) return 5 - get.value(card); + if(player.countCards('h',card=>get.type(card)!='equip')){ + player.chooseCard('h',[1,Infinity],true,'躁厉:请选择至少一张非装备手牌,你弃置这些牌和所有装备牌',(card,player)=>{ + return get.type(card)!='equip'&&lib.filter.cardDiscardable(card,player,'twzaoli'); + }).set('ai',function(card){ + if(!card.hasGaintag('twzaoli_temp')) return 5-get.value(card); return 1; }); } 'step 1' - var cards = player.getCards('he', { type: 'equip' }); - var subtype = []; - event.subtype = subtype.addArray(cards.map(card => get.subtype(card))); - cards.addArray(result.cards || []); - if (cards.length) player.discard(cards); - event.cards = cards; + var cards=player.getCards('he',{type:'equip'}); + var subtype=[]; + event.subtype=subtype.addArray(cards.map(card=>get.subtype(card))); + cards.addArray(result.cards||[]); + if(cards.length) player.discard(cards); + event.cards=cards; 'step 2' player.draw(cards.length); 'step 3' - var num = 0; - if (event.subtype.length) { - for (var i of event.subtype) { - var card = get.cardPile2(function (card) { - return get.type(card) == 'equip' && get.subtype(card) == i; + var num=0; + if(event.subtype.length){ + for(var i of event.subtype){ + var card=get.cardPile2(function(card){ + return get.type(card)=='equip'&&get.subtype(card)==i; }); - if (card) { + if(card){ num++; player.$gain2(card); game.delayx(); @@ -10364,35 +10364,35 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } } } - if (num <= 2) event.finish(); + if(num<=2) event.finish(); 'step 4' player.loseHp(); }, - onremove: function (player) { + onremove:function(player){ player.removeGaintag('twzaoli'); }, - mod: { - cardEnabled2: function (card, player) { - if (player.isPhaseUsing() && get.itemtype(card) == 'card' && card.hasGaintag('twzaoli')) return false; + mod:{ + cardEnabled2:function(card,player){ + if(player.isPhaseUsing()&&get.itemtype(card)=='card'&&card.hasGaintag('twzaoli')) return false; }, }, - subSkill: { - mark: { - trigger: { player: ['phaseUseBegin', 'phaseUseAfter', 'phaseAfter'] }, - filter: function (event, player) { + subSkill:{ + mark:{ + trigger:{player:['phaseUseBegin','phaseUseAfter','phaseAfter']}, + filter:function(event,player){ return player.countCards('h'); }, - direct: true, - firstDo: true, - content: function () { - if (event.triggername == 'phaseUseBegin') { - var hs = player.getCards('h'); - player.getHistory('gain', function (evt) { + direct:true, + firstDo:true, + content:function(){ + if(event.triggername=='phaseUseBegin'){ + var hs=player.getCards('h'); + player.getHistory('gain',function(evt){ hs.removeArray(evt.cards); }); - if (hs.length) player.addGaintag(hs, 'twzaoli'); + if(hs.length) player.addGaintag(hs,'twzaoli'); } - else { + else{ player.removeGaintag('twzaoli'); } }, @@ -10400,165 +10400,165 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //邓芝 - twjimeng: { - audio: 'jimeng', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.countGainableCards(player, 'he') > 0; + twjimeng:{ + audio:'jimeng', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countGainableCards(player,'he')>0; }) }, - filterTarget: function (card, player, target) { - return target != player && target.countGainableCards(player, 'hej') > 0; + filterTarget:function(card,player,target){ + return target!=player&&target.countGainableCards(player,'hej')>0; }, - content: function () { + content:function(){ 'step 0' - player.gainPlayerCard(target, 'hej', true); + player.gainPlayerCard(target,'hej',true); 'step 1' - var hs = player.getCards('he'); - if (hs.length) { - if (hs.length == 1) event._result = { bool: true, cards: hs }; - else player.chooseCard(true, '交给' + get.translation(target) + '一张牌', 'he', true); + var hs=player.getCards('he'); + if(hs.length){ + if(hs.length==1) event._result={bool:true,cards:hs}; + else player.chooseCard(true,'交给'+get.translation(target)+'一张牌','he',true); } else event.finish(); 'step 2' - player.give(result.cards, target); + player.give(result.cards,target); 'step 3' - if (target.hp >= player.hp) player.draw(); + if(target.hp>=player.hp) player.draw(); }, - ai: { - order: 8, - result: { - player: function (player, target) { - if (target.hp >= player.hp) return 1; + ai:{ + order:8, + result:{ + player:function(player,target){ + if(target.hp>=player.hp) return 1; return 0; }, - target: function (player, target) { - return get.effect(target, { name: 'shunshou' }, player, target) / 10; + target:function(player,target){ + return get.effect(target,{name:'shunshou'},player,target)/10; } } } }, //杨仪 - twgongsun: { - audio: 'gongsun', - trigger: { player: 'phaseUseBegin' }, - forced: true, - direct: true, - filter: function (event, player) { - return game.hasPlayer(current => player.inRange(current)); + twgongsun:{ + audio:'gongsun', + trigger:{player:'phaseUseBegin'}, + forced:true, + direct:true, + filter:function(event,player){ + return game.hasPlayer(current=>player.inRange(current)); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget('共损:请选择一名攻击范围内的角色', lib.translate.twgongsun_info, true, function (card, player, target) { - return player != target && player.inRange(target); - }).set('ai', function (target) { - return -get.attitude(_status.event.player, target) * (1 + target.countCards('h')); + player.chooseTarget('共损:请选择一名攻击范围内的角色',lib.translate.twgongsun_info,true,function(card,player,target){ + return player!=target&&player.inRange(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)*(1+target.countCards('h')); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twgongsun', target); - player.addTempSkill('twgongsun_shadow', { player: ['phaseBegin', 'die'] }); - player.chooseControl(lib.suit).set('prompt', '共损:请选择一个花色').set('ai', function (button) { + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twgongsun',target); + player.addTempSkill('twgongsun_shadow',{player:['phaseBegin','die']}); + player.chooseControl(lib.suit).set('prompt','共损:请选择一个花色').set('ai',function(button){ return lib.suit.randomGet(); }); } else event.finish(); 'step 2' - var suit = result.control; - player.popup(suit + 2, 'soil'); - game.log(player, '选择了', suit + 2); - player.storage.twgongsun_shadow.push([target, suit]); + var suit=result.control; + player.popup(suit+2,'soil'); + game.log(player,'选择了',suit+2); + player.storage.twgongsun_shadow.push([target,suit]); player.markSkill('twgongsun_shadow'); }, }, - twgongsun_shadow: { - global: 'twgongsun_shadow2', - init: function (player, skill) { - if (!player.storage[skill]) player.storage[skill] = []; + twgongsun_shadow:{ + global:'twgongsun_shadow2', + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; }, - marktext: '损', - onremove: true, - intro: { - content: function (shadow) { - var str = ''; - for (var i = 0; i < shadow.length; i++) { - if (i > 0) str += '
    ' - str += get.translation(shadow[i][0]); - str += ':'; - str += get.translation(shadow[i][1]); + marktext:'损', + onremove:true, + intro:{ + content:function(shadow){ + var str=''; + 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.twgongsun_shadow; - for (var i = 0; i < list.length; i++) { - if (list[i][1] == card.suit) return false; + mod:{ + cardEnabled:function(card,player){ + var list=player.storage.twgongsun_shadow; + for(var i=0;i Math.random() <= 0.5 ? 0 : 1); + ]).set('ai',()=>Math.random()<=0.5?0:1); 'step 1' - player.addSkill('twzhengjian_eff' + result.index); - game.log(player, '获得了', '#g【征建】', '的', '#y效果' + get.cnNumber(result.index + 1, true)); + player.addSkill('twzhengjian_eff'+result.index); + game.log(player,'获得了','#g【征建】','的','#y效果'+get.cnNumber(result.index+1,true)); game.delayx(); }, - onremove: true, - subSkill: { - eff0: { - audio: 'twzhengjian', - trigger: { global: 'phaseUseEnd' }, - forced: true, - charlotte: true, - marktext: '建', - mark: true, - filter: function (event, player) { - if (event.player == player || event._twzhengjian || !event.player.isIn()) return false; - if (event.player.hasHistory('useCard', function (evt) { - return evt.getParent('phaseUse') == event && get.type(evt.card) != 'basic'; + onremove:true, + subSkill:{ + eff0:{ + audio:'twzhengjian', + trigger:{global:'phaseUseEnd'}, + forced:true, + charlotte:true, + marktext:'建', + mark:true, + filter:function(event,player){ + if(event.player==player||event._twzhengjian||!event.player.isIn()) return false; + if(event.player.hasHistory('useCard',function(evt){ + return evt.getParent('phaseUse')==event&&get.type(evt.card)!='basic'; })) return false; - return player.storage.twzhengjian || event.player.countCards('he') > 0; + return player.storage.twzhengjian||event.player.countCards('he')>0; }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' - trigger._twzhengjian = true; - var target = trigger.player; - event.target = target; - if (player.storage.twzhengjian) { - player.chooseBool('征建:是否对' + get.translation(target) + '造成1点伤害?').set('ai', () => _status.event.goon).set('goon', get.damageEffect(target, player, _status.event.player) > 0); + trigger._twzhengjian=true; + var target=trigger.player; + event.target=target; + if(player.storage.twzhengjian){ + player.chooseBool('征建:是否对'+get.translation(target)+'造成1点伤害?').set('ai',()=>_status.event.goon).set('goon',get.damageEffect(target,player,_status.event.player)>0); } - else { - target.chooseCard('he', true, '交给' + get.translation(player) + '一张牌'); + else{ + target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); } 'step 1' - if (result.bool) { - if (result.cards && result.cards.length) { - target.give(result.cards, player).type = 'twzhengjian'; + if(result.bool){ + if(result.cards&&result.cards.length){ + target.give(result.cards,player).type='twzhengjian'; } else target.damage(); } - player.chooseBool('是否变更【征建】的效果?').set('ai', () => Math.random() > 0.5); + player.chooseBool('是否变更【征建】的效果?').set('ai',()=>Math.random()>0.5); 'step 2' - if (result.bool) { + if(result.bool){ player.removeSkill('twzhengjian_eff0'); player.addSkill('twzhengjian_eff1'); - game.log(player, '将', '#g【征建】', '的效果变更为', '#y效果二'); + game.log(player,'将','#g【征建】','的效果变更为','#y效果二'); } }, - intro: { - content: function (storage, player) { - if (player.storage.twzhengjian) return '其他角色的出牌阶段结束时,若其本阶段内未使用过非基本牌,则你可对其造成1点伤害,然后你可失去此效果并获得〖征建〗的效果二。'; + intro:{ + content:function(storage,player){ + if(player.storage.twzhengjian) return '其他角色的出牌阶段结束时,若其本阶段内未使用过非基本牌,则你可对其造成1点伤害,然后你可失去此效果并获得〖征建〗的效果二。'; return '其他角色的出牌阶段结束时,若其本阶段内未使用过非基本牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果二。'; }, }, }, - eff1: { - audio: 'twzhengjian', - trigger: { global: 'phaseUseEnd' }, - forced: true, - charlotte: true, - marktext: '征', - mark: true, - filter: function (event, player) { - if (event.player == player || event._twzhengjian || !event.player.isIn()) return false; - if (event.player.hasHistory('gain', function (evt) { - return evt.getParent('phaseUse') == event; + eff1:{ + audio:'twzhengjian', + trigger:{global:'phaseUseEnd'}, + forced:true, + charlotte:true, + marktext:'征', + mark:true, + filter:function(event,player){ + if(event.player==player||event._twzhengjian||!event.player.isIn()) return false; + if(event.player.hasHistory('gain',function(evt){ + return evt.getParent('phaseUse')==event; })) return false; - return player.storage.twzhengjian || event.player.countCards('he') > 0; + return player.storage.twzhengjian||event.player.countCards('he')>0; }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' - trigger._twzhengjian = true; - var target = trigger.player; - event.target = target; - if (player.storage.twzhengjian) { - player.chooseBool('征建:是否对' + get.translation(target) + '造成1点伤害?').set('ai', () => _status.event.goon).set('goon', get.damageEffect(target, player, _status.event.player) > 0); + trigger._twzhengjian=true; + var target=trigger.player; + event.target=target; + if(player.storage.twzhengjian){ + player.chooseBool('征建:是否对'+get.translation(target)+'造成1点伤害?').set('ai',()=>_status.event.goon).set('goon',get.damageEffect(target,player,_status.event.player)>0); } - else { - target.chooseCard('he', true, '交给' + get.translation(player) + '一张牌'); + else{ + target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); } 'step 1' - if (result.bool) { - if (result.cards && result.cards.length) { - target.give(result.cards, player).type = 'twzhengjian'; + if(result.bool){ + if(result.cards&&result.cards.length){ + target.give(result.cards,player).type='twzhengjian'; } else target.damage(); } - player.chooseBool('是否变更【征建】的效果?').set('ai', () => Math.random() > 0.5); + player.chooseBool('是否变更【征建】的效果?').set('ai',()=>Math.random()>0.5); 'step 2' - if (result.bool) { + if(result.bool){ player.removeSkill('twzhengjian_eff1'); player.addSkill('twzhengjian_eff0'); - game.log(player, '将', '#g【征建】', '的效果变更为', '#y效果一'); + game.log(player,'将','#g【征建】','的效果变更为','#y效果一'); } }, - intro: { - content: function (storage, player) { - if (player.storage.twzhengjian) return '其他角色的出牌阶段结束时,若其本阶段内未得到过牌,则你可对其造成1点伤害,然后你可失去此效果并获得〖征建〗的效果一。'; + intro:{ + content:function(storage,player){ + if(player.storage.twzhengjian) return '其他角色的出牌阶段结束时,若其本阶段内未得到过牌,则你可对其造成1点伤害,然后你可失去此效果并获得〖征建〗的效果一。'; return '其他角色的出牌阶段结束时,若其本阶段内未得到过牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果一。'; }, }, }, }, }, - twzhongchi: { - audio: 2, - trigger: { - player: 'gainAfter', - global: 'loseAsyncAfter', + twzhongchi:{ + audio:2, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', }, - forced: true, - skillAnimation: true, - animationColor: 'wood', - filter: function (event, player) { - if (player.storage.twzhengjian || !player.hasSkill('twzhengjian', null, null, false) || !event.getg(player).length) return false; - var num1 = game.countPlayer2(); - var list = []; - player.getAllHistory('gain', function (evt) { - if (evt.type == 'twzhengjian') list.add(evt.source); + forced:true, + skillAnimation:true, + animationColor:'wood', + filter:function(event,player){ + if(player.storage.twzhengjian||!player.hasSkill('twzhengjian',null,null,false)||!event.getg(player).length) return false; + var num1=game.countPlayer2(); + var list=[]; + player.getAllHistory('gain',function(evt){ + if(evt.type=='twzhengjian') list.add(evt.source); }); - return list.length >= Math.ceil(num1 / 2); + return list.length>=Math.ceil(num1/2); }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twzhongchi'); 'step 1' player.recover(2); player.addSkill('twzhongchi_effect'); - player.storage.twzhengjian = true; + player.storage.twzhengjian=true; 'step 2' game.delayx(); }, - subSkill: { - effect: { - mark: true, - marktext: '斥', - intro: { content: '受到渠道为【杀】的伤害+1' }, - trigger: { player: 'damageBegin1' }, - forced: true, - filter: function (event, player) { - return event.card && event.card.name == 'sha'; + subSkill:{ + effect:{ + mark:true, + marktext:'斥', + intro:{content:'受到渠道为【杀】的伤害+1'}, + trigger:{player:'damageBegin1'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; }, - content: function () { + content:function(){ trigger.num++; }, }, }, }, //田豫 - twzhenxi: { - audio: 2, - trigger: { player: 'useCardToPlayered' }, - direct: true, - filter: function (event, player) { - var target = event.target; - return event.card.name == 'sha' && (target.countCards('h') > 0 || target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canEquip(card); + twzhenxi:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + var target=event.target; + return event.card.name=='sha'&&(target.countCards('h')>0||target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canEquip(card); }) - }, 'e') || target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canAddJudge(card); + },'e')||target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canAddJudge(card); }) - }, 'j')); + },'j')); }, - usable: 1, - content: function () { + usable:1, + content:function(){ 'step 0' - var target = trigger.target; - event.target = target; - var str = get.translation(target); - var list = [ - '弃置' + str + '的' + get.cnNumber(get.distance(player, target)) + '张手牌', - '将' + str + '装备区或判定区内的一张牌移动到另一名角色的对应区域内', + var target=trigger.target; + event.target=target; + var str=get.translation(target); + var list=[ + '弃置'+str+'的'+get.cnNumber(get.distance(player,target))+'张手牌', + '将'+str+'装备区或判定区内的一张牌移动到另一名角色的对应区域内', ]; - var choices = []; - if (target.countCards('h') > 0) choices.push('选项一'); - else list[0] = '' + list[0] + ''; - if (target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canEquip(card); + var choices=[]; + if(target.countCards('h')>0) choices.push('选项一'); + else list[0]=''+list[0]+''; + if(target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canEquip(card); }) - }, 'e') || target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canAddJudge(card); + },'e')||target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canAddJudge(card); }) - }, 'j')) choices.push('选项二'); - else list[1] = '' + list[1] + ''; - if (choices.length == 2 && (target.hp > player.hp || target.isMaxHp())) choices.push('全部执行'); + },'j')) choices.push('选项二'); + else list[1]=''+list[1]+''; + if(choices.length==2&&(target.hp>player.hp||target.isMaxHp())) choices.push('全部执行'); choices.push('cancel2'); - player.chooseControl(choices).set('choiceList', list).set('prompt', get.prompt('twzhenxi', target)).set('ai', function () { - var player = _status.event.player, target = _status.event.getTrigger().target; - var eff1 = 0, eff2 = 0; - var choices = _status.event.controls.slice(0); - if (choices.includes('选项一')) { - eff1 = -get.distance(player, target) * get.attitude(player, target); + player.chooseControl(choices).set('choiceList',list).set('prompt',get.prompt('twzhenxi',target)).set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().target; + var eff1=0,eff2=0; + var choices=_status.event.controls.slice(0); + if(choices.includes('选项一')){ + eff1=-get.distance(player,target)*get.attitude(player,target); } - if (choices.includes('选项二')) { - var equip = 0, judge = 0, att = get.attitude(player, target); - var es = target.getCards('e'), js = target.getCards('j'); - for (var i of es) { - var val = get.value(i); - if (att > 0) { - if (val <= Math.min(0, equip) && game.hasPlayer(function (current) { - return current != target && current.canEquip(i) && get.effect(current, i, player, player) > 0; - })) equip = val; + if(choices.includes('选项二')){ + var equip=0,judge=0,att=get.attitude(player,target); + var es=target.getCards('e'),js=target.getCards('j'); + for(var i of es){ + var val=get.value(i); + if(att>0){ + if(val<=Math.min(0,equip)&&game.hasPlayer(function(current){ + return current!=target&¤t.canEquip(i)&&get.effect(current,i,player,player)>0; + })) equip=val; } - else { - if (val > Math.max(0, equip) && game.hasPlayer(function (current) { - return current != target && current.canEquip(i) && get.effect(current, i, player, player) > 0; - })) equip = val; + else{ + if(val>Math.max(0,equip)&&game.hasPlayer(function(current){ + return current!=target&¤t.canEquip(i)&&get.effect(current,i,player,player)>0; + })) equip=val; } } - for (var i of js) { - var card = { name: i.viewAs || i.name }; - var effect = get.effect(target, card, player, player); - if (effect < 0) { - game.countPlayer(function (current) { - if (current != target && current.canAddJudge(i)) { - var eff = get.effect(current, card, player, player); - judge = Math.max(eff, judge); + for(var i of js){ + var card={name:i.viewAs||i.name}; + var effect=get.effect(target,card,player,player); + if(effect<0){ + game.countPlayer(function(current){ + if(current!=target&¤t.canAddJudge(i)){ + var eff=get.effect(current,card,player,player); + judge=Math.max(eff,judge); } }); } } - eff2 = Math.max(-equip * att, judge); + eff2=Math.max(-equip*att,judge); } - if (eff1 > 0) { - if (eff2 > 0) { - if (choices.includes('全部执行')) return '全部执行'; - else if (eff2 >= eff1) return '选项二'; + if(eff1>0){ + if(eff2>0){ + if(choices.includes('全部执行')) return '全部执行'; + else if(eff2>=eff1) return '选项二'; } return '选项一'; } - else if (eff2 > 0) return '选项二'; + else if(eff2>0) return '选项二'; return 'cancel2'; }); 'step 1' - if (result.control == 'cancel2') { + if(result.control=='cancel2'){ event.finish(); return; } - player.logSkill('twzhenxi', target); - event.control = result.control; - if (event.control != '选项二') player.discardPlayerCard(target, true, 'h', get.distance(player, target)); - if (event.control == '选项一') event.finish(); + player.logSkill('twzhenxi',target); + event.control=result.control; + if(event.control!='选项二') player.discardPlayerCard(target,true,'h',get.distance(player,target)); + if(event.control=='选项一') event.finish(); 'step 2' - if (event.control != '选项一' && (target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canEquip(card); + if(event.control!='选项一'&&(target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canEquip(card); }) - }, 'e') || target.hasCard(function (card) { - return game.hasPlayer(function (current) { - return current != target && current.canAddJudge(card); + },'e')||target.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=target&¤t.canAddJudge(card); }) - }, 'j'))) { - player.chooseTarget(true, '将' + get.translation(target) + '区域内的一张牌移动给另一名角色', function (card, player, target) { - var source = _status.event.preTarget; - if (source == target) return false; - return source.hasCard(function (card) { + },'j'))){ + player.chooseTarget(true,'将'+get.translation(target)+'区域内的一张牌移动给另一名角色',function(card,player,target){ + var source=_status.event.preTarget; + if(source==target) return false; + return source.hasCard(function(card){ return target.canEquip(card); - }, 'e') || source.hasCard(function (card) { + },'e')||source.hasCard(function(card){ return target.canAddJudge(card); - }, 'j'); - }).set('preTarget', target).set('ai', function (target) { - var player = _status.event.player, source = _status.event.preTarget; - var att = get.attitude(player, source); - var es = source.getCards('e', function (card) { + },'j'); + }).set('preTarget',target).set('ai',function(target){ + var player=_status.event.player,source=_status.event.preTarget; + var att=get.attitude(player,source); + var es=source.getCards('e',function(card){ return target.canEquip(card); - }), js = source.getCards('j', function (card) { + }),js=source.getCards('j',function(card){ return target.canAddJudge(card); }); - var eff = 0; - for (var i of es) { - var val = get.value(i, source); - if (att > 0 ? val <= 0 : val > 0) { - eff = Math.max(eff, get.effect(target, i, player, player)); + var eff=0; + for(var i of es){ + var val=get.value(i,source); + if(att>0?val<=0:val>0){ + eff=Math.max(eff,get.effect(target,i,player,player)); } } - for (var i of js) { - var card = { name: i.viewAs || i.name }; - if (get.effect(source, card, player, player) < 0) { - eff = Math.max(eff, get.effect(target, card, player, player)); + for(var i of js){ + var card={name:i.viewAs||i.name}; + if(get.effect(source,card,player,player)<0){ + eff=Math.max(eff,get.effect(target,card,player,player)); } } return eff; @@ -10875,188 +10875,188 @@ game.import('character', function (lib, game, ui, get, ai, _status) { } else event.finish(); 'step 3' - if (result.bool) { - var target2 = result.targets[0]; - event.target2 = target2; - player.choosePlayerCard('ej', true, function (button) { - var player = _status.event.player; - var targets0 = _status.event.targets0; - var targets1 = _status.event.targets1; - if (get.attitude(player, targets0) > 0 && get.attitude(player, targets1) < 0) { - if (get.position(button.link) == 'j') return 12; - if (get.value(button.link, targets0) < 0 && get.effect(targets1, button.link, player, targets1) > 0) return 10; + if(result.bool){ + var target2=result.targets[0]; + event.target2=target2; + player.choosePlayerCard('ej',true,function(button){ + var player=_status.event.player; + var targets0=_status.event.targets0; + var targets1=_status.event.targets1; + if(get.attitude(player,targets0)>0&&get.attitude(player,targets1)<0){ + if(get.position(button.link)=='j') return 12; + if(get.value(button.link,targets0)<0&&get.effect(targets1,button.link,player,targets1)>0) return 10; return 0; } - else { - if (get.position(button.link) == 'j') return -10; - return get.value(button.link) * get.effect(targets1, button.link, player, targets1); + else{ + if(get.position(button.link)=='j') return -10; + return get.value(button.link)*get.effect(targets1,button.link,player,targets1); } - }, target).set('targets0', target).set('targets1', target2).set('filterButton', function (button) { - var targets1 = _status.event.targets1; - if (get.position(button.link) == 'j') { + },target).set('targets0',target).set('targets1',target2).set('filterButton',function(button){ + var targets1=_status.event.targets1; + if(get.position(button.link)=='j'){ return targets1.canAddJudge(button.link); } - else { + else{ return targets1.canEquip(button.link); } - }).set('ai', function (button) { - var player = _status.event.player, target = _status.event.targets1, source = _status.event.targets0; - var att = get.attitude(player, source); - var card = button.link; - if (get.position(card) == 'e') { - var val = get.value(card); - if (att > 0 ? val > 0 : val <= 0) return 0; - return get.effect(target, card, player, player); + }).set('ai',function(button){ + var player=_status.event.player,target=_status.event.targets1,source=_status.event.targets0; + var att=get.attitude(player,source); + var card=button.link; + if(get.position(card)=='e'){ + var val=get.value(card); + if(att>0?val>0:val<=0) return 0; + return get.effect(target,card,player,player); } - var cardx = { name: card.viewAs || card.name }; - if (get.effect(source, cardx, player, player) >= 0) return 0; - return get.effect(target, cardx, player, player) + var cardx={name:card.viewAs||card.name}; + if(get.effect(source,cardx,player,player)>=0) return 0; + return get.effect(target,cardx,player,player) }); } - else { + else{ event.finish(); } 'step 4' - if (result.bool && result.links.length) { - var link = result.links[0]; - if (get.position(link) == 'e') { + if(result.bool&&result.links.length){ + var link=result.links[0]; + if(get.position(link)=='e'){ event.target2.equip(link); } - else if (link.viewAs) { - event.target2.addJudge({ name: link.viewAs }, [link]); + else if(link.viewAs){ + event.target2.addJudge({name:link.viewAs},[link]); } - else { + else{ event.target2.addJudge(link); } - target.$give(link, event.target2, false); - game.log(target, '的', link, '被移动给了', event.target2); + target.$give(link,event.target2,false); + game.log(target,'的',link,'被移动给了',event.target2); game.delay(); } }, - ai: { - unequip_ai: true, - skillTagFilter: function (player, tag, arg) { - if (!arg || !arg.name || arg.name != 'sha') return false; - if (player.storage.counttrigger && player.storage.counttrigger.twzhenxi) return false; - if (!arg.target) return false; - var card = arg.target.getEquip(2); - return card && get.value(card) > 0 && game.hasPlayer(function (current) { - return current != arg.target && current.canEquip(card) && get.effect(current, card, player, player) > 0; + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(!arg||!arg.name||arg.name!='sha') return false; + if(player.storage.counttrigger&&player.storage.counttrigger.twzhenxi) return false; + if(!arg.target) return false; + var card=arg.target.getEquip(2); + return card&&get.value(card)>0&&game.hasPlayer(function(current){ + return current!=arg.target&¤t.canEquip(card)&&get.effect(current,card,player,player)>0; }) }, }, }, - twyangshi: { - audio: 2, - trigger: { player: 'damageEnd' }, - forced: true, - content: function () { - if (game.hasPlayer(function (current) { - return current != player && !player.inRange(current); - })) { + twyangshi:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + content:function(){ + if(game.hasPlayer(function(current){ + return current!=player&&!player.inRange(current); + })){ player.addSkill('twyangshi_distance'); - player.addMark('twyangshi_distance', 1, false); + player.addMark('twyangshi_distance',1,false); } - else { - var card = get.cardPile2(function (card) { - return card.name == 'sha'; + else{ + var card=get.cardPile2(function(card){ + return card.name=='sha'; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); else game.log('但是牌堆里已经没有杀了!'); } }, - subSkill: { - distance: { - charlotte: true, - onremove: true, - mod: { - attackRange: function (player, num) { - return num + player.countMark('twyangshi_distance'); + subSkill:{ + distance:{ + charlotte:true, + onremove:true, + mod:{ + attackRange:function(player,num){ + return num+player.countMark('twyangshi_distance'); }, }, - intro: { - content: '攻击范围+#', + intro:{ + content:'攻击范围+#', }, }, }, }, //全琮 - zhenshan: { - audio: 2, - enable: ['chooseToUse', 'chooseToRespond'], - filter: function (event, player) { - if (event.type == 'wuxie' || player.hasSkill('zhenshan_used')) return false; - var nh = player.countCards('h'); - if (!game.hasPlayer(function (current) { - return current != player && current.countCards('h') < nh; - })) { + zhenshan:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + filter:function(event,player){ + if(event.type=='wuxie'||player.hasSkill('zhenshan_used')) return false; + var nh=player.countCards('h'); + if(!game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h') 0; - })) { - if (card.name == 'sha') { - var eff = player.getUseValue(card); - if (eff > 0) return 2.9 + eff / 10; + check:function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(card.name=='jiu') return 0; + if(game.hasPlayer(function(current){ + return get.effect(current,card,player,player)>0; + })){ + if(card.name=='sha'){ + var eff=player.getUseValue(card); + if(eff>0) return 2.9+eff/10; return 0; } - else if (card.name == 'tao' || card.name == 'shan') { + else if(card.name=='tao'||card.name=='shan'){ return 4; } } return 0; }, - backup: function (links, player) { + backup:function(links,player){ return { - filterCard: function () { return false }, - viewAs: { - name: links[0][2], - nature: links[0][3], - isCard: true, + filterCard:function(){return false}, + viewAs:{ + name:links[0][2], + nature:links[0][3], + isCard:true, }, - selectCard: -1, - precontent: function () { + selectCard:-1, + precontent:function(){ 'step 0' - player.chooseTarget('选择一名手牌数小于你的角色交换手牌', function (card, player, target) { - return target != player && target.countCards('h') < player.countCards('h') - }, true).set('ai', function (target) { - return get.attitude(player, target) * Math.sqrt(target.countCards('h') + 1); + player.chooseTarget('选择一名手牌数小于你的角色交换手牌',function(card,player,target){ + return target!=player&&target.countCards('h') 0 && current.countCards('h') < nh; - })) { - if (event.type == 'dying') { - if (event.filterCard({ name: 'tao' }, player, event)) { + ai:{ + order:function(){ + var player=_status.event.player; + var event=_status.event; + var nh=player.countCards('h'); + if(game.hasPlayer(function(current){ + return get.attitude(player,current)>0&¤t.countCards('h') 0 && (event.card.name == 'sha' || get.type(event.card, false) == 'trick' && get.tag(event.card, 'damage') > 0); + twfenghan:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + direct:true, + usable:1, + filter:function(event,player){ + return event.isFirstTarget&&event.targets.length>0&&(event.card.name=='sha'||get.type(event.card,false)=='trick'&&get.tag(event.card,'damage')>0); }, - content: function () { + content:function(){ 'step 0' - var num = trigger.targets.length; - player.chooseTarget([1, num], get.prompt('twfenghan'), '令至多' + get.cnNumber(num) + '名角色各摸一张牌').set('ai', function (target) { - return Math.sqrt(5 - Math.min(4, target.countCards('h'))) * get.attitude(_status.event.player, target) * (target.hasSkillTag('nogain') ? 0.1 : 1); + var num=trigger.targets.length; + player.chooseTarget([1,num],get.prompt('twfenghan'),'令至多'+get.cnNumber(num)+'名角色各摸一张牌').set('ai',function(target){ + return Math.sqrt(5-Math.min(4,target.countCards('h')))*get.attitude(_status.event.player,target)*(target.hasSkillTag('nogain')?0.1:1); }); 'step 1' - if (result.bool) { - var targets = result.targets.sortBySeat(); - player.logSkill('twfenghan', targets); - if (targets.length > 1) game.asyncDraw(targets); - else { + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.logSkill('twfenghan',targets); + if(targets.length>1) game.asyncDraw(targets); + else{ targets[0].draw(); event.finish(); } } - else { + else{ player.storage.counttrigger.twfenghan--; event.finish(); } @@ -11153,728 +11153,728 @@ game.import('character', function (lib, game, ui, get, ai, _status) { game.delayx(); }, }, - twcongji: { - audio: 2, - trigger: { - player: 'loseAfter', - global: 'loseAsyncAfter', + twcongji:{ + audio:2, + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', }, - direct: true, - filter: function (event, player) { - if (player == _status.currentPhase || event.type != 'discard' || event.getlx === false || !game.hasPlayer((current) => current != player)) return false; - var evt = event.getl(player); - for (var i of evt.cards2) { - if (get.color(i, player) == 'red' && get.position(i, true) == 'd') return true; + direct:true, + filter:function(event,player){ + if(player==_status.currentPhase||event.type!='discard'||event.getlx===false||!game.hasPlayer((current)=>current!=player)) return false; + var evt=event.getl(player); + for(var i of evt.cards2){ + if(get.color(i,player)=='red'&&get.position(i,true)=='d') return true; } return false; }, - content: function () { + content:function(){ 'step 0' - var cards = [], cards2 = trigger.getl(player).cards2; - for (var i of cards2) { - if (get.color(i, player) == 'red' && get.position(i, true) == 'd') cards.push(i); + var cards=[],cards2=trigger.getl(player).cards2; + for(var i of cards2){ + if(get.color(i,player)=='red'&&get.position(i,true)=='d') cards.push(i); } - player.chooseButton(['从击:选择任意张牌交给其他角色', cards], [1, cards.length]).set('goon', game.hasPlayer(function (current) { - return current != player && get.attitude(player, current) > 0; - })).set('ai', function (button) { - if (_status.event.goon) return get.value(button.link); - return button.link.name == 'du' ? 1 : 0; + player.chooseButton(['从击:选择任意张牌交给其他角色',cards],[1,cards.length]).set('goon',game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })).set('ai',function(button){ + if(_status.event.goon) return get.value(button.link); + return button.link.name=='du'?1:0; }); 'step 1' - if (result.bool) { - event.cards = result.links; - player.chooseTarget('选择一名角色获得以下牌:', get.translation(cards), true, lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player, cards = _status.event.getParent().cards; - if (cards[0].name == 'du') return -get.attitude(player, target); - var att = get.attitude(player, target); - if (att <= 0) return 0; - if (target.hasSkillTag('nogain')) att /= 10; - if (target.hasJudge('lebu')) att /= 4; - return get.value(cards, target) * att; + if(result.bool){ + event.cards=result.links; + player.chooseTarget('选择一名角色获得以下牌:',get.translation(cards),true,lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player,cards=_status.event.getParent().cards; + if(cards[0].name=='du') return -get.attitude(player,target); + var att=get.attitude(player,target); + if(att<=0) return 0; + if(target.hasSkillTag('nogain')) att/=10; + if(target.hasJudge('lebu')) att/=4; + return get.value(cards,target)*att; }); } else event.finish(); 'step 2' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twcongji', target); - target.gain(cards, 'gain2'); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twcongji',target); + target.gain(cards,'gain2'); } }, }, //王粲 - twdianyi: { - audio: 2, - trigger: { player: 'phaseEnd' }, - forced: true, - filter: function (event, player) { - if (!player.getHistory('sourceDamage').length) return player.countCards('h') != 4; - return player.countCards('h') > 0; + twdianyi:{ + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + if(!player.getHistory('sourceDamage').length) return player.countCards('h')!=4; + return player.countCards('h')>0; }, - content: function () { - var num = player.countCards('h'); - if (player.getHistory('sourceDamage').length) player.chooseToDiscard('h', true, num); - else if (num > 4) player.chooseToDiscard('h', true, num - 4); + content:function(){ + var num=player.countCards('h'); + if(player.getHistory('sourceDamage').length) player.chooseToDiscard('h',true,num); + else if(num>4) player.chooseToDiscard('h',true,num-4); else player.drawTo(4); }, }, - twyingji: { - audio: 2, - enable: ['chooseToUse', 'chooseToRespond'], - hiddenCard: function (player, name) { - return player != _status.currentPhase && lib.inpile.includes(name) && player.countCards('h') == 0; + twyingji:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + return player!=_status.currentPhase&&lib.inpile.includes(name)&&player.countCards('h')==0; }, - filter: function (event, player) { - if (player == _status.currentPhase || player.countCards('h') > 0) return false; - for (var i of lib.inpile) { - if (i == 'wuxie') continue; - var type = get.type(i); - if ((type == 'basic' || type == 'trick') && event.filterCard({ name: i }, player, event)) return true; - if (i == 'sha') { - for (var j of lib.inpile_nature) { - if (event.filterCard({ name: i, nature: j }, player, event)) return true; + filter:function(event,player){ + if(player==_status.currentPhase||player.countCards('h')>0) return false; + for(var i of lib.inpile){ + if(i=='wuxie') continue; + var type=get.type(i); + if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; + if(i=='sha'){ + for(var j of lib.inpile_nature){ + if(event.filterCard({name:i,nature:j},player,event)) return true; } } } return false; }, - chooseButton: { - dialog: function (event, player) { - var list = []; - for (var i of lib.inpile) { - if (i == 'wuxie') continue; - var type = get.type(i); - if (type == 'basic' || type == 'trick') { - var card = { name: i, isCard: true }; - if (event.filterCard(card, player, event)) list.push([type, '', i]); - if (i == 'sha') { - for (var j of lib.inpile_nature) { - card.nature = j; - if (event.filterCard(card, player, event)) list.push(['基本', '', 'sha', j]); + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i of lib.inpile){ + if(i=='wuxie') continue; + var type=get.type(i); + if(type=='basic'||type=='trick'){ + var card={name:i,isCard:true}; + if(event.filterCard(card,player,event)) list.push([type,'',i]); + if(i=='sha'){ + for(var j of lib.inpile_nature){ + card.nature=j; + if(event.filterCard(card,player,event)) list.push(['基本','','sha',j]); } } } } - return ui.create.dialog('应机', [list, 'vcard']); + return ui.create.dialog('应机',[list,'vcard']); }, - check: function (button) { - var player = _status.event.player; - var card = { name: button.link[2], nature: button.link[3] }; - var val = _status.event.getParent().type == 'phase' ? player.getUseValue(card) : 1; + check:function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + var val=_status.event.getParent().type=='phase'?player.getUseValue(card):1; return val; }, - backup: function (links, player) { + backup:function(links,player){ return { - viewAs: { - name: links[0][2], - nature: links[0][3], - isCard: true, + viewAs:{ + name:links[0][2], + nature:links[0][3], + isCard:true, }, - filterCard: () => false, - selectCard: -1, - precontent: function () { + filterCard:()=>false, + selectCard:-1, + precontent:function(){ player.logSkill('twyingji'); player.draw('nodelay'); delete event.result.skill; }, } }, - prompt: function (links) { - return '将一张手牌当做' + (get.translation(links[0][3]) || '') + get.translation(links[0][2]) + '使用'; + prompt:function(links){ + return '将一张手牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; }, }, - ai: { - fireAttack: true, - respondShan: true, - respondSha: true, - skillTagFilter: function (player) { - if (player == _status.currentPhase || player.countCards('h') > 0) return false; + ai:{ + fireAttack:true, + respondShan:true, + respondSha:true, + skillTagFilter:function(player){ + if(player==_status.currentPhase||player.countCards('h')>0) return false; }, - order: 10, - result: { - player: function (player) { - if (_status.event.dying) return get.attitude(player, _status.event.dying) > 0; + order:10, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying)>0; return 1; }, }, }, - group: ['twyingji_wuxie'], + group:['twyingji_wuxie'], }, - twyingji_wuxie: { - enable: 'chooseToUse', - viewAs: { - name: 'wuxie', - isCard: true, + twyingji_wuxie:{ + enable:'chooseToUse', + viewAs:{ + name:'wuxie', + isCard:true, }, - viewAsFilter: function (player) { - return player != _status.currentPhase && player.countCards('h') == 0; + viewAsFilter:function(player){ + return player!=_status.currentPhase&&player.countCards('h')==0; }, - filterCard: () => false, - prompt: '视为使用【无懈可击】并摸一张牌', - selectCard: [0, 1], - check: () => 1, - precontent: function () { + filterCard:()=>false, + prompt:'视为使用【无懈可击】并摸一张牌', + selectCard:[0,1], + check:()=>1, + precontent:function(){ player.logSkill('twyingji'); player.draw('nodelay'); delete event.result.skill; }, - ai: { - order: 4, + ai:{ + order:4, }, }, - twshanghe: { - trigger: { player: 'dying' }, - limited: true, - audio: 2, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current != player && current.countCards('he') > 0; + twshanghe:{ + trigger:{player:'dying'}, + limited:true, + audio:2, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he')>0; }) }, - prompt: '是否发动【觞贺】?', - skillAnimation: true, - animationColor: 'soil', - logTarget: (event, player) => game.filterPlayer((current) => current != player), - content: function () { + prompt:'是否发动【觞贺】?', + skillAnimation:true, + animationColor:'soil', + logTarget:(event,player)=>game.filterPlayer((current)=>current!=player), + content:function(){ "step 0" player.awakenSkill('twshanghe'); - event.targets = game.filterPlayer((current) => current != player); - event.num = 0; - event.jiu = false; + event.targets=game.filterPlayer((current)=>current!=player); + event.num=0; + event.jiu=false; "step 1" - event.current = targets[num]; - if (!event.current.countCards('he')) event.goto(3); - else event.current.chooseCard('交给' + get.translation(player) + '一张牌', 'he', true).set('ai', function (card) { - var evt = _status.event.getParent(); - return 100 - get.value(card); + event.current=targets[num]; + if(!event.current.countCards('he')) event.goto(3); + else event.current.chooseCard('交给'+get.translation(player)+'一张牌','he',true).set('ai',function(card){ + var evt=_status.event.getParent(); + return 100-get.value(card); }); "step 2" - if (result.bool && result.cards && result.cards.length) { - event.current.give(result.cards, player); - if (!event.jiu && get.name(result.cards[0], player) == 'jiu') event.jiu = true; + if(result.bool&&result.cards&&result.cards.length){ + event.current.give(result.cards,player); + if(!event.jiu&&get.name(result.cards[0],player)=='jiu') event.jiu=true; } "step 3" event.num++; - if (event.num < targets.length) event.goto(1); - else if (!event.jiu && player.hp < 1) player.recover(1 - player.hp); + if(event.num 1) game.delayx(); - if (game.hasPlayer(function (current) { - return targets.includes(current) && current.hasHistory('gain', function (evt) { - return evt.getParent(2) == event && get.type(evt.cards[0], current) != 'basic'; + if(targets.length>1) game.delayx(); + if(game.hasPlayer(function(current){ + return targets.includes(current)&¤t.hasHistory('gain',function(evt){ + return evt.getParent(2)==event&&get.type(evt.cards[0],current)!='basic'; }) })) player.draw(); }, - group: 'twkaiji_count', - subSkill: { - count: { - trigger: { global: 'dying' }, - forced: true, - firstDo: true, - silent: true, - popup: false, - charlotte: true, - filter: function (event, player) { + group:'twkaiji_count', + subSkill:{ + count:{ + trigger:{global:'dying'}, + forced:true, + firstDo:true, + silent:true, + popup:false, + charlotte:true, + filter:function(event,player){ return !player.getStorage('twkaiji').includes(event.player); }, - content: function () { - player.markAuto('twkaiji', [trigger.player]); + content:function(){ + player.markAuto('twkaiji',[trigger.player]); }, }, }, }, - twshepan: { - audio: 2, - trigger: { target: 'useCardToTargeted' }, - usable: 1, - direct: true, - filter: function (event, player) { - return player != event.player; + twshepan:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + usable:1, + direct:true, + filter:function(event,player){ + return player!=event.player; }, - content: function () { + content:function(){ 'step 0' - var target = trigger.player; - event.target = target; - var choiceList = [ + var target=trigger.player; + event.target=target; + var choiceList=[ '摸一张牌', - '将' + get.translation(target) + '区域内的一张牌置于牌堆顶', + '将'+get.translation(target)+'区域内的一张牌置于牌堆顶', ]; - var choices = ['选项一']; - if (target.countCards('hej') > 0) choices.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; + var choices=['选项一']; + if(target.countCards('hej')>0) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; choices.push('cancel2'); - player.chooseControl(choices).set('choiceList', choiceList).set('choice', function () { - if (choices.length > 2 && get.effect(target, { name: 'guohe_copy' }, player, player) > 0) return 1; + player.chooseControl(choices).set('choiceList',choiceList).set('choice',function(){ + if(choices.length>2&&get.effect(target,{name:'guohe_copy'},player,player)>0) return 1; return 0; }()) 'step 1' - if (result.control != 'cancel2') { - player.logSkill('twshepan', target); - if (result.index == 1) player.choosePlayerCard(target, 'hej', true); - else { + if(result.control!='cancel2'){ + player.logSkill('twshepan',target); + if(result.index==1) player.choosePlayerCard(target,'hej',true); + else{ player.draw(); event.goto(3); } } - else { + else{ player.storage.counttrigger.twshepan--; event.finish(); } 'step 2' - var card = result.cards[0]; - target.$throw(get.position(card) == 'h' ? 1 : card, 1000); - target.lose(card, ui.cardPile, 'insert'); + var card=result.cards[0]; + target.$throw(get.position(card)=='h'?1:card,1000); + target.lose(card,ui.cardPile,'insert'); 'step 3' game.delayx(); - if (target.isIn() && player.countCards('h') == target.countCards('h')) { + if(target.isIn()&&player.countCards('h')==target.countCards('h')){ player.storage.counttrigger.twshepan--; - player.chooseBool('是否令' + get.translation(trigger.card) + '对自己无效?').set('ai', function () { - var evt = _status.event.getTrigger(); - return get.effect(evt.target, evt.card, evt.player, evt.target) < 0; + player.chooseBool('是否令'+get.translation(trigger.card)+'对自己无效?').set('ai',function(){ + var evt=_status.event.getTrigger(); + return get.effect(evt.target,evt.card,evt.player,evt.target)<0; }); } else event.finish(); 'step 4' - if (result.bool) trigger.excluded.add(player); + if(result.bool) trigger.excluded.add(player); }, }, //曹肇 - twfuzuan: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.getSkills(null, false, false).filter(function (i) { - var info = get.info(i); - return info && info.zhuanhuanji; - }).length > 0; + twfuzuan:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&info.zhuanhuanji; + }).length>0; }); }, - filterTarget: function (card, player, target) { - return target.getSkills(null, false, false).filter(function (i) { - var info = get.info(i); - return info && info.zhuanhuanji; - }).length > 0; + filterTarget:function(card,player,target){ + return target.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&info.zhuanhuanji; + }).length>0; }, - content: function () { + content:function(){ 'step 0' - var list = target.getSkills(null, false, false).filter(function (i) { - var info = get.info(i); - return info && info.zhuanhuanji; + var list=target.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&info.zhuanhuanji; }); - if (list.length == 1) { - event._result = { control: list[0] }; + if(list.length==1){ + event._result={control:list[0]}; } - else player.chooseControl(list).set('prompt', '选择变更' + get.translation(target) + '一个技能的状态').set('choice', list.includes('twfeifu') ? 'twfeifu' : 0).set('ai', () => _status.event.choice); + else player.chooseControl(list).set('prompt','选择变更'+get.translation(target)+'一个技能的状态').set('choice',list.includes('twfeifu')?'twfeifu':0).set('ai',()=>_status.event.choice); 'step 1' - var skill = result.control; + var skill=result.control; target.changeZhuanhuanji(skill); - target.popup(skill, 'wood'); - game.log(target, '的', '#g【' + get.translation(skill) + '】', '发生了状态变更'); + target.popup(skill,'wood'); + game.log(target,'的','#g【'+get.translation(skill)+'】','发生了状态变更'); game.delayx(); }, - ai: { - order: 8, - result: { - target: function (player, target) { - if (!target.hasSkill('twfeifu')) return 0; - return target.storage.twfeifu ? -1 : 1; + ai:{ + order:8, + result:{ + target:function(player,target){ + if(!target.hasSkill('twfeifu')) return 0; + return target.storage.twfeifu?-1:1; }, }, }, - group: 'twfuzuan_damage', - subSkill: { - damage: { - audio: 'twfuzuan', - trigger: { - player: 'damageEnd', - source: 'damageSource', + group:'twfuzuan_damage', + subSkill:{ + damage:{ + audio:'twfuzuan', + trigger:{ + player:'damageEnd', + source:'damageSource', }, - direct: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.getSkills(null, false, false).filter(function (i) { - var info = get.info(i); - return info && info.zhuanhuanji; - }).length > 0; + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&info.zhuanhuanji; + }).length>0; }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(lib.skill.twfuzuan.filterTarget, get.prompt('twfuzuan'), '变更一名角色的一个转换技的状态').set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, 'twfuzuan', player, player); + player.chooseTarget(lib.skill.twfuzuan.filterTarget,get.prompt('twfuzuan'),'变更一名角色的一个转换技的状态').set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,'twfuzuan',player,player); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twfuzuan', target); - var next = game.createEvent('twfuzuan'); - next.player = player; - next.target = target; + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twfuzuan',target); + var next=game.createEvent('twfuzuan'); + next.player=player; + next.target=target; next.setContent(lib.skill.twfuzuan.content); } }, }, }, }, - twchongqi: { - audio: 2, - trigger: { - global: 'phaseBefore', - player: 'enterGame', + twchongqi:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - filter: function (event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + forced:true, + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - logTarget: () => game.filterPlayer().sortBySeat(), - content: function () { + logTarget:()=>game.filterPlayer().sortBySeat(), + content:function(){ 'step 0' - game.filterPlayer().sortBySeat().forEach(function (current) { + game.filterPlayer().sortBySeat().forEach(function(current){ current.addSkills('twfeifu'); }); //game.log(player,'令所有其他角色获得了技能','#g【非服】') game.delayx(); 'step 1' - player.chooseTarget('是否减1点体力上限,并令一名其他角色获得技能【复纂】?', lib.filter.notMe).set('ai', function (target) { - var player = _status.event.player; - if (player.hasUnknown() && !target.isZhu) return 0; - if (player.getEnemies().includes(target)) return 0; - return get.attitude(player, target); + player.chooseTarget('是否减1点体力上限,并令一名其他角色获得技能【复纂】?',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + if(player.hasUnknown()&&!target.isZhu) return 0; + if(player.getEnemies().includes(target)) return 0; + return get.attitude(player,target); }); 'step 2' - if (result.bool) { + if(result.bool){ player.loseMaxHp(); - var target = result.targets[0]; - player.line(target, 'fire'); + var target=result.targets[0]; + player.line(target,'fire'); target.addSkills('twfuzuan'); game.delayx(); } }, - derivation: 'twfeifu', + derivation:'twfeifu', }, - twfeifu: { - audio: 2, - trigger: { - player: 'useCardToPlayered', - target: 'useCardToTargeted', + twfeifu:{ + audio:2, + trigger:{ + player:'useCardToPlayered', + target:'useCardToTargeted', }, - zhuanhuanji: true, - forced: true, - mark: true, - marktext: '☯', - intro: { - content: function (storage, player) { - return (storage ? '当你使用【杀】指定唯一目标后' : '当你成为【杀】的唯一目标后') + '目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。'; + zhuanhuanji:true, + forced:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage,player){ + return (storage?'当你使用【杀】指定唯一目标后':'当你成为【杀】的唯一目标后')+'目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。'; }, }, - filter: function (event, player, name) { - return event.card.name == 'sha' && event.targets.length == 1 - && event.player.isIn() && event.target.countCards('he') > 0 && - (name == 'useCardToPlayered') == Boolean(player.storage.twfeifu); + filter:function(event,player,name){ + return event.card.name=='sha'&&event.targets.length==1 + &&event.player.isIn()&&event.target.countCards('he')>0&& + (name=='useCardToPlayered')==Boolean(player.storage.twfeifu); }, - logTarget: function (event, player) { - return player.storage.twfeifu ? event.target : event.player; + logTarget:function(event,player){ + return player.storage.twfeifu?event.target:event.player; }, - content: function () { + content:function(){ 'step 0' player.changeZhuanhuanji('twfeifu'); - trigger.target.chooseCard('he', true, '非服:交给' + get.translation(trigger.player) + '一张牌', '若选择装备牌,则其可以使用此牌'); + trigger.target.chooseCard('he',true,'非服:交给'+get.translation(trigger.player)+'一张牌','若选择装备牌,则其可以使用此牌'); 'step 1' - if (result.bool) { - var card = result.cards[0]; - event.card = card; - trigger.target.give(card, trigger.player); + if(result.bool){ + var card=result.cards[0]; + event.card=card; + trigger.target.give(card,trigger.player); } else event.finish(); 'step 2' - var target = trigger.player; - if (target.getCards('h').includes(card) && get.type(card, target) == 'equip' && target.hasUseTarget(card)) target.chooseUseTarget(card, 'nopopup'); + var target=trigger.player; + if(target.getCards('h').includes(card)&&get.type(card,target)=='equip'&&target.hasUseTarget(card)) target.chooseUseTarget(card,'nopopup'); }, }, //Powered by @污言噫对 - twjingce: { - marktext: "策", - intro: { - name: "策", - content: "mark", + twjingce:{ + marktext:"策", + intro:{ + name:"策", + content:"mark", }, - audio: 2, - trigger: { player: "useCardAfter" }, - filter: function (event, player) { - var evt = event.getParent('phaseUse'); - if (!evt || evt.player != player) return false; - var history = player.getHistory('useCard', function (evtx) { - return evtx.getParent('phaseUse') == evt; + audio:2, + trigger:{player:"useCardAfter"}, + filter:function(event,player){ + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var history=player.getHistory('useCard',function(evtx){ + return evtx.getParent('phaseUse')==evt; }); - return history && history.indexOf(event) == player.hp - 1; + return history&&history.indexOf(event)==player.hp-1; }, - frequent: true, - content: function () { + frequent:true, + content:function(){ 'step 0' player.draw(2); 'step 1' - if (player.getHistory('sourceDamage').length || player.getHistory('gain', function (evt) { - return evt.getParent('phaseUse') == trigger.getParent('phaseUse') && evt.getParent().name == 'draw'; - }).length > 1) player.addMark('twjingce', 1); + if(player.getHistory('sourceDamage').length||player.getHistory('gain',function(evt){ + return evt.getParent('phaseUse')==trigger.getParent('phaseUse')&&evt.getParent().name=='draw'; + }).length>1) player.addMark('twjingce',1); }, }, - yuzhang: { - audio: 2, - trigger: { - player: "damageEnd", + yuzhang:{ + audio:2, + trigger:{ + player:"damageEnd", }, - filter: function (event, player) { - return event.source && player.hasMark('twjingce'); + filter:function(event,player){ + return event.source&&player.hasMark('twjingce'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - var choiceList = ['令' + get.translation(trigger.source) + '本回合不能再使用或打出牌']; - if (trigger.source.countCards('he')) choiceList.push('令' + get.translation(trigger.source) + '弃置两张牌'); - player.chooseControl('cancel2').set('prompt2', get.prompt2('yuzhang')).set('choiceList', choiceList).set('ai', function () { - var player = _status.event.player, source = _status.event.source; - if (get.attitude(player, source) >= 0) return 'cancel2'; - if (source.hasSkillTag('noh') || source.hasSkillTag('noe') || source.countCards('h') >= 4) return 0; - if (source.hp > 1 && source.countCards('he') > 1) return 1; - return [0, 1].randomGet(); - }).set('source', trigger.source); + var choiceList=['令'+get.translation(trigger.source)+'本回合不能再使用或打出牌']; + if (trigger.source.countCards('he')) choiceList.push('令'+get.translation(trigger.source)+'弃置两张牌'); + player.chooseControl('cancel2').set('prompt2',get.prompt2('yuzhang')).set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,source=_status.event.source; + if(get.attitude(player,source)>=0) return 'cancel2'; + if(source.hasSkillTag('noh')||source.hasSkillTag('noe')||source.countCards('h')>=4) return 0; + if(source.hp>1&&source.countCards('he')>1) return 1; + return [0,1].randomGet(); + }).set('source',trigger.source); 'step 1' - if (result.control != 'cancel2') { - player.logSkill('yuzhang', trigger.source); - player.removeMark('twjingce', 1); - if (result.index == 0) trigger.source.addTempSkill('yuzhang_dontuse'); - else trigger.source.chooseToDiscard('he', 2, true); + if(result.control!='cancel2'){ + player.logSkill('yuzhang',trigger.source); + player.removeMark('twjingce',1); + if(result.index==0) trigger.source.addTempSkill('yuzhang_dontuse'); + else trigger.source.chooseToDiscard('he',2,true); } }, - group: "yuzhang_skip", - subSkill: { - skip: { - audio: 'yuzhang', - trigger: { - player: ['phaseZhunbeiBefore', "phaseJudgeBefore", "phaseDrawBefore", "phaseUseBefore", "phaseDiscardBefore", 'phaseJieshuBefore'], + group:"yuzhang_skip", + subSkill:{ + skip:{ + audio:'yuzhang', + trigger:{ + player:['phaseZhunbeiBefore',"phaseJudgeBefore","phaseDrawBefore","phaseUseBefore","phaseDiscardBefore",'phaseJieshuBefore'], }, - filter: function (event, player) { + filter:function(event,player){ return player.hasMark('twjingce'); }, - prompt2: function (event, player) { - var str = '弃置一枚“策”并跳过'; - var list = lib.skill.yuzhang.subSkill.skip.trigger.player.slice(); - list = list.map(i => i.slice(0, -6)); - str += ['准备', '判定', '摸牌', '出牌', '弃牌', '结束'][list.indexOf(event.name)]; - str += '阶段'; + prompt2:function(event,player){ + var str='弃置一枚“策”并跳过'; + var list=lib.skill.yuzhang.subSkill.skip.trigger.player.slice(); + list=list.map(i=>i.slice(0,-6)); + str+=['准备','判定','摸牌','出牌','弃牌','结束'][list.indexOf(event.name)]; + str+='阶段'; return str; }, - check: function (event, player) { - if (event.name == 'phaseDiscard') return player.needsToDiscard(); - if (event.name == 'phaseJudge') return player.countCards('j'); + check:function(event,player){ + if(event.name=='phaseDiscard') return player.needsToDiscard(); + if(event.name=='phaseJudge') return player.countCards('j'); return false; }, - content: function () { - player.removeMark('twjingce', 1); + content:function(){ + player.removeMark('twjingce',1); trigger.cancel(); }, }, - dontuse: { - charlotte: true, - mark: true, - mod: { - cardEnabled2: function (card) { + dontuse:{ + charlotte:true, + mark:true, + mod:{ + cardEnabled2:function(card){ return false; }, }, - intro: { - content: "不能使用或打出牌", + intro:{ + content:"不能使用或打出牌", }, }, }, }, - twlihuo: { - trigger: { player: 'useCard1' }, - filter: function (event, player) { - if (event.card.name == 'sha' && !game.hasNature(event.card)) return true; + twlihuo:{ + trigger:{player:'useCard1'}, + filter:function(event,player){ + if(event.card.name=='sha'&&!game.hasNature(event.card)) return true; return false; }, - audio: 'lihuo', - prompt2: function (event) { - return '将' + get.translation(event.card) + '改为火属性'; + audio:'lihuo', + prompt2:function(event){ + return '将'+get.translation(event.card)+'改为火属性'; }, - audioname: ['re_chengpu'], - check: function (event, player) { - return game.hasPlayer(function (current) { - return !event.targets.includes(current) && player.canUse(event.card, current) && get.effect(current, { name: 'sha', nature: 'fire', cards: event.cards.slice(0) }, player, player) > 0; + audioname:['re_chengpu'], + check:function(event,player){ + return game.hasPlayer(function(current){ + return !event.targets.includes(current)&&player.canUse(event.card,current)&&get.effect(current,{name:'sha',nature:'fire',cards:event.cards.slice(0)},player,player)>0; }); }, - content: function () { - game.setNature(trigger.card, 'fire'); - trigger.card.twlihuo_buffed = true; + content:function(){ + game.setNature(trigger.card,'fire'); + trigger.card.twlihuo_buffed=true; }, - group: ['twlihuo2', 'twlihuo3'], - ai: { - fireAttack: true, + group:['twlihuo2','twlihuo3'], + ai:{ + fireAttack:true, }, }, - twlihuo2: { - trigger: { player: 'useCard2' }, - filter: function (event, player) { - if (event.card.name != 'sha' || !game.hasNature(event.card, 'fire')) return false; - return game.hasPlayer(function (current) { - return !event.targets.includes(current) && player.canUse(event.card, current); + twlihuo2:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false; + return game.hasPlayer(function(current){ + return !event.targets.includes(current)&&player.canUse(event.card,current); }); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twlihuo'), '为' + get.translation(trigger.card) + '增加一个目标', function (card, player, target) { - return !_status.event.sourcex.includes(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); + player.chooseTarget(get.prompt('twlihuo'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ + return !_status.event.sourcex.includes(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]; + if(result.bool){ + if(!event.isMine()&&!_status.connectMode) game.delayx(); + event.target=result.targets[0]; } - else { + else{ event.finish(); } 'step 2' - player.logSkill('twlihuo', event.target); + player.logSkill('twlihuo',event.target); trigger.targets.push(event.target); }, }, - twlihuo3: { - trigger: { player: 'useCardAfter' }, - filter: function (event, player) { - return event.card.twlihuo_buffed = true && player.getHistory('sourceDamage', function (evt) { - return evt.card == event.card && evt._dyinged; - }).length > 0; + twlihuo3:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return event.card.twlihuo_buffed=true&&player.getHistory('sourceDamage',function(evt){ + return evt.card==event.card&&evt._dyinged; + }).length>0; }, - forced: true, - audio: 'lihuo', - audioname: ['re_chengpu'], - content: function () { + forced:true, + audio:'lihuo', + audioname:['re_chengpu'], + content:function(){ player.loseHp(); } }, - twchunlao: { - audio: 'chunlao', - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - filter: function (event, player) { - return game.hasPlayer(function (current) { - return current.countCards('hej') > 0; - }) && !game.hasPlayer(function (current) { - return current.getExpansions('twchunlao').length > 0; + twchunlao:{ + audio:'chunlao', + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('hej')>0; + })&&!game.hasPlayer(function(current){ + return current.getExpansions('twchunlao').length>0; }); }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twchunlao'), '将一名角色区域内的一张牌作为“醇”置于其武将牌上', function (card, player, target) { - return target.countCards('hej') > 0; - }).set('ai', function (target) { - return (get.attitude(_status.event.player, target)) * (player == target ? 1 : 2); + player.chooseTarget(get.prompt('twchunlao'),'将一名角色区域内的一张牌作为“醇”置于其武将牌上',function(card,player,target){ + return target.countCards('hej')>0; + }).set('ai',function(target){ + return (get.attitude(_status.event.player,target))*(player==target?1:2); }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.logSkill('twchunlao', target); - player.choosePlayerCard(target, 'hej', true); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twchunlao',target); + player.choosePlayerCard(target,'hej',true); } else event.finish(); 'step 2' - if (result.bool) { - target.addToExpansion(result.cards, target, 'give').gaintag.add('twchunlao'); + if(result.bool){ + target.addToExpansion(result.cards,target,'give').gaintag.add('twchunlao'); } }, - intro: { - content: 'expansion', - markcount: 'expansion', + intro:{ + content:'expansion', + markcount:'expansion', }, - group: ['twchunlao_sha', 'twchunlao_dying'], - subSkill: { - sha: { - trigger: { global: 'useCard' }, - direct: true, - filter: function (event, player) { - return event.card.name == 'sha' && event.player.countCards('he') > 0 && event.player.getExpansions('twchunlao').length > 0; + group:['twchunlao_sha','twchunlao_dying'], + subSkill:{ + sha:{ + trigger:{global:'useCard'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.player.countCards('he')>0&&event.player.getExpansions('twchunlao').length>0; }, - content: function () { + content:function(){ 'step 0' - event.target = trigger.player; - event.target.chooseCard('he', '醇醪:是否交给' + get.translation(player) + '一张牌,令' + get.translation(trigger.card) + '的伤害值基数+1?').set('ai', function (card) { - if (!_status.event.goon) return 3.5 - get.value(card); - return 7 - get.value(card); - }).set('goon', function () { - if (get.attitude(target, player) < 0) return false; - var d1 = true; - if (trigger.player.hasSkill('jueqing') || trigger.player.hasSkill('gangzhi')) d1 = false; - for (var target of trigger.targets) { - if (!target.mayHaveShan(player, 'use', target.getCards('h', i => { + event.target=trigger.player; + event.target.chooseCard('he','醇醪:是否交给'+get.translation(player)+'一张牌,令'+get.translation(trigger.card)+'的伤害值基数+1?').set('ai',function(card){ + if(!_status.event.goon) return 3.5-get.value(card); + return 7-get.value(card); + }).set('goon',function(){ + if(get.attitude(target,player)<0) return false; + var d1=true; + if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false; + for(var target of trigger.targets){ + if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - })) || trigger.player.hasSkillTag('directHit_ai', true, { - target: target, - card: trigger.card, - }, true)) { - if (!target.hasSkill('gangzhi')) d1 = false; - if (!target.hasSkillTag('filterDamage', null, { - player: trigger.player, - card: trigger.card, - }) && get.attitude(player, target) < 0) return true; + }))||trigger.player.hasSkillTag('directHit_ai',true,{ + target:target, + card:trigger.card, + },true)){ + if(!target.hasSkill('gangzhi')) d1=false; + if(!target.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:trigger.card, + })&&get.attitude(player,target)<0) return true; } } return d1; }()); - if (!event.target.isUnderControl(true) && !event.target.isOnline()) game.delayx(); + if(!event.target.isUnderControl(true)&&!event.target.isOnline()) game.delayx(); 'step 1' - if (result.bool) { - target.logSkill('twchunlao', player); - if (!target.hasSkill('twchunlao')) game.trySkillAudio('twchunlao', player); - if (player != target) target.give(result.cards, player, 'giveAuto'); + if(result.bool){ + target.logSkill('twchunlao',player); + if(!target.hasSkill('twchunlao')) game.trySkillAudio('twchunlao',player); + if(player!=target) target.give(result.cards,player,'giveAuto'); trigger.baseDamage++; } }, }, - dying: { - audio: 'chunlao', - trigger: { global: 'dying' }, - logTarget: 'player', - filter: function (event, player) { - return event.player.getExpansions('twchunlao').length > 0; + dying:{ + audio:'chunlao', + trigger:{global:'dying'}, + logTarget:'player', + filter:function(event,player){ + return event.player.getExpansions('twchunlao').length>0; }, - prompt2: (event, player) => ('移去' + get.translation(event.player) + '武将牌上的“醇”并摸一张牌,然后令其回复1点体力'), - check: function (event, player) { - return get.attitude(player, event.player) > 0; + prompt2:(event,player)=>('移去'+get.translation(event.player)+'武将牌上的“醇”并摸一张牌,然后令其回复1点体力'), + check:function(event,player){ + return get.attitude(player,event.player)>0; }, - content: function () { - var target = trigger.player, cards = target.getExpansions('twchunlao'); - if (cards.length) target.loseToDiscardpile(cards); + content:function(){ + var target=trigger.player,cards=target.getExpansions('twchunlao'); + if(cards.length) target.loseToDiscardpile(cards); player.draw(); target.recover(); }, @@ -11882,104 +11882,104 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //张曼成 - twfengji: { - audio: 2, - mahouSkill: true, - trigger: { player: 'phaseUseBegin' }, - filter: function (event, player) { - return !player.getExpansions('twfengji').length && !player.hasSkill('twfengji_mahou') && player.countCards('he'); + twfengji:{ + audio:2, + mahouSkill:true, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return !player.getExpansions('twfengji').length&&!player.hasSkill('twfengji_mahou')&&player.countCards('he'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard('he', get.prompt2('twfengji')).set('ai', function (card) { - var name = card.name, num = 0; - for (var i = 0; i < ui.cardPile.childNodes.length; i++) { - if (ui.cardPile.childNodes[i].name == name) num++; + player.chooseCard('he',get.prompt2('twfengji')).set('ai',function(card){ + var name=card.name,num=0; + for(var i=0;i 0) { + player.addToExpansion(result.cards,player,'giveAuto').gaintag.add('twfengji'); + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ + var player=_status.event.player; + var safe=Math.min(player.getHandcardLimit(),player.countCards('h','shan')); + if(safe0){ safe++; - next = next.next; + next=next.next; } } - return Math.max(2, Math.min(safe, 3, game.countPlayer())) - 1; + return Math.max(2,Math.min(safe,3,game.countPlayer()))-1; }); } else event.finish(); 'step 2' - player.storage.twfengji_mahou = [result.index + 1, result.index + 1]; - player.addTempSkill('twfengji_mahou', { player: 'die' }); + player.storage.twfengji_mahou=[result.index+1,result.index+1]; + player.addTempSkill('twfengji_mahou',{player:'die'}); }, - marktext: '示', - onremove: function (player, skill) { - var cards = player.getExpansions(skill); - if (cards.length) player.loseToDiscardpile(cards); + marktext:'示', + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); }, - intro: { - content: 'expansion', - markcount: 'expansion', + intro:{ + content:'expansion', + markcount:'expansion', }, - subSkill: { - mahou: { - trigger: { global: 'phaseEnd' }, - forced: true, - popup: false, - charlotte: true, - content: function () { - var list = player.storage.twfengji_mahou; + subSkill:{ + mahou:{ + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + var list=player.storage.twfengji_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的“蜂集”魔法生效'); + if(list[1]==0){ + game.log(player,'的“蜂集”魔法生效'); player.logSkill('twfengji'); - var cards = player.getExpansions('twfengji'); - if (cards.length) { - var cards2 = [], num = list[0]; - for (var card of cards) { - for (var i = 0; i < num; i++) { - var card2 = get.cardPile2(function (cardx) { - return cardx.name == card.name && !cards2.includes(cardx); + var cards=player.getExpansions('twfengji'); + if(cards.length){ + var cards2=[],num=list[0]; + for(var card of cards){ + for(var i=0;i 0; + trigger:{player:'damageBegin3'}, + filter:function(event,player){ + return player.getExpansions('twfengji').length>0; }, - forced: true, - content: function () { + forced:true, + content:function(){ trigger.num++; - var cards = player.getExpansions('twfengji'); - if (cards.length) player.loseToDiscardpile(cards); + var cards=player.getExpansions('twfengji'); + if(cards.length) player.loseToDiscardpile(cards); }, - ai: { - halfneg: true, - combo: 'twfengji', + ai:{ + halfneg:true, + combo:'twfengji', }, }, - twbudao: { - audio: 2, - trigger: { player: 'phaseZhunbeiBegin' }, - derivation: ['twzhouhu', 'twharvestinori', 'twzuhuo', 'twzhouzu', 'twhuangjin', 'twguimen', 'twdidao'], - limited: true, - skillAnimation: true, - animationColor: 'metal', - check: function (event, player) { - return !player.hasUnknown() || !player.hasFriend(); + twbudao:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + derivation:['twzhouhu','twharvestinori','twzuhuo','twzhouzu','twhuangjin','twguimen','twdidao'], + limited:true, + skillAnimation:true, + animationColor:'metal', + check:function(event,player){ + return !player.hasUnknown()||!player.hasFriend(); }, - skillValue: { - twzhouhu: (target) => Math.random() < 0.6 ? 0.1 : 1, - twzuhuo: (target, player) => get.damageEffect(target, player, player) > 0 ? 0.1 : 1, - twharvestinori: (target) => 0.9 + Math.random() / 5, - twhuangjin: (target) => Math.random() / 5, - twguimen: (target) => Math.sqrt(Math.min(3, target.countCards('he', { suit: 'spade' }))) * 0.09, - twzhouzu: (target) => { - var rand = Math.random(); - if (rand < 0.8) return 1 - Math.sqrt(0.8 - rand); + skillValue:{ + twzhouhu:(target)=>Math.random()<0.6?0.1:1, + twzuhuo:(target,player)=>get.damageEffect(target,player,player)>0?0.1:1, + twharvestinori:(target)=>0.9+Math.random()/5, + twhuangjin:(target)=>Math.random()/5, + twguimen:(target)=>Math.sqrt(Math.min(3,target.countCards('he',{suit:'spade'})))*0.09, + twzhouzu:(target)=>{ + var rand=Math.random(); + if(rand<0.8) return 1-Math.sqrt(0.8-rand); return 1; }, - twdidao: (target, player) => { - if ([target, player].some(current => current.getSkills().some(skill => { - var info = get.info(skill); - if (!info || !info.ai || !info.ai.rejudge) return false; + twdidao:(target,player)=>{ + if([target,player].some(current=>current.getSkills().some(skill=>{ + var info=get.info(skill); + if(!info||!info.ai||!info.ai.rejudge) return false; return true; - }))) { + }))){ return 0.05; } - return 0.85 + Math.random() / 5; + return 0.85+Math.random()/5; } }, - content: function () { + content:function(){ 'step 0' player.awakenSkill('twbudao'); player.loseMaxHp(); player.recover(); - var skills = lib.skill.twbudao.derivation, map = lib.skill.twbudao.skillValue; - skills = skills.randomGets(3); - var target = game.filterPlayer().sort((a, b) => get.attitude(player, b) - get.attitude(player, a))[0]; - if (player.identity == 'nei' || get.attitude(player, target) < 6) target = player; - player.chooseControl(skills).set('choiceList', skills.map(function (i) { - return '
    【' + get.translation(lib.translate[i + '_ab'] || get.translation(i).slice(0, 2)) + '】
    ' + get.skillInfoTranslation(i, player) + '
    '; - })).set('displayIndex', false).set('prompt', '布道:选择获得一个技能').set('ai', () => { + var skills=lib.skill.twbudao.derivation,map=lib.skill.twbudao.skillValue; + skills=skills.randomGets(3); + var target=game.filterPlayer().sort((a,b)=>get.attitude(player,b)-get.attitude(player,a))[0]; + if(player.identity=='nei'||get.attitude(player,target)<6) target=player; + player.chooseControl(skills).set('choiceList',skills.map(function(i){ + return '
    【'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'】
    '+get.skillInfoTranslation(i,player)+'
    '; + })).set('displayIndex',false).set('prompt','布道:选择获得一个技能').set('ai',()=>{ return _status.event.choice; - }).set('choice', skills.sort((a, b) => (map[b](target, player) || 0.5) - (map[a](target, player) || 0.5))[0]); + }).set('choice',skills.sort((a,b)=>(map[b](target,player)||0.5)-(map[a](target,player)||0.5))[0]); 'step 1' - var skill = result.control; + var skill=result.control; player.addSkills(skill); - event.twbudao_skill = skill; - player.chooseTarget(lib.filter.notMe, '是否令一名其他角色也获得【' + get.translation(skill) + '】?').set('ai', function (target) { - var player = _status.event.player; - if (player.identity == 'nei') return 0; - return get.attitude(player, target); + event.twbudao_skill=skill; + player.chooseTarget(lib.filter.notMe,'是否令一名其他角色也获得【'+get.translation(skill)+'】?').set('ai',function(target){ + var player=_status.event.player; + if(player.identity=='nei') return 0; + return get.attitude(player,target); }); 'step 2' - if (result.bool) { - var target = result.targets[0]; - event.target = target; - player.line(target, 'green'); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); target.addSkills(event.twbudao_skill); - var cards = target.getCards('he'); - if (!cards.length) event.finish(); - else if (cards.length == 1) event._result = { bool: true, cards: cards }; - else target.chooseCard('he', true, '交给' + get.translation(player) + '一张牌作为学费'); + var cards=target.getCards('he'); + if(!cards.length) event.finish(); + else if(cards.length==1) event._result={bool:true,cards:cards}; + else target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌作为学费'); } else event.finish(); 'step 3' - if (result.bool) target.give(result.cards, player); + if(result.bool) target.give(result.cards,player); }, }, - twzhouhu: { - audio: 2, - mahouSkill: true, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return !player.hasSkill('twzhouhu_mahou') && player.countCards('h', lib.skill.twzhouhu.filterCard) > 0; + twzhouhu:{ + audio:2, + mahouSkill:true, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('twzhouhu_mahou')&&player.countCards('h',lib.skill.twzhouhu.filterCard)>0; }, - filterCard: { color: 'red' }, - check: function (card) { - if (_status.event.player.isHealthy()) return 0; - return 7 - get.value(card); + filterCard:{color:'red'}, + check:function(card){ + if(_status.event.player.isHealthy()) return 0; + return 7-get.value(card); }, - content: function () { + content:function(){ 'step 0' - player.chooseControl('1回合', '2回合', '3回合').set('prompt', '请选择施法时长').set('ai', function () { - var player = _status.event.player; - var safe = 1; - if (safe < Math.min(3, game.countPlayer(), player.getDamagedHp())) { - var next = player.next; - while (next != player && get.attitude(next, player) > 0) { + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ + var player=_status.event.player; + var safe=1; + if(safe0){ safe++; - next = next.next; + next=next.next; } } - return Math.max(1, Math.min(safe, 3, game.countPlayer(), player.getDamagedHp())) - 1; + return Math.max(1,Math.min(safe,3,game.countPlayer(),player.getDamagedHp()))-1; }); 'step 1' - player.storage.twzhouhu_mahou = [result.index + 1, result.index + 1]; - player.addTempSkill('twzhouhu_mahou', { player: 'die' }); + player.storage.twzhouhu_mahou=[result.index+1,result.index+1]; + player.addTempSkill('twzhouhu_mahou',{player:'die'}); }, - ai: { - order: 2, - result: { - player: 1, + ai:{ + order:2, + result:{ + player:1, }, }, - subSkill: { - mahou: { - trigger: { global: 'phaseEnd' }, - forced: true, - popup: false, - charlotte: true, - content: function () { - var list = player.storage.twzhouhu_mahou; + subSkill:{ + mahou:{ + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + var list=player.storage.twzhouhu_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的“咒护”魔法生效'); + if(list[1]==0){ + game.log(player,'的“咒护”魔法生效'); player.logSkill('twzhouhu'); - var num = list[0]; + var num=list[0]; player.recover(num); player.removeSkill('twzhouhu_mahou'); } - else { - game.log(player, '的“咒护”魔法剩余', '#g' + (list[1]) + '回合'); + else{ + game.log(player,'的“咒护”魔法剩余','#g'+(list[1])+'回合'); player.markSkill('twzhouhu_mahou'); } }, - mark: true, - onremove: true, - marktext: '♗', - intro: { - name: '施法:咒护', - markcount: function (storage) { - if (storage) return storage[1]; + mark:true, + onremove:true, + marktext:'♗', + intro:{ + name:'施法:咒护', + markcount:function(storage){ + if(storage) return storage[1]; return 0; }, - content: function (storage) { - if (storage) { - return '经过' + storage[1] + '个“回合结束时”后,回复' + storage[0] + '点体力'; + content:function(storage){ + if(storage){ + return '经过'+storage[1]+'个“回合结束时”后,回复'+storage[0]+'点体力'; } return '未指定施法效果'; }, @@ -12161,75 +12161,75 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - twharvestinori: { - audio: 2, - mahouSkill: true, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return !player.hasSkill('twharvestinori_mahou') && player.countCards('h', lib.skill.twharvestinori.filterCard) > 0; + twharvestinori:{ + audio:2, + mahouSkill:true, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('twharvestinori_mahou')&&player.countCards('h',lib.skill.twharvestinori.filterCard)>0; }, - filterCard: { color: 'black' }, - check: function (card) { - return 8 - get.value(card); + filterCard:{color:'black'}, + check:function(card){ + return 8-get.value(card); }, - content: function () { + content:function(){ 'step 0' - player.chooseControl('1回合', '2回合', '3回合').set('prompt', '请选择施法时长').set('ai', function () { - var player = _status.event.player; - var safe = player.hp; - if (safe < Math.min(3, game.countPlayer())) { - var next = player.next; - while (next != player && get.attitude(next, player) > 0) { + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ + var player=_status.event.player; + var safe=player.hp; + if(safe0){ safe++; - next = next.next; + next=next.next; } } - return Math.max(1, Math.min(safe, 3, game.countPlayer())) - 1; + return Math.max(1,Math.min(safe,3,game.countPlayer()))-1; }); 'step 1' - player.storage.twharvestinori_mahou = [result.index + 1, result.index + 1]; - player.addTempSkill('twharvestinori_mahou', { player: 'die' }); + player.storage.twharvestinori_mahou=[result.index+1,result.index+1]; + player.addTempSkill('twharvestinori_mahou',{player:'die'}); }, - ai: { - order: 8, - result: { - player: 1, + ai:{ + order:8, + result:{ + player:1, }, }, - subSkill: { - mahou: { - trigger: { global: 'phaseEnd' }, - forced: true, - popup: false, - charlotte: true, - content: function () { - var list = player.storage.twharvestinori_mahou; + subSkill:{ + mahou:{ + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + var list=player.storage.twharvestinori_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的“丰祈”魔法生效'); + if(list[1]==0){ + game.log(player,'的“丰祈”魔法生效'); player.logSkill('twharvestinori'); - var num = list[0] * 2; + var num=list[0]*2; player.draw(num); player.removeSkill('twharvestinori_mahou'); } - else { - game.log(player, '的“丰祈”魔法剩余', '#g' + (list[1]) + '回合'); + else{ + game.log(player,'的“丰祈”魔法剩余','#g'+(list[1])+'回合'); player.markSkill('twharvestinori_mahou'); } }, - mark: true, - onremove: true, - marktext: '♗', - intro: { - name: '施法:丰祈', - markcount: function (storage) { - if (storage) return storage[1]; + mark:true, + onremove:true, + marktext:'♗', + intro:{ + name:'施法:丰祈', + markcount:function(storage){ + if(storage) return storage[1]; return 0; }, - content: function (storage) { - if (storage) { - return '经过' + storage[1] + '个“回合结束时”后,摸' + storage[0] * 2 + '张牌'; + content:function(storage){ + if(storage){ + return '经过'+storage[1]+'个“回合结束时”后,摸'+storage[0]*2+'张牌'; } return '未指定施法效果'; }, @@ -12237,498 +12237,498 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - twzuhuo: { - audio: 2, - mahouSkill: true, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return !player.hasSkill('twzuhuo_mahou') && player.countCards('he', lib.skill.twzuhuo.filterCard) > 0; + twzuhuo:{ + audio:2, + mahouSkill:true, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('twzuhuo_mahou')&&player.countCards('he',lib.skill.twzuhuo.filterCard)>0; }, - filterCard: function (card) { - return get.type(card) != 'basic'; + filterCard:function(card){ + return get.type(card)!='basic'; }, - position: 'he', - check: function (card) { - return 7 - get.value(card); + position:'he', + check:function(card){ + return 7-get.value(card); }, - content: function () { + content:function(){ 'step 0' - player.chooseControl('1回合', '2回合', '3回合').set('prompt', '请选择施法时长').set('ai', function () { - var player = _status.event.player; - var safe = Math.min(player.getHandcardLimit(), player.countCards('h', 'shan')); - if (safe < Math.min(3, game.countPlayer())) { - var next = player.next; - while (next != player && get.attitude(next, player) > 0) { + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ + var player=_status.event.player; + var safe=Math.min(player.getHandcardLimit(),player.countCards('h','shan')); + if(safe0){ safe++; - next = next.next; + next=next.next; } } - return Math.max(2, Math.min(safe, 3, game.countPlayer())) - 1; + return Math.max(2,Math.min(safe,3,game.countPlayer()))-1; }); 'step 1' - player.storage.twzuhuo_mahou = [result.index + 1, result.index + 1]; - player.addTempSkill('twzuhuo_mahou', { player: 'die' }); + player.storage.twzuhuo_mahou=[result.index+1,result.index+1]; + player.addTempSkill('twzuhuo_mahou',{player:'die'}); }, - ai: { - order: 2, - result: { - player: 1, + ai:{ + order:2, + result:{ + player:1, }, }, - subSkill: { - mahou: { - trigger: { global: 'phaseEnd' }, - forced: true, - popup: false, - charlotte: true, - content: function () { - var list = player.storage.twzuhuo_mahou; + subSkill:{ + mahou:{ + trigger:{global:'phaseEnd'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + var list=player.storage.twzuhuo_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的“阻祸”魔法生效'); + if(list[1]==0){ + game.log(player,'的“阻祸”魔法生效'); player.logSkill('twzuhuo'); - var num = list[0]; + var num=list[0]; player.addSkill('twzuhuo_effect'); - player.addMark('twzuhuo_effect', num, false); + player.addMark('twzuhuo_effect',num,false); player.removeSkill('twzuhuo_mahou'); } - else { - game.log(player, '的“阻祸”魔法剩余', '#g' + (list[1]) + '回合'); + else{ + game.log(player,'的“阻祸”魔法剩余','#g'+(list[1])+'回合'); player.markSkill('twzuhuo_mahou'); } }, - mark: true, - onremove: true, - marktext: '♗', - intro: { - name: '施法:阻祸', - markcount: function (storage) { - if (storage) return storage[1]; + mark:true, + onremove:true, + marktext:'♗', + intro:{ + name:'施法:阻祸', + markcount:function(storage){ + if(storage) return storage[1]; return 0; }, - content: function (storage) { - if (storage) { - return '经过' + storage[1] + '个“回合结束时”后,获得' + storage[0] + '层“防止一次伤害”的效果'; + content:function(storage){ + if(storage){ + return '经过'+storage[1]+'个“回合结束时”后,获得'+storage[0]+'层“防止一次伤害”的效果'; } return '未指定施法效果'; }, }, }, - effect: { - charlotte: true, - onremove: true, - trigger: { player: 'damageBegin2' }, - forced: true, - filter: function (event, player) { + effect:{ + charlotte:true, + onremove:true, + trigger:{player:'damageBegin2'}, + forced:true, + filter:function(event,player){ return player.hasMark('twzuhuo_effect'); }, - content: function () { + content:function(){ trigger.cancel(); - player.removeMark('twzuhuo_effect', 1, false); - if (!player.countMark('twzuhuo_effect')) player.removeSkill('twzuhuo_effect'); + player.removeMark('twzuhuo_effect',1,false); + if(!player.countMark('twzuhuo_effect')) player.removeSkill('twzuhuo_effect'); }, - marktext: '阻︎', - intro: { - onremove: true, - content: '防止接下来的#次伤害', + marktext:'阻︎', + intro:{ + onremove:true, + content:'防止接下来的#次伤害', }, }, }, }, - twzhouzu: { - audio: 2, - enable: 'phaseUse', - usable: 1, - mahouSkill: true, - filter: function (event, player) { + twzhouzu:{ + audio:2, + enable:'phaseUse', + usable:1, + mahouSkill:true, + filter:function(event,player){ return !player.hasSkill('twzhouzu_mahou'); }, - filterTarget: function (card, player, target) { - return player != target; + filterTarget:function(card,player,target){ + return player!=target; }, - line: false, - delay: false, - content: function () { + line:false, + delay:false, + content:function(){ 'step 0' - player.chooseControl('1回合', '2回合', '3回合').set('prompt', '请选择施法时长').set('ai', function () { - var player = _status.event.player; - var safe = 1; - if (safe < Math.min(3, game.countPlayer())) { - var next = player.next; - while (next != player && get.attitude(next, player) > 0) { + player.chooseControl('1回合','2回合','3回合').set('prompt','请选择施法时长').set('ai',function(){ + var player=_status.event.player; + var safe=1; + if(safe0){ safe++; - next = next.next; + next=next.next; } } - return Math.max(2, Math.min(safe, 3, game.countPlayer())) - 1; + return Math.max(2,Math.min(safe,3,game.countPlayer()))-1; }); 'step 1' - player.storage.twzhouzu_mahou = [result.index + 1, result.index + 1, target]; - player.addTempSkill('twzhouzu_mahou', { player: 'die' }); + player.storage.twzhouzu_mahou=[result.index+1,result.index+1,target]; + player.addTempSkill('twzhouzu_mahou',{player:'die'}); }, - subSkill: { - mahou: { - trigger: { - global: 'phaseEnd', + subSkill:{ + mahou:{ + trigger:{ + global:'phaseEnd', }, - forced: true, - popup: false, - charlotte: true, - content: function () { - var list = player.storage.twzhouzu_mahou; + forced:true, + popup:false, + charlotte:true, + content:function(){ + var list=player.storage.twzhouzu_mahou; list[1]--; - if (list[1] == 0) { - game.log(player, '的“咒诅”魔法生效'); - var num = list[0], target = list[2]; - player.logSkill('twzhouzu', target); - target.chooseToDiscard(get.translation(player) + '对你的“咒诅”魔法生效,请弃置' + get.cnNumber(list[0]) + '张牌', list[0], true); + if(list[1]==0){ + game.log(player,'的“咒诅”魔法生效'); + var num=list[0],target=list[2]; + player.logSkill('twzhouzu',target); + target.chooseToDiscard(get.translation(player)+'对你的“咒诅”魔法生效,请弃置'+get.cnNumber(list[0])+'张牌',list[0],true); target.damage('thunder'); player.removeSkill('twzhouzu_mahou'); } - else { - game.log(player, '的“咒阻”魔法剩余', '#g' + (list[1]) + '回合'); + else{ + game.log(player,'的“咒阻”魔法剩余','#g'+(list[1])+'回合'); player.markSkill('twzhouzu_mahou'); } }, - mark: true, - onremove: true, - marktext: '♗', - intro: { - name: '施法:咒诅', - markcount: function (storage) { - if (storage) return storage[1]; + mark:true, + onremove:true, + marktext:'♗', + intro:{ + name:'施法:咒诅', + markcount:function(storage){ + if(storage) return storage[1]; return 0; }, - content: function (storage) { - if (storage) { - return '经过' + storage[1] + '个“回合结束时”后,你令' + get.translation(storage[2]) + '弃置' + get.cnNumber(storage[0]) + '张牌,然后你对其造成1点雷电伤害'; + content:function(storage){ + if(storage){ + return '经过'+storage[1]+'个“回合结束时”后,你令'+get.translation(storage[2])+'弃置'+get.cnNumber(storage[0])+'张牌,然后你对其造成1点雷电伤害'; } return '未指定施法效果'; }, } }, }, - ai: { - order: 1, - result: { - target: -5, + ai:{ + order:1, + result:{ + target:-5, }, } }, - twhuangjin: { - audio: 2, - trigger: { target: 'useCardToTarget' }, - forced: true, - logTarget: 'player', - filter: function (event, player) { - return event.card.name == 'sha' && typeof get.number(event.card) == 'number'; + twhuangjin:{ + audio:2, + trigger:{target:'useCardToTarget'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.card.name=='sha'&&typeof get.number(event.card)=='number'; }, - content: function () { + content:function(){ 'step 0' - player.judge(function (result) { - var evt = _status.event.getTrigger(); - if (Math.abs(get.number(result) - get.number(evt.card)) <= 1) return 2; + player.judge(function(result){ + var evt=_status.event.getTrigger(); + if(Math.abs(get.number(result)-get.number(evt.card))<=1) return 2; return -1; - }).judge2 = function (result) { + }).judge2=function(result){ return result.bool; }; 'step 1' - if (result.bool) { + if(result.bool){ trigger.getParent().excluded.add(player); } }, - ai: { - effect: { - target: function (card, player, target, current, isLink) { - if (card.name == 'sha' && !isLink) return 0.8; + ai:{ + effect:{ + target:function(card,player,target,current,isLink){ + if(card.name=='sha'&&!isLink) return 0.8; }, }, }, }, - twguimen: { - audio: 2, - trigger: { - player: 'loseAfter', - global: 'loseAsyncAfter', + twguimen:{ + audio:2, + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', }, - direct: true, - filter: function (event, player) { - if (event.type != 'discard') return false; - var evt = event.getl(player); - for (var card of evt.cards2) { - if (get.suit(card, player) == 'spade') return true; + direct:true, + filter:function(event,player){ + if(event.type!='discard') return false; + var evt=event.getl(player); + for(var card of evt.cards2){ + if(get.suit(card,player)=='spade') return true; } return false; }, - forced: true, - content: function () { + forced:true, + content:function(){ 'step 0' - var cards = []; - var evt = trigger.getl(player); - for (var card of evt.cards2) { - if (get.suit(card, player) == 'spade') cards.push(card); + var cards=[]; + var evt=trigger.getl(player); + for(var card of evt.cards2){ + if(get.suit(card,player)=='spade') cards.push(card); } - if (!cards.length) event.finish(); - else event.cards = cards; + if(!cards.length) event.finish(); + else event.cards=cards; 'step 1' - if (event.cards.length == 1) { - event._result = { bool: true, links: event.cards }; + if(event.cards.length==1){ + event._result={bool:true,links:event.cards}; } - else { - player.chooseButton(['鬼门:选择一张♠牌,为其进行判定', event.cards], true); + else{ + player.chooseButton(['鬼门:选择一张♠牌,为其进行判定',event.cards],true); } 'step 2' - if (result.bool && result.links) { - event.judgingSpade = result.links[0]; + if(result.bool&&result.links){ + event.judgingSpade=result.links[0]; event.cards.remove(event.judgingSpade); - game.log(player, '选择', '#y' + get.translation(event.judgingSpade), '进行判定'); - player.judge(function (result) { - var card = _status.event.getParent().judgingSpade; - if (Math.abs(get.number(result) - get.number(card)) <= 1) return 4; + game.log(player,'选择','#y'+get.translation(event.judgingSpade),'进行判定'); + player.judge(function(result){ + var card=_status.event.getParent().judgingSpade; + if(Math.abs(get.number(result)-get.number(card))<=1) return 4; return -1; - }).judge2 = function (result) { + }).judge2=function(result){ return result.bool; }; } else event.finish(); 'step 3' - if (result.bool && game.hasPlayer(current => current != player)) { - player.chooseTarget('选择一名其他角色,对其造成2点雷电伤害', lib.filter.notMe, true).set('ai', target => get.damageEffect(target, player, player, 'thunder')); + if(result.bool&&game.hasPlayer(current=>current!=player)){ + player.chooseTarget('选择一名其他角色,对其造成2点雷电伤害',lib.filter.notMe,true).set('ai',target=>get.damageEffect(target,player,player,'thunder')); } 'step 4' - if (result.bool) { - player.line(result.targets[0], 'thunder'); - result.targets[0].damage(2, 'thunder'); + if(result.bool){ + player.line(result.targets[0],'thunder'); + result.targets[0].damage(2,'thunder'); } - if (event.cards.length) event.goto(1); + if(event.cards.length) event.goto(1); } }, - twdidao: { - audio: 2, - trigger: { global: 'judge' }, - filter: function (event, player) { + twdidao:{ + audio:2, + trigger:{global:'judge'}, + filter:function(event,player){ return player.countCards('hes'); }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard(get.translation(trigger.player) + '的' + (trigger.judgestr || '') + '判定为' + - get.translation(trigger.player.judging[0]) + ',' + get.prompt('twdidao'), 'hes', 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; + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为' + + get.translation(trigger.player.judging[0])+','+get.prompt('twdidao'),'hes',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) { - if (trigger.player != player) return 0; - var checkx = get.color(card, player) == get.color(judging); - if (checkx > 0) return checkx; + }).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; + var checkx=get.color(card,player)==get.color(judging); + if(checkx>0) return checkx; return 0; } - return result * (attitude > 0 ? 1 : -1); - }).set('judging', trigger.player.judging[0]); + return result*(attitude>0?1:-1); + }).set('judging',trigger.player.judging[0]); 'step 1' - if (result.bool) { - player.respond(result.cards, 'highlight', 'twdidao', 'noOrdering'); + if(result.bool){ + player.respond(result.cards,'highlight','twdidao','noOrdering'); } - else { + else{ event.finish(); } 'step 2' - if (result.bool) { + if(result.bool){ player.$gain2(trigger.player.judging[0]); player.gain(trigger.player.judging[0]); - var card = result.cards[0]; - if (get.color(card, player) == get.color(trigger.player.judging[0])) player.draw('nodelay'); - trigger.player.judging[0] = result.cards[0]; + var card=result.cards[0]; + if(get.color(card,player)==get.color(trigger.player.judging[0])) player.draw('nodelay'); + trigger.player.judging[0]=result.cards[0]; trigger.orderingCards.addArray(result.cards); - game.log(trigger.player, '的判定牌改为', result.cards[0]); + game.log(trigger.player,'的判定牌改为',result.cards[0]); } 'step 3' game.delay(2); }, - ai: { - rejudge: true, - tag: { - rejudge: 1 + ai:{ + rejudge:true, + tag:{ + rejudge:1 } } }, //群曹操 - twlingfa: { - audio: 2, - trigger: { global: 'roundStart' }, - direct: true, - content: function () { + twlingfa:{ + audio:2, + trigger:{global:'roundStart'}, + direct:true, + content:function(){ 'step 0' - if (game.roundNumber < 3 || !player.hasSkill('twlingfa')) { + if(game.roundNumber<3||!player.hasSkill('twlingfa')){ var str; - switch (game.roundNumber) { - case 1: str = '获得如下效果直到本轮结束:其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。'; break; - case 2: str = '获得如下效果直到本轮结束:其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。'; break; - default: str = '失去【令法】并获得【治暗】'; break; + switch(game.roundNumber){ + case 1:str='获得如下效果直到本轮结束:其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。';break; + case 2:str='获得如下效果直到本轮结束:其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。';break; + default:str='失去【令法】并获得【治暗】';break; } - player.chooseBool(get.prompt('twlingfa'), str); + player.chooseBool(get.prompt('twlingfa'),str); } - else event._result = { bool: true }; + else event._result={bool:true}; 'step 1' - if (result.bool) { - switch (game.roundNumber) { + if(result.bool){ + switch(game.roundNumber){ case 1: - player.logSkill('twlingfa', game.filterPlayer((current) => current != player).sortBySeat()); - player.addTempSkill('twlingfa_sha', 'roundStart'); + player.logSkill('twlingfa',game.filterPlayer((current)=>current!=player).sortBySeat()); + player.addTempSkill('twlingfa_sha','roundStart'); break; case 2: - player.logSkill('twlingfa', game.filterPlayer((current) => current != player).sortBySeat()); - player.addTempSkill('twlingfa_tao', 'roundStart'); + player.logSkill('twlingfa',game.filterPlayer((current)=>current!=player).sortBySeat()); + player.addTempSkill('twlingfa_tao','roundStart'); break; default: player.logSkill('twlingfa'); - player.addSkills(['twzhian'], ['twlingfa']); + player.addSkills(['twzhian'],['twlingfa']); break; } } }, - subSkill: { - sha: { - audio: 'twlingfa', - trigger: { global: 'useCard' }, - charlotte: true, - forced: true, - filter: function (event, player) { - return player != event.player && event.card.name == 'sha' && event.player.countCards('he') > 0; + subSkill:{ + sha:{ + audio:'twlingfa', + trigger:{global:'useCard'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player!=event.player&&event.card.name=='sha'&&event.player.countCards('he')>0; }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' game.delayx(); - trigger.player.chooseToDiscard('he', '令法:弃置一张牌,或受到来自' + get.translation(player) + '的1点伤害').set('goon', get.damageEffect(trigger.player, player, trigger.player) < 0).set('ai', function (card) { - if (!_status.event.goon) return 0; - return 8 - get.value(card); + trigger.player.chooseToDiscard('he','令法:弃置一张牌,或受到来自'+get.translation(player)+'的1点伤害').set('goon',get.damageEffect(trigger.player,player,trigger.player)<0).set('ai',function(card){ + if(!_status.event.goon) return 0; + return 8-get.value(card); }); 'step 1' - if (!result.bool) { + if(!result.bool){ trigger.player.damage(); } }, - mark: true, - marktext: '', - intro: { content: '其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。' }, + mark:true, + marktext:'', + intro:{content:'其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。'}, }, - tao: { - audio: 'twlingfa', - trigger: { global: 'useCard' }, - charlotte: true, - forced: true, - filter: function (event, player) { - return player != event.player && event.card.name == 'tao' && event.player.countCards('he') > 0; + tao:{ + audio:'twlingfa', + trigger:{global:'useCard'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player!=event.player&&event.card.name=='tao'&&event.player.countCards('he')>0; }, - logTarget: 'player', - content: function () { + logTarget:'player', + content:function(){ 'step 0' game.delayx(); - trigger.player.chooseCard('he', '令法:交给' + get.translation(player) + '一张牌,否则受到来自其的1点伤害').set('goon', get.damageEffect(trigger.player, player, trigger.player) < 0).set('ai', function (card) { - if (!_status.event.goon) return 0; - return 8 - get.value(card); + trigger.player.chooseCard('he','令法:交给'+get.translation(player)+'一张牌,否则受到来自其的1点伤害').set('goon',get.damageEffect(trigger.player,player,trigger.player)<0).set('ai',function(card){ + if(!_status.event.goon) return 0; + return 8-get.value(card); }); 'step 1' - if (!result.bool) { + if(!result.bool){ trigger.player.damage(); } - else trigger.player.give(result.cards, player); + else trigger.player.give(result.cards,player); }, - mark: true, - marktext: '', - intro: { content: '其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。' }, + mark:true, + marktext:'', + intro:{content:'其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。'}, }, }, - derivation: 'twzhian', + derivation:'twzhian', }, - twzhian: { - audio: 2, - init: function (player) { + twzhian:{ + audio:2, + init:function(player){ game.addGlobalSkill('twzhian_ai'); }, - onremove: function (player) { - if (!game.hasPlayer((current) => current.hasSkill('twzhian'), true)) game.removeGlobalSkill('twzhian_ai'); + onremove:function(player){ + if(!game.hasPlayer((current)=>current.hasSkill('twzhian'),true)) game.removeGlobalSkill('twzhian_ai'); }, - usable: 1, - trigger: { global: 'useCardAfter' }, - direct: true, - filter: function (event, player) { - var type = get.type(event.card); - if (type != 'delay' && type != 'equip') return false; - if (event.cards.length != 1) return false; - var position = get.position(event.cards[0]); - if (position == 'e' || position == 'j') return true; + usable:1, + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + var type=get.type(event.card); + if(type!='delay'&&type!='equip') return false; + if(event.cards.length!=1) return false; + var position=get.position(event.cards[0]); + if(position=='e'||position=='j') return true; return event.player.isIn(); }, - content: function () { + content:function(){ 'step 0' - var str = get.translation(trigger.cards[0]), owner = get.owner(trigger.cards[0]); - var choiceList = [ - '弃置' + (owner ? (get.translation(owner) + '区域内的') : '') + str, - '弃置一张手牌并获得' + str, - '对' + get.translation(trigger.player) + '造成1点伤害', + var str=get.translation(trigger.cards[0]),owner=get.owner(trigger.cards[0]); + var choiceList=[ + '弃置'+(owner?(get.translation(owner)+'区域内的'):'')+str, + '弃置一张手牌并获得'+str, + '对'+get.translation(trigger.player)+'造成1点伤害', ]; - var choices = []; - if (owner && lib.filter.canBeDiscarded(card, player, owner)) choices.push('选项一'); - else choiceList[0] = '' + choiceList[0] + ''; - if (owner && player.hasCard(function (card) { - return lib.filter.cardDiscardable(card, player, 'twzhian'); - }, 'h') && lib.filter.canBeGained(card, player, owner)) choices.push('选项二'); - else choiceList[1] = '' + choiceList[1] + ''; - if (trigger.player.isIn()) choices.push('选项三'); - else choiceList[2] = '' + choiceList[2] + ''; - player.chooseControl(choices, 'cancel2').set('choiceList', choiceList).set('prompt', get.prompt('twzhian')).set('ai', function () { - var player = _status.event.player, choices = _status.event.controls.slice(0); - var card = _status.event.getTrigger().cards[0], owner = get.owner(card); - var getEffect = function (choice) { - if (choice == 'cancel2') return 0.1; - if (choice == '选项三') { - return get.damageEffect(_status.event.getTrigger().player, player, player); + var choices=[]; + if(owner&&lib.filter.canBeDiscarded(card,player,owner)) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(owner&&player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'twzhian'); + },'h')&&lib.filter.canBeGained(card,player,owner)) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(trigger.player.isIn()) choices.push('选项三'); + else choiceList[2]=''+choiceList[2]+''; + player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('prompt',get.prompt('twzhian')).set('ai',function(){ + var player=_status.event.player,choices=_status.event.controls.slice(0); + var card=_status.event.getTrigger().cards[0],owner=get.owner(card); + var getEffect=function(choice){ + if(choice=='cancel2') return 0.1; + if(choice=='选项三'){ + return get.damageEffect(_status.event.getTrigger().player,player,player); } var result; - if (get.position(card) == 'j') { - result = -get.effect(player, { - name: card.viewAs || card.name, - cards: [card], - }, player, player) * get.sgn(get.attitude(player, owner)); + if(get.position(card)=='j'){ + result=-get.effect(player,{ + name:card.viewAs||card.name, + cards:[card], + },player,player)*get.sgn(get.attitude(player,owner)); } - else result = -(get.value(card, owner) - 0.01) * get.sgn(get.attitude(player, owner)); - if (choice == '选项一') return result; - if (player.hasCard(function (cardx) { - return lib.filter.cardDiscardable(cardx, player, 'twzhian') && get.value(cardx, player) < get.value(card, player); - }, 'h')) return result * 1.2; + else result=-(get.value(card,owner)-0.01)*get.sgn(get.attitude(player,owner)); + if(choice=='选项一') return result; + if(player.hasCard(function(cardx){ + return lib.filter.cardDiscardable(cardx,player,'twzhian')&&get.value(cardx,player) current.hasSkill('twzhian'), true); + subSkill:{ + ai:{ + trigger:{player:'dieAfter'}, + filter:function(event,player){ + return !game.hasPlayer((current)=>current.hasSkill('twzhian'),true); }, - silent: true, - forceDie: true, - content: function () { + silent:true, + forceDie:true, + content:function(){ game.removeGlobalSkill('twzhian_ai'); }, - ai: { - effect: { - player: function (card, player, target) { - if (get.type(card) !== 'delay' && get.type(card) !== 'equip') return 1; - let za = game.findPlayer((cur) => cur.hasSkill('twzhian') && (!cur.storage.counttrigger || !cur.storage.counttrigger.twzhian) && get.attitude(player, cur) <= 0); - if (za) return [0.5, -0.8]; + ai:{ + effect:{ + player:function(card,player,target){ + if(get.type(card)!=='delay'&&get.type(card)!=='equip') return 1; + let za=game.findPlayer((cur)=>cur.hasSkill('twzhian')&&(!cur.storage.counttrigger||!cur.storage.counttrigger.twzhian)&&get.attitude(player,cur)<=0); + if(za) return [0.5,-0.8]; } } } } } }, - twyujue: { - audio: 2, - global: 'twyujue_give', - trigger: { - player: 'gainAfter', - global: 'loseAsyncAfter', + twyujue:{ + audio:2, + global:'twyujue_give', + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', }, - direct: true, - filter: function (event, player) { - if (player == _status.currentPhase) return false; - var cards = event.getg(player); - if (!cards.length) return false; - return game.hasPlayer(function (current) { - if (current == player) return false; - var evt = event.getl(current); - if (!evt || !evt.cards2 || !evt.cards2.filter((card) => cards.includes(card)).length) return false; - return (!current.hasSkill('twyujue_effect0')) || (!current.hasSkill('twyujue_effect1')); + direct:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + var cards=event.getg(player); + if(!cards.length) return false; + return game.hasPlayer(function(current){ + if(current==player) return false; + var evt=event.getl(current); + if(!evt||!evt.cards2||!evt.cards2.filter((card)=>cards.includes(card)).length) return false; + return (!current.hasSkill('twyujue_effect0'))||(!current.hasSkill('twyujue_effect1')); }) }, - content: function () { + content:function(){ 'step 0' - var cards = trigger.getg(player); - var list = game.filterPlayer(function (current) { - if (current == player) return false; - var evt = trigger.getl(current); - if (!evt || !evt.cards2 || !evt.cards2.filter((card) => cards.includes(card)).length) return false; - return (!current.hasSkill('twyujue_effect0')) || (!current.hasSkill('twyujue_effect1')); + var cards=trigger.getg(player); + var list=game.filterPlayer(function(current){ + if(current==player) return false; + var evt=trigger.getl(current); + if(!evt||!evt.cards2||!evt.cards2.filter((card)=>cards.includes(card)).length) return false; + return (!current.hasSkill('twyujue_effect0'))||(!current.hasSkill('twyujue_effect1')); }).sortBySeat(); - event.targets = list; + event.targets=list; 'step 1' - var target = event.targets.shift(); - if (target.isIn()) { - event.target = target; - var num = 2; - if (target.hasSkill('twyujue_effect0')) num--; - if (target.hasSkill('twyujue_effect1')) num--; - var cards = trigger.getg(player); - num = Math.min(num, trigger.getl(target).cards2.filter(i => cards.includes(i)).length); - if (num > 0) event.count = num; - else if (targets.length > 0) event.redo(); + var target=event.targets.shift(); + if(target.isIn()){ + event.target=target; + var num=2; + if(target.hasSkill('twyujue_effect0')) num--; + if(target.hasSkill('twyujue_effect1')) num--; + var cards=trigger.getg(player); + num=Math.min(num,trigger.getl(target).cards2.filter(i=>cards.includes(i)).length); + if(num>0) event.count=num; + else if(targets.length>0) event.redo(); else event.finish(); } - else if (targets.length > 0) event.redo(); + else if(targets.length>0) event.redo(); else event.finish(); 'step 2' event.count--; - player.chooseBool(get.prompt('twyujue', target), '可令其选择本回合内未选择过的一项:⒈弃置攻击范围内一名角色的一张牌。⒉下一次使用牌时,从牌堆中获得一张同类别的牌。').set('ai', function () { - var evt = _status.event.getParent(); - return get.attitude(evt.player, evt.target) > 0; + player.chooseBool(get.prompt('twyujue',target),'可令其选择本回合内未选择过的一项:⒈弃置攻击范围内一名角色的一张牌。⒉下一次使用牌时,从牌堆中获得一张同类别的牌。').set('ai',function(){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,evt.target)>0; }); 'step 3' - if (result.bool) { - player.logSkill('twyujue', target); - var list = [0, 1]; - if (target.hasSkill('twyujue_effect0')) list.remove(0); - if (target.hasSkill('twyujue_effect1')) list.remove(1); - if (!list.length) event.goto(6); - else if (list.length == 1) event._result = { index: list[0] }; - else target.chooseControl().set('choiceList', ['弃置攻击范围内一名角色的一张牌', '下一次使用牌时,从牌堆中获得一张同类别的牌']).set('ai', function () { - var player = _status.event.player; - if (game.hasPlayer(function (current) { - return player.inRange(current) && current.countDiscardableCards(player, 'he') > 0 && get.effect(current, { name: 'guohe_copy2' }, player, player) > 0; + if(result.bool){ + player.logSkill('twyujue',target); + var list=[0,1]; + if(target.hasSkill('twyujue_effect0')) list.remove(0); + if(target.hasSkill('twyujue_effect1')) list.remove(1); + if(!list.length) event.goto(6); + else if(list.length==1) event._result={index:list[0]}; + else target.chooseControl().set('choiceList',['弃置攻击范围内一名角色的一张牌','下一次使用牌时,从牌堆中获得一张同类别的牌']).set('ai',function(){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return player.inRange(current)&¤t.countDiscardableCards(player,'he')>0&&get.effect(current,{name:'guohe_copy2'},player,player)>0; })) return 0; return 1; }); } else event.goto(6); 'step 4' - target.addTempSkill('twyujue_effect' + result.index); - if (result.index == 0) { - if (game.hasPlayer(function (current) { - return target.inRange(current) && current.countDiscardableCards(target, 'he') > 0; - })) { - target.chooseTarget('弃置攻击范围内一名角色的一张牌', true, function (card, player, target) { - return player.inRange(target) && target.countDiscardableCards(player, 'he') > 0; - }).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'guohe_copy2' }, player, player) + target.addTempSkill('twyujue_effect'+result.index); + if(result.index==0){ + if(game.hasPlayer(function(current){ + return target.inRange(current)&¤t.countDiscardableCards(target,'he')>0; + })){ + target.chooseTarget('弃置攻击范围内一名角色的一张牌',true,function(card,player,target){ + return player.inRange(target)&&target.countDiscardableCards(player,'he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe_copy2'},player,player) }); } else event.goto(6); } else event.goto(6); 'step 5' - if (result.bool) { - var target2 = result.targets[0]; - target.line(target2, 'green'); - target.discardPlayerCard(target2, 'he', true); + if(result.bool){ + var target2=result.targets[0]; + target.line(target2,'green'); + target.discardPlayerCard(target2,'he',true); } 'step 6' game.delayx(); - if (event.count > 0) event.goto(2); - else if (targets.length) event.goto(1); + if(event.count>0) event.goto(2); + else if(targets.length) event.goto(1); }, - subSkill: { - clear: { - onremove: true, + subSkill:{ + clear:{ + onremove:true, }, - effect0: { charlotte: true }, - effect1: { - charlotte: true, - trigger: { player: 'useCard' }, - usable: 1, - forced: true, - popup: false, - content: function () { + effect0:{charlotte:true}, + effect1:{ + charlotte:true, + trigger:{player:'useCard'}, + usable:1, + forced:true, + popup:false, + content:function(){ player.unmarkSkill('twyujue_effect1'); - var type2 = get.type2(trigger.card, false); - var card = get.cardPile2(function (card) { - return get.type2(card, false) == type2; + var type2=get.type2(trigger.card,false); + var card=get.cardPile2(function(card){ + return get.type2(card,false)==type2; }); - if (card) trigger.player.gain(card, 'gain2'); + if(card) trigger.player.gain(card,'gain2'); }, - mark: true, - marktext: '爵', - intro: { content: '使用下一张牌时,从牌堆中获得一张类型相同的牌' }, + mark:true, + marktext:'爵', + intro:{content:'使用下一张牌时,从牌堆中获得一张类型相同的牌'}, }, }, }, - twyujue_give: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - if (!player.countCards('he')) return false; - var targets = game.filterPlayer(function (current) { - return current != player && current.hasSkill('twyujue'); + twyujue_give:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + if(!player.countCards('he')) return false; + var targets=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('twyujue'); }); - if (!targets.length) return false; - for (var target of targets) { - var num = 2; - if (player.group == 'qun' && target.hasZhuSkill('twfengqi', player)) num = 4; - if (target.countMark('twyujue_clear') < num) return true; + if(!targets.length) return false; + for(var target of targets){ + var num=2; + if(player.group=='qun'&&target.hasZhuSkill('twfengqi',player)) num=4; + if(target.countMark('twyujue_clear')= Math.max(1, ui.selected.cards.length); + filterCard:true, + filterTarget:function(card,player,target){ + if(!target.hasSkill('twyujue')) return false; + var num=2; + if(player.group=='qun'&&target.hasZhuSkill('twfengqi',player)) num=4; + return (num-target.countMark('twyujue_clear'))>=Math.max(1,ui.selected.cards.length); }, - selectTarget: function () { - var player = _status.event.player; - var targets = game.filterPlayer(function (current) { - return current != player && current.hasSkill('twyujue'); + selectTarget:function(){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('twyujue'); }); - return targets.length > 1 ? 1 : -1; + return targets.length>1?1:-1; }, - complexSelect: true, - prompt: function () { - var player = _status.event.player; - var targets = game.filterPlayer(function (current) { - return current != player && current.hasSkill('twyujue'); + complexSelect:true, + prompt:function(){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('twyujue'); }); - return '将任意张牌交给' + get.translation(targets) + (targets.length > 1 ? '中的一人' : ''); + return '将任意张牌交给'+get.translation(targets)+(targets.length>1?'中的一人':''); }, - position: 'he', - discard: false, - lose: false, - delay: false, - check: function (card) { - if (ui.selected.cards.length) return 0; - var player = _status.event.player; - if (game.hasPlayer(function (current) { - return lib.skill.twyujue_give.filterTarget(null, player, current) && get.attitude(player, current) > 0; - })) { - var val = get.value(card); - if (val <= 0 && get.position(card) == 'e') return 100 - val; - if (!player.hasSkill('twyujue_effect1') && player.hasCard(function (cardx) { - return cardx != card && player.getUseValue(cardx, null, true) > 0; - }, 'hs')) return 6 - get.value(card); - if (!player.hasSkill('twyujue_effect0') && game.hasPlayer(function (current) { - return player.inRange(current) && current.countDiscardableCards(player, 'he') > 0 && get.effect(current, { name: 'guohe_copy2' }, player, player) > 0; - })) return 5.5 - get.value(card); + position:'he', + discard:false, + lose:false, + delay:false, + check:function(card){ + if(ui.selected.cards.length) return 0; + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return lib.skill.twyujue_give.filterTarget(null,player,current)&&get.attitude(player,current)>0; + })){ + var val=get.value(card); + if(val<=0&&get.position(card)=='e') return 100-val; + if(!player.hasSkill('twyujue_effect1')&&player.hasCard(function(cardx){ + return cardx!=card&&player.getUseValue(cardx,null,true)>0; + },'hs')) return 6-get.value(card); + if(!player.hasSkill('twyujue_effect0')&&game.hasPlayer(function(current){ + return player.inRange(current)&¤t.countDiscardableCards(player,'he')>0&&get.effect(current,{name:'guohe_copy2'},player,player)>0; + })) return 5.5-get.value(card); } return 0; }, - content: function () { - game.trySkillAudio('twyujue', target); - player.give(cards, target); + content:function(){ + game.trySkillAudio('twyujue',target); + player.give(cards,target); target.addTempSkill('twyujue_clear'); - target.addMark('twyujue_clear', cards.length, false); + target.addMark('twyujue_clear',cards.length,false); }, - ai: { - order: 10, - result: { target: 1 }, + ai:{ + order:10, + result:{target:1}, }, }, - twgezhi: { - audio: 2, - trigger: { player: 'useCard' }, - direct: true, - filter: function (event, player) { - if (!player.countCards('h')) return false; - var evt = event.getParent('phaseUse'); - if (!evt || evt.player != player) return false; - var type = get.type2(event.card, false); - return !player.hasHistory('useCard', function (evtx) { - return evtx != event && get.type2(evtx.card, false) == type && evtx.getParent('phaseUse') == evt; - }, event); + twgezhi:{ + audio:2, + trigger:{player:'useCard'}, + direct:true, + filter:function(event,player){ + if(!player.countCards('h')) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var type=get.type2(event.card,false); + return !player.hasHistory('useCard',function(evtx){ + return evtx!=event&&get.type2(evtx.card,false)==type&&evtx.getParent('phaseUse')==evt; + },event); }, - content: function () { + content:function(){ 'step 0' - if (!event.isMine() && !event.isOnline()) game.delayx(); - player.chooseCard('是否发动【革制】重铸一张牌?', lib.filter.cardRecastable).set('ai', function (card) { - return 5.5 - get.value(card); + if(!event.isMine()&&!event.isOnline()) game.delayx(); + player.chooseCard('是否发动【革制】重铸一张牌?',lib.filter.cardRecastable).set('ai',function(card){ + return 5.5-get.value(card); }); 'step 1' - if (result.bool) { + if(result.bool){ player.logSkill('twgezhi'); player.recast(result.cards); } }, - group: 'twgezhi_buff', - subSkill: { - buff: { - audio: 'twgezhi', - trigger: { player: 'phaseUseEnd' }, - direct: true, - filter: function (event, player) { - return player.getHistory('lose', function (evt) { - return evt.getParent(3).name == 'twgezhi' && evt.getParent('phaseUse') == event; - }).length > 1; + group:'twgezhi_buff', + subSkill:{ + buff:{ + audio:'twgezhi', + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event,player){ + return player.getHistory('lose',function(evt){ + return evt.getParent(3).name=='twgezhi'&&evt.getParent('phaseUse')==event; + }).length>1; }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('twgezhi'), '你可以令一名角色选择获得一个其未获得过的效果:⒈攻击范围+2;⒉手牌上限+2;⒊加1点体力上限。', function (card, player, target) { - return !target.hasSkill('twgezhi_选项一') || !target.hasSkill('twgezhi_选项二') || !target.hasSkill('twgezhi_选项三'); - }).set('ai', function (target) { - return get.attitude(_status.event.player, target); + player.chooseTarget(get.prompt('twgezhi'),'你可以令一名角色选择获得一个其未获得过的效果:⒈攻击范围+2;⒉手牌上限+2;⒊加1点体力上限。',function(card,player,target){ + return !target.hasSkill('twgezhi_选项一')||!target.hasSkill('twgezhi_选项二')||!target.hasSkill('twgezhi_选项三'); + }).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('twgezhi', target); - var list = []; - for (var i = 1; i <= 3; i++) { - var str = '选项' + get.cnNumber(i, true); - if (!target.hasSkill('twgezhi_' + str)) list.push(str); + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('twgezhi',target); + var list=[]; + for(var i=1;i<=3;i++){ + var str='选项'+get.cnNumber(i,true); + if(!target.hasSkill('twgezhi_'+str)) list.push(str); } - if (list.length == 1) event._result = { control: list[0] }; - else target.chooseControl(list).set('choiceList', ['令自己的攻击范围+2', '令自己的手牌上限+2', '令自己的体力上限+1']).set('ai', function () { - var player = _status.event.player, controls = _status.event.controls; - if (controls.includes('选项一') && game.hasPlayer(function (current) { - return (get.realAttitude || get.attitude)(player, current) < 0 && get.distance(player, current, 'attack') > 1; + if(list.length==1) event._result={control:list[0]}; + else target.chooseControl(list).set('choiceList',['令自己的攻击范围+2','令自己的手牌上限+2','令自己的体力上限+1']).set('ai',function(){ + var player=_status.event.player,controls=_status.event.controls; + if(controls.includes('选项一')&&game.hasPlayer(function(current){ + return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current,'attack')>1; })) return '选项一'; - if (controls.includes('选项二') && player.needsToDiscard()) return '选项二'; - if (controls.includes('选项三')) return '选项三'; + if(controls.includes('选项二')&&player.needsToDiscard()) return '选项二'; + if(controls.includes('选项三')) return '选项三'; return controls.randomGet(); }); } - else { - event._triggered = null; + else{ + event._triggered=null; event.finish(); } 'step 2' - target.addSkill('twgezhi_' + result.control); - if (result.control == '选项三') target.gainMaxHp(); + target.addSkill('twgezhi_'+result.control); + if(result.control=='选项三') target.gainMaxHp(); 'step 3' game.delayx(); }, }, - 选项一: { - charlotte: true, - mod: { - attackFrom: function (from, to, distance) { - return distance - 2; + 选项一:{ + charlotte:true, + mod:{ + attackFrom:function(from,to,distance){ + return distance-2; }, }, - mark: true, - marktext: ' +2 ', - intro: { content: '攻击范围+2' }, + mark:true, + marktext:' +2 ', + intro:{content:'攻击范围+2'}, }, - 选项二: { - charlotte: true, - mod: { - maxHandcard: function (player, num) { - return num + 2; + 选项二:{ + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+2; }, }, - mark: true, - marktext: ' +2 ', - intro: { content: '手牌上限+2' }, + mark:true, + marktext:' +2 ', + intro:{content:'手牌上限+2'}, }, - 选项三: { - charlotte: true, - mark: true, - marktext: ' +1 ', - intro: { content: '体力上限+1' }, + 选项三:{ + charlotte:true, + mark:true, + marktext:' +1 ', + intro:{content:'体力上限+1'}, }, }, }, - twfengqi: { - audio: 2, - zhuSkill: true, - trigger: { player: 'twgezhi_buffAfter' }, - direct: true, - filter: function (event, player) { - if (!event.target || !event.target.isIn() || !player.hasZhuSkill('twfengqi', event.target)) return false; - var target = event.target; - return target.getStockSkills(true, true).some(skill => { - if (target.hasSkill(skill)) return false; - var info = get.info(skill); - return info && info.zhuSkill; + twfengqi:{ + audio:2, + zhuSkill:true, + trigger:{player:'twgezhi_buffAfter'}, + direct:true, + filter:function(event,player){ + if(!event.target||!event.target.isIn()||!player.hasZhuSkill('twfengqi',event.target)) return false; + var target=event.target; + return target.getStockSkills(true,true).some(skill=>{ + if(target.hasSkill(skill)) return false; + var info=get.info(skill); + return info&&info.zhuSkill; }); }, - skillAnimation: true, - animationColor: 'thunder', - content: function () { + skillAnimation:true, + animationColor:'thunder', + content:function(){ 'step 0' - event.target = trigger.target; - event.target.chooseBool(get.prompt('twfengqi'), '获得武将牌上的所有主公技'); + event.target=trigger.target; + event.target.chooseBool(get.prompt('twfengqi'),'获得武将牌上的所有主公技'); 'step 1' - if (result.bool) { - target.logSkill('twfengqi', player); - var skills = target.getStockSkills(true, true).filter(skill => { - if (target.hasSkill(skill)) return false; - var info = get.info(skill); - return info && info.zhuSkill; + if(result.bool){ + target.logSkill('twfengqi',player); + var skills=target.getStockSkills(true,true).filter(skill=>{ + if(target.hasSkill(skill)) return false; + var info=get.info(skill); + return info&&info.zhuSkill; }); target.addSkills(skills); //for(var i of skills) target.addSkillLog(i); } }, }, - twsidai: { - audio: 2, - enable: 'phaseUse', - usable: 1, - locked: false, - limited: true, - skillAnimation: true, - animationColor: 'fire', - filter: function (event, player) { - var cards = player.getCards('h', { type: 'basic' }); - if (!cards.length) return false; - for (var i of cards) { - if (!game.checkMod(i, player, 'unchanged', 'cardEnabled2', player)) return false; + twsidai:{ + audio:2, + enable:'phaseUse', + usable:1, + locked:false, + limited:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + var cards=player.getCards('h',{type:'basic'}); + if(!cards.length) return false; + for(var i of cards){ + if(!game.checkMod(i,player,'unchanged','cardEnabled2',player)) return false; } - return event.filterCard(get.autoViewAs({ name: 'sha', storage: { twsidai: true } }, cards), player, event); + return event.filterCard(get.autoViewAs({name:'sha',storage:{twsidai:true}},cards),player,event); }, - viewAs: { name: 'sha', storage: { twsidai: true } }, - filterCard: { type: 'basic' }, - selectCard: -1, - check: () => 1, - onuse: function (result, player) { + viewAs:{name:'sha',storage:{twsidai:true}}, + filterCard:{type:'basic'}, + selectCard:-1, + check:()=>1, + onuse:function(result,player){ player.awakenSkill('twsidai'); player.addTempSkill('twsidai_effect'); }, - ai: { - order: 2.9, - result: { - target: function (player, target) { - var cards = ui.selected.cards.slice(0); - var names = []; - for (var i of cards) names.add(i.name); - if (names.length < player.hp) return 0; - if (player.hasUnknown() && (player.identity != 'fan' || !target.isZhu)) return 0; - if (get.attitude(player, target) >= 0) return -20; - return lib.card.sha.ai.result.target.apply(this, arguments); + ai:{ + order:2.9, + result:{ + target:function(player,target){ + var cards=ui.selected.cards.slice(0); + var names=[]; + for(var i of cards) names.add(i.name); + if(names.length=0) return -20; + return lib.card.sha.ai.result.target.apply(this,arguments); }, }, }, - mod: { - cardUsable: function (card) { - if (card.storage && card.storage.twsidai) return Infinity; + mod:{ + cardUsable:function(card){ + if(card.storage&&card.storage.twsidai) return Infinity; }, - targetInRange: function (card) { - if (card.storage && card.storage.twsidai) return true; + targetInRange:function(card){ + if(card.storage&&card.storage.twsidai) return true; }, }, - subSkill: { - effect: { - charlotte: true, - trigger: { source: 'damageBegin1' }, - filter: function (event, player) { - if (!event.card || !event.card.storage || !event.card.storage.twsidai || event.getParent().type != 'card') return false; - for (var i of event.cards) { - if (i.name == 'jiu') return true; + subSkill:{ + effect:{ + charlotte:true, + trigger:{source:'damageBegin1'}, + filter:function(event,player){ + if(!event.card||!event.card.storage||!event.card.storage.twsidai||event.getParent().type!='card') return false; + for(var i of event.cards){ + if(i.name=='jiu') return true; } return false; }, - forced: true, - popup: false, - content: function () { - trigger.num *= 2; - game.log(trigger.card, '的伤害值', '#y×2'); + forced:true, + popup:false, + content:function(){ + trigger.num*=2; + game.log(trigger.card,'的伤害值','#y×2'); }, - group: ['twsidai_tao', 'twsidai_shan'], + group:['twsidai_tao','twsidai_shan'], }, - tao: { - trigger: { source: 'damageSource' }, - filter: function (event, player) { - if (!event.card || !event.card.storage || !event.card.storage.twsidai || !event.player.isIn()) return false; - for (var i of event.cards) { - if (i.name == 'tao') return true; + tao:{ + trigger:{source:'damageSource'}, + filter:function(event,player){ + if(!event.card||!event.card.storage||!event.card.storage.twsidai||!event.player.isIn()) return false; + for(var i of event.cards){ + if(i.name=='tao') return true; } return false; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ trigger.player.loseMaxHp(); }, }, - shan: { - trigger: { player: 'useCardToPlayered' }, - filter: function (event, player) { - if (!event.card || !event.card.storage || !event.card.storage.twsidai || !event.target.isIn()) return false; - for (var i of event.cards) { - if (i.name == 'shan') return true; + shan:{ + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.card||!event.card.storage||!event.card.storage.twsidai||!event.target.isIn()) return false; + for(var i of event.cards){ + if(i.name=='shan') return true; } return false; }, - forced: true, - popup: false, - content: function () { + forced:true, + popup:false, + content:function(){ 'step 0' - trigger.target.chooseToDiscard('h', { type: 'basic' }, '弃置一张基本牌,否则不能响应' + get.translation(trigger.card)).set('ai', function (card) { - var player = _status.event.player; - if (player.hasCard('hs', function (cardx) { - return cardx != card && get.name(cardx, player) == 'shan'; - })) return 12 - get.value(card); + trigger.target.chooseToDiscard('h',{type:'basic'},'弃置一张基本牌,否则不能响应'+get.translation(trigger.card)).set('ai',function(card){ + var player=_status.event.player; + if(player.hasCard('hs',function(cardx){ + return cardx!=card&&get.name(cardx,player)=='shan'; + })) return 12-get.value(card); return 0; }); 'step 1' - if (!result.bool) trigger.directHit.add(trigger.target); + if(!result.bool) trigger.directHit.add(trigger.target); }, }, }, }, - twjieyu: { - audio: 2, - trigger: { player: ['phaseJieshuBegin', 'damageEnd'] }, - round: 1, - filter: function (event, player) { - if (event.name != 'phaseJieshu') { - var history = player.getHistory('damage'); - for (var i of history) { - if (i == event) break; + twjieyu:{ + audio:2, + trigger:{player:['phaseJieshuBegin','damageEnd']}, + round:1, + filter:function(event,player){ + if(event.name!='phaseJieshu'){ + var history=player.getHistory('damage'); + for(var i of history){ + if(i==event) break; return false; } - var all = player.actionHistory; - for (var i = all.length - 2; i >= 0; i--) { - if (all[i].damage.length) return false; - if (all[i].isRound) break; + var all=player.actionHistory; + for(var i=all.length-2;i>=0;i--){ + if(all[i].damage.length) return false; + if(all[i].isRound) break; } } - return player.countCards('h') > 0 && !player.hasCard(function (card) { - return !lib.filter.cardDiscardable(card, player, 'twjieyu'); - }, 'h') + return player.countCards('h')>0&&!player.hasCard(function(card){ + return !lib.filter.cardDiscardable(card,player,'twjieyu'); + },'h') }, - check: function (event, player) { - var cards = [], names = []; - for (var i = 0; i < ui.discardPile.childNodes.length; i++) { - var card = ui.discardPile.childNodes[i]; - if (get.type(card, false) == 'basic' && !names.includes(card.name)) { + check:function(event,player){ + var cards=[],names=[]; + for(var i=0;i effect1; + check:function(event,player){ + var effect1=get.effect(event.target,event.card,player,player); + var effect2=0,targets=lib.skill.twhengjiang.logTarget(event,player); + for(var i of targets) effect2+=get.effect(i,event.card,player,player); + return effect2>effect1; }, - content: function () { - var targets = lib.skill.twhengjiang.logTarget(trigger, player); - trigger.targets.length = 0; + content:function(){ + var targets=lib.skill.twhengjiang.logTarget(trigger,player); + trigger.targets.length=0; trigger.targets.addArray(targets); - trigger.getParent().triggeredTargets1.length = 0; - trigger.getParent().twhengjiang_buffed = true; - player.addTempSkill('twhengjiang2', 'phaseUseAfter'); + trigger.getParent().triggeredTargets1.length=0; + trigger.getParent().twhengjiang_buffed=true; + player.addTempSkill('twhengjiang2','phaseUseAfter'); }, }, - twhengjiang2: { - charlotte: true, - trigger: { player: 'useCardAfter' }, - forced: true, - popup: false, - filter: function (event, player) { - return event.twhengjiang_buffed && game.hasPlayer2(function (current) { - return current != player && (current.hasHistory('useCard', function (evt) { - return evt.respondTo && evt.respondTo[1] == event.card; - }) || current.hasHistory('respond', function (evt) { - return evt.respondTo && evt.respondTo[1] == event.card; + twhengjiang2:{ + charlotte:true, + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.twhengjiang_buffed&&game.hasPlayer2(function(current){ + return current!=player&&(current.hasHistory('useCard',function(evt){ + return evt.respondTo&&evt.respondTo[1]==event.card; + })||current.hasHistory('respond',function(evt){ + return evt.respondTo&&evt.respondTo[1]==event.card; })) }); }, - content: function () { - player.draw(game.countPlayer2(function (current) { - return current != player && (current.hasHistory('useCard', function (evt) { - return evt.respondTo && evt.respondTo[1] == trigger.card; - }) || current.hasHistory('respond', function (evt) { - return evt.respondTo && evt.respondTo[1] == trigger.card; + content:function(){ + player.draw(game.countPlayer2(function(current){ + return current!=player&&(current.hasHistory('useCard',function(evt){ + return evt.respondTo&&evt.respondTo[1]==trigger.card; + })||current.hasHistory('respond',function(evt){ + return evt.respondTo&&evt.respondTo[1]==trigger.card; })) })); }, }, - twyuanhu: { - audio: 'yuanhu', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.hasCard({ type: 'equip' }, 'eh'); + twyuanhu:{ + audio:'yuanhu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hasCard({type:'equip'},'eh'); }, - filterCard: { type: 'equip' }, - filterTarget: function (card, player, target) { - var card = ui.selected.cards[0]; + filterCard:{type:'equip'}, + filterTarget:function(card,player,target){ + var card=ui.selected.cards[0]; return target.canEquip(card); }, - discard: false, - lose: false, - prepare: 'give', - position: 'he', - check: function (card) { - if (get.position(card) == 'h') return 9 - get.value(card); - return 7 - get.value(card); + discard:false, + lose:false, + prepare:'give', + position:'he', + check:function(card){ + if(get.position(card)=='h') return 9-get.value(card); + return 7-get.value(card); }, - content: function () { + content:function(){ 'step 0' target.equip(cards[0]); 'step 1' event.goto(3); - switch (get.subtype(cards[0])) { + switch(get.subtype(cards[0])){ case 'equip1': - if (game.hasPlayer(function (current) { - return current != target && get.distance(target, current) == 1 && current.countCards('hej') > 0; - })) { - player.chooseTarget(true, '弃置一名距离' + get.translation(target) + '为1的角色区域内的一张牌', function (card, player, target) { - var current = _status.event.current; - return current != target && get.distance(current, target) == 1 && current.countCards('hej') > 0; - }).set('current', target).set('ai', function (target) { - var player = _status.event.player; - return get.effect(target, { name: 'guohe_copy' }, player, player); + if(game.hasPlayer(function(current){ + return current!=target&&get.distance(target,current)==1&¤t.countCards('hej')>0; + })){ + player.chooseTarget(true,'弃置一名距离'+get.translation(target)+'为1的角色区域内的一张牌',function(card,player,target){ + var current=_status.event.current; + return current!=target&&get.distance(current,target)==1&¤t.countCards('hej')>0; + }).set('current',target).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe_copy'},player,player); }); event.goto(2); } @@ -13379,1683 +13379,1683 @@ game.import('character', function (lib, game, ui, get, ai, _status) { break; } 'step 2' - var target = result.targets[0]; + var target=result.targets[0]; player.line(target); - player.discardPlayerCard(target, true, 'hej'); + player.discardPlayerCard(target,true,'hej'); 'step 3' - if (target.hp <= player.hp || target.countCards('h') <= player.countCards('h')) { + if(target.hp<=player.hp||target.countCards('h')<=player.countCards('h')){ player.draw(); player.addTempSkill('twyuanhu_end'); } }, - ai: { - order: 10, - result: { - player: function (player, target) { - if (get.attitude(player, target) == 0) return 0; - if (!ui.selected.cards.length) return; - var eff = get.effect(target, ui.selected.cards[0], player, player), sub = get.subtype(ui.selected.cards[0], false); - if (target == player) eff += 4; - else { - var hp = player.hp, hs = player.countCards('h', (card) => card != ui.selected.cards[0]); - var tp = target.hp, ts = target.countCards('h'); - if (sub == 'equip2') ts++; - if (tp < target.maxHp && (sub == 'equip3' || sub == 'equip4' || sub == 'equip5')) tp++; - if (tp <= hp || ts <= hs) eff += 2; + ai:{ + order:10, + result:{ + player:function(player,target){ + if(get.attitude(player,target)==0) return 0; + if(!ui.selected.cards.length) return; + var eff=get.effect(target,ui.selected.cards[0],player,player),sub=get.subtype(ui.selected.cards[0],false); + if(target==player) eff+=4; + else{ + var hp=player.hp,hs=player.countCards('h',(card)=>card!=ui.selected.cards[0]); + var tp=target.hp,ts=target.countCards('h'); + if(sub=='equip2') ts++; + if(tp b - a); - if (list.length) eff += list[0]; + if(sub=='equip1'){ + var list=game.filterPlayer(function(current){ + return current!=target&&get.distance(target,current)==1&¤t.countCards('hej')<0; + }).map(function(i){ + return get.effect(i,{name:'guohe_copy'},player,player); + }).sort((a,b)=>b-a); + if(list.length) eff+=list[0]; } return eff; }, - target: function (player, target) { - if (!ui.selected.cards.length) return 0; - var sub = get.subtype(ui.selected.cards[0], false); - var eff = get.effect(target, ui.selected.cards[0], player, target); - if (sub == 'equip2') eff += (get.effect(target, { name: 'draw' }, target, target)); - if (target.isDamaged() && (sub == 'equip3' || sub == 'equip4' || sub == 'equip5')) eff += get.recoverEffect(target, player, player); + target:function(player,target){ + if(!ui.selected.cards.length) return 0; + var sub=get.subtype(ui.selected.cards[0],false); + var eff=get.effect(target,ui.selected.cards[0],player,target); + if(sub=='equip2') eff+=(get.effect(target,{name:'draw'},target,target)); + if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) eff+=get.recoverEffect(target,player,player); return eff; }, }, }, - subSkill: { - end: { - trigger: { player: 'phaseJieshuBegin' }, - direct: true, - charlotte: true, - filter: function (event, player) { - return player.hasSkill('twyuanhu') && player.hasCard({ type: 'equip' }, 'eh'); + subSkill:{ + end:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + charlotte:true, + filter:function(event,player){ + return player.hasSkill('twyuanhu')&&player.hasCard({type:'equip'},'eh'); }, - content: function () { + content:function(){ 'step 0' player.chooseCardTarget({ - prompt: get.prompt('twyuanhu'), - prompt2: '将一张装备牌置入一名角色的装备区内。若此牌为:武器牌,你弃置与其距离为1的另一名角色区域的一张牌;防具牌,其摸一张牌;坐骑牌或宝物牌,其回复1点体力。然后若其体力值或手牌数不大于你,则你摸一张牌。', - filterCard: lib.skill.twyuanhu.filterCard, - filterTarget: lib.skill.twyuanhu.filterTarget, - position: 'he', - ai1: lib.skill.twyuanhu.check, - ai2: function (target) { - var player = _status.event.player; - return get.effect(target, 'twyuanhu', player, player); + prompt:get.prompt('twyuanhu'), + prompt2:'将一张装备牌置入一名角色的装备区内。若此牌为:武器牌,你弃置与其距离为1的另一名角色区域的一张牌;防具牌,其摸一张牌;坐骑牌或宝物牌,其回复1点体力。然后若其体力值或手牌数不大于你,则你摸一张牌。', + filterCard:lib.skill.twyuanhu.filterCard, + filterTarget:lib.skill.twyuanhu.filterTarget, + position:'he', + ai1:lib.skill.twyuanhu.check, + ai2:function(target){ + var player=_status.event.player; + return get.effect(target,'twyuanhu',player,player); }, }); 'step 1' - if (result.bool) { - result.skill = 'twyuanhu'; - player.useResult(result, event); + if(result.bool){ + result.skill='twyuanhu'; + player.useResult(result,event); } }, }, }, }, - twjuezhu: { - audio: 2, - limited: true, - trigger: { player: 'phaseZhunbeiBegin' }, - direct: true, - filter: function (event, player) { - return player.hasEnabledSlot(3) || player.hasEnabledSlot(4); + twjuezhu:{ + audio:2, + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return player.hasEnabledSlot(3)||player.hasEnabledSlot(4); }, - skillAnimation: true, - animationColor: 'water', - content: function () { + skillAnimation:true, + animationColor:'water', + content:function(){ 'step 0' - player.chooseTarget(get.prompt2('twjuezhu'), [1, 2], function (card, player, target) { - return !ui.selected.targets.length && !target.hasSkill('feiying'); - }).set('promptbar', 'none').set('ai', function (target) { - if (player.hasUnknown()) return false; - return get.attitude(player, target); + player.chooseTarget(get.prompt2('twjuezhu'),[1,2],function(card,player,target){ + return !ui.selected.targets.length&&!target.hasSkill('feiying'); + }).set('promptbar','none').set('ai',function(target){ + if(player.hasUnknown()) return false; + return get.attitude(player,target); }); 'step 1' - if (result.bool) { - event.target = result.targets[0]; - var list = []; - if (player.hasEnabledSlot(3)) list.push('equip3'); - if (player.hasEnabledSlot(4)) list.push('equip4'); - if (list.length == 1) event._result = { control: list[0] }; - else player.chooseControl(list).set('prompt', '选择废除一个坐骑栏'); + if(result.bool){ + event.target=result.targets[0]; + var list=[]; + if(player.hasEnabledSlot(3)) list.push('equip3'); + if(player.hasEnabledSlot(4)) list.push('equip4'); + if(list.length==1) event._result={control:list[0]}; + else player.chooseControl(list).set('prompt','选择废除一个坐骑栏'); } else event.finish(); 'step 2' - player.logSkill('twjuezhu', target); + player.logSkill('twjuezhu',target); player.awakenSkill('twjuezhu'); player.disableEquip(result.control); target.disableJudge(); - player.markAuto('twjuezhu_restore', [[target, result.control]]); + player.markAuto('twjuezhu_restore',[[target,result.control]]); player.addSkill('twjuezhu_restore'); target.addSkills('feiying'); }, - subSkill: { - restore: { - trigger: { global: 'die' }, - forced: true, - charlotte: true, - filter: function (event, player) { - for (var i of player.getStorage('twjuezhu_restore')) { - if (i[0] == event.player && player.hasDisabledSlot(i[1])) return true; + subSkill:{ + restore:{ + trigger:{global:'die'}, + forced:true, + charlotte:true, + filter:function(event,player){ + for(var i of player.getStorage('twjuezhu_restore')){ + if(i[0]==event.player&&player.hasDisabledSlot(i[1])) return true; } return false; }, - content: function () { - var list = []; - for (var i of player.getStorage('twjuezhu_restore')) { - if (i[0] == trigger.player && player.hasDisabledSlot(i[1])) list.push(i[1]); + content:function(){ + var list=[]; + for(var i of player.getStorage('twjuezhu_restore')){ + if(i[0]==trigger.player&&player.hasDisabledSlot(i[1])) list.push(i[1]); } player.enableEquip(list); }, }, }, - derivation: 'feiying', + derivation:'feiying', }, - twfengpo: { - audio: 'fengpo', - trigger: { player: 'useCardToPlayered' }, - logTarget: 'target', - filter: function (event, player) { - return (event.card.name == 'sha' || event.card.name == 'juedou') && event.targets.length == 1 && event.target.countCards('h') > 0; + twfengpo:{ + audio:'fengpo', + trigger:{player:'useCardToPlayered'}, + logTarget:'target', + filter:function(event,player){ + return (event.card.name=='sha'||event.card.name=='juedou')&&event.targets.length==1&&event.target.countCards('h')>0; }, - onremove: true, - content: function () { + onremove:true, + content:function(){ 'step 0' - event.target = trigger.target; + event.target=trigger.target; player.viewHandcards(trigger.target); 'step 1' - var num = target.countCards('h', player.storage.twfengpo ? { color: 'red' } : { suit: 'diamond' }); - if (!num) { + var num=target.countCards('h',player.storage.twfengpo?{color:'red'}:{suit:'diamond'}); + if(!num){ event.finish(); return; } - event.num = num; - player.chooseControl().set('choiceList', [ - '摸' + num + '张牌', - '令' + get.translation(trigger.card) + '的伤害值基数+' + num, + event.num=num; + player.chooseControl().set('choiceList',[ + '摸'+num+'张牌', + '令'+get.translation(trigger.card)+'的伤害值基数+'+num, ]); 'step 2' - if (result.index == 0) player.draw(num); - else trigger.getParent().baseDamage += num; + if(result.index==0) player.draw(num); + else trigger.getParent().baseDamage+=num; }, - group: 'twfengpo_kill', - subSkill: { - kill: { - audio: 'fengpo', - trigger: { source: 'die' }, - forced: true, - filter: (event, player) => !player.storage.twfengpo, - skillAnimation: true, - animationColor: 'fire', - content: function () { - player.storage.twfengpo = true; + group:'twfengpo_kill', + subSkill:{ + kill:{ + audio:'fengpo', + trigger:{source:'die'}, + forced:true, + filter:(event,player)=>!player.storage.twfengpo, + skillAnimation:true, + animationColor:'fire', + content:function(){ + player.storage.twfengpo=true; player.popup('凤魄'); - game.log(player, '恢复了技能', '#g【凤魄】'); + game.log(player,'恢复了技能','#g【凤魄】'); }, }, }, }, - twmouzhu: { - audio: 'mouzhu', - enable: 'phaseUse', - usable: 1, - filterTarget: lib.filter.notMe, - contentBefore: function () { - var target = targets[0], evt = event.getParent(); - evt._target = target; - var list = game.filterPlayer(function (current) { - return current != player && current != target && current.hp <= player.hp; + twmouzhu:{ + audio:'mouzhu', + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + contentBefore:function(){ + var target=targets[0],evt=event.getParent(); + evt._target=target; + var list=game.filterPlayer(function(current){ + return current!=player&¤t!=target&¤t.hp<=player.hp; }); - if (!list.length) { + if(!list.length){ player.loseHp(); evt.finish(); } - else { - evt.targets = list.sortBySeat(); + else{ + evt.targets=list.sortBySeat(); player.line(list); } }, - content: function () { + content:function(){ 'step 0' - target.chooseCard('he', '是否交给' + get.translation(player) + '一张牌?').set('ai', function (card) { - if (_status.event.goon) return 7 - get.value(card); + target.chooseCard('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); + }).set('goon',get.attitude(target,player)>0); 'step 1' - if (result.bool) { - target.give(result.cards, player); + if(result.bool){ + target.give(result.cards,player); } - else { - game.log(target, '拒绝给牌'); + else{ + game.log(target,'拒绝给牌'); } }, - contentAfter: function () { + contentAfter:function(){ 'step 0' - var num = 0, par = event.getParent(); - player.getHistory('gain', function (evt) { - if (evt.getParent(2) == par) num += evt.cards.length; + var num=0,par=event.getParent(); + player.getHistory('gain',function(evt){ + if(evt.getParent(2)==par) num+=evt.cards.length; }); - if (!num) { + if(!num){ player.loseHp(); - for (var i of targets) i.loseHp(); + for(var i of targets) i.loseHp(); event.finish(); } - else { - var target = event.getParent()._target; - event.target = target; - event.num = num; - var bool1 = player.canUse('sha', target, false), bool2 = player.canUse('juedou', target, false); - if (bool1 && bool2) target.chooseControl('sha', 'juedou').set('prompt', '谋诛:视为被' + get.translation(player) + '使用一张…').set('prompt2', '(伤害值基数:' + num + ')').set('ai', function () { - var target = _status.event.player, player = _status.event.getParent().player; - if (target.hasShan() || get.effect(target, { name: 'sha' }, player, target) > 0) return 'sha'; - if (get.effect(target, { name: 'juedou' }, player, target) > 0) return 'juedou'; + else{ + var target=event.getParent()._target; + event.target=target; + event.num=num; + var bool1=player.canUse('sha',target,false),bool2=player.canUse('juedou',target,false); + if(bool1&&bool2) target.chooseControl('sha','juedou').set('prompt','谋诛:视为被'+get.translation(player)+'使用一张…').set('prompt2','(伤害值基数:'+num+')').set('ai',function(){ + var target=_status.event.player,player=_status.event.getParent().player; + if(target.hasShan()||get.effect(target,{name:'sha'},player,target)>0) return 'sha'; + if(get.effect(target,{name:'juedou'},player,target)>0) return 'juedou'; return 'sha'; }); - else if (bool1) event._result = { control: 'sha' }; - else if (bool2) event._result = { control: 'juedou' }; + else if(bool1) event._result={control:'sha'}; + else if(bool2) event._result={control:'juedou'}; else event.finish(); } 'step 1' - if (result.control && lib.card[result.control]) player.useCard({ - name: result.control, - isCard: true, - }, false, target).baseDamage = num; + if(result.control&&lib.card[result.control]) player.useCard({ + name:result.control, + isCard:true, + },false,target).baseDamage=num; }, - ai: { - order: 9, - result: { - target: function (player, target) { - if (get.attitude(player, target) >= 0) return 0; - var list = game.filterPlayer(function (current) { - return current != player && current != target && current.hp <= player.hp; + ai:{ + order:9, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>=0) return 0; + var list=game.filterPlayer(function(current){ + return current!=player&¤t!=target&¤t.hp<=player.hp; }); - if (!list.length) return 0; - return -Math.min(-get.effect(target, { name: 'sha' }, player, target), -get.effect(target, { name: 'juedou' }, player, target)) * list.reduce(function (num, current) { - return num + (2 + get.sgn(get.attitude(current, player))); - }, 0); + if(!list.length) return 0; + return -Math.min(-get.effect(target,{name:'sha'},player,target),-get.effect(target,{name:'juedou'},player,target))*list.reduce(function(num,current){ + return num+(2+get.sgn(get.attitude(current,player))); + },0); }, }, }, }, - twyanhuo: { - audio: 'yanhuo', - trigger: { player: 'die' }, - direct: true, - forceDie: true, - skillAnimation: true, - animationColor: 'thunder', - filter: function (event, player) { - return player.countCards('he') > 0 && game.hasPlayer(function (current) { - return current != player && current.countCards('h') > 0; + twyanhuo:{ + audio:'yanhuo', + trigger:{player:'die'}, + direct:true, + forceDie:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return player.countCards('he')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>0; }); }, - content: function () { + content:function(){ 'step 0' - var num = player.countCards('he'), str = get.cnNumber(num); - event.num1 = num; - event.num2 = 1; - var list = ['令一名其他角色弃置' + str + '张牌']; - if (num > 1) { - list.push('令至多' + str + '名其他角色各弃置一张牌'); + var num=player.countCards('he'),str=get.cnNumber(num); + event.num1=num; + event.num2=1; + var list=['令一名其他角色弃置'+str+'张牌']; + if(num>1){ + list.push('令至多'+str+'名其他角色各弃置一张牌'); } - player.chooseControl('cancel2').set('choiceList', list).set('prompt', get.prompt('twyanhuo')).set('forceDie', true); + player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('twyanhuo')).set('forceDie',true); 'step 1' - if (result.control != 'cancel2') { - if (result.index == 0) { - event.num2 = event.num1; - event.num1 = 1; + if(result.control!='cancel2'){ + if(result.index==0){ + event.num2=event.num1; + event.num1=1; } - player.chooseTarget([1, event.num1], true, '请选择【延祸】的目标', function (card, player, target) { - return target != player && target.countCards('he') > 0; - }).set('forceDie', true).set('ai', function (target) { - return -get.attitude(_status.event.player, target) + player.chooseTarget([1,event.num1],true,'请选择【延祸】的目标',function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }).set('forceDie',true).set('ai',function(target){ + return -get.attitude(_status.event.player,target) }); } else event.finish(); 'step 2' - if (result.bool) { - var targets = result.targets.sortBySeat(); - player.logSkill('twyanhuo', targets); - for (var i of targets) i.chooseToDiscard(true, 'he', event.num2); + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.logSkill('twyanhuo',targets); + for(var i of targets) i.chooseToDiscard(true,'he',event.num2); } }, }, - twshenxing: { - mod: { - globalFrom: function (player, target, distance) { - var es = player.getCards('e', function (card) { + twshenxing:{ + mod:{ + globalFrom:function(player,target,distance){ + var es=player.getCards('e',function(card){ return !ui.selected.cards.includes(card); }); - for (var i of es) { - var type = get.subtype(i); - if (type == 'equip3' || type == 'equip4' || type == 'equip6') return distance; + for(var i of es){ + var type=get.subtype(i); + if(type=='equip3'||type=='equip4'||type=='equip6') return distance; } - return distance - 1; + return distance-1; }, - maxHandcard: function (player, distance) { - var es = player.getCards('e', function (card) { + maxHandcard:function(player,distance){ + var es=player.getCards('e',function(card){ return !ui.selected.cards.includes(card); }); - for (var i of es) { - var type = get.subtype(i); - if (type == 'equip3' || type == 'equip4' || type == 'equip6') return distance; + for(var i of es){ + var type=get.subtype(i); + if(type=='equip3'||type=='equip4'||type=='equip6') return distance; } - return distance + 1; + return distance+1; }, }, }, - twdaoji: { - audio: 'daoji', - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.hasCard(lib.skill.twdaoji.filterCard, 'he'); + twdaoji:{ + audio:'daoji', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hasCard(lib.skill.twdaoji.filterCard,'he'); }, - filterCard: function (card) { - return get.type(card) != 'basic'; + filterCard:function(card){ + return get.type(card)!='basic'; }, - position: 'he', - filterTarget: function (card, player, target) { - return target != player && player.inRange(target) && target.hasCard((card) => lib.filter.canBeGained(card, target, player), 'he'); + position:'he', + filterTarget:function(card,player,target){ + return target!=player&&player.inRange(target)&&target.hasCard((card)=>lib.filter.canBeGained(card,target,player),'he'); }, - check: function (card) { - return 8 - get.value(card); + check:function(card){ + return 8-get.value(card); }, - content: function () { + content:function(){ 'step 0' - player.gainPlayerCard(target, 'he', true); + player.gainPlayerCard(target,'he',true); 'step 1' - if (result.bool && result.cards && result.cards.length == 1) { - var card = result.cards[0]; - if (player.getCards('h').includes(card)) { - var type = get.type(card); - if (type == 'basic') player.draw(); - else if (type == 'equip') { - if (player.hasUseTarget(card)) player.chooseUseTarget(card, 'nopopup', true); + if(result.bool&&result.cards&&result.cards.length==1){ + var card=result.cards[0]; + if(player.getCards('h').includes(card)){ + var type=get.type(card); + if(type=='basic') player.draw(); + else if(type=='equip'){ + if(player.hasUseTarget(card)) player.chooseUseTarget(card,'nopopup',true); target.damage('nocard'); } } } }, - ai: { - order: 6, - result: { - target: function (player, target) { - var eff = get.effect(target, { name: 'shunshou_copy2' }, player, target); - if (target.countCards('e') > 0) eff += get.damageEffect(target, player, target); + ai:{ + order:6, + result:{ + target:function(player,target){ + var eff=get.effect(target,{name:'shunshou_copy2'},player,target); + if(target.countCards('e')>0) eff+=get.damageEffect(target,player,target); return eff; }, }, }, }, - xinzhenjun: { - audio: 2, - trigger: { - player: 'phaseUseBegin' + xinzhenjun:{ + audio:2, + trigger:{ + player:'phaseUseBegin' }, - direct: true, - filter: function (event, player) { - return player.countCards('he') > 0; + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; }, - content: function () { + 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; i < game.players.length; i++) { - var current = game.players[i]; - if (current != player && get.attitude(player, current) > 0 && current.hasValueTarget(card)) return 7; + 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); + 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; + 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; + 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); - player.give(result.cards, target) + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xinzhenjun',target); + player.give(result.cards,target) } 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); + filterCard:function(card){ + return get.name(card)=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments); }, - prompt: '请使用一张不为黑色的【杀】,否则' + get.translation(player) + '可以对你或你攻击范围内的一名其他角色造成1点伤害', + 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; + 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) + 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) { + if(result.bool){ player.line(result.targets); result.targets[0].damage('nocard'); } }, }, - twmoukui: { - audio: 'moukui', - trigger: { player: 'useCardToPlayered' }, - direct: true, - preHidden: true, - filter: function (event, player) { - return event.card && event.card.name == 'sha'; + twmoukui:{ + audio:'moukui', + trigger:{player:'useCardToPlayered'}, + direct:true, + preHidden:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; }, - content: function () { + content:function(){ 'step 0' - var list = ['选项一']; - if (trigger.target.countDiscardableCards(player, 'he') > 0) list.push('选项二'); + var list=['选项一']; + if(trigger.target.countDiscardableCards(player,'he')>0) list.push('选项二'); list.push('背水!'); list.push('cancel2'); - player.chooseControl(list).set('choiceList', [ + player.chooseControl(list).set('choiceList',[ '摸一张牌', - '弃置' + get.translation(trigger.target) + '的一张牌', + '弃置'+get.translation(trigger.target)+'的一张牌', '背水!依次执行以上两项。然后若此【杀】未令其进入濒死状态,则其弃置你的一张牌。', - ]).set('prompt', get.prompt('twmoukui', trigger.target)).setHiddenSkill('twmoukui'); + ]).set('prompt',get.prompt('twmoukui',trigger.target)).setHiddenSkill('twmoukui'); 'step 1' - if (result.control != 'cancel2') { - var target = trigger.target; - player.logSkill('twmoukui', target); - if (result.control == '选项一' || result.control == '背水!') player.draw(); - if (result.control == '选项二' || result.control == '背水!') player.discardPlayerCard(target, true, 'he'); - if (result.control == '背水!') { + if(result.control!='cancel2'){ + var target=trigger.target; + player.logSkill('twmoukui',target); + if(result.control=='选项一'||result.control=='背水!') player.draw(); + if(result.control=='选项二'||result.control=='背水!') player.discardPlayerCard(target,true,'he'); + if(result.control=='背水!'){ player.addTempSkill('twmoukui_effect'); - var evt = trigger.getParent(); - if (!evt.twmoukui_effect) evt.twmoukui_effect = []; + var evt=trigger.getParent(); + if(!evt.twmoukui_effect) evt.twmoukui_effect=[]; evt.twmoukui_effect.add(target); } } }, - subSkill: { - effect: { - trigger: { player: 'useCardAfter' }, - charlotte: true, - forced: true, - filter: function (event, player) { - return event.twmoukui_effect && event.twmoukui_effect.filter(function (current) { - return current.isIn() && !current.hasHistory('damage', function (evt) { - return evt._dyinged && evt.card == event.card; + subSkill:{ + effect:{ + trigger:{player:'useCardAfter'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return event.twmoukui_effect&&event.twmoukui_effect.filter(function(current){ + return current.isIn()&&!current.hasHistory('damage',function(evt){ + return evt._dyinged&&evt.card==event.card; }); - }).length > 0; + }).length>0; }, - content: function () { - var list = trigger.twmoukui_effect.filter(function (current) { - return current.isIn() && !current.hasHistory('damage', function (evt) { - return evt._dyinged && evt.card == event.card; + content:function(){ + var list=trigger.twmoukui_effect.filter(function(current){ + return current.isIn()&&!current.hasHistory('damage',function(evt){ + return evt._dyinged&&evt.card==event.card; }); }).sortBySeat(); - for (var i of list) { - i.discardPlayerCard(player, true, 'he').boolline = true; + for(var i of list){ + i.discardPlayerCard(player,true,'he').boolline=true; } }, }, }, }, - twfuhan: { - audio: 'fuhan', - trigger: { player: 'phaseZhunbeiBegin' }, - unique: true, - limited: true, - skillAnimation: true, - animationColor: 'orange', - forceunique: true, - filter: function (event, player) { - return player.countMark('fanghun') > 0; + twfuhan:{ + audio:'fuhan', + trigger:{player:'phaseZhunbeiBegin'}, + unique:true, + limited:true, + skillAnimation:true, + animationColor:'orange', + forceunique:true, + filter:function(event,player){ + return player.countMark('fanghun')>0; }, - prompt: function (event, player) { - var num = Math.max(2, player.storage.fanghun); - num = Math.min(num, 8); - return get.prompt('twfuhan') + '(体力上限:' + num + ')'; + prompt:function(event,player){ + var num=Math.max(2,player.storage.fanghun); + num=Math.min(num,8); + return get.prompt('twfuhan')+'(体力上限:'+num+')'; }, - check: function (event, player) { - if (player.storage.fanghun >= Math.min(4, player.maxHp)) return true; - if (player.hp <= 2 && player.storage.fanghun >= 3) return true; + check:function(event,player){ + if(player.storage.fanghun>=Math.min(4,player.maxHp)) return true; + if(player.hp<=2&&player.storage.fanghun>=3) return true; return false; }, - content: function () { + content:function(){ 'step 0' - var num = Math.max(2, player.storage.fanghun); - num = Math.min(num, 8); - event.num = num; - player.removeMark('fanghun', player.storage.fanghun); + var num=Math.max(2,player.storage.fanghun); + num=Math.min(num,8); + event.num=num; + player.removeMark('fanghun',player.storage.fanghun); player.awakenSkill('twfuhan'); - 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); + 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 if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; }); } - else { - list = get.gainableCharacters(function (info) { - return info[1] == 'shu'; + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='shu'; }); } - var players = game.players.concat(game.dead); - for (var i = 0; i < players.length; i++) { + var players=game.players.concat(game.dead); + for(var i=0;i 0) player.gainMaxHp(num); + var num=event.num-player.maxHp; + if(num>0) player.gainMaxHp(num); else player.loseMaxHp(-num); player.recover(); 'step 3' - var card = get.cardPile('meiyingqiang', 'field'); - if (card) { - player.gain(card, 'gain2', 'log'); + var card=get.cardPile('meiyingqiang','field'); + if(card){ + player.gain(card,'gain2','log'); } }, }, - twqueshi: { - trigger: { - global: 'phaseBefore', - player: 'enterGame', + twqueshi:{ + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - locked: false, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0) && player.hasEquipableSlot(1); + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&player.hasEquipableSlot(1); }, - content: function () { - if (!lib.inpile.includes('meiyingqiang')) { + content:function(){ + if(!lib.inpile.includes('meiyingqiang')){ lib.inpile.push('meiyingqiang'); - player.equip(game.createCard('meiyingqiang', 'diamond', 12)); + player.equip(game.createCard('meiyingqiang','diamond',12)); } - else { - var card = get.cardPile(function (card) { - return card.name == 'meiyingqiang' && !player.getEquips(1).includes(card); - }, 'field'); - if (card) player.equip(card); + else{ + var card=get.cardPile(function(card){ + return card.name=='meiyingqiang'&&!player.getEquips(1).includes(card); + },'field'); + if(card) player.equip(card); } }, }, - meiyingqiang: { - equipSkill: true, - trigger: { - player: ['loseAfter'], - global: ['equipAfter', 'addJudgeAfter', 'gainAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + meiyingqiang:{ + equipSkill:true, + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter: function (event, player) { - if (player == _status.currentPhase) return false; - var evt = event.getl(player); - if (!evt || !evt.cards2 || !evt.cards2.length) return false; - var list = player.getHistory('lose', function (evt) { - return evt.cards2 && evt.cards2.length; + filter:function(event,player){ + if(player==_status.currentPhase) return false; + var evt=event.getl(player); + if(!evt||!evt.cards2||!evt.cards2.length) return false; + var list=player.getHistory('lose',function(evt){ + return evt.cards2&&evt.cards2.length; }); - if (event.name == 'lose') { - if (list.indexOf(event) != 0) return false; + if(event.name=='lose'){ + if(list.indexOf(event)!=0) return false; } - else { - if (!player.hasHistory('lose', function (evt) { - return evt.getParent() == event && list.indexOf(evt) == 0; + else{ + if(!player.hasHistory('lose',function(evt){ + return evt.getParent()==event&&list.indexOf(evt)==0; })) return false; } - return _status.connectMode || !lib.config.skip_shan || player.hasSha(); + return _status.connectMode||!lib.config.skip_shan||player.hasSha(); }, - direct: true, - content: function () { - if (trigger.delay === false) game.delayx(); - player.chooseToUse('梅影枪:是否使用一张【杀】?', function (card) { - if (get.name(card) != 'sha') return false; - return lib.filter.cardEnabled.apply(this, arguments); - }).set('addCount', false).logSkill = 'meiyingqiang'; + direct:true, + content:function(){ + if(trigger.delay===false) game.delayx(); + player.chooseToUse('梅影枪:是否使用一张【杀】?',function(card){ + if(get.name(card)!='sha') return false; + return lib.filter.cardEnabled.apply(this,arguments); + }).set('addCount',false).logSkill='meiyingqiang'; }, }, - cuijin: { - trigger: { global: 'useCard' }, - direct: true, - filter: function (event, player) { - return event.card.name == 'sha' && (event.player == player || player.inRange(event.player)) && player.countCards('he') > 0; + cuijin:{ + trigger:{global:'useCard'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&(event.player==player||player.inRange(event.player))&&player.countCards('he')>0; }, - checkx(event, player) { - let d1 = true, e = false; - if (event.player.hasSkill('jueqing') || event.player.hasSkill('gangzhi')) d1 = false; - for (let tar of event.targets) { - if (!tar.mayHaveShan(player, 'use', tar.getCards('h', i => { + checkx(event,player){ + let d1=true,e=false; + if(event.player.hasSkill('jueqing')||event.player.hasSkill('gangzhi')) d1=false; + for(let tar of event.targets){ + if(!tar.mayHaveShan(player,'use',tar.getCards('h',i=>{ return i.hasGaintag('sha_notshan'); - })) || event.player.hasSkillTag('directHit_ai', true, { - target: tar, - card: event.card, - }, true)) { - if (!tar.hasSkill('gangzhi')) d1 = false; - if (!tar.hasSkillTag('filterDamage', null, { - player: event.player, - card: event.card, - })) { - let att = get.attitude(_status.event.player, tar); - if (att > 0) return false; - if (att < 0) e = true; + }))||event.player.hasSkillTag('directHit_ai',true,{ + target:tar, + card:event.card, + },true)){ + if(!tar.hasSkill('gangzhi')) d1=false; + if(!tar.hasSkillTag('filterDamage',null,{ + player:event.player, + card:event.card, + })){ + let att=get.attitude(_status.event.player,tar); + if(att>0) return false; + if(att<0) e=true; } } } - if (e) return true; - if (d1) return get.damageEffect(event.player, player, _status.event.player) > 0; + if(e) return true; + if(d1) return get.damageEffect(event.player,player,_status.event.player)>0; return false; }, - content: function () { + content:function(){ 'step 0' - if (player != game.me && !player.isOnline()) game.delayx(); - var target = trigger.player; - event.target = target; - player.chooseToDiscard('he', get.prompt('cuijin', target), '弃置一张牌并令' + get.translation(trigger.player) + '使用的【杀】伤害+1,但若其未造成伤害,则你对其造成1点伤害。').set('ai', function (card) { - if (_status.event.goon) return 7 - get.value(card); + if(player!=game.me&&!player.isOnline()) game.delayx(); + var target=trigger.player; + event.target=target; + player.chooseToDiscard('he',get.prompt('cuijin',target),'弃置一张牌并令'+get.translation(trigger.player)+'使用的【杀】伤害+1,但若其未造成伤害,则你对其造成1点伤害。').set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); return 0; - }).set('goon', lib.skill.cuijin.checkx(trigger, player)).logSkill = ['cuijin', target]; + }).set('goon',lib.skill.cuijin.checkx(trigger,player)).logSkill=['cuijin',target]; 'step 1' - if (result.bool) { - if (typeof trigger.baseDamage != 'number') trigger.baseDamage = 1; + if(result.bool){ + if(typeof trigger.baseDamage!='number') trigger.baseDamage=1; trigger.baseDamage++; player.addTempSkill('cuijin_damage'); - player.markAuto('cuijin_damage', [trigger.card]); + player.markAuto('cuijin_damage',[trigger.card]); } }, - subSkill: { - damage: { - trigger: { global: 'useCardAfter' }, - forced: true, - popup: false, - charlotte: true, - onremove: true, - filter: function (event, player) { + subSkill:{ + damage:{ + trigger:{global:'useCardAfter'}, + forced:true, + popup:false, + charlotte:true, + onremove:true, + filter:function(event,player){ return player.storage.cuijin_damage.includes(event.card); }, - content: function () { + content:function(){ player.storage.cuijin_damage.remove(trigger.card); - if (!player.storage.cuijin_damage.length) player.removeSkill('cuijin_damage'); - if (trigger.player.isIn() && !game.hasPlayer2(function (current) { - return current.hasHistory('damage', function (evt) { - return evt.card == trigger.card; + if(!player.storage.cuijin_damage.length) player.removeSkill('cuijin_damage'); + if(trigger.player.isIn()&&!game.hasPlayer2(function(current){ + return current.hasHistory('damage',function(evt){ + return evt.card==trigger.card; }); - })) { - player.line(trigger.player, 'green'); + })){ + player.line(trigger.player,'green'); trigger.player.damage(); } }, }, }, }, - jintao: { - mod: { - cardUsable: function (card, player, num) { - if (card.name == 'sha') return num + 1; + jintao:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; }, - targetInRange: function (card) { - if (card.name == 'sha') return true; + targetInRange:function(card){ + if(card.name=='sha') return true; }, }, - audio: 2, - trigger: { player: 'useCard' }, - forced: true, - filter: function (event, player) { - if (event.card.name != 'sha') return false; - var evt = event.getParent('phaseUse'); - if (!evt || evt.player != player) return false; - var index = player.getHistory('useCard', function (evtx) { - return evtx.card.name == 'sha' && evtx.getParent('phaseUse') == evt; + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var index=player.getHistory('useCard',function(evtx){ + return evtx.card.name=='sha'&&evtx.getParent('phaseUse')==evt; }).indexOf(event); - return index == 0 || index == 1; + return index==0||index==1; }, - content: function () { - var evt = trigger.getParent('phaseUse'); - var index = player.getHistory('useCard', function (evtx) { - return evtx.card.name == 'sha' && evtx.getParent('phaseUse') == evt; + content:function(){ + var evt=trigger.getParent('phaseUse'); + var index=player.getHistory('useCard',function(evtx){ + return evtx.card.name=='sha'&&evtx.getParent('phaseUse')==evt; }).indexOf(trigger); - if (index == 0) { - game.log(trigger.card, '伤害+1'); - if (typeof trigger.baseDamage != 'number') trigger.baseDamage = 1; + if(index==0){ + game.log(trigger.card,'伤害+1'); + if(typeof trigger.baseDamage!='number') trigger.baseDamage=1; trigger.baseDamage++; } - else { - game.log(trigger.card, '不可被响应'); + else{ + game.log(trigger.card,'不可被响应'); trigger.directHit.addArray(game.players); } }, }, - equan: { - audio: 2, - trigger: { global: 'damageEnd' }, - forced: true, - filter: function (event, player) { - return player == _status.currentPhase && event.player.isIn(); + equan:{ + audio:2, + trigger:{global:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player==_status.currentPhase&&event.player.isIn(); }, - logTarget: 'player', - content: function () { - trigger.player.addMark('equan', trigger.num, false); + logTarget:'player', + content:function(){ + trigger.player.addMark('equan',trigger.num,false); }, - group: ['equan_block', 'equan_lose'], - marktext: '毒', - intro: { - name: '恶泉(毒)', - name2: '毒', + group:['equan_block','equan_lose'], + marktext:'毒', + intro:{ + name:'恶泉(毒)', + name2:'毒', }, - subSkill: { - lose: { - audio: 'equan', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - filter: function () { - return game.hasPlayer(function (current) { + subSkill:{ + lose:{ + audio:'equan', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(){ + return game.hasPlayer(function(current){ return current.hasMark('equan'); }); }, - logTarget: function () { - return game.filterPlayer(function (current) { + logTarget:function(){ + return game.filterPlayer(function(current){ return current.hasMark('equan'); }); }, - content: function () { - game.countPlayer(function (current) { - var num = current.countMark('equan'); - if (num) { - current.removeMark('equan', num); + content:function(){ + game.countPlayer(function(current){ + var num=current.countMark('equan'); + if(num){ + current.removeMark('equan',num); current.loseHp(num); } }); }, }, - block: { - trigger: { global: 'dyingBegin' }, - forced: true, - logTarget: 'player', - filter: function (event, player) { - var evt = event.getParent(2); - return evt.name == 'equan_lose' && evt.player == player; + block:{ + trigger:{global:'dyingBegin'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + var evt=event.getParent(2); + return evt.name=='equan_lose'&&evt.player==player; }, - content: function () { + content:function(){ trigger.player.addTempSkill('baiban'); }, }, }, }, - manji: { - audio: 2, - trigger: { global: 'loseHpAfter' }, - forced: true, - filter: function (event, player) { - return player != event.player && (player.hp >= event.player.hp || player.isDamaged()); + manji:{ + audio:2, + trigger:{global:'loseHpAfter'}, + forced:true, + filter:function(event,player){ + return player!=event.player&&(player.hp>=event.player.hp||player.isDamaged()); }, - logTarget: 'player', - content: function () { - if (player.hp <= trigger.player.hp) player.recover(); - if (player.hp >= trigger.player.hp) player.draw(); + logTarget:'player', + content:function(){ + if(player.hp<=trigger.player.hp) player.recover(); + if(player.hp>=trigger.player.hp) player.draw(); }, }, - beini: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filterTarget: lib.filter.notMe, - content: function () { + beini:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + content:function(){ 'step 0' - var str = get.translation(target); - player.chooseControl().set('choiceList', [ - '摸两张牌,然后令' + str + '视为对自己使用【杀】', - '令' + str + '摸两张牌,然后视为对其使用【杀】', - ]).set('ai', function () { - var evt = _status.event.getParent(), player = evt.player, target = evt.target; - var card = { name: 'sha', isCard: true }, att = get.attitude(player, target) > 0; - if (!target.canUse(card, player, false) || get.effect(player, card, target, player) >= 0) return 0; - if (att && (!player.canUse(card, target, false) || get.effect(target, card, player, player) >= 0)) return 1; - if (target.hasSkill('nogain') && player.canUse(card, target, false) && get.effect(target, card, player, player) > 0) return 1; - if (player.hasShan()) return 0; - if (att && target.hasShan()) return 1; + var str=get.translation(target); + player.chooseControl().set('choiceList',[ + '摸两张牌,然后令'+str+'视为对自己使用【杀】', + '令'+str+'摸两张牌,然后视为对其使用【杀】', + ]).set('ai',function(){ + var evt=_status.event.getParent(),player=evt.player,target=evt.target; + var card={name:'sha',isCard:true},att=get.attitude(player,target)>0; + if(!target.canUse(card,player,false)||get.effect(player,card,target,player)>=0) return 0; + if(att&&(!player.canUse(card,target,false)||get.effect(target,card,player,player)>=0)) return 1; + if(target.hasSkill('nogain')&&player.canUse(card,target,false)&&get.effect(target,card,player,player)>0) return 1; + if(player.hasShan()) return 0; + if(att&&target.hasShan()) return 1; return 0; }); 'step 1' - var list = [player, target]; - if (result.index == 1) list.reverse(); - event.list = list; + var list=[player,target]; + if(result.index==1) list.reverse(); + event.list=list; list[0].draw(2); 'step 2' - var list = event.list; - if (list[1].isIn() && list[0].isIn() && list[1].canUse('sha', list[0], false)) list[1].useCard({ name: 'sha', isCard: true }, list[0], false, 'noai'); + var list=event.list; + if(list[1].isIn()&&list[0].isIn()&&list[1].canUse('sha',list[0],false)) list[1].useCard({name:'sha',isCard:true},list[0],false,'noai'); }, - ai: { - order: 5, - expose: 0, - result: { - player: function (player, target) { - var card = { name: 'sha', isCard: true }, att = get.attitude(player, target) > 0; - if (!target.canUse(card, player, false) || get.effect(player, card, target, player) >= 0) return 2; - if (att && (!player.canUse(card, target, false) || get.effect(target, card, player, player) >= 0)) return 2; - if (target.hasSkill('nogain') && player.canUse(card, target, false)) return get.effect(target, card, player, player) - if (player.hasShan()) return 1; - if (att && target.hasShan()) return 1; + ai:{ + order:5, + expose:0, + result:{ + player:function(player,target){ + var card={name:'sha',isCard:true},att=get.attitude(player,target)>0; + if(!target.canUse(card,player,false)||get.effect(player,card,target,player)>=0) return 2; + if(att&&(!player.canUse(card,target,false)||get.effect(target,card,player,player)>=0)) return 2; + if(target.hasSkill('nogain')&&player.canUse(card,target,false)) return get.effect(target,card,player,player) + if(player.hasShan()) return 1; + if(att&&target.hasShan()) return 1; return 0; }, }, }, }, - dingfa: { - audio: 2, - trigger: { player: 'phaseDiscardAfter' }, - direct: true, - filter: function (event, player) { - var num = 0; - player.getHistory('lose', function (evt) { - num += evt.cards2.length; + dingfa:{ + audio:2, + trigger:{player:'phaseDiscardAfter'}, + direct:true, + filter:function(event,player){ + var num=0; + player.getHistory('lose',function(evt){ + num+=evt.cards2.length; }); - return num >= player.hp; + return num>=player.hp; }, - content: function () { + content:function(){ 'step 0' - player.chooseTarget(get.prompt('dingfa'), '操作提示:选择自己以回复体力,或选择其他角色以造成伤害', function (card, player, target) { - return target == player ? player.isDamaged() : true; - }).set('ai', function (target) { - return target != player ? get.damageEffect(target, player, player) : get.recoverEffect(player, player, player) + player.chooseTarget(get.prompt('dingfa'),'操作提示:选择自己以回复体力,或选择其他角色以造成伤害',function(card,player,target){ + return target==player?player.isDamaged():true; + }).set('ai',function(target){ + return target!=player?get.damageEffect(target,player,player):get.recoverEffect(player,player,player) }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('dingfa', target); - if (target == player) player.recover(); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dingfa',target); + if(target==player) player.recover(); else target.damage(); } }, }, - dz_mantianguohai: { - mod: { - ignoredHandcard: function (card, player) { - if (get.name(card) == 'dz_mantianguohai') return true; + dz_mantianguohai:{ + mod:{ + ignoredHandcard:function(card,player){ + if(get.name(card)=='dz_mantianguohai') return true; }, - cardDiscardable: function (card, player, name) { - if (name == 'cardsDiscard' && get.name(card) == 'dz_mantianguohai') return false; + cardDiscardable:function(card,player,name){ + if(name=='cardsDiscard'&&get.name(card)=='dz_mantianguohai') return false; }, }, }, - twmiaolve: { - audio: 2, - trigger: { - global: 'phaseBefore', - player: 'enterGame', + twmiaolve:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - filter: function (event, player) { - return event.name != 'phase' || game.phaseNumber == 0; + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; }, - forced: true, - locked: false, - content: function () { - if (!lib.inpile.includes('dz_mantianguohai')) lib.inpile.add('dz_mantianguohai'); - if (!_status.dz_mantianguohai_suits) _status.dz_mantianguohai_suits = lib.suit.slice(0); - var list = _status.dz_mantianguohai_suits.randomRemove(2).map(function (i) { - return game.createCard2('dz_mantianguohai', i, 5); + forced:true, + locked:false, + content:function(){ + if(!lib.inpile.includes('dz_mantianguohai')) lib.inpile.add('dz_mantianguohai'); + if(!_status.dz_mantianguohai_suits) _status.dz_mantianguohai_suits=lib.suit.slice(0); + var list=_status.dz_mantianguohai_suits.randomRemove(2).map(function(i){ + return game.createCard2('dz_mantianguohai',i,5); }); - if (list.length) player.gain(list, 'gain2', 'log'); + if(list.length) player.gain(list,'gain2','log'); }, - group: 'twmiaolve_damage', - subSkill: { - damage: { - trigger: { player: 'damageEnd' }, - direct: true, - content: function () { + group:'twmiaolve_damage', + subSkill:{ + damage:{ + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ 'step 0' - event.count = trigger.num; + event.count=trigger.num; 'step 1' event.count--; - var list = ['dz_mantianguohai']; + var list=['dz_mantianguohai']; list.addArray(get.zhinangs()); - player.chooseButton([get.prompt('twmiaolve'), [list, 'vcard']]).set('ai', function (button) { - if (button.link[2] == 'dz_mantianguohai' && player.countCards('hs', 'dz_mantianguohai') < 2) return 10; - return get.value({ name: button.link[2] }); + player.chooseButton([get.prompt('twmiaolve'),[list,'vcard']]).set('ai',function(button){ + if(button.link[2]=='dz_mantianguohai'&&player.countCards('hs','dz_mantianguohai')<2) return 10; + return get.value({name:button.link[2]}); }); 'step 2' - if (result.bool) { + if(result.bool){ player.logSkill('twmiaolve'); - var name = result.links[0][2]; - if (name == 'dz_mantianguohai') { - if (!lib.inpile.includes('dz_mantianguohai')) lib.inpile.add('dz_mantianguohai'); - if (!_status.dz_mantianguohai_suits) _status.dz_mantianguohai_suits = lib.suit.slice(0); - if (_status.dz_mantianguohai_suits.length) player.gain(game.createCard2('dz_mantianguohai', _status.dz_mantianguohai_suits.randomRemove(), 5), 'gain2'); - else { - var card = get.cardPile(function (card) { - return card.name == name; + var name=result.links[0][2]; + if(name=='dz_mantianguohai'){ + if(!lib.inpile.includes('dz_mantianguohai')) lib.inpile.add('dz_mantianguohai'); + if(!_status.dz_mantianguohai_suits) _status.dz_mantianguohai_suits=lib.suit.slice(0); + if(_status.dz_mantianguohai_suits.length) player.gain(game.createCard2('dz_mantianguohai',_status.dz_mantianguohai_suits.randomRemove(),5),'gain2'); + else{ + var card=get.cardPile(function(card){ + return card.name==name; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); } player.draw(); } - else { - var card = get.cardPile(function (card) { - return card.name == name; + else{ + var card=get.cardPile(function(card){ + return card.name==name; }); - if (card) player.gain(card, 'gain2'); + if(card) player.gain(card,'gain2'); } - if (event.count > 0 && player.hasSkill('twmiaolve')) event.goto(1); + if(event.count>0&&player.hasSkill('twmiaolve')) event.goto(1); } }, }, }, }, - twyingjia: { - audio: 2, - trigger: { global: 'phaseEnd' }, - direct: true, - filter: function (event, player) { - if (!player.countCards('he')) return false; - var history = player.getHistory('useCard'), map = {}; - for (var i of history) { - if (get.type2(i.card) == 'trick') { - if (!map[i.card.name]) map[i.card.name] = true; + twyingjia:{ + audio:2, + trigger:{global:'phaseEnd'}, + direct:true, + filter:function(event,player){ + if(!player.countCards('he')) return false; + var history=player.getHistory('useCard'),map={}; + for(var i of history){ + if(get.type2(i.card)=='trick'){ + if(!map[i.card.name]) map[i.card.name]=true; else return true; } } return false; }, - content: function () { + content:function(){ 'step 0' player.chooseCardTarget({ - prompt: get.prompt('twyingjia'), - prompt2: '弃置一张牌并令一名角色进行一个额外回合', - filterCard: lib.filter.cardDiscardable, - filterTarget: true, - ai1: function (card) { - return 8 - get.value(card); + prompt:get.prompt('twyingjia'), + prompt2:'弃置一张牌并令一名角色进行一个额外回合', + filterCard:lib.filter.cardDiscardable, + filterTarget:true, + ai1:function(card){ + return 8-get.value(card); }, - ai2: function (target) { - if (target.hasJudge('lebu')) return -1; - var player = _status.event.player; - if (get.attitude(player, target) > 4) { - return get.threaten(target) / Math.sqrt(target.hp + 1) / Math.sqrt(target.countCards('h') + 1); + ai2:function(target){ + if(target.hasJudge('lebu')) return -1; + var player=_status.event.player; + if(get.attitude(player,target)>4){ + return get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1); } return -1; }, }); 'step 1' - if (result.bool) { - var target = result.targets[0]; - player.logSkill('twyingjia', target); + if(result.bool){ + var target=result.targets[0]; + player.logSkill('twyingjia',target); player.discard(result.cards); target.insertPhase(); } }, }, - gx_lingbaoxianhu: { - trigger: { - source: 'damageSource', - global: 'dieAfter', + gx_lingbaoxianhu:{ + trigger:{ + source:'damageSource', + global:'dieAfter', }, - forced: true, - equipSkill: true, - filter: function (event, player) { - if (event.name == 'damage') return event.num > 1; + forced:true, + equipSkill:true, + filter:function(event,player){ + if(event.name=='damage') return event.num>1; return true; }, - content: function () { + content:function(){ player.gainMaxHp(); player.recover(); }, }, - gx_taijifuchen: { - trigger: { player: 'useCardToPlayered' }, - forced: true, - equipSkill: true, - filter: function (event, player) { - return event.card && event.card.name == 'sha'; + gx_taijifuchen:{ + trigger:{player:'useCardToPlayered'}, + forced:true, + equipSkill:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; }, - logTarget: 'target', - content: function () { + logTarget:'target', + content:function(){ 'step 0' - var suit = get.suit(trigger.card); - var num = trigger.target.countCards('h', 'shan'); - var next = trigger.target.chooseToDiscard('弃置一张牌,或不能响应' + get.translation(trigger.card), 'he').set('ai', function (card) { - var num = _status.event.num; - if (num == 0) return 0; - if (card.name == 'shan') return num > 1 ? 2 : 0; - return (get.suit(card) != _status.event.suit ? 9 : 6) - get.value(card); - }).set('num', num); - if (lib.suit.includes(suit)) { - next.set('prompt2', '若弃置的是' + get.translation(suit) + '牌,则改为' + get.translation(player) + '获得之'); - next.set('suit', suit); + var suit=get.suit(trigger.card); + var num=trigger.target.countCards('h','shan'); + var next=trigger.target.chooseToDiscard('弃置一张牌,或不能响应'+get.translation(trigger.card),'he').set('ai',function(card){ + var num=_status.event.num; + if(num==0) return 0; + if(card.name=='shan') return num>1?2:0; + return (get.suit(card)!=_status.event.suit?9:6)-get.value(card); + }).set('num',num); + if(lib.suit.includes(suit)){ + next.set('prompt2','若弃置的是'+get.translation(suit)+'牌,则改为'+get.translation(player)+'获得之'); + next.set('suit',suit); } 'step 1' - if (result.bool) { - var card = result.cards[0]; - if (get.suit(card, trigger.target) == get.suit(trigger.card, false) && get.position(card) == 'd') player.gain(card, 'gain2'); + if(result.bool){ + var card=result.cards[0]; + if(get.suit(card,trigger.target)==get.suit(trigger.card,false)&&get.position(card)=='d') player.gain(card,'gain2'); } else trigger.directHit.add(trigger.target); }, }, - gx_chongyingshenfu: { - trigger: { player: 'damageEnd' }, - forced: true, - equipSkill: true, - filter: function (event, player) { - if (!event.card || !event.card.name || player.getStorage('gx_chongyingshenfu_effect').includes(event.card.name)) return false; - if (player.hasSkillTag('unequip2')) return false; - if (event.source.hasSkillTag('unequip', false, { - name: event.card.name, - target: player, - card: event.card, + gx_chongyingshenfu:{ + trigger:{player:'damageEnd'}, + forced:true, + equipSkill:true, + filter:function(event,player){ + if(!event.card||!event.card.name||player.getStorage('gx_chongyingshenfu_effect').includes(event.card.name)) return false; + if(player.hasSkillTag('unequip2')) return false; + if(event.source.hasSkillTag('unequip',false,{ + name:event.card.name, + target:player, + card:event.card, })) return false; return true; }, - content: function () { - player.markAuto('gx_chongyingshenfu_effect', [trigger.card.name]); + content:function(){ + player.markAuto('gx_chongyingshenfu_effect',[trigger.card.name]); }, - group: 'gx_chongyingshenfu_effect', - subSkill: { - effect: { - trigger: { player: 'damageBegin4' }, - forced: true, - equipSkill: true, - filter: function (event, player) { - if (!event.card || !event.card.name || !player.storage.gx_chongyingshenfu_effect || !player.getStorage('gx_chongyingshenfu_effect').includes(event.card.name)) return false; - if (player.hasSkillTag('unequip2')) return false; - if (event.source.hasSkillTag('unequip', false, { - name: event.card.name, - target: player, - card: event.card, + group:'gx_chongyingshenfu_effect', + subSkill:{ + effect:{ + trigger:{player:'damageBegin4'}, + forced:true, + equipSkill:true, + filter:function(event,player){ + if(!event.card||!event.card.name||!player.storage.gx_chongyingshenfu_effect||!player.getStorage('gx_chongyingshenfu_effect').includes(event.card.name)) return false; + if(player.hasSkillTag('unequip2')) return false; + if(event.source.hasSkillTag('unequip',false,{ + name:event.card.name, + target:player, + card:event.card, })) return false; return true; }, - content: function () { + content:function(){ trigger.num--; }, - ai: { - effect: { - target: function (card, player, target) { - if (typeof card == 'object' && target.storage.gx_chongyingshenfu_effect && target.getStorage('gx_chongyingshenfu_effect').includes(card.name) && !target.hasSkillTag('unequip2') && - (get.itemtype(player) !== 'player' || !player.hasSkillTag('jueqing', false, target) && !player.hasSkillTag('unequip', false, { - name: card.name, - target: target, - card: card, - }))) { - if (player && player.hasSkillTag('damageBonus', true, { - target: target, - card: card + ai:{ + effect:{ + target:function(card,player,target){ + if(typeof card=='object'&&target.storage.gx_chongyingshenfu_effect&&target.getStorage('gx_chongyingshenfu_effect').includes(card.name)&&!target.hasSkillTag('unequip2')&& + (get.itemtype(player)!=='player'||!player.hasSkillTag('jueqing',false,target)&&!player.hasSkillTag('unequip',false,{ + name:card.name, + target:target, + card:card, + }))){ + if(player&&player.hasSkillTag('damageBonus',true,{ + target:target, + card:card })) return 0.5; return 'zeroplayertarget'; } } } }, - onremove: true, - intro: { - content: '受到$造成的伤害-1', + onremove:true, + intro:{ + content:'受到$造成的伤害-1', }, }, }, }, - twdanfa: { - audio: 2, - trigger: { player: ['phaseZhunbeiBegin', 'phaseJieshuBegin'] }, - filter: function (event, player) { - return player.countCards('he') > 0; + twdanfa:{ + audio:2, + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + filter:function(event,player){ + return player.countCards('he')>0; }, - direct: true, - content: function () { + direct:true, + content:function(){ 'step 0' - player.chooseCard('he', get.prompt('twdanfa'), '将一张牌作为“丹”置于武将牌上').set('ai', function (card) { - if (player.storage.twdanfa) { - var suit = get.suit(card); - for (var i of player.storage.twdanfa) { - if (get.suit(i, false) == suit) return 4 - get.value(card); + player.chooseCard('he',get.prompt('twdanfa'),'将一张牌作为“丹”置于武将牌上').set('ai',function(card){ + if(player.storage.twdanfa){ + var suit=get.suit(card); + for(var i of player.storage.twdanfa){ + if(get.suit(i,false)==suit) return 4-get.value(card); } } - return 5.5 - get.value(card); + return 5.5-get.value(card); }); 'step 1' - if (result.bool) { - var card = result.cards[0]; + if(result.bool){ + var card=result.cards[0]; player.logSkill('twdanfa'); - game.log(player, '将', card, '放在了武将牌上'); - player.$give(card, player, false); - player.lose(card, ui.special, 'toStorage'); - player.markAuto('twdanfa', result.cards); + game.log(player,'将',card,'放在了武将牌上'); + player.$give(card,player,false); + player.lose(card,ui.special,'toStorage'); + player.markAuto('twdanfa',result.cards); } else event.finish(); 'step 2' game.delayx(); }, - mark: true, - intro: { - content: 'cards', - onunmark: 'throw', + mark:true, + intro:{ + content:'cards', + onunmark:'throw', }, - group: 'twdanfa_draw', - subSkill: { - draw: { - audio: 'twdanfa', - trigger: { player: 'useCard' }, - forced: true, - locked: false, - filter: function (event, player) { - if (!player.storage.twdanfa || !player.storage.twdanfa.length) return false; - var suit = get.suit(event.card, false); - if (suit == 'none' || player.storage.twdanfa_count && player.storage.twdanfa_count.includes(suit)) return false; - for (var i of player.storage.twdanfa) { - if (get.suit(i, false) == suit) return true; + group:'twdanfa_draw', + subSkill:{ + draw:{ + audio:'twdanfa', + trigger:{player:'useCard'}, + forced:true, + locked:false, + filter:function(event,player){ + if(!player.storage.twdanfa||!player.storage.twdanfa.length) return false; + var suit=get.suit(event.card,false); + if(suit=='none'||player.storage.twdanfa_count&&player.storage.twdanfa_count.includes(suit)) return false; + for(var i of player.storage.twdanfa){ + if(get.suit(i,false)==suit) return true; } return false; }, - content: function () { + content:function(){ player.draw(); player.addTempSkill('twdanfa_count'); - if (!player.storage.twdanfa_count) player.storage.twdanfa_count = []; - player.storage.twdanfa_count.push(get.suit(trigger.card, false)); + if(!player.storage.twdanfa_count) player.storage.twdanfa_count=[]; + player.storage.twdanfa_count.push(get.suit(trigger.card,false)); }, }, - count: { onremove: true }, + count:{onremove:true}, }, }, - twlingbao: { - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - var list = player.getStorage('twdanfa'); - if (list.length < 2) return false; - var suit = get.suit(list[0], false); - for (var i = 1; i < list.length; i++) { - if (get.suit(list[i], false) != suit) return true; + twlingbao:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var list=player.getStorage('twdanfa'); + if(list.length<2) return false; + var suit=get.suit(list[0],false); + for(var i=1;i false; - obj.selectCard = -1; + select:2, + backup:function(links){ + var obj=get.copy(lib.skill['twlingbao_'+get.color(links)]); + obj.cards=links; + obj.audio='twlingbao'; + obj.filterCard=()=>false; + obj.selectCard=-1; return obj; }, - prompt: function (links) { - return lib.skill['twlingbao_' + get.color(links)].prompt; + prompt:function(links){ + return lib.skill['twlingbao_'+get.color(links)].prompt; }, - check: function (button) { - var storage = _status.event.player.storage.twdanfa.slice(0); + check:function(button){ + var storage=_status.event.player.storage.twdanfa.slice(0); storage.remove(button.link); - if (storage.filter(function (card) { - return card.suit == button.link.suit; - }).length) return 1 + Math.random(); + if(storage.filter(function(card){ + return card.suit==button.link.suit; + }).length) return 1+Math.random(); return 0; }, }, - subSkill: { - red: { - filterTarget: function (card, player, target) { + subSkill:{ + red:{ + filterTarget:function(card,player,target){ return target.isDamaged(); }, - delay: false, - prompt: '令一名角色回复1点体力', - content: function () { + delay:false, + prompt:'令一名角色回复1点体力', + content:function(){ 'step 0' - var cards = lib.skill.twlingbao_backup.cards; - player.$throw(cards, 1000); - player.unmarkAuto('twdanfa', cards); - game.log(player, '将', cards, '置入了弃牌堆'); + var cards=lib.skill.twlingbao_backup.cards; + player.$throw(cards,1000); + player.unmarkAuto('twdanfa',cards); + game.log(player,'将',cards,'置入了弃牌堆'); game.delayx(); game.cardsDiscard(cards); 'step 1' target.recover(); }, - ai: { - tag: { - recover: 1, + ai:{ + tag:{ + recover:1, }, - result: { - target: 1.5, + result:{ + target:1.5, }, }, }, - black: { - filterTarget: function (card, player, target) { - return target.countDiscardableCards(player, 'hej') > 0; + black:{ + filterTarget:function(card,player,target){ + return target.countDiscardableCards(player,'hej')>0; }, - delay: false, - prompt: '弃置一名角色区域内至多两张区域不同的牌', - content: function () { + delay:false, + prompt:'弃置一名角色区域内至多两张区域不同的牌', + content:function(){ 'step 0' - var cards = lib.skill.twlingbao_backup.cards; - player.$throw(cards, 1000); - player.unmarkAuto('twdanfa', cards); - game.log(player, '将', cards, '置入了弃牌堆'); + var cards=lib.skill.twlingbao_backup.cards; + player.$throw(cards,1000); + player.unmarkAuto('twdanfa',cards); + game.log(player,'将',cards,'置入了弃牌堆'); game.delayx(); game.cardsDiscard(cards); 'step 1' - var num = 0; - if (target.countDiscardableCards(player, 'h')) num++; - if (target.countDiscardableCards(player, 'e')) num++; - if (target.countDiscardableCards(player, 'j')) num++; - if (num) { - player.discardPlayerCard(target, [1, Math.max(2, num)], 'hej', true).set('filterButton', function (button) { - for (var i = 0; i < ui.selected.buttons.length; i++) { - if (get.position(button.link) == get.position(ui.selected.buttons[i].link)) return false; + var num=0; + if(target.countDiscardableCards(player,'h')) num++; + if(target.countDiscardableCards(player,'e')) num++; + if(target.countDiscardableCards(player,'j')) num++; + if(num){ + player.discardPlayerCard(target,[1,Math.max(2,num)],'hej',true).set('filterButton',function(button){ + for(var i=0;i 0 && target.countCards('e', function (card) { - return get.value(card, target) <= 0; - }) > 0 && target.countCards('j', function (card) { - return get.effect(target, card, target, target) < 0; - }) > 8) return 3; - if (target.countCards('h') > 0 && target.countCards('e', function (card) { - return get.value(card, target) > 0; - }) > 0) return -2; + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0&&target.countCards('e',function(card){ + return get.value(card,target)<=0; + })>0&&target.countCards('j',function(card){ + return get.effect(target,card,target,target)<0; + })>8) return 3; + if(target.countCards('h')>0&&target.countCards('e',function(card){ + return get.value(card,target)>0; + })>0) return -2; return 0; }, }, }, }, - none: { - selectTarget: 2, - filterTarget: function (card, player, target) { - if (!ui.selected.targets.length) return true; - return target.countCards('he') > 0; + none:{ + selectTarget:2, + filterTarget:function(card,player,target){ + if(!ui.selected.targets.length) return true; + return target.countCards('he')>0; }, - complexSelect: true, - targetprompt: ['摸牌', '弃牌'], - delay: false, - prompt: '令一名角色摸一张牌并令另一名角色弃置一张牌', - multitarget: true, - multiline: true, - content: function () { + complexSelect:true, + targetprompt:['摸牌','弃牌'], + delay:false, + prompt:'令一名角色摸一张牌并令另一名角色弃置一张牌', + multitarget:true, + multiline:true, + content:function(){ 'step 0' - var cards = lib.skill.twlingbao_backup.cards; - player.$throw(cards, 1000); - player.unmarkAuto('twdanfa', cards); - game.log(player, '将', cards, '置入了弃牌堆'); + var cards=lib.skill.twlingbao_backup.cards; + player.$throw(cards,1000); + player.unmarkAuto('twdanfa',cards); + game.log(player,'将',cards,'置入了弃牌堆'); game.delayx(); game.cardsDiscard(cards); 'step 1' targets[0].draw(); - targets[1].chooseToDiscard('he', true); + targets[1].chooseToDiscard('he',true); }, - ai: { - result: { - target: function (player, target) { - if (!ui.selected.targets.length) return 1; - if (target.countCards('e', function (card) { - return get.value(card, target) <= 0; - }) > 0) return 1; + ai:{ + result:{ + target:function(player,target){ + if(!ui.selected.targets.length) return 1; + if(target.countCards('e',function(card){ + return get.value(card,target)<=0; + })>0) return 1; return -1; }, }, }, }, - backup: { audio: 'twlingbao' }, + backup:{audio:'twlingbao'}, }, - ai: { - order: 1, - result: { player: 1 }, + ai:{ + order:1, + result:{player:1}, }, }, - twsidao: { - audio: 2, - trigger: { - global: 'phaseBefore', - player: 'enterGame', + twsidao:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - forced: true, - locked: false, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0) && !player.storage.twsidao; + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&!player.storage.twsidao; }, - content: function () { + content:function(){ 'step 0' - player.chooseButton(['请选择你的初始法宝', [['gx_lingbaoxianhu', 'gx_taijifuchen', 'gx_chongyingshenfu'], 'vcard']], true).set('ai', function (button) { - return button.link[2] == 'gx_chongyingshenfu' ? 2 : 1; + player.chooseButton(['请选择你的初始法宝',[['gx_lingbaoxianhu','gx_taijifuchen','gx_chongyingshenfu'],'vcard']],true).set('ai',function(button){ + return button.link[2]=='gx_chongyingshenfu'?2:1; }); 'step 1' - if (result.bool) { - var card = game.createCard2(result.links[0][2]); + if(result.bool){ + var card=game.createCard2(result.links[0][2]); lib.inpile.add(result.links[0][2]); - player.storage.twsidao = card; - player.chooseUseTarget(card, 'nopopup', true); + player.storage.twsidao=card; + player.chooseUseTarget(card,'nopopup',true); } }, - group: 'twsidao_equip', - subSkill: { - equip: { - audio: 'twsidao', - trigger: { player: 'phaseZhunbeiBegin' }, - forced: true, - filter: function (event, player) { - var card = player.storage.twsidao; - return card && card.isInPile() && player.hasUseTarget(card); + group:'twsidao_equip', + subSkill:{ + equip:{ + audio:'twsidao', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + var card=player.storage.twsidao; + return card&&card.isInPile()&&player.hasUseTarget(card); }, - content: function () { - player.chooseUseTarget(player.storage.twsidao, 'nopopup', true); + content:function(){ + player.chooseUseTarget(player.storage.twsidao,'nopopup',true); }, }, }, }, - twrangyi: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (event, player) { - return player.countCards('h') > 0; + twrangyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; }, - filterTarget: lib.filter.notMe, - delay: 0, - content: function () { + filterTarget:lib.filter.notMe, + delay:0, + content:function(){ 'step 0' - event.cards = player.getCards('h'); - player.give(event.cards, target).gaintag.add('twrangyi'); + event.cards=player.getCards('h'); + player.give(event.cards,target).gaintag.add('twrangyi'); target.addTempSkill('twrangyi2'); 'step 1' target.chooseToUse({ - prompt: '请使用得到的一张牌,或者受到来自' + get.translation(player) + '的1点伤害', - filterCard: function (card, player) { - if (get.itemtype(card) != 'card' || !card.hasGaintag('twrangyi')) return false; - return lib.filter.filterCard(card, player, event); + prompt:'请使用得到的一张牌,或者受到来自'+get.translation(player)+'的1点伤害', + filterCard:function(card,player){ + if(get.itemtype(card)!='card'||!card.hasGaintag('twrangyi')) return false; + return lib.filter.filterCard(card,player,event); }, - cards: cards, + cards:cards, }); 'step 2' target.removeSkill('twrangyi2'); - if (!result.bool) target.damage('nocard'); + if(!result.bool) target.damage('nocard'); }, - ai: { - order: 1, - result: { - target: function (player, target) { - var hs = player.getCards('h'); - for (var i = 0; i < hs.length; i++) { - var hi = hs[i]; - if (hi.name == 'tao' || target.hasValueTarget(hi, null, true)) return 1; + ai:{ + order:1, + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + for(var i=0;i 0; + })>0; }, - content: function () { - var cards = player.getCards('h', function (card) { + content:function(){ + var cards=player.getCards('h',function(card){ return card.hasGaintag('twrangyi'); }); game.delayx(); - player.give(cards, trigger.getParent(2).player); + player.give(cards,trigger.getParent(2).player); }, - onremove: function (player) { + onremove:function(player){ player.removeGaintag('twrangyi'); }, }, - twbaimei: { - audio: 2, - trigger: { - player: "damageBegin4", + twbaimei:{ + audio:2, + trigger:{ + player:"damageBegin4", }, - forced: true, - filter: function (event, player) { - if (player.countCards('h')) return false; - if (event.hasNature()) return true; - return get.type(event.card, 'trick') == 'trick'; + forced:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + if(event.hasNature()) return true; + return get.type(event.card,'trick')=='trick'; }, - content: function () { + content:function(){ trigger.cancel(); }, - ai: { - effect: { - target: function (card, player, target, current) { - if (target.countCards('h')) return; - if (get.tag(card, 'natureDamage')) return 'zeroplayertarget'; - if (get.type(card) == 'trick' && get.tag(card, 'damage')) { + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target.countCards('h')) return; + if(get.tag(card,'natureDamage')) return 'zeroplayertarget'; + if(get.type(card)=='trick'&&get.tag(card,'damage')){ return 'zeroplayertarget'; } }, }, }, }, - twhuzhu: { - audio: 2, - enable: 'phaseUse', - usable: 1, - filter: function (e, player) { - return player.countCards('e') > 0; + twhuzhu:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(e,player){ + return player.countCards('e')>0; }, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h') > 0 + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0 }, - content: function () { + content:function(){ 'step 0' - target.chooseCard('交给' + get.translation(player) + '一张手牌', 'h', true); + target.chooseCard('交给'+get.translation(player)+'一张手牌','h',true); 'step 1' - target.give(result.cards, player); + target.give(result.cards,player); 'step 2' - if (player.countGainableCards(player, 'e')) target.gainPlayerCard(player, 'e', true); + if(player.countGainableCards(player,'e')) target.gainPlayerCard(player,'e',true); 'step 3' - if (target.isDamaged() && target.hp <= player.hp) { - player.chooseBool('是否令' + get.translation(target) + '回复1点体力?').set('ai', function () { - return get.recoverEffect(target, player, player); + if(target.isDamaged()&&target.hp<=player.hp){ + player.chooseBool('是否令'+get.translation(target)+'回复1点体力?').set('ai',function(){ + return get.recoverEffect(target,player,player); }); } 'step 4' - if (result.bool) target.recover(); + if(result.bool) target.recover(); }, - ai: { - order: 8, - result: { - target: function (player, target) { - var eff = (target.isDamaged() && target.hp <= player.hp) ? get.recoverEffect(target, player, target) : 0; - if (eff <= 0 && !player.countGainableCards(target, 'e')) return -1; + ai:{ + order:8, + result:{ + target:function(player,target){ + var eff=(target.isDamaged()&&target.hp<=player.hp)?get.recoverEffect(target,player,target):0; + if(eff<=0&&!player.countGainableCards(target,'e')) return -1; return eff; }, }, }, }, - twliancai: { - audio: 2, - trigger: { player: ['turnOverEnd', 'phaseJieshuBegin'] }, - filter: function (card, player, target) { - return target == 'phaseJieshuBegin' || player.countCards('h') < player.hp; + twliancai:{ + audio:2, + trigger:{player:['turnOverEnd','phaseJieshuBegin']}, + filter:function(card,player,target){ + return target=='phaseJieshuBegin'||player.countCards('h') 0; + filterTarget:function(card,player,target){ + return target!=player&&target.countGainableCards(player,'e')>0; }, - check: function (card, player) { - if (card.name == 'turnOver') return true; - if (player.isTurnedOver()) return true; - if (player.hp - player.countCards('h') > 1) return true; - return game.hasPlayer(function (current) { - return lib.skill.twliancai.filterTarget(null, player, current) && lib.skill.twliancai.filterAI(current); + check:function(card,player){ + if(card.name=='turnOver') return true; + if(player.isTurnedOver()) return true; + if(player.hp-player.countCards('h')>1) return true; + return game.hasPlayer(function(current){ + return lib.skill.twliancai.filterTarget(null,player,current)&&lib.skill.twliancai.filterAI(current); }); }, - filterAI: function (target) { - var player = _status.event.player; - var att = get.attitude(player, target); - if (target.isDamaged() && target.countCards('e', 'baiyin') && att > 0) return 2 * att; + filterAI:function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(target.isDamaged()&&target.countCards('e','baiyin')&&att>0) return 2*att; return -att; }, - prompt2: function (card, player, target) { - return card.name == 'phaseJieshu' ? '将武将牌翻面,然后获得一名其他角色装备区内的一张牌' : '将手牌摸至与体力值相同'; + prompt2:function(card,player,target){ + return card.name=='phaseJieshu'?'将武将牌翻面,然后获得一名其他角色装备区内的一张牌':'将手牌摸至与体力值相同'; }, - content: function () { + content:function(){ 'step 0' - if (event.triggername == 'phaseJieshuBegin') player.turnOver(); - else { - player.draw(player.hp - player.countCards('h')); + if(event.triggername=='phaseJieshuBegin') player.turnOver(); + else{ + player.draw(player.hp-player.countCards('h')); event.finish(); } 'step 1' - player.chooseTarget('获得一名角色装备区内的一张牌', lib.skill.twliancai.filterTarget).ai = lib.skill.twliancai.filterAI; + player.chooseTarget('获得一名角色装备区内的一张牌',lib.skill.twliancai.filterTarget).ai=lib.skill.twliancai.filterAI; 'step 2' - if (result.bool) { - player.line(result.targets, 'thunder'); - player.gainPlayerCard('e', true, result.targets[0]); + if(result.bool){ + player.line(result.targets,'thunder'); + player.gainPlayerCard('e',true,result.targets[0]); } }, }, - twqijia: { + twqijia:{ //group:'twqijia_alka', - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - return player.countCards('e', function (card) { + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('e',function(card){ return !player.getStorage('twqijia_alka').includes(get.subtype(card)); }); }, - filterTarget: function (card, player, target) { - return target != player && player.canUse({ name: 'sha' }, target); + filterTarget:function(card,player,target){ + return target!=player&&player.canUse({name:'sha'},target); }, - position: 'e', - filterCard: function (card, player) { + position:'e', + filterCard:function(card,player){ return !player.getStorage('twqijia_alka').includes(get.subtype(card)); }, - content: function () { + content:function(){ 'step 0' player.addTempSkill('twqijia_alka'); player.storage.twqijia_alka.push(get.subtype(cards[0])); - player.useCard({ name: 'sha' }, target, false); + player.useCard({name:'sha'},target,false); }, - subSkill: { - alka: { - charlotte: true, - onremove: function (player) { + subSkill:{ + alka:{ + charlotte:true, + onremove:function(player){ delete player.storage.twqijia_alka; delete player.storage.twzhuchen; player.unmarkSkill('twzhuchen'); }, - init: function (player, skill) { - if (!player.storage[skill]) player.storage[skill] = []; - if (!player.storage.twzhuchen) player.storage.twzhuchen = []; + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + if(!player.storage.twzhuchen) player.storage.twzhuchen=[]; }, - mod: { - globalFrom: function (from, to, distance) { - if (from.storage.twzhuchen && from.storage.twzhuchen.includes(to)) return -Infinity; + mod:{ + globalFrom:function(from,to,distance){ + if(from.storage.twzhuchen&&from.storage.twzhuchen.includes(to)) return -Infinity; } }, }, }, - check: function (card) { - return 7 - get.value(card); + check:function(card){ + return 7-get.value(card); }, - ai: { - order: function () { - return get.order({ name: 'sha' }) - 0.2; + ai:{ + order:function(){ + return get.order({name:'sha'})-0.2; }, - result: { - target: function (player, target) { - return get.effect(target, { name: 'sha' }, player, player); + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,player); }, }, }, }, - twzhuchen: { - enable: 'phaseUse', - filter: function (event, player) { - return player.countCards('h', lib.skill.twzhuchen.filterCard) > 0; + twzhuchen:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h',lib.skill.twzhuchen.filterCard)>0; }, - filterCard: function (card, player) { - var name = get.name(card, player); - return name == 'tao' || name == 'jiu'; + filterCard:function(card,player){ + var name=get.name(card,player); + return name=='tao'||name=='jiu'; }, - filterTarget: lib.filter.notMe, - content: function () { + filterTarget:lib.filter.notMe, + content:function(){ player.addTempSkill('twqijia_alka'); player.storage.twzhuchen.add(target); player.markSkill('twzhuchen'); }, - intro: { - content: function (content, player) { - return '至' + get.translation(content) + '的距离视为1'; + intro:{ + content:function(content,player){ + return '至'+get.translation(content)+'的距离视为1'; }, }, }, - twxiaolian: { - audio: 2, - trigger: { global: 'useCardToTarget' }, - logTarget: 'target', - filter: function (event, player) { - return event.card && event.card.name == 'sha' && event.player != player && - event.targets.length == 1 && event.targets[0] != player; + twxiaolian:{ + audio:2, + trigger:{global:'useCardToTarget'}, + logTarget:'target', + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player!=player&& + event.targets.length==1&&event.targets[0]!=player; }, - check: function (event, player) { - return get.effect(event.targets[0], event.card, event.player, player) <= get.effect(player, event.card, event.player, player); + check:function(event,player){ + return get.effect(event.targets[0],event.card,event.player,player)<=get.effect(player,event.card,event.player,player); }, - content: function () { - trigger.getParent().twxiaolian = trigger.targets[0]; - trigger.targets.length = 0; - trigger.getParent().triggeredTargets2.length = 0; + content:function(){ + trigger.getParent().twxiaolian=trigger.targets[0]; + trigger.targets.length=0; + trigger.getParent().triggeredTargets2.length=0; trigger.targets.push(player); }, - group: 'twxiaolian_damage', - subSkill: { - distance: { - sub: true, - charlotte: true, - init: function (player, skill) { - if (!player.storage[skill]) player.storage[skill] = []; + group:'twxiaolian_damage', + subSkill:{ + distance:{ + sub:true, + charlotte:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; }, - mark: true, - marktext: '马', - intro: { - content: 'cards', - onunmark: 'throw', + mark:true, + marktext:'马', + intro:{ + content:'cards', + onunmark:'throw', }, - mod: { - globalTo: function (from, to, distance) { - if (from != to && to.storage.twxiaolian_distance) return distance + to.storage.twxiaolian_distance.length; + mod:{ + globalTo:function(from,to,distance){ + if(from!=to&&to.storage.twxiaolian_distance) return distance+to.storage.twxiaolian_distance.length; }, }, }, - damage: { - sub: true, - trigger: { player: 'damageEnd' }, - direct: true, - filter: function (event, player) { - return event.getParent(2).twxiaolian != undefined; + damage:{ + sub:true, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return event.getParent(2).twxiaolian!=undefined; }, - content: function () { + content:function(){ 'step 0' - var target = trigger.getParent(2).twxiaolian; - event.target = target; - player.chooseCard('是否将一张牌当做【马】置于' + get.translation(target) + '的武将牌旁?', 'he').ai = function (card) { - if (get.attitude(_status.event.player, _status.event.getParent('twxiaolian_damage').target) > 2) return 7 - get.value(card); + var target=trigger.getParent(2).twxiaolian; + event.target=target; + player.chooseCard('是否将一张牌当做【马】置于'+get.translation(target)+'的武将牌旁?','he').ai=function(card){ + if(get.attitude(_status.event.player,_status.event.getParent('twxiaolian_damage').target)>2) return 7-get.value(card); return 0; }; 'step 1' - if (result.bool) { - player.logSkill('twxiaolian', target); - player.lose(result.cards, ui.special, 'toStorage'); + if(result.bool){ + player.logSkill('twxiaolian',target); + player.lose(result.cards,ui.special,'toStorage'); target.addSkill('twxiaolian_distance'); target.storage.twxiaolian_distance.addArray(result.cards); target.markSkill('twxiaolian_distance'); @@ -15064,224 +15064,224 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, }, - twtijin: { - audio: 2, - trigger: { global: 'useCardToPlayer' }, - filter: function (event, player) { - return event.card && event.card.name == 'sha' && event.player != player && event.target != player && - event.targets.length == 1 && event.player.inRange(player); + twtijin:{ + audio:2, + trigger:{global:'useCardToPlayer'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player!=player&&event.target!=player&& + event.targets.length==1&&event.player.inRange(player); }, - logTarget: 'target', - check: function (event, player) { - return get.effect(event.targets[0], event.card, event.player, player) <= get.effect(player, event.card, event.player, player); + logTarget:'target', + check:function(event,player){ + return get.effect(event.targets[0],event.card,event.player,player)<=get.effect(player,event.card,event.player,player); }, - content: function () { + content:function(){ 'step 0' - trigger.targets.length = 0; - trigger.getParent().triggeredTargets1.length = 0; + trigger.targets.length=0; + trigger.getParent().triggeredTargets1.length=0; trigger.targets.push(player); - var next = game.createEvent('twtijin_discard', null, trigger.getParent(2)); - next.player = player; - next.target = trigger.player; - next.setContent(function () { - if (target.isDead() || !target.countCards('he')) return; - player.line(target, 'green'); - player.discardPlayerCard(target, true, 'he'); + var next=game.createEvent('twtijin_discard',null,trigger.getParent(2)); + next.player=player; + next.target=trigger.player; + next.setContent(function(){ + if(target.isDead()||!target.countCards('he')) return; + player.line(target,'green'); + player.discardPlayerCard(target,true,'he'); }); }, }, - twyanqin: { - forbid: ['guozhan'], - audio: 2, - trigger: { player: 'phaseBegin' }, - direct: true, - content: function () { + twyanqin:{ + forbid:['guozhan'], + audio:2, + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ 'step 0' - var list = []; - if (player.group != 'wei') list.push('wei2'); - if (player.group != 'shu') list.push('shu2'); + var list=[]; + if(player.group!='wei') list.push('wei2'); + if(player.group!='shu') list.push('shu2'); list.push('cancel2'); - player.chooseControl(list).set('ai', function () { + player.chooseControl(list).set('ai',function(){ return list.randomGet(); - }).set('prompt', get.prompt2('twyanqin')); + }).set('prompt',get.prompt2('twyanqin')); 'step 1' - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.logSkill('twyanqin'); - var group = result.control.slice(0, 3); + var group=result.control.slice(0,3); player.changeGroup(group); } }, }, - twbaobian: { - audio: 2, - trigger: { source: 'damageBegin2' }, - filter: function (event, player) { - var card = event.card; - if (!card || (card.name != 'sha' && card.name != 'juedou')) return false; - return event.player.group == player.group || event.player.countCards('h') > event.player.hp + twbaobian:{ + audio:2, + trigger:{source:'damageBegin2'}, + filter:function(event,player){ + var card=event.card; + if(!card||(card.name!='sha'&&card.name!='juedou')) return false; + return event.player.group==player.group||event.player.countCards('h')>event.player.hp }, - check: function (event, player) { - var att = get.attitude(player, event.player); - if (event.player.group == player.group) return att > 0; - return att < 0; + check:function(event,player){ + var att=get.attitude(player,event.player); + if(event.player.group==player.group) return att>0; + return att<0; }, - logTarget: 'player', - content: function () { - var target = trigger.player; - if (target.group == player.group) { + logTarget:'player', + content:function(){ + var target=trigger.player; + if(target.group==player.group){ trigger.cancel(); - var num = target.maxHp - target.countCards('h'); - if (num) target.draw(num); + var num=target.maxHp-target.countCards('h'); + if(num) target.draw(num); } - else { - player.discardPlayerCard(target, 'h', true, target.countCards('h') - target.hp) + else{ + player.discardPlayerCard(target,'h',true,target.countCards('h')-target.hp) } }, }, - chijie: { - audio: true, - forbid: ['guozhan'], - trigger: { - global: 'phaseBefore', - player: 'enterGame', + chijie:{ + audio:true, + forbid:['guozhan'], + trigger:{ + global:'phaseBefore', + player:'enterGame', }, - direct: true, - filter: function (event, player) { - return (event.name != 'phase' || game.phaseNumber == 0) && game.hasPlayer(function (current) { - return current.group != player.group && lib.group.includes(current.group); + direct:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer(function(current){ + return current.group!=player.group&&lib.group.includes(current.group); }); }, - content: function () { + content:function(){ 'step 0' - var list = lib.group.filter(function (group) { - return group != player.group && game.hasPlayer(function (current) { - return current.group == group; + var list=lib.group.filter(function(group){ + return group!=player.group&&game.hasPlayer(function(current){ + return current.group==group; }); }); list.push('cancel2'); - player.chooseControl(list).set('prompt', get.prompt('chijie')).set('prompt2', '将自己的势力变更为场上存在的一个势力').set('ai', function () { + player.chooseControl(list).set('prompt',get.prompt('chijie')).set('prompt2','将自己的势力变更为场上存在的一个势力').set('ai',function(){ return list.randomGet(); }); 'step 1' - if (result.control != 'cancel2') { + if(result.control!='cancel2'){ player.logSkill('chijie'); player.changeGroup(result.control); } }, }, - waishi: { - audio: 2, - enable: 'phaseUse', - filter: function (event, player) { - let used = player.getStat('skill').waishi; - if (used && used > player.countMark('waishi_remover')) return false; - return player.countCards('he') > 0 && game.hasPlayer(target => target != player && target.countCards('h') > 0); + waishi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + let used=player.getStat('skill').waishi; + if(used&&used>player.countMark('waishi_remover')) return false; + return player.countCards('he')>0&&game.hasPlayer(target=>target!=player&&target.countCards('h')>0); }, - filterTarget: function (card, player, target) { - return target != player && target.countCards('h') >= ui.selected.cards.length; + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>=ui.selected.cards.length; }, - filterCard: true, - position: 'he', - check: function (card) { - if (!game.hasPlayer(function (current) { - return current != _status.event.player && current.countCards('h') > ui.selected.cards.length; + filterCard:true, + position:'he', + check:function(card){ + if(!game.hasPlayer(function(current){ + return current!=_status.event.player&¤t.countCards('h')>ui.selected.cards.length; })) return 0; - return 6 - get.value(card); + return 6-get.value(card); }, - selectCard: function () { - if (!ui.selected.targets.length) return [1, game.countGroup()]; - return [1, Math.min(ui.selected.targets[0].countCards('h'), game.countGroup())]; + selectCard:function(){ + if(!ui.selected.targets.length) return [1,game.countGroup()]; + return [1,Math.min(ui.selected.targets[0].countCards('h'),game.countGroup())]; }, - discard: false, - lose: false, - delay: 0, - content: function () { + discard:false, + lose:false, + delay:0, + content:function(){ 'step 0' - player.choosePlayerCard(target, true, 'h', cards.length); + player.choosePlayerCard(target,true,'h',cards.length); 'step 1' - player.swapHandcards(target, cards, result.cards); + player.swapHandcards(target,cards,result.cards); game.delayex(); 'step 2' - if (target.countCards('h') > player.countCards('h') || player.group == target.group) player.draw(); + if(target.countCards('h')>player.countCards('h')||player.group==target.group) player.draw(); }, - ai: { - order: 7, - result: { - player: function (player, target) { - if (player.countCards('h') < target.countCards('h') || player.group == target.group) return 1; + ai:{ + order:7, + result:{ + player:function(player,target){ + if(player.countCards('h') { - return current.group != player.group && lib.group.includes(current.group); + var controls=['选项二']; + if(game.hasPlayer(current=>{ + return current.group!=player.group&&lib.group.includes(current.group); })) controls.unshift('选项一'); - if (game.hasPlayer(current => current != player)) controls.push('选项三'); - player.chooseControl(controls, 'cancel2').set('prompt', get.prompt('renshe')).set('choiceList', choiceList).set('ai', function () { - if (game.hasPlayer(function (current) { - return get.attitude(player, current) > 0 || current.hasSkillTag('nogain'); + if(game.hasPlayer(current=>current!=player)) controls.push('选项三'); + player.chooseControl(controls,'cancel2').set('prompt',get.prompt('renshe')).set('choiceList',choiceList).set('ai',function(){ + if(game.hasPlayer(function(current){ + return get.attitude(player,current)>0||current.hasSkillTag('nogain'); })) return '选项三' return '选项二'; }); 'step 1' - if (result.control == 'cancel2') event.finish(); - else { + if(result.control=='cancel2') event.finish(); + else{ player.logSkill('renshe'); - switch (result.control) { + switch(result.control){ case '选项一': event.goto(3); break; case '选项二': - player.addMark('waishi_remover', 1, false); - player.addTempSkill('waishi_remover', { player: 'phaseUseAfter' }); + player.addMark('waishi_remover',1,false); + player.addTempSkill('waishi_remover',{player:'phaseUseAfter'}); event.finish(); break; case '选项三': - player.chooseTarget('请选择一名角色,与其各摸一张牌', lib.filter.notMe, true).set('ai', function (target) { - if (target.hasSkillTag('nogain')) return 0.1; - return get.attitude(_status.event.player, target); + player.chooseTarget('请选择一名角色,与其各摸一张牌',lib.filter.notMe,true).set('ai',function(target){ + if(target.hasSkillTag('nogain')) return 0.1; + return get.attitude(_status.event.player,target); }) } } 'step 2' - if (result.bool) { - var target = result.targets[0]; - player.line(target, 'green'); - game.asyncDraw([player, target].sortBySeat()); + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + game.asyncDraw([player,target].sortBySeat()); } game.delayex(); event.finish(); 'step 3' - var list = lib.group.filter(function (group) { - return group != player.group && game.hasPlayer(function (current) { - return current.group == group; + var list=lib.group.filter(function(group){ + return group!=player.group&&game.hasPlayer(function(current){ + return current.group==group; }); }); - player.chooseControl(list).set('prompt', get.prompt('chijie')).set('prompt2', '将自己的势力变更为场上存在的一个势力').set('ai', function () { + player.chooseControl(list).set('prompt',get.prompt('chijie')).set('prompt2','将自己的势力变更为场上存在的一个势力').set('ai',function(){ return list.randomGet(); }); 'step 4' @@ -15289,776 +15289,776 @@ game.import('character', function (lib, game, ui, get, ai, _status) { }, }, //英文版特典武将凯撒 - zhengfu: { - trigger: { - player: "useCardToPlayered", + zhengfu:{ + trigger:{ + player:"useCardToPlayered", }, - check: function (event, player) { - return get.attitude(player, event.target) < 0; + check:function (event,player){ + return get.attitude(player,event.target)<0; }, - filter: function (event, player) { - return event.card.name == 'sha'; + filter:function(event,player){ + return event.card.name=='sha'; }, - logTarget: "target", - line: false, - content: function () { + 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'; + 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); + }).set('prompt','请选择一种牌的类别').set('target',trigger.target); 'step 1' - trigger.target.chooseCard('he', '交给' + get.translation(player) + '一张' + get.translation(result.control) + '牌,否则此【杀】不可被闪避', function (card) { - return get.type2(card) == _status.event.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')).set('control', result.control); + trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避',function(card){ + return get.type2(card)==_status.event.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')).set('control',result.control); 'step 2' - if (result.bool) { - var cards = result.cards; - trigger.target.give(cards, player); + if(result.bool){ + var cards=result.cards; + trigger.target.give(cards,player); } - else { + else{ trigger.getParent().directHit.add(trigger.target); game.delay(); } } } }, - perfectPair: { - tw_liufuren: ['yuanshao'], - tw_xiahoushang: ['caopi'], + perfectPair:{ + tw_liufuren:['yuanshao'], + tw_xiahoushang:['caopi'], }, - characterReplace: { - tw_caocao: ['tw_caocao', 'jsrg_caocao', 'yj_caocao'], - mateng: ['tw_mateng', 'mateng'], - xiahouen: ['tw_xiahouen', 'jsrg_xiahouen'], - jiangji: ['tw_jiangji', 'jiangji'], - baoxin: ['tw_baoxin', 'baoxin'], - yanxiang: ['yanxiang', 'tw_yanxiang'], - liwei: ['liwei', 'tw_liwei'], + characterReplace:{ + tw_caocao:['tw_caocao','jsrg_caocao','yj_caocao'], + mateng:['tw_mateng','mateng'], + xiahouen:['tw_xiahouen','jsrg_xiahouen'], + jiangji:['tw_jiangji','jiangji'], + baoxin:['tw_baoxin','baoxin'], + yanxiang:['yanxiang','tw_yanxiang'], + liwei:['liwei','tw_liwei'], }, - dynamicTranslate: { - twfeifu: function (player) { - var str = '锁定技,转换技。'; - if (!player.storage.twfeifu) str += ''; - str += '阴:当你成为【杀】的唯一目标后;'; - if (!player.storage.twfeifu) str += ''; - if (player.storage.twfeifu) str += ''; - str += '阳:当你使用【杀】指定唯一目标后;'; - if (player.storage.twfeifu) str += ''; - str += '目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。'; + dynamicTranslate:{ + twfeifu:function(player){ + var str='锁定技,转换技。'; + if(!player.storage.twfeifu) str+=''; + str+='阴:当你成为【杀】的唯一目标后;'; + if(!player.storage.twfeifu) str+=''; + if(player.storage.twfeifu) str+=''; + str+='阳:当你使用【杀】指定唯一目标后;'; + if(player.storage.twfeifu) str+=''; + str+='目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。'; return str; }, - twfengpo: function (player) { - if (player.storage.twfengpo) return '当你使用【杀】或【决斗】指定唯一目标后,你可观看目标角色的手牌并选择一项:⒈摸X张牌。⒉令此牌的伤害值基数+X(X为其手牌中的红色牌数)。'; + twfengpo:function(player){ + if(player.storage.twfengpo) return '当你使用【杀】或【决斗】指定唯一目标后,你可观看目标角色的手牌并选择一项:⒈摸X张牌。⒉令此牌的伤害值基数+X(X为其手牌中的红色牌数)。'; return '①当你使用【杀】或【决斗】指定唯一目标后,你可观看目标角色的手牌并选择一项:⒈摸X张牌。⒉令此牌的伤害值基数+X(X为其手牌中的♦数)。②当你杀死一名角色后,你将〖凤魄①〗中的“♦数”改为“红色牌数”。'; }, - twjiexun: function (player) { - return lib.translate[player.hasSkill('funan_jiexun') ? 'twjiexunx_info' : 'twjiexun_info']; + twjiexun:function(player){ + return lib.translate[player.hasSkill('funan_jiexun')?'twjiexunx_info':'twjiexun_info']; }, twzhenliang: function (player) { - if (player.storage.twzhenliang) return '转换技。阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; + if(player.storage.twzhenliang) return '转换技。阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; return '转换技。阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。'; }, - twdengjian: function (player) { - let str = '①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。'; - if (player.hasSkill('twdengjian_ban')) str = '' + str + ''; - str += '②你使用“剑法”牌不计入次数限制。'; + twdengjian:function(player){ + let str='①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。'; + if(player.hasSkill('twdengjian_ban')) str=''+str+''; + str+='②你使用“剑法”牌不计入次数限制。'; return str; }, }, - translate: { - tw_beimihu: 'TW卑弥呼', - tw_beimihu_prefix: 'TW', - nashime: '难升米', - tw_xiahouba: 'TW夏侯霸', - tw_xiahouba_prefix: 'TW', - tw_zumao: 'TW祖茂', - tw_zumao_prefix: 'TW', - tw_caoang: 'TW曹昂', - tw_caoang_prefix: 'TW', - tw_dingfeng: 'TW丁奉', - tw_dingfeng_prefix: 'TW', - tw_caohong: 'TW将曹洪', - tw_caohong_prefix: 'TW将', - tw_maliang: 'TW马良', - tw_maliang_prefix: 'TW', + translate:{ + tw_beimihu:'TW卑弥呼', + tw_beimihu_prefix:'TW', + nashime:'难升米', + tw_xiahouba:'TW夏侯霸', + tw_xiahouba_prefix:'TW', + tw_zumao:'TW祖茂', + tw_zumao_prefix:'TW', + tw_caoang:'TW曹昂', + tw_caoang_prefix:'TW', + tw_dingfeng:'TW丁奉', + tw_dingfeng_prefix:'TW', + tw_caohong:'TW将曹洪', + tw_caohong_prefix:'TW将', + tw_maliang:'TW马良', + tw_maliang_prefix:'TW', - twyanqin: '姻亲', - twyanqin_info: '准备阶段,你可以将势力变更为魏或蜀。', - twbaobian: '豹变', - twbaobian_info: '当你使用【杀】或【决斗】造成伤害时,若目标角色的势力与你相同,则你可以防止此伤害,然后其将手牌数补充至与体力值相同。若不同且其手牌数大于体力值,则你可以将其手牌弃置至与其体力值相同。', - twtijin: '替巾', - twtijin_info: '当你攻击范围内的一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,此【杀】结算完成后,你弃置该角色的一张牌。', - twxiaolian: '孝廉', - twxiaolian_info: '当一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,当你受到此【杀】的伤害后,你可以将一张牌置于此【杀】原目标的武将牌旁,称为“马”,且令其获得如下效果:其他角色计算至其的距离+X(X为其武将牌旁的“马”数)。', - twqijia: '弃甲', - twqijia_info: '出牌阶段,你可以弃置一张装备区内的牌(每种类型的装备牌限一次),然后视为对攻击范围内的一名其他角色使用了一张【杀】。', - twzhuchen: '诛綝', - twzhuchen_info: '出牌阶段,你可以弃置一张【桃】或【酒】并选择一名其他角色。你与其的距离视为1直到此阶段结束。', - twhuzhu: '护主', - twhuzhu_info: '出牌阶段限一次,若你的装备区内有牌,则你可以令一名其他角色交给你一张手牌,然后获得你装备区内的一张牌。若其体力值不大于你,则你可以令其回复1点体力。', - twliancai: '敛财', - twliancai_info: '结束阶段,你可以将武将牌翻面,然后获得一名其他角色装备区内的一张牌。当你的武将牌翻面时,你可以将手牌补至与体力值相同。', - twrangyi: '攘夷', - twrangyi2: '攘夷', - twrangyi_info: '出牌阶段限一次,你可以将所有手牌交给一名其他角色,然后令其选择一项:1.使用其中的一张牌,并于此牌被使用时将其余的牌交还给你。2.受到来自你的1点伤害。', - twbaimei: '白眉', - twbaimei_info: '锁定技,若你没有手牌,则防止你受到的所有属性伤害和锦囊牌造成的伤害。', - chijie: '持节', - chijie_info: ' 游戏开始时,你可以选择一个现存势力,你的势力视为该势力。', - waishi: '外使', - waishi_info: ' 出牌阶段限一次,你可以用至多X张牌交换一名其他角色等量的手牌(X为现存势力数),然后若其与你势力相同或手牌多于你,你摸一张牌。', - renshe: '忍涉', - renshe_info: '当你受到伤害后,你可以选择一项:将势力改为现存的另一个势力;或可以额外发动一次“外使”直到你的下个出牌阶段结束;或与另一名其他角色各摸一张牌。', - tw_gexuan: 'TW葛玄', - tw_gexuan_prefix: 'TW', - twdanfa: '丹法', - twdanfa_info: '准备阶段或结束阶段开始时,你可将一张牌置于武将牌上,称为“丹”。每回合每种花色限一次,当你使用牌时,若“丹”中有与此牌花色相同的牌,则你摸一张牌。', - twlingbao: '灵宝', - twlingbao_info: '出牌阶段限一次,你可以将两张花色不同的“丹”置入弃牌堆。若这两张牌:均为红色,你令一名其他角色回复1点体力;均为黑色,你弃置一名其他角色区域内至多两张区域不同牌;颜色不同,则你令一名角色摸一张牌,并令另一名角色弃置一张牌。', - twsidao: '司道', - twsidao_info: '游戏开始时,你选择一张“法宝”置入装备区。准备阶段,若你以此法选择的法宝在牌堆/弃牌堆中,则你使用之。', - gx_lingbaoxianhu: '灵宝仙壶', - gx_lingbaoxianhu_info: '锁定技,当你造成点数大于1的伤害后,或有角色死亡后,你加1点体力上限并回复1点体力。', - gx_taijifuchen: '太极拂尘', - gx_taijifuchen_info: '锁定技,当你使用【杀】指定目标后,你令目标角色选择一项:①弃置一张牌,若此牌和【杀】花色相同,则你获得之。②其不可响应此【杀】。', - gx_chongyingshenfu: '冲应神符', - gx_chongyingshenfu_info: '锁定技。①当你受到牌造成的伤害后,你记录此牌的名称。②当你受到〖冲应神符①〗记录过的牌造成的伤害时,你令此牌伤害-1。', - tw_dongzhao: 'TW董昭', - tw_dongzhao_prefix: 'TW', - twmiaolve: '妙略', - twmiaolve_info: '游戏开始时,你获得两张【瞒天过海】。当你受到1点伤害后,你可选择:①获得一张【瞒天过海】并摸一张牌。②获得一张智囊。', - twyingjia: '迎驾', - twyingjia_info: '一名角色的回合结束时,若你本回合内使用过两张或更多的同名锦囊牌,则你可弃置一张手牌并令一名角色进行一个额外回合。', - dz_mantianguohai: '瞒天过海', - dz_mantianguohai_info: '此牌不计入拥有者的手牌上限。出牌阶段,对一至两名区域内有牌的其他角色使用。你获得目标角色一张牌,然后依次交给每名目标角色各一张牌。', - jiachong: 'TW贾充', - jiachong_prefix: 'TW', - beini: '悖逆', - beini_info: '出牌阶段限一次,你可以选择一名体力值不小于你的角色,令你或其摸两张牌,然后未摸牌的角色视为对摸牌的角色使用一张【杀】。', - dingfa: '定法', - dingfa_info: '弃牌阶段结束时,若本回合你失去的牌数不小于你的体力值,你可以选择一项:1、回复1点体力;2、对一名其他角色造成1点伤害。', - duosidawang: '朵思大王', - equan: '恶泉', - equan_info: '锁定技。①当有角色于你的回合内受到伤害后,其获得X枚“毒”(X为伤害值)。②准备阶段,你令所有拥有“毒”标记的角色移去所有“毒”标记并失去等量的体力。③当有角色因〖恶泉②〗进入濒死状态时,你令其所有技能失效直到回合结束。', - manji: '蛮汲', - manji_info: '锁定技。其他角色失去体力后,若你的体力值:不大于该角色,你回复1点体力;不小于该角色,你摸一张牌。', - wuban: 'TW吴班', - wuban_prefix: 'TW', - jintao: '进讨', - jintao_info: '锁定技,你使用【杀】无距离限制且次数上限+1。你于出牌阶段内使用的第一张【杀】伤害+1,第二张【杀】不可被响应。', - yuejiu: 'TW乐就', - yuejiu_prefix: 'TW', - cuijin: '催进', - cuijin_info: '当你或你攻击范围内的角色使用【杀】时,你可以弃置一张牌并获得如下效果:此【杀】的伤害值基数+1,且当此【杀】结算结束后,若未造成过伤害,则你对使用者造成1点伤害。', - tw_zhaoxiang: 'TW赵襄', - tw_zhaoxiang_prefix: 'TW', - twfuhan: '扶汉', - twfuhan_info: '限定技。准备阶段开始时时,你可以移去所有"梅影"标记,然后从五张未登场的蜀势力武将牌中选择一名获得其所有技能,将体力上限数调整为以此技能移去所有“梅影”标记的数量(最少为2,最多为8)并回复1点体力,然后从牌堆/弃牌堆/场上获得【梅影枪】。', - twqueshi: '鹊拾', - twqueshi_info: '游戏开始时,你将【梅影枪】置于你的装备区。', - meiyingqiang: '梅影枪', - meiyingqiang_info: '当你于其他角色的回合内第一次失去牌时,你可以使用一张【杀】。', - tw_fuwan: 'TW伏完', - tw_fuwan_prefix: 'TW', - twmoukui: '谋溃', - twmoukui_info: '当你使用【杀】指定目标后,你可以选择一项:①摸一张牌;②弃置该角色的一张牌;③背水:若此【杀】未因造成伤害而令该角色进入过濒死状态,则该角色弃置你的一张牌。', - tw_yujin: 'SP于禁', - tw_yujin_prefix: 'SP', - xinzhenjun: '镇军', - xinzhenjun_info: '出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸1+X张牌(X为此【杀】造成的伤害总点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。', - tw_hucheer: 'TW胡车儿', - tw_hucheer_prefix: 'TW', - twshenxing: '神行', - twshenxing_info: '锁定技。若你的装备区内没有坐骑牌,则你至其他角色的距离-1且手牌上限+1。', - twdaoji: '盗戟', - twdaoji_info: '出牌阶段限一次,你可以弃置一张非基本牌并选择一名攻击范围内的角色,获得其一张牌。若你以此法得到的牌为:基本牌,你摸一张牌;装备牌,你使用此牌并对其造成1点伤害。', - tw_hejin: 'TW何进', - tw_hejin_prefix: 'TW', - twmouzhu: '谋诛', - twmouzhu_info: '出牌阶段限一次,你可以选择一名其他角色A。你令除A外所有体力值小于等于你的其他角色依次选择是否交给你一张牌。若你以此法得到的牌数X:等于0,你和所有进行选择的角色依次失去1点体力。大于0,你令A选择由你视为对其使用一张伤害值基数为X的【杀】或【决斗】。', - twyanhuo: '延祸', - twyanhuo_info: '当你死亡时,你可以选择一项:①令一名其他角色弃置X张牌。②令X名其他角色依次弃置一张牌。(X为你的牌数)', - tw_mayunlu: 'TW马云禄', - tw_mayunlu_prefix: 'TW', - twfengpo: '凤魄', - twfengpo_info: '①当你使用【杀】或【决斗】指定唯一目标后,你可观看目标角色的手牌并选择一项:⒈摸X张牌。⒉令此牌的伤害值基数+X(X为其手牌中的♦数)。②当你杀死一名角色后,你将〖凤魄①〗中的“♦数”改为“红色牌数”。', - tw_re_caohong: 'TW曹洪', - tw_re_caohong_prefix: 'TW', - twyuanhu: '援护', - twyuanhu_info: '出牌阶段限一次。你可将一张装备牌置入一名角色的装备区内。若此牌为:武器牌,你弃置与其距离为1的另一名角色区域的一张牌;防具牌,其摸一张牌;坐骑牌或宝物牌,其回复1点体力。然后若其体力值或手牌数不大于你,则你摸一张牌,且你可以于本回合的结束阶段发动一次〖援护〗。', - twjuezhu: '决助', - twjuezhu_info: '限定技。准备阶段,你可废除一个坐骑栏,令一名角色获得〖飞影〗并废除判定区。该角色死亡后,你恢复以此法废除的装备栏。', - tw_zangba: 'TW臧霸', - tw_zangba_prefix: 'TW', - twhanyu: '捍御', - twhanyu_info: '锁定技。游戏开始时,你获得牌堆中的基本牌,锦囊牌,装备牌各一张。', - twhengjiang: '横江', - twhengjiang_info: '出牌阶段限一次,当你使用基本牌或普通锦囊牌指定唯一目标后,你可将此牌的目标改为攻击范围内的所有合法目标,然后你于此牌结算结束后摸X张牌(X为因响应此牌而使用或打出过牌的角色数)。', - tw_huojun: 'TW霍峻', - tw_huojun_prefix: 'TW', - twsidai: '伺怠', - twsidai_info: '限定技。出牌阶段,你可以将手牌区内的所有基本牌当做【杀】使用(无距离和次数限制)。若此牌对应的实体牌中:包含【闪】,则目标角色成为此牌的目标后,需弃置一张基本牌,否则不可响应此牌;包含【桃】,则当目标角色受到此牌的伤害后,其减1点体力上限;包含【酒】,则当目标角色受到此牌的伤害时,此伤害×2。', - twjieyu: '竭御', - twjieyu_info: '每轮限一次。结束阶段开始时,或当你于一轮内第一次受到伤害后,你可以弃置所有手牌,然后从弃牌堆中获得不同牌名的基本牌各一张。', - tw_liuhong: 'TW刘宏', - tw_liuhong_prefix: 'TW', - twyujue: '鬻爵', - twyujue_give: '鬻爵', - twyujue_info: '①其他角色的出牌阶段内,可以交给你任意张牌(每阶段上限为两张)。②当你于回合外获得其他角色的一张牌后,你可令其选择本回合内未选择过的一项:⒈弃置攻击范围内一名角色的一张牌。⒉下一次使用牌时,从牌堆中获得一张同类别的牌。', - twgezhi: '革制', - twgezhi_info: '①当你于出牌阶段内首次使用某种类别的牌时,你可以重铸一张手牌。②出牌阶段结束时,若你本阶段内因〖革制①〗失去过至少两张牌,则你可以令一名角色选择获得一个其未获得过的效果:⒈攻击范围+2;⒉手牌上限+2;⒊加1点体力上限。', - twfengqi: '烽起', - twfengqi_info: '主公技,锁定技。①其他群势力角色发动〖鬻爵①〗时,将每阶段上限改为四张。②以其他角色为目标的〖革制②〗结算结束后,目标角色可以获得其武将牌上的主公技。', - tw_caocao: 'TW曹操', - tw_caocao_prefix: 'TW', - twlingfa: '令法', - twlingfa_info: '①第一轮游戏开始时,你可选择获得如下效果直到本轮结束:其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。②第二轮游戏开始时,你可选择获得如下效果直到本轮结束:其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。③第三轮游戏开始时,你失去〖令法〗并获得〖治暗〗。', - twzhian: '治暗', - twzhian_info: '每回合限一次。一名角色使用装备牌或延时锦囊牌后,你可选择:⒈弃置位于场上的此牌。⒉弃置一张手牌并获得位于场上的此牌。⒊对其造成1点伤害。', - tw_zhangmancheng: 'TW张曼成', - tw_zhangmancheng_prefix: 'TW', - twfengji: '蜂集', - twfengji_info: '出牌阶段开始时,若你没有“示”,则你可以将一张牌作为“示”置于武将牌上并施法:从牌堆中获得X张与“示”牌名相同的牌,然后移去“示”。', - twyiju: '蚁聚', - twyiju_info: '非锁定技。若你的武将牌上有“示”,则:①你使用【杀】的次数上限和攻击范围的基数改为你的体力值。②当你受到伤害时,你移去“示”,且令此伤害+1。', - twbudao: '布道', - twbudao_info: '限定技。准备阶段,你可减1点体力上限,回复1点体力并选择获得一个〖布道〗技能池里的技能(三选一)。然后你可以令一名其他角色也获得此技能并交给你一张牌。', - twzhouhu: '咒护', - twzhouhu_info: '出牌阶段限一次。你可以弃置一张红色手牌并施法:回复X点体力。', - twharvestinori: '丰祈', - twharvestinori_info: '出牌阶段限一次。你可以弃置一张黑色手牌并施法:摸2X张牌。', - twzuhuo: '阻祸', - twzuhuo_info: '出牌阶段限一次。你可以弃置一张非基本牌并施法:防止你受到的下X次伤害。', - twzhouzu: '咒诅', - twzhouzu_info: '出牌阶段限一次。你可以对一名其他角色施法:其弃置X张牌,然后你对其造成1点雷电伤害。', - twhuangjin: '黄巾', - twhuangjin_info: '锁定技。当你一名角色使用【杀】指定你为目标时,若此【杀】有点数,你判定,若点数与此【杀】点数差值不大于1,则此【杀】对你无效。', - twguimen: '鬼门', - twguimen_info: '锁定技。当你弃置牌时,若其中有♠牌,你为每一张♠牌判定,若此牌点数与结果之差不大于1,你对一名其他角色造成2点雷电伤害。', - twdidao: '地道', - twdidao_info: '一名角色的判定牌生效前,你可以打出一张牌作为判定牌并获得原判定牌。若你以此法打出的牌与原判定牌颜色相同,你摸一张牌。', - tw_chengpu: 'TW程普', - tw_chengpu_prefix: 'TW', - twlihuo: '疠火', - twlihuo2: '疠火', - twlihuo3: '疠火', - twlihuo_info: '①当你声明使用普【杀】后,你可以将此【杀】改为火【杀】。此牌使用结算结束后,若有角色因此【杀】造成的伤害进入过濒死状态,则你失去1点体力。②当你使用火【杀】选择目标后,你可为此牌增加一个目标。', - twchunlao: '醇醪', - twchunlao_info: '①准备阶段,若场上没有“醇”,则你可将一名角色区域内的一张牌置于其武将牌上,称为“醇”。②一名角色使用【杀】时,若其有“醇”,则其可以交给你一张牌,令此【杀】的伤害值基数+1。③一名角色进入濒死状态时,若其有“醇”,则你可以移去“醇”并摸一张牌,然后令其回复1点体力。', - tw_guohuai: 'TW郭淮', - tw_guohuai_prefix: 'TW', - twjingce: "精策", - twjingce_info: "当你于出牌阶段使用第X张牌结算完毕后,你可以摸两张牌(X为你的体力值)。若此阶段你此前已摸过牌或本回合造成过伤害,你获得一枚“策”标记。", - yuzhang: "御嶂", - yuzhang_info: "你可以弃置一枚“策”标记,然后跳过一个阶段。当你受到伤害后,你可弃置一枚“策”标记,然后选择一项:⒈令伤害来源弃置两张牌;⒉令伤害来源本回合不能再使用或打出牌。", - tw_caozhao: '曹肇', - twfuzuan: '复纂', - twfuzuan_info: '出牌阶段限一次/当你受到伤害后/当你对其他角色造成伤害后,你可选择一名拥有转换技的角色,变更其的一个转换技的的状态。', - twchongqi: '宠齐', - twchongqi_info: '锁定技。游戏开始时,你令所有角色获得〖非服〗。然后你可减1点体力上限,令一名其他角色获得〖复纂〗。', - twfeifu: '非服', - twfeifu_info: '锁定技,转换技。阴:当你成为【杀】的唯一目标后;阳:当你使用【杀】指定唯一目标后;目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。', - tw_wangchang: 'TW王昶', - tw_wangchang_prefix: 'TW', - twkaiji: '开济', - twkaiji_info: '准备阶段,你可令至多X名角色各摸一张牌(X为本局游戏内进入过濒死状态的角色数+1)。若有角色以此法获得了非基本牌,则你摸一张牌。', - twshepan: '慑叛', - twshepan_info: '每回合限一次。当你成为其他角色使用牌的目标后,你可选择一项:⒈摸一张牌。⒉将其区域内的一张牌置于牌堆顶。然后若你的手牌数与其相等,则你将此技能的发动次数归零,且可以令此牌对你无效。', - tw_wangcan: 'TW王粲', - tw_wangcan_prefix: 'TW', - twdianyi: '典仪', - twdianyi_info: '锁定技。你的回合结束时,若你本回合内:造成过伤害,你弃置所有手牌;未造成过伤害,你将手牌数调整至四张。', - twyingji: '应机', - twyingji_wuxie: '应机', - twyingji_info: '当你于回合外需要使用或打出一张基本牌或普通锦囊牌时,若你没有手牌,则你可摸一张牌,然后视为使用或打出此牌。', - twshanghe: '觞贺', - twshanghe_info: '限定技。当你进入濒死状态时,你可令所有其他角色依次交给你一张牌;若这些牌中没有【酒】,则你将体力回复至1点。', - tw_wujing: 'TW吴景', - tw_wujing_prefix: 'TW', - twfenghan: '锋捍', - twfenghan_info: '每回合限一次。当你使用【杀】或伤害类锦囊牌指定第一个目标后,你可令至多X名角色各摸一张牌(X为此牌的目标数)。', - twcongji: '从击', - twcongji_info: '当你的红色牌于回合外因弃置而进入弃牌堆后,你可令一名其他角色获得这些牌。', - old_quancong: 'TW全琮', - old_quancong_prefix: 'TW', - zhenshan: '振赡', - zhenshan_info: '每回合限一次,当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌,视为使用或打出此牌。', - tw_tianyu: 'TW田豫', - tw_tianyu_prefix: 'TW', - gz_tw_tianyu: '田豫', - twzhenxi: '震袭', - twzhenxi_info: '每回合限一次。当你使用【杀】指定目标后,你可选择一项:⒈弃置其X张手牌(X为你至其的距离);⒉将其装备区或判定区内的一张牌移动到另一名角色的装备区或判定区内。若其体力值大于你或其体力值为全场最高,则你可以改为依次执行以上两项。', - twyangshi: '扬师', - twyangshi_info: '锁定技。当你受到伤害后,若场上有不在你攻击范围内的其他角色,则你令攻击范围+1;若没有,则你从牌堆中获得一张【杀】。', - tw_puyangxing: '濮阳兴', - twzhengjian: '征建', - twzhengjian_info: '游戏开始时,你可选择获得一项效果:⒈其他角色的出牌阶段结束时,若其本阶段内未使用过非基本牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果二。⒉其他角色的出牌阶段结束时,若其本阶段内未得到过牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果一。', - twzhongchi: '众斥', - twzhongchi_info: '锁定技,限定技。当你因〖征建〗而得到牌后,若已经有至少X名角色因〖征建〗而交给你过牌(X为游戏人数的一半且向上取整),则你回复2点体力,且于本局游戏内受到渠道为【杀】的伤害+1,且你将〖征建〗中的“其须交给你一张牌”改为“你可对其造成1点伤害”。', - tw_bingyuan: '邴原', - twbingde: '秉德', - twbingde_info: '出牌阶段限一次。你可以选择一个本阶段未选择过的花色并弃置一张牌,你摸等同于本阶段你使用此花色的牌数,然后若你以此法弃置的牌的花色与你选择的花色相同,你令你〖秉德〗于此阶段发动的次数上限+1。', - twqingtao: '清滔', - twqingtao_info: '①摸牌阶段结束时,你可以重铸一张牌。若此牌为【酒】或非基本牌,你摸一张牌。②结束阶段,若你本回合未发动〖清滔①〗,你可以发动〖清滔①〗。', - tw_jiangji: 'TW蒋济', - tw_jiangji_prefix: 'TW', - twjichou: '急筹', - twjichou_info: '①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。', - twjilun: '机论', - twjilun_info: '当你受到伤害后,你可以摸X张牌(X为〖急筹①〗记录数且至少为1,至多为5),或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。', - tw_niufudongxie: '牛辅董翓', - baonvezhi_faq: '关于暴虐值', - baonvezhi_faq_info: '
  • 当你造成或受到伤害后,你获得等量的暴虐值;
  • 暴虐值的上限为5。', - twjuntun: '军屯', - twjuntun_info: '①游戏开始时或当其他角色死亡后,你可令一名角色获得〖凶军〗。②当其他角色造成伤害后,若其拥有〖凶军〗,你获得等同于此次伤害值的暴虐值。', - twxiongxi: '凶袭', - twxiongxi_info: '出牌阶段限一次。你可以弃置X张牌对一名其他角色造成1点伤害(X为你的暴虐值与暴虐值上限之差)。', - twxiafeng: '黠凤', - twxiafeng_info: '出牌阶段开始时,你可消耗至多3点暴虐值并获得如下效果直到回合结束:你使用的前X张牌没有距离和次数限制且不可被响应,你的手牌上限+X(X为你以此法消耗的暴虐值)。', - tw_bn_1: '一点', - tw_bn_2: '两点', - tw_bn_3: '三点', - tw_bn_1_bg: '一', - tw_bn_2_bg: '二', - tw_bn_3_bg: '三', - twxiongjun: '凶军', - twxiongjun_info: '锁定技,每回合限一次。当你造成伤害后,所有拥有〖凶军〗的角色摸一张牌。', - tw_jianshuo: '蹇硕', - twkunsi: '困兕', - twkunsi_info: '出牌阶段,你可以视为对一名未以此法选择过的其他角色使用一张【杀】。若此【杀】未造成伤害,其获得〖令戮〗直到你下回合开始,且当你成为其〖令戮〗的目标后,其可令你于〖令戮〗失败时进行两次结算。', - twlinglu: '令戮', - twlinglu_info: '强令:①任务:执行角色于其下回合结束前造成的伤害不小于2点。②成功:其摸两张牌。③失败:其失去1点体力。', - tw_mateng: 'TW马腾', - tw_mateng_prefix: 'TW', - twxiongzheng: '雄争', - twxiongzheng_info: '一轮游戏开始时,①若你上一轮发动过〖雄争〗且选择过“雄争”角色,你可以选择一项:1.视为对任意名上一轮内未对“雄争”角色造成过伤害的角色依次使用一张【杀】;2.令任意名上一轮对“雄争”角色造成过伤害的角色摸两张牌。②你可以选择一名未以此法选择过的角色,称为“雄争”角色。', - twluannian: '乱年', - twluannian_info: '主公技。其他群势力角色的出牌阶段限一次。其可以弃置X张牌并对“雄争”角色造成1点伤害(X为所有角色于本轮发动〖乱年〗的次数+1)。', - tw_baoxin: 'TW鲍信', - tw_baoxin_prefix: 'TW', - twmutao: '募讨', - twmutao_info: '出牌阶段限一次。你可以选择一名角色,令其将手牌中所有的【杀】依次交给其下家开始的每一名角色。然后其对最后一名以此法获得【杀】的角色A造成X点伤害(X为A手牌中【杀】的数量且至多为2)。', - twyimou: '毅谋', - twyimou_info: '当一名角色受到伤害后,若其存活且你至其的距离不大于1,你可以选择一项:1.令其从牌堆中获得一张【杀】;2.令其将一张手牌交给另一名角色并摸两张牌;3.背水:将所有手牌交给其(若受伤角色为你则跳过此步骤),然后依次执行上述所有选项。', - tw_liufuren: '刘夫人', - twzhuidu: '追妒', - twzhuidu_info: '出牌阶段限一次。你可以选择一名已受伤的其他角色并选择一项:1.对其造成1点伤害;2.弃置其装备区里的一张牌;3.背水:若该角色为女性,弃置一张牌,然后依次执行上述所有选项。', - twshigong: '示恭', - twshigong_info: '限定技。当你于回合外进入濒死状态时,你可以令当前回合角色选择一项:1.加1点体力上限并回复1点体力,摸一张牌,然后令你将体力回复至体力上限;2.弃置X张手牌,然后令你将体力回复至1点(X为其体力值)。', - tw_wangling: 'TW王淩', - tw_wangling_prefix: 'TW', - twmibei: '秘备', - twmibei_info: '使命技。①使命:使用每种类型且牌名不同的牌各两张。②成功:当你使用牌后,若你于本次事件完成了〖秘备①〗的使命,你获得〖谋立〗。③失败:出牌阶段结束时,若你本回合未使用过牌,你本回合手牌上限-1并重置〖秘备〗。', - twxingqi: '星启', - twxingqi_info: '觉醒技。准备阶段,若场上的牌数大于你的体力值,你回复1点体力,然后若〖秘备〗:未完成,你从牌堆中获得每种类型的牌各一张;已完成,本局游戏你使用牌无距离限制。', - twmouli: '谋立', - twmouli_backup: '谋立', - twmouli_info: '每回合限一次。你可以使用牌堆中的一张基本牌。', - tw_zhugeguo: 'TW诸葛果', - tw_zhugeguo_prefix: 'TW', - twqirang: '祈禳', - twqirang_info: '当有装备牌进入你的装备区时,你可以从牌堆中获得一张锦囊牌,你本阶段使用此牌无距离限制且不可被响应,且当你使用此牌时,你可以为这张牌增加或减少一个目标。', - twyuhua: '羽化', - twyuhua_info: '锁定技。①你的非基本牌不计入手牌上限。②当你于回合外失去牌后,若其中有非基本牌,你可以卜算X,然后你可以摸X张牌(X为其中非基本牌数且至多为5)。', - tw_fanchou: 'TW樊稠', - tw_fanchou_prefix: 'TW', - twxingluan: '兴乱', - twxingluan_info: '结束阶段,你可以亮出牌堆顶的六张牌,然后你可以选择一种类型的牌并分配给任意角色(每名角色至多三张)。然后所有以此法得到过牌且得到的牌数不少于你的角色失去1点体力。', - tw_xujing: 'TW许靖', - tw_xujing_prefix: 'TW', - twboming: '博名', - twboming_info: '①出牌阶段限两次。你可以将一张牌交给一名其他角色。②结束阶段,若所有其他角色于此回合得到的牌数之和大于1,你摸两张牌。', - twejian: '恶荐', - twejian_info: '当其他角色得到你的牌后,若其有其他与此牌类型相同的牌,你可以令其选择一项:1.受到你造成的1点伤害;2.弃置这些牌。', - tw_zhangfei: 'TW张飞', - tw_zhangfei_prefix: 'TW', - twxuhe: '虚吓', - twxuhe_info: '当你使用的【杀】被【闪】抵消时,你可以令其选择一项:1.受到你造成的1点伤害;2.本回合你使用的下一张牌对其造成伤害时,此伤害+2。', - tw_xuezong: 'TW薛综', - tw_xuezong_prefix: 'TW', - twjiexun: '诫训', - twjiexun_info: '结束阶段,你可以选择一个花色并令一名其他角色摸等同于场上此花色牌数张牌,然后其弃置X张牌。若其以此法弃置了所有牌,你选择一项:1.摸X张牌,然后将X归零;2.修改〖复难〗和〖诫训〗(X为此前〖诫训〗的发动次数)。', - twfunanx: '复难·改', - twjiexunx: '诫训·改', - twfunanx_info: '当其他角色使用或打出牌响应你使用的牌时,你可获得其使用或打出的牌。', - twjiexunx_info: '结束阶段,你可选择一个花色并令一名其他角色摸等同于场上此花色牌数张牌,然后其弃置X张牌(X为此前〖诫训〗的发动次数)。', - tw_zhangning: 'TW张宁', - tw_zhangning_prefix: 'TW', - twxingzhui: '星坠', - twxingzhui_info: '出牌阶段限一次。你可以失去1点体力并施法:亮出牌堆顶2X张牌,若其中有黑色牌,则你可令一名其他角色获得这些黑色牌。若黑色牌的数量不小于X,则你对其造成X点雷电伤害。', - twjuchen: '聚尘', - twjuchen_info: '结束阶段,若你的手牌数和体力值均不为全场最多,则你可以令所有角色弃置一张牌,然后你获得其中的红色牌。', - tw_yufuluo: '于夫罗', - twjiekuang: '竭匡', - twjiekuang_info: '每回合限一次。当一名体力值小于你的角色成为其他角色使用基本牌或普通锦囊牌的唯一目标后,若没有角色处于濒死状态,你可以失去1点体力或减1点体力上限,将此牌的目标转移给你。然后此牌结算结束后,若此牌未造成伤害且此牌的使用者是你使用此牌名的牌的合法目标,你视为对此牌的使用者使用一张同名牌。', - twneirao: '内扰', - twneirao_info: '觉醒技。准备阶段,若你的体力值与体力上限之和不大于9,你失去〖竭匡〗,弃置所有牌并从牌堆或弃牌堆中获得等量的【杀】,然后获得〖乱掠〗。', - twluanlve: '乱掠', - twluanlve_info: '①出牌阶段,你可以将X张【杀】当做【顺手牵羊】对一名本阶段未成为过【顺手牵羊】的目标的角色使用(X为你以此法使用【顺手牵羊】的次数)。②当你使用牌时,若此牌为【顺手牵羊】,你令此牌不能被响应。', - tw_fengxí: '冯习', - twqingkou: '轻寇', - twqingkou_info: '准备阶段,你可以视为对一名其他角色使用一张【决斗】。然后此牌的伤害来源摸一张牌,若伤害来源包括你,你跳过本回合的判定阶段和弃牌阶段。', - tw_zhangji: '张既', - twdingzhen: '定镇',//丁真 - twdingzhen_info: '一轮游戏开始时,你可以选择任意名你至其距离不大于X的角色(X为你的体力值),这些角色选择一项:1.弃置一张【杀】;2.本轮其于回合内使用的第一张牌不能指定你为目标。', - twyouye: '攸业', - twyouye_info: '锁定技。①其他角色的结束阶段,若其本回合未对你造成过伤害且“蓄”数小于5,你将牌堆顶的牌置于武将牌上,称为“蓄”。②当你造成或受到伤害后,若你有“蓄”,你将所有“蓄”分配给任意角色(若当前回合角色存活,则你至少为当前回合角色分配一张)。', - tw_xunchen: 'TW荀谌', - tw_xunchen_prefix: 'TW', - twweipo: '危迫', - twweipo_info: '出牌阶段限一次。你可以令一名角色弃置一张牌,然后令其获得一张【兵临城下】或一张由你选择的智囊牌。', - twmouzhi: '谋识', - twmouzhi_info: '锁定技。当你受到伤害时,若伤害渠道对应的牌和你上次受到的伤害渠道对应的牌颜色相同,则你防止此伤害。', - tw_jiangqing: 'TW蒋钦', - tw_jiangqing_prefix: 'TW', - twshangyi: '尚义', - twshangyi_info: '出牌阶段限一次。你可以弃置一张牌并选择一名有手牌的其他角色,你令其观看你的手牌,然后你观看其手牌并选择一项:1.弃置其中一张牌;2.与其交换一张手牌。若你以此法弃置了其的黑色牌,或你与其交换的两张牌均为红色,你摸一张牌。', - twxiangyu: '翔羽', - twxiangyu_info: '锁定技。①你于回合内的攻击范围+X(X为本回合失去过牌的角色数且至多为5)。②当你使用【杀】指定目标后,若你至目标角色的距离小于你的攻击范围,你令此目标角色抵消此【杀】所需使用的【闪】数+1。', - twgyshenxing: '慎行', - twgyshenxing_info: '出牌阶段,你可以弃置X张牌,然后摸一张牌并获得1枚“慎”标记(X为你的“慎”数且至多为2)。', - tw_guyong: 'TW顾雍', - tw_guyong_prefix: 'TW', - twbingyi: '秉壹', - twbingyi_info: '结束阶段,你可以展示所有手牌,若这些牌的颜色均相同或类别均相同,你可以令至多Y名角色各摸一张牌(Y为你的手牌数)。若你以此法展示的牌数大于1且这些牌的颜色均相同且类别均相同,你移去所有“慎”。', - twyilie: '毅烈', - twyilie_info: '出牌阶段开始时,你可以选择一项:1.本阶段内使用【杀】的次数上限+1;2.本回合内使用【杀】指定处于连环状态的目标后,或使用【杀】被【闪】抵消时,摸一张牌;3.背水:失去1点体力,然后依次执行上述所有选项。', - tw_chendong: 'TW陈武董袭', - tw_chendong_prefix: 'TW', - twfenming: '奋命', - twfenming_info: '准备阶段,你可以选择一名其他角色并选择一项:1.令其弃置一张牌;2.令其横置;3.背水:横置,然后依次执行上述所有选项。', - tw_handang: 'TW韩当', - tw_handang_prefix: 'TW', - twgongji: '弓骑', - twgongji2: '弓骑', - twgongji_info: '①你的攻击范围无限。②出牌阶段限一次,你可以弃置一张牌,然后你使用与此牌花色相同的【杀】无任何次数限制直到回合结束。若你以此法弃置的牌为装备牌,则你可以弃置一名其他角色的一张牌。', - twjiefan: '解烦', - twjiefan_info: '限定技。出牌阶段,你可以选择一名角色,令攻击范围内含有其的所有角色依次选择一项:1.弃置一张武器牌;2.令其摸一张牌。然后当其第一次进入濒死状态后,你重置〖解烦〗。', - tw_jiling: 'TW纪灵', - tw_jiling_prefix: 'TW', - twshuangren: '双刃', - twshuangren_info: '①出牌阶段开始时,你可以与一名角色拼点。若你:赢,你可以视为对至多两名至其的距离不大于1的角色依次使用一张【杀】;没赢,其可以视为对你使用一张【杀】。②出牌阶段结束时,若你本回合未发动过〖双刃①〗且未造成过渠道为【杀】的伤害,你可以弃置一张牌发动〖双刃①〗。', - tw_re_fazheng: 'TW法正', - tw_re_fazheng_prefix: 'TW', - twxuanhuo: '眩惑', - twxuanhuo_info: '摸牌阶段结束时,你可以交给一名其他角色两张牌,然后其选择一项:1.视为对你选择的另一名其他角色使用一张【杀】或【决斗】,2.令你获得其两张牌。', - twenyuan: '恩怨', - twenyuan1: '恩怨', - twenyuan2: '恩怨', - twenyuan_info: '①当你获得一名其他角色的至少两张牌后,你可以令其摸一张牌,若其手牌区或装备区没有牌,则你可以改为令其回复1点体力。②当你受到1点伤害后,你可令伤害来源选择一项:1.失去1点体力;2.交给你一张手牌,若此牌的花色不为♥,你摸一张牌。', - tw_madai: 'TW马岱', - tw_madai_prefix: 'TW', - twqianxi: '潜袭', - twqianxi2: '潜袭', - twqianxi3: '潜袭', - twqianxi2_bg: '潜', - twqianxi3_bg: '袭', - twqianxi_info: '准备阶段,你可以摸一张牌并弃置一张牌,令一名距离为1的角色本回合不能使用或打出与你弃置的牌颜色相同的手牌。然后本回合的结束阶段,若你本回合对其造成过渠道为【杀】的伤害,你令其不能使用或打出与你以此法弃置的牌颜色不同的牌直到其下回合结束。', - tw_niujin: 'TW牛金', - tw_niujin_prefix: 'TW', - twcuorui: '挫锐', - twcuorui_info: '限定技。准备阶段,你可以将手牌摸至X张(X为场上角色手牌数最多的角色的手牌数,且至多摸5张)。然后若你的判定区:未废除,你废除判定区;已废除,你可以对一名其他角色造成1点伤害。', - twliewei: '裂围', - twliewei_info: '锁定技。当你杀死一名角色后,你选择一项:1.摸两张牌;2.若你拥有〖挫锐〗且〖挫锐〗已发动过,重置〖挫锐〗。', - tw_guanqiujian: 'TW毌丘俭', - tw_guanqiujian_prefix: 'TW', - twzhengrong: '征荣', - twzhengrong_tag: '荣', - twzhengrong_info: '当你于出牌阶段使用牌结算结束后,若此牌为你于本局游戏你的出牌阶段内使用的第偶数张指定了其他角色为目标的牌,或你于出牌阶段第一次造成伤害后,你可以将一名其他角色的一张牌置于你的武将牌上,称为“荣”。', - twhongju: '鸿举', - twhongju_info: '觉醒技。准备阶段,若你的“荣”数不小于3,你摸等同于“荣”数的牌,且可以用任意手牌交换等量的“荣”,获得〖清侧〗,然后可以减1点体力上限并获得〖扫讨〗。', - twqingce: '清侧', - twqingce_backup: '清侧', - twqingce_info: '出牌阶段,你可以将一张“荣”置入弃牌堆并选择一名区域内有牌的角色,你弃置其区域里的一张牌。', - twsaotao: '扫讨', - twsaotao_info: '锁定技。你使用【杀】和普通锦囊牌不能被响应。', - tw_daxiaoqiao: 'TW大乔小乔', - tw_daxiaoqiao_prefix: 'TW', - twxingwu: '星舞', - twxingwu_info: '弃牌阶段开始时,你可以将一张牌置于武将牌上,称为“星舞”。然后你可移去三张“星舞”,弃置一名其他角色装备区里的所有牌,然后对其造成2点伤害(若其性别包含女性则改为1点伤害)。', - twpingting: '娉婷', - twpingting_info: '锁定技。①一轮游戏开始时或其他角色于你的回合内进入濒死状态时,你摸一张牌并将一张牌置于武将牌上,称为“星舞”。②若你有“星舞”,你视为拥有〖天香〗和〖流离〗。', - tw_furong: 'TW傅肜', - tw_furong_prefix: 'TW', - twxuewei: '血卫', - twxuewei_info: '每轮限一次。一名其他角色A的出牌阶段开始时,你可以选择另一名其他角色B,然后你令A选择一项:1.本回合不能对B使用【杀】且手牌上限-2;2.你视为对A使用一张【决斗】。', - twliechi: '烈斥', - twliechi_info: '当你受到伤害后,若伤害来源的体力值不小于你,你可以选择一项:1.令其将手牌数弃置至与你的手牌数相同;2.弃置其一张牌;3.背水:若你本回合进入过濒死状态,弃置一张装备牌,然后依次执行上述所有选项。', - tw_yl_luzhi: 'TW卢植', - tw_yl_luzhi_prefix: 'TW', - twmingren: '明任', - twmingren_info: '①游戏开始时,你摸一张牌,然后将一张手牌置于武将牌上,称为“任”。②出牌阶段开始时或出牌阶段结束时,你可以用一张牌替换“任”。', - twzhenliang: '贞良', - twzhenliang_info: '转换技。阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。', - tw_zhangnan: '张南', - twfenwu: '奋武', - twfenwu_info: '结束阶段,你可以失去1点体力并视为使用一张无距离限制的【杀】。若本回合你使用过的基本牌种数大于1,此【杀】伤害基数+1。', - tw_huchuquan: '呼厨泉', - twfupan: '复叛', - twfupan_info: '当你造成或受到伤害后,你可以摸X张牌并将一张牌交给一名其他角色(X为伤害值)。若你此前:未以此法交给过该角色牌,你摸两张牌;以此法交给过该角色牌,你可{对其造成1点伤害,然后你不能再以此法交给其牌}。', - tw_liuzhang: 'TW刘璋', - tw_liuzhang_prefix: 'TW', - twyaohu: '邀虎', - twyaohu_info: '每轮限一次。回合开始时,你须选择场上的一个势力。该势力的角色的出牌阶段开始时,其获得你的一张“生”,然后其须选择一项:1.对你指定的另一名的其他角色使用一张【杀】(无距离限制);2.本回合其使用伤害牌指定你为目标时须交给你两张牌,否则取消此目标。', - tw_liwei: 'TW李遗', - tw_liwei_prefix: 'TW', - twjiaohua: '教化', - twjiaohua_info: '当你或体力值最小的其他角色因摸牌而得到牌后,你可以令该角色从牌堆或弃牌堆中获得一张本次未获得的类别的牌(每种类别每回合限一次)。', - tw_yanxiang: 'TW阎象', - tw_yanxiang_prefix: 'TW', - twkujian: '苦谏', - twkujianx: '谏', - twkujian_info: '出牌阶段限一次。你可以将至多三张手牌交给一名其他角色,称为“谏”,你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸一张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。', - twruilian: '睿敛', - twruilian2: '睿敛', - twruilian_info: '一轮游戏开始时,你可以选择一名角色。其下回合结束时,若其本回弃置过至少两张其的牌,你可以选择其本回合弃置过的一种类别,你与其各从弃牌堆中获得一张此类别的牌。', - tw_xiahouen: '夏侯恩', - twfujian: '负剑', - twfujian_info: '锁定技。①游戏开始时或准备阶段,若你的装备区里没有武器牌,你随机将牌堆中的一张武器牌置入装备区。②当你于回合外失去武器牌后,你失去1点体力。', - twjianwei: '剑威', - twjianwei_info: '①若你的装备区里有武器牌,你使用【杀】无视防具且拼点牌点数+X(X为你的攻击范围)。②{其他角色的准备阶段,其可以与你拼点}/{准备阶段,你可以与攻击范围内的一名角色拼点}。若你赢,你获得其每个区域内的各一张牌;若其赢,其获得你装备区里的武器牌。', - tw_xiahoushang: '夏侯尚', - twtanfeng: '探锋', - twtanfeng_info: '准备阶段,你可以弃置一名其他角色区域内的一张牌,然后其选择一项:1.受到你造成的1点火焰伤害,然后令你跳过本回合的一个阶段(准备阶段和结束阶段除外);2.将一张牌当做【杀】对你使用(有距离限制)。', - tw_zongyu: 'TW宗预', - tw_zongyu_prefix: 'TW', - twzhibian: '直辩', - twzhibian_info: '出牌阶段开始时,你可以与一名其他角色拼点。若你赢,你可以选择一项:{1.将其区域里的一张牌移动到你的对应区域;2.回复1点体力;3.背水:弃置一张非基本牌,然后依次执行上述所有选项};若你没赢,你失去1点体力。', - twyuyan: '御严', - twyuyan_info: '锁定技。当你成为体力值大于你的角色使用的【杀】的目标时,你令使用者选择一项:1.交给你一张点数大于此【杀】的牌(若此【杀】无点数则改为非基本牌)。2.取消此目标。', - tw_zhouchu: 'TW周处', - tw_zhouchu_prefix: 'TW', - twguoyi: '果毅', - twguoyi_info: '当你不因〖果毅〗使用【杀】或普通锦囊牌指定一名其他角色为目标后,若其体力值或手牌数最大,或你的手牌数不大于X(X为你已损失的体力值+1),你可令其选择一项:1.本回合不能使用或打出手牌;2.弃置X张牌。若条件均满足,或其于本回合两个选项均已选择过,则你于此牌结算结束后依次视为对此牌的所有目标使用一张名称和属性相同的牌。', - twchuhai: '除害', - twchuhai_info: '使命技。①使命:令至少两名其他角色进入濒死状态。②成功:一名角色的回合结束时,若你于本回合完成了〖除害①〗的使命,你废除判定区,然后每名其他角色依次交给你一张牌。③当你获得其他角色的牌后,你须将其中的一张牌置入弃牌堆。', - tw_qiaogong: 'TW桥公', - tw_qiaogong_prefix: 'TW', - twyizhu: '遗珠', - twyizhu_info: '①结束阶段,你摸两张牌,然后将两张牌随机插入牌堆前2X张牌的位置中,称为“遗珠”(X为角色数,选择牌的牌名对其他角色可见)。②当有其他角色使用“遗珠”指定唯一目标时,你可以选择一项:1.增加一个目标;2.取消此目标,增加一个目标。然后移除此牌对应的“遗珠”记录并摸一张牌。', - twluanchou: '鸾俦', - twluanchou_info: '出牌阶段限一次。你可以令两名角色获得〖共患〗直到你下次发动此技能。', - twgonghuan: '共患', - twgonghuan_info: '每回合限一次。当其他角色受到伤害时,若其拥有〖共患〗且其体力值不大于你,你可以将此伤害转移给你(不触发〖共患〗)。', - tw_qiaorui: 'TW桥蕤', - tw_qiaorui_prefix: 'TW', - wangxing: '妄行', - twxiawei: '狭威', - twxiawei_info: '①游戏开始时,你将牌堆中的两张基本牌置于武将牌上,称为“威”。②回合开始时,你将所有“威”置入弃牌堆。③你可以将“威”如手牌般使用或打出。④妄行:准备阶段,你可以将牌堆顶的X+1张牌置于武将牌上,称为“威”。', - twqiongji: '穷技', - twqiongji_info: '锁定技。①每回合限一次。当你使用或打出“威”后,你摸一张牌。②当你受到伤害时,若你没有“威”,此伤害+1。', - tw_bianfuren: 'TW卞夫人', - tw_bianfuren_prefix: 'TW', - twwanwei: '挽危', - twwanwei_info: '每回合限一次。当一名体力值最小的角色受到伤害时:若该角色不为你,你可以防止此伤害,然后失去1点体力;若该角色为你,或你的体力上限最大,你可以于当前回合的结束阶段获得牌堆顶的牌并展示牌堆底的牌,若展示的牌能被使用,你使用之。', - twyuejian: '约俭', - twyuejian_info: '出牌阶段限一次。你可以将X张牌置于牌堆顶或牌堆底(X为你的手牌数减你的手牌上限且至少为1)。若你以此法失去的牌数:不小于3,你的体力上限+1;不小于2,你回复1点体力;不小于1,你的手牌上限+1。', - tw_chenzhen: 'TW陈震', - tw_chenzhen_prefix: 'TW', - twmuyue: '睦约', - twmuyue_info: '出牌阶段限一次。你可以弃置一张牌并选择一个基本牌或普通锦囊牌的牌名,然后令一名角色从牌堆中获得一张此牌名的牌。若你以此法弃置的牌的牌名与你选择的牌名相同,你下次发动〖睦约〗无需弃牌。', - twchayi: '察异', - twchayi_info: '结束阶段,你可以选择一名其他角色,令其选择一项:1.展示所有手牌;2.下次使用牌时弃置一张牌。该角色的下个回合结束时,若其手牌数与其上一次成为〖察异〗目标后的手牌数不相同,其执行另一项。', - tw_feiyi: 'TW费祎', - tw_feiyi_prefix: 'TW', - twshengxi: '生息', - twshengxi_info: '①准备阶段,你可以获得一张【调剂盐梅】。②结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊并摸一张牌。', - twkuanji: '宽济', - twkuanji_info: '每回合限一次。当你的牌不因使用而进入弃牌堆后,你可以令一名其他角色获得其中的一张牌。', - xia_wangyue: '王越', - twyulong: '驭龙', - twyulong_info: '当你使用【杀】指定第一个目标后,你可以与一名目标角色拼点。若你赢,且你此次的拼点牌为:黑色,此【杀】伤害+1;红色,此【杀】不可被响应。当此【杀】造成伤害后,若你赢,你令此【杀】不计入次数。', - twjianming: '剑鸣', - twjianming_info: '锁定技。每回合每种花色限一次,当你使用或打出【杀】时,你摸一张牌。', - xia_liyàn: '李彦', - twzhenhu: '震虎', - twzhenhu_info: '当你使用伤害牌指定第一个目标时,你可以摸一张牌并与至多三名其他角色共同拼点。若你赢,此牌对所有本次拼点没赢的角色造成的伤害+1;若你没赢,你失去1点体力。', - twlvren: '履刃', - twlvren_info: '①当你对其他角色造成伤害时,你令其获得1枚“刃”标记。②当你使用伤害牌时,你可以额外指定一名有“刃”的角色并移去其所有“刃”。③你的拼点牌点数+2X(X为参与此次拼点的角色数)。', - xia_tongyuan: '侠童渊', - xia_tongyuan_prefix: '侠', - twchaofeng: '朝凤', - twchaofeng_backup: '朝凤', - twchaofeng_info: '①你可以将一张【杀】当做【闪】、【闪】当做任意一种【杀】使用或打出。②出牌阶段开始时,你可以与至多三名角色共同拼点。赢的角色视为对所有没赢的角色使用一张火【杀】。', - twchuanshu: '传术', - twchuanshu_info: '限定技。准备阶段,你可以选择一名角色。直到你的下回合开始,其获得以下效果:1.当其拼点牌亮出时,此牌点数+3;2.其使用的下一张【杀】对除你外的角色造成伤害时,此伤害+1;3.若其不为你,其使用的下一张【杀】结算结束后,你摸等同于其因此【杀】造成的伤害值数的牌。', - xia_xushu: '侠徐庶', - xia_xushu_prefix: '侠', - twjiange: '剑歌', - twjiange_info: '每回合限一次。你可以将一张非基本牌当做【杀】使用或打出(无距离和次数限制,且不计入次数)。若此时不为你的回合,你摸一张牌。', - twxiawang: '侠望', - twxiawang_info: '当一名角色受到伤害后,若你至其的距离不大于1,你可以对伤害来源使用一张【杀】。当此【杀】结算结束后,若你造成过渠道为此牌的伤害,结束当前阶段。', - tw_haomeng: 'TW郝萌', - tw_haomeng_prefix: 'TW', - twgongge: '攻阁', - twgongge_info: '摧坚:你可以选择一项:1.摸X+1张牌。其响应此牌后,跳过你的下一个摸牌阶段;2.弃置其X+1张牌。此牌结算结束后,若其体力值不小于你,你交给其X张牌;3.此牌对其造成的伤害+X。此牌结算结束后,其回复X点体力。', - tw_weixu: '魏续', - twsuizheng: '随征', - twsuizheng_info: '锁定技。游戏开始时,你选择一名其他角色,称为“随征”角色。你获得以下效果:当“随征”角色造成伤害后,你摸一张牌;当“随征”角色受到伤害后,你选择一项:1.失去1点体力,令其从牌堆或弃牌堆中获得一张【杀】或【决斗】;2.弃置两张基本牌,令其回复1点体力。', - twtuidao: '颓盗', - twtuidao_info: '限定技。准备阶段,若“随征”角色的体力值不大于2或“随征”角色已死亡,你可以废除你与其的一个坐骑栏并选择一个类别,然后若“随征”角色存活,你获得其所有此类别的牌,否则你从牌堆中获得两张此类别的牌。然后你将“随征”角色改为另一名角色。', - tw_caoxiu: 'TW曹休', - tw_caoxiu_prefix: 'TW', - twqianju: '千驹', - twqianju_info: '锁定技。①你计算与其他角色的距离-X(X为你装备区的牌数)。②每回合限一次。当你对距离为1以内的角色造成伤害后,若你的装备区存在空置装备栏,你从牌堆或弃牌堆中将一张你空置装备栏对应副类别的装备牌置于你的装备区。', - twqingxi: '倾袭', - twqingxi_info: '当你使用张【杀】指定目标后,若此牌为你于本回合使用的第一张【杀】,你可以令目标角色选择一项:1.令你摸Y张牌,此【杀】不可被其响应(Y为你装备区的牌数且至少为1);2.若其装备区里有牌,弃置装备区里的所有牌,然后弃置你装备区里的等量张牌,令此【杀】对其造成的伤害+1。', - tw_sunyi: 'TW孙翊', - tw_sunyi_prefix: 'TW', - twzaoli: '躁厉', - twzaoli_info: '锁定技。①出牌阶段,你只能使用或打出你本回合得到的手牌。②出牌阶段开始时,你须弃置你区域内的所有装备牌并弃置任意张非装备手牌,你摸等量的牌,从牌堆中将你此次弃置的装备牌对应副类别的装备牌置入装备区。若你以此法置入了超过两张装备牌,你失去1点体力。', - tw_yangyi: 'TW杨仪', - tw_yangyi_prefix: 'TW', - twgongsun: '共损', - twgongsun_shadow: '共损', - twgongsun_info: '锁定技。出牌阶段开始时,你选择攻击范围内的一名其他角色并选择一种花色,直至你的下个回合开始前或你死亡时,你与其均无法使用、打出或弃置该花色的手牌。', - tw_dengzhi: 'TW邓芝', - tw_dengzhi_prefix: 'TW', - twjimeng: '急盟', - twjimeng_info: '出牌阶段限一次。你可以获得一名其他角色区域内的一张牌,然后交给其一张牌。若其体力值不小于你,你摸一张牌。', - xia_lusu: '侠鲁肃', - xia_lusu_prefix: '侠', - twkaizeng: '慨赠', - twkaizeng_info: '其他角色的出牌阶段限一次。其可以选择一种基本牌的牌名或非基本牌的类型,然后令你选择是否交给其任意张手牌。若你以此法:交给其至少两张牌,你摸一张牌;交给其的牌中包含其选择的牌名或类型的牌,你获得一张与此牌名或类型不同的牌。', - twyangming: '扬名', - twyangming_info: '出牌阶段结束时,你可以摸X张牌,且令本回合的手牌上限+X(X为你本阶段使用过的牌的类型数)。', - xia_dianwei: '侠典韦', - xia_dianwei_prefix: '侠', - twliexi: '烈袭', - twliexi_info: '准备阶段,你可以弃置任意张牌并选择一名其他角色。若你以此法弃置的牌数大于其体力值,你对其造成1点伤害;否则其对你造成1点伤害。然后若你弃置的牌中有武器牌,你对其造成1点伤害。', - twshezhong: '慑众', - twshezhong_info: '结束阶段,若你:本回合对其他角色造成过伤害,你可以令至多X名其他角色下个摸牌阶段的额定摸牌数-1(X为你本回合造成的伤害值);本回合受到过伤害,你可以将手牌摸至与其中一名伤害来源的体力值相同(至多摸至5)。', - xia_zhaoe: '赵娥', - twyanshi: '言誓', - twyanshi_info: '①游戏开始时,你选择一名其他角色,称为“言誓”角色。②当你或“言誓”角色受到二者之外角色造成的伤害后,伤害来源获得1枚“誓”标记。③你对有“誓”的角色使用牌无距离限制。④当你对有“誓”的角色造成伤害时,此伤害+1,且当你对这些角色造成伤害后,你摸等同于伤害值的牌并移去其所有“誓”。', - twrenchou: '刃仇', - twrenchou_info: '锁定技。当你或“言誓”角色死亡时,若二者中的另一名角色A存活,A对杀死你或其的角色造成X点伤害(X为A的体力值)。', - xia_xiahouzie: '夏侯紫萼', - twxuechang: '血偿', - twxuechang_info: '出牌阶段限一次。你可以与一名其他角色拼点。若你:赢,你获得其一张牌,若此牌为装备牌,你视为对其使用一张【杀】;没赢,其对你造成1点伤害,且你下次对其造成的伤害+1。', - twduoren: '夺刃', - twduoren_info: '①当你杀死角色后,你可以减1点体力上限,然后获得其所有的非主公技和非隐匿技。②当你令其他角色进入濒死状态时,你失去因〖夺刃①〗获得的技能。', - tw_yangang: '严纲', - twzhiqu: '直取', - twzhiqu_info: '结束阶段,你可以选择一名其他角色并依次使用牌堆顶X张牌中的【杀】。搏击:依次使用牌堆顶X张牌中的锦囊牌(X为你距离不大于1内的角色数,且你或其以外的角色不是你以此法使用牌的合法目标)。', - twxianfeng: '先锋', - twxianfeng_info: '当你于出牌阶段使用【杀】或伤害类锦囊牌对其他角色造成伤害后,你可以令受伤角色选择一项:1.其摸一张牌,然后直到你下个回合开始时,你至其他角色的距离-1;2.你摸一张牌,然后直到你下个回合开始时,其至你的距离-1。', - tw_gongsunfan: '公孙范', - twhuiyuan: '回援', - twhuiyuan_info: '当你于出牌阶段使用牌结算结束后,若你未于此阶段获得过此类型的牌,你可以展示一名角色的一张手牌,若此牌与你使用的牌类型相同,你获得此牌,否则你弃置此牌,然后其摸一张牌。游击:对其造成1点伤害。', - twshoushou: '收绶', - twshoushou_info: '①当你获得其他角色的牌时,若你在任意角色的攻击范围内,其他角色至你的距离+1。②当你造成或受到伤害后,若你不在任意其他角色的攻击范围内,其他角色至你的距离-1。', - twshijun: '师君', - twshijun_info: '主公技,其他群势力角色出牌阶段限一次,若你没有“米”,其可以摸一张牌,然后将一张牌置于你的武将牌上,称为“米”。', - twjuxiang: '踞襄', - twjuxiang_info: '主公技,其他群势力角色出牌阶段限一次,其可以选择其装备区的一张牌移动到你的装备区中,若你对应的装备栏已被废除,则改为交给你此装备牌,然后恢复你的对应装备栏。', - tw_ol_sunjian: 'TW孙坚', - tw_ol_sunjian_prefix: 'TW', - twpolu: '破虏', - twpolu_info: '主公技,当吴势力角色杀死一名角色或死亡后,你可以令任意名角色各摸X张牌(X为你此前发动过此技能的次数+1)。', - tw_menghuo: 'TW孟获', - tw_menghuo_prefix: 'TW', - twqiushou: '酋首', - twqiushou_info: '主公技,锁定技,当一张【南蛮入侵】结算结束后,若此牌造成的伤害大于3点或有角色因此死亡,所有蜀势力和群势力角色各摸一张牌。', - twzhuiting: '坠廷', - twzhuiting_info: '主公技,当一张锦囊牌即将对你生效时,其他魏势力角色和群势力角色可将一张与此牌颜色相同的牌当作【无懈可击】使用。', - twniju: '逆拒', - twniju_info: '主公技。当你的拼点牌亮出后,你可以令本次拼点事件中的一张拼点牌的点数+X或-X。然后当本次拼点事件结束后,若有两张拼点牌的点数相等,你摸X张牌(X为场上群势力角色数)。', - ol_liuyu: 'TW刘虞', - ol_liuyu_prefix: 'TW', - twchongwang: '崇望', - twchongwang_info: '主公技,其他群势力角色的出牌阶段开始时,其可以交给你一张牌,然后你与其使用【杀】或伤害性锦囊牌指定目标时不能指定对方为目标直至你的下回合结束(每名角色限发动一次)。', - tw_zhangzhao: '张昭', - twlijian: '力荐', - twlijian_info: '昂扬技。其他角色的弃牌阶段结束时,你可以令其获得任意本阶段进入弃牌堆的牌(可不选),然后你获得其余的牌,若其得到的牌数大于你,你可以对其造成1点伤害。
    激昂:八张牌进入弃牌堆。', - twchungang: '纯刚', - twchungang_info: '锁定技。一名其他角色于摸牌阶段外得到超过一张牌时,你令其弃置一张牌。', - tw_zhanghong: '张纮', - twquanqian: '劝迁', - twquanqian_info: '昂扬技。出牌阶段限一次,你可以将至多四张花色各不相同的手牌交给一名其他角色,然后若你交出的牌数大于1,则你从牌堆中获得一张装备牌,然后选择一项:①将手牌数摸至与其相同;②观看其手牌并获得其一种花色的所有牌。
    激昂:你弃置六张手牌。', - twrouke: '柔克', - twrouke_info: '锁定技。当你于摸牌阶段外得到超过一张牌时,你摸一张牌。', - kaisa: "凯撒", - zhengfu: "征服", - zhengfu_info: "当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。", - xia_xiahoudun: '侠夏侯惇', - xia_xiahoudun_prefix: '侠', - twdanlie: '胆烈', - twdanlie_info: '①出牌阶段限一次。你可以与至多三名其他角色共同拼点。若你赢,你对没赢的角色依次造成1点伤害;若你没赢,你失去1点体力。②你的拼点牌点数+X(X为你已损失的体力值)。', - xia_zhangwei: '张葳', - twhuzhong: '护众', - twhuzhong_info: '当你于出牌阶段使用无属性【杀】指定唯一目标角色时,你可以摸一张牌并选择一项:①为此牌额外选择一个目标;②弃置其一张手牌,此牌结算完毕后,若此牌造成过伤害,则你摸一张牌且本阶段可以额外使用一张【杀】。', - twfenwang: '焚亡', - twfenwang_info: '锁定技。①当你受到属性伤害时,你须弃置一张牌或令此伤害+1。②当你对其他角色造成非属性伤害时,若你的手牌数大于等于其,则此伤害+1。', - xia_xiahousone: '夏侯子萼', - twchengxi: '承袭', - twchengxi_info: '出牌阶段每名角色限一次,你可以摸一张牌并与一名其他角色拼点。若你赢,你使用的下一张基本牌或非延时锦囊牌结算完毕后,你视为对原目标使用一张无次数限制的同名牌;若你没赢,其视为对你使用一张无距离限制的【杀】。', - xia_liubei: '侠刘备', - xia_liubei_prefix: '侠', - twshenyi: '伸义', - twshenyi_info: '每回合限一次,当你或你攻击范围内的一名角色于一回合内首次受到伤害后,你可以声明一种基本牌或锦囊牌(每种牌名限一次),然后从牌堆中将一张同名牌(若没有同名牌则改为同类型的牌)称为“侠义”置于武将牌上。若受伤角色不为你,则你可以将任意张手牌交给其,且当其失去一张你以此法交给其的牌后,你摸一张牌。', - twxinghan: '兴汉', - twxinghan_info: '①你的回合外或你处于濒死状态时,你可以如手牌般使用或打出“侠义”牌。②准备阶段,若“侠义”牌数大于存活角色数,则你可以依次使用其中所有可以使用的牌。然后你获得如下效果:回合结束时,你弃置所有手牌并失去X点体力(X为你的体力值-1且X至少为1)。', - twxinghan_tag: '侠义', - xia_guanyu: '侠关羽', - xia_guanyu_prefix: '侠', - twzhongyi: '忠义', - twzhongyi_info: '锁定技。①你使用【杀】无距离限制。②当你使用【杀】结算完毕后,你选择一项:⒈摸X张牌;⒉回复X点体力;⒊背水:失去Y点体力,依次执行以上两项(X为此牌造成的伤害值,Y为你本局游戏此前选择此项的次数+1)。', - twchue: '除恶', - twchue_info: '①当你使用【杀】指定唯一目标时,你可以失去1点体力,为此牌额外指定Z个目标。②当你受到伤害或失去体力后,你摸一张牌并获得1个“勇”标记。③回合结束时,若你本回合发动过〖除恶②〗,则你可以失去Z个“勇”标记,视为使用一张伤害+1且可以额外指定Z个目标的【杀】。(Z为你的体力值)', - xia_shitao: '石韬', - twjieqiu: '劫囚', - twjieqiu_info: '出牌阶段限一次,你可以选择一名装备区没有废除栏的其他角色,废除其所有装备栏,然后其摸X张牌(X为其废除装备栏前的装备区牌数),直到其恢复所有装备栏前:其弃牌阶段结束时,其恢复等同于其弃置牌数的装备栏;其回合结束时,若其仍有已废除的装备栏,则你执行一个额外回合(每轮限一次)。', - twenchou: '恩仇', - twenchou_info: '出牌阶段限一次,你可以观看一名存在废除装备栏的其他角色的手牌并获得其中一张牌,然后你恢复其一个装备栏。', - xia_shie: '史阿', - twdengjian: '登剑', - twdengjianx: '剑法', - twdengjian_info: '①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。②你使用“剑法”牌不计入次数限制。', - twxinshou: '心授', - twxinshou_info: '①当你于出牌阶段使用【杀】时,若此【杀】与你本回合使用的所有其他【杀】的颜色均不相同,则你可以选择执行以下一项本回合未执行过的项:⒈摸一张牌;⒉交给一名其他角色一张牌。②当你使用【杀】时,若〖心授①〗的两项本回合均已被你选择过,则你可以令〖登剑①〗失效并令一名其他角色获得〖登剑〗,你的下个回合开始时,其失去〖登剑〗,若其这期间使用【杀】造成过伤害,则你结束〖登剑①〗的失效状态。', - xia_yuzhenzi: '玉真子', - twhuajing: '化境', - twhuajing_info: '①游戏开始时,你获得6个效果各不相同的无效果“武”标记。②一名拥有“武”标记的角色的攻击范围+X(X为其拥有的“武”标记数)。③出牌阶段限一次,你可以展示至多四张手牌,然后根据这些牌含有的花色数于本回合获得等量你拥有的“武”标记的效果。④拥有“武”标记效果的角色的武器牌失效(武器牌不提供攻击范围且武器技能失效)。', - twhuajing_jian: '剑', - twhuajing_jian_info: '当你使用【杀】指定目标后,你随机弃置目标角色两张牌。', - twhuajing_dao: '刀', - twhuajing_dao_info: '当你使用【杀】对没有手牌的目标角色造成伤害时,此伤害+1。', - twhuajing_fu: '斧', - twhuajing_fu_info: '当你使用的【杀】被【闪】响应后,你对目标角色造成1点伤害。', - twhuajing_qiang: '枪', - twhuajing_qiang_info: '当你使用黑色【杀】结算完毕后,你从牌堆或弃牌堆中获得一张【闪】。', - twhuajing_ji: '戟', - twhuajing_ji_info: '当你使用【杀】造成伤害时,你摸一张牌。', - twhuajing_gong: '弓', - twhuajing_gong_info: '当你使用【杀】造成伤害后,你随机弃置受伤角色装备区里的一张牌。', - twtianshou: '天授', - twtianshou_info: '锁定技,回合结束时,若你本回合使用【杀】造成过伤害,且你拥有本回合获得过效果的“武”标记,则你须将其中一个“武”标记交给一名其他角色并令其获得此标记的效果直到其回合结束,然后你摸一张牌。', + twyanqin:'姻亲', + twyanqin_info:'准备阶段,你可以将势力变更为魏或蜀。', + twbaobian:'豹变', + twbaobian_info:'当你使用【杀】或【决斗】造成伤害时,若目标角色的势力与你相同,则你可以防止此伤害,然后其将手牌数补充至与体力值相同。若不同且其手牌数大于体力值,则你可以将其手牌弃置至与其体力值相同。', + twtijin:'替巾', + twtijin_info:'当你攻击范围内的一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,此【杀】结算完成后,你弃置该角色的一张牌。', + twxiaolian:'孝廉', + twxiaolian_info:'当一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,当你受到此【杀】的伤害后,你可以将一张牌置于此【杀】原目标的武将牌旁,称为“马”,且令其获得如下效果:其他角色计算至其的距离+X(X为其武将牌旁的“马”数)。', + twqijia:'弃甲', + twqijia_info:'出牌阶段,你可以弃置一张装备区内的牌(每种类型的装备牌限一次),然后视为对攻击范围内的一名其他角色使用了一张【杀】。', + twzhuchen:'诛綝', + twzhuchen_info:'出牌阶段,你可以弃置一张【桃】或【酒】并选择一名其他角色。你与其的距离视为1直到此阶段结束。', + twhuzhu:'护主', + twhuzhu_info:'出牌阶段限一次,若你的装备区内有牌,则你可以令一名其他角色交给你一张手牌,然后获得你装备区内的一张牌。若其体力值不大于你,则你可以令其回复1点体力。', + twliancai:'敛财', + twliancai_info:'结束阶段,你可以将武将牌翻面,然后获得一名其他角色装备区内的一张牌。当你的武将牌翻面时,你可以将手牌补至与体力值相同。', + twrangyi:'攘夷', + twrangyi2:'攘夷', + twrangyi_info:'出牌阶段限一次,你可以将所有手牌交给一名其他角色,然后令其选择一项:1.使用其中的一张牌,并于此牌被使用时将其余的牌交还给你。2.受到来自你的1点伤害。', + twbaimei:'白眉', + twbaimei_info:'锁定技,若你没有手牌,则防止你受到的所有属性伤害和锦囊牌造成的伤害。', + chijie:'持节', + chijie_info:' 游戏开始时,你可以选择一个现存势力,你的势力视为该势力。', + waishi:'外使', + waishi_info:' 出牌阶段限一次,你可以用至多X张牌交换一名其他角色等量的手牌(X为现存势力数),然后若其与你势力相同或手牌多于你,你摸一张牌。', + renshe:'忍涉', + renshe_info:'当你受到伤害后,你可以选择一项:将势力改为现存的另一个势力;或可以额外发动一次“外使”直到你的下个出牌阶段结束;或与另一名其他角色各摸一张牌。', + tw_gexuan:'TW葛玄', + tw_gexuan_prefix:'TW', + twdanfa:'丹法', + twdanfa_info:'准备阶段或结束阶段开始时,你可将一张牌置于武将牌上,称为“丹”。每回合每种花色限一次,当你使用牌时,若“丹”中有与此牌花色相同的牌,则你摸一张牌。', + twlingbao:'灵宝', + twlingbao_info:'出牌阶段限一次,你可以将两张花色不同的“丹”置入弃牌堆。若这两张牌:均为红色,你令一名其他角色回复1点体力;均为黑色,你弃置一名其他角色区域内至多两张区域不同牌;颜色不同,则你令一名角色摸一张牌,并令另一名角色弃置一张牌。', + twsidao:'司道', + twsidao_info:'游戏开始时,你选择一张“法宝”置入装备区。准备阶段,若你以此法选择的法宝在牌堆/弃牌堆中,则你使用之。', + gx_lingbaoxianhu:'灵宝仙壶', + gx_lingbaoxianhu_info:'锁定技,当你造成点数大于1的伤害后,或有角色死亡后,你加1点体力上限并回复1点体力。', + gx_taijifuchen:'太极拂尘', + gx_taijifuchen_info:'锁定技,当你使用【杀】指定目标后,你令目标角色选择一项:①弃置一张牌,若此牌和【杀】花色相同,则你获得之。②其不可响应此【杀】。', + gx_chongyingshenfu:'冲应神符', + gx_chongyingshenfu_info:'锁定技。①当你受到牌造成的伤害后,你记录此牌的名称。②当你受到〖冲应神符①〗记录过的牌造成的伤害时,你令此牌伤害-1。', + tw_dongzhao:'TW董昭', + tw_dongzhao_prefix:'TW', + twmiaolve:'妙略', + twmiaolve_info:'游戏开始时,你获得两张【瞒天过海】。当你受到1点伤害后,你可选择:①获得一张【瞒天过海】并摸一张牌。②获得一张智囊。', + twyingjia:'迎驾', + twyingjia_info:'一名角色的回合结束时,若你本回合内使用过两张或更多的同名锦囊牌,则你可弃置一张手牌并令一名角色进行一个额外回合。', + dz_mantianguohai:'瞒天过海', + dz_mantianguohai_info:'此牌不计入拥有者的手牌上限。出牌阶段,对一至两名区域内有牌的其他角色使用。你获得目标角色一张牌,然后依次交给每名目标角色各一张牌。', + jiachong:'TW贾充', + jiachong_prefix:'TW', + beini:'悖逆', + beini_info:'出牌阶段限一次,你可以选择一名体力值不小于你的角色,令你或其摸两张牌,然后未摸牌的角色视为对摸牌的角色使用一张【杀】。', + dingfa:'定法', + dingfa_info:'弃牌阶段结束时,若本回合你失去的牌数不小于你的体力值,你可以选择一项:1、回复1点体力;2、对一名其他角色造成1点伤害。', + duosidawang:'朵思大王', + equan:'恶泉', + equan_info:'锁定技。①当有角色于你的回合内受到伤害后,其获得X枚“毒”(X为伤害值)。②准备阶段,你令所有拥有“毒”标记的角色移去所有“毒”标记并失去等量的体力。③当有角色因〖恶泉②〗进入濒死状态时,你令其所有技能失效直到回合结束。', + manji:'蛮汲', + manji_info:'锁定技。其他角色失去体力后,若你的体力值:不大于该角色,你回复1点体力;不小于该角色,你摸一张牌。', + wuban:'TW吴班', + wuban_prefix:'TW', + jintao:'进讨', + jintao_info:'锁定技,你使用【杀】无距离限制且次数上限+1。你于出牌阶段内使用的第一张【杀】伤害+1,第二张【杀】不可被响应。', + yuejiu:'TW乐就', + yuejiu_prefix:'TW', + cuijin:'催进', + cuijin_info:'当你或你攻击范围内的角色使用【杀】时,你可以弃置一张牌并获得如下效果:此【杀】的伤害值基数+1,且当此【杀】结算结束后,若未造成过伤害,则你对使用者造成1点伤害。', + tw_zhaoxiang:'TW赵襄', + tw_zhaoxiang_prefix:'TW', + twfuhan:'扶汉', + twfuhan_info:'限定技。准备阶段开始时时,你可以移去所有"梅影"标记,然后从五张未登场的蜀势力武将牌中选择一名获得其所有技能,将体力上限数调整为以此技能移去所有“梅影”标记的数量(最少为2,最多为8)并回复1点体力,然后从牌堆/弃牌堆/场上获得【梅影枪】。', + twqueshi:'鹊拾', + twqueshi_info:'游戏开始时,你将【梅影枪】置于你的装备区。', + meiyingqiang:'梅影枪', + meiyingqiang_info:'当你于其他角色的回合内第一次失去牌时,你可以使用一张【杀】。', + tw_fuwan:'TW伏完', + tw_fuwan_prefix:'TW', + twmoukui:'谋溃', + twmoukui_info:'当你使用【杀】指定目标后,你可以选择一项:①摸一张牌;②弃置该角色的一张牌;③背水:若此【杀】未因造成伤害而令该角色进入过濒死状态,则该角色弃置你的一张牌。', + tw_yujin:'SP于禁', + tw_yujin_prefix:'SP', + xinzhenjun:'镇军', + xinzhenjun_info:'出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸1+X张牌(X为此【杀】造成的伤害总点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。', + tw_hucheer:'TW胡车儿', + tw_hucheer_prefix:'TW', + twshenxing:'神行', + twshenxing_info:'锁定技。若你的装备区内没有坐骑牌,则你至其他角色的距离-1且手牌上限+1。', + twdaoji:'盗戟', + twdaoji_info:'出牌阶段限一次,你可以弃置一张非基本牌并选择一名攻击范围内的角色,获得其一张牌。若你以此法得到的牌为:基本牌,你摸一张牌;装备牌,你使用此牌并对其造成1点伤害。', + tw_hejin:'TW何进', + tw_hejin_prefix:'TW', + twmouzhu:'谋诛', + twmouzhu_info:'出牌阶段限一次,你可以选择一名其他角色A。你令除A外所有体力值小于等于你的其他角色依次选择是否交给你一张牌。若你以此法得到的牌数X:等于0,你和所有进行选择的角色依次失去1点体力。大于0,你令A选择由你视为对其使用一张伤害值基数为X的【杀】或【决斗】。', + twyanhuo:'延祸', + twyanhuo_info:'当你死亡时,你可以选择一项:①令一名其他角色弃置X张牌。②令X名其他角色依次弃置一张牌。(X为你的牌数)', + tw_mayunlu:'TW马云禄', + tw_mayunlu_prefix:'TW', + twfengpo:'凤魄', + twfengpo_info:'①当你使用【杀】或【决斗】指定唯一目标后,你可观看目标角色的手牌并选择一项:⒈摸X张牌。⒉令此牌的伤害值基数+X(X为其手牌中的♦数)。②当你杀死一名角色后,你将〖凤魄①〗中的“♦数”改为“红色牌数”。', + tw_re_caohong:'TW曹洪', + tw_re_caohong_prefix:'TW', + twyuanhu:'援护', + twyuanhu_info:'出牌阶段限一次。你可将一张装备牌置入一名角色的装备区内。若此牌为:武器牌,你弃置与其距离为1的另一名角色区域的一张牌;防具牌,其摸一张牌;坐骑牌或宝物牌,其回复1点体力。然后若其体力值或手牌数不大于你,则你摸一张牌,且你可以于本回合的结束阶段发动一次〖援护〗。', + twjuezhu:'决助', + twjuezhu_info:'限定技。准备阶段,你可废除一个坐骑栏,令一名角色获得〖飞影〗并废除判定区。该角色死亡后,你恢复以此法废除的装备栏。', + tw_zangba:'TW臧霸', + tw_zangba_prefix:'TW', + twhanyu:'捍御', + twhanyu_info:'锁定技。游戏开始时,你获得牌堆中的基本牌,锦囊牌,装备牌各一张。', + twhengjiang:'横江', + twhengjiang_info:'出牌阶段限一次,当你使用基本牌或普通锦囊牌指定唯一目标后,你可将此牌的目标改为攻击范围内的所有合法目标,然后你于此牌结算结束后摸X张牌(X为因响应此牌而使用或打出过牌的角色数)。', + tw_huojun:'TW霍峻', + tw_huojun_prefix:'TW', + twsidai:'伺怠', + twsidai_info:'限定技。出牌阶段,你可以将手牌区内的所有基本牌当做【杀】使用(无距离和次数限制)。若此牌对应的实体牌中:包含【闪】,则目标角色成为此牌的目标后,需弃置一张基本牌,否则不可响应此牌;包含【桃】,则当目标角色受到此牌的伤害后,其减1点体力上限;包含【酒】,则当目标角色受到此牌的伤害时,此伤害×2。', + twjieyu:'竭御', + twjieyu_info:'每轮限一次。结束阶段开始时,或当你于一轮内第一次受到伤害后,你可以弃置所有手牌,然后从弃牌堆中获得不同牌名的基本牌各一张。', + tw_liuhong:'TW刘宏', + tw_liuhong_prefix:'TW', + twyujue:'鬻爵', + twyujue_give:'鬻爵', + twyujue_info:'①其他角色的出牌阶段内,可以交给你任意张牌(每阶段上限为两张)。②当你于回合外获得其他角色的一张牌后,你可令其选择本回合内未选择过的一项:⒈弃置攻击范围内一名角色的一张牌。⒉下一次使用牌时,从牌堆中获得一张同类别的牌。', + twgezhi:'革制', + twgezhi_info:'①当你于出牌阶段内首次使用某种类别的牌时,你可以重铸一张手牌。②出牌阶段结束时,若你本阶段内因〖革制①〗失去过至少两张牌,则你可以令一名角色选择获得一个其未获得过的效果:⒈攻击范围+2;⒉手牌上限+2;⒊加1点体力上限。', + twfengqi:'烽起', + twfengqi_info:'主公技,锁定技。①其他群势力角色发动〖鬻爵①〗时,将每阶段上限改为四张。②以其他角色为目标的〖革制②〗结算结束后,目标角色可以获得其武将牌上的主公技。', + tw_caocao:'TW曹操', + tw_caocao_prefix:'TW', + twlingfa:'令法', + twlingfa_info:'①第一轮游戏开始时,你可选择获得如下效果直到本轮结束:其他角色使用【杀】时,若其有牌,则其需弃置一张牌,否则受到你造成的1点伤害。②第二轮游戏开始时,你可选择获得如下效果直到本轮结束:其他角色使用【桃】结算结束后,若其有牌,则其需交给你一张牌,否则受到你造成的1点伤害。③第三轮游戏开始时,你失去〖令法〗并获得〖治暗〗。', + twzhian:'治暗', + twzhian_info:'每回合限一次。一名角色使用装备牌或延时锦囊牌后,你可选择:⒈弃置位于场上的此牌。⒉弃置一张手牌并获得位于场上的此牌。⒊对其造成1点伤害。', + tw_zhangmancheng:'TW张曼成', + tw_zhangmancheng_prefix:'TW', + twfengji:'蜂集', + twfengji_info:'出牌阶段开始时,若你没有“示”,则你可以将一张牌作为“示”置于武将牌上并施法:从牌堆中获得X张与“示”牌名相同的牌,然后移去“示”。', + twyiju:'蚁聚', + twyiju_info:'非锁定技。若你的武将牌上有“示”,则:①你使用【杀】的次数上限和攻击范围的基数改为你的体力值。②当你受到伤害时,你移去“示”,且令此伤害+1。', + twbudao:'布道', + twbudao_info:'限定技。准备阶段,你可减1点体力上限,回复1点体力并选择获得一个〖布道〗技能池里的技能(三选一)。然后你可以令一名其他角色也获得此技能并交给你一张牌。', + twzhouhu:'咒护', + twzhouhu_info:'出牌阶段限一次。你可以弃置一张红色手牌并施法:回复X点体力。', + twharvestinori:'丰祈', + twharvestinori_info:'出牌阶段限一次。你可以弃置一张黑色手牌并施法:摸2X张牌。', + twzuhuo:'阻祸', + twzuhuo_info:'出牌阶段限一次。你可以弃置一张非基本牌并施法:防止你受到的下X次伤害。', + twzhouzu:'咒诅', + twzhouzu_info:'出牌阶段限一次。你可以对一名其他角色施法:其弃置X张牌,然后你对其造成1点雷电伤害。', + twhuangjin:'黄巾', + twhuangjin_info:'锁定技。当你一名角色使用【杀】指定你为目标时,若此【杀】有点数,你判定,若点数与此【杀】点数差值不大于1,则此【杀】对你无效。', + twguimen:'鬼门', + twguimen_info:'锁定技。当你弃置牌时,若其中有♠牌,你为每一张♠牌判定,若此牌点数与结果之差不大于1,你对一名其他角色造成2点雷电伤害。', + twdidao:'地道', + twdidao_info:'一名角色的判定牌生效前,你可以打出一张牌作为判定牌并获得原判定牌。若你以此法打出的牌与原判定牌颜色相同,你摸一张牌。', + tw_chengpu:'TW程普', + tw_chengpu_prefix:'TW', + twlihuo:'疠火', + twlihuo2:'疠火', + twlihuo3:'疠火', + twlihuo_info:'①当你声明使用普【杀】后,你可以将此【杀】改为火【杀】。此牌使用结算结束后,若有角色因此【杀】造成的伤害进入过濒死状态,则你失去1点体力。②当你使用火【杀】选择目标后,你可为此牌增加一个目标。', + twchunlao:'醇醪', + twchunlao_info:'①准备阶段,若场上没有“醇”,则你可将一名角色区域内的一张牌置于其武将牌上,称为“醇”。②一名角色使用【杀】时,若其有“醇”,则其可以交给你一张牌,令此【杀】的伤害值基数+1。③一名角色进入濒死状态时,若其有“醇”,则你可以移去“醇”并摸一张牌,然后令其回复1点体力。', + tw_guohuai:'TW郭淮', + tw_guohuai_prefix:'TW', + twjingce:"精策", + twjingce_info:"当你于出牌阶段使用第X张牌结算完毕后,你可以摸两张牌(X为你的体力值)。若此阶段你此前已摸过牌或本回合造成过伤害,你获得一枚“策”标记。", + yuzhang:"御嶂", + yuzhang_info:"你可以弃置一枚“策”标记,然后跳过一个阶段。当你受到伤害后,你可弃置一枚“策”标记,然后选择一项:⒈令伤害来源弃置两张牌;⒉令伤害来源本回合不能再使用或打出牌。", + tw_caozhao:'曹肇', + twfuzuan:'复纂', + twfuzuan_info:'出牌阶段限一次/当你受到伤害后/当你对其他角色造成伤害后,你可选择一名拥有转换技的角色,变更其的一个转换技的的状态。', + twchongqi:'宠齐', + twchongqi_info:'锁定技。游戏开始时,你令所有角色获得〖非服〗。然后你可减1点体力上限,令一名其他角色获得〖复纂〗。', + twfeifu:'非服', + twfeifu_info:'锁定技,转换技。阴:当你成为【杀】的唯一目标后;阳:当你使用【杀】指定唯一目标后;目标角色须交给使用者一张牌。若此牌为装备牌,则使用者可使用此牌。', + tw_wangchang:'TW王昶', + tw_wangchang_prefix:'TW', + twkaiji:'开济', + twkaiji_info:'准备阶段,你可令至多X名角色各摸一张牌(X为本局游戏内进入过濒死状态的角色数+1)。若有角色以此法获得了非基本牌,则你摸一张牌。', + twshepan:'慑叛', + twshepan_info:'每回合限一次。当你成为其他角色使用牌的目标后,你可选择一项:⒈摸一张牌。⒉将其区域内的一张牌置于牌堆顶。然后若你的手牌数与其相等,则你将此技能的发动次数归零,且可以令此牌对你无效。', + tw_wangcan:'TW王粲', + tw_wangcan_prefix:'TW', + twdianyi:'典仪', + twdianyi_info:'锁定技。你的回合结束时,若你本回合内:造成过伤害,你弃置所有手牌;未造成过伤害,你将手牌数调整至四张。', + twyingji:'应机', + twyingji_wuxie:'应机', + twyingji_info:'当你于回合外需要使用或打出一张基本牌或普通锦囊牌时,若你没有手牌,则你可摸一张牌,然后视为使用或打出此牌。', + twshanghe:'觞贺', + twshanghe_info:'限定技。当你进入濒死状态时,你可令所有其他角色依次交给你一张牌;若这些牌中没有【酒】,则你将体力回复至1点。', + tw_wujing:'TW吴景', + tw_wujing_prefix:'TW', + twfenghan:'锋捍', + twfenghan_info:'每回合限一次。当你使用【杀】或伤害类锦囊牌指定第一个目标后,你可令至多X名角色各摸一张牌(X为此牌的目标数)。', + twcongji:'从击', + twcongji_info:'当你的红色牌于回合外因弃置而进入弃牌堆后,你可令一名其他角色获得这些牌。', + old_quancong:'TW全琮', + old_quancong_prefix:'TW', + zhenshan:'振赡', + zhenshan_info:'每回合限一次,当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌,视为使用或打出此牌。', + tw_tianyu:'TW田豫', + tw_tianyu_prefix:'TW', + gz_tw_tianyu:'田豫', + twzhenxi:'震袭', + twzhenxi_info:'每回合限一次。当你使用【杀】指定目标后,你可选择一项:⒈弃置其X张手牌(X为你至其的距离);⒉将其装备区或判定区内的一张牌移动到另一名角色的装备区或判定区内。若其体力值大于你或其体力值为全场最高,则你可以改为依次执行以上两项。', + twyangshi:'扬师', + twyangshi_info:'锁定技。当你受到伤害后,若场上有不在你攻击范围内的其他角色,则你令攻击范围+1;若没有,则你从牌堆中获得一张【杀】。', + tw_puyangxing:'濮阳兴', + twzhengjian:'征建', + twzhengjian_info:'游戏开始时,你可选择获得一项效果:⒈其他角色的出牌阶段结束时,若其本阶段内未使用过非基本牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果二。⒉其他角色的出牌阶段结束时,若其本阶段内未得到过牌,则其须交给你一张牌,然后你可失去此效果并获得〖征建〗的效果一。', + twzhongchi:'众斥', + twzhongchi_info:'锁定技,限定技。当你因〖征建〗而得到牌后,若已经有至少X名角色因〖征建〗而交给你过牌(X为游戏人数的一半且向上取整),则你回复2点体力,且于本局游戏内受到渠道为【杀】的伤害+1,且你将〖征建〗中的“其须交给你一张牌”改为“你可对其造成1点伤害”。', + tw_bingyuan:'邴原', + twbingde:'秉德', + twbingde_info:'出牌阶段限一次。你可以选择一个本阶段未选择过的花色并弃置一张牌,你摸等同于本阶段你使用此花色的牌数,然后若你以此法弃置的牌的花色与你选择的花色相同,你令你〖秉德〗于此阶段发动的次数上限+1。', + twqingtao:'清滔', + twqingtao_info:'①摸牌阶段结束时,你可以重铸一张牌。若此牌为【酒】或非基本牌,你摸一张牌。②结束阶段,若你本回合未发动〖清滔①〗,你可以发动〖清滔①〗。', + tw_jiangji:'TW蒋济', + tw_jiangji_prefix:'TW', + twjichou:'急筹', + twjichou_info:'①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。', + twjilun:'机论', + twjilun_info:'当你受到伤害后,你可以摸X张牌(X为〖急筹①〗记录数且至少为1,至多为5),或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。', + tw_niufudongxie:'牛辅董翓', + baonvezhi_faq:'关于暴虐值', + baonvezhi_faq_info:'
  • 当你造成或受到伤害后,你获得等量的暴虐值;
  • 暴虐值的上限为5。', + twjuntun:'军屯', + twjuntun_info:'①游戏开始时或当其他角色死亡后,你可令一名角色获得〖凶军〗。②当其他角色造成伤害后,若其拥有〖凶军〗,你获得等同于此次伤害值的暴虐值。', + twxiongxi:'凶袭', + twxiongxi_info:'出牌阶段限一次。你可以弃置X张牌对一名其他角色造成1点伤害(X为你的暴虐值与暴虐值上限之差)。', + twxiafeng:'黠凤', + twxiafeng_info:'出牌阶段开始时,你可消耗至多3点暴虐值并获得如下效果直到回合结束:你使用的前X张牌没有距离和次数限制且不可被响应,你的手牌上限+X(X为你以此法消耗的暴虐值)。', + tw_bn_1:'一点', + tw_bn_2:'两点', + tw_bn_3:'三点', + tw_bn_1_bg:'一', + tw_bn_2_bg:'二', + tw_bn_3_bg:'三', + twxiongjun:'凶军', + twxiongjun_info:'锁定技,每回合限一次。当你造成伤害后,所有拥有〖凶军〗的角色摸一张牌。', + tw_jianshuo:'蹇硕', + twkunsi:'困兕', + twkunsi_info:'出牌阶段,你可以视为对一名未以此法选择过的其他角色使用一张【杀】。若此【杀】未造成伤害,其获得〖令戮〗直到你下回合开始,且当你成为其〖令戮〗的目标后,其可令你于〖令戮〗失败时进行两次结算。', + twlinglu:'令戮', + twlinglu_info:'强令:①任务:执行角色于其下回合结束前造成的伤害不小于2点。②成功:其摸两张牌。③失败:其失去1点体力。', + tw_mateng:'TW马腾', + tw_mateng_prefix:'TW', + twxiongzheng:'雄争', + twxiongzheng_info:'一轮游戏开始时,①若你上一轮发动过〖雄争〗且选择过“雄争”角色,你可以选择一项:1.视为对任意名上一轮内未对“雄争”角色造成过伤害的角色依次使用一张【杀】;2.令任意名上一轮对“雄争”角色造成过伤害的角色摸两张牌。②你可以选择一名未以此法选择过的角色,称为“雄争”角色。', + twluannian:'乱年', + twluannian_info:'主公技。其他群势力角色的出牌阶段限一次。其可以弃置X张牌并对“雄争”角色造成1点伤害(X为所有角色于本轮发动〖乱年〗的次数+1)。', + tw_baoxin:'TW鲍信', + tw_baoxin_prefix:'TW', + twmutao:'募讨', + twmutao_info:'出牌阶段限一次。你可以选择一名角色,令其将手牌中所有的【杀】依次交给其下家开始的每一名角色。然后其对最后一名以此法获得【杀】的角色A造成X点伤害(X为A手牌中【杀】的数量且至多为2)。', + twyimou:'毅谋', + twyimou_info:'当一名角色受到伤害后,若其存活且你至其的距离不大于1,你可以选择一项:1.令其从牌堆中获得一张【杀】;2.令其将一张手牌交给另一名角色并摸两张牌;3.背水:将所有手牌交给其(若受伤角色为你则跳过此步骤),然后依次执行上述所有选项。', + tw_liufuren:'刘夫人', + twzhuidu:'追妒', + twzhuidu_info:'出牌阶段限一次。你可以选择一名已受伤的其他角色并选择一项:1.对其造成1点伤害;2.弃置其装备区里的一张牌;3.背水:若该角色为女性,弃置一张牌,然后依次执行上述所有选项。', + twshigong:'示恭', + twshigong_info:'限定技。当你于回合外进入濒死状态时,你可以令当前回合角色选择一项:1.加1点体力上限并回复1点体力,摸一张牌,然后令你将体力回复至体力上限;2.弃置X张手牌,然后令你将体力回复至1点(X为其体力值)。', + tw_wangling:'TW王淩', + tw_wangling_prefix:'TW', + twmibei:'秘备', + twmibei_info:'使命技。①使命:使用每种类型且牌名不同的牌各两张。②成功:当你使用牌后,若你于本次事件完成了〖秘备①〗的使命,你获得〖谋立〗。③失败:出牌阶段结束时,若你本回合未使用过牌,你本回合手牌上限-1并重置〖秘备〗。', + twxingqi:'星启', + twxingqi_info:'觉醒技。准备阶段,若场上的牌数大于你的体力值,你回复1点体力,然后若〖秘备〗:未完成,你从牌堆中获得每种类型的牌各一张;已完成,本局游戏你使用牌无距离限制。', + twmouli:'谋立', + twmouli_backup:'谋立', + twmouli_info:'每回合限一次。你可以使用牌堆中的一张基本牌。', + tw_zhugeguo:'TW诸葛果', + tw_zhugeguo_prefix:'TW', + twqirang:'祈禳', + twqirang_info:'当有装备牌进入你的装备区时,你可以从牌堆中获得一张锦囊牌,你本阶段使用此牌无距离限制且不可被响应,且当你使用此牌时,你可以为这张牌增加或减少一个目标。', + twyuhua:'羽化', + twyuhua_info:'锁定技。①你的非基本牌不计入手牌上限。②当你于回合外失去牌后,若其中有非基本牌,你可以卜算X,然后你可以摸X张牌(X为其中非基本牌数且至多为5)。', + tw_fanchou:'TW樊稠', + tw_fanchou_prefix:'TW', + twxingluan:'兴乱', + twxingluan_info:'结束阶段,你可以亮出牌堆顶的六张牌,然后你可以选择一种类型的牌并分配给任意角色(每名角色至多三张)。然后所有以此法得到过牌且得到的牌数不少于你的角色失去1点体力。', + tw_xujing:'TW许靖', + tw_xujing_prefix:'TW', + twboming:'博名', + twboming_info:'①出牌阶段限两次。你可以将一张牌交给一名其他角色。②结束阶段,若所有其他角色于此回合得到的牌数之和大于1,你摸两张牌。', + twejian:'恶荐', + twejian_info:'当其他角色得到你的牌后,若其有其他与此牌类型相同的牌,你可以令其选择一项:1.受到你造成的1点伤害;2.弃置这些牌。', + tw_zhangfei:'TW张飞', + tw_zhangfei_prefix:'TW', + twxuhe:'虚吓', + twxuhe_info:'当你使用的【杀】被【闪】抵消时,你可以令其选择一项:1.受到你造成的1点伤害;2.本回合你使用的下一张牌对其造成伤害时,此伤害+2。', + tw_xuezong:'TW薛综', + tw_xuezong_prefix:'TW', + twjiexun:'诫训', + twjiexun_info:'结束阶段,你可以选择一个花色并令一名其他角色摸等同于场上此花色牌数张牌,然后其弃置X张牌。若其以此法弃置了所有牌,你选择一项:1.摸X张牌,然后将X归零;2.修改〖复难〗和〖诫训〗(X为此前〖诫训〗的发动次数)。', + twfunanx:'复难·改', + twjiexunx:'诫训·改', + twfunanx_info:'当其他角色使用或打出牌响应你使用的牌时,你可获得其使用或打出的牌。', + twjiexunx_info:'结束阶段,你可选择一个花色并令一名其他角色摸等同于场上此花色牌数张牌,然后其弃置X张牌(X为此前〖诫训〗的发动次数)。', + tw_zhangning:'TW张宁', + tw_zhangning_prefix:'TW', + twxingzhui:'星坠', + twxingzhui_info:'出牌阶段限一次。你可以失去1点体力并施法:亮出牌堆顶2X张牌,若其中有黑色牌,则你可令一名其他角色获得这些黑色牌。若黑色牌的数量不小于X,则你对其造成X点雷电伤害。', + twjuchen:'聚尘', + twjuchen_info:'结束阶段,若你的手牌数和体力值均不为全场最多,则你可以令所有角色弃置一张牌,然后你获得其中的红色牌。', + tw_yufuluo:'于夫罗', + twjiekuang:'竭匡', + twjiekuang_info:'每回合限一次。当一名体力值小于你的角色成为其他角色使用基本牌或普通锦囊牌的唯一目标后,若没有角色处于濒死状态,你可以失去1点体力或减1点体力上限,将此牌的目标转移给你。然后此牌结算结束后,若此牌未造成伤害且此牌的使用者是你使用此牌名的牌的合法目标,你视为对此牌的使用者使用一张同名牌。', + twneirao:'内扰', + twneirao_info:'觉醒技。准备阶段,若你的体力值与体力上限之和不大于9,你失去〖竭匡〗,弃置所有牌并从牌堆或弃牌堆中获得等量的【杀】,然后获得〖乱掠〗。', + twluanlve:'乱掠', + twluanlve_info:'①出牌阶段,你可以将X张【杀】当做【顺手牵羊】对一名本阶段未成为过【顺手牵羊】的目标的角色使用(X为你以此法使用【顺手牵羊】的次数)。②当你使用牌时,若此牌为【顺手牵羊】,你令此牌不能被响应。', + tw_fengxí:'冯习', + twqingkou:'轻寇', + twqingkou_info:'准备阶段,你可以视为对一名其他角色使用一张【决斗】。然后此牌的伤害来源摸一张牌,若伤害来源包括你,你跳过本回合的判定阶段和弃牌阶段。', + tw_zhangji:'张既', + twdingzhen:'定镇',//丁真 + twdingzhen_info:'一轮游戏开始时,你可以选择任意名你至其距离不大于X的角色(X为你的体力值),这些角色选择一项:1.弃置一张【杀】;2.本轮其于回合内使用的第一张牌不能指定你为目标。', + twyouye:'攸业', + twyouye_info:'锁定技。①其他角色的结束阶段,若其本回合未对你造成过伤害且“蓄”数小于5,你将牌堆顶的牌置于武将牌上,称为“蓄”。②当你造成或受到伤害后,若你有“蓄”,你将所有“蓄”分配给任意角色(若当前回合角色存活,则你至少为当前回合角色分配一张)。', + tw_xunchen:'TW荀谌', + tw_xunchen_prefix:'TW', + twweipo:'危迫', + twweipo_info:'出牌阶段限一次。你可以令一名角色弃置一张牌,然后令其获得一张【兵临城下】或一张由你选择的智囊牌。', + twmouzhi:'谋识', + twmouzhi_info:'锁定技。当你受到伤害时,若伤害渠道对应的牌和你上次受到的伤害渠道对应的牌颜色相同,则你防止此伤害。', + tw_jiangqing:'TW蒋钦', + tw_jiangqing_prefix:'TW', + twshangyi:'尚义', + twshangyi_info:'出牌阶段限一次。你可以弃置一张牌并选择一名有手牌的其他角色,你令其观看你的手牌,然后你观看其手牌并选择一项:1.弃置其中一张牌;2.与其交换一张手牌。若你以此法弃置了其的黑色牌,或你与其交换的两张牌均为红色,你摸一张牌。', + twxiangyu:'翔羽', + twxiangyu_info:'锁定技。①你于回合内的攻击范围+X(X为本回合失去过牌的角色数且至多为5)。②当你使用【杀】指定目标后,若你至目标角色的距离小于你的攻击范围,你令此目标角色抵消此【杀】所需使用的【闪】数+1。', + twgyshenxing:'慎行', + twgyshenxing_info:'出牌阶段,你可以弃置X张牌,然后摸一张牌并获得1枚“慎”标记(X为你的“慎”数且至多为2)。', + tw_guyong:'TW顾雍', + tw_guyong_prefix:'TW', + twbingyi:'秉壹', + twbingyi_info:'结束阶段,你可以展示所有手牌,若这些牌的颜色均相同或类别均相同,你可以令至多Y名角色各摸一张牌(Y为你的手牌数)。若你以此法展示的牌数大于1且这些牌的颜色均相同且类别均相同,你移去所有“慎”。', + twyilie:'毅烈', + twyilie_info:'出牌阶段开始时,你可以选择一项:1.本阶段内使用【杀】的次数上限+1;2.本回合内使用【杀】指定处于连环状态的目标后,或使用【杀】被【闪】抵消时,摸一张牌;3.背水:失去1点体力,然后依次执行上述所有选项。', + tw_chendong:'TW陈武董袭', + tw_chendong_prefix:'TW', + twfenming:'奋命', + twfenming_info:'准备阶段,你可以选择一名其他角色并选择一项:1.令其弃置一张牌;2.令其横置;3.背水:横置,然后依次执行上述所有选项。', + tw_handang:'TW韩当', + tw_handang_prefix:'TW', + twgongji:'弓骑', + twgongji2:'弓骑', + twgongji_info:'①你的攻击范围无限。②出牌阶段限一次,你可以弃置一张牌,然后你使用与此牌花色相同的【杀】无任何次数限制直到回合结束。若你以此法弃置的牌为装备牌,则你可以弃置一名其他角色的一张牌。', + twjiefan:'解烦', + twjiefan_info:'限定技。出牌阶段,你可以选择一名角色,令攻击范围内含有其的所有角色依次选择一项:1.弃置一张武器牌;2.令其摸一张牌。然后当其第一次进入濒死状态后,你重置〖解烦〗。', + tw_jiling:'TW纪灵', + tw_jiling_prefix:'TW', + twshuangren:'双刃', + twshuangren_info:'①出牌阶段开始时,你可以与一名角色拼点。若你:赢,你可以视为对至多两名至其的距离不大于1的角色依次使用一张【杀】;没赢,其可以视为对你使用一张【杀】。②出牌阶段结束时,若你本回合未发动过〖双刃①〗且未造成过渠道为【杀】的伤害,你可以弃置一张牌发动〖双刃①〗。', + tw_re_fazheng:'TW法正', + tw_re_fazheng_prefix:'TW', + twxuanhuo:'眩惑', + twxuanhuo_info:'摸牌阶段结束时,你可以交给一名其他角色两张牌,然后其选择一项:1.视为对你选择的另一名其他角色使用一张【杀】或【决斗】,2.令你获得其两张牌。', + twenyuan:'恩怨', + twenyuan1:'恩怨', + twenyuan2:'恩怨', + twenyuan_info:'①当你获得一名其他角色的至少两张牌后,你可以令其摸一张牌,若其手牌区或装备区没有牌,则你可以改为令其回复1点体力。②当你受到1点伤害后,你可令伤害来源选择一项:1.失去1点体力;2.交给你一张手牌,若此牌的花色不为♥,你摸一张牌。', + tw_madai:'TW马岱', + tw_madai_prefix:'TW', + twqianxi:'潜袭', + twqianxi2:'潜袭', + twqianxi3:'潜袭', + twqianxi2_bg:'潜', + twqianxi3_bg:'袭', + twqianxi_info:'准备阶段,你可以摸一张牌并弃置一张牌,令一名距离为1的角色本回合不能使用或打出与你弃置的牌颜色相同的手牌。然后本回合的结束阶段,若你本回合对其造成过渠道为【杀】的伤害,你令其不能使用或打出与你以此法弃置的牌颜色不同的牌直到其下回合结束。', + tw_niujin:'TW牛金', + tw_niujin_prefix:'TW', + twcuorui:'挫锐', + twcuorui_info:'限定技。准备阶段,你可以将手牌摸至X张(X为场上角色手牌数最多的角色的手牌数,且至多摸5张)。然后若你的判定区:未废除,你废除判定区;已废除,你可以对一名其他角色造成1点伤害。', + twliewei:'裂围', + twliewei_info:'锁定技。当你杀死一名角色后,你选择一项:1.摸两张牌;2.若你拥有〖挫锐〗且〖挫锐〗已发动过,重置〖挫锐〗。', + tw_guanqiujian:'TW毌丘俭', + tw_guanqiujian_prefix:'TW', + twzhengrong:'征荣', + twzhengrong_tag:'荣', + twzhengrong_info:'当你于出牌阶段使用牌结算结束后,若此牌为你于本局游戏你的出牌阶段内使用的第偶数张指定了其他角色为目标的牌,或你于出牌阶段第一次造成伤害后,你可以将一名其他角色的一张牌置于你的武将牌上,称为“荣”。', + twhongju:'鸿举', + twhongju_info:'觉醒技。准备阶段,若你的“荣”数不小于3,你摸等同于“荣”数的牌,且可以用任意手牌交换等量的“荣”,获得〖清侧〗,然后可以减1点体力上限并获得〖扫讨〗。', + twqingce:'清侧', + twqingce_backup:'清侧', + twqingce_info:'出牌阶段,你可以将一张“荣”置入弃牌堆并选择一名区域内有牌的角色,你弃置其区域里的一张牌。', + twsaotao:'扫讨', + twsaotao_info:'锁定技。你使用【杀】和普通锦囊牌不能被响应。', + tw_daxiaoqiao:'TW大乔小乔', + tw_daxiaoqiao_prefix:'TW', + twxingwu:'星舞', + twxingwu_info:'弃牌阶段开始时,你可以将一张牌置于武将牌上,称为“星舞”。然后你可移去三张“星舞”,弃置一名其他角色装备区里的所有牌,然后对其造成2点伤害(若其性别包含女性则改为1点伤害)。', + twpingting:'娉婷', + twpingting_info:'锁定技。①一轮游戏开始时或其他角色于你的回合内进入濒死状态时,你摸一张牌并将一张牌置于武将牌上,称为“星舞”。②若你有“星舞”,你视为拥有〖天香〗和〖流离〗。', + tw_furong:'TW傅肜', + tw_furong_prefix:'TW', + twxuewei:'血卫', + twxuewei_info:'每轮限一次。一名其他角色A的出牌阶段开始时,你可以选择另一名其他角色B,然后你令A选择一项:1.本回合不能对B使用【杀】且手牌上限-2;2.你视为对A使用一张【决斗】。', + twliechi:'烈斥', + twliechi_info:'当你受到伤害后,若伤害来源的体力值不小于你,你可以选择一项:1.令其将手牌数弃置至与你的手牌数相同;2.弃置其一张牌;3.背水:若你本回合进入过濒死状态,弃置一张装备牌,然后依次执行上述所有选项。', + tw_yl_luzhi:'TW卢植', + tw_yl_luzhi_prefix:'TW', + twmingren:'明任', + twmingren_info:'①游戏开始时,你摸一张牌,然后将一张手牌置于武将牌上,称为“任”。②出牌阶段开始时或出牌阶段结束时,你可以用一张牌替换“任”。', + twzhenliang:'贞良', + twzhenliang_info:'转换技。阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。', + tw_zhangnan:'张南', + twfenwu:'奋武', + twfenwu_info:'结束阶段,你可以失去1点体力并视为使用一张无距离限制的【杀】。若本回合你使用过的基本牌种数大于1,此【杀】伤害基数+1。', + tw_huchuquan:'呼厨泉', + twfupan:'复叛', + twfupan_info:'当你造成或受到伤害后,你可以摸X张牌并将一张牌交给一名其他角色(X为伤害值)。若你此前:未以此法交给过该角色牌,你摸两张牌;以此法交给过该角色牌,你可{对其造成1点伤害,然后你不能再以此法交给其牌}。', + tw_liuzhang:'TW刘璋', + tw_liuzhang_prefix:'TW', + twyaohu:'邀虎', + twyaohu_info:'每轮限一次。回合开始时,你须选择场上的一个势力。该势力的角色的出牌阶段开始时,其获得你的一张“生”,然后其须选择一项:1.对你指定的另一名的其他角色使用一张【杀】(无距离限制);2.本回合其使用伤害牌指定你为目标时须交给你两张牌,否则取消此目标。', + tw_liwei:'TW李遗', + tw_liwei_prefix:'TW', + twjiaohua:'教化', + twjiaohua_info:'当你或体力值最小的其他角色因摸牌而得到牌后,你可以令该角色从牌堆或弃牌堆中获得一张本次未获得的类别的牌(每种类别每回合限一次)。', + tw_yanxiang:'TW阎象', + tw_yanxiang_prefix:'TW', + twkujian:'苦谏', + twkujianx:'谏', + twkujian_info:'出牌阶段限一次。你可以将至多三张手牌交给一名其他角色,称为“谏”,你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸一张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。', + twruilian:'睿敛', + twruilian2:'睿敛', + twruilian_info:'一轮游戏开始时,你可以选择一名角色。其下回合结束时,若其本回弃置过至少两张其的牌,你可以选择其本回合弃置过的一种类别,你与其各从弃牌堆中获得一张此类别的牌。', + tw_xiahouen:'夏侯恩', + twfujian:'负剑', + twfujian_info:'锁定技。①游戏开始时或准备阶段,若你的装备区里没有武器牌,你随机将牌堆中的一张武器牌置入装备区。②当你于回合外失去武器牌后,你失去1点体力。', + twjianwei:'剑威', + twjianwei_info:'①若你的装备区里有武器牌,你使用【杀】无视防具且拼点牌点数+X(X为你的攻击范围)。②{其他角色的准备阶段,其可以与你拼点}/{准备阶段,你可以与攻击范围内的一名角色拼点}。若你赢,你获得其每个区域内的各一张牌;若其赢,其获得你装备区里的武器牌。', + tw_xiahoushang:'夏侯尚', + twtanfeng:'探锋', + twtanfeng_info:'准备阶段,你可以弃置一名其他角色区域内的一张牌,然后其选择一项:1.受到你造成的1点火焰伤害,然后令你跳过本回合的一个阶段(准备阶段和结束阶段除外);2.将一张牌当做【杀】对你使用(有距离限制)。', + tw_zongyu:'TW宗预', + tw_zongyu_prefix:'TW', + twzhibian:'直辩', + twzhibian_info:'出牌阶段开始时,你可以与一名其他角色拼点。若你赢,你可以选择一项:{1.将其区域里的一张牌移动到你的对应区域;2.回复1点体力;3.背水:弃置一张非基本牌,然后依次执行上述所有选项};若你没赢,你失去1点体力。', + twyuyan:'御严', + twyuyan_info:'锁定技。当你成为体力值大于你的角色使用的【杀】的目标时,你令使用者选择一项:1.交给你一张点数大于此【杀】的牌(若此【杀】无点数则改为非基本牌)。2.取消此目标。', + tw_zhouchu:'TW周处', + tw_zhouchu_prefix:'TW', + twguoyi:'果毅', + twguoyi_info:'当你不因〖果毅〗使用【杀】或普通锦囊牌指定一名其他角色为目标后,若其体力值或手牌数最大,或你的手牌数不大于X(X为你已损失的体力值+1),你可令其选择一项:1.本回合不能使用或打出手牌;2.弃置X张牌。若条件均满足,或其于本回合两个选项均已选择过,则你于此牌结算结束后依次视为对此牌的所有目标使用一张名称和属性相同的牌。', + twchuhai:'除害', + twchuhai_info:'使命技。①使命:令至少两名其他角色进入濒死状态。②成功:一名角色的回合结束时,若你于本回合完成了〖除害①〗的使命,你废除判定区,然后每名其他角色依次交给你一张牌。③当你获得其他角色的牌后,你须将其中的一张牌置入弃牌堆。', + tw_qiaogong:'TW桥公', + tw_qiaogong_prefix:'TW', + twyizhu:'遗珠', + twyizhu_info:'①结束阶段,你摸两张牌,然后将两张牌随机插入牌堆前2X张牌的位置中,称为“遗珠”(X为角色数,选择牌的牌名对其他角色可见)。②当有其他角色使用“遗珠”指定唯一目标时,你可以选择一项:1.增加一个目标;2.取消此目标,增加一个目标。然后移除此牌对应的“遗珠”记录并摸一张牌。', + twluanchou:'鸾俦', + twluanchou_info:'出牌阶段限一次。你可以令两名角色获得〖共患〗直到你下次发动此技能。', + twgonghuan:'共患', + twgonghuan_info:'每回合限一次。当其他角色受到伤害时,若其拥有〖共患〗且其体力值不大于你,你可以将此伤害转移给你(不触发〖共患〗)。', + tw_qiaorui:'TW桥蕤', + tw_qiaorui_prefix:'TW', + wangxing:'妄行', + twxiawei:'狭威', + twxiawei_info:'①游戏开始时,你将牌堆中的两张基本牌置于武将牌上,称为“威”。②回合开始时,你将所有“威”置入弃牌堆。③你可以将“威”如手牌般使用或打出。④妄行:准备阶段,你可以将牌堆顶的X+1张牌置于武将牌上,称为“威”。', + twqiongji:'穷技', + twqiongji_info:'锁定技。①每回合限一次。当你使用或打出“威”后,你摸一张牌。②当你受到伤害时,若你没有“威”,此伤害+1。', + tw_bianfuren:'TW卞夫人', + tw_bianfuren_prefix:'TW', + twwanwei:'挽危', + twwanwei_info:'每回合限一次。当一名体力值最小的角色受到伤害时:若该角色不为你,你可以防止此伤害,然后失去1点体力;若该角色为你,或你的体力上限最大,你可以于当前回合的结束阶段获得牌堆顶的牌并展示牌堆底的牌,若展示的牌能被使用,你使用之。', + twyuejian:'约俭', + twyuejian_info:'出牌阶段限一次。你可以将X张牌置于牌堆顶或牌堆底(X为你的手牌数减你的手牌上限且至少为1)。若你以此法失去的牌数:不小于3,你的体力上限+1;不小于2,你回复1点体力;不小于1,你的手牌上限+1。', + tw_chenzhen:'TW陈震', + tw_chenzhen_prefix:'TW', + twmuyue:'睦约', + twmuyue_info:'出牌阶段限一次。你可以弃置一张牌并选择一个基本牌或普通锦囊牌的牌名,然后令一名角色从牌堆中获得一张此牌名的牌。若你以此法弃置的牌的牌名与你选择的牌名相同,你下次发动〖睦约〗无需弃牌。', + twchayi:'察异', + twchayi_info:'结束阶段,你可以选择一名其他角色,令其选择一项:1.展示所有手牌;2.下次使用牌时弃置一张牌。该角色的下个回合结束时,若其手牌数与其上一次成为〖察异〗目标后的手牌数不相同,其执行另一项。', + tw_feiyi:'TW费祎', + tw_feiyi_prefix:'TW', + twshengxi:'生息', + twshengxi_info:'①准备阶段,你可以获得一张【调剂盐梅】。②结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊并摸一张牌。', + twkuanji:'宽济', + twkuanji_info:'每回合限一次。当你的牌不因使用而进入弃牌堆后,你可以令一名其他角色获得其中的一张牌。', + xia_wangyue:'王越', + twyulong:'驭龙', + twyulong_info:'当你使用【杀】指定第一个目标后,你可以与一名目标角色拼点。若你赢,且你此次的拼点牌为:黑色,此【杀】伤害+1;红色,此【杀】不可被响应。当此【杀】造成伤害后,若你赢,你令此【杀】不计入次数。', + twjianming:'剑鸣', + twjianming_info:'锁定技。每回合每种花色限一次,当你使用或打出【杀】时,你摸一张牌。', + xia_liyàn:'李彦', + twzhenhu:'震虎', + twzhenhu_info:'当你使用伤害牌指定第一个目标时,你可以摸一张牌并与至多三名其他角色共同拼点。若你赢,此牌对所有本次拼点没赢的角色造成的伤害+1;若你没赢,你失去1点体力。', + twlvren:'履刃', + twlvren_info:'①当你对其他角色造成伤害时,你令其获得1枚“刃”标记。②当你使用伤害牌时,你可以额外指定一名有“刃”的角色并移去其所有“刃”。③你的拼点牌点数+2X(X为参与此次拼点的角色数)。', + xia_tongyuan:'侠童渊', + xia_tongyuan_prefix:'侠', + twchaofeng:'朝凤', + twchaofeng_backup:'朝凤', + twchaofeng_info:'①你可以将一张【杀】当做【闪】、【闪】当做任意一种【杀】使用或打出。②出牌阶段开始时,你可以与至多三名角色共同拼点。赢的角色视为对所有没赢的角色使用一张火【杀】。', + twchuanshu:'传术', + twchuanshu_info:'限定技。准备阶段,你可以选择一名角色。直到你的下回合开始,其获得以下效果:1.当其拼点牌亮出时,此牌点数+3;2.其使用的下一张【杀】对除你外的角色造成伤害时,此伤害+1;3.若其不为你,其使用的下一张【杀】结算结束后,你摸等同于其因此【杀】造成的伤害值数的牌。', + xia_xushu:'侠徐庶', + xia_xushu_prefix:'侠', + twjiange:'剑歌', + twjiange_info:'每回合限一次。你可以将一张非基本牌当做【杀】使用或打出(无距离和次数限制,且不计入次数)。若此时不为你的回合,你摸一张牌。', + twxiawang:'侠望', + twxiawang_info:'当一名角色受到伤害后,若你至其的距离不大于1,你可以对伤害来源使用一张【杀】。当此【杀】结算结束后,若你造成过渠道为此牌的伤害,结束当前阶段。', + tw_haomeng:'TW郝萌', + tw_haomeng_prefix:'TW', + twgongge:'攻阁', + twgongge_info:'摧坚:你可以选择一项:1.摸X+1张牌。其响应此牌后,跳过你的下一个摸牌阶段;2.弃置其X+1张牌。此牌结算结束后,若其体力值不小于你,你交给其X张牌;3.此牌对其造成的伤害+X。此牌结算结束后,其回复X点体力。', + tw_weixu:'魏续', + twsuizheng:'随征', + twsuizheng_info:'锁定技。游戏开始时,你选择一名其他角色,称为“随征”角色。你获得以下效果:当“随征”角色造成伤害后,你摸一张牌;当“随征”角色受到伤害后,你选择一项:1.失去1点体力,令其从牌堆或弃牌堆中获得一张【杀】或【决斗】;2.弃置两张基本牌,令其回复1点体力。', + twtuidao:'颓盗', + twtuidao_info:'限定技。准备阶段,若“随征”角色的体力值不大于2或“随征”角色已死亡,你可以废除你与其的一个坐骑栏并选择一个类别,然后若“随征”角色存活,你获得其所有此类别的牌,否则你从牌堆中获得两张此类别的牌。然后你将“随征”角色改为另一名角色。', + tw_caoxiu:'TW曹休', + tw_caoxiu_prefix:'TW', + twqianju:'千驹', + twqianju_info:'锁定技。①你计算与其他角色的距离-X(X为你装备区的牌数)。②每回合限一次。当你对距离为1以内的角色造成伤害后,若你的装备区存在空置装备栏,你从牌堆或弃牌堆中将一张你空置装备栏对应副类别的装备牌置于你的装备区。', + twqingxi:'倾袭', + twqingxi_info:'当你使用张【杀】指定目标后,若此牌为你于本回合使用的第一张【杀】,你可以令目标角色选择一项:1.令你摸Y张牌,此【杀】不可被其响应(Y为你装备区的牌数且至少为1);2.若其装备区里有牌,弃置装备区里的所有牌,然后弃置你装备区里的等量张牌,令此【杀】对其造成的伤害+1。', + tw_sunyi:'TW孙翊', + tw_sunyi_prefix:'TW', + twzaoli:'躁厉', + twzaoli_info:'锁定技。①出牌阶段,你只能使用或打出你本回合得到的手牌。②出牌阶段开始时,你须弃置你区域内的所有装备牌并弃置任意张非装备手牌,你摸等量的牌,从牌堆中将你此次弃置的装备牌对应副类别的装备牌置入装备区。若你以此法置入了超过两张装备牌,你失去1点体力。', + tw_yangyi:'TW杨仪', + tw_yangyi_prefix:'TW', + twgongsun:'共损', + twgongsun_shadow:'共损', + twgongsun_info:'锁定技。出牌阶段开始时,你选择攻击范围内的一名其他角色并选择一种花色,直至你的下个回合开始前或你死亡时,你与其均无法使用、打出或弃置该花色的手牌。', + tw_dengzhi:'TW邓芝', + tw_dengzhi_prefix:'TW', + twjimeng:'急盟', + twjimeng_info:'出牌阶段限一次。你可以获得一名其他角色区域内的一张牌,然后交给其一张牌。若其体力值不小于你,你摸一张牌。', + xia_lusu:'侠鲁肃', + xia_lusu_prefix:'侠', + twkaizeng:'慨赠', + twkaizeng_info:'其他角色的出牌阶段限一次。其可以选择一种基本牌的牌名或非基本牌的类型,然后令你选择是否交给其任意张手牌。若你以此法:交给其至少两张牌,你摸一张牌;交给其的牌中包含其选择的牌名或类型的牌,你获得一张与此牌名或类型不同的牌。', + twyangming:'扬名', + twyangming_info:'出牌阶段结束时,你可以摸X张牌,且令本回合的手牌上限+X(X为你本阶段使用过的牌的类型数)。', + xia_dianwei:'侠典韦', + xia_dianwei_prefix:'侠', + twliexi:'烈袭', + twliexi_info:'准备阶段,你可以弃置任意张牌并选择一名其他角色。若你以此法弃置的牌数大于其体力值,你对其造成1点伤害;否则其对你造成1点伤害。然后若你弃置的牌中有武器牌,你对其造成1点伤害。', + twshezhong:'慑众', + twshezhong_info:'结束阶段,若你:本回合对其他角色造成过伤害,你可以令至多X名其他角色下个摸牌阶段的额定摸牌数-1(X为你本回合造成的伤害值);本回合受到过伤害,你可以将手牌摸至与其中一名伤害来源的体力值相同(至多摸至5)。', + xia_zhaoe:'赵娥', + twyanshi:'言誓', + twyanshi_info:'①游戏开始时,你选择一名其他角色,称为“言誓”角色。②当你或“言誓”角色受到二者之外角色造成的伤害后,伤害来源获得1枚“誓”标记。③你对有“誓”的角色使用牌无距离限制。④当你对有“誓”的角色造成伤害时,此伤害+1,且当你对这些角色造成伤害后,你摸等同于伤害值的牌并移去其所有“誓”。', + twrenchou:'刃仇', + twrenchou_info:'锁定技。当你或“言誓”角色死亡时,若二者中的另一名角色A存活,A对杀死你或其的角色造成X点伤害(X为A的体力值)。', + xia_xiahouzie:'夏侯紫萼', + twxuechang:'血偿', + twxuechang_info:'出牌阶段限一次。你可以与一名其他角色拼点。若你:赢,你获得其一张牌,若此牌为装备牌,你视为对其使用一张【杀】;没赢,其对你造成1点伤害,且你下次对其造成的伤害+1。', + twduoren:'夺刃', + twduoren_info:'①当你杀死角色后,你可以减1点体力上限,然后获得其所有的非主公技和非隐匿技。②当你令其他角色进入濒死状态时,你失去因〖夺刃①〗获得的技能。', + tw_yangang:'严纲', + twzhiqu:'直取', + twzhiqu_info:'结束阶段,你可以选择一名其他角色并依次使用牌堆顶X张牌中的【杀】。搏击:依次使用牌堆顶X张牌中的锦囊牌(X为你距离不大于1内的角色数,且你或其以外的角色不是你以此法使用牌的合法目标)。', + twxianfeng:'先锋', + twxianfeng_info:'当你于出牌阶段使用【杀】或伤害类锦囊牌对其他角色造成伤害后,你可以令受伤角色选择一项:1.其摸一张牌,然后直到你下个回合开始时,你至其他角色的距离-1;2.你摸一张牌,然后直到你下个回合开始时,其至你的距离-1。', + tw_gongsunfan:'公孙范', + twhuiyuan:'回援', + twhuiyuan_info:'当你于出牌阶段使用牌结算结束后,若你未于此阶段获得过此类型的牌,你可以展示一名角色的一张手牌,若此牌与你使用的牌类型相同,你获得此牌,否则你弃置此牌,然后其摸一张牌。游击:对其造成1点伤害。', + twshoushou:'收绶', + twshoushou_info:'①当你获得其他角色的牌时,若你在任意角色的攻击范围内,其他角色至你的距离+1。②当你造成或受到伤害后,若你不在任意其他角色的攻击范围内,其他角色至你的距离-1。', + twshijun:'师君', + twshijun_info:'主公技,其他群势力角色出牌阶段限一次,若你没有“米”,其可以摸一张牌,然后将一张牌置于你的武将牌上,称为“米”。', + twjuxiang:'踞襄', + twjuxiang_info:'主公技,其他群势力角色出牌阶段限一次,其可以选择其装备区的一张牌移动到你的装备区中,若你对应的装备栏已被废除,则改为交给你此装备牌,然后恢复你的对应装备栏。', + tw_ol_sunjian:'TW孙坚', + tw_ol_sunjian_prefix:'TW', + twpolu:'破虏', + twpolu_info:'主公技,当吴势力角色杀死一名角色或死亡后,你可以令任意名角色各摸X张牌(X为你此前发动过此技能的次数+1)。', + tw_menghuo:'TW孟获', + tw_menghuo_prefix:'TW', + twqiushou:'酋首', + twqiushou_info:'主公技,锁定技,当一张【南蛮入侵】结算结束后,若此牌造成的伤害大于3点或有角色因此死亡,所有蜀势力和群势力角色各摸一张牌。', + twzhuiting:'坠廷', + twzhuiting_info:'主公技,当一张锦囊牌即将对你生效时,其他魏势力角色和群势力角色可将一张与此牌颜色相同的牌当作【无懈可击】使用。', + twniju:'逆拒', + twniju_info:'主公技。当你的拼点牌亮出后,你可以令本次拼点事件中的一张拼点牌的点数+X或-X。然后当本次拼点事件结束后,若有两张拼点牌的点数相等,你摸X张牌(X为场上群势力角色数)。', + ol_liuyu:'TW刘虞', + ol_liuyu_prefix:'TW', + twchongwang:'崇望', + twchongwang_info:'主公技,其他群势力角色的出牌阶段开始时,其可以交给你一张牌,然后你与其使用【杀】或伤害性锦囊牌指定目标时不能指定对方为目标直至你的下回合结束(每名角色限发动一次)。', + tw_zhangzhao:'张昭', + twlijian:'力荐', + twlijian_info:'昂扬技。其他角色的弃牌阶段结束时,你可以令其获得任意本阶段进入弃牌堆的牌(可不选),然后你获得其余的牌,若其得到的牌数大于你,你可以对其造成1点伤害。
    激昂:八张牌进入弃牌堆。', + twchungang:'纯刚', + twchungang_info:'锁定技。一名其他角色于摸牌阶段外得到超过一张牌时,你令其弃置一张牌。', + tw_zhanghong:'张纮', + twquanqian:'劝迁', + twquanqian_info:'昂扬技。出牌阶段限一次,你可以将至多四张花色各不相同的手牌交给一名其他角色,然后若你交出的牌数大于1,则你从牌堆中获得一张装备牌,然后选择一项:①将手牌数摸至与其相同;②观看其手牌并获得其一种花色的所有牌。
    激昂:你弃置六张手牌。', + twrouke:'柔克', + twrouke_info:'锁定技。当你于摸牌阶段外得到超过一张牌时,你摸一张牌。', + kaisa:"凯撒", + zhengfu:"征服", + zhengfu_info:"当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。", + xia_xiahoudun:'侠夏侯惇', + xia_xiahoudun_prefix:'侠', + twdanlie:'胆烈', + twdanlie_info:'①出牌阶段限一次。你可以与至多三名其他角色共同拼点。若你赢,你对没赢的角色依次造成1点伤害;若你没赢,你失去1点体力。②你的拼点牌点数+X(X为你已损失的体力值)。', + xia_zhangwei:'张葳', + twhuzhong:'护众', + twhuzhong_info:'当你于出牌阶段使用无属性【杀】指定唯一目标角色时,你可以摸一张牌并选择一项:①为此牌额外选择一个目标;②弃置其一张手牌,此牌结算完毕后,若此牌造成过伤害,则你摸一张牌且本阶段可以额外使用一张【杀】。', + twfenwang:'焚亡', + twfenwang_info:'锁定技。①当你受到属性伤害时,你须弃置一张牌或令此伤害+1。②当你对其他角色造成非属性伤害时,若你的手牌数大于等于其,则此伤害+1。', + xia_xiahousone:'夏侯子萼', + twchengxi:'承袭', + twchengxi_info:'出牌阶段每名角色限一次,你可以摸一张牌并与一名其他角色拼点。若你赢,你使用的下一张基本牌或非延时锦囊牌结算完毕后,你视为对原目标使用一张无次数限制的同名牌;若你没赢,其视为对你使用一张无距离限制的【杀】。', + xia_liubei:'侠刘备', + xia_liubei_prefix:'侠', + twshenyi:'伸义', + twshenyi_info:'每回合限一次,当你或你攻击范围内的一名角色于一回合内首次受到伤害后,你可以声明一种基本牌或锦囊牌(每种牌名限一次),然后从牌堆中将一张同名牌(若没有同名牌则改为同类型的牌)称为“侠义”置于武将牌上。若受伤角色不为你,则你可以将任意张手牌交给其,且当其失去一张你以此法交给其的牌后,你摸一张牌。', + twxinghan:'兴汉', + twxinghan_info:'①你的回合外或你处于濒死状态时,你可以如手牌般使用或打出“侠义”牌。②准备阶段,若“侠义”牌数大于存活角色数,则你可以依次使用其中所有可以使用的牌。然后你获得如下效果:回合结束时,你弃置所有手牌并失去X点体力(X为你的体力值-1且X至少为1)。', + twxinghan_tag:'侠义', + xia_guanyu:'侠关羽', + xia_guanyu_prefix:'侠', + twzhongyi:'忠义', + twzhongyi_info:'锁定技。①你使用【杀】无距离限制。②当你使用【杀】结算完毕后,你选择一项:⒈摸X张牌;⒉回复X点体力;⒊背水:失去Y点体力,依次执行以上两项(X为此牌造成的伤害值,Y为你本局游戏此前选择此项的次数+1)。', + twchue:'除恶', + twchue_info:'①当你使用【杀】指定唯一目标时,你可以失去1点体力,为此牌额外指定Z个目标。②当你受到伤害或失去体力后,你摸一张牌并获得1个“勇”标记。③回合结束时,若你本回合发动过〖除恶②〗,则你可以失去Z个“勇”标记,视为使用一张伤害+1且可以额外指定Z个目标的【杀】。(Z为你的体力值)', + xia_shitao:'石韬', + twjieqiu:'劫囚', + twjieqiu_info:'出牌阶段限一次,你可以选择一名装备区没有废除栏的其他角色,废除其所有装备栏,然后其摸X张牌(X为其废除装备栏前的装备区牌数),直到其恢复所有装备栏前:其弃牌阶段结束时,其恢复等同于其弃置牌数的装备栏;其回合结束时,若其仍有已废除的装备栏,则你执行一个额外回合(每轮限一次)。', + twenchou:'恩仇', + twenchou_info:'出牌阶段限一次,你可以观看一名存在废除装备栏的其他角色的手牌并获得其中一张牌,然后你恢复其一个装备栏。', + xia_shie:'史阿', + twdengjian:'登剑', + twdengjianx:'剑法', + twdengjian_info:'①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。②你使用“剑法”牌不计入次数限制。', + twxinshou:'心授', + twxinshou_info:'①当你于出牌阶段使用【杀】时,若此【杀】与你本回合使用的所有其他【杀】的颜色均不相同,则你可以选择执行以下一项本回合未执行过的项:⒈摸一张牌;⒉交给一名其他角色一张牌。②当你使用【杀】时,若〖心授①〗的两项本回合均已被你选择过,则你可以令〖登剑①〗失效并令一名其他角色获得〖登剑〗,你的下个回合开始时,其失去〖登剑〗,若其这期间使用【杀】造成过伤害,则你结束〖登剑①〗的失效状态。', + xia_yuzhenzi:'玉真子', + twhuajing:'化境', + twhuajing_info:'①游戏开始时,你获得6个效果各不相同的无效果“武”标记。②一名拥有“武”标记的角色的攻击范围+X(X为其拥有的“武”标记数)。③出牌阶段限一次,你可以展示至多四张手牌,然后根据这些牌含有的花色数于本回合获得等量你拥有的“武”标记的效果。④拥有“武”标记效果的角色的武器牌失效(武器牌不提供攻击范围且武器技能失效)。', + twhuajing_jian:'剑', + twhuajing_jian_info:'当你使用【杀】指定目标后,你随机弃置目标角色两张牌。', + twhuajing_dao:'刀', + twhuajing_dao_info:'当你使用【杀】对没有手牌的目标角色造成伤害时,此伤害+1。', + twhuajing_fu:'斧', + twhuajing_fu_info:'当你使用的【杀】被【闪】响应后,你对目标角色造成1点伤害。', + twhuajing_qiang:'枪', + twhuajing_qiang_info:'当你使用黑色【杀】结算完毕后,你从牌堆或弃牌堆中获得一张【闪】。', + twhuajing_ji:'戟', + twhuajing_ji_info:'当你使用【杀】造成伤害时,你摸一张牌。', + twhuajing_gong:'弓', + twhuajing_gong_info:'当你使用【杀】造成伤害后,你随机弃置受伤角色装备区里的一张牌。', + twtianshou:'天授', + twtianshou_info:'锁定技,回合结束时,若你本回合使用【杀】造成过伤害,且你拥有本回合获得过效果的“武”标记,则你须将其中一个“武”标记交给一名其他角色并令其获得此标记的效果直到其回合结束,然后你摸一张牌。', - tw_mobile: '海外服·稀有专属', - tw_yunchouzhi: '运筹帷幄·智', - tw_yunchouxin: '运筹帷幄·信', - tw_yunchouren: '运筹帷幄·仁', - tw_yunchouyong: '运筹帷幄·勇', - tw_yunchouyan: '运筹帷幄·严', - tw_zhu: '海外服·主公', - tw_sp: '海外服·SP', - tw_swordsman: '海外服·武侠篇', - tw_mobile2: '海外服·异构', - tw_yijiang: '一将成名TW', - tw_english: '英文版', + tw_mobile:'海外服·稀有专属', + tw_yunchouzhi:'运筹帷幄·智', + tw_yunchouxin:'运筹帷幄·信', + tw_yunchouren:'运筹帷幄·仁', + tw_yunchouyong:'运筹帷幄·勇', + tw_yunchouyan:'运筹帷幄·严', + tw_zhu:'海外服·主公', + tw_sp:'海外服·SP', + tw_swordsman:'海外服·武侠篇', + tw_mobile2:'海外服·异构', + tw_yijiang:'一将成名TW', + tw_english:'英文版', }, - pinyins: { - 凯撒: ['Caesar'], - 难升米: ['Nashime'] + pinyins:{ + 凯撒:['Caesar'], + 难升米:['Nashime'] } }; });