Add priority and parameters

pull/147/head
bobloy 4 years ago
parent 39801aada9
commit cb0a7f1041

@ -65,7 +65,7 @@ class Seer(Role):
return "Villager" return "Villager"
@wolflistener("at_night_start", priority=2) @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: if not self.player.alive:
return return
self.see_target = None self.see_target = None
@ -73,7 +73,7 @@ class Seer(Role):
await self.player.send_dm("**Pick a target to see tonight**") await self.player.send_dm("**Pick a target to see tonight**")
@wolflistener("at_night_end", priority=4) @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.see_target is None:
if self.player.alive: if self.player.alive:
await self.player.send_dm("You will not use your powers tonight...") await self.player.send_dm("You will not use your powers tonight...")

@ -99,14 +99,14 @@ class Shifter(Role):
""" """
return "Shifter" return "Shifter"
@wolflistener("at_night_start") @wolflistener("at_night_start", priority=2)
async def _at_night_start(self, data=None): async def _at_night_start(self):
self.shift_target = None self.shift_target = None
await self.game.generate_targets(self.player.member) await self.game.generate_targets(self.player.member)
await self.player.send_dm("**Pick a target to shift into**") await self.player.send_dm("**Pick a target to shift into**")
@wolflistener("at_night_end") @wolflistener("at_night_end", priority=6)
async def _at_night_end(self, data=None): async def _at_night_end(self):
if self.shift_target is None: if self.shift_target is None:
if self.player.alive: if self.player.alive:
await self.player.send_dm("You will not use your powers tonight...") await self.player.send_dm("You will not use your powers tonight...")

Loading…
Cancel
Save