Merge branch 'master' of https://github.com/bobloy/Fox-V3
This commit is contained in:
commit
a0c7337e0c
@ -272,7 +272,7 @@ class Game:
|
||||
await self.village_channel.send(embed=discord.Embed(title="**The sun sets on the village...**"))
|
||||
|
||||
await self._notify(5)
|
||||
await asyncio.sleep(30)
|
||||
await asyncio.sleep(5)
|
||||
await self._at_night_start()
|
||||
|
||||
async def _at_night_start(self): # ID 6
|
||||
@ -281,9 +281,9 @@ class Game:
|
||||
await self._notify(6)
|
||||
|
||||
await asyncio.sleep(120) # 2 minutes
|
||||
|
||||
await self.village_channel.send(embed=discord.Embed(title="**Two minutes of night remain...**"))
|
||||
await asyncio.sleep(90) # 1.5 minutes
|
||||
|
||||
await self.village_channel.send(embed=discord.Embed(title="**Thirty seconds until sunrise...**"))
|
||||
await asyncio.sleep(30) # .5 minutes
|
||||
|
||||
await self._at_night_end()
|
||||
@ -393,9 +393,10 @@ class Game:
|
||||
await ctx.send("**Corpses** can't vote...")
|
||||
return
|
||||
|
||||
if player.blocked:
|
||||
if player.role.blocked:
|
||||
await ctx.send("Something is preventing you from doing this...")
|
||||
return
|
||||
|
||||
|
||||
# Let role do target validation, might be alternate targets
|
||||
# I.E. Go on alert? y/n
|
||||
@ -411,6 +412,9 @@ class Game:
|
||||
Night visit target_id
|
||||
Returns a target for role information (i.e. Seer)
|
||||
"""
|
||||
if source.role.blocked:
|
||||
# Blocker handles text
|
||||
return
|
||||
target = await self.get_night_target(target_id, source)
|
||||
await self._visit(target, source)
|
||||
return target
|
||||
@ -512,13 +516,13 @@ class Game:
|
||||
else:
|
||||
target = await self.get_night_target(target_id, source)
|
||||
if source is not None:
|
||||
if source.blocked:
|
||||
if source.role.blocked:
|
||||
# Do nothing if blocked, blocker handles text
|
||||
return
|
||||
|
||||
if not novisit:
|
||||
# Arsonist wouldn't visit before killing
|
||||
await self._visit(target, source) # Visit before killing
|
||||
if not novisit:
|
||||
# Arsonist wouldn't visit before killing
|
||||
await self._visit(target, source) # Visit before killing
|
||||
|
||||
if not target.protected:
|
||||
target.alive = False
|
||||
|
@ -105,7 +105,9 @@ class Seer(Role):
|
||||
async def _at_night_end(self, data=None):
|
||||
target = await self.game.visit(self.see_target)
|
||||
|
||||
alignment = await target.see_alignment(self.player)
|
||||
alignment = None
|
||||
if target:
|
||||
alignment = await target.see_alignment(self.player)
|
||||
|
||||
if alignment == "Werewolf":
|
||||
out = "Your insight reveals this player to be a **Werewolf!**"
|
||||
|
@ -25,8 +25,8 @@ class VoteGroup:
|
||||
(self._at_game_start, 0), # (Action, Priority)
|
||||
(self._at_day_start, 0),
|
||||
(self._at_voted, 0),
|
||||
(self._at_kill, 0),
|
||||
(self._at_hang, 0),
|
||||
(self._at_kill, 1),
|
||||
(self._at_hang, 1),
|
||||
(self._at_day_end, 0),
|
||||
(self._at_night_start, 2),
|
||||
(self._at_night_end, 0),
|
||||
|
@ -6,6 +6,7 @@ import random
|
||||
|
||||
from werewolf.votegroup import VoteGroup
|
||||
|
||||
|
||||
class WolfVote(VoteGroup):
|
||||
"""
|
||||
Werewolf implementation of base VoteGroup class
|
||||
@ -31,8 +32,8 @@ class WolfVote(VoteGroup):
|
||||
(self._at_game_start, 0), # (Action, Priority)
|
||||
(self._at_day_start, 0),
|
||||
(self._at_voted, 0),
|
||||
(self._at_kill, 0),
|
||||
(self._at_hang, 0),
|
||||
(self._at_kill, 1),
|
||||
(self._at_hang, 1),
|
||||
(self._at_day_end, 0),
|
||||
(self._at_night_start, 2),
|
||||
(self._at_night_end, 5), # Kill priority
|
||||
@ -94,7 +95,20 @@ class WolfVote(VoteGroup):
|
||||
await self.channel.send("**No kill will be attempted tonight...**")
|
||||
|
||||
# async def _at_visit(self, data=None):
|
||||
# pass
|
||||
# pass
|
||||
|
||||
# async def register_players(self, *players):
|
||||
# """
|
||||
# Extend players by passed list
|
||||
# """
|
||||
# self.players.extend(players)
|
||||
|
||||
# async def remove_player(self, player):
|
||||
# """
|
||||
# Remove a player from player list
|
||||
# """
|
||||
# if player.id in self.players:
|
||||
# self.players.remove(player)
|
||||
|
||||
async def vote(self, target, author, id):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user