Add league check to ai.get_sp

This commit is contained in:
Cal Corum 2023-02-27 11:00:33 -06:00
parent 008a2e5bab
commit 419a0275d9

View File

@ -1067,21 +1067,6 @@ class Gameplay(commands.Cog):
away_role = await team_role(interaction, away_team)
home_role = await team_role(interaction, home_team)
# await interaction.edit_original_response(
# content=f'I\'m getting bullpen data from '
# f'{away_team["gmname"] if away_team["is_ai"] else home_team["gmname"]}...'
# )
# this_pen = get_or_create_bullpen(ai_team, self.bot)
# if None in [this_pen.closer_id, this_pen.setup_id, this_pen.middle_one_id, this_pen.middle_two_id,
# this_pen.middle_three_id]:
# await interaction.edit_original_response(
# content=f'Looks like the {ai_team["sname"]} bullpen didn\'t come through clearly. I\'ll sort '
# f'this out with {ai_team["gmname"]} and {get_cal_user(interaction).mention}. I\'ll end '
# f'this game - why don\'t you play against somebody else for now?'
# )
# patch_game(this_game.id, active=False)
# return
# Get AI Lineup
try:
await interaction.edit_original_response(
@ -1113,7 +1098,12 @@ class Gameplay(commands.Cog):
patch_game(this_game.id, home_roster_num=69, ai_team='home')
# starter = starting_pitcher(ai_team, self.bot, True if home_team['is_ai'] else False)
starter = ai_manager.get_starting_pitcher(ai_team, this_game.id, True if home_team['is_ai'] else False)
starter = ai_manager.get_starting_pitcher(
ai_team,
this_game.id,
True if home_team['is_ai'] else False,
league_name
)
all_lineups.append(starter)
this_card = db_get(f'cards', object_id=starter['card_id'])