Implimented Crows...maybe
This commit is contained in:
parent
3ca24b313a
commit
383cc7ccda
12
games.py
12
games.py
|
@ -68,6 +68,7 @@ class appearance_outcomes(Enum):
|
||||||
triple = "hits a triple!"
|
triple = "hits a triple!"
|
||||||
homerun = "hits a home run!"
|
homerun = "hits a home run!"
|
||||||
grandslam = "hits a grand slam!"
|
grandslam = "hits a grand slam!"
|
||||||
|
crows = "is chased away by crows."
|
||||||
|
|
||||||
|
|
||||||
class player(object):
|
class player(object):
|
||||||
|
@ -205,8 +206,13 @@ class game(object):
|
||||||
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 == "Crowstorm":
|
||||||
if pb_system_stat <= 0:
|
randomchance = random.gauss(0,1)
|
||||||
|
if randomchance > -1.5 and randomchance < 1.5:
|
||||||
|
outcome["ishit"] = False
|
||||||
|
outcome["text"] = appearance_outcomes.crows
|
||||||
|
crow = True
|
||||||
|
elif pb_system_stat <= 0 and crow = False:
|
||||||
outcome["ishit"] = False
|
outcome["ishit"] = False
|
||||||
fc_flag = False
|
fc_flag = False
|
||||||
if hitnum < -1.5:
|
if hitnum < -1.5:
|
||||||
|
@ -248,7 +254,7 @@ class game(object):
|
||||||
if 2.5 <= hitnum and self.outs < 2: #well hit flyouts can lead to sacrifice flies/advanced runners
|
if 2.5 <= hitnum and self.outs < 2: #well hit flyouts can lead to sacrifice flies/advanced runners
|
||||||
if self.bases[2] is not None or self.bases[3] is not None:
|
if self.bases[2] is not None or self.bases[3] is not None:
|
||||||
outcome["advance"] = True
|
outcome["advance"] = True
|
||||||
else:
|
elif crows == False:
|
||||||
outcome["ishit"] = True
|
outcome["ishit"] = True
|
||||||
if hitnum < 1:
|
if hitnum < 1:
|
||||||
outcome["text"] = appearance_outcomes.single
|
outcome["text"] = appearance_outcomes.single
|
||||||
|
|
Loading…
Reference in New Issue
Block a user