diff --git a/command_logic/logic_gameplay.py b/command_logic/logic_gameplay.py index 15d6975..5b4f95c 100644 --- a/command_logic/logic_gameplay.py +++ b/command_logic/logic_gameplay.py @@ -657,7 +657,7 @@ def complete_play(session:Session, this_play: Play): if not new_pitcher.is_fatigued: logger.info(f'checking for runners in POW') runners_in_pow = session.exec(select(func.count(Play.id)).where( - Play.game == this_play.game, Play.pitcher == new_pitcher, Play.in_pow == True, Play.batter_final != None + Play.game == this_play.game, Play.pitcher == new_pitcher, Play.in_pow == True, or_(Play.hit == 1, Play.bb == 1), Play.ibb == 0 )).one() # change to hits and walks logger.info(f'runners in pow: {runners_in_pow}') if runners_in_pow >= 3: diff --git a/utilities/dropdown.py b/utilities/dropdown.py index 5f75871..15f517e 100644 --- a/utilities/dropdown.py +++ b/utilities/dropdown.py @@ -212,6 +212,8 @@ class SelectReliefPitcher(discord.ui.Select): return await get_position(self.session, human_rp_card, 'P') + if human_rp_card.pitcherscouting.pitchingcard.relief_rating < 2: + this_play.in_pow = True logger.info(f'Adding the RP lineup') human_rp_lineup = Lineup(