Skip to content

Commit

Permalink
fix:筛选非高资标签六星干员后造成结果为空导致后续无法识别
Browse files Browse the repository at this point in the history
  • Loading branch information
EightyDollars committed Oct 25, 2023
1 parent 22f43f4 commit f2dac8e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions arknights_mower/solvers/recruit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit f2dac8e

Please sign in to comment.