Add weather output
This commit is contained in:
parent
e647a910d8
commit
ad7e3ac176
1
games.py
1
games.py
|
@ -442,6 +442,7 @@ class game(object):
|
||||||
return f"""Last update: {updatestring}
|
return f"""Last update: {updatestring}
|
||||||
|
|
||||||
Score: {self.teams['away'].score} - {self.teams['home'].score}.
|
Score: {self.teams['away'].score} - {self.teams['home'].score}.
|
||||||
|
Weather: {'None' if not self.weather else self.weather.name}.
|
||||||
Current inning: {inningtext} of {self.inning}. {self.outs} outs.
|
Current inning: {inningtext} of {self.inning}. {self.outs} outs.
|
||||||
Pitcher: {self.get_pitcher().name}
|
Pitcher: {self.get_pitcher().name}
|
||||||
Batter: {self.get_batter().name}
|
Batter: {self.get_batter().name}
|
||||||
|
|
|
@ -52,6 +52,7 @@ class NameSwappyWeather(Weather):
|
||||||
|
|
||||||
class Feedback(Weather):
|
class Feedback(Weather):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.name = "Feedback"
|
||||||
self.activation_chance = 0.01
|
self.activation_chance = 0.01
|
||||||
self.swap_batter_vs_pitcher_chance = 0.8
|
self.swap_batter_vs_pitcher_chance = 0.8
|
||||||
def activate(self, game):
|
def activate(self, game):
|
||||||
|
|
Loading…
Reference in a new issue