Update gauntlets.py
Fix SP bug
This commit is contained in:
parent
87a44d03f0
commit
7059ce4db7
12
gauntlets.py
12
gauntlets.py
@ -114,10 +114,7 @@ async def get_opponent(this_team, this_event, this_run):
|
|||||||
|
|
||||||
|
|
||||||
async def build_lineup(this_team, this_game, this_event):
|
async def build_lineup(this_team, this_game, this_event):
|
||||||
if this_event['id'] == 1:
|
return await ai_manager.build_lineup(this_team, this_game.id, f'gauntlet-{this_event["id"]}')
|
||||||
return await ai_manager.build_lineup(this_team, this_game.id, f'gauntlet-{this_event["id"]}')
|
|
||||||
else:
|
|
||||||
raise KeyError(f'Lineups not found for Gauntlet {this_event["id"]}')
|
|
||||||
|
|
||||||
|
|
||||||
async def get_starting_pitcher(this_team, this_game, this_event, this_run):
|
async def get_starting_pitcher(this_team, this_game, this_event, this_run):
|
||||||
@ -131,6 +128,13 @@ async def get_starting_pitcher(this_team, this_game, this_event, this_run):
|
|||||||
('inc_dex', False), ('sort_by', 'cost-desc'), ('limit', 5)
|
('inc_dex', False), ('sort_by', 'cost-desc'), ('limit', 5)
|
||||||
]
|
]
|
||||||
params.extend(set_params)
|
params.extend(set_params)
|
||||||
|
elif this_event['id'] == 2:
|
||||||
|
set_params = ai_manager.GAUNTLET2_PARAMS
|
||||||
|
params = [
|
||||||
|
('mlbclub', this_team['lname']), ('pos_include', 'SP'), ('pos_exclude', 'RP'),
|
||||||
|
('inc_dex', False), ('sort_by', 'cost-desc'), ('limit', 5)
|
||||||
|
]
|
||||||
|
params.extend(set_params)
|
||||||
else:
|
else:
|
||||||
raise KeyError(f'Pitcher not found for Gauntlet {this_event["id"]}')
|
raise KeyError(f'Pitcher not found for Gauntlet {this_event["id"]}')
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user