From d05fee60fe4041c602c9f7400af579790811c892 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Mon, 22 Feb 2021 19:23:06 -0500 Subject: [PATCH 1/2] removed feedback and sun 2 --- weather.py | 66 +----------------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/weather.py b/weather.py index 8996a19..781390b 100644 --- a/weather.py +++ b/weather.py @@ -225,25 +225,6 @@ class Drizzle(Weather): state["update_emoji"] = self.emoji state["update_text"] += f' Due to inclement weather, {placed_player.name} is placed on second base.' - -class Sun2(Weather): - def __init__(self, game): - self.name = "Sun 2" - - - def activate(self, game): - for teamtype in game.teams: - team = game.teams[teamtype] - if team.score >= 10: - team.score -= 10 - # no win counting yet :( - result.clear() - result.update({ - "text": "The {} collect 10! Sun 2 smiles.".format(team.name), - "text_only": True, - "weather_message": True - }) - class Breezy(Weather): def __init__(self, game): self.name = "Breezy" @@ -280,49 +261,6 @@ class Breezy(Weather): "weather_message": True }) - -class Feedback(Weather): - def __init__(self, game): - self.name = "Feedback" - self.emoji = "🎤" - self.activation_chance = 0.02 - self.swap_batter_vs_pitcher_chance = 0.8 - - def activate(self, game, result): - if random.random() < self.activation_chance: - # feedback time - player1 = None - player2 = None - team1 = game.teams["home"] - team2 = game.teams["away"] - if random.random() < self.swap_batter_vs_pitcher_chance: - # swapping batters - # theoretically this could swap players already on base :( - team1 = game.teams["home"] - team2 = game.teams["away"] - homePlayerIndex = random.randint(0,len(team1.lineup)-1) - awayPlayerIndex = random.randint(0,len(team2.lineup)-1) - - player1 = team1.lineup[homePlayerIndex] - player2 = team2.lineup[awayPlayerIndex] - - team1.lineup[homePlayerIndex] = player2 - team2.lineup[awayPlayerIndex] = player1 - else: - # swapping pitchers - player1 = team1.pitcher - player2 = team2.pitcher - - team1.pitcher = player2 - team2.pitcher = player1 - - result.clear() - result.update({ - "text": "{} and {} switched teams in the feedback!".format(player1.name,player2.name), - "text_only": True, - "weather_message": True, - }) - def all_weathers(): weathers_dic = { "Supernova" : Supernova, @@ -333,9 +271,7 @@ def all_weathers(): "Thinned Veil" : ThinnedVeil, "Heat Wave" : HeatWave, "Drizzle" : Drizzle, -# "Sun 2": Sun2, - "Feedback": Feedback, - "Breezy": Breezy, + "Breezy": Breezy } return weathers_dic From 6ccf9a24c75a6c9a9c43257ad5b5a9d6c788822d Mon Sep 17 00:00:00 2001 From: Sakimori Date: Mon, 22 Feb 2021 19:25:12 -0500 Subject: [PATCH 2/2] tidyed up weather --- weather.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weather.py b/weather.py index 781390b..b4af354 100644 --- a/weather.py +++ b/weather.py @@ -250,13 +250,13 @@ class Breezy(Weather): last_letter = player.name[-1] player.name = last_letter + player.name[1:-1] + last_letter - book_adjectives = ["action-packed", "historical", "friendly", "rude", "mystery", "thriller", "horror", "sci-fi", "fantasy", "spooky","romantic"] - book_types = ["novel","novella","poem","anthology","fan fiction","tablet","carving", "autobiography"] + book_adjectives = ["action-packed", "historical", "mystery", "thriller", "horror", "sci-fi", "fantasy", "spooky","romantic"] + book_types = ["novel", "novella", "poem", "anthology", "fan fiction", "autobiography"] book = "{} {}".format(random.choice(book_adjectives),random.choice(book_types)) result.clear() result.update({ - "text": "{} stopped to read a {} and became Literate! {} is now {}!".format(old_player_name, book, old_player_name, player.name), + "text": "{} stopped to enjoy a {} in the nice breeze! {} is now {}!".format(old_player_name, book, old_player_name, player.name), "text_only": True, "weather_message": True })