Skip to content

Commit

Permalink
Merge branch 'dev_shawn' of https://github.com/Fuynkio/arknights-mower
Browse files Browse the repository at this point in the history
…into dev_shawn
  • Loading branch information
fuyn101 committed Oct 28, 2023
2 parents 30421b2 + 720e0ab commit 976c8ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arknights_mower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
__cli__ = not (__pyinstall__ and not sys.argv[1:])

__system__ = platform.system().lower()
__version__ = 'v3.5.0-alpha-15'
__version__ = 'v3.5.0-alpha-16'
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 976c8ce

Please sign in to comment.