You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
519 B
24 lines
519 B
from werewolf.role import Role
|
|
|
|
|
|
def night_immune(role: Role):
|
|
role.player.alive = True
|
|
|
|
|
|
async def pick_target(role: Role, ctx, data):
|
|
if not role.player.alive: # FixMe: Game handles this?
|
|
await role.player.send_dm("You're already dead!")
|
|
return None
|
|
|
|
target_id = int(data)
|
|
try:
|
|
target = role.game.players[target_id]
|
|
except IndexError:
|
|
target = None
|
|
|
|
if target is None:
|
|
await ctx.send("Not a valid ID")
|
|
return None
|
|
|
|
return target_id, target
|