From 26e1b341c469e0c76aaacf2b379ffa01ca050ce0 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 31 Jul 2023 23:37:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E6=9F=90=E4=BA=9B=E6=83=8A?= =?UTF-8?q?=E4=B8=BA=E5=A4=A9=E4=BA=BA=E7=9A=84=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/refresh.js | 16 ++++++++-------- character/shenhua.js | 2 +- character/sp2.js | 18 +++++++++++------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index ab0949294..6aa78f12a 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -9752,7 +9752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); event.aiChoice=skills[0]; var choice='更换技能'; - if(event.aiChoice==player.storage.rehuashen.current2||get.skillRank(event.aiChoice,cond)<1) choice='制衡化身'; + if(event.aiChoice==player.storage.rehuashen.current2||get.skillRank(event.aiChoice,cond)<1) choice='弃置化身'; if(player.isOnline2()){ player.send(function(cards,id){ var dialog=ui.create.dialog('是否发动【化身】?',[cards,'character']); @@ -9765,7 +9765,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.dialog.style.display='none'; } if(event.triggername=='rehuashen') event._result={control:'更换技能'}; - else player.chooseControl('制衡化身','更换技能','cancel2').set('ai',function(){ + else player.chooseControl('弃置化身','更换技能','cancel2').set('ai',function(){ return _status.event.choice; }).set('choice',choice); "step 1" @@ -9783,7 +9783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(!event.logged){player.logSkill('rehuashen');event.logged=true} var next=player.chooseButton(true).set('dialog',event.videoId); - if(event.control=='制衡化身'){ + if(event.control=='弃置化身'){ next.set('selectButton',[1,2]); next.set('filterButton',function(button){ return button.link!=_status.event.current; @@ -9796,7 +9796,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); next.set('choice',event.aiChoice); } - var prompt=event.control=='制衡化身'?'选择制衡至多两张化身':'选择要切换的化身'; + var prompt=event.control=='弃置化身'?'选择制衡至多两张化身':'选择要切换的化身'; var func=function(id,prompt){ var dialog=get.idDialog(id); if(dialog){ @@ -9810,7 +9810,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ func(event.videoId,prompt); } "step 2" - if(result.bool&&event.control!='制衡化身'){ + if(result.bool&&event.control!='弃置化身'){ event.card=result.links[0]; var func=function(card,id){ var dialog=get.idDialog(id); @@ -9858,7 +9858,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else if(event.isMine()){ func(event.videoId); } - event._result={control:'更换化身'}; + event._result={control:'弃置化身'}; event.goto(1); return; } @@ -9870,13 +9870,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!_status.noclearcountdown){ game.stopCountChoose(); } - if(event.control=='制衡化身') return; + if(event.control=='弃置化身') return; if(player.storage.rehuashen.current!=event.card){ player.storage.rehuashen.current=event.card; game.broadcastAll(function(player,sex){ player.sex=sex; - game.log(player,'将性别变为了','#y'+get.translation(sex)+'性'); },player,lib.character[event.card][0]); + game.log(player,'将性别变为了','#y'+get.translation(lib.character[event.card][0])+'性'); player.changeGroup(lib.character[event.card][1]); } var link=result.control; diff --git a/character/shenhua.js b/character/shenhua.js index dd7c73870..fa9da946f 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -4478,7 +4478,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.markSkill('huashen'); game.broadcastAll(function(character,player){ player.sex=lib.character[character][0]; - game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性'); //player.group=lib.character[character][1]; //player.node.name.dataset.nature=get.groupnature(player.group); var mark=player.marks.huashen; @@ -4498,6 +4497,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },200); } },character,player); + game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性'); player.changeGroup(lib.character[character][1]); } player.storage.huashen.current2=skill; diff --git a/character/sp2.js b/character/sp2.js index aed20935c..7dcb1a852 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -7979,7 +7979,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue; if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.contains(name2)){ if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue; - if(info.init) info.init(player,list2[k]); + if(info.init) continue; if(info.filter){ try{ var bool=info.filter(trigger,player,name2); @@ -8024,6 +8024,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var list=[]; var skills=[]; var map=[]; + var evt=event.getParent(2); if(!_status.characterlist){ lib.skill.pingjian.initList(); } @@ -8055,9 +8056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue; if((info.enable=='phaseUse'||(Array.isArray(info.enable)&&info.enable.contains('phaseUse')))||(info.enable=='chooseToUse'||(Array.isArray(info.enable)&&info.enable.contains('chooseToUse')))){ if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue; - var evt=event.getParent(2); - if(info.init) info.init(player,list2[k]); - if(info.onChooseToUse) info.onChooseToUse(evt); + if(info.init||info.onChooseToUse) continue; if(info.filter){ try{ var bool=info.filter(evt,player); @@ -8067,9 +8066,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ continue; } } - if(info.viewAs&&typeof info.viewAs!='function'){ - if(evt.filterCard&&!evt.filterCard(info.viewAs,player,evt)) continue; - if(info.viewAsFilter&&info.viewAsFilter(player)==false) continue; + else if(info.viewAs&&typeof info.viewAs!='function'){ + try{ + if(evt.filterCard&&!evt.filterCard(info.viewAs,player,evt)) continue; + if(info.viewAsFilter&&info.viewAsFilter(player)==false) continue; + } + catch(e){ + continue; + } } list.add(name); if(!map[name]) map[name]=[];