bugfixes for veil and twilight, changed veil text and emoji
This commit is contained in:
parent
ae256de645
commit
3def1378a9
6
games.py
6
games.py
|
@ -34,7 +34,7 @@ def all_weathers():
|
||||||
#"Midnight": weather("Midnight", "🕶"),
|
#"Midnight": weather("Midnight", "🕶"),
|
||||||
"Slight Tailwind": weather("Slight Tailwind", "🏌️♀️"),
|
"Slight Tailwind": weather("Slight Tailwind", "🏌️♀️"),
|
||||||
"Heavy Snow": weather("Heavy Snow", "❄"),
|
"Heavy Snow": weather("Heavy Snow", "❄"),
|
||||||
"Twilight" : weather("Twilight", "🌃"),
|
"Twilight" : weather("Twilight", "👻"),
|
||||||
"Thinned Veil" : weather("Thinned Veil", "🌌")
|
"Thinned Veil" : weather("Thinned Veil", "🌌")
|
||||||
}
|
}
|
||||||
return weathers_dic
|
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))
|
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)
|
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_line = - (math.log(defender.stlats["defense_stars"] + 1)/50) + 1
|
||||||
error_roll = random.random()
|
error_roll = random.random()
|
||||||
if error_roll > error_line:
|
if error_roll > error_line:
|
||||||
outcome["error"] == True
|
outcome["error"] = True
|
||||||
outcome["defender"] = defender
|
outcome["defender"] = defender
|
||||||
pb_system_stat = 0.1
|
pb_system_stat = 0.1
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,10 @@ def update_loop():
|
||||||
|
|
||||||
if "veil" in this_game.last_update[0].keys():
|
if "veil" in this_game.last_update[0].keys():
|
||||||
state["update_emoji"] = "🌌"
|
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():
|
elif "error" in this_game.last_update[0].keys():
|
||||||
state["update_emoji"] = "🌃"
|
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_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()
|
state["bases"] = this_game.named_bases()
|
||||||
|
|
||||||
|
@ -150,4 +150,4 @@ def update_loop():
|
||||||
state["update_pause"] -= 1
|
state["update_pause"] -= 1
|
||||||
|
|
||||||
socketio.emit("states_update", game_states)
|
socketio.emit("states_update", game_states)
|
||||||
time.sleep(1)
|
time.sleep(4)
|
|
@ -202,7 +202,7 @@ class StartRandomGameCommand(Command):
|
||||||
|
|
||||||
channel = msg.channel
|
channel = msg.channel
|
||||||
await msg.delete()
|
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()
|
teamslist = games.get_all_teams()
|
||||||
|
|
||||||
game = games.game(random.choice(teamslist).finalize(), random.choice(teamslist).finalize())
|
game = games.game(random.choice(teamslist).finalize(), random.choice(teamslist).finalize())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user