From 74e4900dfa4d9a23027edd10cf37772a73271581 Mon Sep 17 00:00:00 2001 From: Giulio Date: Sat, 5 Jun 2021 12:44:27 +0200 Subject: [PATCH] fix molly stark --- backend/bang/players.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/bang/players.py b/backend/bang/players.py index 3747c80..dd2264d 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -879,11 +879,12 @@ 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)) and ( + if hand_index != -1 and hand_index < (len(self.hand)+len(self.equipment)-1) 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)) - 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': + #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): self.molly_discarded_cards += 1 else: