remove redundant call in can can

This commit is contained in:
Alberto Xamin 2023-01-25 17:57:22 +00:00
parent a7ef721f1b
commit 33f90901de
2 changed files with 1 additions and 3 deletions

View File

@ -286,8 +286,7 @@ class CatBalou(Card):
def play_card(self, player, against, _with=None): def play_card(self, player, against, _with=None):
if against is not None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0 and (player.name != against or len(player.equipment) > 0): if against is not None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0 and (player.name != against or len(player.equipment) > 0):
if self.name == 'Cat Balou': super().play_card(player, against=against)
super().play_card(player, against=against)
from bang.players import PendingAction from bang.players import PendingAction
player.pending_action = PendingAction.CHOOSE player.pending_action = PendingAction.CHOOSE
player.choose_action = 'discard' player.choose_action = 'discard'

View File

@ -323,7 +323,6 @@ class CanCan(CatBalou):
def play_card(self, player, against, _with=None): def play_card(self, player, against, _with=None):
if self.can_be_used_now: if self.can_be_used_now:
G.sio.emit('chat_message', room=player.game.name, data=f'_play_card_against|{player.name}|{self.name}|{against}')
return super().play_card(player, against) return super().play_card(player, against)
else: else:
if not self.is_duplicate_card(player) and not player.game.check_event(ce.IlGiudice): if not self.is_duplicate_card(player) and not player.game.check_event(ce.IlGiudice):