This commit is contained in:
Alberto Xamin 2020-11-23 09:03:10 +01:00
parent ffd624d9e1
commit 07d076ae2a
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2

View File

@ -368,9 +368,10 @@ class Player:
elif isinstance(self.character, characters.ElGringo) and self.attacker and len(self.attacker.hand) > 0:
self.hand.append(self.attacker.hand.pop(randrange(0, len(self.attacker.hand))))
self.attacker.notify_self()
elif self.lives == 0 and len(self.game.players) > 2 and len([c for c in self.hand if isinstance(c, cards.Birra)]) > 0:
while self.lives <= 0 and len(self.game.players) > 2 and len([c for c in self.hand if isinstance(c, cards.Birra)]) > 0:
for i in range(len(self.hand)):
if isinstance(self.hand[i], cards.Birra):
self.lives += 1
self.game.deck.scrap(self.hand.pop(i))
break
self.notify_self()