From 22827a73e26eba85ae373811da7151b8adbe7624 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Mar 2021 12:11:01 -0400 Subject: [PATCH] added messages to downpour if away team has met the condition --- weather.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/weather.py b/weather.py index 0656e0f..5a721a3 100644 --- a/weather.py +++ b/weather.py @@ -415,7 +415,13 @@ class Downpour(Weather): 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." + if game.teams["away"].score >= self.target: #if the away team has met the target + if game.teams["home"].score == game.teams["away"].score: #if the teams are tied + state["update_text"] = "The gods demand a victor. Play on." + else: + state["update_text"] = f"The gods are pleased, but demand more from {game.teams['home'].name}. Take the field." + else: + 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