Fix crash if a dead person was given narc totem
This commit is contained in:
parent
3203b10015
commit
2f5055714e
@ -1142,17 +1142,23 @@ def chk_win(cli, end_game = True):
|
|||||||
lrealwolves = len(var.list_players(var.WOLF_ROLES)) - len(var.ROLES["wolf cub"])
|
lrealwolves = len(var.list_players(var.WOLF_ROLES)) - len(var.ROLES["wolf cub"])
|
||||||
if var.PHASE == "day":
|
if var.PHASE == "day":
|
||||||
for p in var.WOUNDED:
|
for p in var.WOUNDED:
|
||||||
role = var.get_role(p)
|
try:
|
||||||
if role in var.WOLFCHAT_ROLES:
|
role = var.get_role(p)
|
||||||
lwolves -= 1
|
if role in var.WOLFCHAT_ROLES:
|
||||||
else:
|
lwolves -= 1
|
||||||
lpl -= 1
|
else:
|
||||||
|
lpl -= 1
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
for p in var.ASLEEP:
|
for p in var.ASLEEP:
|
||||||
role = var.get_role(p)
|
try:
|
||||||
if role in var.WOLFCHAT_ROLES:
|
role = var.get_role(p)
|
||||||
lwolves -= 1
|
if role in var.WOLFCHAT_ROLES:
|
||||||
else:
|
lwolves -= 1
|
||||||
lpl -= 1
|
else:
|
||||||
|
lpl -= 1
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
if lwolves == lpl / 2:
|
if lwolves == lpl / 2:
|
||||||
if len(var.ROLES["monster"]) > 0:
|
if len(var.ROLES["monster"]) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user