From b2f7613de68fe546e1a316b8108044c031e70679 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Tue, 14 Nov 2023 18:25:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E7=BB=93=E5=85=9A=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E4=BA=BA=E5=A3=AB=E5=86=99=E6=B3=95=EF=BC=8C=E5=87=8F?= =?UTF-8?q?=E5=B0=91map=E5=AE=9A=E4=B9=89=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index e73fa757c..05cd9e5e2 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -1607,18 +1607,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var others=list.randomGets(4); if(others.length==1) event._result={bool:true,links:others}; else{ - var conflictList,map={ + var map={ 'scs_bilan':'scs_hankui', 'scs_hankui':'scs_bilan', 'scs_duangui':'scs_guosheng', 'scs_guosheng':'scs_duangui', - },list=others.slice(); - if(map[first]&&others.some(changshi=>map[first]==changshi)) conflictList=[others.find(changshi=>map[first]==changshi)]; - else conflictList=others.filter(changshi=>{ - var map=lib.skill.mbdanggu.conflictMap(player); - var names=map[first]; - return names.contains(changshi); - }); + },map2=lib.skill.mbdanggu.conflictMap(player); + var conflictList=others.filter(changshi=>{ + if(map[first]&&others.some(changshi2=>map[first]==changshi2)) return map[first]==changshi; + else return map2[first].includes(changshi); + }),list=others.slice(); if(conflictList.length){ var conflict=conflictList.randomGet(); list.remove(conflict);