diff --git a/cogs/gameplay.py b/cogs/gameplay.py index cb460b0..02d5e3e 100644 --- a/cogs/gameplay.py +++ b/cogs/gameplay.py @@ -209,15 +209,16 @@ class Gameplay(commands.Cog): } ) - if this_game.game_type == 'minor-league' and wins % 6 == 0: - post_tc_pack() - win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' - elif this_game.game_type == 'major-league' and wins % 4 == 0: - post_tc_pack() - win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' - elif this_game.game_type == 'hall-of-fame' and wins % 2 == 0: - post_tc_pack() - win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' + if r_query['count'] > 0: + if this_game.game_type == 'minor-league' and wins % 6 == 0: + post_tc_pack() + win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' + elif this_game.game_type == 'major-league' and wins % 4 == 0: + post_tc_pack() + win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' + elif this_game.game_type == 'hall-of-fame' and wins % 2 == 0: + post_tc_pack() + win_string += f'1x {losing_team["abbrev"]} Team Choice pack\n' win_string += f'{win_reward["money"]}₼\n' loss_string = f'{loss_reward["money"]}₼\n' @@ -2161,15 +2162,16 @@ class Gameplay(commands.Cog): await ctx.send(f'I could not find {new_player.title()}.') return - legality = db_post(f'cards/legal-check/ranked?card_id={new_player}') - if legality['count'] > 0: - il_string = "\n- ".join(legality['bad_cards']) - await ctx.send( - content=f'It looks like this is a Ranked Legal game and I see the following cards as illegal. ' - f'Please adjust your lineup and re-submit!\n\n' - f'- {il_string}' - ) - return + if this_game.game_type in ['major-league', 'hall-of-fame']: + legality = db_post(f'cards/legal-check/ranked?card_id={new_player}') + if legality['count'] > 0: + il_string = "\n- ".join(legality['bad_cards']) + await ctx.send( + content=f'It looks like this is a Ranked Legal game and I see the following cards as illegal. ' + f'Please adjust your lineup and re-submit!\n\n' + f'- {il_string}' + ) + return this_play = get_current_play(this_game.id) batting_order = int(order_number) if order_number != 'this-spot' else this_play.batting_order