start of end condition
This commit is contained in:
parent
cd6ea57af7
commit
b5c2d3d10b
@ -651,8 +651,21 @@ class Game:
|
|||||||
# await channel.set_permissions(member, read_messages=True)
|
# await channel.set_permissions(member, read_messages=True)
|
||||||
|
|
||||||
async def _check_game_over(self):
|
async def _check_game_over(self):
|
||||||
# ToDo
|
alive_players = [player for player self.players if player.alive]
|
||||||
pass
|
|
||||||
|
if len(alive_players)<=2:
|
||||||
|
# Check 1v1 victory conditions ToDo
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
#Check if everyone is on the same team
|
||||||
|
alignment = alive_players[0].role.alignment
|
||||||
|
for player in alive_players:
|
||||||
|
if player.role.alignment != alignment:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Only remaining team wins
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def _end_game(self):
|
async def _end_game(self):
|
||||||
# ToDo
|
# ToDo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user