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] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E5=8E=86=E6=88=98=E6=95=88?= =?UTF-8?q?=E6=9E=9C=EF=BC=8C=E5=B9=B6=E4=B8=BA=E6=89=80=E6=9C=89=E6=8B=A5?= =?UTF-8?q?=E6=9C=89=E5=8E=86=E6=88=98=E6=95=88=E6=9E=9C=E7=9A=84=E8=A7=92?= =?UTF-8?q?=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 { '
  • 搏击:若一名角色拥有带有“搏击”的技能,则当该搏击技能触发时,若本次技能的目标角色在你攻击范围内,且你在其攻击范围内,则你执行技能主体效果时,同时额外执行“搏击”后的额外效果。' + '
  • 游击:若一名角色拥有带有“游击”的技能,则当该游击技能执行至“游击”处时,若本次技能的目标角色在你的攻击范围内,且你不在其攻击范围内,则你可以执行“游击”后的额外效果。' + '
  • 激昂:一名角色发动“昂扬技”标签技能后,此技能失效,直至从此刻至满足此技能“激昂”条件后。' + - '
  • 历战:对一个技能效果的升级/修改(可叠加)。' + + '
  • 历战:一名角色的回合结束时,若本回合发动过拥有历战效果的技能,则对此技能效果的进行等同于发动次数的永久可叠加式升级或修改。' + '' }; /**