forgotten commits
This commit is contained in:
parent
266b2fe81f
commit
ec446785ee
|
@ -158,6 +158,7 @@ async def time(ctx):
|
||||||
await send_friendly(ctx, game_instances[ctx.channel].remaining_time_string())
|
await send_friendly(ctx, game_instances[ctx.channel].remaining_time_string())
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: developer COG
|
||||||
# smaller commands
|
# smaller commands
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
|
@ -193,8 +194,18 @@ async def logout(ctx):
|
||||||
@bot.command()
|
@bot.command()
|
||||||
@developer
|
@developer
|
||||||
async def debug(ctx, *args):
|
async def debug(ctx, *args):
|
||||||
print("DEBUG")
|
embed = discord.Embed(title=f"Village won!", color=0x00ffff)
|
||||||
print(ctx.args)
|
won_emoji = ":trophy:"
|
||||||
print(ctx.kwargs)
|
dead_emoji = ":test:"
|
||||||
|
tab = "\t"
|
||||||
|
space = "<:space:705863033871663185>"
|
||||||
|
embed.add_field(name=str("Name"), value=f"{won_emoji}{space}{dead_emoji}{space}{space}{3}:ballot_box:{tab}role: werewolf{tab}(was: drunk){tab}:point_right: someone", inline=False)
|
||||||
|
await ctx.send(embed=embed)
|
||||||
|
await ctx.send(":test::skull:")
|
||||||
|
|
||||||
|
for emoji in ctx.guild.emojis:
|
||||||
|
await ctx.send(emoji)
|
||||||
|
print(emoji.id)
|
||||||
|
|
||||||
|
|
||||||
bot.run(TOKEN)
|
bot.run(TOKEN)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Game:
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
self.player_list = []
|
self.player_list = []
|
||||||
self.role_list = []
|
self.role_list = []
|
||||||
self.discussion_time = 300 # seconds
|
self.discussion_time = 301 # seconds
|
||||||
|
|
||||||
async def send(self, message):
|
async def send(self, message):
|
||||||
await self.channel.send(embed=discord.Embed(description=message, color=0x00ffff))
|
await self.channel.send(embed=discord.Embed(description=message, color=0x00ffff))
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Player:
|
||||||
while True:
|
while True:
|
||||||
def check(choice):
|
def check(choice):
|
||||||
return choice.channel == self.dm and choice.author == self.member
|
return choice.channel == self.dm and choice.author == self.member
|
||||||
choice = (await self.game.bot.wait_for('message', timeout=30.0, check=check)).content.split()
|
choice = (await self.game.bot.wait_for('message', check=check)).content.split()
|
||||||
|
|
||||||
if not len(choice) == n_ans:
|
if not len(choice) == n_ans:
|
||||||
await self.send_wrong(f"Please give {n_ans} numbers not {len(choice)}")
|
await self.send_wrong(f"Please give {n_ans} numbers not {len(choice)}")
|
||||||
|
|
|
@ -45,28 +45,33 @@ class Doppelganger(Role):
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def send_copy_info(self):
|
async def send_copy_info(self):
|
||||||
self.copy_role = type(self.player.other()[self.choice].day_role)
|
self.copy_role = type(self.player.other()[self.choice].day_role)
|
||||||
await self.send_info(f"You copied: {self.copy_role}")
|
await self.player.send_info(f"You copied: {self.copy_role.name()}")
|
||||||
|
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def simulate(self):
|
async def simulate(self):
|
||||||
if self.copy_role in [Werewolf, Mason]:
|
if self.copy_role in [Werewolf, Mason]:
|
||||||
self.copy_role.add_yourself(self)
|
self.copy_role.add_yourself(self)
|
||||||
if self.copy_role == Werewolf:
|
elif self.copy_role in [Seer, Robber, Troublemaker, Drunk]:
|
||||||
await self.copy_role.phase(self)
|
|
||||||
if self.copy_role in [Mason, Minion]:
|
|
||||||
await self.copy_role.send_info(self)
|
|
||||||
|
|
||||||
if self.copy_role in [Seer, Robber, Troublemaker, Drunk]:
|
|
||||||
await self.copy_role.query(self)
|
await self.copy_role.query(self)
|
||||||
if self.copy_role in [Robber, Troublemaker, Drunk]:
|
if self.copy_role in [Robber, Troublemaker, Drunk]:
|
||||||
self.copy_role.simulate(self)
|
await self.copy_role.simulate(self)
|
||||||
if self.copy_role in [Seer, Robber]:
|
if self.copy_role in [Seer, Robber]:
|
||||||
await self.copy_role.send_info(self)
|
await self.copy_role.send_info(self)
|
||||||
|
|
||||||
|
@Role.no_player
|
||||||
|
async def phase(self):
|
||||||
|
if self.copy_role == Werewolf:
|
||||||
|
await self.copy_role.phase(self)
|
||||||
|
|
||||||
|
@Role.no_player
|
||||||
|
async def send_info(self):
|
||||||
|
if self.copy_role in [Mason, Minion]:
|
||||||
|
await self.copy_role.send_info(self)
|
||||||
|
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def insomniac(self):
|
async def insomniac(self):
|
||||||
if self.copy_role == Insomniac:
|
if self.copy_role == Insomniac:
|
||||||
self.copy_role.send_info(self)
|
await self.copy_role.send_info(self)
|
||||||
|
|
||||||
def is_role(self, cls):
|
def is_role(self, cls):
|
||||||
return self.copy_role == cls
|
return self.copy_role == cls
|
||||||
|
@ -113,10 +118,10 @@ class Seer(Role):
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def send_info(self):
|
async def send_info(self):
|
||||||
if self.choice < len(self.player.other()):
|
if self.choice < len(self.player.other()):
|
||||||
await self.player.send_info(self.player.other()[self.choice].night_role)
|
await self.player.send_info(f"You saw: {self.player.other()[self.choice].night_role.name()}")
|
||||||
else:
|
else:
|
||||||
a, b = [(0, 1), (1, 2), (0, 2)][self.choice - len(self.player.other())]
|
a, b = [(0, 1), (1, 2), (0, 2)][self.choice - len(self.player.other())]
|
||||||
await self.player.send_info(f"{self.game.middle_card[a]} {self.game.middle_card[b]}")
|
await self.player.send_info(f"You saw: {self.game.middle_card[a]} {self.game.middle_card[b]}")
|
||||||
|
|
||||||
|
|
||||||
class Robber(Role):
|
class Robber(Role):
|
||||||
|
@ -130,7 +135,7 @@ class Robber(Role):
|
||||||
|
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def send_info(self):
|
async def send_info(self):
|
||||||
await self.player.send_info(f"You robbed: {self.player.day_role}")
|
await self.player.send_info(f"You robbed: {self.player.day_role.name()}")
|
||||||
|
|
||||||
|
|
||||||
class Troublemaker(Role):
|
class Troublemaker(Role):
|
||||||
|
@ -156,7 +161,7 @@ class Drunk(Role):
|
||||||
class Insomniac(Role):
|
class Insomniac(Role):
|
||||||
@Role.no_player
|
@Role.no_player
|
||||||
async def send_info(self):
|
async def send_info(self):
|
||||||
await self.player.send_info(f"You are: {self.player.day_role}")
|
await self.player.send_info(f"You are: {self.player.day_role.name()}")
|
||||||
|
|
||||||
|
|
||||||
class Villager(Role):
|
class Villager(Role):
|
||||||
|
|
Loading…
Reference in New Issue