fix chk_win events in gamemodes.py

This commit is contained in:
jacob1 2017-01-27 21:42:52 -05:00
parent 69fa7d377f
commit 8f38900a44

View File

@ -198,7 +198,7 @@ class VillagergameMode(GameMode):
events.remove_listener("transition_day_begin", self.transition_day)
events.remove_listener("retribution_kill", self.on_retribution_kill, priority=4)
def chk_win(self, evt, var, lpl, lwolves, lrealwolves):
def chk_win(self, evt, cli, var, rolemap, lpl, lwolves, lrealwolves):
# village can only win via unanimous vote on the bot nick
# villagergame_lose should probably explain that mechanic
# Note: not implemented here since that needs to work in default too
@ -352,7 +352,7 @@ class EvilVillageMode(GameMode):
def teardown(self):
events.remove_listener("chk_win", self.chk_win)
def chk_win(self, evt, var, lpl, lwolves, lrealwolves):
def chk_win(self, evt, cli, var, rolemap, lpl, lwolves, lrealwolves):
lsafes = len(list_players(["oracle", "seer", "guardian angel", "shaman", "hunter", "villager"]))
lcultists = len(list_players(["cultist"]))
evt.stop_processing = True
@ -769,7 +769,7 @@ class GuardianMode(GameMode):
def teardown(self):
events.remove_listener("chk_win", self.chk_win)
def chk_win(self, evt, var, lpl, lwolves, lrealwolves):
def chk_win(self, evt, cli, var, rolemap, lpl, lwolves, lrealwolves):
lguardians = len(list_players(["guardian angel", "bodyguard"]))
if lpl < 1: