bugfixes for veil and twilight, changed veil text and emoji

This commit is contained in:
Sakimori 2021-01-13 23:21:28 -05:00
parent ae256de645
commit 3def1378a9
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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)
time.sleep(4)

View File

@ -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())