fix molly stark

This commit is contained in:
Giulio 2021-06-05 12:44:27 +02:00
parent a8c1816c36
commit 74e4900dfa

View File

@ -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: