From b54956f67289d346ef40fb173c11f9d01d5e8001 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sun, 6 Jun 2021 19:24:44 +0200 Subject: [PATCH] respond fix --- 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 dd2264d..72ff5e6 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -879,7 +879,7 @@ class Player: def respond(self, hand_index): if self.pending_action != PendingAction.RESPOND: return self.pending_action = PendingAction.WAIT - if hand_index != -1 and hand_index < (len(self.hand)+len(self.equipment)-1) and ( + if hand_index != -1 and hand_index < (len(self.hand)+len(self.equipment)) and ( ((hand_index < len(self.hand) and self.hand[hand_index].name in self.expected_response) or self.character.check(self.game, chd.ElenaFuente)) or (hand_index-len(self.hand) < len(self.equipment) and self.equipment[hand_index-len(self.hand)].name in self.expected_response)): card = self.hand.pop(hand_index) if hand_index < len(self.hand) else self.equipment.pop(hand_index-len(self.hand))