fix succubi related win conditions

entranced wolves could still win with wolves, dead succubi didn't win when succubi team did, maybe others?
This commit is contained in:
jacob1 2015-10-30 14:06:50 -04:00
parent cbed18fd93
commit 7915c56b34

View File

@ -2563,28 +2563,29 @@ def stop_game(cli, winner = "", abort = False, additional_winners = None):
won = False won = False
iwon = False iwon = False
# determine if this player's team won # determine if this player's team won
if rol in var.WOLFTEAM_ROLES: # the player was wolf-aligned if rol in var.TRUE_NEUTRAL_ROLES:
if winner == "wolves": # most true neutral roles never have a team win, only individual wins. Exceptions to that are here
if rol == "monster" and winner == "monsters":
won = True won = True
elif rol in var.TRUE_NEUTRAL_ROLES: elif rol == "piper" and winner == "pipers":
# most true neutral roles never have a team win, only individual wins
if winner == "monsters" and rol == "monster":
won = True won = True
if winner == "pipers" and rol == "piper": elif rol == "succubus" and winner == "succubi":
won = True won = True
if rol == "turncoat" and splr in var.TURNCOATS and var.TURNCOATS[splr][0] != "none": elif rol == "turncoat" and splr in var.TURNCOATS and var.TURNCOATS[splr][0] != "none":
won = (winner == var.TURNCOATS[splr][0]) won = (winner == var.TURNCOATS[splr][0])
elif winner != "succubi" and splr in var.ENTRANCED:
# entranced players can't win with villager or wolf teams
won = False
elif rol in ("amnesiac", "vengeful ghost") and splr not in var.VENGEFUL_GHOSTS: elif rol in ("amnesiac", "vengeful ghost") and splr not in var.VENGEFUL_GHOSTS:
if var.DEFAULT_ROLE == "villager" and winner == "villagers": if var.DEFAULT_ROLE == "villager" and winner == "villagers":
won = True won = True
elif var.DEFAULT_ROLE == "cultist" and winner == "wolves": elif var.DEFAULT_ROLE == "cultist" and winner == "wolves":
won = True won = True
elif winner != "succubi" and splr in var.ENTRANCED: elif rol in var.WOLFTEAM_ROLES:
won = False if winner == "wolves":
won = True
elif winner == "villagers": elif winner == "villagers":
won = True won = True
elif winner == "succubi" and rol == "succubus":
won = True
survived = var.list_players() survived = var.list_players()
if plr.startswith("(dced)"): if plr.startswith("(dced)"):