From c9c2a17c1ecbe5d458cf345a66174f9d1753b399 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 17 Mar 2024 01:37:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=8E=89=E7=9C=9F=E5=AD=90=E3=80=90?= =?UTF-8?q?=E5=8C=96=E5=A2=83=E3=80=91=E6=B7=BB=E5=8A=A0ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/tw.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/character/tw.js b/character/tw.js index f333bac0e..0ba169bc6 100644 --- a/character/tw.js +++ b/character/tw.js @@ -844,6 +844,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('twhuajing_blocker'); player.getHistory('custom').push({twhuajing_skills:gainSkills}); }, + ai:{ + order:12, + result:{ + player(player){ + return player.countCards('hs',card=>{ + return get.name(card)=='sha'&&player.hasValueTarget(card,false,true); + }); + }, + }, + }, }, jian:{ charlotte:true, @@ -1088,14 +1098,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ .set('prompt2','弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】') .set('ai',card=>7-get.value(card)) .set('logSkill','twdengjian'); - if(bool) */player.gain(cards.randomGet(),'gain2').gaintag.add('twdengjianx'); + if(bool) */await player.gain(cards.randomGet(),'gain2').gaintag.add('twdengjianx'); }, group:'twdengjian_buff', subSkill:{ ban:{charlotte:true}, buff:{ mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('twdengjianx')) return num+0.1; }, }, @@ -1154,7 +1164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0; }) .set('prompt',get.prompt('twxinshou')) - .set('prompt2','令【登剑】失效并令一名其他角色获得【登剑】,你的下个回合开始时,其失去【登剑】,若其这期间使用【杀】造成过伤害,则你结束【登剑】的失效状态') + .set('prompt2','令【登剑】失效并令一名其他角色获得【登剑】,你的下个回合开始时,其失去【登剑】,若其这期间使用【杀】造成过伤害,则你结束【登剑】的失效状态'); if(bool){ const target=targets[0]; player.logSkill('twxinshou',target); @@ -1184,7 +1194,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } else{ - let choice=[],choiceList=['摸一张牌','交给一名其他角色一张牌',]; + let choice=[],choiceList=['摸一张牌','交给一名其他角色一张牌']; if(!player.hasSkill('twxinshou_0')) choice.push('摸牌'); else choiceList[0]=''+choiceList[0]+''; if(!player.hasSkill('twxinshou_1')&&game.hasPlayer(target=>target!=player)) choice.push('给牌'); @@ -1325,11 +1335,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ twenchou:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>lib.skill.twenchou.filterTarget(null,player,current)); }, position:'he', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h')&&target.hasDisabledSlot(); }, usable:1, From c2b276a0432de8a1afe60a50fc388abf86d071e7 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 17 Mar 2024 01:38:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=89=8C=E9=9D=A2=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0lib.translate[name+'=5Fappend']=E5=88=A4?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/character/extra.js b/character/extra.js index bb393af48..19dc20260 100755 --- a/character/extra.js +++ b/character/extra.js @@ -2118,6 +2118,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else if(lib.translate[name+'_info']){ str+=(''+lib.translate[name+'_info']+'|'); } + if(lib.translate[name+'_append']){ + str+=(''+lib.translate[name+'_append']+'|'); + } if(get.is.yingbianConditional(node)){ const yingbianEffects=get.yingbianEffects(node); if(!yingbianEffects.length){ From bdcc420022c91409fc3197a82573388c9fd7038a Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 17 Mar 2024 11:07:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E5=8E=86=E6=88=98?= =?UTF-8?q?=E6=95=88=E6=9E=9C=EF=BC=8C=E5=B9=B6=E4=B8=BA=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8B=A5=E6=9C=89=E5=8E=86=E6=88=98=E6=95=88=E6=9E=9C=E7=9A=84?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E8=BF=9B=E8=A1=8C=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/tw.js | 76 ++++++++++++++++++++++++++++++----------- noname/library/index.js | 2 +- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/character/tw.js b/character/tw.js index 0ba169bc6..644a91db8 100644 --- a/character/tw.js +++ b/character/tw.js @@ -298,7 +298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ twduwang:{ audio:3, dutySkill:true, - derivation:'twxiayong', + derivation:['twxiayong','twylyanshix'], global:'twduwang_global', group:['twduwang_effect','twduwang_achieve','twduwang_fail'], subSkill:{ @@ -364,6 +364,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ backup:{ viewAs:{name:'juedou'}, position:'he', + filterCard:true, check(card){ if(get.name(card)=='sha') return 5-get.value(card); return 8-get.value(card); @@ -396,35 +397,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){ async content(event,trigger,player){ player.awakenSkill('twduwang'); game.log(player,'完成使命'); - let result; - if(player.hasSkill('twxiayong',null,false,false)) result={index:1}; + let result,bool1=(player.hasSkill('twxiayong',null,false,false)),bool2=(!player.awakenedSkills.includes('twylyanshi')&&player.storage.twduwang_ylyanshi); + if(bool1&&bool2) result={index:2}; + else if(bool1) result={index:1}; + else if(bool2) result={index:0}; else result=await player.chooseControl().set('choiceList',[ '获得技能【狭勇】', - //'重置【独往】和【延势】,删除【独往】的使命失败分支,获得【延势】的历战效果', - '重置【独往】和【延势】,删除【独往】的使命失败分支', + '重置【延势】,获得【延势】的历战效果', ]).set('prompt','独往:请选择一项').set('ai',()=>{ - /* const player=get.event('player'),num=game.countPlayer(current=>{ return current!=player&¤t.hasCard(card=>{ if(get.position(card)=='h') return true; return current.canUse(get.autoViewAs({name:'juedou'},[card]),player,false); },'he')&&get.effect(current,{name:'guohe_copy2'},current,player)+get.effect(player,{name:'juedou'},current,player); }); - return Math.max(0,Math.min(2,num)-1); - */ - return 1; + return num>=2?0:1; }).forResult(); if(result.index==0) await player.addSkills('twxiayong'); - else{ - for(const skill of ['twduwang','twylyanshi']){ - if(player.awakenedSkills.includes(skill)){ - player.restoreSkill(skill); - player.popup(skill); - game.log(player,'重置了技能','#g【'+get.translation(skill)+'】'); - } + if(result.index==1){ + player.popup('twylyanshi'); + if(player.awakenedSkills.includes('twylyanshi')){ + player.restoreSkill('twylyanshi'); + game.log(player,'重置了技能','#g【延势】'); + } + if(!player.storage.twduwang_ylyanshi){ + player.storage.twduwang_ylyanshi=true; + game.log(player,'修改了技能','#g【延势】'); + } + } + else{ + if(player.awakenedSkills.includes('twduwang')){ + player.restoreSkill('twduwang'); + game.log(player,'重置了技能','#g【独往】'); + } + if(!player.storage.twduwang_fail){ + player.storage.twduwang_fail=true; + game.log(player,'修改了技能','#g【独往】'); } - player.storage.twduwang_fail=true; - game.log(player,'修改了技能','#g【独往】'); } }, }, @@ -500,6 +509,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delete event.result.skill; player.logSkill('twylyanshi'); player.awakenSkill('twylyanshi'); + if(player.storage.twduwang_ylyanshi){ + player.when({global:'phaseEnd'}).then(()=>{ + if(player.awakenedSkills.includes('twylyanshi')){ + player.popup('历战'); + player.restoreSkill('twylyanshi'); + game.log(player,'触发了','#g【延势】','的','#y历战','效果'); + } + }); + } }, } }, @@ -598,6 +616,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.removeSkill('twjuexing_buff'); }); await player.useCard(card,target,false); + player.when({global:'phaseEnd'}).then(()=>{ + player.popup('历战'); + player.addSkill('twjuexing_tuzhan'); + player.addMark('twjuexing_tuzhan',1,false); + game.log(player,'触发了','#g【绝行】','的','#y历战','效果'); + }); }, ai:{ order:1, @@ -615,6 +639,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{content:'因【绝行】摸牌时,摸牌数+#'}, trigger:{player:'drawBegin'}, filter(event,player){ + if(!player.hasMark('twjuexing_tuzhan')) return false; return (event.gaintag||[]).includes('twjuexing'); }, forced:true, @@ -622,7 +647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content(){ player.popup('历战'); game.log(player,'触发了','#g【绝行】','的','#y历战','效果'); - trigger.num++; + trigger.num+=player.countMark('twjuexing_tuzhan'); }, }, buff:{ @@ -751,6 +776,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } } + player.when({global:'phaseEnd'}).then(()=>{ + player.popup('历战'); + player.addSkill('twbaizu_tuzhan'); + player.addMark('twbaizu_tuzhan',1,false); + game.log(player,'触发了','#g【败族】','的','#y历战','效果'); + }); }, subSkill:{ tuzhan:{ @@ -15930,6 +15961,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.twduwang_fail) str+=''; return str; }, + twylyanshi(player){ + return lib.translate[(player.storage.twduwang_ylyanshi?'twylyanshix':'twylyanshi')+'_info']; + }, }, translate:{ tw_beimihu:'TW卑弥呼', @@ -16604,9 +16638,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tw_wenchou:'文丑', tw_yuantan:'袁谭', twduwang:'独往', - twduwang_info:'使命技。使命:出牌阶段开始时,你可以选择至多三名其他角色并摸X张牌(X为选择角色数+1),然后这些角色依次将一张牌当作【决斗】对你使用。成功:准备阶段,若你上回合使用和成为【决斗】的次数和不小于4(若游戏总人数小于4则改为3),你选择一项:①获得技能〖狭勇〗;②重置〖独往〗和〖延势〗并删除〖独往〗的使命失败分支。失败:当你进入濒死状态时,其他角色不能对你使用【桃】,当你死亡时,使命失败。', + twduwang_info:'使命技。使命:出牌阶段开始时,你可以选择至多三名其他角色并摸X张牌(X为选择角色数+1),然后这些角色依次将一张牌当作【决斗】对你使用。成功:准备阶段,若你上回合使用和成为【决斗】的次数和不小于4(若游戏总人数小于4则改为3),你选择一项,然后重置〖独往〗并删除〖独往〗的使命失败分支:①获得技能〖狭勇〗;②重置〖延势〗并修改〖延势〗(令〖延势〗获得历战效果)。失败:当你进入濒死状态时,其他角色不能对你使用【桃】,当你死亡时,使命失败。', twylyanshi:'延势', twylyanshi_info:'限定技,你可以将一张【杀】当作【决斗】、【兵临城下】或任意智囊牌使用或打出。', + twylyanshix:'延势·改', + twylyanshix_info:'限定技,你可以将一张【杀】当作【决斗】、【兵临城下】或任意智囊牌使用或打出。历战:重置〖延势〗。', twjuexing:'绝行', twjuexing_info:'出牌阶段限一次,你可以视为对一名其他角色使用【决斗】。此【决斗】生效时,你与其将所有手牌扣置于武将牌上,然后各摸等同于当前体力值的牌,此牌结算完毕后,你与其弃置本次以此法摸的牌,然后获得扣置于武将牌上的牌。历战:当你因〖绝行〗摸牌时,摸牌数+1。', twxiayong:'狭勇', diff --git a/noname/library/index.js b/noname/library/index.js index 46c43a53e..34d37d76b 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -7482,7 +7482,7 @@ export class Library extends Uninstantable { '
  • 搏击:若一名角色拥有带有“搏击”的技能,则当该搏击技能触发时,若本次技能的目标角色在你攻击范围内,且你在其攻击范围内,则你执行技能主体效果时,同时额外执行“搏击”后的额外效果。' + '
  • 游击:若一名角色拥有带有“游击”的技能,则当该游击技能执行至“游击”处时,若本次技能的目标角色在你的攻击范围内,且你不在其攻击范围内,则你可以执行“游击”后的额外效果。' + '
  • 激昂:一名角色发动“昂扬技”标签技能后,此技能失效,直至从此刻至满足此技能“激昂”条件后。' + - '
  • 历战:对一个技能效果的升级/修改(可叠加)。' + + '
  • 历战:一名角色的回合结束时,若本回合发动过拥有历战效果的技能,则对此技能效果的进行等同于发动次数的永久可叠加式升级或修改。' + '' }; /**