From cb0a7f1041a76202a1622d61c7af77a592b667d7 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 24 Sep 2020 17:04:49 -0400 Subject: [PATCH] Add priority and parameters --- werewolf/roles/seer.py | 4 ++-- werewolf/roles/shifter.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/werewolf/roles/seer.py b/werewolf/roles/seer.py index f01c5c2..56624c9 100644 --- a/werewolf/roles/seer.py +++ b/werewolf/roles/seer.py @@ -65,7 +65,7 @@ class Seer(Role): return "Villager" @wolflistener("at_night_start", priority=2) - async def _at_night_start(self, data=None): + async def _at_night_start(self): if not self.player.alive: return self.see_target = None @@ -73,7 +73,7 @@ class Seer(Role): await self.player.send_dm("**Pick a target to see tonight**") @wolflistener("at_night_end", priority=4) - async def _at_night_end(self, data=None): + async def _at_night_end(self): if self.see_target is None: if self.player.alive: await self.player.send_dm("You will not use your powers tonight...") diff --git a/werewolf/roles/shifter.py b/werewolf/roles/shifter.py index 8f93d76..a7ea058 100644 --- a/werewolf/roles/shifter.py +++ b/werewolf/roles/shifter.py @@ -99,14 +99,14 @@ class Shifter(Role): """ return "Shifter" - @wolflistener("at_night_start") - async def _at_night_start(self, data=None): + @wolflistener("at_night_start", priority=2) + async def _at_night_start(self): self.shift_target = None await self.game.generate_targets(self.player.member) await self.player.send_dm("**Pick a target to shift into**") - @wolflistener("at_night_end") - async def _at_night_end(self, data=None): + @wolflistener("at_night_end", priority=6) + async def _at_night_end(self): if self.shift_target is None: if self.player.alive: await self.player.send_dm("You will not use your powers tonight...")