fix flip event with 3 players

This commit is contained in:
Giulio 2021-06-11 15:56:03 +02:00
parent 7ed97d5bc0
commit 41dceb8e1e

View File

@ -345,7 +345,7 @@ class Game:
print(f'{self.players[self.turn]} is dead, next turn') print(f'{self.players[self.turn]} is dead, next turn')
return self.next_turn() return self.next_turn()
self.player_bangs = 0 self.player_bangs = 0
if isinstance(self.players[self.turn].role, roles.Sheriff) or (self.initial_players == 3 and isinstance(self.players[self.turn].role, roles.Vice) or (self.initial_players == 3 and any([p for p in self.players if p.is_dead and p.role.name == 'Vice']) and isinstance(self.players[self.turn].role, roles.Renegade))): if isinstance(self.players[self.turn].role, roles.Sheriff) or ((self.initial_players == 3 and isinstance(self.players[self.turn].role, roles.Vice) and not self.players[self.turn].is_ghost) or (self.initial_players == 3 and any([p for p in self.players if p.is_dead and p.role.name == 'Vice']) and isinstance(self.players[self.turn].role, roles.Renegade))):
self.deck.flip_event() self.deck.flip_event()
if len(self.deck.event_cards) > 0 and self.deck.event_cards[0] != None: if len(self.deck.event_cards) > 0 and self.deck.event_cards[0] != None:
print(f'flip new event {self.deck.event_cards[0].name}') print(f'flip new event {self.deck.event_cards[0].name}')