Update gameplay.py

SI1 RP rules the runner as out rather than advancing to 2nd
This commit is contained in:
Cal Corum 2024-05-17 15:23:11 -05:00
parent 913689034c
commit 2e3990a931

View File

@ -4103,8 +4103,7 @@ class Gameplay(commands.Cog):
batter_to_base = 4 batter_to_base = 4
else: else:
batter_to_base = 3 batter_to_base = 3
# Both singles are handled the same elif hit_allowed == 'single**':
else:
single_wellhit(this_play, comp_play=False) single_wellhit(this_play, comp_play=False)
if error_allowed == 'Rare Play': if error_allowed == 'Rare Play':
patch_play(this_play.id, outs=1) patch_play(this_play.id, outs=1)
@ -4114,6 +4113,17 @@ class Gameplay(commands.Cog):
else: else:
advance_runners(this_play.id, 3) advance_runners(this_play.id, 3)
batter_to_base = 3 batter_to_base = 3
else:
single_onestar(this_play, False)
if error_allowed == '2 bases':
advance_runners(this_play.id, 3, True)
batter_to_base = 3
elif error_allowed == '1 base' or (error_allowed == 'Rare Play' and not runner_on_first(this_play)):
single_wellhit(this_play, False)
batter_to_base = 2
patch_play(this_play.id, error=True)
else:
batter_to_base = 1
complete_play(this_play.id, batter_to_base=batter_to_base) complete_play(this_play.id, batter_to_base=batter_to_base)