diff --git a/main_controller.py b/main_controller.py index f7c335a..feb2c9f 100644 --- a/main_controller.py +++ b/main_controller.py @@ -172,6 +172,8 @@ def update_loop(): state["update_text"] = f"{winning_team} wins!" state["pitcher"] = "-" state["batter"] = "-" + + this_game.weather.modify_game_end_message(this_game, state) else: if this_game.top_of_inning: state["update_text"] = f"Top of {this_game.inning}. {this_game.teams['away'].name} batting!" diff --git a/weather.py b/weather.py index 60c8257..5a8aa67 100644 --- a/weather.py +++ b/weather.py @@ -39,6 +39,9 @@ class Weather: def modify_gamestate(self, game, state): pass + def modify_game_end_message(self, game, state): + pass + class Supernova(Weather): def __init__(self, game): @@ -388,6 +391,14 @@ class Downpour(Weather): def modify_gamestate(self, game, state): state["max_innings"] = "∞" + + def modify_top_of_inning_message(self, game, state): + state["update_emoji"] = self.emoji + state["update_text"] = "The gods are not yet pleased. Play continues through the storm." + + def modify_game_end_message(self, game, state): + state["update_emoji"] = self.emoji + state["update_text"] = f"{self.target} runs are reached, pleasing the gods. The storm clears." def all_weathers():