From 909c02de5347d5089804253f0f8af8b6c5a0289f Mon Sep 17 00:00:00 2001 From: Giulio Date: Sat, 5 Mar 2022 03:46:22 +0100 Subject: [PATCH] minor fix bug with Russian roulette as attacker --- backend/bang/players.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/bang/players.py b/backend/bang/players.py index c6879e8..530b28d 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -1102,7 +1102,7 @@ class Player: card = self.hand.pop(hand_index) if hand_index < len(self.hand) else self.equipment.pop(hand_index-len(self.hand)) #hand_index < len(self.hand) with the '<=' due to the hand.pop if self.character.check(self.game, chd.MollyStark) and hand_index <= len(self.hand) and not self.is_my_turn and self.event_type != 'duel': - if self.attacker.character.check(self.game, chars.SlabTheKiller) and isinstance(self.hand[hand_index], cs.Mancato): + if hasattr(self.attacker,'character') and self.attacker.character.check(self.game, chars.SlabTheKiller) and isinstance(self.hand[hand_index], cs.Mancato): self.molly_discarded_cards += 1 else: self.hand.append(self.game.deck.draw(True))