Skip to content

Commit

Permalink
feat(分路bp): 实现可根据分路ban不同的英雄
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninohana committed Jun 5, 2024
1 parent 2c8d9f4 commit 66db884
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/lol/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,21 @@ async def autoBan(data, selection: ChampionSelection):
and action['type'] == 'ban'
and action["isInProgress"]):

candidates = cfg.get(cfg.autoBanChampion).split(',')
pos = next(filter(lambda x: x['cellId'] == localPlayerCellId, data['myTeam']), None)
pos = pos.get('assignedPosition')
# print(pos)
if pos == 'top':
candidates = cfg.get(cfg.autoBanChampionTop).split(',')
elif pos == 'judge':
candidates = cfg.get(cfg.autoBanChampionJug).split(',')
elif pos == 'middle':
candidates = cfg.get(cfg.autoBanChampionMid).split(',')
elif pos == 'bottom':
candidates = cfg.get(cfg.autoBanChampionBot).split(',')
elif pos == 'support':
candidates = cfg.get(cfg.autoBanChampionSup).split(',')
else:
candidates = cfg.get(cfg.autoBanChampion).split(',')
candidates = [connector.manager.getChampionIdByName(c) for c in candidates]

# 给队友一点预选的时间
Expand Down

0 comments on commit 66db884

Please sign in to comment.