|
|
@ -402,15 +402,17 @@ class Game:
|
|
|
|
await player.choose(ctx, data)
|
|
|
|
await player.choose(ctx, data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def _visit(self, target, source):
|
|
|
|
|
|
|
|
await target.role.visit(source)
|
|
|
|
|
|
|
|
await self._at_visit(target, source)
|
|
|
|
|
|
|
|
|
|
|
|
async def visit(self, target_id, source):
|
|
|
|
async def visit(self, target_id, source):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Night visit target_id
|
|
|
|
Night visit target_id
|
|
|
|
Returns a target for role information (i.e. Seer)
|
|
|
|
Returns a target for role information (i.e. Seer)
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
target = await self.get_night_target(target_id, source)
|
|
|
|
target = await self.get_night_target(target_id, source)
|
|
|
|
await target.role.visit(source)
|
|
|
|
await self._visit(target, source)
|
|
|
|
await self._at_visit(target, source)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return target
|
|
|
|
return target
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -496,7 +498,7 @@ class Game:
|
|
|
|
await self.dead_perms(player.member)
|
|
|
|
await self.dead_perms(player.member)
|
|
|
|
# Add a punishment system for quitting games later
|
|
|
|
# Add a punishment system for quitting games later
|
|
|
|
|
|
|
|
|
|
|
|
async def kill(self, target_id, source=None, method: str=None):
|
|
|
|
async def kill(self, target_id, source=None, method: str=None, novisit=False):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Attempt to kill a target
|
|
|
|
Attempt to kill a target
|
|
|
|
Source allows admin override
|
|
|
|
Source allows admin override
|
|
|
@ -515,6 +517,10 @@ class Game:
|
|
|
|
# Do nothing if blocked, blocker handles text
|
|
|
|
# Do nothing if blocked, blocker handles text
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not novisit:
|
|
|
|
|
|
|
|
# Arsonist wouldn't visit before killing
|
|
|
|
|
|
|
|
await self._visit(target, source) # Visit before killing
|
|
|
|
|
|
|
|
|
|
|
|
if not target.protected:
|
|
|
|
if not target.protected:
|
|
|
|
target.alive = False
|
|
|
|
target.alive = False
|
|
|
|
await target.kill(source)
|
|
|
|
await target.kill(source)
|
|
|
|