From da73f999a5395cb77af2fdf7d5c62cf4b8468366 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Thu, 29 Feb 2024 00:12:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B4=94=E6=AF=9B=E3=80=81=E5=90=95=E5=87=A1?= =?UTF-8?q?=E3=80=81=E6=9D=8E=E9=83=AD=EF=BC=8C=E8=87=A7=E9=9C=B8=E5=88=86?= =?UTF-8?q?=E5=8C=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 3 +- character/rank.js | 3 + character/sp.js | 34 +-------- character/sp2.js | 32 ++++++++- character/xianding.js | 163 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 198 insertions(+), 37 deletions(-) diff --git a/character/huicui.js b/character/huicui.js index 5e422aca2..5a6c57c2b 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'huicui', connect:true, character:{ + zangba:['male','wei',4,['rehengjiang']], dc_simashi:['male','wei',3,['dcsanshi','dczhenrao','dcchenlve']], dc_wangling:['male','wei',4,['dcjichou','dcmouli'],['clan:太原王氏']], dc_jiangji:['male','wei',3,['dcshiju','dcyingshi']], @@ -108,7 +109,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'], sp_caizijiaren:['dc_kongrong','re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru','pangshanmin','kuaiqi'], sp_zhilan:['dc_liuli','liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen','dc_lingcao'], - sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang','dc_dongzhao'], + sp_guixin:['zangba','re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang','dc_dongzhao'], 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'], diff --git a/character/rank.js b/character/rank.js index 2fda41539..04c8a3ce0 100644 --- a/character/rank.js +++ b/character/rank.js @@ -922,6 +922,9 @@ window.noname_character_rank={ 'tw_mayunlu', 'tw_hucheer', 'sp_lvfan', + 'lvfan', + 'cuimao', + 'liqueguosi', 're_chendeng', 'wuyan', 'wangyue', diff --git a/character/sp.js b/character/sp.js index e25221bec..10a04894f 100755 --- a/character/sp.js +++ b/character/sp.js @@ -10,7 +10,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_tianzhu:['liyi','zhangyan','niujin','hejin','hansui',"wutugu","yanbaihu","shamoke","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna",'ol_wenqin'], sp_nvshi:['ol_dingshangwan',"lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu',"daxiaoqiao","jin_guohuai",'ol_hujinding'], sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','zhangzhi','lushi'], - sp_huben:['duanjiong','ol_mengda',"caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_huban','haopu','ol_qianzhao'], + sp_huben:['duanjiong','ol_mengda',"caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_huban','haopu','ol_qianzhao'], sp_liesi:['lvboshe','mizhu','weizi','ol_liuba','zhangshiping'], sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo'], sp_qifu:['ol_feiyi',"caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'], @@ -186,16 +186,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kanze:['male','wu',3,['xiashu','kuanshi']], heqi:['male','wu',4,['olqizhou','olshanxi']], - //mifuren:['female','shu',3,['guixiu','cunsi']], yuejin:['male','wei',4,['xiaoguo']], sp_dongzhuo:['male','qun',5,['hengzheng']], hetaihou:['female','qun',3,['zhendu','qiluan']], dingfeng:['male','wu',4,['reduanbing','refenxun']], shamoke:['male','shu',4,['gzjili']], - //liqueguosi:['male','qun',4,['xiongsuan']], - //cuimao:['male','wei',3,['zhengbi','fengying']], - zangba:['male','wei',4,['rehengjiang']], zhangren:['male','qun',4,['chuanxin','zfengshi']], wangyun:['male','qun',4,['xinlianji','xinmoucheng'],['clan:太原王氏']], @@ -15142,21 +15138,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - xiongsuan:{ - audio:2, - }, - diancai:{ - audio:2, - }, - diaodu:{ - audio:2, - }, - zhengbi:{ - audio:2, - }, - fengying:{ - audio:2, - }, //新服曹笨 xinshanjia:{ group:["xinshanjia_count"], @@ -26338,9 +26319,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ bianfuren:'卞夫人', ol_bianfuren:'卞夫人', shamoke:'沙摩柯', - lvfan:'吕范', - liqueguosi:'李傕郭汜', - cuimao:'崔琰毛玠', caoying:"曹婴", simahui:"司马徽", @@ -26438,16 +26416,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wanwei_info:'当你因被其他角色获得或弃置而失去牌时,你可以改为自己选择失去的牌。', gzjili:'蒺藜', gzjili_info:'当你于一回合内使用或打出第X张牌时,你可以摸X张牌(X为你的攻击范围)。', - xiongsuan:'凶算', - xiongsuan_info:'限定技,出牌阶段,你可以弃置一张手牌并选择一名角色,对其造成1点伤害,然后你摸三张牌。若该角色有已发动的限定技,则你选择其中一个限定技。此回合结束后,视为该限定技未发动过。', - diaodu:"调度", - diaodu_info:"当你使用装备牌时,你可以摸一张牌;出牌阶段开始时,你可以获得一名其他角色装备区里的一张牌,然后你可以将此牌交给另一名角色。", - diancai:'典财', - diancai_info:'其他角色的出牌阶段结束时,若你于此阶段失去了X张或更多的牌,则你可以将手牌摸至体力上限。(X为你的体力值)', - zhengbi:'征辟', - zhengbi_info:'出牌阶段开始时,你可以选择一项:选择一名未受伤的其他角色,你对其使用的牌无距离限制且不计入使用次数直到回合结束;或将一张基本牌交给一名其他角色,然后其交给你一张非基本牌或两张基本牌。', - fengying:'奉迎', - fengying_info:'限定技,出牌阶段,你可以弃置所有手牌。若如此做,你可以令等量的角色将手牌摸至X张(X为其体力上限且至多为5)。然后,你结束出牌阶段,并在当前回合结束后进行一个新的回合。', qingzhong:'清忠', qingzhong_info:'出牌阶段开始时,你可以摸两张牌,若如此做,此阶段结束时,你与手牌数最少的角色交换手牌。', diff --git a/character/sp2.js b/character/sp2.js index d3be95d45..b3eebcfea 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + liqueguosi:['male','qun',4,['xiongsuan']], star_zhangchunhua:['female','wei',3,['starliangyan','starminghui']], star_yuanshao:['male','qun',4,['starxiaoyan','starzongshi','starjiaowang','staraoshi'],['zhu']], star_dongzhuo:['male','qun',5,['starweilin','starzhangrong','starhaoshou'],['zhu']], @@ -97,7 +98,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, characterSort:{ sp2:{ - sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu','dongxie'], + sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu','dongxie','liqueguosi'], sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"], sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"], sp_zizouqi:["mangyachang","xugong","zhangchangpu"], @@ -118,6 +119,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + //李傕郭汜 + xiongsuan:{ + audio:2, + enable:'phaseUse', + filterTarget:true, + filterCard:lib.filter.cardDiscardable, + position:'h', + usable:1, + async content(event,trigger,player){ + const target=event.target; + await target.damage(); + await player.draw(3); + if(target!=player) await player.loseHp(); + }, + ai:{ + order:9, + result:{ + target(player,target){ + const num=get.sgn(get.attitude(player,target)); + if(num*get.damageEffect(target,player,player)>0) return num*get.damageEffect(target,player,player); + if(target==player&&player.getHp()>1) return 0.00001; + return 0; + }, + }, + }, + }, //张春华 starliangyan:{ audio:2, @@ -11605,6 +11632,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ starliangyan_info:'出牌阶段限一次。你可以选择一名其他角色,你摸/弃置至多两张牌,令其弃置/摸等量的牌。然后若你与其手牌数相同,以此法摸牌的角色跳过其下一个弃牌阶段。', starminghui:'明慧', starminghui_info:'一名角色的回合结束时,若你的手牌数:最少,你可以视为使用一张无距离限制的【杀】;最多,你可以将手牌弃置至你手牌数不为最多,然后令一名角色回复1点体力。', + liqueguosi:'李傕郭汜', + xiongsuan:'凶算', + xiongsuan_info:'出牌阶段限一次,你可以弃置一张手牌并对一名角色造成1点伤害,然后你摸三张牌。若该角色不为你,你失去1点体力。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/xianding.js b/character/xianding.js index 5b8c1b842..2b054c12c 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -4,6 +4,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'xianding', connect:true, character:{ + lvfan:['male','wu',3,['diaodu','diancai']], + cuimao:['male','wei',3,['zhengbi','fengying']], huzun:['male','wei',4,['dczhantao','dcanjing']], zhugemengxue:['female','wei',3,['dcjichun','dchanying']], bailingyun:['female','wei',3,['dclinghui','dcxiace','dcyuxin']], @@ -98,14 +100,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xianding:{ sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu','dc_wangjun','dc_xiahouba','old_huangfusong','huzun'], sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'], - sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji'], + sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji','cuimao'], sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren','dc_shixie'], sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'], sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen','zhugeruoxue','caoxian','dc_qinghegongzhu','zhugemengxue'], sp2_yinyu:['zhouyi','luyi','sunlingluan','caoyi'], sp2_wangzhe:['dc_daxiaoqiao','dc_sp_machao'], sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi','malingli','bailingyun'], - sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'], + sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng','lvfan'], sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'], sp2_qifu:['dc_guansuo','xin_baosanniang','dc_zhaoxiang'], sp2_gaoshan:['wanglang','liuhui','zhangjian'], @@ -114,6 +116,152 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + //吕范 + diaodu:{ + audio:2, + trigger:{player:['phaseUseBegin','logSkill']}, + filter(event,player){ + if(event.name=='logSkill'&&event.skill!='diancai') return false; + return game.hasPlayer(target=>{ + return get.distance(player,target)<=1&&target.countGainableCards(player,'e'); + }); + }, + direct:true, + async content(event,trigger,player){ + const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('diaodu'),(card,player,target)=>{ + return get.distance(player,target)<=1&&target.countGainableCards(player,'e'); + }).set('ai',target=>{ + const player=get.event('player'),att=get.attitude(player,target); + let num=0; + if(target.hasSkill('gzxiaoji')) num+=2.5; + if(target.isDamaged()&&target.getEquip('baiyin')) num+=2.5; + if(target.hasSkill('xuanlve')) num+=2; + return get.sgn(att)*num+(target==player?1:0); + }); + if(bool){ + const aim=targets[0]; + player.logSkill('diaodu',aim); + const {result:{bool,cards}}=await player.gainPlayerCard(aim,'e',true); + if(bool&&game.hasPlayer(target=>target!=aim)){ + const card=cards[0]; + const {result:{bool,targets}}=await player.chooseTarget('调度:将'+get.translation(card)+'交给另一名角色',(card,player,target)=>{ + return target!=get.event('aim'); + },true).set('ai',target=>{ + const player=get.event('player'); + return att=get.attitude(player,target); + }).set('aim',aim); + if(bool&&get.owner(card)==player){ + const target=targets[0]; + player.line(target,'green'); + await player.give([card],target); + if(get.owner(card)==target){ + const {result:{bool}}=await target.chooseUseTarget(card); + if(bool) await player.draw(); + else await target.draw(); + } + } + } + } + }, + }, + diancai:{ + audio:2, + inherit:'mbdiancai', + filter(event,player){ + if(!player.getHp()||_status.currentPhase===player) return false; + let num=player.getHistory('lose',evt=>{ + return evt.cards2&&evt.cards2.length&&evt.getParent('phaseUse')==event; + }).reduce((sum,evt)=>{ + return sum+evt.cards2.length; + },0); + return num>=Math.min(5,player.getHp()); + }, + }, + //崔琰毛玠 + zhengbi:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter(event,player){ + return game.hasPlayer(target=>target!=player); + }, + direct:true, + async content(event,trigger,player){ + const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('zhengbi'),lib.filter.notMe).set('ai',target=>{ + const player=get.event('player'); + return -get.attitude(player,target)*target.countCards('he'); + }); + if(bool){ + const target=targets[0],str=get.translation(target); + player.logSkill('zhengbi',target); + let choiceList=['此阶段结束时,若'+str+'本阶段获得过牌,则你获得其手牌区和装备区各一张牌']; + if(player.countCards('h',{type:'basic'})) choiceList.push('交给'+str+'一张基本牌,然后其交给你一张非基本牌或两张基本牌'); + const {result:{index}}=await player.chooseControl().set('choiceList',choiceList).set('ai',()=>get.event('controls').length-1); + if(index==0){ + player.line(target); + player.when('phaseUseEnd').filter(evt=>evt==trigger).then(()=>{ + if(target.isIn()&&target.getHistory('gain',evt=>evt.getParent('phaseUse')==trigger).length){ + player.line(target); + let num=(target.countGainableCards(player,'h')>0)+(target.countCardsGainableCards(player,'e')>0); + if(num){ + player.gainPlayerCard(target,num,'he',true).set('filterButton',button=>{ + return !ui.selected.buttons.some(but=>get.position(button.link)==get.position(but.link)); + }); + } + } + }).vars({target:target}); + } + else{ + const {result:{bool}}=await player.chooseToGive(target,{type:'basic'},true).set('prompt','征辟:交给'+str+'一张基本牌'); + if(bool){ + let choices=[]; + if(target.countCards('he',{type:['trick','delay','equip']})) choices.push('一张非基本牌'); + if(target.countCards('h',{type:'basic'})>1) choices.push('两张基本牌'); + if(choices.length){ + const {result:{control}}=await target.chooseControl(choices).set('ai',function(event,player){ + if(choices.length>1){ + if(player.countCards('he',{type:['trick','delay','equip']},function(card){return get.value(card)<7})) return 0; + return 1; + } + return 0; + }).set('prompt','征辟:交给'+get.translation(player)+'…'); + const check=(control=='一张非基本牌'); + await target.chooseToGive('he',(check?1:2),{type:(check?['trick','delay','equip']:'basic')},true).set('prompt','征辟:交给'+get.translation(player)+control); + } + else if(target.countCards('h')) await target.give(target.getCards('h'),player); + } + } + } + }, + }, + fengying:{ + unique:true, + limited:true, + audio:2, + enable:'phaseUse', + filter(event,player){ + return player.countCards('h')&&player.countCards('h')==player.countDiscardableCards(player,'h'); + }, + skillAnimation:true, + animationColor:'thunder', + async content(event,trigger,player){ + player.awakenSkill('fengying'); + await player.discard(player.getCards('h')); + const evt=player.insertPhase(); + player.when('phaseBegin').filter(evtx=>evtx==evt).then(()=>{ + if(player.isMinHp()&&player.maxHp>0&&player.countCards('h')