From b304b988953f40dd2813e395ad3f458925c94744 Mon Sep 17 00:00:00 2001 From: mengxinzxz <139629761+mengxinzxz@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AD=8F=E6=AD=A6=E5=B8=9D=EF=BC=88=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E7=89=88=E7=A5=9E=E6=9B=B9=E6=93=8D=EF=BC=8C=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E4=B8=BB=E5=85=AC=E6=8A=80=E6=94=B9=E7=89=88=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/old.js | 83 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/character/old.js b/character/old.js index dac520212..083e9ca64 100755 --- a/character/old.js +++ b/character/old.js @@ -7,7 +7,7 @@ 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","old_xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren",'old_chendao'], + old_shenhua:['old_caocao',"yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","old_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_guanzhang'], @@ -21,6 +21,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + old_caocao:['male','shen',3,['junkguixin','feiying'],['die_audio']], old_chendao:['male','shu',4,['drlt_wanglie']], old_liyan:['male','shu',3,['duliang','fulin']], old_re_lidian:['male','wei',3,['xunxun','wangxi']], @@ -87,6 +88,82 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_wanglang:['male','wei',3,['gushe','jici']], }, skill:{ + //魏武帝 + junkguixin:{ + init:function(){ + if(!_status.junkguixin){ + _status.junkguixin=[]; + for(var name in lib.character){ + if(!lib.character[name][3]) continue; + if(game.players.some(target=>{ + if(target.name&&target.name==name) return true; + if(target.name1&&target.name1==name) return true; + if(target.name2&&target.name2==name) return true; + return false; + })) continue; + _status.junkguixin.addArray(lib.character[name][3].filter(skill=>{ + var info=get.info(skill); + return info&&info.zhuSkill&&(!info.ai||!info.ai.combo); + })); + } + } + }, + unique:true, + audio:'guixin', + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + 'step 0' + var controls=['获得技能','修改势力','cancel2']; + if(!_status.junkguixin.some(skill=>!player.hasSkill(skill,null,false,false))) controls.shift(); + player.chooseControl(controls).set('prompt',get.prompt2('junkguixin')).set('ai',()=>_status.event.controls.length==3?'获得技能':'cancel2'); + 'step 1' + if(result.control!='cancel2'){ + var next=game.createEvent('junkguixinx'); + next.player=player; + next.setContent(lib.skill.junkguixin['content_'+result.control]); + } + }, + content_获得技能:function(){ + 'step 0' + var list=_status.junkguixin.slice().filter(skill=>!player.hasSkill(skill,null,false,false)); + if(!list.length){event.finish();return;} + list=list.map(skill=>{ + return [ + skill, + '