Move the try-except block in evilvillage's chk_win
This commit is contained in:
parent
384ee8495c
commit
d427bd8ca4
@ -207,7 +207,6 @@ class EvilVillageMode(GameMode):
|
||||
lcultists = len(var.list_players(["cultist"]))
|
||||
evt.stop_processing = True
|
||||
|
||||
try:
|
||||
if lrealwolves == 0 and lsafes == 0:
|
||||
evt.data["winner"] = "none"
|
||||
evt.data["message"] = ("Game over! All the villagers are dead, but the cult needed to sacrifice " +
|
||||
@ -234,9 +233,11 @@ class EvilVillageMode(GameMode):
|
||||
"manage to regain control of the village and dispose of the remaining " +
|
||||
"cultists.").format("more" if lsafes > lpl / 2 else "the same number of",
|
||||
"than" if lsafes > lpl / 2 else "as")
|
||||
elif evt.data["winner"][0] != "@":
|
||||
else:
|
||||
try:
|
||||
if evt.data["winner"][0] != "@":
|
||||
evt.data["winner"] = None
|
||||
except TypeError: # means that evt.data["winner"] isn't a string or something else subscriptable
|
||||
except TypeError:
|
||||
evt.data["winner"] = None
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user