fix mancato, cat balou, renegade

This commit is contained in:
Alberto Xamin 2020-11-25 23:45:34 +01:00
parent e6119394cd
commit b06d7efa40
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ class CatBalou(Card):
self.need_target = True
def play_card(self, player, against):
if against != None:
if against != None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0:
super().play_card(player, against=against)
from players import PendingAction
player.pending_action = PendingAction.CHOOSE
@ -272,7 +272,7 @@ class Panico(Card):
self.desc = "Pesca una carta da un giocatore a distanza 1, scegli a caso dalla mano, oppure fra quelle che ha in gioco"
def play_card(self, player, against):
if against != None:
if against != None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0:
super().play_card(player, against=against)
from players import PendingAction
player.pending_action = PendingAction.CHOOSE

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], Renegade):
elif initial_players != 3 and len(alive_players) == 1 and isinstance(alive_players[0].role, Renegade):
print("The Renegade won!")
return True
return False