From f2dac8e60aaef7b561b90dfe36e27a38ebcbfce7 Mon Sep 17 00:00:00 2001 From: EightyDollars Date: Wed, 25 Oct 2023 10:49:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=AD=9B=E9=80=89=E9=9D=9E=E9=AB=98?= =?UTF-8?q?=E8=B5=84=E6=A0=87=E7=AD=BE=E5=85=AD=E6=98=9F=E5=B9=B2=E5=91=98?= =?UTF-8?q?=E5=90=8E=E9=80=A0=E6=88=90=E7=BB=93=E6=9E=9C=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=90=8E=E7=BB=AD=E6=97=A0=E6=B3=95=E8=AF=86?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/recruit.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arknights_mower/solvers/recruit.py b/arknights_mower/solvers/recruit.py index ab2bdb9c7..b7dfc95ef 100644 --- a/arknights_mower/solvers/recruit.py +++ b/arknights_mower/solvers/recruit.py @@ -360,29 +360,34 @@ def recruit_cal(self, tags: list[str]): tmp = [x for x in tmp if x['star'] >= 3] if "高级资深干员" not in item: tmp = [x for x in tmp if x['star'] < 6] + if len(tmp) == 0: + continue tmp.sort(key=lambda k: k['star']) combined_agent[item] = tmp for item in combinations(tags, 2): tmp = [j for j in agent_with_tags[item[0]] if j in agent_with_tags[item[1]]] - if len(tmp) == 0: - continue + if "支援机械" not in item: tmp = [x for x in tmp if x['star'] >= 3] if "高级资深干员" not in item: tmp = [x for x in tmp if x['star'] < 6] + if len(tmp) == 0: + continue tmp.sort(key=lambda k: k['star']) combined_agent[item] = tmp for item in combinations(tags, 3): tmp1 = [j for j in agent_with_tags[item[0]] if j in agent_with_tags[item[1]]] tmp = [j for j in tmp1 if j in agent_with_tags[item[2]]] - if len(tmp) == 0: - continue + if "支援机械" not in item: tmp = [x for x in tmp if x['star'] >= 3] if "高级资深干员" not in item: tmp = [x for x in tmp if x['star'] < 6] + if len(tmp) == 0: + continue tmp.sort(key=lambda k: k['star']) combined_agent[item] = tmp + sorted_list = sorted(combined_agent.items(), key=lambda x: index_dict[x[1][0]['star']]) result_dict = {}