message=awaitself.village_channel.send("Everyone will now vote whether to lynch {}\n👍 to save, 👎 to lynch\n*Majority rules, no-lynch on ties, vote for both or neither to abstain, 15 seconds to vote*".format(target.mention))
message=awaitself.village_channel.send("Everyone will now vote whether to lynch {}\n👍 to save, 👎 to lynch\n*Majority rules, no-lynch on ties, vote both or neither to abstain, 15 seconds to vote*".format(target.mention))
awaitself.village_channel.add_reaction("👍")
awaitself.village_channel.add_reaction("👍")
awaitself.village_channel.add_reaction("👎")
awaitself.village_channel.add_reaction("👎")
@ -218,11 +228,17 @@ class Game:
iflen(down_votes)>len(up_votes):
iflen(down_votes)>len(up_votes):
awaitself.village_channel.send("**Voted to lynch {}!**".format(target.mention))
awaitself.village_channel.send("**Voted to lynch {}!**".format(target.mention))
awaitself.kill(target)
awaitself.lynch(target)
self.can_vote=False
self.can_vote=False
elifself.used_votes>=3:
else:
self.can_vote=False
awaitself.village_channel.send("**{} has been spared!**".format(target.mention))
ifself.used_votes>=self.day_vote_count:
awaitself.village_channel.send("**All votes have been used! Day is now over!**")
self.can_vote=False
else:
awaitself.village_channel.send("**{}**/**{}** of today's votes have been used!\nNominate carefully..".format(self.used_votes,self.day_vote_count))
ifnotself.can_vote:
ifnotself.can_vote:
awaitself._at_day_end()
awaitself._at_day_end()
@ -247,6 +263,7 @@ class Game:
self.can_vote=False
self.can_vote=False
self.day_vote={}
self.day_vote={}
self.vote_totals={}
self.vote_totals={}
self.day_time=False
awaitself.night_perms(self.village_channel)
awaitself.night_perms(self.village_channel)
@ -353,7 +370,7 @@ class Game:
return"You're not in a game!"
return"You're not in a game!"
ifself.started:
ifself.started:
awaitself.kill(member)
awaitself._quit(player)
awaitchannel.send("{} has left the game".format(member.mention))
awaitchannel.send("{} has left the game".format(member.mention))
awaitself.village_channel.send("{} has voted to put {} to trial. {} more votes needed".format(author.mention,target.member.mention,required_votes-self.vote_totals[id]))
awaitself.village_channel.send("{} has voted to put {} to trial. {} more votes needed".format(author.mention,target.member.mention,required_votes-self.vote_totals[id]))