diff --git a/games.py b/games.py index 83104a2..5a314c3 100644 --- a/games.py +++ b/games.py @@ -34,7 +34,7 @@ def all_weathers(): #"Midnight": weather("Midnight", "🕶"), "Slight Tailwind": weather("Slight Tailwind", "🏌️‍♀️"), "Heavy Snow": weather("Heavy Snow", "❄"), - "Twilight" : weather("Twilight", "🌃"), + "Twilight" : weather("Twilight", "👻"), "Thinned Veil" : weather("Thinned Veil", "🌌") } return weathers_dic @@ -270,11 +270,11 @@ class game(object): pb_system_stat = (random.gauss(1*math.erf((bat_stat - pitch_stat)*1.5)-1.8,2.2)) hitnum = random.gauss(2*math.erf(bat_stat/4)-1,3) - if weather.name == "Twilight": + if self.weather.name == "Twilight": error_line = - (math.log(defender.stlats["defense_stars"] + 1)/50) + 1 error_roll = random.random() if error_roll > error_line: - outcome["error"] == True + outcome["error"] = True outcome["defender"] = defender pb_system_stat = 0.1 diff --git a/main_controller.py b/main_controller.py index 215572e..c66af65 100644 --- a/main_controller.py +++ b/main_controller.py @@ -125,10 +125,10 @@ def update_loop(): if "veil" in this_game.last_update[0].keys(): state["update_emoji"] = "🌌" - state["update_text"] += " {this_game.last_update[0]['batter']}'s will manifests on {games.base_string(this_game.last_update[1])} base!" + state["update_text"] += f" {this_game.last_update[0]['batter']}'s will manifests on {games.base_string(this_game.last_update[1])} base." elif "error" in this_game.last_update[0].keys(): - state["update_emoji"] = "🌃" - state["update_text"] = f"{this_game.last_update[0]['defender']} lost sight of the ball! {this_game.last_update[0]['batter']} reaches {games.base_string(this_game.last_update[1])} on the error." + state["update_emoji"] = "👻" + state["update_text"] = f"{this_game.last_update[0]['batter']}'s hit goes ethereal, and {this_game.last_update[0]['defender']} can't catch it! {this_game.last_update[0]['batter']} reaches base safely." state["bases"] = this_game.named_bases() @@ -150,4 +150,4 @@ def update_loop(): state["update_pause"] -= 1 socketio.emit("states_update", game_states) - time.sleep(1) \ No newline at end of file + time.sleep(4) \ No newline at end of file diff --git a/the_prestige.py b/the_prestige.py index 9c98076..aad0568 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -202,7 +202,7 @@ class StartRandomGameCommand(Command): channel = msg.channel await msg.delete() - await channel.send("Rolling the bones...") + await channel.send("Rolling the bones... This might take a while.") teamslist = games.get_all_teams() game = games.game(random.choice(teamslist).finalize(), random.choice(teamslist).finalize())