diff --git a/command_logic/logic_gameplay.py b/command_logic/logic_gameplay.py index fc2f911..ee3b593 100644 --- a/command_logic/logic_gameplay.py +++ b/command_logic/logic_gameplay.py @@ -1844,6 +1844,17 @@ async def check_uncapped_advance(session: Session, interaction: discord.Interact this_play.on_first_final = None else: this_play.batter_final = None + else: + logger.info(f'Runner is safe') + if this_play.on_first == trail_runner: + this_play.on_first_final += 1 + if this_play.on_first_final == 4: + logger.info(f'Add an rbi') + this_play.rbi += 1 + elif this_play.batter == trail_runner: + this_play.batter_final += 1 + else: + log_exception(LineupsMissingException, f'Could not find trail runner to advance') # Advance lead runner extra base logger.info(f'advancing lead runner') @@ -2016,6 +2027,17 @@ async def check_uncapped_advance(session: Session, interaction: discord.Interact this_play.on_first_final = None else: this_play.batter_final = None + else: + logger.info(f'Runner is safe') + if this_play.on_first == trail_runner: + this_play.on_first_final += 1 + if this_play.on_first_final == 4: + this_play.rbi += 1 + elif this_play.batter == trail_runner: + this_play.batter_final += 1 + else: + log_exception(LineupsMissingException, f'Could not find trail runner to advance') + # Advance lead runner extra base logger.info(f'Advance lead runner extra base')