From 678f1e4cbcb769007324c786377141a3bae588e5 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 16 Mar 2024 16:09:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=9C=E8=89=AF=E3=80=90=E7=8B=AC=E5=BE=80?= =?UTF-8?q?=E3=80=91=E8=A7=89=E9=86=92=E5=88=86=E6=94=AFai=E4=BC=98?= =?UTF-8?q?=E5=8C=96+=E5=AF=B9=E5=B1=80log=E4=BC=98=E5=8C=96+=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=AE=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/tw.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/character/tw.js b/character/tw.js index 72b7b392c..f333bac0e 100644 --- a/character/tw.js +++ b/character/tw.js @@ -396,11 +396,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ async content(event,trigger,player){ player.awakenSkill('twduwang'); game.log(player,'完成使命'); - const {result:{index}}=await player.chooseControl().set('choiceList',[ + let result; + if(player.hasSkill('twxiayong',null,false,false)) result={index:1}; + 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; @@ -408,12 +411,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },'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); - }); - if(index==0) await player.addSkills('twxiayong'); + */ + return 1; + }).forResult(); + if(result.index==0) await player.addSkills('twxiayong'); else{ - player.restoreSkill('twduwang'); - player.restoreSkill('twylyanshi'); + for(const skill of ['twduwang','twylyanshi']){ + if(player.awakenedSkills.includes(skill)){ + player.restoreSkill(skill); + player.popup(skill); + game.log(player,'重置了技能','#g【'+get.translation(skill)+'】'); + } + } player.storage.twduwang_fail=true; + game.log(player,'修改了技能','#g【独往】'); } }, },