diff --git a/card/standard.js b/card/standard.js index f84069fd0..3a0f08b6a 100644 --- a/card/standard.js +++ b/card/standard.js @@ -2136,7 +2136,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ direct:true, filter:function(event,player){ if(get.mode()=='guozhan'||!event.card||event.card.name!='sha') return false; - return event.target.isIn()&&player.canUse('sha',event.target,false)&&(player.hasSha()||_status.connectMode&&player.countCards('h')); + return event.target.isIn()&&player.canUse('sha',event.target,false)&&(player.hasSha()||_status.connectMode&&player.countCards('hs')); }, content:function(){ "step 0" diff --git a/card/yongjian.js b/card/yongjian.js index 768e4cd35..320303d14 100644 --- a/card/yongjian.js +++ b/card/yongjian.js @@ -592,10 +592,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', forceLoad:true, filter:function(event,player){ - return player.hasCard((card)=>lib.skill._yongjian_zengyu.filterCard(card),'h'); + return player.hasCard((card)=>lib.skill._yongjian_zengyu.filterCard(card,player),'he'); }, - filterCard:function(card){ - return get.cardtag(card,'gifts'); + filterCard:function(card,player){ + var mod=game.checkMod(card,player,'unchanged','cardZengyuable',player); + if(mod!='unchanged') return mod; + return get.position(card)=='h'&&get.cardtag(card,'gifts'); }, filterTarget:function(card,player,target){ if(player==target) return false; @@ -605,6 +607,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } return true; }, + position:'he', discard:false, lose:false, delay:false, @@ -613,7 +616,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(get.cardtag(card,'gifts')&&get.type(card,false)=='equip'&&game.hasPlayer(function(current){ return current!=player&¤t.canEquip(card,true)&&!current.hasSkillTag('refuseGifts')&&get.effect(current,card,player,player)>0; })) return 2; - if(!player.needsToDiscard()) return 0; + if(!player.needsToDiscard()&&get.position(card)=='h') return 0; return 1+Math.random(); }, content:function(){ diff --git a/character/clan.js b/character/clan.js index cde500b49..32c27a9cb 100644 --- a/character/clan.js +++ b/character/clan.js @@ -284,7 +284,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num<=1) event._result={bool:false}; else{ var pos=player==trigger.player?'e':'he'; - trigger.player.chooseCard('连和:交给'+get.translation(player)+get.cnNumber(num-1)+'张牌,或点“取消”令其摸'+get.cnNumber(num+1)+'张牌',true,num-1,pos).set('ai',card=>{ + trigger.player.chooseCard('连和:交给'+get.translation(player)+get.cnNumber(num-1)+'张牌,或点“取消”令其摸'+get.cnNumber(num+1)+'张牌',num-1,pos).set('ai',card=>{ if(_status.event.draw) return 0; return 5-get.value(card); }).set('draw',get.attitude(trigger.player,player)>=0); @@ -420,7 +420,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' player.chooseTarget('三恇:选择一名其他角色','令其交给你至少X张牌,然后其获得'+get.translation(trigger.cards.filterInD('ejod'))+'(X为以下条件中其满足的项数:场上有牌、已受伤、体力值小于手牌数)',true,lib.filter.notMe).set('ai',target=>{ - var att=get.attitude(player,target); + var att=get.attitude(player,target),num=lib.skill.clansankuang.getNum(target); + if(num==0) return att; if(_status.event.goon) return -att; return -Math.sqrt(Math.abs(att))-lib.skill.clansankuang.getNum(target); }).set('goon',Math.max.apply(Math,trigger.cards.map(i=>get.value(i)))<=5||trigger.cards.filterInD('ejod').length==0) @@ -429,7 +430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0],num=lib.skill.clansankuang.getNum(target),num2=target.countCards('he'); event.target=target; player.logSkill('clansankuang',target); - if(num2==0) event._result={bool:false}; + if(num==0||num2==0) event._result={bool:false}; else if(num2<=num) event._result={bool:true,cards:target.getCards('he')}; else target.chooseCard('he',true,[num,Infinity]).set('ai',get.unuseful); }else event.finish(); @@ -440,7 +441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayx(); } 'step 3' - if(trigger.cards.filterInD('ej').length) target.gain(trigger.cards.filterInD('ej'),get.owner(trigger.cards.filterInD('ej')[0]),'giveAuto','bySelf'); + if(trigger.cards.filterInD('ej').length) target.gain(trigger.cards.filterInD('ejod'),get.owner(trigger.cards.filterInD('ej')[0]),'giveAuto','bySelf'); else if(trigger.cards.filterInD('od').length) target.gain(trigger.cards.filterInD('od'),'gain2','bySelf'); }, ai:{ @@ -548,7 +549,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.itemtype(card)=='card'; }, position:'hes', - filterTarget:lib.filter.targetEnabled, + filterTarget:lib.filter.filterTarget, check:(card)=>6-get.value(card), log:false, precontent:function(){ diff --git a/character/extra.js b/character/extra.js index c6bcf4fe5..82e0495b3 100755 --- a/character/extra.js +++ b/character/extra.js @@ -68,6 +68,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_guanyu:['shen_guanyu','tw_shen_guanyu'], shen_sunquan:['shen_sunquan','junk_sunquan'], shen_lvmeng:['tw_shen_lvmeng','shen_lvmeng'], + shen_machao:['shen_machao','ps_shen_machao'], }, characterFilter:{ shen_diaochan:function(mode){ @@ -6907,7 +6908,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ twwuhun_info:'锁定技。①当你受到其他角色造成的1点伤害后,你令伤害来源获得1枚“梦魇”标记。②当你对有“梦魇”标记的其他角色造成伤害后,你令其获得一枚“梦魇”标记。③当你死亡时,你可进行判定。若结果不为【桃】或【桃园结义】,则你选择至少一名拥有“梦魇”标记的角色。令这些角色各自失去X点体力(X为其“梦魇”标记数)。', shen_zhangfei:'神张飞', shencai:'神裁', - shencai_info:'①出牌阶段限一次,你可以令一名其他角色进行判定。你获得此判定牌,然后若此判定牌:包含以下要素中的任意一个,则其失去已有的下列效果,并获得对应的效果:{⒈体力:当其受到伤害后,其失去等量的体力、⒉武器:其不能使用牌响应杀、⒊打出:当其失去手牌后,其再随机弃置一张手牌(不嵌套触发)、⒋距离:其的结束阶段开始时,其翻面};若均不包含,你获得其一张牌,其获得一枚“死”并获得如下效果:其的角色手牌上限-X、其的回合结束时,若X大于场上存活人数,则其死亡(X为其“死”标记数)。', + shencai_info:'①出牌阶段限一次,你可以令一名其他角色进行判定。你获得此判定牌,然后若此判定牌:包含以下要素中的任意一个,则其失去已有的下列效果,并获得对应的效果:{⒈体力:当其受到伤害后,其失去等量的体力、⒉武器:其不能使用牌响应杀、⒊打出:当其失去手牌后,其再随机弃置一张手牌(不嵌套触发)、⒋距离:其的结束阶段开始时,其翻面};若均不包含,你获得其区域里的一张牌,其获得一枚“死”并获得如下效果:其的角色手牌上限-X、其的回合结束时,若X大于场上存活人数,则其死亡(X为其“死”标记数)。', xunshi:'巡使', xunshi_info:'锁定技。①你手牌区内所有的多目标锦囊牌均视为花色为none的普【杀】。②你使用颜色为none的牌无距离和次数限制。③当你使用无颜色的牌选择目标后,你令你的〖神裁〗的发动次数上限+1(至多为5),然后可以为此牌增加任意个目标。', shen_zhangjiao:'神张角', diff --git a/character/mobile.js b/character/mobile.js index b406c3654..8bec7eab0 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -186,7 +186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']], }, characterIntro:{ - fuqian:'傅金[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅金官至关中都督。魏国攻伐蜀汉时,傅金和蒋舒防守阳安关,兵败战死。', + fuqian:'傅佥[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅佥官至关中都督。魏国攻伐蜀汉时,傅佥和蒋舒防守阳安关,兵败战死。', wangjun:'王濬(207年~286年),字士治,小名阿童,弘农郡湖县(今河南省灵宝市阌乡)人。西晋时期名将。王濬出身世家,博学多闻,容颜英俊,多谋善战。举秀才出身,起家河东郡从事。泰始八年(272年),担任广汉太守,平定益州叛乱,迁益州刺史。利用长江上游地势之利,修造战船,组建强大的水军。上书晋武帝,促成晋灭吴之战。咸宁六年(280年),率兵顺流而下,熔毁横江铁链,攻克丹阳郡,率先攻取石头城,接受吴末帝孙皓投降,完成西晋统一大业。凭借功勋,拜辅国将军、步兵校尉,册封襄阳侯。为避猜忌,纵情享受,累迁特进、抚军大将军、开府仪同三司、散骑常侍、后军将军等。太康六年十二月(286年1月18日),王濬去世,享年八十岁,谥号为“武”,安葬于柏谷山。', yangfu:'杨阜(172年—244年),字义山,汉天水冀县(今甘谷县东南)人。三国时期曹魏名臣。汉献帝建安初年,任凉州从事,旋拜安定长史;韦康任刺史后辟为别驾,改任州参军;后因讨马超有功,赐爵关内侯。曹操征汉中时,杨阜担任益州刺史,回来后又担任武都太守。魏明帝时,由将作大匠改少府。杨阜不但卓识远见,而且刚正不阿,敢于直言,对朝廷弊政多有诤谏,六次进言谏魏明帝应勤政爱民,魏明帝对他颇有敬畏之心。杨阜勤政廉洁,在宫内担任少府时,专管宝器、珍膳、衣物等,而他死后则家无馀财。皇帝让杨阜的孙子杨豹继任了少府之职。原甘谷县文昌宫西侧有杨氏家祠,内悬“两代尚书”匾额。', ruanhui:'阮氏女,是指三国时期曹魏名士许允之妻阮氏,陈留尉氏人。阮氏女是中国古代四大丑女之一,貌丑而见识非凡。她出身士族之家,是卫尉阮共(字伯彦)之女、阮侃(字德如)之妹。嫁与许允后生有二子:许奇,官至司隶校尉;许猛,官至幽州刺史。', @@ -1303,8 +1303,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, filter:function(event,player){ - return player.getStorage('sbbenxi_effect3').contains(event.card)&&event.player.hasHistory('sourceDamage',evt=>{ - return event.card==evt.card; + return player.getStorage('sbbenxi_effect3').contains(event.card)&&game.hasPlayer2(current=>{ + return current.hasHistory('damage',evt=>{ + return event.card==evt.card; + }); }); }, content:function(){ @@ -15687,7 +15689,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"phaseUseBegin", }, - locked:false, direct:true, filter:function(event,player){ var es=player.getCards('e'); @@ -15705,10 +15706,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ list.remove(player.storage.xinfu_qianchong[i]); } if(list.length>1){ - player.chooseControl(list).set('ai',function(){ + player.chooseControl(list).set('ai',function(){ return list[0]; - } - ).set('prompt',get.prompt('xinfu_qianchong')).set('prompt2',get.translation('xinfu_qianchong_info')); + }).set('prompt',get.prompt('xinfu_qianchong')).set('prompt2',get.translation('xinfu_qianchong_info')); } else event.finish(); 'step 1' @@ -15801,8 +15801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return num>0&&num<=player.hp }, - locked:true, - frequent:true, + forced:true, content:function(){ 'step 0' var num=0; @@ -17818,12 +17817,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ feiyi:['tw_feiyi','feiyi'], wangling:['tw_wangling','wangling'], qiaogong:['tw_qiaogong','qiaogong'], - sp_chendong:['tw_chendong','sp_chendong'], - sp_jiangqing:['tw_jiangqing','sp_jiangqing'], + sp_chendong:['tw_chendong','sp_chendong','chendong'], + sp_jiangqing:['tw_jiangqing','sp_jiangqing','jiangqing'], zhaotongzhaoguang:['dc_zhaotongzhaoguang','zhaotongzhaoguang'], yangbiao:['yangbiao','dc_yangbiao'], qiaozhou:['yj_qiaozhou','qiaozhou'], sunhanhua:['dc_qiaozhou','sunhanhua'], + sp_duyu:['sp_duyu','pk_sp_duyu'], + kongrong:['sp_kongrong','kongrong'], }, translate:{ liuzan:'手杀留赞', @@ -17869,7 +17870,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "qc_mingzhe":"明哲", "qc_mingzhe_info":"", "xinfu_shangjian":"尚俭", - "xinfu_shangjian_info":"锁定技。一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你可以摸等量的牌(X为你的体力值)。", + "xinfu_shangjian_info":"锁定技。一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你摸等量的牌(X为你的体力值)。", "rw_bagua_skill":"先天八卦阵", "rw_bagua_skill_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", "rw_baiyin_skill":"照月狮子盔", @@ -18626,6 +18627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ spdaoshu:'盗书', spdaoshu_info:'每轮限一次。一名敌方角色的出牌阶段开始时,若其有手牌,则你可以令其视为使用一张【酒】。其须声明一个基本牌的牌名,然后你判断其手牌区内是否有该牌名的牌。若你判断正确,则你随机获得其五张手牌,否则你不能响应其使用的牌直到回合结束。', spdaizui:'戴罪', + spdaizui2:'戴罪', spdaizui_info:'限定技。当你受到伤害值不小于体力值的伤害时,你可防止此伤害并将此伤害渠道对应的所有实体牌置于伤害来源的武将牌上,称为“释”。本回合结束时,其获得所有“释”。', re_caiwenji:'手杀蔡琰', re_bulianshi:'手杀步练师', diff --git a/character/offline.js b/character/offline.js index 0e59e6538..1b1820fe6 100644 --- a/character/offline.js +++ b/character/offline.js @@ -8,11 +8,54 @@ game.import('character',function(lib,game,ui,get,ai,_status){ offline_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei"], offline_sticker:['sp_gongsunzan','sp_simazhao','sp_wangyuanji','sp_xinxianying','sp_liuxie'], offline_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"], - offline_yongjian:["ns_chendao","yj_caoang","yj_caocao"], - offline_others:["ns_jiaxu","ns_caoanmin","jsp_liubei","longyufei"], + offline_yongjian:["ns_chendao","yj_caoang","yj_caocao",'yj_liru','yj_caohong','yj_zhangfei','yongjian_ganning','yj_dongzhuo','yj_xuyou','yj_jiaxu','yj_zhenji'], + offline_piracyE:['shen_jiaxu','pe_wangyun','pe_zhonghui','pe_sunchen','pe_mengda','pe_wenqin','ns_caoanmin','jiangfei','chendong','jiangqing','kongrong','jiling','tianfeng','mateng'], + offline_piracyS:['ns_jiaxu','longyufei','ps_guanyu','ps1059_guojia','ps2070_guojia','ps2063_zhaoyun','ps2067_zhaoyun','ps1062_zhouyu','ps2080_zhouyu','ps_caozhi','ps_jin_simayi','ps_caopi','ps_simayi','ps2068_simayi','ps_machao','ps_zhugeliang','ps2066_zhugeliang','ps_jiaxu','ps_lvbu','ps_shen_machao','jsp_liubei'], + offline_piracyK:['pk_sp_duyu'], + //offline_others:[""], }, }, character:{ + ps_shen_machao:['male','shen',4,['psshouli','pshengwu'],['qun']], + mateng:['male','qun',4,['mashu','xiongyi']], + tianfeng:['male','qun',3,['sijian','gzsuishi']], + jiling:['male','qun',4,['shuangren']], + kongrong:['male','qun',3,['zymingshi','lirang']], + chendong:['male','wu',4,['duanxie','fenming']], + jiangqing:['male','wu',4,['zyshangyi']], + jiangfei:['male','shu',3,['reshengxi','shoucheng']], + pk_sp_duyu:['male','qun',4,['pkwuku','pksanchen']], + ps_lvbu:['male','qun',4,['wushuang','pssheji']], + ps_jiaxu:['male','qun',4,['wansha','psqupo','psbaoquan']], + ps_machao:['male','shu',4,['mashu','tieji','psweihou']], + ps2066_zhugeliang:['male','shu',3,['pszhiji','psjiefeng','kongcheng']], + ps_zhugeliang:['male','shu',3,['psguanxing','pslongyin']], + ps_simayi:['male','wei',3,['reguicai','pshuxiao']], + ps2068_simayi:['male','wei',3,['refankui','reguicai','pszhonghu']], + ps_caopi:['male','wei',3,['psjianwei','fangzhu','songwei'],['zhu']], + ps_jin_simayi:['male','jin',3,['smyyingshi','psquanyi']], + ps_caozhi:['male','wei',3,['psliushang','psqibu']], + ps1062_zhouyu:['male','wu',3,['yingzi','psoldshiyin']], + ps2080_zhouyu:['male','wu',3,['psshiyin','psquwu','psliaozou']], + ps2063_zhaoyun:['male','shu',4,['psqijin','psqichu','pslongxin']], + ps2067_zhaoyun:['male','shu',4,['longdan','pshuiqiang','pshuntu']], + ps1059_guojia:['male','wei',3,['tiandu','psqizuo']], + ps2070_guojia:['male','wei',3,['yiji','psquanmou']], + ps_guanyu:['male','shu',4,['wusheng','pszhonghun','nuzhan']], + pe_wenqin:['male','wei',4,['gzjinfa']], + pe_sunchen:['male','wu',4,['zyshilu','zyxiongnve']], + pe_mengda:['male','wei',4,['qiuan','liangfan']], + pe_zhonghui:['male','wei',4,['zyquanji','zypaiyi']], + pe_wangyun:['male','qun',3,['zylianji','zymoucheng']], + shen_jiaxu:['male','shen',3,['weimu','zybishi','zyjianbing'],['qun']], + yj_zhenji:['female','wei',3,['yjluoshen','qingguo']], + yj_jiaxu:['male','wei',3,['yjzhenlve','yjjianshu','yjyongdi']], + yj_xuyou:['male','qun',3,['yjshicai','yjchenggong','yjzezhu']], + yj_dongzhuo:['male','qun',7,['yjtuicheng','yjyaoling','yjshicha','yjyongquan'],['zhu']], + yongjian_ganning:['male','wu',4,['yjjielve']], + yj_zhangfei:['male','shu',4,['yjmangji']], + yj_caohong:['male','wei',4,['yjlifeng']], + yj_liru:['male','qun',3,['yjdumou','yjweiquan','yjrenwang']], yj_caocao:['male','qun',4,['yjxiandao','yjsancai','yjyibing']], longyufei:['female','shu',3,['longyi','zhenjue']], sp_liubei:['male','shu',4,['zhaolie','shichou'],['zhu']], @@ -42,6 +85,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterIntro:{ huangjinleishi:"黄巾军中负责施法的女祭司二人组。", longyufei:'《三国杀·阵面对决》中的虚构角色,设定是由刘备之女夏侯岚、关羽之女关银屏、张飞之女张星彩三人在与吕布之魔魂战斗时,释放雅典娜的惊叹而召唤出来的精元化神。', + pk_sp_duyu:'杜预(222年-285年),字元凯,京兆郡杜陵县(今陕西西安)人,中国魏晋时期军事家、经学家、律学家,曹魏散骑常侍杜恕之子。杜预初仕曹魏,任尚书郎,后成为权臣司马昭的幕僚,封丰乐亭侯。西晋建立后,历任河南尹、安西军司、秦州刺史、度支尚书等职。咸宁四年(278年)接替羊祜出任镇南大将军,镇守荆州。他积极备战,支持晋武帝司马炎对孙吴作战,并在咸宁五年(279年)成为晋灭吴之战的统帅之一。战后因功进封当阳县侯,仍镇荆州。太康五年(285年),杜预被征入朝,拜司隶校尉,途中于邓县逝世,终年六十三岁。获赠征南大将军、开府仪同三司,谥号为成。杜预耽思经籍,博学多通,多有建树,时誉为“杜武库”。著有《春秋左氏传集解》及《春秋释例》等。为明朝之前唯一一个同时进入文庙和武庙之人。', + ps_shen_machao:'字孟起,扶风茂陵人。面如冠玉,目如流星,虎体猿臂,彪腹狼腰,声雄力猛。因衣着讲究,举止非凡,故人称“锦马超”。麾铁骑,捻金枪。', + }, + characterTitle:{ + jsp_liubei:'S1019', + ns_caoanmin:'S1023', + longyufei:'S1044', + ps1059_guojia:'S1059', + ps_lvbu:'S1061', + ps1062_zhouyu:'S1062', + ps_jiaxu:'S1066', + ps_jin_simayi:'S1067', + ps_guanyu:'S2065', + ps2063_zhaoyun:'S2063', + ps2066_zhugeliang:'S2066', + ps2067_zhaoyun:'S2067', + ps2068_simayi:'S2068', + ps_machao:'S2069', + ps2070_guojia:'S2070', + ps_simayi:'S2073', + ps_zhugeliang:'S2073', + ps_caopi:'S2075', + ns_jiaxu:'S2079', + ps2080_zhouyu:'S2080', + ps_caozhi:'S2081', + ps_shen_machao:'SX015', }, perfectPair:{}, card:{ @@ -64,6 +133,3212 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //官盗S特015神马超 + psshouli:{ + audio:'shouli', + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + if(player!=_status.currentPhase&&(name=='sha'||name=='shan')) return true; + }, + filter:function(event,player){ + if(event.responded||event.psshouli||event.type=='wuxie') return false; + if(game.hasPlayer(function(current){ + return current.getEquip(4); + })&&event.filterCard({ + name:'sha', + storage:{psshouli:true}, + },player,event)) return true; + if(game.hasPlayer(function(current){ + return current.getEquip(3); + })&&event.filterCard({ + name:'shan', + storage:{psshouli:true}, + },player,event)) return true; + return false; + }, + delay:false, + locked:true, + filterTarget:function(card,player,target){ + var event=_status.event,evt=event; + if(event._backup) evt=event._backup; + var equip3=target.getEquip(3); + var equip4=target.getEquip(4); + if(equip3&&evt.filterCard(get.autoViewAs({ + name:'shan', + storage:{psshouli:true}, + },[equip3]),player,event)) return true; + var sha=get.autoViewAs({ + name:'sha', + storage:{psshouli:true}, + },[equip4]); + if(equip4&&evt.filterCard(sha,player,event)){ + if(!evt.filterTarget) return true; + return game.hasPlayer(function(current){ + return evt.filterTarget(sha,player,current); + }) + }; + return false; + }, + prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出', + content:function(){ + 'step 0' + var evt=event.getParent(2); + evt.set('psshouli',true); + var list=[]; + var equip3=target.getEquip(3); + var equip4=target.getEquip(4); + var backupx=_status.event; + _status.event=evt; + try{ + if(equip3){ + var shan=get.autoViewAs({ + name:'shan', + storage:{psshouli:true}, + },[equip3]); + if(evt.filterCard(shan,player,event)) list.push('shan'); + } + if(equip4){ + var sha=get.autoViewAs({ + name:'sha', + storage:{psshouli:true}, + },[equip4]); + if(evt.filterCard(sha,player,evt)&&(!evt.filterTarget||game.hasPlayer(function(current){ + return evt.filterTarget(sha,player,current); + }))) list.push('sha'); + }; + }catch(e){game.print(e)}; + _status.event=backupx; + if(list.length==1) event._result={ + bool:true, + links:[list[0]=='shan'?equip3:equip4], + } + else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){ + var type=get.subtype(button.link); + return type=='equip3'||type=='equip4'; + }); + 'step 1' + var evt=event.getParent(2); + if(result.bool&&result.links&&result.links.length){ + var name=get.subtype(result.links[0])=='equip3'?'shan':'sha'; + if(evt.name=='chooseToUse'){ + game.broadcastAll(function(result,name){ + lib.skill.psshouli_backup.viewAs={ + name:name, + cards:[result], + storage:{psshouli:true}, + }; + lib.skill.psshouli_backup.prompt=('选择'+get.translation(name)+'('+get.translation(result)+')的目标'); + },result.links[0],name); + evt.set('_backupevent','psshouli_backup'); + evt.backup('psshouli_backup'); + evt.set('openskilldialog','选择'+get.translation(name)+'('+get.translation(result.links[0])+')的目标'); + evt.set('norestore',true); + evt.set('custom',{ + add:{}, + replace:{window:function(){}} + }); + } + else{ + delete evt.result.skill; + delete evt.result.used; + evt.result.card=get.autoViewAs({ + name:name, + cards:[result], + storage:{psshouli:true}, + },result.links); + evt.result.cards=[result.links[0]]; + target.$give(result.links[0],player,false); + if(player!=target) target.addTempSkill('fengyin'); + target.addTempSkill('psshouli_thunder'); + player.addTempSkill('psshouli_thunder'); + evt.redo(); + return; + } + } + evt.goto(0); + }, + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + var subtype=(tag=='respondSha'?'equip4':'equip3'); + return game.hasPlayer(function(current){ + return current.getEquip(subtype); + }); + }, + order:2, + result:{ + player:function(player,target){ + var att=Math.max(8,get.attitude(player,target)); + if(_status.event.type!='phase') return 9-att; + if(!player.hasValueTarget({name:'sha'})) return 0; + return 9-att; + }, + }, + }, + group:'psshouli_init', + subSkill:{ + thunder:{ + charlotte:true, + trigger:{player:'damageBegin1'}, + forced:true, + mark:true, + content:function(){ + trigger.num++; + trigger.nature='thunder'; + }, + marktext:'⚡', + intro:{ + content:'受到的伤害+1且改为雷属性', + }, + }, + init:{ + audio:'shouli', + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + filter:function(event,player){ + return event.name!='phase'||game.phaseNumber==0; + }, + logTarget:()=>game.filterPlayer(), + equips:[ + ['heart',5,'chitu'], + ['diamond',13,'zixin'], + ['spade',5,'jueying'], + ['diamond',13,'hualiu'], + ['club',5,'dilu'], + ['spade',13,'dawan'], + ['heart',13,'zhuahuang'], + ['heart',3,'jingfanma'] + ], + content:function(){ + 'step 0' + event.targets=game.filterPlayer().sortBySeat(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||player); + event.target=event.targets.shift(); + game.delayx(); + 'step 1' + player.line(target,'green'); + target.chooseToUse('狩骊:使用一张坐骑牌并摸一张牌,或使用一张坐骑牌指示物',function(card,player,event){ + if(get.subtype(card)!='equip3'&&get.subtype(card)!='equip4'&&get.subtype(card)!='equip6') return false; + return lib.filter.filterCard.apply(this,arguments); + }).set('ai',()=>1); + 'step 2' + if(result.bool) target.draw(); + else{ + var cardx=lib.skill.psshouli_init.equips.randomRemove(); + if(!cardx) return; + cardx={ + suit:cardx[0], + number:cardx[1], + name:cardx[2], + } + var card=game.createCard(cardx); + if(!_status.psshouli_equips) _status.psshouli_equips=[]; + _status.psshouli_equips.push(card.cardid); + if(card){ + target.chooseUseTarget(card,true,'nopopup','noanimate'); + player.addSkill('psshouli_remove'); + } + } + 'step 3' + event.target=event.targets.shift(); + if(event.target){ + event.goto(1); + } + }, + }, + remove:{ + trigger:{ + global:['loseAfter','loseAsyncAfter','cardsDiscardAfter','equipAfter'], + }, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + forceDie:true, + filter:function(event,player){ + if(!_status.psshouli_equips||!_status.psshouli_equips.length) return false; + var cards=event.getd(); + return cards.filter(i=>_status.psshouli_equips.contains(i.cardid)).length; + }, + content:function(){ + var cards=trigger.getd(),remove=[]; + for(var card of cards){ + if(_status.psshouli_equips.contains(card.cardid)){ + _status.psshouli_equips.remove(card.cardid); + remove.push(card); + } + } + if(remove.length){ + game.cardsGotoSpecial(remove); + lib.skill.psshouli_init.equips.addArray(remove.map(i=>[i.suit,i.number,i.name])); + game.log('坐骑指示物',remove,'被移出了游戏'); + } + }, + } + }, + }, + psshouli_backup:{ + sourceSkill:'psshouli', + precontent:function(){ + 'step 0' + delete event.result.skill; + event.result._apply_args={'throw':false}; + var cards=event.result.card.cards; + event.result.cards=cards; + var owner=get.owner(cards[0]); + event.target=owner; + owner.$throw(cards[0]); + player.popup(event.result.card.name,'metal'); + game.delayx(); + event.getParent().addCount=false; + 'step 1' + if(player!=target) target.addTempSkill('fengyin'); + target.addTempSkill('psshouli_thunder'); + player.addTempSkill('psshouli_thunder'); + }, + filterCard:function(){return false}, + prompt:'请选择【杀】的目标', + selectCard:-1, + }, + pshengwu:{ + audio:'hengwu', + trigger:{player:['useCard','respond']}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(event.card)==get.suit(cardx))); + }, + content:function(){ + 'step 0' + var suit=get.suit(trigger.card); + var prompt2='弃置任意张'+get.translation(suit)+'手牌,然后摸X张牌(X为你弃置的牌数+'+game.filterPlayer().map(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(trigger.card)==get.suit(cardx))).reduce((p,c)=>p+c)+')'; + player.chooseToDiscard('h',[1,player.countCards('h',{suit:suit})],{suit:suit}).set('prompt',get.prompt('pshengwu')).set('prompt2',prompt2).set('ai',card=>{ + var player=_status.event.player; + if(_status.event.goon) return 12-get.value(card); + if(player.countCards('h')>50) return 0; + if(player==_status.currentPhase){ + if(['shan','caochuan','tao','wuxie'].contains(card.name)) return 8-get.value(card); + return 6-get.value(card); + } + return 5.5-get.value(card); + }).set('goon',player.countCards('h',{suit:suit})==1).set('logSkill','pshengwu'); + 'step 1' + if(result.bool){ + var num=result.cards.length; + player.draw(num+game.filterPlayer().map(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(trigger.card)==get.suit(cardx))).reduce((p,c)=>p+c)); + } + }, + ai:{ + threaten:100, + reverseEquip:true, + } + }, + //战役篇田丰 + gzsuishi:{ + audio:'suishi', + preHidden:['gzsuishi2'], + trigger:{global:'dying'}, + forced:true, + //priority:6.5, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source.isFriendOf(player); + }, + content:function(){ + player.draw(); + }, + group:'gzsuishi2' + }, + gzsuishi2:{ + audio:'suishi', + trigger:{global:'dieAfter'}, + forced:true, + check:function(){return false}, + filter:function(event,player){ + return event.player.isFriendOf(player); + }, + content:function(){ + player.loseHp(); + } + }, + //战役篇孔融 + zymingshi:{ + audio:'mingshi', + forced:true, + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + if(!player.isEmpty(2)) return false; + if(event.card.name!='sha') return false; + return event.nature; + }, + content:function(){ + trigger.cancel(); + } + }, + //战役篇蒋钦 + zyshangyi:{ + audio:'shangyi', + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + 'step 0' + target.viewHandcards(player); + 'step 1' + if(!target.countCards('h')) event.finish(); + else player.chooseCardButton(target,target.getCards('h')); + 'step 2' + if(result.bool){ + target.discard(result.links[0]); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + return -target.countCards('h'); + } + }, + threaten:1.1 + }, + }, + //官盗K系列杜预 + pkwuku:{ + audio:'spwuku', + trigger:{global:'useCard'}, + forced:true, + preHidden:true, + filter:function(event,player){ + if(get.type(event.card)!='equip') return false; + var gz=get.mode()=='guozhan'; + if(gz&&event.player.isFriendOf(player)) return false; + return player.countMark('pkwuku')<(gz?2:3); + }, + content:function(){ + player.addMark('pkwuku',1); + }, + marktext:'库', + intro:{ + content:'mark', + }, + ai:{ + combo:'pksanchen', + threaten:3.6, + }, + }, + pksanchen:{ + audio:'spsanchen', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return player.countMark('pkwuku')>2; + }, + content:function(){ + player.awakenSkill('pksanchen'); + player.gainMaxHp(); + player.recover(); + player.addSkillLog('pkmiewu'); + }, + ai:{ + combo:'wuku', + }, + derivation:'pkmiewu', + }, + pkmiewu:{ + audio:'spmiewu', + enable:['chooseToUse','chooseToRespond'], + filter:function(event,player){ + if(!player.countMark('pkwuku')||player.hasSkill('pkmiewu2')) return false; + for(var i of lib.inpile){ + var type=get.type(i); + if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;ifalse, + selectCard:-1, + popname:true, + viewAs:{name:links[0][2],nature:links[0][3]}, + precontent:function(){ + player.addTempSkill('pkmiewu2'); + player.removeMark('pkwuku',1); + }, + } + }, + prompt:function(links,player){ + return '视为使用'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'并摸一张牌'; + } + }, + hiddenCard:function(player,name){ + if(!lib.inpile.contains(name)) return false; + var type=get.type(name); + return (type=='basic'||type=='trick')&&player.countMark('pkwuku')>0&&!player.hasSkill('pkmiewu2'); + }, + ai:{ + combo:'pkwuku', + fireAttack:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player){ + if(!player.countMark('pkwuku')||player.hasSkill('pkmiewu2')) return false; + }, + order:1, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + }, + }, + }, + }, + pkmiewu2:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + charlotte:true, + popup:false, + filter:function(event,player){ + return event.skill=='pkmiewu_backup'; + }, + content:function(){ + player.draw(); + }, + }, + pkmiewu_backup:{audio:'pkmiewu'}, + //官盗S系列关羽 + pszhonghun:{ + audio:'zhongyi', + trigger:{player:['useCard','respond']}, + filter:function(event,player){ + return get.color(event.card)=='red'; + }, + frequent:true, + content:function(){ + 'step 0' + var card=game.cardsGotoOrdering(get.cards()).cards[0]; + event.card=card; + game.updateRoundNumber(); + player.showCards(card,get.translation(player)+'发动了【忠魂】'); + 'step 1' + if(get.color(card)=='red') player.gain(card,'gain2'); + } + }, + //官盗S系列郭嘉·一版 + psqizuo:{ + audio:2, + trigger:{global:['damageBegin1','damageBegin3']}, + filter:function(event,player,name){ + return name=='damageBegin1'&&player.inRange(event.source)||name=='damageBegin3'&&player.inRange(event.player); + }, + direct:true, + content:function(){ + 'step 0' + var name=event.triggername; + var source=get.translation(trigger.source),target=get.translation(trigger.player),num=trigger.num; + var targetx=trigger[name=='damageBegin1'?'source':'player']; + var str=name=='damageBegin1'?(source+'即将对'+target+'造成'+num+'点伤害'):(target+'即将受到'+source+'造成的'+num+'点伤害'); + player.chooseToDiscard(get.prompt('psqizuo',targetx),str+',是否弃置一张牌并判定,若结果颜色与此牌相同,你可以令此伤害+1或-1?','he').set('ai',card=>{ + if(_status.event.goon) return 5.25-get.value(card)+(get.color(card)==get.color(_status.pileTop)?0.75:0); + return 0; + }).set('goon',function(){ + var eff=get.damageEffect(trigger.player,trigger.source,player); + if(eff>5&&!trigger.player.hasSkillTag('filterDamage',null,{ + player:player, + card:trigger.card, + })) return true; + if(eff<-5) return true; + return false; + }()).set('logSkill',['psqizuo',targetx]); + 'step 1' + if(result.bool){ + event.color=get.color(result.cards[0],player); + player.judge(function(card){ + if(get.color(card)==_status.event.getParent('psqizuo').color) return 1; + return 0; + }); + } + else event.finish(); + 'step 2' + if(result.bool){ + player.chooseControl('+1','-1','cancel2').set('prompt','是否令此伤害+1或-1?').set('ai',()=>{ + if(_status.event.eff<0) return 1; + return 0; + }).set('eff',get.damageEffect(trigger.player,trigger.source,player)); + } + else event.finish(); + 'step 3' + if(result.index==0){ + trigger.num++; + player.popup(' +1 ','fire'); + game.log(player,'令此伤害+1'); + } + if(result.index==1){ + trigger.num--; + player.popup(' -1 ','water'); + game.log(player,'令此伤害-1'); + } + }, + ai:{ + threaten:0.8 + } + }, + //官盗S系列郭嘉·二版 + psquanmou:{ + audio:2, + trigger:{ + global:'useCardAfter', + }, + direct:true, + filter:function(event,player){ + return get.type2(event.card)=='trick'&&event.player!=player&&event.targets&&event.targets.contains(player)&&event.cards.filterInD('odj').length&&player.countCards('h'); + }, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt('psquanmou'),'弃置一张'+get.translation(get.color(trigger.card))+'手牌,获得'+get.translation(trigger.cards),'h',(card,player)=>{ + return get.color(card)==_status.event.color; + }).set('ai',card=>{ + return _status.event.value-get.value(card); + }).set('logSkill','psquanmou').set('value',get.value(trigger.cards,player)).set('color',get.color(trigger.card)); + 'step 1' + if(result.bool){ + var cards=trigger.cards.filterInD('odj'); + if(cards.filterInD('od').length) player.gain(cards.filterInD('od'),'gain2'); + if(cards.filterInD('j').length) player.gain(cards.filterInD('j'),get.owner(cards.filterInD('j')[0]),'give'); + } + } + }, + //官盗S赵云·一版 + pshuiqiang:{ + audio:2, + trigger:{player:['shaMiss','eventNeutralized']}, + direct:true, + filter:function(event,player){ + if(!event.card||event.card.name!='sha') return false; + return event.target.isIn()&&player.canUse('sha',event.target,false)&&(player.hasSha()||_status.connectMode&&player.countCards('h')); + }, + content:function(){ + "step 0" + player.chooseToUse(get.prompt2('pshuiqiang',trigger.target),function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },trigger.target,-1).set('addCount',false).logSkill='pshuiqiang'; + } + }, + pshuntu:{ + audio:2, + trigger:{source:'damageSource'}, + usable:1, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent(2).player==player&&event.notLink()&&player.isPhaseUsing(); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToUse(get.prompt2('pshuntu',trigger.player),function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },trigger.player,-1).set('addCount',false).logSkill='pshuntu'; + 'step 1' + if(!result.bool) player.storage.counttrigger.pshuntu--; + } + }, + //官盗S赵云·二版 + psqijin:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + 'step 0' + trigger.changeToZero(); + event.cards=get.cards(7); + game.cardsGotoOrdering(event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str='七进'; + if(player==game.me&&!_status.auto) str+=':获得一种颜色的所有牌'; + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['七进',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + 'step 1' + var list=[]; + for(var i of cards) list.add(get.color(i,false)); + list.sort(); + var next=player.chooseControl(list); + next.set('ai',function(){ + return _status.event.choice; + }).set('choice',function(){ + if(list.length==0) return list[0]; + var color=list[0]; + var cards1=cards.filter(i=>get.color(i)==color),cards2=cards.filter(i=>get.color(i)==list[1]); + if(get.value(cards1)*cards1.length>get.value(cards2)*cards2.length) return list[0]; + return list[1]; + }()); + 'step 2' + event.color=result.control; + var time=1000-(get.utc()-event.time); + if(time>0) game.delay(0,time); + 'step 3' + game.broadcastAll('closeDialog',event.videoId); + player.gain(cards.filter(i=>get.color(i,false)==event.color),'gain2'); + }, + ai:{ + threaten:1.5 + } + }, + psqichu:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + if(player!=_status.currentPhase&&!player.hasSkill('psqichu_used')&&get.type(name)=='basic'&&lib.inpile.contains(name)) return true; + }, + filter:function(event,player){ + if(event.responded||player==_status.currentPhase||player.hasSkill('psqichu_used')) return false; + for(var i of lib.inpile){ + if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)) return true; + } + return false; + }, + delay:false, + content:function(){ + 'step 0' + player.addTempSkill('psqichu_used'); + var evt=event.getParent(2); + var cards=get.cards(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){ + return _status.event.cards.contains(button.link); + }).set('cards',cards.filter(function(card){ + if(get.type(card)!='basic') return false; + 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); + } + 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 name=result.links[0].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.psqichu_backup.viewAs={name:name,cards:[result],isCard:true}; + lib.skill.psqichu_backup.prompt='选择'+get.translation(result)+'的目标'; + },result.links[0],name); + evt.set('_backupevent','psqichu_backup'); + evt.backup('psqichu_backup'); + } + 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.redo(); + return; + } + } + evt.goto(0); + }, + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(target.hasSkill('psqichu_used')) return; + 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); + return 1; + } + } + }, + subSkill:{ + backup:{ + precontent:function(){ + 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; + }, + filterCard:function(){return false}, + selectCard:-1, + }, + used:{charlotte:true}, + } + }, + pslongxin:{ + audio:2, + trigger:{player:'phaseJudgeBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('j')&&player.countCards('h'); + }, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt2('pslongxin'),{type:'equip'},'he').set('logSkill','pslongxin').set('ai',card=>{ + if(_status.event.goon) return 15-get.value(card); + return 0; + }).set('goon',player.hasCard(card=>{ + var cardj=card.viewAs?{name:card.viewAs}:card; + return get.effect(player,cardj,player,player)<0; + },'j')); + 'step 1' + if(result.bool){ + player.discardPlayerCard(player,'j',true); + } + }, + }, + //官盗S周瑜·一版 + psoldshiyin:{ + audio:2, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, + frequent:true, + filter:function(event,player){ + if(player!=_status.currentPhase) return false; + return event.getg(player).filter(i=>get.owner(i)==player).length>0; + }, + content:function(){ + 'step 0' + player.showCards(trigger.getg(player).filter(i=>get.owner(i)==player),get.translation(player)+'发动了【识音】'); + 'step 1' + var suits=[],cards=trigger.getg(player).filter(i=>get.owner(i)==player); + for(var card of cards) suits.add(get.suit(card,player)); + player.addTempSkill('psoldshiyin_effect'); + if(!player.storage.psoldshiyin_effect) player.storage.psoldshiyin_effect=0; + player.storage.psoldshiyin_effect=Math.max(player.storage.psoldshiyin_effect,suits.length); + if(suits.length>=2) player.addMark('psoldshiyin_damage',1,false); + }, + subSkill:{ + effect:{ + trigger:{player:'useCard'}, + charlotte:true, + forced:true, + onremove:['psoldshiyin_effect','psoldshiyin_damage'], + content:function(){ + var num=player.countMark('psoldshiyin_effect'); + if(num>=1) trigger.directHit.addArray(game.players); + if(num>=2&&get.tag(trigger.card,'damage')) trigger.baseDamage+=player.countMark('psoldshiyin_damage'); + if(num>=3) player.draw(); + player.removeSkill('psoldshiyin_effect'); + }, + mod:{ + aiOrder:function(player,card,num){ + var numx=player.countMark('psoldshiyin_effect'); + if(numx>=2&&get.tag(card,'damage')) return num+10; + }, + } + } + } + }, + //官盗S周瑜·二版 + psshiyin:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + locked:false, + direct:true, + group:'psshiyin_change', + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt('psshiyin'),'将一张手牌置于武将牌上,称为“杂音”牌').set('ai',card=>20-get.value(card)); + 'step 1' + if(result.bool){ + player.logSkill('psshiyin'); + player.addToExpansion(result.cards,player,'give').gaintag.add('psshiyin'); + } + }, + marktext:'音', + intro:{ + name:'杂音', + name2:'杂音', + content:'expansion', + markcount:'expansion', + }, + subSkill:{ + change:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.getExpansions('psshiyin').length&&player.countCards('h'); + }, + content:function(){ + 'step 0' + var card=player.getExpansions('psshiyin')[0]; + player.chooseCard(get.prompt('psshiyin'),'用一张手牌替换“杂音”牌('+get.translation(card)+')').set('ai',card=>{ + if(_status.event.suit&&get.suit(card)==_status.event.suit) return 8-get.value(card); + return 0; + }).set('suit',function(){ + var suits=lib.suit.slice().map(i=>[i,(get.suit(card)==i?1:0)+player.countCards('h',{suit:i})]).filter(i=>i[1]>0); + suits.sort((a,b)=>a[1]-b[1]); + if(suits.length>0) return suits[0][0]; + return null; + }()); + 'step 1' + if(result.bool){ + player.logSkill('psshiyin'); + player.addToExpansion(result.cards[0],'give',player).gaintag.add('psshiyin'); + var card=player.getExpansions('psshiyin')[0]; + if(card) player.gain(card,'gain2'); + }; + }, + } + } + }, + psquwu:{ + audio:2, + forced:true, + trigger:{target:'useCardToBefore'}, + filter:function(event,player){ + return player.getExpansions('psshiyin').length&&get.suit(player.getExpansions('psshiyin')[0])==get.suit(event.card); + }, + content:function(){ + trigger.cancel(); + }, + ai:{ + threaten:1.1, + combo:'psshiyin', + effect:{ + target:function(card,player,target,current){ + var list=target.getExpansions('psshiyin'); + for(var cardx of list){ + if(get.suit(cardx)==get.suit(card)) return 'zeroplayertarget'; + } + }, + } + }, + mod:{ + cardEnabled2:function(card,player){ + var list=player.getExpansions('psshiyin'); + for(var cardx of list){ + if(get.suit(cardx)==get.suit(card)) return false; + } + }, + cardRespondable:function(card,player){ + var list=player.getExpansions('psshiyin'); + for(var cardx of list){ + if(get.suit(cardx)==get.suit(card)) return false; + } + }, + cardSavable:function(card,player){ + var list=player.getExpansions('psshiyin'); + for(var cardx of list){ + if(get.suit(cardx)==get.suit(card)) return false; + } + }, + } + }, + psliaozou:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('psliaozou_blocker',null,null,false); + }, + content:function(){ + 'step 0' + player.showHandcards(get.translation(player)+'发动了【聊奏】'); + 'step 1' + var cards=player.getExpansions('psshiyin'),bool=true; + for(var card of cards){ + var suit=get.suit(card); + if(player.hasCard(cardx=>get.suit(cardx)==suit)){ + bool=false; break; + } + } + if(bool) player.draw(); + else player.addTempSkill('psliaozou_blocker',{player:['useCard1','useSkillBegin','phaseUseEnd']}); + }, + subSkill:{ + blocker:{charlotte:true} + }, + mod:{ + aiValue:function(player,card,num){ + var suit=get.suit(card); + if(player.isPhaseUsing()&&player.getExpansions('psshiyin').some(i=>get.suit(i)==suit)) return num/5; + }, + aiUseful:function(){ + return lib.skill.psliaozou.mod.aiValue.apply(this,arguments); + }, + }, + ai:{ + order:9.9, + result:{ + player:function(player){ + var cards=player.getExpansions('psshiyin'),bool=true; + for(var card of cards){ + var suit=get.suit(card); + if(player.hasCard(cardx=>get.suit(cardx)==suit)) return 0; + } + return 1; + } + } + } + }, + //官盗S武将传晋司马 + psquanyi:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + group:'psquanyi_tianbian', + content:function(){ + 'step 0' + player.chooseToCompare(target,function(card){ + if(typeof card=='string'&&lib.skill[card]){ + var ais=lib.skill[card].check||function(){return 0}; + return ais(); + } + var player=get.owner(card); + var getn=function(card){ + if(player.hasSkill('tianbian')&&get.suit(card)=='heart') return 13; + return get.number(card); + } + var event=_status.event.getParent(); + var to=(player==event.player?event.target:event.player); + var addi=(get.value(card)>=8&&get.type(card)!='equip')?-6:0; + if(card.name=='du') addi-=5; + if(get.color(card)=='black') addi-=6; + if(player==event.player){ + if(Boolean(event.small)){ + return -getn(card)-get.value(card)/2+addi; + } + return getn(card)-get.value(card)/2+addi; + } + else{ + if((get.attitude(player,to)<=0)==Boolean(event.small)){ + return -getn(card)-get.value(card)/2+addi; + } + return getn(card)-get.value(card)/2+addi; + } + }); + 'step 1' + if(result.tie) event.finish(); + else{ + var targets=[player,target]; + if(!result.bool) targets.reverse(); + var suits=[result.player,result.target].map(i=>get.suit(i,false)); + event.targets=targets; + event.suits=suits; + } + 'step 2' + if(event.suits.contains('heart')){ + if(targets[1].countGainableCards('hej',targets[0])>0){ + targets[0].gainPlayerCard(targets[1],'hej',true); + } + } + 'step 3' + if(event.suits.contains('diamond')){ + targets[1].damage(targets[0]); + } + 'step 4' + if(event.suits.contains('spade')){ + targets[0].loseHp(); + } + 'step 5' + if(event.suits.contains('club')){ + if(targets[0].countDiscardableCards(targets[0],'he')){ + targets[0].chooseToDiscard(2,true,'he'); + } + } + }, + ai:{ + order:6, + result:{ + target:-1 + } + }, + subSkill:{ + tianbian:{ + audio:'psquanyi', + enable:'chooseCard', + check:function(event){ + var player=_status.event.player; + if(player.hasSkill('smyyingshi')){ + var card=ui.cardPile.childNodes[0]; + if(get.color(card)=='black'&&get.number(card)<=4||get.color(card)=='red'&&get.number(card)>=11) return 20; + } + return (!player.hasCard(function(card){ + var val=get.value(card); + return val<0||(get.color(card)=='black'&&val<=4||get.color(card)=='red'&&get.number(card)>=11); + },'h'))?20:0; + }, + filter:function(event){ + return event.type=='compare'&&!event.directresult; + }, + onCompare:function(player){ + return game.cardsGotoOrdering(get.cards()).cards; + }, + } + } + }, + //官盗S曹植 + psliushang:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + group:'psliushang_give', + content:function(){ + 'step 0' + trigger.changeToZero(); + player.draw(1+Math.max(3,game.countPlayer())); + event.targets=game.filterPlayer(i=>i!=player); + 'step 1' + var current=targets.shift(); + if(!player.countCards('h')) event.finish(); + else player.chooseCardTarget({ + prompt:'流殇:将一张牌置于'+get.translation(current)+'武将牌上', + current:current, + filterCard:true, + forced:true, + filterTarget:function(card,player,target){ + return target==_status.event.current; + }, + selectTarget:-1, + ai1:function(card){ + var current=_status.event.current; + return get.value(card,current)*get.attitude(_status.event.player,current); + }, + ai2:()=>1 + }); + 'step 2' + if(result.bool){ + result.targets[0].addToExpansion(result.cards,player,'give').gaintag.add('psliushang'); + } + if(targets.length) event.goto(1); + }, + marktext:'殇', + intro:{ + content:'expansion', + markcount:'expansion', + }, + subSkill:{ + give:{ + trigger:{global:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return event.player!=player&&event.player.getExpansions('psliushang').length; + }, + forced:true, + logTarget:'player', + content:function(){ + 'step 0' + var cards=trigger.player.getExpansions('psliushang'),name=get.translation(cards); + event.cards=cards; + trigger.player.chooseControl().set('choiceList',[ + '获得'+name+',且于本回合防止对'+get.translation(player)+'的伤害', + '将'+name+'置入弃牌堆' + ]).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(get.damageEffect(player,trigger.player,trigger.player)<=0) return 0; + if(get.value(cards,trigger.player)<0) return 1; + if(trigger.player.hasCard(card=>{ + return get.tag(card,'damage')&&trigger.player.canUse(card,player)&&get.effect(player,card,trigger.player,trigger.player)>0; + },'hs')) return 1; + return 0; + }()); + 'step 1' + if(result.index==0){ + trigger.player.gain(cards,'gain2'); + trigger.player.addTempSkill('psliushang_prevent'); + trigger.player.markAuto('psliushang_prevent',[player]); + } + else{ + trigger.player.loseToDiscardpile(cards); + } + 'step 2' + game.delayx(); + } + }, + prevent:{ + trigger:{source:'damageBegin2'}, + filter:function(event,player){ + return player.getStorage('psliushang_prevent').contains(event.player); + }, + forced:true, + onremove:true, + charlotte:true, + logTarget:'player', + content:function(){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(player.getStorage('psliushang_prevent').contains(target)&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + }, + }, + } + } + } + }, + psqibu:{ + trigger:{player:'dying'}, + filter:function(event,player){ + return player.hp<=0; + }, + limited:true, + skillAnimation:true, + animationColor:'water', + content:function(){ + 'step 0' + player.awakenSkill('psqibu'); + var cards=game.cardsGotoOrdering(get.cards(7)).cards; + game.updateRoundNumber(); + event.cards=cards; + player.showCards(cards,get.translation(player)+'发动了【流殇】'); + 'step 1' + var num=cards.filter(i=>get.suit(i)=='heart').length; + var gains=cards.filter(i=>get.suit(i)=='club'); + if(num>0) player.recover(num); + if(gains.length) player.gain(gains,'gain2'); + } + }, + //官盗S曹丕 + psjianwei:{ + audio:2, + trigger:{player:'phaseBegin'}, + skillAnimation:true, + animationColor:'water', + limited:true, + direct:true, + filter:function(event,player){ + return player.hp>=1; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('psjianwei'),lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + if(player.hp==1&&!player.canSave(player)) return 0; + var sgn=get.sgnAttitude(player,target); + var valMine=[0,0],valHis=[0,0]; + player.getCards('hej',card=>{ + if(get.position(card)=='j'){ + valMine[0]+=get.effect(player,card,player); + valMine[1]+=get.effect(target,card,player); + } + else{ + valMine[0]+=get.value(card,player); + valMine[1]+=get.value(card,target)*sgn; + } + }); + target.getCards('hej',card=>{ + if(get.position(card)=='j'){ + valHis[0]+=get.effect(player,card,player); + valHis[1]+=get.effect(target,card,player); + } + else{ + valHis[0]+=get.value(card,player); + valHis[1]+=get.value(card,target)*sgn; + } + }); + return valMine[1]-valMine[0]+valHis[0]-valHis[1]>=60; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('psjianwei',target); + player.awakenSkill('psjianwei'); + player.loseHp(); + } + else event.finish(); + 'step 2' + if(player.isIn()&&target.isIn()){ + var next=game.createEvent('psjianwei_swap'); + next.player=player; + next.target=target; + next.set('cards1',player.getCards('hej')); + next.set('cards2',target.getCards('hej')); + next.setContent(lib.skill.psjianwei.swapRegioncards); + } + }, + swapRegioncards:function(){ + 'step 0' + player.$giveAuto(event.cards1,target); + target.$giveAuto(event.cards2,player); + 'step 1' + event.h1=event.cards1.filter(i=>get.position(i)=='h'); + event.e1=event.cards1.filter(i=>get.position(i)=='e'); + event.j1=event.cards1.filter(i=>get.position(i)=='j'); + event.h2=event.cards2.filter(i=>get.position(i)=='h'); + event.e2=event.cards2.filter(i=>get.position(i)=='e'); + event.j2=event.cards2.filter(i=>get.position(i)=='j'); + game.loseAsync({ + lose_list:[ + [player,event.cards1], + [target,event.cards2] + ] + }).setContent('chooseToCompareLose'); + 'step 2' + var todis=[]; + for(var i=0;iget.position(i,true)=='o')], + [target,event.h1.filter(i=>get.position(i,true)=='o')] + ], + }).setContent('gaincardMultiple'); + for(var i=0;i0&&!player.hasSkill('pslongyin_used'); + }, + ai:{ + fireAttack:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('hse')||player.hasSkill('pslongyin_used')) return false; + }, + order:1, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + }, + }, + }, + subSkill:{ + used:{charlotte:true} + } + }, + //官盗S武将传诸葛亮 + pszhiji:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(!ui.selected.targets.length) return true; + return target.group!=ui.selected.targets[0].group; + }, + selectTarget:2, + complexTarget:true, + multitarget:true, + multiline:true, + filterCard:true, + selectCard:2, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + targets.sortBySeat(); + if(targets[0].canUse('sha',targets[1],false)) targets[0].useCard({name:'sha',isCard:true},targets[1],false,'noai'); + 'step 1' + if(targets[1].canUse('sha',targets[0],false)) targets[1].useCard({name:'sha',isCard:true},targets[0],false,'noai'); + }, + ai:{ + order:2.5, + result:{ + player:1, + target:function(player,target){ + if(ui.selected.targets.length){ + var targetx=ui.selected.targets[0]; + if(get.effect(targetx,{name:'sha'},target,player)+get.effect(target,{name:'sha'},targetx,player)<0) return 0; + return -1; + } + return -1; + } + } + } + }, + psjiefeng:{ + audio:2, + enable:'phaseUse', + filterCard:true, + selectCard:2, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + var cards=game.cardsGotoOrdering(get.cards(5)).cards; + event.cards=cards; + player.showCards(cards,get.translation(player)+'发动了【借风】'); + 'step 1' + if(cards.filter(i=>get.color(i)=='red').length>=2){ + player.chooseUseTarget('wanjian',true); + } + }, + ai:{ + order:9, + result:{ + player:function(player){ + if(player.getUseValue({name:'wanjian'})<0) return 0; + return 1; + } + } + } + }, + //官盗S马超 + psweihou:{ + trigger:{player:'judgeBegin'}, + filter:function(event,player){ + return !event.directresult; + }, + content:function(){ + 'step 0' + var cards=get.cards(2); + for(var i=cards.length-1;i>=0;i--){ + ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); + } + game.updateRoundNumber(); + event.cards=cards; + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto) str='威侯:选择一张作为本次判定结果'; + else str=get.translation(player)+'发动了【威侯】'; + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + game.addVideo('showCards',player,['威侯',get.cardsInfo(event.cards)]); + if(!event.isMine()&&!event.isOnline()) game.delayx(); + 'step 1' + player.chooseButton(['威侯:选择一张作为本次判定结果',cards],true).set('ai',button=>{ + return _status.event.getTrigger().judge(button.link); + }).set('dialog',event.videoId); + 'step 2' + game.broadcastAll('closeDialog',event.videoId); + if(result.bool){ + trigger.directresult=result.links[0]; + game.cardsDiscard(cards.removeArray(result.links).filter(i=>get.position(i)=='c')); + } + 'step 3' + game.updateRoundNumber(); + } + }, + //官盗S1066☆贾诩 + psqupo:{ + audio:2, + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + return player.countCards('he'); + }, + direct:true, + content:function(){ + 'step 0' + var cards=player.getCards('he'); + var current=trigger.player; + var ai1=function(card){ + var player=_status.event.player,current=_status.event.current; + var card=get.color(card); + if(color=='black'){ + if(!current.hasSha()||!current.hasUseTarget({name:'sha'})) return 0; + if(targets.length) return 5.5-get.value(card); + } + else if(color=='red'){ + if(get.attitude(player,current)<=0) return 0; + if(current.hasCard(card=>{ + if(!get.tag(card,'damage')) return false; + var targetsx=game.filterPlayer(currentx=>{ + if(currentx==current||current==player) return false; + return current.canUse(card,currentx)&&get.effect(currentx,card,current,player)>0; + }); + targets2.addArray(targetsx); + return targetsx.length; + },'hs')) return 5.5-get.value(card); + } + return 0; + } + var targets=game.filterPlayer(currentx=>{ + if(currentx==current||current==player) return false; + return !current.canUse('sha',currentx)||get.effect(currentx,{name:'sha'},current,player)>0&&get.attitude(player,currentx)>-3; + }); + targets.sort((a,b)=>get.attitude(player,b)-get.attitude(player,a)); + var targets2=[]; + var cardx=cards.sort((a,b)=>ai1(b)-ai1(a))[0]; + targets2.sort((a,b)=>get.threaten(b,current)-get.threaten(a,current)); + var next=player.chooseCardTarget({ + filterCard:true, + prompt:get.prompt2('psqupo'), + current:trigger.player, + filterTarget:function(card,player,target){ + return player!=target&&target!=_status.event.current; + }, + ai1:function(card){ + return card==_status.event.cardx?1:0; + }, + ai2:function(target){ + return target==_status.event.targetx?1:0; + }, + }); + if(ai1(cardx)>0){ + next.cardx=cardx; + if(get.color(cardx)=='black'){ + if(targets.length) next.targetx=targets[0]; + } + else{ + if(targets2.length) next.targetx=targets2[0]; + } + } + 'step 1' + if(result.bool){ + var target=result.targets[0],cards=result.cards; + player.logSkill('psqupo',target); + player.give(cards,target); + var color=get.color(cards[0]); + if(color=='black'){ + _status.currentPhase.addTempSkill('psqupo_black'); + _status.currentPhase.markAuto('psqupo_black',[target]); + } + else if(color=='red'){ + target.addTempSkill('psqupo_red'); + target.addMark('psqupo_red',1,false); + } + } + }, + subSkill:{ + black:{ + trigger:{player:'useCardToTarget'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + var targets=player.getStorage('psqupo_black').slice(); + targets.remove(event.target); + return targets.length; + }, + content:function(){ + var targets=player.getStorage('psqupo_black').slice(); + targets.remove(trigger.target); + player.loseHp(targets.length); + } + }, + red:{ + trigger:{player:'damageBegin3'}, + charlotte:true, + forced:true, + onremove:true, + content:function(){ + player.loseHp(player.countMark('psqupo_red')); + player.removeSkill('psqupo_red'); + } + } + } + }, + psbaoquan:{ + audio:2, + trigger:{player:'damageBegin4'}, + filter:function(event,player){ + return player.countCards('h',{type:['trick','delay']})||_status.connectMode; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt2('psbaoquan'),{type:['trick','delay']}).set('logSkill','psbaoquan').set('ai',card=>{ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('goon',get.damageEffect(player,trigger.source,player)<-5); + 'step 1' + if(result.bool){ + trigger.cancel(); + } + } + }, + //官盗S吕布 + pssheji:{ + audio:2, + enable:'phaseUse', + filterCard:true, + selectCard:-1, + position:'h', + filter:function(event,player){ + if(player.hasSkill('pssheji_used')) return false; + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var card of hs){ + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2===false) return false; + } + return event.filterCard(get.autoViewAs({name:'sha'},hs)); + }, + viewAs:{ + name:'sha', + storage:{pssheji:true} + }, + onuse:function(links,player){ + player.addTempSkill('pssheji_used','phaseUseAfter'); + }, + ai:{ + order:1, + threaten:1.1, + }, + mod:{ + targetInRange:function(card,player,target){ + if(card.storage&&card.storage.pssheji) return true; + } + }, + subSkill:{ + used:{ + audio:'pssheji', + trigger:{source:'damageSource'}, + charlotte:true, + forced:true, + popup:false, + logTarget:'player', + filter:function(event,player){ + return event.card.storage&&event.card.storage.pssheji&&event.player.hasCard(card=>{ + if(!lib.filter.canBeGained(card,player,event.player)) return false; + return ['equip1','equip3','equip4','equip6'].contains(get.subtype(card)); + },'e'); + }, + content:function(){ + var cards=trigger.player.getCards('e',card=>{ + if(!lib.filter.canBeGained(card,player,trigger.player)) return false; + return ['equip1','equip3','equip4','equip6'].contains(get.subtype(card)); + }); + if(cards.length) player.gain(cards,'giveAuto',trigger.player); + } + } + }, + }, + //战役篇国战将转身份 + //钟会 + zyquanji:{ + audio:'gzquanji', + trigger:{ + player:'damageEnd', + source:'damageSource', + }, + frequent:true, + filter:function(event,player,name){ + if(name=='damageEnd') return true; + var evt=event.getParent(); + return evt.card&&evt.card.name=='sha'&&evt.type=='card'&&evt.targets.length==1; + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + var hs=player.getCards('he'); + if(hs.length>0){ + if(hs.length==1) event._result={bool:true,cards:hs}; + else player.chooseCard('he',true,'选择一张牌作为“权”'); + } + else event.finish(); + 'step 2' + if(result.bool){ + var cs=result.cards; + player.addToExpansion(cs,player,'give').gaintag.add('zyquanji'); + } + }, + intro:{ + content:'expansion', + markcount:'expansion', + }, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); + }, + locked:false, + mod:{ + maxHandcard:function(player,num){ + return num+player.getExpansions('zyquanji').length; + }, + }, + }, + zypaiyi:{ + audio:'gzpaiyi', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getExpansions('zyquanji').length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('排异',player.getExpansions('zyquanji'),'hidden') + }, + backup:function(links,player){ + return { + audio:'gzpaiyi', + filterTarget:true, + filterCard:function(){return false}, + selectCard:-1, + card:links[0], + delay:false, + content:lib.skill.zypaiyi.contentx, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(target!=player) return 0; + if(player.getExpansions('zyquanji').length<=1||(player.needsToDiscard()&&!player.getEquip('zhuge')&&!player.hasSkill('new_paoxiao'))) return 0; + return 1; + } + }, + }, + } + }, + prompt:function(){return '请选择【排异】的目标'}, + }, + contentx:function(){ + "step 0" + var card=lib.skill.zypaiyi_backup.card; + player.loseToDiscardpile(card); + "step 1" + var num=player.getExpansions('zyquanji').length; + if(num>0) target.draw(Math.min(7,num)); + "step 2" + if(target.countCards('h')>player.countCards('h')){ + target.damage(); + } + }, + ai:{ + order:function(item,player){ + var num=player.getStorage('zyquanji').length; + if(num==1) return 8; + return 1; + }, + result:{ + player:1, + }, + }, + }, + //孙綝 + zyshilu:{ + audio:'gzshilu', + preHidden:true, + trigger:{global:'dieAfter'}, + prompt2:function(event,player){ + return '将其的所有武将牌'+(player==event.source?'及武将牌库里的一张随机武将牌':'')+'置于武将牌上作为“戮”'; + }, + logTarget:'player', + content:function(){ + var list=[],target=trigger.player; + if(target.name1&&!target.isUnseen(0)&&target.name1.indexOf('gz_shibing')!=0&&_status.characterlist.contains(target.name1)) list.push(target.name1); + if(target.name2&&!target.isUnseen(1)&&target.name2.indexOf('gz_shibing')!=0&&_status.characterlist.contains(target.name1)) list.push(target.name2); + _status.characterlist.removeArray(list); + if(player==trigger.source) list.addArray(_status.characterlist.randomRemove()); + if(list.length){ + player.markAuto('zyshilu',list); + game.log(player,'将','#g'+get.translation(list),'置于武将牌上作为','#y“戮”'); + game.broadcastAll(function(player,list){ + var cards=[]; + for(var i=0;i0&&player.countCards('he')>0; + }, + direct:true, + content:function(){ + 'step 0' + var num=Math.min(player.getStorage('zyshilu').length,player.countCards('he')); + player.chooseToDiscard('he',get.prompt('zyshilu'),'弃置至多'+get.cnNumber(num)+'张牌并摸等量的牌',[1,num]).logSkill='zyshilu_zhiheng'; + 'step 1' + if(result.bool&&result.cards&&result.cards.length) player.draw(result.cards.length); + }, + }, + }, + }, + zyxiongnve:{ + audio:'gzxiongnve', + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.getStorage('zyshilu').length>0; + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('zyxiongnve'),[player.storage.zyshilu,'character']]).set('ai',function(button){ + if(!_status.event.goon) return 0; + return 1; + }).set('goon',player.countCards('hs',function(card){ + return get.tag(card,'damage')&&player.hasValueTarget(card); + })>1); + 'step 1' + if(result.bool){ + player.logSkill('zyxiongnve'); + lib.skill.zyxiongnve.throwCharacter(player,result.links); + game.delayx(); + player.chooseControl().set('prompt','选择获得一项效果').set('choiceList',[ + '本回合造成的伤害+1', + '本回合造成伤害时,获得其一张牌', + '本回合使用牌没有次数限制', + ]).set('ai',function(){ + var player=_status.event.player; + if(player.countCards('hs',function(card){ + return get.name(card)=='sha'&&player.hasValueTarget(card); + })>player.getCardUsable('sha')) return 0; + return get.rand(1,2); + }); + } + else event.finish(); + 'step 2' + var skill='zyxiongnve_effect'+result.index; + player.addTempSkill(skill); + game.log(player,'本回合','#g'+lib.skill[skill].promptx) + }, + group:'zyxiongnve_end', + throwCharacter:function(player,list){ + player.unmarkAuto('zyshilu',list); + _status.characterlist.addArray(list); + game.log(player,'从','#y“戮”','中移去了','#g'+get.translation(list)); + game.broadcastAll(function(player,list){ + var cards=[]; + for(var i=0;i0; + }, + logTarget:'player', + content:function(){ + player.gainPlayerCard(trigger.player,true,'he'); + } + }, + effect2:{ + promptx:'使用牌没有次数限制', + charlotte:true, + onremove:true, + intro:{ + content:'使用牌没有次数限制', + }, + mod:{ + cardUsable:()=>Infinity + }, + }, + effect3:{ + charlotte:true, + audio:'zyxiongnve', + mark:true, + intro:{ + content:'受到的伤害-1', + }, + trigger:{player:'damageBegin4'}, + forced:true, + filter:function(event,player){ + return event.source!=player&&event.source&&event.source.isIn(); + }, + content:function(){ + trigger.num--; + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return; + var num=get.tag(card,'damage'); + if(num){ + if(num>1) return 0.5; + return 0; + } + } + } + }, + }, + end:{ + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event,player){ + return player.getStorage('zyshilu').length>1; + }, + content:function(){ + 'step 0' + player.chooseButton(['凶虐:是否移去两张“戮”获得减伤?',[player.storage.zyshilu,'character']],2).set('ai',function(button){ + var player=_status.event.player; + if(game.countPlayer()*1.5+player.storage.zyshilu.length/2>8) return 1; + if(player.hp<=2) return 1; + return 0; + }); + 'step 1' + if(result.bool){ + player.logSkill('zyxiongnve'); + lib.skill.zyxiongnve.throwCharacter(player,result.links); + player.addTempSkill('zyxiongnve_effect3',{player:'phaseBegin'}); + game.delayx(); + } + }, + }, + }, + }, + //孟达 + qiuan:{ + audio:2, + trigger:{player:'damageBegin4'}, + filter:function(event,player){ + return event.cards&&event.cards.filterInD().length>0&&!player.getExpansions('qiuan').length; + }, + check:function(event,player){ + if(get.damageEffect(player,event.source||player,player,event.nature)>=0) return false; + return true; + }, + preHidden:true, + content:function(){ + var cards=trigger.cards.filterInD(); + player.addToExpansion('gain2',cards).gaintag.add('qiuan'); + trigger.cancel(); + }, + intro:{ + content:'expansion', + markcount:'expansion', + }, + marktext:'函', + }, + liangfan:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.getExpansions('qiuan').length>0; + }, + content:function(){ + 'step 0' + var cards=player.getExpansions('qiuan'); + player.gain(cards,'gain2').gaintag.add('liangfan'); + player.addTempSkill('liangfan2'); + 'step 1' + player.loseHp(); + }, + }, + liangfan2:{ + audio:'liangfan', + mark:true, + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('liangfan')) return num+0.1; + }, + }, + intro:{content:'使用“量反”牌造成伤害后,可获得目标角色的一张牌'}, + trigger:{source:'damageEnd'}, + logTarget:'player', + charlotte:true, + onremove:function(player){ + player.removeGaintag('liangfan'); + }, + prompt:(event)=>('量反:是否获得'+get.translation(event.player)+'的一张牌?'), + filter:function(event,player){ + var evt=event.getParent(2); + if(evt.name!='useCard'||evt.card!=event.card) return false; + if(!event.player.countGainableCards(player,'he')) return false; + return player.getHistory('lose',function(evt2){ + if(evt2.getParent()!=evt) return false; + for(var i in evt2.gaintag_map){ + if(evt2.gaintag_map[i].contains('liangfan')) return true; + } + return false; + }).length>0; + }, + marktext:'反', + content:function(){ + player.gainPlayerCard(trigger.player,true,'he'); + }, + }, + //文钦 + gzjinfa:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he')>0; + }) + }, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + target.chooseCard('he','交给'+get.translation(player)+'一张装备牌,或令其获得你的一张牌',{type:'equip'}).set('ai',function(card){ + if(_status.event.goon&&get.suit(card)=='spade') return 8-get.value(card); + return 5-get.value(card); + }).set('goon',target.canUse('sha',player,false)&&get.effect(player,{name:'sha'},target,target)>0); + 'step 1' + if(!result.bool){ + player.gainPlayerCard(target,'he',true); + event.finish(); + } + else target.give(result.cards,player); + 'step 2' + if(result.bool&&result.cards&&result.cards.length&& + target.isIn()&&player.isIn()&&get.suit(result.cards[0],target)=='spade'&&target.canUse('sha',player,false)) target.useCard({name:'sha',isCard:true},false,player); + }, + ai:{ + order:6, + result:{ + player:function(player,target){ + if(target.countCards('e',function(card){ + return get.suit(card)=='spade'&&get.value(card)<8; + })&&target.canUse('sha',player,false)) return get.effect(player,{name:'sha'},target,player); + return 0; + }, + target:function(player,target){ + var es=target.getCards('e').sort(function(a,b){ + return get.value(b,target)-get.value(a,target); + }); + if(es.length) return -Math.min(2,get.value(es[0])) + return -2; + }, + }, + }, + }, + //一战成名·群雄逐鹿·长安之战专属神贾诩 + zybishi:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.player!=player; + }, + check:function(event,player){ + var effect=0; + if(event.targets&&event.targets.length){ + for(var i=0; i0; + }, + content:function(){ + 'step 0' + player.gainPlayerCard(trigger.player,true,'he'); + 'step 1' + if(result.bool&&result.cards&&result.cards.length){ + var card=result.cards[0]; + if(get.suit(card,trigger.player)=='heart'){ + trigger.player.recover(); + } + } + }, + }, + //战役篇改王允 + zylianji:{ + audio:'lianji', + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ + return player.hasHistory('useCard',evt=>evt.getParent('phaseUse')==event); + }, + direct:true, + content:function(){ + 'step 0' + var types=[]; + player.getHistory('useCard',evt=>{ + if(evt.getParent('phaseUse')!=trigger) return false; + types.add(get.type2(evt.card)); + }); + event.num=types.length; + event.logged=false; + player.chooseTarget(get.prompt('zylianji'),'令一名角色摸一张牌').set('ai',target=>{ + var player=_status.event.player; + if(target==player&&player.needsToDiscard(1)) return 1; + return get.effect(target,{name:'wuzhong'},player,player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + if(!event.logged){event.logged=true;player.logSkill('zylianji',target);} + target.draw(); + } + if(event.num<=1) event.finish(); + 'step 2' + if(player.isHealthy()) event._result={bool:false}; + else player.chooseBool(get.prompt('zylianji'),'回复1点体力').set('ai',()=>true); + 'step 3' + if(result.bool){ + if(!event.logged){event.logged=true;player.logSkill('zylianji');} + player.recover(); + } + if(event.num<=2) event.finish(); + 'step 4' + player.chooseTarget(get.prompt('zylianji'),'跳过本回合的剩余阶段,然后令一名其他角色执行这些阶段',lib.filter.notMe).set('ai',target=>{ + var att=get.attitude(_status.event.player,target),num=target.needsToDiscard(),numx=player.needsToDiscard(); + if(att<0&&num>0) return -att*Math.sqrt(num)/3+numx; + var skills=target.getSkills(); + var val=0; + for(var skill of skills){ + var info=get.info(skill); + if(info.trigger&&info.trigger.player&&(info.trigger.player.indexOf('phaseJieshu')==0||Array.isArray(info.trigger.player)&&info.trigger.player.some(i=>i.indexOf('phaseJieshu')==0))){ + var threaten=info.ai&&info.ai.threaten?info.ai.threaten:1; + if(info.ai&&info.ai.neg) val-=3*threaten; + else if(info.ai&&info.ai.halfneg) val-=1.5*threaten; + else val+=threaten; + } + } + return att*val/2+numx; + }); + 'step 5' + if(result.bool){ + var target=result.targets[0]; + if(!event.logged){event.logged=true;player.logSkill('zylianji',target);} + else player.line(target); + player.addTempSkill('zylianji_skip'); + player.storage.zylianji_insert=target; + } + }, + subSkill:{ + skip:{ + trigger:{ + player:['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseUseBefore','phaseDiscardBefore','phaseJieshuBefore'], + }, + init:function(player){ + if(!player.storage.zylianji_skip) player.storage.zylianji_skip=[]; + }, + forced:true, + charlotte:true, + group:'zylianji_insert', + onremove:true, + content:function(){ + trigger.cancel(); + player.storage.zylianji_skip.push(trigger.name); + } + }, + insert:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return player.storage.zylianji_skip&&player.storage.zylianji_skip.length&&player.storage.zylianji_insert&&player.storage.zylianji_insert.isIn(); + }, + forced:true, + charlotte:true, + onremove:true, + getStr:function(str){ + switch(str){ + case 'phaseDraw': + return 'player.phaseDraw();if(!player.noPhaseDelay){if(player==game.me){game.delay()}else{game.delayx()}}'; + case 'phaseDiscard': + return 'game.broadcastAll(function(){if(ui.tempnowuxie){ui.tempnowuxie.close();delete ui.tempnowuxie;}});player.phaseDiscard();if(!player.noPhaseDelay){game.delayx()};delete player._noSkill;'; + default: + return 'player.'+str+'();'; + } + }, + content:function(){ + 'step 0' + var func=''; + for(var i=0;i0){ + event.cards.push(result.card); + player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','yjluoshen'); + } + else{ + for(var i=0;i0; + }, + 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: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, + targetprompt:['发起者','拼点对象'], + multitarget:true, + content:function(){ + 'step 0' + player.give(cards,targets[0],'give'); + 'step 1' + targets[0].chooseToCompare(targets[1]); + 'step 2' + if(result.bool){ + targets[1].loseHp(); + } + else if(result.tie){ + targets[0].loseHp() + targets[1].loseHp() + } + else{ + targets[0].loseHp(); + } + }, + ai:{ + expose:0.4, + order:4, + result:{ + target:function(player,target){ + if(ui.selected.targets.length) return -1; + return -0.5; + } + } + } + }, + yjyongdi:{ + audio:'yongdi', + unique:true, + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + animationColor:'thunder', + skillAnimation:'legend', + mark:true, + intro:{ + content:'limited' + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('yjyongdi'),function(card,player,target){ + return target.hasSex('male')||target.name=='key_yuri'; + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<=1) return 0; + var mode=get.mode(); + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + if(target.name&&lib.character[target.name]){ + for(var i=0;i1&&event.player.isIn(); + }, + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{expose:0.2} + }, + yjzezhu:{ + audio:'zezhu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var zhu=get.mode()=='identity'?get.zhu(player):game.filterPlayer(i=>i.getSeatNum()==1)[0]; + return zhu.countGainableCards(player,zhu==player?'ej':'hej'); + }, + filterTarget:function(card,player,target){ + var zhu=get.mode()=='identity'?get.zhu(player):game.filterPlayer(i=>i.getSeatNum()==1)[0]; + return target==zhu; + }, + selectTarget:1, + content:function(){ + 'step 0' + player.gainPlayerCard(target,player==target?'ej':'hej',true); + 'step 1' + if(!player.countCards('he')||player==target) event.finish(); + else player.chooseCard('择主:交给'+get.translation(target)+'一张牌','he',true); + 'step 2' + player.give(result.cards,target); + }, + ai:{ + order:2.9, + result:{player:1} + } + }, + //用间beta董卓 + yjtuicheng:{ + audio:2, + enable:'phaseUse', + viewAs:{name:'tuixinzhifu',isCard:true}, + filterCard:()=>false, + selectCard:-1, + log:false, + precontent:function(){ + player.logSkill('yjtuicheng'); + player.loseHp(); + }, + ai:{ + effect:{ + player:function(card,player){ + if(get.name(card)!='tuixinzhifu'||_status.event.skill!='yjtuicheng') return; + if(player.hp<3) return 'zeroplayertarget'; + if(player.hasSkill('yjshicha')&&!player.hasHistory('useSkill',evt=>evt.skill=='yjtuicheng')) return [1,2]; + return 'zeroplayertarget'; + } + } + } + }, + yjyaoling:{ + audio:2, + trigger:{ + player:'phaseUseEnd', + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yjyaoling'),'减1点体力上限,选择一名其他角色A和一名角色B,令A选择对B使用杀或被你弃牌',2,(card,player,target)=>{ + if(!ui.selected.targets.length) return target!=player; + return ui.selected.targets[0].canUse('sha',target,false); + }).set('targetprompt',['打人','被打']).set('complexSelect',true).set('ai',target=>{ + var player=_status.event.player; + if(!ui.selected.targets.length) return get.effect(target,{name:'guohe_copy2'},player,player); + var targetx=ui.selected.targets[0]; + return get.effect(target,{name:'sha'},targetx,player)+5; + }); + 'step 1' + if(result.bool){ + var targets=result.targets; + event.targets=targets; + player.logSkill('yjyaoling',targets,false); + player.line2(targets); + player.loseMaxHp(); + targets[0].chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'耀令:对'+get.translation(targets[1])+'使用一张杀,或令'+get.translation(player)+'弃置你的一张牌').set('targetRequired',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',targets[1]); + } + else event.finish(); + 'step 2' + if(!result.bool&&targets[0].countDiscardableCards(player,'he')){ + player.discardPlayerCard(targets[0],'he',true); + } + } + }, + yjshicha:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + forced:true, + filter:function(event,player){ + var tuicheng=false,yaoling=false; + player.getHistory('useSkill',evt=>{ + if(evt.skill=='yjtuicheng') tuicheng=true; + if(evt.skill=='yjyaoling') yaoling=true; + }); + return !(tuicheng&&yaoling); + }, + content:function(){ + player.addTempSkill('yjshicha_limit'); + }, + subSkill:{ + limit:{ + charlotte:true, + mark:true, + intro:{content:'本回合手牌上限为1'}, + mod:{ + maxHandcard:()=>1 + } + } + }, + }, + yjyongquan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + zhuSkill:true, + filter:function(event,player){ + return player.hasZhuSkill('yjyongquan')&&game.hasPlayer(current=>{ + return current!=player&&player.hasZhuSkill(current)&¤t.group=='qun'; + }); + }, + logTarget:function(event,player){ + return game.filterPlayer(current=>{ + return current!=player&&player.hasZhuSkill(current)&¤t.group=='qun'; + }); + }, + content:function(){ + 'step 0' + var targets=lib.skill.yjyongquan.logTarget(trigger,player); + event.targets=targets; + 'step 1' + var target=targets.shift(); + event.target=target; + target.chooseCard('拥权:是否交给'+get.translation(player)+'一张牌?','he').set('ai',card=>{ + if(_status.event.goon) return 4.5-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)>3); + 'step 2' + if(result.bool){ + target.line(player); + target.give(result.cards,player); + } + 'step 3' + if(targets.length) event.goto(1); + } + }, + //用间beta甘宁的新版 + yjjielve:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('yjjielve_ban'); + }, + viewAs:{name:'chenghuodajie'}, + filterCard:function(card,player){ + if(ui.selected.cards.length) return get.color(card)==get.color(ui.selected.cards[0]); + var cards=player.getCards('hes'); + for(var cardx of cards){ + if(card!=cardx&&get.color(card)==get.color(cardx)) return true; + } + return false; + }, + position:'hes', + selectCard:2, + complexCard:true, + check:function(card){ + return 5-get.value(card); + }, + onuse:function(links,player){ + player.addTempSkill('yjjielve_check'); + }, + subSkill:{ + check:{ + trigger:{source:'damageSource'}, + forced:true, + charlotte:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.name=='chenghuodajie'&&event.getParent().skill=='yjjielve'; + }, + content:function(){ + player.addTempSkill('yjjielve_ban'); + } + }, + ban:{charlotte:true} + } + }, + //用间beta张飞 + yjmangji:{ + audio:2, + forced:true, + trigger:{ + player:['loseAfter','damageEnd','loseHpEnd','recoverEnd'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + direct:true, + filter:function (event,player){ + if(player.hp<1||!player.countDiscardableCards(player,'h')) return false; + if(['damage','loseHp','recover'].contains(event.name)) return true; + var evt=event.getl(player); + if(event.name=='equip'&&event.player==player) return !evt||evt.cards.length!=1; + if(!evt||!evt.es.length) return false; + return game.hasPlayer(current=>player.canUse('sha',current,false)); + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:'莽击:弃置一张手牌,视为对一名其他角色使用一张【杀】', + forced:true, + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + return player.canUse('sha',target,false); + }, + ai2:function(target){ + return get.effect(target,{name:'sha'},_status.event.player); + }, + }) + 'step 1' + if(result.bool){ + var target=result.targets[0],cards=result.cards; + player.logSkill('yjmangji',target); + player.discard(cards); + if(player.canUse('sha',target,false)) player.useCard({name:'sha',isCard:true},target,false); + } + }, + }, + //用间beta曹洪 + yjlifeng:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + for(var card of ui.discardPile.childNodes){ + if(get.type(card)=='equip') return true; + } + return false; + }, + content:function(){ + 'step 0' + var cards=Array.from(ui.discardPile.childNodes).filter(i=>get.type(i)=='equip'); + player.chooseButton(['厉锋:获得一张装备牌',cards],cards.length>0).set('ai',get.buttonValue); + 'step 1' + if(result.bool){ + var card=result.links[0]; + player.gain(card,'gain2'); + } + }, + ai:{ + order:10, + result:{player:1}, + effect:{ + target:function(card,player,target){ + if(card&&get.type(card)=='equip'&&_status.event.skill=='_yongjian_zengyu') return 0; + }, + }, + }, + mod:{ + cardZengyuable:function(card,player){ + return get.type(card)=='equip'; + } + } + }, + //用间篇李儒 + yjdumou:{ + audio:2, + forced:true, + global:'yjdumou_du', + mod:{ + cardname:function(card,player,name){ + if(player==_status.currentPhase&&card.name=='du') return 'guohe'; + }, + aiValue:function(player,card,num){ + if(card.name=='du') return get.value({name:'guohe'}); + }, + }, + subSkill:{ + du:{ + mod:{ + cardname:function(card,player,name){ + if(_status.currentPhase&&player!=_status.currentPhase&&_status.currentPhase.hasSkill('yjdumou')&&get.color(card)=='black') return 'du'; + }, + aiValue:function(player,card,num){ + if(get.name(card)=='du'&&card.name!='du') return get.value({name:card.name}); + }, + } + } + }, + ai:{threaten:2.1} + }, + yjweiquan:{ + audio:2, + enable:'phaseUse', + skillAnimation:true, + animationColor:'soil', + filterTarget:true, + selectTarget:()=>[1,game.roundNumber], + contentBefore:function(){ + 'step 0' + player.awakenSkill('yjweiquan'); + player.chooseTarget('威权:选择获得牌的角色',true).set('ai',target=>{ + var att=get.attitude(_status.event.player,target),num=target.needsToDiscard(targets.filter(i=>i!=target&&i.countCards('h')).length); + if(att>0&&num<=2) return 0; + if(att<0&&target.needsToDiscard(-5)) return -att-Math.sqrt(num); + return att-Math.sqrt(num); + }); + 'step 1' + event.getParent()._yjweiquan=result.targets[0]; + }, + content:function(){ + 'step 0' + var targetx=event.getParent()._yjweiquan; + if(target==targetx||!target.countCards('h')) event.finish(); + else target.chooseCard('威权:将一张手牌交给'+get.translation(targetx),true); + 'step 1' + if(result.bool){ + var targetx=event.getParent()._yjweiquan; + target.give(result.cards,targetx); + } + }, + contentAfter:function(){ + var targetx=event.getParent()._yjweiquan; + if(targetx.countCards('h')>targetx.hp){ + var next=targetx.phase(); + event.next.remove(next); + event.getParent().after.push(next); + next.player=targetx; + next._noTurnOver=true; + next._triggered=null; + next.setContent(function(){ + game.broadcastAll(function(){ + if(ui.tempnowuxie){ + ui.tempnowuxie.close(); + delete ui.tempnowuxie; + } + }); + player.phaseDiscard(); + if(!player.noPhaseDelay) game.delayx(); + delete player._noSkill; + }); + } + }, + ai:{ + order:6, + result:{ + player:function(player){ + var num=game.countPlayer(current=>get.attitude(player,current)<0&¤t.countCards('h')); + if(game.roundNumber2||!game.hasPlayer(current=>{ + return get.attitude(player,current)>0&¤t.needsToDiscard(num)<2||get.attitude(player,current)<0&¤t.needsToDiscard(-5); + })) return -10; + return 1; + }, + target:-1, + } + } + }, + yjrenwang:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + for(var card of ui.discardPile.childNodes){ + if(get.color(card)=='black'&&get.type(card)=='basic') return true; + } + return false; + }, + content:function(){ + 'step 0' + var cards=Array.from(ui.discardPile.childNodes).filter(i=>get.color(i)=='black'&&get.type(i)=='basic'); + player.chooseButton(['人望:选择一张黑色基本牌',cards],cards.length>0).set('ai',get.buttonValue); + 'step 1' + if(result.bool){ + var card=result.links[0]; + event.card=card; + player.chooseTarget('选择一名角色获得'+get.translation(card),true).set('ai',target=>get.attitude(_status.event.player,target)); + } + else event.finish(); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + target.gain(card,'gain2'); + } + }, + ai:{ + order:10, + result:{player:1} + } + }, //群曹操 yjxiandao:{ trigger:{player:'_yongjian_zengyuEnd'}, @@ -2598,7 +5873,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jsp_liubei:'群刘备', jsp_liubei_ab:'刘备', jsprende:'仁德', - jsprende_info:'出牌阶段,你可以将至少一张手牌交给其他角色;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', + jsprende_info:'出牌阶段,你可以将至少一张手牌交给其他角色;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌。', ns_caoanmin:'曹安民', nskuishe:'窥舍', nskuishe_info:'出牌阶段限一次,你可以选择一名其他角色A的一张牌,并将此牌交给不为A的一名角色。然后A可以对你使用一张【杀】。', @@ -2672,6 +5947,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ longyi_info:'你可将所有手牌当做任意基本牌使用或打出。若此牌对应的实体牌中:有锦囊牌,你摸一张牌;有装备牌,此牌不可被响应。', zhenjue:'阵绝', zhenjue_info:'一名角色的结束阶段开始时,若你没有手牌,则你可以令其选择一项:①弃置一张牌。②令你摸一张牌。', + //用间 yj_caocao:'SP曹操', yjxiandao:'献刀', yjxiandao_info:'每回合限一次。当你对其他角色发动〖赠予〗后,你令其不能使用或打出与本次赠予移动的牌A花色相同的牌直到回合结束。然后若牌A:为锦囊牌,你摸两张牌。为装备牌,你获得其一张不为A的牌。为武器牌,你对其造成1点伤害。', @@ -2679,11 +5955,197 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yjsancai_info:'出牌阶段限一次,你可以展示所有手牌。若这些牌的类别均相同,则你可以发动一次〖赠予〗(可以选择任意手牌)。', yjyibing:'义兵', yjyibing_info:'当你不因〖赠予〗而于摸牌阶段外获得牌时,你可以将此次获得的所有牌当做【杀】使用(无距离限制且不计入使用次数)。', - + yj_caohong:'用间曹洪', + yj_caohong_ab:'曹洪', + yjlifeng:'厉锋', + yjlifeng_info:'①出牌阶段限一次。你可以获得弃牌堆里的一张装备牌。②你发动〖赠予〗可以选择手牌区里的装备牌或装备区里的牌。', + yj_zhangfei:'用间张飞', + yj_zhangfei_ab:'张飞', + yjmangji:'莽击', + yjmangji_info:'锁定技。当你装备区里的牌数或体力值变化后,若你的体力值不小于1,你弃置一张手牌并视为使用一张【杀】。', + yongjian_ganning:'用间甘宁', + yongjian_ganning_ab:'甘宁', + yjjielve:'劫掠', + yjjielve_info:'你可以将两张颜色相同的牌当【趁火打劫】使用,若你以此法造成伤害,此技能于本回合失效。', + //什么?孙鲁班?谁会做这种离谱的东西 + yj_dongzhuo:'用间董卓', + yj_dongzhuo_ab:'董卓', + yjtuicheng:'推诚', + yjtuicheng_info:'你可以失去1点体力并视为使用一张【推心置腹】。', + yjyaoling:'耀令', + yjyaoling_info:'出牌阶段结束时,你可以减1点体力上限并选择一名其他角色A和一名角色B,你令A选择一项:1.对B使用一张【杀】;2.你弃置其一张牌。', + yjshicha:'失察', + yjshicha_info:'锁定技。弃牌阶段开始时,若你本回合未发动过〖推诚〗或〖耀令〗之一,你本回合的手牌上限为1。', + yjyongquan:'拥权', + yjyongquan_info:'主公技。结束阶段,其他群势力角色依次可以交给你一张牌。', + yj_liru:'用间李儒', + yj_liru_ab:'李儒', + yjdumou:'毒谋', + yjdumou_info:'锁定技。你的回合内,其他角色的黑色手牌均视为【毒】,你的【毒】均视为【过河拆桥】。', + yjweiquan:'威权', + yjweiquan_info:'限定技。出牌阶段,你可以选择至多X名角色(X为游戏轮数),然后选择一名角色A,这些角色依次将一张手牌交给A。然后若A的手牌数大于体力值,其插入执行一个仅有弃牌阶段的回合。', + yjrenwang:'人望', + yjrenwang_info:'出牌阶段限一次。你可以选择弃牌堆中的一张黑色基本牌,令一名角色获得之。', + yj_xuyou:'用间许攸', + yj_xuyou_ab:'许攸', + yjshicai:'恃才', + yjshicai_info:'①回合内,牌堆顶的一张牌对你可见。②出牌阶段限一次。你可以弃置一张牌,展示并获得牌堆顶的一张牌。当此牌离开你的手牌区后,重置〖恃才②〗。', + yjchenggong:'逞功', + yjchenggong_info:'当一名角色使用牌指定第一个目标后,若此牌目标数大于1,你可以令其摸一张牌。', + yjzezhu:'择主', + yjzezhu_info:'出牌阶段限一次。你可以获得主公区域内的一张牌,然后交给其一张牌。', + yj_jiaxu:'用间贾诩', + yj_jiaxu_ab:'贾诩', + yjzhenlve:'缜略', + yjzhenlve_info:'锁定技。①你使用的普通锦囊牌不能被响应。②你不能成为延时锦囊牌的目标。', + yjjianshu:'间书', + yjjianshu_info:'出牌阶段限一次。你可以将一张手牌交给一名其他角色,令其与你选择的另一名其他角色拼点,没赢的角色失去1点体力。', + yjyongdi:'拥嫡', + yjyongdi_info:'限定技。准备阶段,你可以令一名男性角色加1点体力上限并回复1点体力,然后若其武将牌上有主公技且其不为主公,其获得此主公技。', + yj_zhugedan:'用间诸葛诞', + yj_zhugedan_ab:'诸葛诞', + yj_zhenji:'用间甄姬', + yj_zhenji_ab:'甄姬', + yjluoshen:'洛神', + yjluoshen_info:'准备阶段,你可以判定并获得判定牌,且可重复此流程直到结果的颜色不同。', + //线下E系列 一战成名 战役篇官盗 + shen_jiaxu:'神贾诩', + zybishi:'避世', + zybishi_info:'当你成为【杀】的目标后,你可以令使用者摸一张牌,然后令此【杀】无效。', + zyjianbing:'谏兵', + zyjianbing_info:'当一名其他角色受到执行【杀】的效果而受到伤害时,你可以获得其一张牌。若此牌花色为♥,其回复1点体力。', + pe_wangyun:'战役篇王允', + pe_wangyun_ab:'王允', + zylianji:'连计', + zylianji_info:'出牌阶段结束时,若你于此阶段使用牌的类别数达到:1,你可以令一名角色摸一张牌;2,你可以回复1点体力;3,你可以跳过本回合剩余阶段,然后令一名其他角色执行一个仅有你于此回合未执行过的阶段的回合。', + zymoucheng:'谋逞', + zymoucheng_info:'每回合限一次。你可以将一张黑色牌当【借刀杀人】使用。', + pe_zhonghui:'战役篇钟会', + pe_zhonghui_ab:'钟会', + zyquanji:'权计', + zyquanji_info:'①当你受到伤害后或使用牌对唯一目标造成伤害后,你可以摸一张牌并将一张牌置于武将上,称为“权”。②你的手牌上限+X(X为“权”数)。', + zypaiyi:'排异', + zypaiyi_info:'出牌阶段限一次。你可以移去一张“权”并令一名角色摸X张牌(X为“权”数,且至多为7),然后若其手牌数大于你,你对其造成1点伤害。', + pe_mengda:'战役篇孟达', + pe_mengda_ab:'孟达', + qiuan:'求安', + qiuan_info:'当你受到伤害后,若此伤害的渠道有对应的实体牌且你的武将牌上没有“函”,则你可以防止此伤害并将这些牌置于你的武将牌上,称为“函”。', + liangfan:'量反', + liangfan2:'量反', + liangfan_info:'锁定技,准备阶段开始时,若你的武将牌上有“函”,则你获得这些牌,然后失去1点体力。当你于此回合内因使用实体牌中包含“函”的牌且执行这些牌的效果而造成伤害后,你可以获得目标角色的一张牌。', + pe_sunchen:'战役篇孙綝', + pe_sunchen_ab:'孙綝', + zyshilu:'嗜戮', + zyshilu_info:'一名角色死亡后,你可以将其武将牌置于你的武将牌上,称为“戮”,若杀死其的角色是你,你将一张武将牌堆里的牌置为“戮”。②回合开始时,你可以弃置至多X张牌,然后摸等量的牌(X为“戮”数)。', + zyxiongnve:'凶虐', + zyxiongnve_info:'①出牌阶段开始时,你可以将一张“戮”置入武将牌堆并选择一项直到回合结束:1.当你造成伤害时,此伤害+1;2.当你对其他角色造成伤害时,获得其一张牌;3.你使用牌无次数限制。②出牌阶段结束时,你可以将两张“戮”置入武将牌堆,然后当你于下回合开始前受到其他角色造成的伤害时,此伤害-1。', + pe_wenqin:'文钦', + gzjinfa:'矜伐', + gzjinfa_info:'出牌阶段限一次。你可以弃置一张牌,令一名其他角色选择一项:1.令你获得其一张牌;2.交给你一张装备牌,若此牌花色为♠,其视为对你使用一张【杀】。', + zyshangyi:'尚义', + zyshangyi_info:'出牌阶段限一次。你可以令一名其他角色观看你的手牌,然后你观看其手牌并可以弃置其中一张牌。', + zymingshi:'名士', + zymingshi_info:'锁定技。若你的防具栏为空且未废除,属性【杀】对你无效。', + gzsuishi:'随势', + gzsuishi2:'随势', + gzsuishi_info:'锁定技,其他角色进入濒死状态时,若伤害来源与你势力相同,你摸一张牌;其他角色死亡时,若其与你势力相同,你失去1点体力。', + //线下S系列 + ps_guanyu:'☆关羽', + pszhonghun:'忠魂', + pszhonghun_info:'当你使用或打出红色牌时,你可以亮出牌堆顶的一张牌。若此牌为红色,你获得之。', + ps2070_guojia:'☆郭嘉', + psquanmou:'全谋', + psquanmou_info:'当其他角色使用锦囊牌结算结束后,若你是此牌目标,你可以弃置一张与此牌颜色相同的手牌并获得之。', + ps1059_guojia:'☆郭嘉', + psqizuo:'奇佐', + psqizuo_info:'当你攻击范围内的角色造成或受到伤害时,你可以弃置一张牌并判定,若此牌颜色与结果相同,你可以令此伤害+1或-1。', + ps2063_zhaoyun:'☆赵云', + psqijin:'七进', + psqijin_info:'摸牌阶段,你可以改为亮出牌堆顶的七张牌,并获得其中一种颜色的所有牌。', + psqichu:'七出', + psqichu_info:'每回合限一次。当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若其中有此牌,你可以使用或打出之。', + pslongxin:'龙心', + pslongxin_info:'判定阶段开始时,你可以弃置一张装备牌,然后弃置你判定区里的一张牌。', + ps2080_zhouyu:'☆周瑜', + psshiyin:'识音', + psshiyin_info:'①游戏开始时,你可以将一张手牌置于武将牌上,称为“杂音”牌。②出牌阶段开始时,你可以用一张手牌替换“杂音”牌。', + psquwu:'曲误', + psquwu_info:'锁定技。你不能使用或打出与“杂音”牌花色相同的牌,且这些牌对你无效。', + psliaozou:'聊奏', + psliaozou_info:'出牌阶段,你可以展示所有手牌,若其中没有与“杂音”牌花色相同的牌,你摸一张牌。', + ps1062_zhouyu:'☆周瑜', + psoldshiyin:'识音', + psoldshiyin_info:'当你于回合内获得牌时,你可以展示之,然后根据你展示的牌包含的花色数令你本回合使用的下一张牌获得对应效果:不小于1,不能被响应;不小于2,造成的伤害+1;不小于3,使用时摸一张牌。', + ps_caozhi:'☆曹植', + psliushang:'流殇', + psliushang_info:'锁定技。①摸牌阶段,你改为摸X+1张牌,然后依次将一张手牌置于所有其他角色的武将牌上,称为“流殇”牌(X为场上角色数且至少为3)。②其他角色的准备阶段,其选择一项:1.获得其“流殇”牌,且当其于本回合对你造成伤害时,防止此伤害;2.将其“流殇”牌置入弃牌堆。', + psqibu:'七步', + psqibu_info:'限定技。当你进入濒死状态时,你可以亮出牌堆顶的七张牌,回复等同于其中♥牌数的体力,并获得所有♣牌。', + ps_jin_simayi:'☆司马懿', + psquanyi:'权奕', + psquanyi_info:'①出牌阶段限一次。你可以与一名角色拼点,赢的角色根据所有拼点牌的花色执行以下效果:♥,其获得没赢的角色区域里的一张牌;♦其对没赢的角色造成1点伤害;♠,其失去1点体力;♣,其弃置两张牌。②当你拼点时,你可以选择牌堆顶的牌作为拼点牌。', + ps2067_zhaoyun:'武将传赵云', + ps2067_zhaoyun_ab:'赵云', + pshuiqiang:'回枪', + pshuiqiang_info:'当你使用的【杀】被【闪】抵消后,你可以对其使用一张【杀】。', + pshuntu:'魂突', + pshuntu_info:'出牌阶段限一次。当你使用【杀】对目标角色造成伤害后,你可以对其使用一张【杀】。', + ps_caopi:'☆曹丕', + psjianwei:'僭位', + psjianwei_info:'限定技。回合开始时,你可以失去1点体力,然后与一名其他角色交换区域里的所有牌。', + ps2068_simayi:'☆司马懿', + pszhonghu:'冢虎', + pszhonghu_info:'当一名角色于你的回合外死亡后,你可以结束此回合,然后令所有角色于其回合开始前跳过此回合直到你的回合开始前。', + ps_simayi:'☆司马懿', + pshuxiao:'虎啸', + pshuxiao_info:'回合开始时,你可以判定。若结果为基本牌或普通锦囊牌,你于本回合内获得如下效果:你可以将与结果点数或花色相同的手牌当与判定牌牌名和属性相同的牌使用。', + ps_zhugeliang:'☆诸葛亮', + psguanxing:'观星', + psguanxing_info:'准备阶段,你可以观看牌堆顶的五张牌,并将其以任意顺序置于牌堆项或牌堆底。', + pslongyin:'龙吟', + pslongyin_info:'每回合限一次。你可以将任意张点数和为13的牌当做任意一张基本牌或普通锦囊牌使用或打出。', + ps2066_zhugeliang:'武将传诸葛亮', + ps2066_zhugeliang_ab:'诸葛亮', + pszhiji:'智激', + pszhiji_info:'出牌阶段限一次。你可以弃置两张手牌并选择两名势力不同的角色,视为这两名角色依次视为对对方使用一张【杀】。', + psjiefeng:'借风', + psjiefeng_info:'出牌阶段,你可以弃置两张手牌,然后亮出牌堆顶五张牌。若其中有至少两张红色牌,你视为使用一张【万箭齐发】。', + ps_machao:'☆马超', + psweihou:'威侯', + psweihou_info:'当你判定前,你可以展示牌堆顶的两张牌,选择其中一张作为你的本次判定结果,然后将另一张置入弃牌堆。', + ps_lvbu:'☆吕布', + pssheji:'射戟', + pssheji_info:'出牌阶段限一次。你可以将所有手牌当一张无距离限制的【杀】使用,然后当此【杀】对目标角色造成伤害后,你获得其装备区里的所有武器牌和坐骑牌。', + ps_jiaxu:'☆贾诩', + psqupo:'驱魄', + psqupo_info:'一名角色A的回合开始时,你可以将一张牌交给另一名其他角色B。若此牌为:黑色,当A使用【杀】指定不为B的角色为目标时,A失去1点体力;红色,当B于本回合下一次受到伤害时,B失去1点体力。', + psbaoquan:'保全', + psbaoquan_info:'当你受到伤害时,你可以弃置一张锦囊牌并防止此伤害。', + //S特 + ps_shen_machao:'S特神马超', + ps_shen_machao_ab:'神马超', + psshouli:'狩骊', + psshouli_info:'锁定技。①游戏开始时,所有角色依次选择一项:1.使用一张坐骑牌,然后摸一张牌;2.随机从游戏外的八张坐骑牌指示物中使用一张。②你可以将场上一张进攻坐骑当【杀】,防御坐骑当【闪】使用或打出,若此坐骑牌的拥有者不为你,则其非锁定技于本回合内失效。且当你或其于本回合内受到伤害时,此伤害+1且改为雷属性。', + pshengwu:'横骛', + pshengwu_info:'当你使用或打出牌时,若场上有该花色的装备牌,你可以弃置任意张该花色的手牌,然后摸X张牌(X为你弃置的牌数与场上与此牌花色相同的装备牌数之和)。', + //线下K系列木盒 + pk_sp_duyu:'K系列杜预', + pk_sp_duyu_ab:'杜预', + pkwuku:'武库', + pkwuku_info:'锁定技。当有角色使用装备牌时,若你的“武库”数小于3,则你获得1枚“武库”。', + pksanchen:'三陈', + pksanchen_info:'觉醒技。结束阶段,若你的“武库”数大于2,则你加1点体力上限并回复1点体力,然后获得〖灭吴〗。', + pkmiewu:'灭吴', + pkmiewu2:'灭吴', + pkmiewu_info:'每回合限一次。你可移去1枚“武库”,视为使用或打出任意一张基本牌或普通锦囊牌,然后摸一张牌。', + offline_star:'桌游志·SP', offline_sticker:'桌游志·贴纸', offline_luanwu:'文和乱武', offline_yongjian:'用间篇', + offline_piracyE:'官盗E系列·战役篇', + offline_piracyS:'官盗S系列', + offline_piracyK:'官盗K系列', offline_others:'线下其他系列', }, }; diff --git a/character/old.js b/character/old.js index 550c9314a..bf4ad85cb 100755 --- a/character/old.js +++ b/character/old.js @@ -7,20 +7,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterSort:{ old:{ old_standard:['ol_yuanshu'], - old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren"], - old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong"], + old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren",'old_chendao'], + old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong",'old_re_lidian'], old_yijiang1:["masu","xushu","xin_yujin","old_xusheng","old_lingtong","fazheng",'old_gaoshun'], - old_yijiang2:["old_zhonghui","madai",'old_handang','old_liubiao','oldre_liubiao'], + old_yijiang2:["old_zhonghui","madai",'old_handang','old_liubiao','oldre_liubiao','old_guanzhang'], old_yijiang3:["liru","old_zhuran","old_fuhuanghou","old_caochong"], old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan",'old_caorui'], old_yijiang5:["old_caoxiu","old_zhuzhi"], - old_yijiang67:["ol_zhangrang","ol_liuyu",'old_huanghao'], + old_yijiang67:["ol_zhangrang","ol_liuyu",'old_huanghao','old_liyan'], old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","old_wangyun",'ol_wanglang','old_dingfeng'], old_yingbian:['junk_simayi','old_yangyan','old_yangzhi'], old_mobile:["old_caochun",'old_majun'], }, }, character:{ + old_chendao:['male','shu',4,['drlt_wanglie']], + old_liyan:['male','shu',3,['duliang','fulin']], + old_re_lidian:['male','wei',3,['xunxun','wangxi']], + old_guanzhang:['male','shu',4,['old_fuhun']], new_caoren:['male','wei',4,['jushou']], huangzhong:['male','shu',4,['liegong']], junk_sunquan:['male','shen',4,['dili','yuheng'],['wei']], @@ -581,9 +585,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.lose(card,ui.ordering).relatedEvent=trigger; trigger.throw=false; trigger.skill='old_guhuo_backup'; - game.log(player,'声明',trigger.targets&&trigger.targets.length?'对':'',trigger.targets,'使用',trigger.card); + game.log(player,'声明',trigger.targets&&trigger.targets.length?'对':'',trigger.targets||'',trigger.name=='useCard'?'使用':'打出',trigger.card); event.prompt=get.translation(player)+'声明'+(trigger.targets&&trigger.targets.length?'对'+get.translation(trigger.targets):'')+ - '使用'+(get.translation(trigger.card.nature)||'')+get.translation(trigger.card.name)+',是否质疑?'; + (trigger.name=='useCard'?'使用':'打出')+(get.translation(trigger.card.nature)||'')+get.translation(trigger.card.name)+',是否质疑?'; event.targets=game.filterPlayer(i=>i!=player&&i.hp>0).sortBySeat(_status.currentPhase); game.broadcastAll(function(card,player){ @@ -1022,8 +1026,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_dingfeng:'旧丁奉', junk_sunquan:'改版神孙权', junk_sunquan_ab:'神孙权', - new_caoren:'13版曹仁', + new_caoren:'旧曹仁', new_caoren_ab:'旧曹仁', + old_re_lidian:'旧李典', + old_liyan:'旧李严', + old_chendao:'旧陈到', old_standard:'标准包', old_shenhua:'神话再临', diff --git a/character/refresh.js b/character/refresh.js index 5293b5f0c..5db57e3bc 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -10,7 +10,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ refresh_lin:['re_menghuo','ol_sunjian','re_caopi','ol_xuhuang','ol_dongzhuo','ol_zhurong','re_jiaxu','ol_lusu'], refresh_shan:['ol_jiangwei','ol_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce','ol_dengai','re_zhanghe'], refresh_yijiang1:['xin_wuguotai','xin_gaoshun','dc_caozhi','yujin_yujin','re_masu','xin_xusheng','re_fazheng','xin_lingtong','re_zhangchunhua','dc_xushu','re_chengong'], - refresh_yijiang2:['re_madai','re_wangyi','guanzhang','xin_handang','xin_zhonghui','re_liaohua','re_chengpu','re_caozhang','dc_bulianshi','xin_liubiao','re_xunyou','re_guanzhang'], + refresh_yijiang2:['re_madai','re_wangyi','xin_handang','xin_zhonghui','re_liaohua','re_chengpu','re_caozhang','dc_bulianshi','xin_liubiao','re_xunyou','re_guanzhang'], refresh_yijiang3:['re_jianyong','re_guohuai','re_zhuran','re_panzhangmazhong','xin_yufan','dc_liru','re_manchong','re_fuhuanghou','re_guanping','re_liufeng'], refresh_yijiang4:['re_sunluban','re_wuyi','re_hanhaoshihuan','re_caozhen','re_zhoucang','dc_chenqun','re_caifuren','re_guyong','re_jushou','re_zhuhuan'], refresh_yijiang5:['re_zhangyi','re_quancong','re_caoxiu','re_sunxiu','re_gongsunyuan','re_guotufengji','re_xiahoushi','re_liuchen'], @@ -23,7 +23,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dc_caozhi:['male','wei',3,['reluoying','dcjiushi']], ol_huangzhong:['male','shu',4,['xinliegong','remoshi']], re_wenpin:['male','wei',5,['rezhenwei'],['unseen']], - re_guanzhang:['male','shu',4,['fuhun','retongxin'],['unseen']], + re_guanzhang:['male','shu',4,['fuhun','retongxin']], re_mazhong:['male','shu',4,['refuman']], dc_chenqun:['male','wei',3,['repindi','refaen']], re_sundeng:['male','wu',4,['rekuangbi']], @@ -72,7 +72,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_panzhangmazhong:['male','wu',4,['reduodao','reanjian']], re_wangyi:['female','wei',4,['zhenlie','miji']], re_madai:['male','shu',4,['mashu','reqianxi']], - guanzhang:['male','shu',4,['fuhun']], xin_xusheng:['male','wu',4,['decadepojun']], re_taishici:['male','wu',4,['tianyi','hanzhan']], re_masu:['male','shu',3,['resanyao','rezhiman']], @@ -158,9 +157,65 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_guohuai:['xiahouyuan','zhanghe'], }, skill:{ + //新李典 + xinwangxi:{ + audio:'wangxi', + trigger:{player:'damageEnd',source:'damageSource'}, + filter:function(event){ + if(event._notrigger.contains(event.player)) return false; + return event.num&&event.source&&event.player&& + event.player.isAlive()&&event.source.isAlive()&&event.source!=event.player; + }, + check:function(event,player){ + if(player.isPhaseUsing()) return true; + if(event.player==player) return get.attitude(player,event.source)>-5; + return get.attitude(player,event.player)>-5; + }, + logTarget:function(event,player){ + if(event.player==player) return event.source; + return event.player; + }, + preHidden:true, + content:function(){ + 'step 0' + event.count=trigger.num; + event.target=lib.skill.xinwangxi.logTarget(trigger,player); + 'step 1' + player.draw(2); + event.count--; + 'step 2' + var cards=player.countCards('he'); + if(cards.length>0&&target.isAlive()){ + if(cards.length==1) event._result={bool:true,cards:cards}; + else player.chooseCard('he','忘隙:交给'+get.translation(target)+'一张牌',true); + } + else event.goto(5); + 'step 3' + if(result.bool){ + player.give(result.cards,target); + } + 'step 4' + game.delayx(); + 'step 5' + if(event.count&&target.isAlive()){ + player.chooseBool(get.prompt2('xinwangxi',target)); + } + else event.finish(); + 'step 6' + if(result.bool){ + player.logSkill('xinwangxi',target); + event.goto(1); + } + }, + ai:{ + maixie:true, + maixie_hp:true + } + }, //OL界火诸葛 olhuoji:{ audio:'rehuoji', + audioname:['ol_sp_zhugeliang'], trigger:{player:'huogongBegin'}, forced:true, locked:false, @@ -207,6 +262,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{viewAs:{inherit:'rehuoji',audio:'rehuoji'}} }, olkanpo:{ + audio:'rekanpo', + audioname:['ol_sp_zhugeliang'], trigger:{player:'useCard'}, forced:true, locked:false, @@ -7584,7 +7641,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, olpaoxiao:{ audio:"paoxiao", - audioname:['re_zhangfei','guanzhang','xiahouba'], + audioname:['re_zhangfei','guanzhang','xiahouba','re_guanzhang'], trigger:{player:'shaMiss'}, forced:true, content:function(){ @@ -10532,7 +10589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, locked:false, audio:"wusheng", - audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo','re_guanzhang'], enable:["chooseToRespond","chooseToUse"], filterCard:function(card,player){ if(get.zhu(player,'shouyue')) return true; @@ -13724,7 +13781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ decadepojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上(X为其体力值)。若这些牌中:有装备牌,你将这些装备牌中的一张置于弃牌堆;有锦囊牌,你摸一张牌。其于回合结束时获得其武将牌上的这些牌。', re_wangyi:'界王异', wangyi:'王异', - guanzhang:'界关兴张苞', + guanzhang:'关兴张苞', rezishou:'自守', rezishou2:'自守', rezishou_info:'摸牌阶段,你可以多摸X张牌(X为存活势力数)。若如此做,本回合你对其他角色造成伤害时,防止此伤害。', @@ -13850,7 +13907,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ relongyin:'龙吟', relongyin_info:'当一名角色于其出牌阶段内使用【杀】时,你可弃置一张牌令此【杀】不计入出牌阶段使用次数。若此【杀】为红色,则你摸一张牌;若你以此法弃置的牌与此【杀】点数相同,则你重置“竭忠”。', jiezhong:'竭忠', - jiezhong_info:'限定技,出牌阶段开始时,你可以将手牌补至手牌上限(至多摸五张)。', + jiezhong_info:'限定技,出牌阶段开始时,你可以将手牌补至体力上限(至多摸五张)。', re_caifuren:'界蔡夫人', reqieting:'窃听', reqieting_info:'其他角色的回合结束时,若其本回合内未造成过伤害,则你可将其装备区内的一张牌置于你的装备区内;若其本回合内未对其他角色使用过牌,则你可摸一张牌。', @@ -14032,6 +14089,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olhuoji_info:'①你可以将一张红色牌当【火攻】使用。②你使用【火攻】的作用效果改为“目标角色随机展示一张手牌A,然后你可以弃置一张与A颜色相同的牌,对目标造成1点火属性伤害”。', olkanpo:'看破', olkanpo_info:'①你可以将一张黑色牌当【无懈可击】使用。②你使用的【无懈可击】不可被响应。', + xinwangxi:'忘隙', + xinwangxi_info:'当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可以摸两张牌,然后交给其一张牌。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/sb.js b/character/sb.js index 04a41bb98..43f37131b 100644 --- a/character/sb.js +++ b/character/sb.js @@ -27,18 +27,470 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sb_zhaoyun:['male','shu',4,['sblongdan','sbjizhu']], sb_liubei:['male','shu',4,['sbrende','sbzhangwu','sbjijiang'],['zhu']], sb_jiangwei:['male','shu',4,['sbtiaoxin','sbzhiji']], - sb_fazheng:['male','shu',3,['sbxuanhuo','sbenyuan'],['unseen']], + sb_fazheng:['male','shu',3,['sbxuanhuo','sbenyuan']], + sb_chengong:['male','qun',3,['sbmingce','sbzhichi'],['unseen']], + sb_diaochan:['female','qun',3,['sblijian','sbbiyue'],['unseen']], + sb_yuanshao:['male','qun',4,['sbluanji','sbxueyi'],['zhu','unseen']], + sb_pangtong:['male','shu',3,['sblianhuan','sbniepan'],['unseen']], }, characterSort:{ sb:{ sb_zhi:['sb_sunquan','sb_zhouyu','sb_zhangjiao','sb_caocao','sb_zhenji','sb_liubei'], - sb_shi:['sb_xuhuang','sb_machao','sb_fazheng'], + sb_shi:['sb_xuhuang','sb_machao','sb_fazheng','sb_chengong','sb_pangtong'], sb_tong:['liucheng','sp_yangwan','sb_xiahoushi','sb_zhangfei','sb_zhaoyun'], sb_yu:['sb_yujin','sb_lvmeng','sb_huangzhong','sb_huanggai','sb_zhouyu','sb_caoren','sb_ganning'], - sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei'], + sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei','sb_diaochan','sb_yuanshao'], } }, skill:{ + //貂蝉 + sblijian:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.countPlayer(current=>{ + return current!=player; + }); + }, + filterCard:true, + selectCard:[1,Infinity], + filterTarget:lib.filter.notMe, + selectTarget:function(){ + return ui.selected.cards.length+1; + }, + multiline:true, + content:function(){ + var targetx=targets.slice().sortBySeat(target)[1]; + var card={name:'juedou',isCard:true}; + if(target.canUse(card,targetx)) target.useCard(card,targetx); + }, + ai:{ + order:7, + result:{target:-1} + } + }, + sbbiyue:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + player.draw(Math.min(5,game.countPlayer(current=>{ + return current.getHistory('damage').length>0; + })+1)); + } + }, + //陈宫 + sbmingce:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + check:function(card){ + return 8-get.value(card) + }, + filterTarget:lib.filter.notMe, + selectTarget:1, + discard:false, + lose:false, + delay:false, + onremove:true, + group:'sbmingce_hit', + content:function(){ + 'step 0' + player.give(cards,target); + 'step 1' + var choices=['选项二']; + var choiceList=[ + '失去1点体力,令'+get.translation(player)+'摸两张牌并获得1枚“策”', + '摸一张牌' + ]; + if(target.hp>0) choices.unshift('选项一'); + else choiceList[0]=''+choiceList[0]+''; + target.chooseControl(choices).set('choiceList', choiceList).set('prompt',get.translation(player)+'对你发动了【明策】,请选择一项').set('ai',()=>{ + return _status.event.choice; + }).set('choice',target.hp<=0||((target.hp+target.countCards('hs','tao')>2&&get.attitude(target,player)>0)||get.effect(target,{name:'losehp'},target,target)>0)&&target.hp>0?0:1); + 'step 2' + if(result.control=='选项一'){ + target.loseHp(); + player.draw(2); + } + else{ + target.draw(); + event.finish(); + } + 'step 3' + player.addMark('sbmingce',1); + }, + marktext:'笨', + intro:{ + name:'策(明策)', + name2:'策', + content:'mark' + }, + ai:{ + result:{ + player:0.5, + target:1, + }, + order:8.5, + expose:0.2 + }, + subSkill:{ + hit:{ + audio:'sbmingce', + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.hasMark('sbmingce'); + }, + direct:true, + content:function(){ + 'step 0' + var num=player.countMark('sbmingce'); + event.num=num; + player.chooseTarget(get.prompt('sbmingce'),'移去所有“策”,对一名其他角色造成'+num+'点伤害',lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + var eff=get.damageEffect(target,player,player); + var num=player.countMark('sbmingce'); + if(target.hasSkillTag('filterDamage',null,{player:player})) num=1; + return eff*num; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('sbmingce_hit',target); + player.removeMark('sbmingce',num); + target.damage(num); + } + } + } + } + }, + sbzhichi:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + content:function(){ + player.addTempSkill('sbzhichi_muteki'); + }, + subSkill:{ + muteki:{ + audio:'sbzhichi', + trigger:{player:'damageBegin4'}, + charlotte:true, + forced:true, + group:'sbzhichi_egg', + content:function(){ + trigger.cancel(); + }, + mark:true, + intro:{content:'我无敌啦!'}, + ai:{ + maixie:true, + maixie_hp:true, + nofire:true, + nothunder:true, + nodamage:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')) return 'zeroplayertarget'; + } + }, + } + }, + egg:{ + trigger:{player:'die'}, + charlotte:true, + forced:true, + silent:true, + forceDie:true, + content:function(){ + player.chat('你是真滴牛批'); + } + } + } + }, + //袁绍 + sbluanji:{ + audio:2, + enable:'phaseUse', + trigger:{global:'respond'}, + viewAs:{name:'wanjian'}, + forced:true, + locked:false, + filter:function(event,player){ + if(event.name=='chooseToUse') return player.countCards('hs')>1&&!player.hasSkill('sbluanji_used'); + var evt=event.getParent(2); + return evt.name=='wanjian'&&evt.getParent().player==player&&event.player!=player; + }, + filterCard:true, + selectCard:2, + position:'hs', + prompt:'将两张手牌当【万箭齐发】使用', + check:function(card){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return player.canUse('wanjian',current); + }); + var num=0; + for(var i=0;i=7){ + if(num<2) return 0; + } + else if(targets.length>=5){ + if(num<1.5) return 0; + } + } + return 6-get.value(card); + }, + content:function(){ + player.draw(); + }, + precontent:function(){ + player.addTempSkill('sbluanji_used','phaseUseAfter'); + }, + ai:{ + threaten:1.6, + }, + subSkill:{used:{charlotte:true}} + }, + sbxueyi:{ + audio:2, + trigger:{player:'useCardToTargeted'}, + filter:function(event,player){ + return player.hasZhuSkill('sbxueyi')&&event.target!=player&&event.target.group=='qun'; + }, + zhuSkill:true, + forced:true, + logTarget:'target', + content:function(){ + player.draw(); + }, + mod:{ + maxHandcard:function(player,num){ + if(player.hasZhuSkill('sbxueyi')){ + return num+2*game.countPlayer(current=>player!=current&¤t.group=='qun'); + } + } + } + }, + //庞统 + sblianhuan:{ + audio:2, + enable:'phaseUse', + filterCard:{suit:'club'}, + filter:function(event,player){ + var num=(player.getStat('skill').spjungong||0); + return (num!i.isLinked()); + for(var target of targets){ + eff+=get.attitude(player,target); + } + return eff<-1; + }, + prompt2:'失去1点体力,然后当此牌指定第一个目标后,你随机弃置所有不处于连环状态的目标角色各一张手牌', + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + if(!trigger.card.storage) trigger.card.storage={}; + trigger.card.storage.sblianhuan=true; + player.addTempSkill('sblianhuan_discard','phaseUseAfter'); + } + }, + discard:{ + trigger:{global:'useCardToPlayered'}, + forced:true, + locked:false, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.isFirstTarget&&event.card.storage&&event.card.storage.sblianhuan; + }, + content:function(){ + 'step 0' + event.targets=trigger.targets.filter(i=>!i.isLinked()); + player.logSkill('sblianhuan_discard',event.targets); + 'step 1' + var target=targets.shift(); + var cards=target.getCards('h',card=>{ + return lib.filter.cardDiscardable(card,player,'sblianhuan'); + }); + if(cards.length>0){ + player.line(target); + target.discard(cards.randomGet()); + } + if(targets.length) event.redo(); + } + }, + add:{ + trigger:{player:'useCard2'}, + filter:function(event,player){ + return event.card.name=='tiesuo'&&player.storage.sblianhuan&&game.hasPlayer(current=>{ + return !event.targets.contains(current)&&player.canUse(event.card,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('sblianhuan_add'),'为'+get.translation(trigger.card)+'额外指定任意个目标',function(card,player,target){ + return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); + }).set('sourcex',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('sblianhuan_add',event.targets); + trigger.targets.addArray(event.targets); + } + }, + discard2:{ + trigger:{player:'useCardToPlayered'}, + forced:true, + locked:false, + popup:false, + filter:function(event,player){ + return event.isFirstTarget&&event.card.name=='tiesuo'&&player.storage.sblianhuan; + }, + content:function(){ + 'step 0' + event.targets=trigger.targets.filter(i=>!i.isLinked()); + player.logSkill('sblianhuan_discard2',event.targets); + 'step 1' + var target=targets.shift(); + var cards=target.getCards('h',card=>{ + return lib.filter.cardDiscardable(card,player,'sblianhuan'); + }); + if(cards.length>0){ + player.line(target); + target.discard(cards.randomGet()); + } + if(targets.length) event.redo(); + } + }, + } + }, + sbniepan:{ + audio:2, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationStr:'涅盘', + limited:true, + animationColor:'orange', + filter:function(event,player){ + return event.type=='dying'&&player==event.dying; + }, + content:function(){ + 'step 0' + player.awakenSkill('sbniepan'); + player.discard(player.getCards('hej')); + 'step 1' + player.draw(3); + 'step 2' + if(player.hp<3) player.recover(3-player.hp); + 'step 3' + player.turnOver(false); + 'step 4' + player.link(false); + 'step 5' + player.storage.sblianhuan=true; + game.log(player,'修改了','#g【连环】'); + }, + ai:{ + order:1, + skillTagFilter:function(player,arg,target){ + if(player!=target||player.storage.sbniepan) return false; + }, + save:true, + result:{ + player:function(player){ + if(player.hp<=0) return 10; + return 0; + } + }, + threaten:function(player,target){ + if(!target.storage.sbniepan) return 0.6; + } + } + }, //法正 sbxuanhuo:{ audio:2, @@ -257,7 +709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, content:function(){ - var num=Math.min(4-player.countMark('charge'),trigger.name.indexOf('lose')==0?trigger.getl(player).cards2.length:2); + var num=Math.min(4-player.countMark('charge'),trigger.name.indexOf('lose')==0?trigger.getl(player).cards2.length:4); if(num>0) player.addMark('charge',num); } } @@ -276,7 +728,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(evt.skill!='sbtiaoxin') return false; len+=evt.targets.length; }); - return len>=5; + return len>=4; }, content:function(){ 'step 0' @@ -307,7 +759,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mod:{ playerEnabled:function(card,player,target){ - if(player!=target&&player.getStorage('sbzhiji_beifa').contains(target)) return false; + if(player!=target&&!player.getStorage('sbzhiji_beifa').contains(target)) return false; } } }, @@ -325,6 +777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sbrende:{ audio:3, enable:['chooseToUse','chooseToRespond'], + maxNum:8, filter:function(event,player){ if(event.type=='wuxie'||player.hasSkill('sbrende_used')) return false; if(player.countMark('sbrende')<2) return false; @@ -341,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - group:'sbrende_give', + group:['sbrende_give','sbrende_gain'], chooseButton:{ dialog:function(event,player){ var dialog=ui.create.dialog('仁德'); @@ -419,7 +872,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(links,player){ var isUse=links.length==1; return (isUse?('移去2枚“仁望”,视为使用或打出'+(get.translation(links[0][3])||'')+get.translation(links[0][2])) - :'###仁德###出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为8)'); + :'###仁德###出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为'+lib.skill.sbrende.maxNum+')'); } }, hiddenCard:function(player,name){ @@ -434,11 +887,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, respondShan:true, + save:true, skillTagFilter:function(player){ - return player.countMark('sbrende')>0&&!player.hasSkill('sbrende_used'); + return player.countMark('sbrende')>1&&!player.hasSkill('sbrende_used'); }, order:function(item,player){ - if(lib.skill.sbzhangwu.ai.result.player(player)>0) return 9.1; + if(_status.event.type=='phase'&&lib.skill.sbzhangwu.ai.result.player(player)>0) return 9.1; return 0.5; }, result:{ @@ -483,12 +937,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player!=target; }, prompt:function(event){ - return '出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为8)'; + return '出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为'+lib.skill.sbrende.maxNum+')'; }, check:function(card){ var player=get.owner(card); if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(ui.selected.cards.length+player.countMark('sbrende')>8) return 0; + if(ui.selected.cards.length+player.countMark('sbrende')>lib.skill.sbrende.maxNum) return 0; if(!ui.selected.cards.length&&card.name=='du') return 20; if(ui.selected.cards.length>=Math.max(2,player.countCards('he')-player.hp)) return 0; if(player.countCards('he')<=1){ @@ -512,7 +966,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('sbrende_given','phaseUseAfter'); player.markAuto('sbrende_given',[target]); player.give(cards,target); - var num=Math.min(8-player.countMark('sbrende'),cards.length); + var num=Math.min(lib.skill.sbrende.maxNum-player.countMark('sbrende'),cards.length); if(num>0) player.addMark('sbrende',num); }, ai:{ @@ -522,7 +976,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ if(!player.hasFriend()&&player.hasSkill('sbzhangwu')&&ui.selected.cards.length&& - get.value(ui.selected.cards[0])<(lib.skill.sbzhangwu.filterTarget(null,player,target)?3:5)) return -0.1; + get.value(ui.selected.cards[0])>(lib.skill.sbzhangwu.filterTarget(null,player,target)?3:5)) return -0.1; if(target.hasSkillTag('nogain')) return 0; if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ if(target.hasSkillTag('nodu')) return 0; @@ -535,7 +989,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, threaten:1.1 }, - } + }, + gain:{ + audio:'sbrende', + trigger:{player:'phaseUseBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return player.countMark('sbrende')0) player.addMark('sbrende',num); + } + }, }, }, sbzhangwu:{ @@ -577,7 +1044,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, contentAfter:function(){ 'step 0' - player.gainMaxHp(); + player.recover(3); 'step 1' player.removeSkill('sbrende'); game.log(player,'失去了技能','#g【'+get.translation('sbrende')+'】'); @@ -589,11 +1056,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ player:function(player,target){ var targets=game.filterPlayer(current=>lib.skill.sbzhangwu.filterTarget(null,player,current)); - if(!targets) return 0; + if(!targets.length) return 0; var eff=0; for(var target of targets){ eff+=get.effect(target,{name:'shunshou_copy2'},player,player); } + eff+=15-5*Math.max(0,3-player.getDamagedHp()); return eff>15?1:0; }, } @@ -2459,8 +2927,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuSkill:true, group:'sbjiuyuan_recover', filter:function(event,player){ - return event.card.name=='tao'&&player!=event.player&&event.player.group=='wu' && - event.player.isIn()&&player.hasZhuSkill('zhushi',event.player); + return event.card.name=='tao'&&player!=event.player&&event.player.group=='wu'&& + event.player.isIn()&&player.hasZhuSkill('sbjiuyuan',event.player); }, content:function(){ player.draw(); @@ -2473,7 +2941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, filter:function(event,player){ if(event.player==player) return false; - if(!player.hasZhuSkill('sbjiuyuan')) return false; + if(!player.hasZhuSkill('sbjiuyuan',event.player)) return false; if(event.player.group!='wu') return false; return true; }, @@ -2727,15 +3195,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 6-get.value(card); }, content:function(){ + 'step 0' if(cards.length){ player.changeHujia(1,null,true); player.addTempSkill('sbkeji_discard','phaseUseAfter'); + event.finish(); } else{ player.loseHp(); - player.changeHujia(2,null,true); - player.addTempSkill('sbkeji_losehp','phaseUseAfter'); } + 'step 1' + player.changeHujia(2,null,true); + player.addTempSkill('sbkeji_losehp','phaseUseAfter'); }, mod:{ maxHandcard:function(player,num){ @@ -3301,13 +3772,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dynamicTranslate:{ - sbkeji:function (player) { + sbkeji:function(player){ return '①出牌阶段' + (player.storage.sbkeji ? '' :'各') + '限一次。你可以选择一项:1.弃置一张手牌,然后获得1点护甲;2.失去1点体力,然后获得2点护甲。②你的手牌上限+X(X为你的护甲数)。③若你不为正在结算濒死流程的角色,你不能使用【桃】。'; }, sblongdan:function(player){ if(player.hasSkill('sblongdan_mark',null,null,false)) return '蓄力技(1/3)。①你可以消耗1点蓄力值,将一张基本牌当做任意基本牌使用或打出,然后摸一张牌。②一名角色的回合结束时,你获得1点蓄力值。'; return '蓄力技(1/3)。①你可以消耗1点蓄力值,将【杀】当做【闪】或将【闪】当做【杀】使用或打出,然后摸一张牌。②一名角色的回合结束时,你获得1点蓄力值。'; }, + sblianhuan:function(player){ + var str='①出牌阶段,你可以重铸一张♣手牌。②出牌阶段限一次。你可以将一张♣手牌当【铁索连环】使用。'; + if(!player.storage.sblianhuan) str+='③当你使用【铁索连环】时,你可以失去1点体力,然后当此牌指定第一个目标后,你随机弃置每名不处于连环状态的目标角色一张手牌。'; + else str+='③当你使用【铁索连环】时,你可以额外指定任意名角色为目标。④当你使用【铁索连环】指定第一个目标后,你随机弃置每名不处于连环状态的目标角色一张手牌。'; + return str; + } }, translate:{ sp_yangwan:'手杀杨婉', @@ -3416,21 +3893,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sblongdan_shabi_info:'蓄力技(1/3)。①你可以消耗1点蓄力值,将一张基本牌当做任意基本牌使用或打出,然后摸一张牌。②一名角色的回合结束时,你获得1点蓄力值。', sb_liubei:'谋刘备', sbrende:'仁德', - sbrende_info:'①出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为8)。②每回合限一次。你可以移去2枚“仁望”,视为使用或打出一张基本牌。', + sbrende_info:'①出牌阶段每名角色限一次。你可以将任意张牌交给一名其他角色,然后你获得等量“仁望”标记(至多为8)。②每回合限一次。你可以移去2枚“仁望”,视为使用或打出一张基本牌。③出牌阶段开始时,你获得2枚“仁望”。', sbzhangwu:'章武', - sbzhangwu_info:'限定技。出牌阶段,你可以令所有于本局游戏成为过〖仁德①〗目标的其他角色依次交给你X张牌,然后你加1点体力上限,失去〖仁德〗(X为游戏轮数-1,且至多为3)。', + sbzhangwu_info:'限定技。出牌阶段,你可以令所有于本局游戏成为过〖仁德①〗目标的其他角色依次交给你X张牌,然后你回复3点体力并失去〖仁德〗(X为游戏轮数-1,且至多为3)。', sbjijiang:'激将', sbjijiang_info:'主公技。出牌阶段结束时,你可以选择一名体力值不小于你的其他蜀势力角色A和一名在A攻击范围内的角色B。A选择一项:1.视为对B使用一张【杀】;2.下一个出牌阶段开始前,跳过此阶段。', sb_jiangwei:'谋姜维', sbtiaoxin:'挑衅', - sbtiaoxin_info:'蓄力技(2/4)。①出牌阶段限一次。你可以选择至多X名角色(X为你的蓄力值),令这些角色选择一项:1.对你使用一张【杀】;2.交给你一张牌。然后你消耗等同于你选择的目标数的蓄力值。②当你于弃牌阶段弃置牌后,你获得等量蓄力值。', + sbtiaoxin_info:'蓄力技(4/4)。①出牌阶段限一次。你可以选择至多X名角色(X为你的蓄力值),令这些角色选择一项:1.对你使用一张【杀】;2.交给你一张牌。然后你消耗等同于你选择的目标数的蓄力值。②当你于弃牌阶段弃置牌后,你获得等量蓄力值。', sbzhiji:'志继', - sbzhiji_info:'觉醒技。准备阶段,若你发动〖挑衅①〗选择过共计5个目标,你减1点体力上限,令任意名角色获得“北伐”标记并获得如下效果直到你的下回合开始:其使用牌只能指定你或其为目标。', + sbzhiji_info:'觉醒技。准备阶段,若你因〖挑衅①〗消耗过至少4点蓄力值,你减1点体力上限,令任意名角色获得“北伐”标记并获得如下效果直到你的下回合开始:其使用牌只能指定你或其为目标。', sb_fazheng:'谋法正', sbxuanhuo:'眩惑', sbxuanhuo_info:'①出牌阶段限一次。你可以将一张牌交给一名没有“眩”标记的其他角色,然后令其获得“眩”标记。②当有“眩”的其他角色于摸牌阶段外获得牌后,若你以此法于其本次获得“眩”的期间内获得其的牌数小于5,你随机获得其一张手牌。', sbenyuan:'恩怨', sbenyuan_info:'锁定技。准备阶段,若场上存在有“眩”的角色,你移去该角色的“眩”,且你于其本次获得“眩”的期间内获得其的牌数:不小于3,你交给其两张牌;小于3,其失去1点体力,你回复1点体力。', + sb_chengong:'谋陈宫', + sbmingce:'明策', + sbmingce_info:'①出牌阶段限一次。你可以将一张牌交给一名其他角色,其选择一项:1.失去1点体力,令你摸两张牌并获得1枚“策”;2.摸一张牌。②出牌阶段开始时,你可以移去所有“策”并对一名其他角色造成等量伤害。', + sbzhichi:'智迟', + sbzhichi_info:'锁定技。当你受到伤害后,防止你本回合受到的伤害。', + sb_yuanshao:'谋袁绍', + sbluanji:'乱击', + sbluanji_info:'①出牌阶段限一次。你可以将两张手牌当【万箭齐发】使用。②当其他角色因响应你使用的【万箭齐发】而打出【闪】时,你摸一张牌。', + sbxueyi:'血裔', + sbxueyi_info:'主公技,锁定技。①你的手牌上限+2X(X为场上其他群势力角色数)。②当你使用牌指定其他群势力角色为目标后,你摸一张牌。', + sb_diaochan:'谋貂蝉', + sblijian:'离间', + sblijian_info:'出牌阶段限一次。你可以选择至少两名其他角色并弃置X张牌(X为你选择的角色数-1)。然后每名你选择的角色依次视为对这些角色中与其逆时针座次最近的另一名角色使用一张【决斗】。', + sbbiyue:'闭月', + sbbiyue_info:'锁定技。结束阶段,你摸Y张牌(Y为本回合受到过伤害的角色数+1且至多为5)。', + sb_pangtong:'谋庞统', + sblianhuan:'连环', + sblianhuan_info:'①出牌阶段,你可以重铸一张♣手牌。②出牌阶段限一次。你可以将一张♣手牌当【铁索连环】使用。③当你使用【铁索连环】时,你可以失去1点体力,然后当此牌指定第一个目标后,你随机弃置每名不处于连环状态的目标角色一张手牌。', + sblianhuan_lv2:'连环·改', + sblianhuan_lv2_info:'①出牌阶段,你可以重铸一张♣手牌。②出牌阶段限一次。你可以将一张♣手牌当【铁索连环】使用。③当你使用【铁索连环】时,你可以额外指定任意名角色为目标。④当你使用【铁索连环】指定第一个目标后,你随机弃置每名不处于连环状态的目标角色一张手牌。', + sbniepan:'涅槃', + sbniepan_info:'限定技。当你处于濒死状态时,你可以弃置区域里的所有牌,摸三张牌,将体力回复至3点,复原武将牌,然后修改〖连环〗。', sb_zhi:'谋攻篇·知', sb_shi:'谋攻篇·识', diff --git a/character/shenhua.js b/character/shenhua.js index 667adc5ed..8c05477d5 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -67,7 +67,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "lukang":["male","wu",4,["drlt_qianjie","drlt_jueyan","drlt_poshi"],[]], "yl_yuanshu":["male","qun",4,["drlt_yongsi","drlt_weidi"],["zhu"]], "zhangxiu":["male","qun",4,["drlt_xiongluan","drlt_congjian"],[]], - "chendao":["male","shu",4,["drlt_wanglie"],[]], + "chendao":["male","shu",4,["dcwanglie"],[]], zhoufei:["female","wu",3,["olliangyin","olkongsheng"]], }, perfectPair:{ @@ -141,6 +141,113 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "chendao":"陈到,字叔至,生卒年不详,豫州汝南(今河南驻马店平舆县)人。三国时期蜀汉将领,刘备帐下白毦兵统领,名位常亚于赵云,以忠勇著称。蜀汉建兴年间,任征西将军、永安都督,封亭侯。在任期间去世。", }, skill:{ + //新杀小加强 陈到 + dcwanglie:{ + audio:'drlt_wanglie', + locked:false, + mod:{ + targetInRange:function(card,player,target){ + if(player.hasSkill('dcwanglie_effect',null,null,false)) return true; + }, + }, + trigger:{ + player:"useCard", + }, + filter:function(event,player){ + return player.isPhaseUsing()&&(event.card.name=='sha'||get.type(event.card)=='trick'); + }, + preHidden:true, + check:function(event,player){ + if(player.hasSkill('dcwanglie2',null,null,false)) return true; + if(['wuzhong','kaihua','dongzhuxianji'].contains(event.card.name)) return false; + player._wanglie_temp=true; + var eff=0; + for(var i of event.targets){ + eff+=get.effect(i,event.card,player,player); + } + delete player._wanglie_temp; + if(eff<0) return true; + if(!player.countCards('h',function(card){ + return player.hasValueTarget(card,null,true); + })) return true; + if(get.tag(event.card,'damage')&&!player.needsToDiscard()&&!player.countCards('h',function(card){ + return get.tag(card,'damage')&&player.hasValueTarget(card,null,true); + })) return true; + return false; + }, + prompt2:function(event){ + return '令'+get.translation(event.card)+'不能被响应,然后本阶段你使用牌只能指定自己为目标' + }, + group:'dcwanglie_startup', + content:function(){ + trigger.nowuxie=true; + trigger.directHit.addArray(game.players); + player.addTempSkill('dcwanglie2','phaseUseAfter'); + }, + subSkill:{ + startup:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('dcwanglie_effect','phaseUseAfter'); + }, + }, + effect:{ + forced:true, + charlotte:true, + firstDo:true, + popup:false, + trigger:{player:'useCard1'}, + filter:function(event,player){ + return event.targets.some(target=>target!=player); + }, + content:function(){ + player.addMark('dcwanglie_effect',1,false); + if(player.countMark('dcwanglie_effect')>=2) player.removeSkill('dcwanglie_effect'); + }, + onremove:true, + }, + }, + ai:{ + //pretao:true, + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + //if(tag=='pretao') return true; + if(player._wanglie_temp) return false; + player._wanglie_temp=true; + var bool=function(){ + if(['wuzhong','kaihua','dongzhuxianji'].contains(arg.card.name)) return false; + if(get.attitude(player,arg.target)>0||!player.isPhaseUsing()) return false; + var cards=player.getCards('h',function(card){ + return card!=arg.card&&(!arg.card.cards||!arg.card.cards.contains(card)); + }); + var sha=player.getCardUsable('sha'); + if(arg.card.name=='sha') sha--; + cards=cards.filter(function(card){ + if(card.name=='sha'&&sha<=0) return false; + return player.hasValueTarget(card,null,true); + }); + if(!cards.length) return true; + if(!get.tag(arg.card,'damage')) return false; + if(!player.needsToDiscard()&&!cards.filter(function(card){ + return get.tag(card,'damage'); + }).length) return true; + return false; + }(); + delete player._wanglie_temp; + return bool; + }, + }, + }, + dcwanglie2:{ + charlotte:true, + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + }, + }, //周妃 olliangyin:{ audio:'liangyin', @@ -566,7 +673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result&&result.links&&result.links.length){ player.line(player,trigger.player); player.logSkill('drlt_zhenrong'); - player.addToExpansion(result.links,trigger.player,'give','log').gaintag.add('drlt_zhengrong'); + player.addToExpansion(result.links,trigger.player,'give','log').gaintag.add('drlt_zhenrong'); }; }, }, @@ -582,12 +689,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, derivation:['drlt_qingce'], filter:function(event,player){ - return player.getExpansions('drlt_zhengrong').length>=3&&game.dead.length>0; + return player.getExpansions('drlt_zhenrong').length>=3&&game.dead.length>0; }, content:function(){ 'step 0' player.awakenSkill('drlt_hongju'); - var cards=player.getExpansions('drlt_zhengrong'); + var cards=player.getExpansions('drlt_zhenrong'); if(!cards.length||!player.countCards('h')){ event.goto(2); return; @@ -603,16 +710,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.set('processAI',function(list){ var player=_status.event.player,cards=list[0][1].concat(list[1][1]).sort(function(a,b){ return get.value(a)-get.value(b); - }),cards2=cards.splice(0,player.getExpansions('drlt_zhengrong').length); + }),cards2=cards.splice(0,player.getExpansions('drlt_zhenrong').length); return [cards2,cards]; }); 'step 1' if(result.bool){ var pushs=result.moved[0],gains=result.moved[1]; - pushs.removeArray(player.getExpansions('drlt_zhengrong')); + pushs.removeArray(player.getExpansions('drlt_zhenrong')); gains.removeArray(player.getCards('h')); if(!pushs.length||pushs.length!=gains.length) return; - player.addToExpansion(pushs).gaintag.add('drlt_zhengrong'); + player.addToExpansion(pushs).gaintag.add('drlt_zhenrong'); player.gain(gains,'gain2','log'); } 'step 2' @@ -7425,8 +7532,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // player.line(trigger.targets,trigger.card.nature); trigger.throw=false; trigger.skill='xinfu_guhuo_backup'; + game.log(player,'声明',trigger.targets&&trigger.targets.length?'对':'',trigger.targets||'',trigger.name=='useCard'?'使用':'打出',trigger.card); event.prompt=get.translation(player)+'声明'+(trigger.targets&&trigger.targets.length?'对'+get.translation(trigger.targets):'')+ - '使用'+(get.translation(trigger.card.nature)||'')+get.translation(trigger.card.name)+',是否质疑?'; + (trigger.name=='useCard'?'使用':'打出')+(get.translation(trigger.card.nature)||'')+get.translation(trigger.card.name)+',是否质疑?'; event.targets=game.filterPlayer(function(current){ return current!=player&&!current.hasSkill('chanyuan'); }).sortBySeat(_status.currentPhase); @@ -7599,13 +7707,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_yuanshao:['ol_yuanshao','re_yuanshao','xin_yuanshao'], pangde:['ol_pangde','re_pangde','pangde'], yanwen:['re_yanwen','yanwen'], - caopi:['caopi','re_caopi'], + caopi:['caopi','re_caopi','ps_caopi'], xuhuang:['ol_xuhuang','re_xuhuang','xuhuang'], menghuo:['re_menghuo','menghuo'], zhurong:['re_zhurong','ol_zhurong','zhurong'], sunjian:['ol_sunjian','re_sunjian','sunjian'], - jiaxu:['re_jiaxu','jiaxu','ns_jiaxu'], - dongzhuo:['ol_dongzhuo','sp_dongzhuo','re_dongzhuo','dongzhuo'], + jiaxu:['re_jiaxu','jiaxu','ns_jiaxu','ps_jiaxu'], + dongzhuo:['ol_dongzhuo','sp_dongzhuo','re_dongzhuo','dongzhuo','yj_dongzhuo'], dengai:['re_dengai','ol_dengai','dengai'], sp_ol_zhanghe:['sp_ol_zhanghe','yj_zhanghe','sp_zhanghe'], jiangwei:['ol_jiangwei','re_jiangwei','jiangwei'], @@ -7614,9 +7722,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhangzhang:['re_zhangzhang','zhangzhang'], zuoci:['re_zuoci','zuoci'], caiwenji:['ol_caiwenji','re_caiwenji','caiwenji'], - xuyou:['sp_xuyou','xuyou'], + xuyou:['sp_xuyou','xuyou','yj_xuyou'], guanqiujian:['guanqiujian','tw_guanqiujian','re_guanqiujian','old_guanqiujian'], - chendao:['chendao','ns_chendao'], + chendao:['chendao','old_chendao','ns_chendao'], zhugezhan:['zhugezhan','old_zhugezhan'], ol_lusu:['ol_lusu','re_lusu'], zhanghe:['re_zhanghe','zhanghe'], @@ -7714,10 +7822,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_zhenggu":"镇骨", drlt_zhenggu2:"镇骨", "drlt_zhenggu_info":"结束阶段,你可以选择一名其他角色,你的回合结束后和该角色的下个回合结束时,其将手牌摸至或弃至X张。(X为你的手牌数且至多为5)", - "drlt_zhenrong":"徵荣", - "drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”", + "drlt_zhenrong":"征荣", + "drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”。", "drlt_hongju":"鸿举", - "drlt_hongju_info":"觉醒技,准备阶段,若“荣”的数量大于或等于3且场上有角色死亡,则你可以用任意张手牌替换等量的“荣”,然后扣减一点体力上限并获得技能“清侧”", + "drlt_hongju_info":"觉醒技,准备阶段,若“荣”的数量大于或等于3且场上有角色死亡,则你可以用任意张手牌替换等量的“荣”,然后减1点体力上限并获得〖清侧〗。", "drlt_qingce":"清侧", "drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置一名角色装备区或判定区内的一张牌。", @@ -8016,6 +8124,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olliangyin_info:'当有牌发生移动后,若此移动事件是本回合内你拥有〖良姻〗期间的首个有牌移出游戏/移入游戏的事件,则你可以选择一名其他角色。你与其各摸一张牌/弃置一张牌,然后你可以选择你或其中的一名手牌数为X的角色,该角色回复1点体力(X为你的“箜”数)', olkongsheng:'箜声', olkongsheng_info:'①准备阶段开始时,你可以将任意张牌置于你的武将牌上,称为“箜”。②结束阶段开始时,若你有不为装备牌的“箜”,则你获得“箜”中的非装备牌,然后令一名角色依次使用“箜”中的装备牌并失去1点体力。', + dcwanglie:"往烈", + dcwanglie_info:"①出牌阶段,你对其他角色使用的前两张牌无距离限制。②当你于出牌阶段内使用牌时,你可以令此牌不能被响应,然后你于本阶段内不能使用牌指定其他角色为目标。", shenhua_feng:'神话再临·风', shenhua_huo:'神话再临·火', diff --git a/character/sp.js b/character/sp.js index 70b2f7c56..57617e66d 100755 --- a/character/sp.js +++ b/character/sp.js @@ -6,18 +6,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterSort:{ sp:{ sp_tianji:["sunhao","liuxie","caoang","hetaihou","sunluyu",'ol_wangrong',"zuofen","ganfuren","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'], - sp_tianzhu:["wutugu","yanbaihu","shamoke","panfeng","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan"], + 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'], + sp_tianzhu:["wutugu","yanbaihu","shamoke","panfeng","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna"], sp_nvshi:["lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu','ol_xinxianying',"daxiaoqiao","jin_guohuai"], sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','ol_puyuan','zhangzhi'], - sp_huben:["caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng'], + sp_huben:["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'], sp_liesi:['mizhu','weizi','ol_liuba'], 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:["caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'], sp_wanglang:['wanglang'], sp_tongque:["sp_fuwan","sp_fuhuanghou","sp_jiben"], sp_zhongdan:["cuiyan","huangfusong"], - sp_guozhan2:["tianfeng","sp_dongzhuo","liqueguosi","zhangren"], + sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"], //sp_single:["niujin"], sp_others:["hanba","caiyang"], }, @@ -28,6 +28,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + ol_zhangyì:['male','shu',4,['oldianjun','olkangrui']], + ol_zhujun:['male','qun',4,['olcuipo']], + maxiumatie:['male','qun',4,['mashu','olkenshang']], + 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']], @@ -156,20 +162,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ganfuren:['female','shu',3,['shushen','shenzhi']], //mifuren:['female','shu',3,['guixiu','cunsi']], - //mateng:['male','qun',4,['xiongyi','mashu']], - tianfeng:['male','qun',3,['sijian','suishi']], yuejin:['male','wei',4,['xiaoguo']], sp_dongzhuo:['male','qun',5,['hengzheng']], - //jiangfei:['male','shu',3,['reshengxi','shoucheng']], - //jiangqing:['male','wu',4,['shangyi','zniaoxiang']], hetaihou:['female','qun',3,['zhendu','qiluan']], - //kongrong:['male','qun',3,['lirang','mingshi']], dingfeng:['male','wu',4,['reduanbing','refenxun']], shamoke:['male','shu',4,['gzjili']], //liqueguosi:['male','qun',4,['xiongsuan']], //cuimao:['male','wei',3,['zhengbi','fengying']], - //jiling:['male','qun',4,['shuangren']], zangba:['male','wei',4,['rehengjiang']], zhangren:['male','qun',4,['chuanxin','zfengshi']], @@ -183,6 +183,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //kaisa:["male","western",4,["zhengfu"]], }, characterIntro:{ + maxiumatie:'马休(?-212年),马铁(?-212年)。两人均为扶风茂陵(今陕西兴平)人,马腾之子,马超之弟。马腾遭韩遂进攻,乃携马休、马铁等入京受职。马休被封为奉车都尉,马铁被封为骑都尉。后在邺城居住。因兄马超反,两人被曹操夷灭。', + dongtuna:'董荼那,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第二洞元帅;与阿会喃等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同阿会喃共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', + zhanghua:'张华(232年-300年),字茂先。范阳郡方城县(今河北固安)人。西晋时期政治家、文学家、藏书家,西汉留侯张良的十六世孙。张华出身范阳张氏,自少贫苦,因才学过人而受同乡名臣卢钦、刘放、阮籍等人的赞赏。在曹魏时,他历任太常博士、河南尹丞、佐著作郎、中书郎等职。西晋建立后,拜黄门侍郎,封关内侯,逐渐受到晋武帝的重用。后拜中书令,加散骑常侍,与大将杜预坚决支持武帝伐吴,于战时任度支尚书。吴国灭亡后,以功进封广武县侯。其后遭到排挤,出镇幽州,政绩卓然。之后返朝任太常,终武帝之世未得参与政事。晋惠帝继位后,累官至司空,封壮武郡公,被皇后贾南风委以朝政。张华尽忠辅佐,使天下仍然保持相对安宁。永康元年(300年),♯♯司马伦发动政变,张华惨遭杀害,年六十九。太安二年(303年),获得♯♯,追复官爵。张华工于诗赋,词藻华丽,又雅爱书籍,精于目录学,编纂有中国第一部博物学著作《博物志》;还曾与荀勖等人依照刘向《别录》整理典籍。《宣和书谱》载有其草书《得书帖》及行书《闻时帖》。《隋书·经籍志》有《张华集》十卷,今已佚。明人张溥辑有《张茂先集》。', + quhuang:'屈晃(?—251),祖籍汝南(今河南省汝南县),汉末避乱南下,三国吴时居章安(今属椒江区)。初为郡吏,在职清廉,颇有政声。赤乌初年,擢为尚书仆射。', macheng:'马承,蜀汉骠骑将军马超之子。仕蜀汉,马超死后继承其斄乡侯爵位。', zhangzhi:'张芝(?—192年),字伯英,敦煌郡渊泉县(今甘肃省瓜州县)人。东汉书法家、“草书之祖”,大司农张奂的儿子。出身名门,拒绝朝廷征召,潜心研习书法。擅长草书中的章草,将古代当时字字区别、笔画分离的草法,改为上下牵连富于变化的新写法,富有独创性,在当时影响很大。李志敏评价:“张芝创造了草书问世以来的第一座高峰,精熟神妙,兼善章今”。 没有真迹传世,仅存《八月帖》等刻帖。汉献帝初平三年,去世于家中,著有《笔心论》,与钟繇、王羲之和王献之并称“书中四贤”。', ahuinan:'阿会喃,小说《三国演义》及其衍生作品中的角色,南蛮王孟获属下大将,第三洞元帅;与董荼那等人一起担任孟获的援军出征,但是被俘虏,又被诸葛亮释放,再次出战时,被唾骂不知羞耻,面红耳赤的退军。后同董荼那共同绑架孟获献于蜀军,却被诸葛亮在其二人与孟获的重要性间权衡后出卖了他们,放走了孟获,使其为孟获所杀。', @@ -665,6 +669,649 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //张翼 + oldianjun:{ + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + 'step 0' + player.damage('nosource'); + 'step 1' + var next=player.phaseUse(); + event.next.remove(next); + trigger.next.push(next); + }, + }, + olkangrui:{ + audio:2, + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return event.player==_status.currentPhase&&event.player.getHistory('damage').indexOf(event)==0; + }, + direct:true, + global:'olkangrui_ai', + content:function(){ + 'step 0' + player.chooseControl('cancel2').set('choiceList',[ + '令'+get.translation(trigger.player)+'回复1点体力', + '令'+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 + }); + },'hs')){ + return true; + } + })) list.push('选项二'); + if(list.length) return list.randomGet(); + return '选项一'; + }()); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('olkangrui',trigger.player); + player.draw(); + if(result.index==0) trigger.player.recover(); + else{ + trigger.player.addTempSkill('olkangrui_add'); + trigger.player.addMark('olkangrui_add',1,false); + trigger.player.addTempSkill('olkangrui_nil'); + } + } + }, + ai:{ + expose:0.2, + threaten:1.5, + }, + subSkill:{ + add:{ + trigger:{source:'damageBegin1'}, + charlotte:true, + forced:true, + onremove:true, + filter:function(event,player){ + return player.hasMark('olkangrui_add'); + }, + content:function(){ + trigger.num+=player.countMark('olkangrui_add'); + player.removeSkill('olkangrui_add'); + } + }, + nil:{ + trigger:{source:'damageSource'}, + 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'); + }, + mod:{ + maxHandcardBase:function(player,num){ + if(player.storage.olkangrui_nil) return 0; + }, + } + }, + 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]; + } + }, + } + } + }, + //朱儁 + olcuipo:{ + audio:2, + trigger:{source:'damageBegin1'}, + forced:true, + filter:function(event,player){ + var card=event.card; + if(player!=_status.currentPhase||!card||event.getParent().type!='card') return false; + return lib.skill.dcweidang.getLength(card)==player.getHistory('useCard').indexOf(event.getParent(2))+1; + }, + content:function(){ + trigger.num++; + }, + mod:{ + aiOrder:function(player,card,num){ + if(typeof card=='object'&&get.tag(card,'damage')&&lib.skill.dcweidang.getLength(card)==player.getHistory('useCard').length+1) return num+10; + }, + } + }, + //马休马铁 + olkenshang:{ + audio:2, + enable:'phaseUse', + filterCard:true, + selectCard:[1,Infinity], + check:function(card){ + return 5.5-get.value(card); + }, + position:'hes', + viewAs:{ + name:'sha', + storage:{olkenshang:true} + }, + onuse:function(links,player){ + player.addTempSkill('olkenshang_effect'); + }, + 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))]; + }, + }, + }, + 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); + } + 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; + }, + 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(){ + '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); + } + }, + 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; + }, + 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; + }) + }); + 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; + 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(negs.length) return negs.randomGet(); + if(choices.contains('mashu')) return 'mashu'; + return choices.randomGet(); + }); + } + 'step 1' + player.removeSkill(result.control); + player.popup(result.control); + game.log(player,'失去了技能','#g【'+get.translation(result.control)+'】'); + } + } + }, + }, + //董荼那 + 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(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(){ + 'step 0' + 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); + 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]); + } + } + 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)+'的目标'); + } + } + + }, + //张华 + olbihun:{ + audio:2, + trigger:{player:'useCardToTarget'}, + forced:true, + filter:function(event,player){ + if(event.target==player) return false; + return player.countCards('h')>player.getHandcardLimit(); + }, + group:'olbihun_give', + content:function(){ + 'step 0' + if(trigger.isFirstTarget&&trigger.targets.length==1){ + trigger.getParent()._olbihun=trigger.targets[0]; + } + trigger.targets.remove(trigger.target); + trigger.getParent().triggeredTargets2.remove(trigger.target); + trigger.untrigger(); + }, + ai:{ + threaten:0.8, + halfneg:true, + effect:{ + player:function(card,player,target){ + if(player!=target&&player.countCards('h')>player.getHandcardLimit()) return [0,0.5]; + }, + }, + }, + subSkill:{ + give:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return event._olbihun&&event._olbihun.isIn()&&event.cards.filterInD().length; + }, + forced:true, + popup:false, + content:function(){ + trigger._olbihun.gain(trigger.cards.filterInD(),'gain2'); + } + } + } + }, + olchuanwu:{ + audio:2, + trigger:{ + player:'damageEnd', + source:'damageSource', + }, + forced:true, + 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)+'】、'; + player.popup(i); + } + str=str.slice(0,-1); + game.log(player,'的技能','#g'+str,'失效了'); + player.draw(num); + }, + subSkill:{ + restore:{ + charlotte:true, + forced:true, + popup:false, + onremove:function(player){ + player.enableSkill('olchuanwu'); + game.log(player,'恢复了技能'); + } + } + } + }, + oljianhe:{ + audio:2, + enable:'phaseUse', + filterTarget:function(card,player,target){ + return !player.getStorage('oljianhe_chosen').contains(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); + } + 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); + }, + content:function(){ + 'step 0' + player.draw(cards.length); + 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,target)=>{ + return get.type2(card)==_status.event.type; + }).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); + 'step 2' + if(result.bool){ + var cards=result.cards; + target.loseToDiscardpile(cards); + target.draw(cards.length); + } + 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; + 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; + return -1; + } + } + }, + subSkill:{ + chosen:{ + charlotte:true, + onremove:true, + intro:{content:'本阶段已对$发动过技能'}, + } + } + }, + //屈晃 + 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').contains(current); + }); + }, + 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').contains(current); + }).sortBySeat(_status.currentPhase); + 'step 1' + 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')); + } + else event.goto(5); + 'step 2' + 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); + } + return sign*val; + }).sort((a,b)=>a-b)[0]; + }); + 'step 4' + if(result.bool){ + var targetx=result.targets[0]; + player.discardPlayerCard(targetx,'ej',true); + } + else{ + player.addTempSkill('olqiejian_ban','roundStart'); + player.markAuto('olqiejian_ban',[target]); + } + 'step 5' + if(targets.length) event.goto(1); + }, + subSkill:{ + ban:{ + onremove:true, + charlotte:true, + intro:{ + content:'本轮不能再对$发动〖切谏〗' + } + } + } + }, + olnishou:{ + audio:2, + trigger:{ + player:'loseAfter', + global:['loseAsyncAfter','equipAfter'], + }, + 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; + } + 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(){ + 'step 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])); + }); + event.cards=cards; + var phaseName; + 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); + 'step 1' + player.logSkill('olnishou'); + 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'); + } + }, + 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()){ + player.removeSkill('olnishou_swap'); + event.finish(); return; + } + 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){ + player.swapHandcards(target); + } + } + 'step 2' + player.removeSkill('olnishou_swap'); + } + } + } + }, //马承 olchenglie:{ audio:2, @@ -762,9 +1409,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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); - 'step 6' + game.updateRoundNumber(); + 'step 7' if(result.bool){ var card=result.links[0]; event.card=card; @@ -782,7 +1432,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('color',get.color(card)); } else event.finish(); - 'step 7' + 'step 8' if(result.bool){ var target=result.targets[0]; player.line(target); @@ -797,8 +1447,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.$give(cardx,target,false); } else event.finish(); - 'step 8' - if(event.cards.length) event.goto(5); + 'step 9' + if(event.cards.length) event.goto(6); else if(!event.isMine()&&!event.isOnline()) game.delayx(); }, marktext:'骋', @@ -1385,6 +2035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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); @@ -1482,7 +2133,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, olximo:{ - audio:2, + audio:3, trigger:{player:'logSkill'}, derivation:'olfeibai', filter:function(event,player){ @@ -2110,6 +2761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' 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]++; @@ -2274,7 +2926,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, direct:true, filter:function(event,player){ - if(event.player!=_status.currentPhase||!event.targets||event.targets.length!=1||event.type!='card') return false; + 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){ @@ -2324,23 +2976,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' var target=trigger.player; var list=lib.skill.cihuang.getList(player,target); - player.chooseButton([get.prompt('cihuang',target),'
视为对'+get.translation(target)+'使用以下的一张牌
',[list,'vcard']]).set('ai',function(button){ + 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], - isCard:true, storage:{cihuang:true}, },player=_status.event.player,target=_status.event.getTrigger().player; return get.effect(target,card,player,player); }); 'step 1' if(result.bool){ - player.useCard({ + var card={ name:result.links[0][2], nature:result.links[0][3], - isCard:true, storage:{cihuang:true}, - },false,trigger.player,'cihuang').oncard=function(card,player){ + }; + event.card=card; + player.chooseCard('he','雌黄:将一张牌当'+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}; + '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){ _status.event.directHit.addArray(game.filterPlayer()); }; } @@ -2356,6 +3020,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'dying'}, forced:true, + group:'sanku_nogain', content:function(){ 'step 0' player.loseMaxHp(); @@ -2364,6 +3029,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>0) player.recover(num); }, ai:{halfneg:true}, + subSkill:{ + nogain:{ + audio:'sanku', + trigger:{player:'gainMaxHpBegin'}, + forced:true, + content:function(){ + trigger.cancel(); + } + } + } }, //霍峻 qiongshou:{ @@ -2826,7 +3501,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseBegin'}, forced:true, - locked:false, popup:false, content:function(){ trigger._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0); @@ -4660,30 +5334,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }); player.chooseUseTarget(true,{name:'nanman'},cards); - 'step 1' - if(player.countMark('spmanwang')>=4) return; - var evt=player.getHistory('useCard',function(evt){ - return evt.card.name=='nanman'&&evt.getParent(2)==event; - })[0]; - if(evt&&evt.cards.length<=evt.targets.length&&player.hasSkill('spmanwang',null,null,false)){ - player.addMark('spmanwang',1,false); - switch(player.countMark('spmanwang')){ - case 1: - player.draw(2); - player.removeSkill('sppanqin'); - break; - case 2: - player.recover(); - break; - case 3: - player.draw(); - break; - case 4: - player.addSkill('sppanqin'); - break; - } - } + 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; + }, + content:function(){ + player.addMark('spmanwang',1,false); + switch(player.countMark('spmanwang')){ + case 1: + player.draw(2); + player.removeSkill('sppanqin'); + break; + case 2: + player.recover(); + break; + case 3: + player.draw(); + break; + case 4: + player.addSkill('sppanqin'); + break; + } + }, + } + } }, //清河公主 zengou:{ @@ -4854,7 +5535,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ var target=trigger.getParent().target; - trigger.num=target.getAllHistory('useCard',(evt)=>evt.card.name=='sha').length; + trigger.num=Math.max(1,target.getAllHistory('useCard',(evt)=>evt.card.name=='sha').length); target.addTempSkill('juesheng',{player:'phaseAfter'}); }, }, @@ -6320,7 +7001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); } - else event.goto(4); + else event.goto(5); 'step 3' if(game.hasPlayer(function(current){ return current!=player&¤t.countDiscardableCards(player,'he')>0; @@ -6375,7 +7056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ cards.removeArray(res); if(!event.given_map[target]) event.given_map[target]=[]; event.given_map[target].addArray(res); - if(cards.length) event.goto(5); + if(cards.length) event.goto(6); } else event.finish(); 'step 8' @@ -9786,7 +10467,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=trigger.player; var card=result.cards[0]; player.line(target,'green'); - target.addTempSkill('new_zhixi','phaseUseEnd'); + target.addTempSkill('new_zhixi','phaseUseAfter'); if(card.name!='sha'&&get.type(card)!='trick'&&get.color(card)!='black'){ target.addTempSkill('new_meibu_range','phaseUseEnd'); target.storage.meibu=player; @@ -9873,6 +10554,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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; + }, }, trigger:{ player:"useCard1", @@ -9881,6 +10565,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ popup:false, onremove:true, 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; + } + }); + } + }, onremove:function(player){ player.unmarkSkill('new_meibu'); delete player.storage.new_zhixi; @@ -10402,9 +11098,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' event.color=result.color; if(event.color=='black'){ - player.chooseTarget('弃置一名角色区域内的一张牌',function(card,player,target){ - return target.countCards('hej'); - }).set('ai',function(target){ + 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){ @@ -10414,7 +11112,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ att=Math.sqrt(att); } return att*lib.card.guohe.ai.result.target(player,target); - }) + }); + else event.finish(); } else{ var next=player.chooseTarget('令一名角色摸一张牌'); @@ -14275,6 +14974,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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; } } }, @@ -17862,7 +18565,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ multiline:true, selectTarget:function(){ if(get.mode()=='guozhan') return -1; - return [1,3]; + return [1,Infinity]; }, content:function(){ "step 0" @@ -17875,7 +18578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.recover(); } } - else if(targets.length<=2){ + else if(player.isMinHp()){ player.recover(); } } @@ -18573,7 +19276,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('bifa',result.targets[0]); event.card=result.cards[0]; target.storage.bifa2=[result.cards[0],player]; - target.addToExpansion(result.cards[0],player,'giveAuto').gaintag.add('bifa2'); + 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" @@ -18620,7 +19325,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, marktext:'檄', intro:{ - markcount:1, + markcount:()=>1, name:'笔伐', content:'已成为〖笔伐〗的目标', }, @@ -19376,7 +20081,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:"damageBegin1", }, filter:function (event,player){ - return event.player.countMark('xionghuo')>0; + return event.player.countMark('xionghuo')>0&&event.player!=player; }, content:function (){ trigger.num++; @@ -20432,7 +21137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterReplace:{ caoshuang:['caoshuang','ns_caoshuang'], caoang:['caoang','yj_caoang','tw_caoang'], - caohong:['tw_re_caohong','caohong','tw_caohong'], + caohong:['tw_re_caohong','caohong','tw_caohong','yj_caohong'], xiahouba:['xiahouba','tw_xiahouba'], maliang:['maliang','re_maliang','tw_maliang','ol_maliang','old_maliang'], dingfeng:['dingfeng','tw_dingfeng','old_dingfeng'], @@ -20442,7 +21147,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sunluyu:['sunluyu','re_sunluyu'], jin_simazhao:['jin_simazhao','simazhao','sp_simazhao'], jin_wangyuanji:['jin_wangyuanji','wangyuanji','sp_wangyuanji'], - wangyun:['re_wangyun','wangyun','dc_wangyun','old_wangyun'], + wangyun:['re_wangyun','wangyun','dc_wangyun','old_wangyun','pe_wangyun'], zhangliang:['re_zhangliang','zhangliang'], lingju:['lingju','old_lingju'], guansuo:['guansuo','ol_guansuo'], @@ -20474,6 +21179,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhugeguo:['tw_zhugeguo','zhugeguo'], wanglang:['wanglang','ol_wanglang'], tengfanglan:['dc_tengfanglan','tengfanglan'], + zhangyì:['ol_zhangyì','zhangyì'], + yuantanyuanshang:['yuantanyuanshang','yuantanyuanxiyuanshang'], + ruiji:['dc_ruiji','ruiji'] }, translate:{ "xinfu_lingren":"凌人", @@ -20487,7 +21195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_fujian":"伏间", "xinfu_fujian_info":"锁定技,结束阶段开始时,你观看一名随机的其他角色的随机X张手牌。(X为场上手牌最少的角色的手牌数)", "xinfu_xionghuo":"凶镬", - "xinfu_xionghuo_info":"游戏开始时,你获得3个“暴戾”标记。出牌阶段,你可以交给一名其他角色一个“暴戾”标记,你对有“暴戾”标记的角色造成伤害时,此伤害+1。有“暴戾”的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其一张手牌和一张装备区的牌。", + "xinfu_xionghuo_info":"游戏开始时,你获得3个“暴戾”标记。出牌阶段,你可以交给一名其他角色一个“暴戾”标记,你对有“暴戾”标记的其他角色造成伤害时,此伤害+1。有“暴戾”的其他角色的出牌阶段开始时,其移去所有“暴戾”标记并随机执行一项:1.受到1点火焰伤害且本回合不能对你使用【杀】;2.失去1点体力且本回合手牌上限-1;3.你随机获得其一张手牌和一张装备区的牌。", xionghuo:"凶镬", "xionghuo_info":"", "xionghuo_disable":"凶镬", @@ -21147,7 +21855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ suishi_info:'当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力', quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。', junbing_info:'一名角色的结束阶段开始时,若其手牌数不大于1,该角色可以摸一张牌。若如此做,该角色将所有手牌交给你,然后你交给其等量的牌。', - xiongyi_info:'限定技,出牌阶段,你可以选择至多三名角色,这些角色各摸三张牌;若你选择的角色数不超过2,你回复1点体力', + xiongyi_info:'限定技,出牌阶段,你可以选择任意名角色,这些角色各摸三张牌。然后若你的体力值最小,你回复1点体力。', xiongyi_info_guozhan:'限定技,出牌阶段,你可以令与你势力相同的所有角色各摸三张牌,然后若你的势力是角色最少的势力(或之一),则你回复1点体力。', shenzhi_info:'准备阶段开始时,你可以弃置所有手牌。若你以此法弃置的牌数不小于X,你回复1点体力(X为你的体力值)。', shushen_info:'当你回复1点体力时,你可以令一名其他角色选择回复1点体力或摸两张牌。', @@ -21362,7 +22070,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuanchou:'怨仇', yuanchou_info:'锁定技。当你使用黑色【杀】指定目标角色后或成为黑色【杀】的目标角色后,你令目标角色的防具技能无效直到此【杀】被抵消或造成伤害。', juesheng:'决生', - juesheng_info:'限定技。出牌阶段,你可视为使用一张【决斗】。当你因此【决斗】造成伤害时,你将伤害值改为X(X为目标角色本局游戏内使用过【杀】的数量)且令目标角色获得此技能直到其下回合结束。', + juesheng_info:'限定技。出牌阶段,你可视为使用一张【决斗】。当你因此【决斗】造成伤害时,你将伤害值改为X(X为目标角色本局游戏内使用过【杀】的数量且至少为1)且令目标角色获得此技能直到其下回合结束。', qinghegongzhu:'清河公主', zengou:'谮构', zengou_info:'当有角色使用【闪】时,若其在你的攻击范围内,则你可以弃置一张非基本牌或失去1点体力,然后取消此【闪】的目标并获得其对应的实体牌。', @@ -21372,7 +22080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ spmanwang:'蛮王', spmanwang_info:'出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前X项:⒈获得〖叛侵〗。⒉摸一张牌。⒊回复1点体力。⒋摸两张牌并失去〖叛侵〗。', sppanqin:'叛侵', - sppanqin_info:'出牌阶段或弃牌阶段结束时,你可将你于本阶段内弃置且位于弃牌堆的所有牌当做【南蛮入侵】使用。然后若此牌对应的实体牌数不大于此牌的目标数,则你执行并移除〖蛮王〗中的最后一个选项。', + sppanqin_info:'出牌阶段或弃牌阶段结束时,你可将你于本阶段内弃置且位于弃牌堆的所有牌当做【南蛮入侵】使用。然后若此牌被使用时对应的实体牌数不大于此牌的目标数,则你执行并移除〖蛮王〗中的最后一个选项。', tengfanglan:'滕芳兰', luochong:'落宠', luochong_info:'准备阶段开始时/当你于一回合内首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):⒈令一名角色回复1点体力。⒉令一名角色失去1点体力。⒊令一名角色弃置两张牌。⒋令一名角色摸两张牌。', @@ -21383,7 +22091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuanzi_info:'每轮限一次。其他角色的准备阶段开始时,你可将所有手牌交给该角色。若如此做,当该角色于本回合内造成伤害后,若其手牌数不小于你,则你摸两张牌。', liejie:'烈节', liejie_info:'当你受到伤害后,你可以弃置至多三张牌,摸等量的牌,然后可弃置伤害来源的至多X张牌(X为你以此法弃置的红色牌的数量)。', - ruiji:'芮姬', + ruiji:'OL芮姬', qiaoli:'巧力', qiaoli_info:'①你可以将一张装备牌当做【决斗】使用。若此【决斗】对应的实体牌:为武器牌,当你以此法声明使用【决斗】后,你摸X张牌(X为此牌的攻击范围),且可以将其中任意张牌分配给其他角色;不为武器牌,此牌不可被响应。②结束阶段开始时,若你于本回合内发动过〖巧力①〗,则你从牌堆中获得一张装备牌。', qiaoli_given:'已分配', @@ -21433,7 +22141,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tongxie_info:'出牌阶段开始时,你可以选择包括你在内的至多三名角色(你与这些角色均称为“同协角色”)。这些角色中手牌数唯一最少的角色摸一张牌,且你获得如下效果直到你下回合开始:①当有“同协角色”对唯一目标角色使用的【杀】结算结束后,其他“同协角色”可以依次对目标角色使用一张【杀】(无距离和次数限制,且不能再触发此效果)。②当有“同协角色”受到伤害时,其他“同协角色”(本回合内失去过体力的角色除外)可以防止此伤害,失去1点体力。', jin_zhouchu:'周处', shanduan:'善断', - shanduan_info:'①回合开始时,你生成数组R=[1,2,3,4]。②摸牌阶段开始时,你从数组R中选择并移除一个数字A。你本阶段的额定摸牌数改为A。③出牌阶段开始时,你从数组R中选择并移除两个数字B和C。你将你本阶段内的攻击范围基数最小值和使用【杀】的次数上限基础值改为B和C。④弃牌阶段开始时,你从数组R中选择并移除一个数字D。你令你本回合的手牌上限基数改为D。⑤当你于回合外受到伤害后,你令下回合生成的R中最小的一个数字+1。', + shanduan_info:'锁定技。①回合开始时,你生成数组R=[1,2,3,4]。②摸牌阶段开始时,你从数组R中选择并移除一个数字A。你本阶段的额定摸牌数改为A。③出牌阶段开始时,你从数组R中选择并移除两个数字B和C。你将你本阶段内的攻击范围基数最小值和使用【杀】的次数上限基础值改为B和C。④弃牌阶段开始时,你从数组R中选择并移除一个数字D。你令你本回合的手牌上限基数改为D。⑤当你于回合外受到伤害后,你令下回合生成的R中最小的一个数字+1。', yilie:'义烈', yilie_info:'每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。', caoxiancaohua:'曹宪曹华', @@ -21445,7 +22153,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liangyuan_info:'每轮每项各限一次。你可以将场上所有的“灵杉”/“玉树”置于处理区,然后将这些牌当做【酒】/【桃】使用。', jisi:'羁肆', jisi_info:'限定技。准备阶段,你可以令一名其他角色获得你武将牌上的一个已发动过的其他技能。然后你弃置所有手牌,并视为对其使用一张【杀】(无距离关系的限制)。', - huojun:'霍峻', + huojun:'OL霍峻', qiongshou:'穷守', qiongshou_info:'锁定技。①游戏开始时,你废除所有装备栏并摸四张牌。②你的手牌上限+4。', fenrui:'奋锐', @@ -21454,9 +22162,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yangkuang:'阳狂', yangkuang_info:'当你回复体力后,若你的体力值等于体力上限,则你可以视为使用一张【酒】,然后当前回合角色摸一张牌,你摸一张牌。', cihuang:'雌黄', - cihuang_info:'当有牌被抵消后,若此牌的目标数为1且此牌的使用者A为当前回合角色,则你可以视为对A使用一张你本轮内未使用过的属性【杀】或单目标锦囊牌(不可被响应)。', + cihuang_info:'当有牌被抵消后,若此牌的目标数为1且此牌的使用者A为当前回合角色,则你可以将一张牌当做一张你本轮内未使用过的属性【杀】或单目标锦囊牌对A使用(不可被响应)。', sanku:'三窟', - sanku_info:'锁定技。当你进入濒死状态时,你减1点体力上限,然后将体力回复至体力上限。', + sanku_info:'锁定技。①当你进入濒死状态时,你减1点体力上限,然后将体力回复至体力上限。②当你加体力上限前,取消之。', dengzhong:'邓忠', dzkanpo:'勘破', dzkanpo_info:'①当你因执行【杀】的效果而造成伤害后,你可以观看目标角色的手牌,然后获得其中一张与此【杀】花色相同的牌。②每回合限一次,你可以将一张手牌当做【杀】使用。', @@ -21503,6 +22211,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ macheng:'马承', olchenglie:'骋烈', olchenglie_info:'当你使用【杀】选择目标后,你可以令至多两名角色也成为此牌目标,并展示牌堆顶的等同于目标数张牌,然后你可以将一张手牌与其中一张牌交换,将这些牌扣置于每名目标角色武将牌上,称为“骋烈”牌。此牌结算结束后:1.若有红色“骋烈”牌的角色:响应过此【杀】,其交给你一张牌;未响应此【杀】,其回复1点体力;2.有“骋烈”牌的角色将其“骋烈”牌置入弃牌堆。', + quhuang:'屈晃', + olqiejian:'切谏', + olqiejian_info:'当一名角色失去最后的手牌后,你可以摸一张牌,然后令其摸一张牌,你选择一项:1.弃置你或其场上的一张牌;2.你于本轮不能再对其发动此技能。', + olnishou:'泥首', + olnishou_info:'锁定技。当你装备区里的牌进入弃牌堆后,你选择一项:1.将这些牌中第一张能当【闪电】对你使用的牌当【闪电】使用;2.本阶段结束时,你与一名手牌数最少的角色交换手牌。', + zhanghua:'张华', + olbihun:'弼昏', + olbihun_info:'锁定技。当你使用牌指定一名角色为目标时:若其为第一个目标且此牌目标数为1,你令其获得此牌;若其不为你且你的手牌数大于手牌上限,取消此目标。', + olchuanwu:'穿屋', + olchuanwu_info:'锁定技。当你造成或受到伤害后,你令武将牌上的前X个未失效的技能失效直到回合结束。然后你摸等同于你此次失效的技能数张牌(X为你的攻击范围)。', + oljianhe:'剑合', + oljianhe_info:'出牌阶段每名角色限一次。你可以重铸至少两张同名牌或至少两张装备牌,然后令一名角色选择一项:1.重铸等量张与你以此法重铸的牌类型相同的牌;2.受到你造成的1点雷电伤害。', + dongtuna:'董荼那', + oljianman:'鹣蛮', + oljianman_info:'锁定技。一名角色的回合结束时,若本回合被使用过的基本牌数不小于2,且前两张基本牌的使用者:均为你,你视为使用其中的一张牌;有且仅有其中之一为你,你弃置另一名使用者一张牌。', + maxiumatie:'马休马铁', + olkenshang:'垦伤', + olkenshang_info:'你可以将任意张牌当【杀】使用,然后你可以将此牌目标改为所有你攻击范围外的角色。此牌结算结束后,若此牌对应的实体牌数大于X,你摸X张牌(X为此牌造成过的伤害值),否则你失去一个技能。', + ol_zhujun:'OL朱儁', + olcuipo:'摧破', + olcuipo_info:'锁定技。当你于回合内造成伤害时,若此伤害的渠道为你于此回合使用的第X张牌且受伤角色为此牌的目标,你令此伤害+1(X为此牌牌名的字数)。', + ol_zhangyì:'OL张翼', + oldianjun:'殿军', + oldianjun_info:'锁定技。回合结束时,你受到1点无来源伤害,然后执行一个额外的出牌阶段。', + olkangrui:'亢锐', + olkangrui_info:'当一名角色于其回合内首次受到伤害后,你可以摸一张牌并选择一项:1.令其回复1点体力;2.令其于本回合下次造成的伤害+1,然后当其于本回合造成伤害后,其本回合手牌上限基数为0。', sp_tianji:'天极·皇室宗亲', sp_sibi:'四弼·辅国文曲', diff --git a/character/sp2.js b/character/sp2.js index 8255ba8e0..0f5809b23 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,20 +4,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + dc_ruiji:['female','wu',4,['dcwangyuan','dclingyin','dcliying']], + zhoushan:['male','wu',4,['dcmiyun','dcdanying'],['unseen']], + zerong:['male','qun',4,['dccansi','dcfozong'],['unseen']], + gaoxiang:['male','shu',4,['dcchiying'],['unseen']], + xielingyu:['female','wu',3,['dcyuandi','dcxinyou'],['unseen']], + yuanyin:['male','qun',3,['dcmoshou','dcyunjiu'],['unseen']], + dongwan:['female','qun',3,['dcshengdu','dcxianjiao'],['unseen']], + zhangchu:['female','qun',3,['dcjizhong','dcjucheng','dcguangshi'],['unseen']], + peiyuanshao:['male','qun',4,['dcmoyu'],['unseen']], mengjie:['male','qun',3,['dcyinlu','dcyouqi']], dc_fuwan:['male','qun',4,['dcmoukui']], dc_yangbiao:['male','qun',3,['dczhaohan','dcjinjie','dcjue']], - dc_huojun:['male','shu',4,['dcgue','dcsigong'],['unseen']], + dc_huojun:['male','shu',4,['dcgue','dcsigong']], guānning:['male','shu',3,['dcxiuwen','dclongsong'],['unseen']], dc_sunhanhua:['female','wu',3,['dchuiling','dcchongxu'],['unseen']], - dc_sunziliufang:['male','wei',3,['dcqinshen','dcweidang'],['unseen']], - dc_tengfanglan:['female','wu',3,['dcluochong','dcaichen'],['unseen']], - yuantanyuanxiyuanshang:['male','qun',4,['dcneifa'],['unseen']], + dc_sunziliufang:['male','wei',3,['dcqinshen','dcweidang']], + dc_tengfanglan:['female','wu',3,['dcluochong','dcaichen']], + yuantanyuanxiyuanshang:['male','qun',4,['dcneifa']], sunhuan:['male','wu',4,['dcniji'],['unseen']], - qiaorui:['male','qun',4,['dcaishou','dcsaowei'],['unseen']], + qiaorui:['male','qun',4,['dcaishou','dcsaowei']], yanghong:['male','qun',3,['dcjianji','dcyuanmo'],['unseen']], xianglang:['male','shu',3,['dckanji','dcqianzheng'],['unseen']], - qinlang:['male','wei',4,['dcningchong','dcjinjin'],['unseen']], + qinlang:['male','wei',4,['dchaochong','dcjinjin']], furongfuqian:['male','shu','4/6',['dcxuewei','dcyuguan']], zhenghun:['male','wei',3,['dcqiangzhi','dcpitian'],['unseen']], dc_zhaotongzhaoguang:['male','shu',4,['yizan_use','dcqingren','dclongyuan']], @@ -214,15 +223,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_binglin:['re_niujin',"sp_mifangfushiren",'licaiwei','dc_zhaoyan','shiyi','sunlang','sunhuan'], sp_danqi:['dufuren','qinyilu','bianxi','dc_huban','dc_hujinding','dc_zhaoyǎn','wangwei','liyixiejing','guānning'], sp_fenghuo:['re_nanhualaoxian','tongyuan','zhangning','re_pangdegong'], - sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang'], + sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'], sp_caizijiaren:['re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru'], - sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang'], + sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang'], sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang'], - sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui'], + sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui','dongwan','yuanyin'], sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'], sp_zongheng:['huaxin','luyusheng','re_xunchen','re_miheng','fengxi','re_dengzhi','dc_yanghu','zongyu'], - sp_taiping:['guanhai','liupi'], - sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun'], + sp_taiping:['guanhai','liupi','peiyuanshao','zhangchu'], + sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun','gaoxiang'], sp_jishi:['dc_jiben','zhenghun','dc_sunhanhua'], sp_raoting:['dc_huanghao','dc_sunziliufang'], sp_huangjin:['liuhong','zhujun','re_hansui',"xushao"], @@ -231,19 +240,1005 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'], sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'], sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong'], - sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān'], + sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'], sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao'], - sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji'], + sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu'], sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'], sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen'], sp2_yinyu:['zhouyi','luyi'], - sp2_doukou:['re_xinxianying','huaman','xuelingyun'], + sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji'], sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong'], sp2_yuxiu:['dongguiren','dc_tengfanglan'], sp_decade:['caobuxing','re_maliang','xin_baosanniang','dongxie','liuhui','gongsundu'], } }, skill:{ + //芮姬 + dcwangyuan:{ + audio:2, + trigger:{ + player:['loseAfter','logSkill'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + frequent:true, + filter:function(event,player,name){ + if(player==_status.currentPhase) return (name=='logSkill'&&event.skill=='dcliying'); + if(player.getExpansions('dcwangyuan').length>=game.countPlayer()) return false; + if(event.name=='gain'&&event.player==player) return false; + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.length>0; + }, + content:function(){ + 'step 0' + var cards=player.getExpansions('dcwangyuan'); + var card=get.cardPile2(cardx=>{ + var type=get.type2(cardx); + return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); + }); + if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan'); + }, + marktext:'妄', + intro:{ + name:'妄(妄缘/铃音)', + content:'expansion', + markcount:'expansion', + }, + }, + dclingyin:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.getExpansions('dcwangyuan').length; + }, + direct:true, + content:function(){ + 'step 0' + var cards=player.getExpansions('dcwangyuan'); + player.chooseButton([ + get.prompt('dclingyin')+'(当前轮数:'+get.cnNumber(game.roundNumber,true)+')', + cards + ],[1,game.roundNumber]).set('ai',button=>{ + var color=_status.event.color,player=_status.event.player; + if(ui.selected.buttons.length>0&&ui.selected.buttons.length==player.getExpansions('dcwangyuan').length-1) return 0; + if(color==1) return get.value(button.link); + if(color) return get.color(button.link)==color?1:0; + return 0; + }).set('color',function(){ + var cardsR=cards.filter(i=>get.color(i)=='red'); + if(cardsR.length==cards.length||cardsR.length==0) return 1; + if(cardsR.length<=game.roundNumber) return 'red'; + if(cards.length-cardsR.length<=game.roundNumber) return 'black'; + return 1; + }()); + 'step 1' + if(result.bool){ + player.logSkill('dclingyin'); + var cards=result.links; + player.gain(cards,'gain2'); + var cardsx=player.getExpansions('dcwangyuan').removeArray(cards); + if(cardsx.length<=1||get.color(cardsx)!='none'){ + player.addTempSkill('dclingyin_effect'); + game.log(player,'获得了','#g【铃音】','的后续效果'); + } + } + }, + ai:{ + combo:'dcwangyuan', + threaten:3, + }, + subSkill:{ + effect:{ + audio:'dclingyin', + enable:'phaseUse', + trigger:{source:'damageBegin1'}, + viewAs:{name:'juedou'}, + charlotte:true, + forced:true, + prompt:'将一张武器牌或防具牌当【决斗】使用', + filterCard:function(card){ + return get.subtype(card)=='equip1'||get.subtype(card)=='equip2'; + }, + position:'hes', + filter:function(event,player){ + if(event.name=='chooseToUse') return player.countCards('hes',{subtype:['equip1','equip2']})>0||_status.connectMode; + return event.player!=player; + }, + content:function(){ + trigger.num++; + } + } + } + }, + dcliying:{ + audio:2, + usable:1, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, + filter:function(event,player){ + var cards=event.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); + if(!cards.length) return false; + var evt=event.getParent('phaseDraw'); + if(evt&&evt.name=='phaseDraw') return false; + return true; + }, + direct:true, + content:function(){ + 'step 0' + var cards=trigger.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); + player.chooseCardTarget({ + prompt:get.prompt('dcliying'), + prompt2:'选择本次获得的任意张牌交给一名其他角色,然后摸一张牌', + filterTarget:lib.filter.notMe, + filterCard:card=>_status.event.cards.contains(card), + cards:cards, + selectCard:[1,cards.length], + ai1:function(card){ + if(ui.selected.cards.length) return 0; + return 3/(Math.abs(get.value(card))+0.1) + }, + ai2:function(target){ + return get.value(ui.selected.cards,target)*get.attitude(_status.event.player,target); + }, + }).set('cards',cards); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcliying',target); + player.give(result.cards,target); + player.draw(); + //if(player!=_status.currentPhase) event.finish(); + } + else{ + player.storage.counttrigger.dcliying--; + event.finish(); + }/* + 'step 2' + var cards=player.getExpansions('dcwangyuan'); + var card=get.cardPile2(cardx=>{ + var type=get.type2(cardx); + return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); + }); + if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan');*/ + } + }, + //裴元绍 + dcmoyu:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('dcmoyu_ban'); + }, + filterTarget:function(card,player,target){ + return player!=target&&!player.getStorage('dcmoyu_clear').contains(target)&&target.countGainableCards(player,'hej'); + }, + content:function(){ + 'step 0' + player.addTempSkill('dcmoyu_clear'); + player.markAuto('dcmoyu_clear',[target]); + player.gainPlayerCard(target,'hej',true); + 'step 1' + var num=player.getStorage('dcmoyu_clear').length; + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'是否对'+get.translation(player)+'使用一张【杀】(伤害基数为'+num+')?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',player).set('num',num).set('oncard',card=>{ + var evt=_status.event; + evt.baseDamage=evt.num; + }); + 'step 2' + if(result.bool){ + if(player.hasHistory('damage',evt=>{ + return evt.card&&evt.card.name=='sha'&&evt.getParent(4)==event; + })) player.addTempSkill('dcmoyu_ban'); + } + }, + subSkill:{ + clear:{ + charlotte:true, + onremove:true, + }, + ban:{charlotte:true} + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + var eff=get.effect(target,{name:'shunshou'},player,player); + if(eff>0) return eff/10; + if(player.hasShan()&&!target.hasSkillTag('directHit_ai',true,{ + target:player, + card:{name:'sha'}, + },true)) return eff; + if(player.getStorage('dcmoyu_clear').length||player.hp+player.countCards('hs','tao')<=1) return 0; + return eff; + } + } + } + }, + //张楚 + dcjizhong:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + selectTarget:1, + content:function(){ + 'step 0' + target.draw(2); + 'step 1' + var marked=target.hasMark('dcjizhong'); + if(marked){ + if(target.countCards('h')) target.chooseToDiscard('集众:弃置三张手牌',3,true); + event.finish(); + } + else{ + target.chooseToDiscard('集众:弃置三张手牌,或点击“取消”获得“信众”标记',3); + } + 'step 2' + target.addMark('dcjizhong',1); + }, + marktext:'信', + intro:{ + name:'信众', + name2:'信众', + markcount:()=>0, + content:'已成为信徒', + }, + ai:{ + order:9.5, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0) return 1; + var num=target.countCards('h'); + if(num<=1) return -num; + return -1/(num/2+1); + } + } + } + }, + dcjucheng:{ + audio:2, + trigger:{player:'useCardAfter'}, + usable:1, + filter:function(event,player){ + if(!event.targets||event.targets.length!=1||event.targets[0]==player) return false; + var card=event.card; + var target=event.targets[0]; + var marked=target.hasMark('dcjizhong'); + return (get.type(card)=='trick'||get.color(card)=='black'&&get.type(card)=='basic')&& + (marked||!marked&&game.hasPlayer(current=>current.hasMark('dcjizhong'))); + }, + direct:true, + content:function(){ + 'step 0' + var target=trigger.targets[0]; + var card={name:trigger.card.name,nature:trigger.card.nature,isCard:true}; + event.target=target; + event.card=card; + if(target.hasMark('dcjizhong')) player.gainPlayerCard(get.prompt('dcjucheng',target),target,'hej').set('logSkill',['dcjucheng',target]); + else{ + player.chooseBool(get.prompt('dcjucheng',target),'令所有有“信众”的角色依次视为对其使用一张'+get.translation(card)).set('ai',()=>{ + return _status.event.bool; + }).set('bool',function(){ + var eff=0; + game.countPlayer(current=>{ + if(!current.hasMark('dcjizhong')) return; + eff+=get.effect(target,card,current,player); + }); + return eff>0; + }()); + } + 'step 1' + if(!result.bool){ + player.storage.counttrigger.dcjucheng--; + return; + } + if(target.hasMark('dcjizhong')) event.finish(); + else{ + player.logSkill('dcjucheng',target); + event.targets=game.filterPlayer(current=>current.hasMark('dcjizhong')); + } + 'step 2' + var current=event.targets.shift(); + if(current.canUse(card,target,false)){ + current.useCard(card,target,false); + } + if(event.targets.length) event.redo(); + } + }, + dcguangshi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return !game.hasPlayer(current=>current!=player&&!current.hasMark('dcjizhong')); + }, + forced:true, + content:function(){ + player.loseHp(); + player.draw(2); + } + }, + //董绾 + dcshengdu:{ + audio:2, + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ + 'step 0' + if(target) event._result={bool:true,targets:[target]}; + else player.chooseTarget(get.prompt2('dcshengdu'),lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + var att=get.attitude(player,target); + var eff=get.effect(target,{ + name:'sha', + storage:{dcxianjiao:true}, + },player,player); + var value=att/5; + if(value<0) value=-value/1.3; + value=Math.max(value-eff/20,0.01); + var skills=target.getSkills(null,false,false); + for(var skill of skills){ + var str=get.skillInfoTranslation(skill,target); + if(/摸牌阶段[^少放弃]{0,8}摸/.test(str)) value+=Math.random()/2+1.5; + } + return value; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcshengdu',target); + target.addSkill('dcshengdu_effect'); + target.markAuto('dcshengdu_effect',[player]); + } + }, + subSkill:{ + effect:{ + trigger:{player:'gainAfter'}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player){ + return event.getParent(2).name=='phaseDraw'; + }, + content:function(){ + 'step 0' + var targets=player.getStorage('dcshengdu_effect'); + event.targets=targets.sortBySeat(player); + 'step 1' + var target=targets.shift(); + if(target.isIn()){ + target.logSkill('dcshengdu_effect',player); + target.draw(trigger.cards.length); + } + if(targets.length) event.redo(); + 'step 2' + player.removeSkill('dcshengdu_effect'); + game.delayx(); + }, + marktext:'绞', + intro:{ + content:'下个摸牌阶段获得牌后,$摸等量的牌' + } + } + } + }, + dcxianjiao:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'hs', + viewAs:{ + name:'sha', + storage:{dcxianjiao:true} + }, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + return get.color(card)!=get.color(ui.selected.cards[0]); + } + return true; + }, + selectCard:2, + complexCard:true, + check:function(card){ + return 6-get.value(card); + }, + precontent:function(){ + player.addTempSkill('dcxianjiao_after'); + event.getParent().addCount=false; + }, + ai:{ + order:function(item,player){ + return get.order({name:'sha'})+0.1; + }, + }, + locked:false, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dcxianjiao) return true; + }, + }, + subSkill:{ + after:{ + trigger:{global:'useCardAfter'}, + forced:true, + direct:true, + charlotte:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.card.storage&&event.card.storage.dcxianjiao; + }, + content:function(){ + 'step 0' + var damaged=game.hasPlayer2(current=>{ + return current.hasHistory('damage',evt=>evt.card==trigger.card); + }); + var targets=trigger.targets.filter(i=>i.isIn()); + player.logSkill('dcxianjiao_after',targets); + if(damaged){ + for(var target of targets){ + target.loseHp(); + } + } + else{ + for(var target of targets){ + var next=game.createEvent('dcshengdu',false); + next.player=player; + next.target=target; + next.setContent(lib.skill.dcshengdu.content); + } + } + } + } + } + }, + //袁胤 + dcmoshou:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + init:function(player,skill){ + if(typeof player.storage[skill]!='number') player.storage[skill]=0; + }, + filter:function(event,player){ + return get.color(event.card)=='black'&&event.player!=player; + }, + frequent:true, + prompt2:function(event,player){ + var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length%3+1; + return '摸'+get.cnNumber(num)+'张牌'; + }, + content:function(){ + var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length; + player.storage.dcmoshou=num; + player.syncStorage('dcmoshou'); + player.markSkill('dcmoshou'); + num=(num-1)%3+1; + player.draw(num); + }, + mark:true, + marktext:'守', + intro:{ + markcount:function(storage,player){ + if(typeof storage!='number') return 1; + return storage%3+1; + }, + content:'本局游戏已发动过$次技能', + } + }, + dcyunjiu:{ + audio:2, + trigger:{global:'dieAfter'}, + direct:true, + content:function(){ + 'step 0' + var evt=trigger.player.getHistory('lose',evtx=>{ + return evtx.getParent(2)==trigger; + })[0]; + if(!evt) event.finish(); + else{ + var cards=[]; + //冷知识,角色死亡后只有手牌区和装备区的牌是被系统弃置的,其余牌的处理方式均为置入弃牌堆 + cards.addArray(evt.hs).addArray(evt.es); + event.cards=cards.filterInD('d'); + var num=cards.length; + if(num){ + event.videoId=lib.status.videoId++; + var func=function(cards,id){ + var num=cards.length; + var dialog=ui.create.dialog(get.prompt('dcyunjiu'),'
弃置'+get.cnNumber(num)+'张牌,令一名其他角色获得以下这些牌
',cards); + dialog.videoId=id; + return dialog; + }; + if(player.isOnline2()){ + player.send(func,cards,event.videoId); + } + event.dialog=func(cards,event.videoId); + if(player!=game.me||_status.auto){ + event.dialog.style.display='none'; + } + player.chooseCardTarget({ + prompt:false, + filterTarget:lib.filter.notMe, + filterCard:lib.filter.cardDiscardable, + selectCard:num, + position:'he', + goon:function(){ + if(!game.hasPlayer(current=>get.attitude(player,current))>0) return false; + var value=0; + for(var card of cards){ + value+=get.value(card,player,'raw')-1.2; + } + return value>0; + }(), + ai1:function(card){ + if(_status.event.goon){ + if(ui.selected.cards.length==_status.event.selectCard[1]-1&&ui.selected.cards.length>0) return 7-get.value(card); + return 5.5-get.value(card); + } + return 0; + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)/Math.sqrt(target.countCards('h')+1); + } + }); + } + else event.finish(); + } + 'step 1' + if(player.isOnline2()){player.send('closeDialog',event.videoId)} + event.dialog.close(); + if(result.bool){ + var cardsx=result.cards,target=result.targets[0]; + player.logSkill('dcyunjiu',target); + player.discard(cardsx); + target.gain(cards.filterInD('d'),'gain2').giver=player; + } + else event.finish(); + 'step 2' + player.gainMaxHp(); + player.recover(); + } + }, + //谢灵毓 + dcyuandi:{ + audio:2, + trigger:{global:'useCard'}, + filter:function(event,player){ + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=event.player) return false; + if(event.player==player||!event.targets||event.targets.length>1||event.targets[0]!=event.player) return false; + return event.player.getHistory('useCard',evtx=>{ + return evtx.getParent('phaseUse')==evt; + }).indexOf(event)==0; + }, + direct:true, + global:'dcyuandi_ai', + content:function(){ + 'step 0' + var target=trigger.player; + var name=get.translation(target); + var choices=['选项二']; + var choiceList=['弃置'+name+'一张手牌','你与'+name+'各摸一张牌']; + if(target.countDiscardableCards(player,'h')) choices.unshift('选项一'); + else choiceList[0]=''+choiceList[0]+''; + player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('prompt',get.prompt('dcyuandi',trigger.player)).set('choice',function(){ + if(get.attitude(player,target)<0){ + if(choices.contains('选项一')) return '选项一'; + return 'cancel2'; + } + return '选项二'; + }()); + 'step 1' + if(result.control!='cancel2'){ + var target=trigger.player; + player.logSkill('dcyuandi',target); + if(result.control=='选项一'){ + player.discardPlayerCard(target,'h',true); + } + else game.asyncDraw([target,player]); + } + }, + subSkill:{ + ai:{ + mod:{ + aiOrder:function(player,card,num){ + var info=get.info(card); + if(!info||!info.toself) return; + var evt=_status.event.getParent('phaseUse'); + if(!evt||evt.player!=player) return; + if(player.hasHistory('useCard',evtx=>evtx.getParent('phaseUse')==evt)) return; + if(game.hasPlayer(current=>{ + return current.hasSkill('dcyuandi')&&get.attitude(player,current)>=0; + })) return num+10; + return num/3; + }, + }, + }, + } + }, + dcxinyou:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h'){ + return evt.getParent(2)==event&&evt.cards.length>=2; + })) check|=1; + if(game.getGlobalHistory('changeHp',evt=>{ + return evt.getParent().name=='recover'&&evt.getParent(2)==event; + }).length) check|=2; + if(check>0){ + player.addTempSkill('dcxinyou_effect'); + player.storage.dcxinyou_effect=check; + } + }, + ai:{ + order:1, + result:{player:1} + }, + subSkill:{ + effect:{ + audio:'dcxinyou', + trigger:{player:'phaseJieshuBegin'}, + charlotte:true, + forced:true, + onremove:true, + filter:function(event,player){ + return player.storage.dcxinyou_effect; + }, + content:function(){ + if((player.storage.dcxinyou_effect&1)>0) player.loseHp(); + if((player.storage.dcxinyou_effect&2)>0) player.chooseToDiscard('心幽:弃置两张牌',2,true,'he'); + } + } + } + }, + //高翔 + dcchiying:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.hp<=player.hp; + }, + content:function(){ + 'step 0' + var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player).sortBySeat(player); + event.targets=targets; + 'step 1' + var current=targets.shift(); + if(current.countCards('he')) current.chooseToDiscard('驰应:请弃置一张牌','he',true); + if(targets.length) event.redo(); + 'step 2' + if(target!=player){ + var cards=[]; + game.getGlobalHistory('cardMove',evt=>{ + if(evt.getParent(3)==event){ + cards.addArray(evt.cards.filter(card=>get.type(card)=='basic')); + } + }); + cards=cards.filterInD('d'); + if(cards.length) target.gain(cards,'gain2'); + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player); + var eff=0; + for(var targetx of targets){ + var effx=get.effect(targetx,{name:'guohe_copy2'},player,target); + if(get.attitude(player,targetx)<0) effx/=2; + eff+=effx; + } + return (target==player?0.5:1)*eff*(get.attitude(player,target)<=0?0.75:1); + } + } + } + }, + //笮融 + dccansi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget('残肆:选择一名其他角色',true,lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + var list=['recover','sha','juedou','huogong']; + return list.reduce((p,c)=>{ + return p+get.effect(target,{name:c},player,player); + },0); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('dccansi',target); + player.recover(); + target.recover(); + event.list=['sha','juedou','huogong']; + player.addTempSkill('dccansi_draw'); + player.storage.dccansi_draw=target; + } + else event.finish(); + 'step 2' + var card={name:event.list.shift(),isCard:true}; + if(player.canUse(card,target,false)) player.useCard(card,target,false); + if(event.list.length) event.redo(); + 'step 3' + player.removeSkill('dccansi_draw'); + }, + subSkill:{ + draw:{ + trigger:{global:'damageEnd'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return event.getParent(3).name=='dccansi'&&player.storage.dccansi_draw==event.player; + }, + content:function(){ + player.draw(2); + } + } + } + }, + dcfozong:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countCards('h')>7; + }, + forced:true, + direct:true, + intro:{ + markcount:'expansion', + content:'expansion', + }, + content:function(){ + 'step 0' + var num=player.countCards('h')-7; + player.chooseCard('佛宗:将'+get.cnNumber(num)+'张手牌置于武将上',true,num); + 'step 1' + if(result.bool){ + var cards=result.cards; + player.logSkill('dcfozong'); + player.addToExpansion(cards,player,'give').gaintag.add('dcfozong'); + } + 'step 2' + var cards=player.getExpansions('dcfozong'); + if(cards.length<7) event.finish(); + else event.targets=game.filterPlayer(i=>i!=player).sortBySeat(player); + 'step 3' + var target=targets.shift(); + event.target=target; + player.line(target); + var cards=player.getExpansions('dcfozong'); + if(!cards.length) event._result={bool:false}; + else target.chooseButton(['###佛宗###获得一张牌并令'+get.translation(player)+'回复1点体力,或点击“取消”令其失去1点体力',cards]).set('ai',button=>{ + if(_status.event.refuse) return get.value(button.link)-6; + return get.value(button.link); + }).set('refuse',get.attitude(target,player)<1&&get.effect(player,{name:'losehp'},player,target)>0); + 'step 4' + if(result.bool){ + var card=result.links[0]; + player.gain(card,'gain2'); + } + else player.loseHp(); + 'step 5' + if(targets.length) event.goto(3); + } + }, + //周善 + dcmiyun:{ + audio:2, + trigger:{global:'roundStart'}, + forced:true, + direct:true, + group:'dcmiyun_lose', + content:function(){ + 'step 0' + if(player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')){ + player.chooseCardTarget({ + prompt:'密运:将包括“安”在内的任意张手牌交给一名其他角色', + forced:true, + filterTarget:lib.filter.notMe, + selectCard:[1,Infinity], + filterOk:function(){ + for(var card of ui.selected.cards){ + if(card.hasGaintag('dcmiyun_tag')) return true; + } + return false; + }, + goon:game.hasPlayer(current=>player!=current&&get.attitude(player,current)>0), + ai1:function(card){ + if(get.itemtype(card)!='card') return 0; + if(card.hasGaintag('dcmiyun_tag')) return 100; + if(_status.event.goon) return 8-get.value(card); + return -get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target); + } + }); + } + else event.goto(3); + 'step 1' + if(result.bool){ + var target=result.targets[0],cards=result.cards; + player.logSkill('dcmiyun',target); + player.give(cards,target); + } + else event.goto(3); + 'step 2' + player.drawTo(player.maxHp); + 'step 3' + if(game.hasPlayer(current=>current!=player&¤t.countGainableCards(player,'he'))){ + player.chooseTarget('密运:获得一名其他角色的一张牌,称为“安”',true,(card,player,target)=>{ + return target!=player&&target.countGainableCards(player,'he'); + }).set('ai',target=>{ + return get.effect(target,{name:'shunshou'},_status.event.player,_status.event.player); + }) + } + else event.finish(); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcmiyun',target); + player.gainPlayerCard(target,true,'visibleMove').chooseonly=true; + } + else event.finish(); + 'step 5' + if(result.bool){ + player.gain(result.cards).gaintag.add('dcmiyun_tag'); + } + }, + mod:{ + aiValue:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return Math.abs(num)*10; + }, + aiUseful:function(){ + return lib.skill.dcmiyun.mod.aiValue.apply(this,arguments); + }, + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return 0; + } + }, + subSkill:{ + lose:{ + audio:'dcmiyun', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.getParent().name=='dcmiyun') return false; + var evt=event.getl(player); + if(!evt||!evt.cards2||!evt.cards2.length) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('dcmiyun_tag')) return true; + } + return false; + } + return player.hasHistory('lose',evt=>{ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcmiyun_tag')) return true; + } + return false; + }); + }, + content:function(){ + player.loseHp(); + } + } + } + }, + dcdanying:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + usable:1, + hiddenCard:function(player,name){ + if(!_status.connectMode&&!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; + return name=='sha'||name=='shan'; + }, + filter:function(event,player){ + if(event.type=='wuxie'||!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) 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]); + } + return ui.create.dialog('胆迎',[vcards,'vcard'],'hidden'); + }, + backup:function(links,player){ + return { + filterCard:()=>false, + selectCard:-1, + viewAs:{ + name:links[0][2], + isCard:true, + }, + popname:true, + precontent:function(){ + player.logSkill('dcdanying'); + player.showCards(player.getCards('h',card=>card.hasGaintag('dcmiyun_tag')),get.translation(player)+'的“安”'); + player.addTempSkill('dcdanying_discard'); + }, + } + }, + prompt:function(links,player){ + return '展示“安”,然后视为使用【'+get.translation(links[0][2])+'】'; + } + }, + ai:{ + order:function(item,player){ + var o1=get.order({name:'sha'}),o2=get.order({name:'shan'}); + if(player.countCards('h')>3||player==_status.currentPhase) return Math.max(o1,o2)+0.1; + return Math.min(o1,o2)-0.1; + }, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + if(!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; + }, + result:{ + player:1 + } + }, + subSkill:{ + discard:{ + trigger:{target:'useCardToTargeted'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player.countDiscardableCards(event.player,'he'); + }, + content:function(){ + trigger.player.discardPlayerCard(player,'he',true); + player.removeSkill('dcdanying_discard'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(_status._dcdanying_aiChecking) return; + _status._dcdanying_aiChecking=true; + var eff=get.effect(target,{name:'guohe_copy2'},player,player); + delete _status._dcdanying_aiChecking; + if(eff>0) eff=-1; + else eff=1; + return [1,eff]; + } + } + } + } + }, + }, //霍峻 dcgue:{ audio:2, @@ -254,6 +1249,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ if(event.dcgue||event.type=='wuxie'||player==_status.currentPhase||player.getStorage('dcgue').contains(_status.currentPhase)) return false; + if(!player.countCards('h')) return false; for(var name of ['sha','shan']){ if(event.filterCard({name:name,isCard:true},player,event)) return true; } @@ -301,6 +1297,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '展示所有手牌'+(player.countCards('h',{name:['sha','shan']})<=1?',然后视为使用【'+get.translation(links[0][2])+'】':''); } }, + intro:{content:'已于$的回合发动过技能'}, ai:{ order:1, respondSha:true, @@ -324,7 +1321,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.hasSkill('dcsigong_round')) return false; if(event.player==player||!event.player.isIn()) return false; if(!player.canUse('sha',event.player,false)) return false; - var respondEvts=game.getGlobalHistory('useCard',evt=>evt.respondTo).map(evt=>evt.respondTo); + var respondEvts=[]; + game.countPlayer2(current=>respondEvts.addArray(current.getHistory('useCard')).addArray(current.getHistory('respond'))); + respondEvts=respondEvts.filter(i=>i.respondTo).map(evt=>evt.respondTo); return event.player.hasHistory('useCard',evt=>{ return respondEvts.some(list=>list[1]==evt.card); }); @@ -354,23 +1353,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>=0) player.logSkill('dcsigong',trigger.player); if(num>0) player.draw(num,'nodelay'); event.num=Math.max(1,Math.abs(num)); - player.addTempSkill('dcsigong_round','roundStart'); } else event.finish(); 'step 2' - if(player.canUse('sha',trigger.player,false)) player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{ - var evt=_status.event; - evt.baseDamage++; - for(var target of evt.targets){ - var id=target.playerid; - var map=evt.customArgs; - if(!map[id]) map[id]={}; - map[id].shanRequired=evt.shanReq; - } - }); + if(player.canUse('sha',trigger.player,false)){ + player.addTempSkill('dcsigong_check'); + player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{ + var evt=_status.event; + evt.baseDamage++; + for(var target of evt.targets){ + var id=target.playerid; + var map=evt.customArgs; + if(!map[id]) map[id]={}; + map[id].shanRequired=evt.shanReq; + } + }); + } }, subSkill:{ - round:{charlotte:true} + round:{charlotte:true}, + check:{ + charlotte:true, + forced:true, + popup:false, + trigger:{source:'damageSource'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent(3).name=='dcsigong'; + }, + content:function(){ + player.addTempSkill('dcsigong_round','roundStart'); + } + } } }, //关宁 @@ -878,7 +1891,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, charlotte:true, filter:function(event,player){ - return player.hasMark('dcyinlu_lequan'); + return player.hasMark('dcyinlu_lequan')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); }, marktext:'乐', intro:{ @@ -904,7 +1917,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, charlotte:true, filter:function(event,player){ - return player.hasMark('dcyinlu_huoxi'); + return player.hasMark('dcyinlu_huoxi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); }, marktext:'藿', intro:{ @@ -930,7 +1943,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, charlotte:true, filter:function(event,player){ - return player.hasMark('dcyinlu_zhangqi'); + return player.hasMark('dcyinlu_zhangqi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); }, marktext:'瘴', intro:{ @@ -957,6 +1970,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, charlotte:true, filter:function(event,player){ + if(!game.hasPlayer(current=>current.hasSkill('dcyinlu'))) return false; if(event.name=='phaseJieshu') return player.hasMark('dcyinlu_yunxiang'); return player.hasMark('dcyinlu_yunxiang')&&player.hasMark('dcyinlu_xiang'); }, @@ -1121,23 +2135,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player,target=get.owner(card); if(target==player&&ui.cardPile.childNodes.length>80){ if(ui.selected.buttons.some(i=>get.owner(i.link)==player)) return 0; - if(get.value(card,player)<6) return 55-get.value(card,player); + if(get.value(card,player)<6) return 60-get.value(card,player); return 0; } - return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()))*get.attitude(player,target); + var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length; + return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target); }); 'step 1' if(result.bool){ var links=result.links; var lose_list=[]; + var log=false; for(var target of game.players){ var cards=links.filter(card=>get.owner(card)==target); if(cards.length){ - if(cards.length>2) player.addMark('dcluochong',1,false); + if(cards.length>2){ + player.addMark('dcluochong',1,false); + log=true; + } lose_list.push([target,cards]); } } player.logSkill('dcluochong',lose_list.map(i=>i[0])); + if(log) game.log(player,'可弃置牌数','#g-1'); if(lose_list[0].length==1) lose_list[0][0].discard(lose_list[0][1]); else{ game.loseAsync({ @@ -1147,7 +2167,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - ai:{threaten:1.25}, + ai:{threaten:2.5}, }, dcaichen:{ audio:2, @@ -1191,7 +2211,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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); + return card!=cardx&&get.name(card,player)=='sha'&&player.hasValueTarget(card,false); }); var numx=player.countCards('h',function(card){ return get.type2(card,player)=='trick'; @@ -1221,7 +2241,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool&&result.cards&&result.cards.length&&get.type(result.cards[0])!='equip'){ var name=get.type(result.cards[0])=='basic'?'dcneifa_basic':'dcneifa_trick'; - player.addTempSkill(name); + player.addTempSkill(name,'phaseUseAfter'); var num=Math.min(5,player.countCards('h',function(cardx){ var type=get.type(cardx,player); return (name=='dcneifa_basic')!=(type=='basic')&&type!='equip'; @@ -1259,14 +2279,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(event.card.name!='sha') return false; return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&player.canUse(event.card,current); + return !event.targets.contains(current)&&player.canUse(event.card,current,false); }); }, direct:true, content:function(){ 'step 0' player.chooseTarget(get.prompt('dcneifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ - return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target); + return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target,false); }).set('sourcex',trigger.targets).set('ai',function(target){ var player=_status.event.player; return get.effect(target,_status.event.card,player,player); @@ -1516,6 +2536,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var evt of history[i].useSkill){ if(evt.skill=='dcjinjie') num++; } + if(history[i].isRound) break; } if(num==0){ player.chooseBool(get.prompt('dcjinjie',trigger.player),'令其回复1点体力').set('ai',()=>{ @@ -1626,6 +2647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, locked:false, group:['dcaishou_draw','dcaishou_lose'], + subfrequent:['draw'], content:function(){ 'step 0' player.discard(player.getCards('h',card=>card.hasGaintag('dcaishou_tag'))); @@ -1642,6 +2664,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ audio:'dcaishou', trigger:{player:'phaseJieshuBegin'}, + frequent:function(event,player){ + return player.maxHp>1; + }, prompt2:function(event,player){ return '摸'+get.cnNumber(player.maxHp)+'张牌,称为“隘”'; }, @@ -1987,7 +3012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, //秦朗 - dcningchong:{ + dchaochong:{ audio:2, trigger:{player:'useCardAfter'}, filter:function(event,player){ @@ -1999,68 +3024,73 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var del=player.getHandcardLimit()-player.countCards('h'); event.delta=del; if(del>0){ - player.chooseBool(get.prompt('dcningchong'),'摸'+get.cnNumber(Math.min(5,del))+'张牌,然后令你的手牌上限-1').set('ai',()=>{ + player.chooseBool(get.prompt('dchaochong'),'摸'+get.cnNumber(Math.min(5,del))+'张牌,然后令你的手牌上限-1').set('ai',()=>{ var player=_status.event.player; - if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasValueTarget(cardx),'hs')) return false; + if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasUseTarget(cardx)&&player.hasValueTarget(cardx),'hs')) return false; return true; }); } else if(del<0){ - player.chooseToDiscard(get.prompt('dcningchong'),'弃置'+get.cnNumber(-del)+'张手牌,然后令你的手牌上限+1',-del).set('ai',card=>{ + player.chooseToDiscard(get.prompt('dchaochong'),'弃置'+get.cnNumber(-del)+'张手牌,然后令你的手牌上限+1',-del).set('ai',card=>{ var player=_status.event.player; if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasValueTarget(cardx),'hs')) return 6-player.getUseValue(card); return 5-get.value(card); - }).set('logSkill','dcningchong'); + }).set('logSkill','dchaochong'); } 'step 1' if(result.bool){ if(event.delta>0){ - player.logSkill('dcningchong'); + player.logSkill('dchaochong'); player.draw(Math.min(5,event.delta)); - lib.skill.dcningchong.change(player,-1); + lib.skill.dchaochong.change(player,-1); } else if(event.delta<0){ - lib.skill.dcningchong.change(player,1); + lib.skill.dchaochong.change(player,1); } } }, change:function(player,num){ - if(typeof player.storage.dcningchong!=='number') player.storage.dcningchong=0; + if(typeof player.storage.dchaochong!=='number') player.storage.dchaochong=0; if(!num) return; - player.storage.dcningchong+=num; - player.markSkill('dcningchong'); - game.log(player,'的手牌上限',(num>0?'+':'')+num); + player.storage.dchaochong+=num; + player.markSkill('dchaochong'); + game.log(player,'的手牌上限','#g'+(num>0?'+':'')+num); }, + markimage:'image/card/handcard.png', intro:{ content:function(storage,player){ - var num=player.storage.dcningchong; + var num=player.storage.dchaochong; return '手牌上限'+(num>=0?'+':'')+num; } }, mod:{ maxHandcard:function(player,num){ - return num+player.countMark('dcningchong'); + return num+player.countMark('dchaochong'); } }, + ai:{threaten:2.2} }, dcjinjin:{ audio:2, trigger:{ - source:'damageSouce', + source:'damageSource', player:'damageEnd', }, usable:1, logTarget:'source', check:function(event,player){ - if(typeof player.storage.dcningchong!='number'||player.storage.dcningchong==0) return true; - return Math.abs(player.storage.dcningchong)>=2; + if(typeof player.storage.dchaochong!='number'||player.storage.dchaochong==0) return true; + var evt=event.getParent('useCard'); + if(evt&&evt.player==player&&event.source==player) return false; + if(player.isPhaseUsing()&&player.storage.dchaochong==-1) return true; + return Math.abs(player.storage.dchaochong)>=2; }, prompt2:function(event,player){ var str=''; - if(typeof player.storage.dcningchong=='number'&&player.storage.dcningchong!=0){ + if(typeof player.storage.dchaochong=='number'&&player.storage.dchaochong!=0){ str +='重置因〖佞宠〗增加或减少的手牌上限,'; } - var num=Math.abs(player.storage.dcningchong)||1; + var num=Math.abs(player.countMark('dchaochong'))||1; if(event.source&&event.source.isIn()){ str+='令伤害来源弃置至多'+get.cnNumber(num)+'张牌,然后你摸'+num+'-X张牌(X为其弃置的牌数)'; } @@ -2069,12 +3099,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - var del=Math.abs(player.storage.dcningchong); + var del=Math.abs(player.countMark('dchaochong'))||1; event.delta=del; - player.storage.dcningchong=0; + player.storage.dchaochong=0; + if(player.hasSkill('dchaochong',null,false,false)) player.markSkill('dchaochong'); game.log(player,'重置了手牌上限'); if(trigger.source&&trigger.source.isIn()){ - trigger.source.chooseToDiscard(get.translation(player)+'对你发动了【矜谨】','弃置至多'+get.cnNumber(del)+'张牌,'+get.translation(player)+'摸'+del+'-X张牌(X为你弃置的牌数)。',[1,del]).set('ai',card=>{ + trigger.source.chooseToDiscard(get.translation(player)+'对你发动了【矜谨】','弃置至多'+get.cnNumber(del)+'张牌,然后'+get.translation(player)+'摸'+del+'-X张牌(X为你弃置的牌数)。',[1,del],'he').set('ai',card=>{ if(_status.event.goon) return 5.5-get.value(card); return 0; }).set('goon',get.attitude(trigger.source,player)<0); @@ -2085,7 +3116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>0) player.draw(num); }, ai:{ - combo:'dcningchong', + combo:'dchaochong', maixie:true, maixie_hp:true, threaten:0.85, @@ -2331,6 +3362,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcqingren:{ audio:2, trigger:{player:'phaseJieshuBegin'}, + frequent:true, filter:function(event,player){ return player.hasHistory('useSkill',evt=>['yizan_use','yizan_use_backup'].contains(evt.sourceSkill||evt.skill)); }, @@ -2913,7 +3945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(bool1) target.maxHp--; } if(bool3){ - var num=Math.min(5,target.maxHp+(bool1?1:0)); + var num=Math.max(0,Math.min(5,target.maxHp+(bool1?1:0))); val+=5*num; } return val; @@ -3685,6 +4717,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.line(result.targets); trigger.getParent().excluded.addArray(result.targets); } + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(_status.event.name=='chooseToUse'&&get.name(card)=='sha'&&(!player.storage.counttrigger||!player.storage.counttrigger.dctingxian)&&!_status._dctingxian_aiChecking){ + _status._dctingxian_aiChecking=true; + var eff=get.effect(target,{name:'sha'},player,player); + delete _status._dctingxian_aiChecking; + if(eff<0&&ui.selected.targets.filter(targetx=>{ + if(targetx==target) return false; + _status._dctingxian_aiChecking=true; + var eff=get.effect(targetx,{name:'sha'},player,player); + delete _status._dctingxian_aiChecking; + if(eff<0) return true; + }).lengthtarget.hp; })||game.getGlobalHistory('changeHp',function(evt){ return evt.player==target&&(evt.getParent().name=='recover'||target.countCards('h')>target.hp); @@ -4340,7 +5390,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, rules:[ (target)=>target.getHistory('sourceDamage').length, - (target)=>target.getHistory('gain',function(evt){ + (target)=>target.hasHistory('gain',function(evt){ return target.countCards('h')>target.hp; })||game.getGlobalHistory('changeHp',function(evt){ return evt.player==target&&evt.getParent().name=='recover'; @@ -4535,24 +5585,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(trigger.player.countDiscardableCards(trigger.player,'he')>0){ event.list.push(trigger.player); } + if(!event.isMine()&&!event.isOnline()) game.delayx(); player.chooseCardOL(event.list,'he',true,[1,Infinity],'异勇:弃置任意张牌',(card,player,target)=>{ return lib.filter.cardDiscardable(card,player,'dcyiyong'); }).set('ai',card=>{ - var source=_status.event.getParent().player,player=_status.event.player,target=_status.event.getParent().list[1]; + var evt=_status.event.getParent(2); + var source=evt.player,player=_status.event.player,target=evt.list[1]; if(!target) return get.unuseful(card); if(player==source){ + var total=0,need=0; + target.countCards('he',card=>{ + if(lib.filter.cardDiscardable(card,target,'dcyiyong')&&get.value(card)<5) need+=get.number(card); + }); + for(var i of ui.selected.cards) total+=get.number(i); + if(total>=need+5) return 0; var val=6; if(target.hp<=2&&!target.hasSkillTag('filterDamage',null,{ player:player, - card:_status.event.getTrigger().card, + card:evt.getTrigger().card, })) val+=2+get.number(card)/5; if(target.countCards('he',card=>get.value(card)<5)>=3) val-=3+get.number(card)/5; return val-get.value(card); } - if(ui.selected.cards.length>1&&ui.selected.cards.length+2 >= source.countCards('he')) return 0; + if(ui.selected.cards.length>1&&ui.selected.cards.length+2>=source.countCards('he')) return 0; if(player.hp<=2&&!target.hasSkillTag('filterDamage',null,{ player:player, - card:_status.event.getTrigger().card, + card:evt.getTrigger().card, })) return 10-get.value(card); return 5-get.value(card); }); @@ -4574,7 +5632,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num0<=num1){ player.draw(event.cards1.length); } - if(num0 >= num1){ + if(num0>=num1){ trigger.num++; } } @@ -5569,7 +6627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); } else{ - return !player.isDisabled(5)&&player.countCards('he')>0; + return !player.isDisabled(5); } }, direct:true, @@ -6686,10 +7744,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ player.removeSkill('dchuishu_effect'); - var card=get.discardPile(function(card){ - return get.type2(card)=='trick'; - }); - if(card) player.gain(card,'gain2'); + var evt=trigger.getl(player); + var num=evt.cards2.length; + var cards=[]; + for(var i=0;i0; + return (_status.event.filterTarget||lib.filter.filterTarget)(card,player,current)&&get.effect_use(current,card,player,player)>0; })<=ui.selected.cards.length) return 0; return 5-get.value(card); }, @@ -13260,13 +14325,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, filter:function(event,player){ if(player==event.player||!event.player.isIn()) return false; + if(!player.hasHistory('useSkill',function(evt){ + return evt.skil=='huguan'&&evt.targets.contains(event.player); + })) return false; var suits=[]; event.player.getHistory('lose',function(evt){ if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event){ for(var i of evt.cards2) suits.add(get.suit(i,evt.hs.contains(i)?evt.player:false)); } }); - if(!suits.length||suits.length>=lib.suit.length) return false; + if(suits.length>=lib.suit.length) return false; if(_status.connectMode&&player.countCards('h')>0) return true; return player.hasCard(function(card){ return !suits.contains(get.suit(card)); @@ -13327,7 +14395,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - player.chooseToDiscard('he',get.prompt('mingluan'),'弃置一张牌,并摸等同于'+get.translation(trigger.player)+'手牌数的牌(至多摸至五张)').set('ai',function(card){ + player.chooseToDiscard('he',get.prompt('mingluan'),'弃置任意张牌,并摸等同于'+get.translation(trigger.player)+'手牌数的牌(至多摸至五张)',[1,Infinity]).set('ai',function(card){ var player=_status.event.player; var ph=player.countCards('h'); if(get.position(card)=='h') ph--; @@ -16959,7 +18027,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //狼灭 langmie:{ trigger:{global:'phaseUseEnd'}, - forced:true, + //forced:true, filter:function(event,player){ if(player==event.player||!player.countCards('he')) return false; var map={}; @@ -21402,6 +22470,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:'damageBefore', }, forced:true, + filter:function(event,player){ + if(event.source==event.player) return false; + if(event.player==player){ + return event.source&&event.source.isIn(); + } + return true; + }, content:function(){ trigger.cancel(); trigger.player.loseHp(trigger.num); @@ -25214,7 +26289,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xuelingyun:'薛灵芸,东晋王嘉志怪小说《拾遗记》中的人物,魏文帝曹丕的宫人,妙于针工,虽处于深帷之内,不用灯烛之光,裁制立成。凡不是薛灵芸缝制的衣服,文帝一概不穿,宫中号为针神。薛灵芸的故事在正史中虽无记载,却由于许多野史笔记偶尔提及,如《拾遗记》、《太平广记》、《艳异编》等,渐于后世成为中国古代著名美女形象。,', liupi:'刘辟[pì],东汉末年黄巾起义军将领。黄巾军将领。黄巾之乱后,与龚都一起率军盘踞在汝南。欲追随刘备,将汝南让给刘备。《三国演义》中,在与曹操的部将高览交战时,为保护刘备而战死。', zhenghun:'郑浑(生卒年不详),字文公。开封(今河南省开封市)人。汉末及三国时期曹魏大臣,东汉名儒郑众曾孙、名士郑泰之弟。郑浑早年避乱淮南,后转投豫章太守华歆。又被曹操辟为掾属,历任下蔡县长、邵陵县令,任内颇有政绩,深得民心。任左冯翊时,击杀扰乱郡县的梁兴,又击败作乱的山贼。历任上党太守、京兆尹、丞相掾属等职。曹丕称帝后,拜侍御史,加驸马都尉。先后任阳平、沛郡太守,任内兴修水利,使农田常年丰收,被百姓称为“郑陂”。后转任山阳和魏郡太守。魏明帝曹叡听闻郑浑的事迹之后,下诏将其政绩布告天下。官至将作大匠。卒年不详。', - furongfuqian:'傅肜[róng](?-222年),义阳(今湖北枣阳)人,三国时蜀汉将领。刘备攻伐吴国时,傅肜为别督。后刘备被陆逊击败,傅肜率部断后,奋战至死。死前怒斥道:“吴狗!何有汉将军降者!”
傅金[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅金官至关中都督。魏国攻伐蜀汉时,傅金和蒋舒防守阳安关,兵败战死。', + furongfuqian:'傅肜[róng](?-222年),义阳(今湖北枣阳)人,三国时蜀汉将领。刘备攻伐吴国时,傅肜为别督。后刘备被陆逊击败,傅肜率部断后,奋战至死。死前怒斥道:“吴狗!何有汉将军降者!”
傅佥[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅佥官至关中都督。魏国攻伐蜀汉时,傅佥和蒋舒防守阳安关,兵败战死。', zhengxuan:'郑玄(127年-200年),字康成。北海郡高密县(今山东省高密市)人。东汉末年儒家学者、经学大师。郑玄曾入太学攻《京氏易》、《公羊春秋》及《三统历》、《九章算术》,又从张恭祖学《古文尚书》、《周礼》和《左传》等,最后从马融学古文经。游学归里之后,复客耕东莱,聚徒授课,弟子达数千人,家贫好学,终为大儒。党锢之祸起,遭禁锢,杜门注疏,潜心著述。晚年守节不仕,却遭逼迫从军,最终病逝于元城,年七十四。郑玄治学以古文经学为主,兼采今文经学。他遍注儒家经典,以毕生精力整理古代文化遗产,使经学进入了一个“小统一时代”。著有《天文七政论》、《中侯》等书,共百万余言,世称“郑学”,为汉代经学的集大成者。唐贞观年间,列郑玄于二十二“先师”之列,配享孔庙。宋代时被追封为高密伯。后人建有郑公祠以纪念。
', qinlang:'秦朗(生卒年不详),字元明,小字阿蘇(一作阿鳔),新兴(治今山西忻州)云中人。三国时期曹魏将领,官至骁骑将军、给事中,曾率兵讨伐鲜卑轲比能和步度根的叛军。', xianglang:'向朗(约167年—247年),字巨达。襄阳郡宜城县(今湖北宜城)人,三国时期蜀汉官员、藏书家、学者。向朗早年师从于司马徽,并被荆州牧刘表任命为临沮县长。后随刘备入蜀,历任巴西、牂牁、房陵太守,并拜步兵校尉,领丞相长史,随丞相诸葛亮北伐。因包庇马谡被免职,后为光禄勋,转左将军、特进,封显明亭侯。曾代理丞相册封张皇后及太子刘璿。晚年专心研究典籍,诱导青年学习,家中藏书丰富,受到举国尊重。延熙十年(247年),向朗去世。《全三国文》收录有一篇《遗言戒子》', @@ -25224,6 +26299,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhanghu:'张虎,生卒年不详,雁门马邑(今山西朔城区大夫庄)人。张辽之子,三国时期曹魏武将。官至偏将军,封晋阳侯,有一子张统。', mengjie:'孟节,南中蛮王孟获之兄。是小说《三国演义》中杜撰的人物,史上并无记载。诸葛亮南征孟获之时,帐下军士因误饮哑泉之水失语。当地山神告知诸葛亮,言万安溪畔有一高士隐居彼处,号“万安隐者”。其草庵后有一泉,名安乐泉,可解哑泉之毒。庵前生有一草,名薤叶芸香,可防瘴气之染。诸葛亮于是带人连夜前往其隐居之处,求得泉水草叶解毒防瘴,拜求隐士姓名,方知其名为孟节,由此而叹:“方信盗跖、下惠之事,今亦有之。”诸葛亮欲申奏刘禅,立其为王,孟节辞之。又以金帛赠之,孟节坚辞不受。诸葛亮嗟叹不已,拜别而回。', guānning:'关宁,《三国演义》的虚构人物,为关定之子,关平的哥哥,学文。关羽前往冀州寻找刘备时曾居于关定庄,关定命关宁、关平二子出拜。后关羽同刘备回到关定庄时,关羽向刘备介绍关宁、关平二人,关定即提出让关平拜关羽为义父。', + peiyuanshao:'裴元绍,《三国演义》人物,原黄巾军之武将。黄巾起义失败之后,与周仓一同率领残部在山中落草当山贼。公元200年,在关羽欲返刘备旗下,在突破曹操的五道关卡后路过其落草之地,与周仓一同向关羽要求能以期成为关羽家臣。但此时仅周仓同行,其他弟兄则于山中等待。不久后,因其欲夺偶然路过的赵云之马,反遭讨伐战败身死。', + zhangchu:'张楚,《阵面对决》第九弹“燎原”中登场的一个原创人物。她是张角的女儿,张宁的姐姐,在逃亡途中被刘备捕获。之后在诸葛亮的建议下,张楚被囚禁。在《阵面对决》的“怒焰”故事线中,张楚随着刘备入了西川,并被软禁在成都。夷陵之战后,刘备大败,全国主力外出用以支援刘备,朝内空虚,张楚趁机逃跑。', + dongwan:'董绾,袁术老婆,嫉妒冯芳女的美貌,与冯方女有矛盾。', + yuanyin:'袁胤(生卒年不详),东汉末期人物,据说是袁隗之子,是袁术从弟。兴平二年(公元195年)被袁术任命为丹杨太守,后因孙策平定江东被逐。建安四年(公元199年),袁术卒,袁胤因畏惧曹操,遂率领袁术部曲并带着其灵柩及妻子到皖城并投奔庐江太守刘勋。6个月后皖城被孙策所破,袁胤等人迁居吴郡,此后事迹不详。', + xielingyu:'谢夫人,会稽山阴(今浙江省绍兴市)人,东汉尚书郎、徐令谢煚之女,吴大帝孙权的原配发妻,又称谢妃。深受孙权宠爱,爱幸有宠。后来孙权为了巩固江东政权,又纳徐氏,欲让谢夫人屈居其下。谢夫人不同意,失志早卒。谢夫人的弟弟是三国著名史学家、武陵太守谢承。豫章太守谢斐与谢夫人同宗同族。', + gaoxiang:'高翔(又作高详、高祥)(生卒年不详),荆州南郡(治今湖北省公安县)人,三国时期蜀汉将领。曾随刘备攻打汉中,后又随蜀汉丞相诸葛亮参加北伐曹魏的战争。建兴九年(公元231年)的北伐中大破司马懿。官至杂号大将军(即某杂号将军加大,但无考何杂号将军),封玄乡侯。此后,关于高翔的记载不详。', + zerong:'笮[zé]融(?—195年),丹杨(治今安徽宣城)人,东汉末年豪强,生性残暴却笃信佛教,为佛教在中国的发展做出了很大贡献。东汉末年投奔徐州刺史陶谦,督管下邳、彭城、广陵三郡运粮。将其中大量物资占为己有累积财力,遂在徐州一带大规模崇佛,修建豪华佛寺,铸造金铜大佛,衣以锦彩,并举行浴佛节,招揽信徒万余人。其崇佛活动奠定了中国大型佛事活动的基础。后又投奔赵昱、薛礼、朱皓并将他们杀害,扬州牧刘繇因此兴兵讨伐笮融。笮融兵败后逃入深山,由于当地山民同样对他恨之入骨,便联手搜捕、杀死笮融,并将他的首级献给刘繇。', + zhoushan:'周善,《三国演义》中人物,不见于正史记载。为吴侯孙权的家将,此人最有胆量,自幼穿房入户,多随孙策。权为骗其妹回吴,遣善将五百人,扮为商人,分作五船;更诈修国书,以备盘诘;船内暗藏兵器。周善领命,往荆州。正骗得孙夫人带刘禅上船,赵云前来抢走禅,周善在后梢挟住舵,只顾放船下水。正僵持时张飞赶到,周善见张飞上船,提刀来迎,被张飞手起一剑砍倒,提头掷于孙夫人前。', }, characterTitle:{ // wulan:'#b对决限定武将', @@ -25364,7 +26447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yangwan:['yangwan','sp_yangwan'], chendeng:['ol_chendeng','re_chendeng','chendeng'], pangdegong:['re_pangdegong','pangdegong'], - zhujun:['sp_zhujun','zhujun'], + zhujun:['sp_zhujun','ol_zhujun','zhujun'], sunyi:['re_sunyi','tw_sunyi','sunyi'], tw_liuhong:['tw_liuhong','liuhong'], miheng:['miheng','re_miheng'], @@ -25383,7 +26466,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ haomeng:['haomeng','tw_haomeng'], dc_jiling:['dc_jiling','tw_jiling'], zhangning:['zhangning','tw_zhangning'], - sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu'], + sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu','yj_jiaxu'], + caoanmin:['caoanmin','ns_caoanmin'], + jiling:['dc_jiling','jiling'], + qiaorui:['qiaorui','tw_qiaorui'], }, translate:{ lijue:"李傕", @@ -25557,7 +26643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mouzhi_info:'出牌阶段限一次,你可以将一张手牌交给一名角色,若如此做,当其于其下回合的出牌阶段内对一名角色造成伤害后,若是此阶段其第一次对该角色造成伤害,你摸一张牌。', sp_shenpei:'SP审配', gangzhi:'刚直', - gangzhi_info:'锁定技,当你即将受到或造成伤害时,你防止此伤害,改为受到伤害的角色失去等量的体力。', + gangzhi_info:'锁定技,当你即将受到其他角色造成的伤害时,或即将对其他角色造成伤害时,你防止此伤害,改为受到伤害的角色失去等量的体力。', beizhan:'备战', beizhan2:'备战', beizhan_info:'结束阶段,你可以令一名角色将手牌摸至体力上限(至多为5)。其下个回合开始时,若其手牌数为全场最多,则其此回合内使用的牌不能指定其他角色为目标。', @@ -26013,9 +27099,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huguan:'护关', huguan_info:'一名角色于出牌阶段内使用第一张牌时,若此牌为红色,则你可以声明一种花色。该花色的牌不计入其本回合的手牌上限。', yaopei:'摇佩', - yaopei_info:'其他角色的弃牌阶段结束时,若其于本阶段内弃置过的牌的集合A不为空集,则你可以弃置一张与A中的牌花色均不相同的牌。然后你选择一项:①其摸两张牌,你回复1点体力。②其回复1点体力,你摸两张牌。', + yaopei_info:'其他角色的弃牌阶段结束时,若你本回合对其发动过〖护关〗,则你可以弃置一张与其于此阶段弃置的牌花色均不相同的牌。然后你选择一项:①其摸两张牌,你回复1点体力。②其回复1点体力,你摸两张牌。', mingluan:'鸣鸾', - mingluan_info:'其他角色的结束阶段开始时,若有角色于本回合内回复过体力,则你可以弃置一张牌,然后摸X张牌(X为当前角色的手牌数,且至多摸至5张)。', + mingluan_info:'其他角色的结束阶段开始时,若有角色于本回合内回复过体力,则你可以弃置任意张牌,然后摸X张牌(X为当前角色的手牌数,且至多摸至5张)。', re_pangdegong:'庞德公', heqia:'和洽', heqia_info:'出牌阶段开始时,你可选择一项:①将任意张牌交给一名其他角色。②令一名有手牌的其他角色交给你任意张牌。然后以此法获得牌的角色可以视为使用一张基本牌,且当其声明使用此牌后,可以为此牌增加至至多X个目标(X为以此法移动的牌数)。', @@ -26127,7 +27213,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcjiezhen_info:'出牌阶段限一次,你可选择一名其他角色。该角色获得〖八阵〗,且其所有不为{锁定技、限定技、觉醒技、主公技、带有Charlotte标签}的技能失效。你的下回合开始时,或其因〖八卦阵〗发起的判定结算结束后,你令其恢复其以此法失效的所有技能并失去以此法获得的〖八阵〗,然后获得其区域内的一张牌。', dczecai:'择才', dczecai_info:'限定技。一轮游戏开始时,若游戏轮数大于1,则你可令一名其他角色获得〖集智〗直到下一轮游戏开始;若其是上一轮内使用过锦囊牌数量唯一最多的角色,则其获得一个额外的回合。', - dcyinshi:'隐士', + dcyinshi:'隐世', dcyinshi_info:'锁定技。①每回合限一次,当你受到伤害时,若此伤害的渠道不为有颜色的牌,则你防止此伤害。②当有因〖八卦阵〗发起的判定的判定牌生效时,你获得此判定牌。', tenggongzhu:'滕公主', xingchong:'幸宠', @@ -26275,11 +27361,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcliehou_info:'锁定技。摸牌阶段开始时,你令额定摸牌数+X;然后此摸牌阶段结束时,你选择一项:⒈弃置X张牌。⒉失去1点体力(X为你的“爵”数+1且至多为5)。', quanhuijie:'全惠解', dchuishu:'慧淑', - dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后,你从弃牌堆中获得一张锦囊牌。', + dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后,你从弃牌堆中随机获得等量的锦囊牌。', dcyishu:'易数', dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你令〖慧淑〗的中括号内最大的一个数字-1,然后令〖慧淑〗的中括号内最小的一个数字+2。', dcligong:'离宫', - dcligong_info:'觉醒技。准备阶段,若〖慧淑〗的中括号内有不小于5的数字,则你加1点体力上限,回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌,然后你选择一项:⒈摸两张牌。⒉失去〖慧淑〗,然后获得这些武将牌上的任意两个非Charlotte技能。', + dcligong_info:'觉醒技。准备阶段,若〖慧淑〗的中括号内有不小于5的数字,则你加1点体力上限,回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌,然后你选择一项:⒈摸三张牌。⒉失去〖慧淑〗,然后获得这些武将牌上的任意两个非Charlotte技能。', yinfuren:'尹夫人', dcyingyu:'媵语', dcyingyu_info:'准备阶段开始时,你可以展示两名角色的各一张手牌。若这两张牌的花色不同,则你可以令一名角色获得另一名角色的展示牌。', @@ -26467,10 +27553,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcyuguan:'御关', dcyuguan_info:'一名角色的回合结束时,若你已损失的体力值为全场最多,你可以减1点体力上限,然后令X名角色将手牌摸至体力上限(X为你已损失的体力值)。', qinlang:'秦朗', - dcningchong:'佞宠', - dcningchong_info:'当你使用牌后,你可以将手牌摸至或弃置至你的手牌上限数(至多摸五张)。然后若你以此法:获得牌,你的手牌上限-1;失去牌,你的手牌上限+1。', + dchaochong:'昊宠', + dchaochong_info:'当你使用牌后,你可以将手牌摸至或弃置至你的手牌上限数(至多摸五张)。然后若你以此法:获得牌,你的手牌上限-1;失去牌,你的手牌上限+1。', dcjinjin:'矜谨', - dcjinjin_info:'每回合限一次。当你造成或受到伤害后,你可以重置因〖佞宠〗增加或减少的手牌上限,然后令伤害来源弃置至多X张牌,然后你摸Y张牌(X为你以此法变化的手牌上限且至少为1,Y为X减其以此法弃置的牌数)。', + dcjinjin_info:'每回合限一次。当你造成或受到伤害后,你可以重置因〖昊宠〗增加或减少的手牌上限,令伤害来源弃置至多X张牌,然后你摸Y张牌(X为你以此法变化的手牌上限且至少为1,Y为X减其以此法弃置的牌数)。', xianglang:'向朗', dckanji:'勘集', dckanji_info:'出牌阶段限两次。你可以展示所有手牌,若花色均不同,你摸两张牌。然后若你的手牌因此包含了四种花色,你跳过下一个弃牌阶段。', @@ -26501,9 +27587,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dc_fuwan_ab:'伏完', dcmoukui:'谋溃', dcmoukui_info:'当你使用【杀】指定第一个目标后,你可以选择任意项:1.摸一张牌;2.弃置其中一个目标角色一张牌。若你均选择,当此【杀】被无效后或被抵消后,该角色弃置你一张牌。', - yuantanyuanxiyuanshang:'袁谭袁熙袁尚', + yuantanyuanxiyuanshang:'袁谭袁尚袁熙', dcneifa:'内伐', - dcneifa_info:'出牌阶段开始时,你可以摸三张牌,然后弃置一张牌。若你弃置的牌类型为:基本牌,本回合你不能使用锦囊牌,且【杀】的使用次数上限+X且可以额外指定一名目标;锦囊牌,本回合你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5)。', + dcneifa_info:'出牌阶段开始时,你可以摸三张牌,然后弃置一张牌。若你弃置的牌类型为:基本牌,本阶段你不能使用锦囊牌,且【杀】的使用次数上限+X且可以额外指定一名目标(无距离限制);锦囊牌,本阶段你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5)。', dc_tengfanglan:'滕芳兰', dcluochong:'落宠', dcluochong_info:'一轮游戏开始时,你可以弃置任意名角色区域里的共计至多[4]张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。', @@ -26513,7 +27599,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcqinshen:'勤慎', dcqinshen_info:'弃牌阶段结束时,你可以摸X张牌(X为本回合未进入过弃牌堆的花色数)。', dcweidang:'伪谠', - dcweidang_info:'其他角色的结束阶段,你可以将一张字数为X的牌置于牌堆底,然后获得牌堆里一张字数为X的牌。若你能使用此牌,你使用之。', + dcweidang_info:'其他角色的结束阶段,你可以将一张字数为X的牌置于牌堆底,然后获得牌堆里一张字数为X的牌(X为本回合未进入过弃牌堆的花色数)。若你能使用此牌,你使用之。', mengjie:'孟节', dcyinlu:'引路', dcyinlu_info:'①游戏开始时,你令三名角色依次分别获得“乐泉”、“藿溪”、“瘴气”标记(若场上角色数为2则改为令一名其他角色获得其中2枚,你获得剩余标记),然后你获得“芸香”标记并获得1点“芸香”值。②准备阶段/有〖引路〗标记的角色死亡时,你可以移动一名角色的1枚/其的所有〖引路〗标记。', @@ -26546,8 +27632,55 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dc_huojun:'霍峻', dcgue:'孤扼', dcgue_info:'每名其他角色的回合限一次。当你需要使用或打出【杀】或【闪】时,若你有手牌,你可以展示之。若其中【杀】和【闪】的数量之和不超过1,你视为使用或打出此牌。', - dcsigong:'伺功', - dcsigong_info:'每轮限一次。其他角色的回合结束时,若其于本回合内使用牌被响应过,你可以将手牌摸至或弃置至1,视为对其使用一张需使用X张【闪】抵消的【杀】,且此【杀】的伤害基数+1(X为你以此法弃置的牌数且至少为1)。', + dcsigong:'伺攻', + dcsigong_info:'其他角色的回合结束时,若其于本回合内使用牌被响应过,你可以将手牌摸至或弃置至1,视为对其使用一张需使用X张【闪】抵消的【杀】,且此【杀】的伤害基数+1(X为你以此法弃置的牌数且至少为1)。当你以此法造成伤害后,该技能于本轮失效。', + peiyuanshao:'裴元绍', + dcmoyu:'没欲', + dcmoyu_info:'出牌阶段每名角色限一次。你可以获得一名其他角色区域里的一张牌,然后其可以对你使用一张【杀】,且此【杀】伤害基数为X(X为你于本回合发动此技能的次数)。若此【杀】对你造成了伤害,你令此技能于本回合失效。', + zhangchu:'张楚', + dcjizhong:'集众', + dcjizhong_info:'出牌阶段限一次。你可以令一名其他角色摸两张牌,然后其选择一项:1.若其没有“信众”标记,其获得“信众”标记;2.弃置三张手牌。', + dcjucheng:'聚逞', + dcjucheng_info:'每回合限一次。当你使用普通锦囊牌或黑色基本牌结算结束后,若此牌的目标数为1且目标不为你,且其:没有“信众”,所有有“信众”的角色依次视为对其使用一张与此牌牌名和属性相同的牌;有“信众”,你可以获得其区域里的一张牌。', + dcguangshi:'光噬', + dcguangshi_info:'锁定技。准备阶段,若所有其他角色均有“信众”,你失去1点体力并摸两张牌。', + dongwan:'董绾', + dcshengdu:'生妒', + dcshengdu_info:'回合开始时,你可以选择一名其他角色。当其于其的下个摸牌阶段获得牌后,你摸等量的牌。', + dcxianjiao:'献绞', + dcxianjiao_info:'出牌阶段限一次。你可以将两张颜色不同的手牌当无距离限制且无任何次数限制的【杀】使用。然后若此【杀】:造成了伤害,所有目标角色失去1点体力;未造成伤害,你对所有目标角色依次发动一次〖生妒〗。', + yuanyin:'袁胤', + dcmoshou:'墨守', + dcmoshou_info:'当你成为其他角色使用的黑色牌的目标后,你可以摸X张牌(X为你本局游戏此前发动过此技能的次数÷3的余数+1)。', + dcyunjiu:'运柩', + dcyunjiu_info:'一名角色死亡后,你可以弃置等同于其因死亡事件的规则而弃置的牌数,将其此次弃置的牌交给一名其他角色。然后你加1点体力上限并回复1点体力。', + xielingyu:'谢灵毓', + dcyuandi:'元嫡', + dcyuandi_info:'当其他角色于其出牌阶段使用第一张牌时,若此牌仅指定其为目标,你可以选择一项:1.弃置其一张手牌;2.你与其各摸一张牌。', + dcxinyou:'心幽', + dcxinyou_info:'出牌阶段限一次。你可以将体力回复至上限并将手牌补至体力上限。若你以此法:获得了至少两张牌,你于结束阶段失去1点体力;回复了体力,你于结束阶段弃置两张牌。', + gaoxiang:'高翔', + dcchiying:'驰应', + dcchiying_info:'出牌阶段限一次。你可以选择一名体力不大于你的角色,令其攻击范围内的其他角色依次弃置一张牌。然后若你选择的角色不为你,其获得以此法弃置的牌中所有的基本牌。', + zerong:'笮融', + dccansi:'残肆', + dccansi_info:'锁定技。准备阶段,你选择一名其他角色。你与其各回复1点体力,然后视为对其依次使用以下能使用的牌:【杀】(无距离限制)、【决斗】、【火攻】。当其以此法受到1点伤害后,你摸两张牌。', + dcfozong:'佛宗', + dcfozong_info:'锁定技。出牌阶段开始时,若你的手牌数大于7,你将X张手牌置于武将牌上(X为你的手牌数-7)。然后若你的武将牌上有至少七张牌,其他角色依次选择一项:1.获得其中的一张牌并令你回复1点体力;2.令你失去1点体力。', + zhoushan:'周善', + dcmiyun:'密运', + dcmiyun_tag:'安', + dcmiyun_info:'锁定技。①一轮游戏开始时,你依次执行:1.若你有“安”,你将包括“安”的在内的任意张手牌交给一名其他角色,然后你将手牌补至体力上限;2.你正面向上获得一名其他角色的一张牌,称为“安”。②当你不因〖密运①〗失去“安”后,你失去1点体力。', + dcdanying:'胆迎', + dcdanying_info:'每回合限一次。你可以展示“安”,然后视为使用或打出一张【杀】或【闪】。然后当你于本回合下一次成为牌的目标后,使用者弃置你的一张牌。', + dc_ruiji:'芮姬', + dcwangyuan:'妄缘', + dcwangyuan_info:'当你于回合外失去牌后,或于回合内发动〖俐影〗后,你可以随机将牌堆里的一张与你所有“妄”牌名均不同的基本牌或锦囊牌置于武将牌上,称为“妄”(不超过游戏人数)。', + dclingyin:'铃音', + // dclingyin_info:'出牌阶段开始时,你可以获得至多X张“妄”(X为游戏轮数)然后若你的“妄”颜色均相同,你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用。', + dclingyin_info:'出牌阶段开始时,你可以选择至多X张“妄”(X为游戏轮数),若这些牌以外的“妄”中不存在颜色不同的牌,则你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用,且你获得这些牌。', + dcliying:'俐影', + dcliying_info:'每回合限一次。当你于摸牌阶段外获得牌后,你可以将这些牌中的任意张交给一名其他角色,然后摸一张牌。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/standard.js b/character/standard.js index 155d04c64..e084c01e8 100755 --- a/character/standard.js +++ b/character/standard.js @@ -11,7 +11,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ - re_lidian:['male','wei',3,['xunxun','wangxi']], + re_lidian:['male','wei',3,['xunxun','xinwangxi']], re_xushu:['male','shu',4,['zhuhai','qianxin']], caocao:['male','wei',4,['jianxiong','hujia'],['zhu']], simayi:['male','wei',3,['fankui','guicai']], @@ -994,7 +994,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wusheng:{ audio:2, audioname2:{old_guanzhang:'old_fuhun'}, - audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo','re_guanzhang'], enable:['chooseToRespond','chooseToUse'], filterCard:function(card,player){ if(get.zhu(player,'shouyue')) return true; @@ -2452,38 +2452,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, characterReplace:{ caocao:['re_caocao','caocao'], - guojia:['re_guojia','guojia'], - simayi:['re_simayi','simayi'], - jin_simayi:['jin_simayi','junk_simayi'], - zhenji:['re_zhenji','zhenji'], + guojia:['re_guojia','guojia','ps1059_guojia','ps2070_guojia'], + simayi:['re_simayi','simayi','ps_simayi','ps2068_simayi'], + jin_simayi:['jin_simayi','junk_simayi','ps_jin_simayi'], + zhenji:['re_zhenji','yj_zhenji','zhenji'], xuzhu:['re_xuzhu','xuzhu'], zhangliao:['re_zhangliao','zhangliao'], sp_zhangliao:['sp_zhangliao','yj_zhangliao'], xiahoudun:['re_xiahoudun','xin_xiahoudun','xiahoudun'], liubei:['re_liubei','liubei','junk_liubei'], - guanyu:['re_guanyu','guanyu'], - zhangfei:['re_zhangfei','tw_zhangfei','xin_zhangfei','old_zhangfei','zhangfei'], - zhaoyun:['re_zhaoyun','old_zhaoyun','zhaoyun'], + guanyu:['re_guanyu','guanyu','ps_guanyu'], + zhangfei:['re_zhangfei','tw_zhangfei','xin_zhangfei','old_zhangfei','zhangfei','yj_zhangfei'], + zhaoyun:['re_zhaoyun','old_zhaoyun','zhaoyun','ps2063_zhaoyun','ps2067_zhaoyun'], sp_zhaoyun:['sp_zhaoyun','jsp_zhaoyun'], - machao:['re_machao','machao'], + machao:['re_machao','machao','ps_machao'], sp_machao:['sp_machao','old_machao'], - zhugeliang:['re_zhugeliang','zhugeliang'], + zhugeliang:['re_zhugeliang','zhugeliang','ps2066_zhugeliang','ps_zhugeliang'], huangyueying:['re_huangyueying','huangyueying','junk_huangyueying'], sunquan:['re_sunquan','sunquan'], - zhouyu:['re_zhouyu','zhouyu'], + zhouyu:['re_zhouyu','zhouyu','ps1062_zhouyu','ps2080_zhouyu'], luxun:['re_luxun','luxun'], lvmeng:['re_lvmeng','lvmeng'], huanggai:['re_huanggai','huanggai'], daqiao:['re_daqiao','daqiao'], sunshangxiang:['re_sunshangxiang','sunshangxiang'], - ganning:['re_ganning','ganning'], + ganning:['re_ganning','ganning','yongjian_ganning'], yj_ganning:['yj_ganning','sp_ganning'], - lvbu:['re_lvbu','lvbu'], + lvbu:['re_lvbu','lvbu','ps_lvbu'], diaochan:['re_diaochan','diaochan'], huatuo:['re_huatuo','old_huatuo','huatuo'], huaxiong:['re_huaxiong','old_huaxiong','huaxiong','ol_huaxiong'], yuanshu:['yl_yuanshu','yuanshu','re_yuanshu','old_yuanshu','ol_yuanshu'], gongsunzan:['dc_gongsunzan','re_gongsunzan','xin_gongsunzan','gongsunzan'], + re_lidian:['re_lidian','old_re_lidian'], }, translate:{ caocao:'曹操', diff --git a/character/tw.js b/character/tw.js index 9577e0e93..c63b26656 100644 --- a/character/tw.js +++ b/character/tw.js @@ -11,7 +11,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tw_yunchouren:['tw_xujing','tw_qiaogong'], tw_yunchouyong:['tw_zongyu','tw_chendong','tw_sunyi'], tw_yunchouyan:['tw_jiangqing'], - tw_swordsman:['xia_xushu','xia_wangyue','xia_liyàn','xia_tongyuan'], + tw_swordsman:['xia_xushu','xia_wangyue','xia_liyàn','xia_tongyuan','xia_lusu','xia_dianwei','xia_zhaoe','xia_xiahouzie'], tw_mobile:['nashime','tw_beimihu','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'], @@ -19,6 +19,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + 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'],[]], @@ -147,6 +151,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liyàn:'李彦,号称"并州第一戟",是童渊的师兄。早年间两人在玉真子门下一起习武,后成年出师开枝散叶。同为并州人的吕布在得知李彦的名声后,投入其门下学习武艺。', re_fazheng:'字孝直,本为刘璋部下,刘备围成都时劝说刘璋投降,而后又与刘备进取汉中,献计将曹操大将夏侯渊斩首。法正善奇谋,深受刘备信任和敬重。', xin_guyong:'为蔡邕之徒。其为人少言语,不饮酒,严厉正大,被张纮推荐仕于孙权。孙权任命他为会稽郡丞,行太守事,后不断升迁,官至吴国丞相。顾雍为官,多进良言,有功于吴。', + zhaoe:'赵娥,东汉酒泉郡禄福县(即肃州)人。丈夫庞子夏,表氏县(今高台县)人。庞子夏去世后,赵娥在禄福县抚养其子庞淯。她的父亲被李寿杀死。灵帝光和二年(公元179年)二月上旬的一天早晨,赵娥在都亭前与李寿相遇,她奋力挥刀杀死了李寿,随后到了都亭尊长的面前认罪伏法。后来,凉州刺史周洪、酒泉太守刘班等人共同上表朝廷,禀奏赵娥的烈义行为,刻石立碑显其赵家门户。黄门侍郎梁宽还著书追述赵娥的事迹,为其作传。西晋政治家傅玄为其作《秦女休行》诗,加以赞美。', + xiahouzie:'夏侯紫萼,游卡桌游《三国杀阵面对决》中虚构的人物。幼年因天天帮病种的母亲采紫萼得其名。亲眼目睹母亲被宦官所杀,愤怒之下夺过佩剑斩下宦官的头颅。被神秘人所救,发现了自己的身世,决心与宦官争斗到底。后再闯荡江湖的过程中,与夏侯惇义结金兰,以夏侯家姓氏称呼。', }, card:{ dz_mantianguohai:{ @@ -260,6 +266,616 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //夏侯紫萼 + twxuechang:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + 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); + } + 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; + 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); + } + }, + 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); + }); + 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]; + }, + 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'); + 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]; + } + return str; + } + } + } + } + }, + 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; + }, + 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)+'〗、'; + } + str=str.slice(0,str.length-1); + return '减1点体力上限,然后'+(str.length?'获得'+str:'听一句技能配音'); + }, + 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; + }); + if(skills.length){ + for(var i of skills) player.addSkillLog(i); + 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'; + } + },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); + }); + }, + forced:true, + locked:false, + content:function(){ + for(var i of player.getStorage('twduoren')){ + player.removeSkill(i); + game.log(player,'失去了技能','#g【'+get.translation(i)+'】'); + } + delete player.storage.twduoren; + } + } + } + }, + //赵娥 + twyanshi:{ + audio:2, + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + locked:false, + direct:true, + onremove:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + group:['twyanshi_hurt','twyanshi_damage'], + content:function(){ + 'step 0' + 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]); + } + }, + 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').contains(event.source)||player!=event.source&&player.getStorage('twyanshi').contains(event.player); + }, + content:function(){ + trigger.source.addMark('twyanshi_mark',1); + } + }, + damage:{ + audio:'twyanshi', + trigger:{ + source:['damageBegin1','damageSource'], + }, + forced:true, + locked:false, + filter:function(event,player){ + return event.player.hasMark('twyanshi_mark'); + }, + content:function(){ + 'step 0' + if(event.triggername=='damageBegin1'){ + trigger.num++; + } + else{ + player.draw(trigger.num); + trigger.player.removeMark('twyanshi_mark',trigger.player.countMark('twyanshi_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); + } + if(player.getStorage('twyanshi').contains(event.player)){ + return player.isIn()&&player.hp>0; + } + return false; + }, + 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); + } + if(player.getStorage('twyanshi').contains(trigger.player)){ + avengers=[player]; + } + event.avengers=avengers; + 'step 1' + 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); + }, + ai:{ + combo:'twyanshi', + }, + subSkill:{ + ai:{ + ai:{ + effect:{ + target:function(card,player,target){ + if(!get.tag(card,'damage')) 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; + } + if(num>0) return [1,0.5-1.5*num]; + } + } + } + } + } + }, + //侠典韦 + twliexi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.countCards('he'); + }, + 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){ + cards.push(card); + weapon=true; + } + } + 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(val<30) list[0].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); + }); + 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); + 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); + }, + 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); + player.discard(cards); + 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; + break; + } + } + if(!goon) event.finish(); + } + else event.finish(); + 'step 2' + game.delayx(); + target.damage(); + } + }, + 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); + }); + } + else event.goto(2); + 'step 1' + 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); + } + } + 'step 2' + 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)=>{ + return _status.event.targets.contains(target); + }).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); + } + }, + 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:'额定摸牌数-#', + }, + } + } + }, + //侠鲁肃 + twkaizeng:{ + audio:2, + global:'twkaizeng_want', + askInfo:['好哥哥给点XXX','有XXX吗','想要XXX','能给些XXX吗','手头正缺XXX'], + refuseInfo:['不给','拒绝'], + subSkill:{ + want:{ + 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&¤t.hasSkill('twkaizeng'); + }); + return ui.create.dialog('###慨赠###'+'选择一种基本牌的牌名或非基本牌的类型,然后令'+get.translation(targets)+(targets.length>1?'中的一人':'')+'选择是否交给你任意张牌'); + }, + chooseControl:function(){ + var list=[]; + var basic=[]; + for(var i=0;icurrent!=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.contains(type)) return type; + } + return list.randomGet(); + }, + backup:function(result,player){ + return { + audio:'twkaizeng', + type:result.control, + direct:true, + clearTime:true, + 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&¤t.hasSkill('twkaizeng'); + }); + return targets.length>1?1:-1; + }, + prepare:function(cards,player,targets){ + targets[0].logSkill('twkaizeng_want',player); + }, + 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); + 'step 1' + if(result.bool){ + var cards=result.cards; + event.cards=cards; + target.give(cards,player); + } + else{ + var refuseInfo=lib.skill.twkaizeng.refuseInfo; + if(get.attitude(target,player)<0) refuseInfo.push('没门'); + target.chat(refuseInfo.randomGet()); + event.finish(); + } + 'step 2' + 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; + }); + if(card) target.gain(card,'gain2'); + } + 'step 4' + game.delayx(); + }, + ai:{ + result:{ + target:1, + }, + }, + } + }, + prompt:()=>'请选择一名有【慨赠】的角色', + }, + 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; + return 0; + } + }, + }, + }, + want_backup:{}, + }, + ai:{ + threaten:3 + } + }, + twyangming:{ + audio:2, + trigger:{ + player:'phaseUseEnd', + }, + 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){ + types.add(get.type2(evt.card)); + } + var num=types.length; + player.draw(num); + player.addTempSkill('twyangming_limit'); + 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'); + } + } + } + } + }, //邴原 twbingde:{ audio:2, @@ -5382,7 +5998,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(_status.event.controls.contains('背水!')&&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||(!targtet.countCards('h')&&!target.countCards('e',function(card){ + 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; @@ -7007,8 +7623,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, filter:function(event,player,name){ if(name=='useCard') return (event.card.name=='sha'&&player.hasMark('twchuanshu_mark')); - return event._twchuanshu&&player.hasHistory('sourceDamage',function(evt){ - return evt.card==event.card&&evt.getParent().type=='card'; + return event.player!=player&&event._twchuanshu&&player.hasHistory('sourceDamage',function(evt){ + return evt.card==event.card; }); }, content:function(){ @@ -7022,7 +7638,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var num1=trigger._twchuanshu; var num2=0; player.getHistory('sourceDamage',function(evt){ - if(evt.card==trigger.card&&evt.getParent().type=='card') num2+=evt.num; + if(evt.card==trigger.card) num2+=evt.num; }); player.draw(num1*num2); } @@ -12509,6 +13125,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, characterReplace:{ tw_caocao:['tw_caocao','yj_caocao'], + mateng:['tw_mateng','mateng'], }, dynamicTranslate:{ twfengpo:function(player){ @@ -13004,6 +13621,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tw_dengzhi:'TW邓芝', twjimeng:'急盟', twjimeng_info:'出牌阶段限一次。你可以获得一名其他角色区域内的一张牌,然后交给其一张牌。若其体力值不小于你,你摸一张牌。', + xia_lusu:'侠鲁肃', + twkaizeng:'慨赠', + twkaizeng_info:'其他角色的出牌阶段限一次。其可以选择一种基本牌的牌名或非基本牌的类型,然后令你选择是否交给其任意张手牌。若你以此法:交给其至少两张牌,你摸一张牌;交给其的牌中包含其选择的牌名或类型的牌,你获得一张与此牌名或类型不同的牌。', + twyangming:'扬名', + twyangming_info:'出牌阶段结束时,你可以摸X张牌,且令本回合的手牌上限+X(X为你本阶段使用过的牌的类型数)。', + xia_dianwei:'侠典韦', + 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_mobile:'海外服·稀有专属', tw_yunchouzhi:'运筹帷幄·智', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 0b5a5e5e9..6099653c6 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -371,7 +371,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ var cards=event.getg(player); - if(!cards.length) return false; + if(!cards||!cards.length) return false; var namelist=[]; var namedlist=[]; for(var i=0;i0; + }, + audio:'duliang', + content:function(){ + 'step 0' + player.gainPlayerCard(target,'he',true); + 'step 1' + var name=get.translation(target); + player.chooseControl(function(){ + return Math.random()<0.5?'选项一':'选项二'; + }).set('prompt','督粮:请选择一项').set('choiceList',['你观看牌堆顶的两张牌,然后令'+name+'获得其中的一或两张基本牌','令'+name+'于下回合的摸牌阶段额外摸一张牌']); + 'step 2' + if(result.control=='选项一'){ + var cards=get.cards(2),bool=false; + event.cards=cards; + game.cardsGotoOrdering(cards); + for(var card of cards){ + if(get.type(card)=='basic'){ + bool=true; + break; + } + } + player.chooseButton(['督粮:选择令'+get.translation(target)+'获得的牌',cards],[1,2],bool).set('filterButton',button=>{ + return get.type(button.link)=='basic'; + }).set('ai',button=>{ + return _status.event.sgn*get.value(button.link); + }).set('sgn',get.sgnAttitude(player,target)>0); + } + else{ + target.addTempSkill('dcduliang2',{player:'phaseAfter'}); + target.addMark('dcduliang2',1,false); + event.finish(); + } + 'step 3' + if(result.bool){ + var cardsx=result.links; + target.gain(cardsx,'draw'); + game.log(target,'获得了'+get.cnNumber(cardsx.length)+'张牌'); + cards.removeArray(cardsx); + cards.reverse(); + } + for(var i=0;i本阶段已使用过的牌'); + dialog.push('
    本回合已使用过的牌
    '); dialog.push([list1,'vcard']); } if(list2.length){ - dialog.push('
    本阶段未使用过的牌
    '); + dialog.push('
    本回合未使用过的牌
    '); dialog.push([list2,'vcard']); } player.chooseButton(dialog,true,[1,3]).set('ai',function(button){ - var card={name:button.link[2]},list=_status.event.list; + var card={name:button.link[2],storage:{sangu:true}},list=_status.event.list; var player=_status.event.player,target=_status.event.getParent().target; if(get.attitude(player,target)<0){ if(!list.contains(card.name)) return 0; @@ -843,12 +916,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.log(player,'为',target,'选择了','#y'+get.translation(names)); target.addTempSkill('sangu_effect',{player:'phaseUseAfter'}); target.markSkill('sangu_effect'); + var bool=true; for(var i of names){ if(!event.used.contains(i)){ - player.loseHp(); + bool=false; break; } } + if(bool){ + target.addTempSkill('sangu_prevent',{player:'phaseUseAfter'}); + target.markAuto('sangu_prevent',[player]); + } + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')&&card.storage&&card.storage.sangu) return 'zeroplayertarget'; + }, } }, subSkill:{ @@ -894,9 +979,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.getStorage('sangu_effect').length>0; }, content:function(){ + if(!trigger.card.storage) trigger.card.storage={}; + trigger.card.storage.sangu=true; player.unmarkAuto('sangu_effect',[player.getStorage('sangu_effect')[0]]); }, }, + prevent:{ + trigger:{source:'damageBegin2'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return event.card&&event.card.storage&&event.card.storage.sangu&&player.getStorage('sangu_prevent').contains(event.player); + }, + content:function(){ + trigger.cancel(); + } + } }, }, yizu:{ @@ -5395,7 +5494,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mod:{ cardEnabled:function(card,player){ if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; - } + }, + cardSavable:function(card,player){ + if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; + }, } }, jiyu2:{ @@ -6149,11 +6251,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!map[id]) map[id]={}; if(!map[id].extraDamage) map[id].extraDamage=0; map[id].extraDamage++; - trigger.target.judge(function(card){ - if(get.color(card)=='red') return -1; + player.judge(function(card){ + if(get.color(card)=='red') return 1; return 0; }).judge2=function(result){ - return result.bool==false?true:false; + return result.bool; }; } 'step 2' @@ -9138,6 +9240,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:2, position:'hs', audio:2, + audioname:['re_guanzhang'], derivation:['new_rewusheng','olpaoxiao'], viewAs:{name:'sha'}, prompt:'将两张手牌当杀使用或打出', @@ -13388,7 +13491,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, characterReplace:{ - caozhi:['re_caozhi','dc_caozhi','caozhi'], + caozhi:['re_caozhi','dc_caozhi','caozhi','ps_caozhi'], zhangchunhua:['re_zhangchunhua','zhangchunhua','mini_zhangchunhua'], yujin:['yujin_yujin','ol_yujin','xin_yujin','yujin'], dc_xushu:['dc_xushu','re_xushu'], @@ -13399,7 +13502,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wuguotai:['xin_wuguotai','re_wuguotai','wuguotai'], lingtong:['xin_lingtong','re_lingtong','lingtong','old_lingtong'], gaoshun:['xin_gaoshun','re_gaoshun','gaoshun','old_gaoshun'], - zhonghui:['re_zhonghui','xin_zhonghui','zhonghui','old_zhonghui'], + zhonghui:['re_zhonghui','xin_zhonghui','zhonghui','old_zhonghui','pe_zhonghui'], wangyi:['re_wangyi','wangyi','old_wangyi'], caozhang:['re_caozhang','xin_caozhang','caozhang'], guanzhang:['re_guanzhang','guanzhang','old_guanzhang'], @@ -13416,7 +13519,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ panzhangmazhong:['xin_panzhangmazhong','re_panzhangmazhong','panzhangmazhong'], yufan:['xin_yufan','re_yufan','yufan'], zhuran:['re_zhuran','xin_zhuran','zhuran','old_zhuran'], - liru:['re_liru','dc_liru','xin_liru','liru'], + liru:['re_liru','dc_liru','xin_liru','liru','yj_liru'], fuhuanghou:['re_fuhuanghou','xin_fuhuanghou','fuhuanghou','old_fuhuanghou'], chenqun:['dc_chenqun','chenqun','re_chenqun','old_chenqun'], hanhaoshihuan:['re_hanhaoshihuan','hanhaoshihuan'], @@ -13452,6 +13555,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huanghao:['huanghao','dc_huanghao','old_huanghao'], caorui:['caorui','old_caorui'], sunziliufang:['dc_sunziliufang','sunziliufang'], + liyan:['liyan','old_liyan'], }, translate:{ old_huaxiong:'华雄', @@ -14004,7 +14108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pojun_info:'当你使用【杀】造成伤害后,你可以令受伤角色摸X张牌,然后其翻面(X为该角色的体力值且至多为5)。', shiyong:'恃勇', shiyong_info:'锁定技,当你受到一次红色【杀】或【酒】【杀】造成的伤害后,须减1点体力上限', - old_guanzhang:'关兴张苞', + old_guanzhang:'旧关兴张苞', old_wangyi:'王异', oldqianxi:'潜袭', oldqianxi_info:'当你使用【杀】对距离为1的目标角色造成伤害时,你可以进行一次判定,若判定结果不为红桃,你防止此伤害,令其减1点体力上限', @@ -14050,7 +14154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kousheng_info:'①出牌阶段开始时,你可以选择任意张手牌,这些牌称为“寇旌”直到回合结束。②你的“寇旌”均视为【杀】且无次数限制。③当你因执行对应实体牌包含“寇旌”的【杀】的效果而造成伤害后,你展示所有“寇旌”牌,然后目标角色可以用所有手牌交换这些牌。', zhugeshang:'诸葛尚', sangu:'三顾', - sangu_info:'出牌阶段结束时,你可以选择至多三个{【杀】或不为notarget或singleCard的普通锦囊牌}中的牌名,然后令一名其他角色记录这些牌名。该角色的下个出牌阶段开始时,其的手牌于其需要使用牌时均视为其记录中的第一张牌直到此阶段结束,且当其使用或打出牌时,移除这些牌中的第一张牌。若你以此法选择过的牌名中包含你本阶段内未使用过的牌名,则你失去1点体力。', + sangu_info:'结束阶段,你可以选择至多三个{【杀】或不为notarget或singleCard的普通锦囊牌}中的牌名,然后令一名其他角色记录这些牌名。该角色的下个出牌阶段开始时,其的手牌于其需要使用牌时均视为其记录中的第一张牌直到此阶段结束,且当其使用或打出牌时,移除这些牌中的第一张牌。若你以此法选择过的牌名均为你本回合内使用过的牌名,则防止你因其以此法使用牌造成的伤害。', yizu:'轶祖', yizu_info:'锁定技。每回合限一次,当你成为【杀】或【决斗】的目标后,若你的体力值不大于使用者的体力值,则你回复1点体力。', liwan:'李婉', @@ -14076,6 +14180,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diezhang_info:'转换技。①出牌阶段,你使用杀的次数上限+1。②阴:当你使用牌被其他角色抵消后,你可以弃置一张牌,视为对其使用X张【杀】;阳:当其他角色使用牌被你抵消后,你可以摸X张牌,视为对其使用一张【杀】(X为1)。', duanwan:'断腕', duanwan_info:'限定技。当你处于濒死状态时,你可以将体力回复至2点,然后删除〖叠嶂①〗和当前转换技状态的〖叠嶂②〗分支,并将〖叠嶂〗修改为“每回合限一次”且将X修改为2。', + dcduliang:'督粮', + dcduliang2:'督粮', + dcduliang_info:'出牌阶段限一次。你可以获得一名其他角色的一张牌,然后选择一项:1.你观看牌堆顶的两张牌,然后令其获得其中的一或两张基本牌;2.令其于下回合的摸牌阶段额外摸一张牌。', yijiang_2011:'一将成名2011', yijiang_2012:'一将成名2012', diff --git a/game/asset.js b/game/asset.js index ff6f44ca9..52bd5ccf0 100644 --- a/game/asset.js +++ b/game/asset.js @@ -5716,6 +5716,62 @@ window.noname_asset_list=[ 'image/card/ziyangdan.png', 'image/card/zong.png', + 'image/character/dc_huojun.jpg', + 'image/character/dc_ruiji.jpg', + 'image/character/dc_sunziliufang.jpg', + 'image/character/dc_tengfanglan.jpg', + 'image/character/dongtuna.jpg', + 'image/character/maxiumatie.jpg', + 'image/character/ol_zhangyì.jpg', + 'image/character/ol_zhujun.jpg', + 'image/character/old_chendao.jpg', + 'image/character/old_liyan.jpg', + 'image/character/old_re_lidian.jpg', + 'image/character/pe_mengda.jpg', + 'image/character/pe_sunchen.jpg', + 'image/character/pe_wangyun.jpg', + 'image/character/pe_wenqin.jpg', + 'image/character/pe_zhonghui.jpg', + 'image/character/pk_duyu.jpg', + 'image/character/ps_caopi.jpg', + 'image/character/ps_caozhi.jpg', + 'image/character/ps_guanyu.jpg', + 'image/character/ps_jiaxu.jpg', + 'image/character/ps_jin_simayi.jpg', + 'image/character/ps_lvbu.jpg', + 'image/character/ps_machao.jpg', + 'image/character/ps_shen_machao.jpg', + 'image/character/ps_simayi.jpg', + 'image/character/ps_zhugeliang.jpg', + 'image/character/ps1059_guojia.jpg', + 'image/character/ps1062_zhouyu.jpg', + 'image/character/ps2063_zhaoyun.jpg', + 'image/character/ps2066_zhugeliang.jpg', + 'image/character/ps2067_zhaoyun.jpg', + 'image/character/ps2068_simayi.jpg', + 'image/character/ps2070_guojia.jpg', + 'image/character/ps2080_zhouyu.jpg', + 'image/character/qiaorui.jpg', + 'image/character/qinlang.jpg', + 'image/character/quhuang.jpg', + 'image/character/re_guanzhang.jpg', + 'image/character/sb_fazheng.jpg', + 'image/character/shen_jiaxu.jpg', + 'image/character/xia_dianwei.jpg', + 'image/character/xia_lusu.jpg', + 'image/character/xia_xiahouzie.jpg', + 'image/character/xia_zhaoe.jpg', + 'image/character/yj_caohong.jpg', + 'image/character/yj_dongzhuo.jpg', + 'image/character/yj_jiaxu.jpg', + 'image/character/yj_liru.jpg', + 'image/character/yj_xuyou.jpg', + 'image/character/yj_zhangfei.jpg', + 'image/character/yj_zhenji.jpg', + 'image/character/yongjian_ganning.jpg', + 'image/character/yuantanyuanxiyuanshang.jpg', + 'image/character/zhanghua.jpg', + 'image/character/ahuinan.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/game.js b/game/game.js index 9715def55..4799a2c17 100644 --- a/game/game.js +++ b/game/game.js @@ -4280,6 +4280,7 @@ update:function(config,map){ if(config.connect_identity_mode=='zhong'){ map.connect_player_number.hide(); + map.connect_limit_zhu.hide(); map.connect_enhance_zhu.hide(); map.connect_double_nei.hide(); map.connect_zhong_card.show(); @@ -4288,6 +4289,7 @@ } else if(config.connect_identity_mode=='purple'){ map.connect_player_number.hide(); + map.connect_limit_zhu.hide(); map.connect_enhance_zhu.hide(); map.connect_double_nei.hide(); map.connect_zhong_card.hide(); @@ -4297,6 +4299,7 @@ else{ map.connect_double_character.show(); map.connect_player_number.show(); + map.connect_limit_zhu.show(); map.connect_enhance_zhu.show(); if(config.connect_player_number!='2'){ map.connect_double_nei.show(); @@ -4341,6 +4344,18 @@ frequent:true, restart:true, }, + connect_limit_zhu:{ + name:'常备主候选武将数', + init:'group', + restart:true, + item:{ + off:'不限制', + group:'按势力筛选', + '4':'四', + '6':'六', + '8':'八', + }, + }, connect_zhong_card:{ name:'明忠卡牌替换', init:true, @@ -4398,6 +4413,7 @@ map.double_nei.hide(); map.auto_identity.hide(); map.choice_zhu.hide(); + map.limit_zhu.hide(); map.choice_zhong.hide(); map.choice_nei.hide(); map.choice_fan.hide(); @@ -4426,6 +4442,7 @@ map.double_nei.hide(); map.auto_identity.hide(); map.choice_zhu.hide(); + map.limit_zhu.hide(); map.choice_zhong.hide(); map.choice_nei.hide(); map.choice_fan.hide(); @@ -4455,6 +4472,7 @@ map.double_nei.hide(); } map.choice_zhu.show(); + map.limit_zhu.show(); map.choice_zhong.show(); map.choice_nei.show(); map.choice_fan.show(); @@ -4787,6 +4805,18 @@ '10':'十', }, }, + limit_zhu:{ + name:'常备主候选武将数', + init:'group', + restart:true, + item:{ + off:'不限制', + group:'按势力筛选', + '4':'四', + '6':'六', + '8':'八', + }, + }, choice_zhong:{ name:'忠臣候选武将数', init:'4', @@ -19853,7 +19883,7 @@ var ais=lib.skill[card].check||function(){return 0}; return ais(); } - var addi=(get.value(card)>=8&&get.type(card)!='equip')?-6:0; + var addi=(get.value(card)>=8&&get.type(card)!='equip')?-3:0; if(card.name=='du') addi-=3; var source=_status.event.source; var player=_status.event.player; @@ -19863,7 +19893,11 @@ return get.number(card)*(Boolean(event.small)?-1:1); } if(source&&source!=player){ - if((get.attitude(player,source)>1)==Boolean(event.small)) return -getn(card)-get.value(card)/2+addi; + if(get.attitude(player,source)>1){ + if(Boolean(event.small)) return getn(card)-get.value(card)/2+addi; + return -getn(card)-get.value(card)/2+addi; + } + if(Boolean(event.small)) return -getn(card)-get.value(card)/2+addi; return getn(card)-get.value(card)/2+addi; } else{ @@ -21152,7 +21186,7 @@ return map; }; next.getg=function(player){ - if(this.getlx===false||player!=this.player) return []; + if(this.getlx===false||player!=this.player||!this.cards) return []; return this.cards.slice(0); } next.gaintag=[]; @@ -50700,7 +50734,7 @@ } }, pause:function(){ - if(_status.paused2||_status.pausing||_status.nopause) return; + if(_status.paused2||_status.pausing||_status.nopause||!ui.pause) return; if(!_status.video){ if(ui.pause.classList.contains('hidden')) return; if(!_status.gameStarted) return; @@ -52761,15 +52795,16 @@ } return func; }, - eventInfoOL:function(item,level){ + eventInfoOL:function(item,level,nomore){ if(Object.prototype.toString.call(item)=='[object Object]'){ var item2={}; for(var i in item){ if(i=='_trigger'){ - if(level!==false) item2[i]=get.eventInfoOL(item[i],false); + if(nomore===false) continue; + else item2[i]=get.eventInfoOL(item[i],null,false); } else if(lib.element.event[i]||i=='content'||get.itemtype(item[i])=='event') continue; - else item2[i]=get.stringifiedResult(item[i],level-1); + else item2[i]=get.stringifiedResult(item[i],null,false); } return '_noname_event:'+JSON.stringify(item2); } @@ -52791,7 +52826,7 @@ } return evt||item; }, - stringifiedResult:function(item,level){ + stringifiedResult:function(item,level,nomore){ if(!item) return item; if(typeof item=='function'){ return get.funcInfoOL(item); @@ -52802,7 +52837,9 @@ case 'cards': return get.cardsInfoOL(item); case 'player': return get.playerInfoOL(item); case 'players': return get.playersInfoOL(item); - case 'event': return get.eventInfoOL(item); + case 'event': + if(nomore===false) return ''; + return get.eventInfoOL(item); default: if(typeof level!='number'){ level=8; @@ -52813,7 +52850,7 @@ } var item2=[]; for(var i=0;i0){ + trigger.player.chooseControl().set('prompt','追妒:请选择一项').set('choiceList',[ '令'+get.translation(trigger.player)+'此次对你造成的伤害+1', '弃置装备区里的所有牌', ]).set('ai',function(){ - var list=_status.event.list; - if(list.length>1) return '选项二'; - return list[0]; + var player=_status.event.player,cards=player.getCards('e'); + if(player.hp<=2) return 1; + if(get.value(cards)<=7) return 1; + return 0; }).set('list',list); } else event._result={control:'选项一'}; 'step 3' player.line(trigger.player); if(result.control!='选项二') trigger.num++; - if(result.control!='选项一') trigger.player.discard(trigger.player.getCards('e')); + if(result.control!='选项一') trigger.player.chooseToDiscard(trigger.player.countCards('e'),true,'e'); }, }, gzshigong:{ @@ -3013,7 +3014,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseDrawBegin2'}, forced:true, - filter:(event)=>!event.numFixed&&player.isMaxHp(), + filter:(event,player)=>!event.numFixed&&player.isMaxHp(), preHidden:true, content:function(){ trigger.num+=2; diff --git a/mode/identity.js b/mode/identity.js index 150b6d588..400625de8 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -1437,13 +1437,35 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else{ list3.push(i); } + }; + var getZhuList=function(){ + var limit_zhu=get.config('limit_zhu'); + if(!limit_zhu||limit_zhu=='off') return list2.slice(0).sort(lib.sort.character); + if(limit_zhu!='group'){ + var num=(parseInt(limit_zhu)||6); + return list2.randomGets(num).sort(lib.sort.character); + } + var getGroup=function(name){ + if(lib.characterReplace[name]) return lib.character[lib.characterReplace[name][0]][1]; + return lib.character[name][1]; + } + var list2x=list2.slice(0); + list2x.randomSort(); + for(var i=0;i