fix balance

This commit is contained in:
Alberto Xamin 2020-11-28 00:32:12 +01:00
parent 8b33fc0f45
commit 7ed10dee67
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ class Game:
roles.Outlaw('Elimina il Vice 🎖, se non lo elimini tu elimina anche il Rinnegato')
]
elif len(self.players) >= 4:
available_roles = [roles.Sheriff(), roles.Renegade(), roles.Outlaw(), roles.Outlaw(), roles.Vice(), roles.Outlaw(), roles.Vice(), roles.Outlaw(), roles.Vice(), roles.Outlaw()]
available_roles = [roles.Sheriff(), roles.Renegade(), roles.Outlaw(), roles.Outlaw(), roles.Vice(), roles.Outlaw(), roles.Vice(), roles.Renegade(), roles.Outlaw(), roles.Vice(), roles.Outlaw()]
available_roles = available_roles[:len(self.players)]
random.shuffle(available_roles)
for i in range(len(self.players)):

View File

@ -75,7 +75,7 @@ class Renegade(Role):
return True
elif initial_players == 3 and attacker_role != None:
return isinstance(dead_role, Outlaw) and isinstance(attacker_role, Renegade)
elif initial_players != 3 and len(alive_players) == 1 and isinstance(alive_players[0].role, Renegade):
elif initial_players != 3 and len(alive_players) == 1 and alive_players[0].role == self:
print("The Renegade won!")
return True
return False