diff --git a/backend/bang/expansions/gold_rush/shop_cards.py b/backend/bang/expansions/gold_rush/shop_cards.py index eb5d9c0..4757a88 100644 --- a/backend/bang/expansions/gold_rush/shop_cards.py +++ b/backend/bang/expansions/gold_rush/shop_cards.py @@ -185,9 +185,10 @@ class Setaccio(ShopCard): if not self.can_be_used_now: return super().play_card(player, against, _with) else: - if player.gold_nuggets >= 1: + if player.gold_nuggets >= 1 and player.setaccio_count < 2: player.sio.emit('chat_message', room=player.game.name, data=f'_play_card|{player.name}|{self.name}') player.gold_nuggets -= 1 + player.setaccio_count += 1 player.hand.append(player.game.deck.draw(True)) player.notify_self() return True diff --git a/backend/bang/players.py b/backend/bang/players.py index f8e57ec..1c478a4 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -81,6 +81,7 @@ class Player: self.gold_nuggets = 0 self.gold_rush_equipment: List[grc.ShopCard] = [] self.was_player = False + self.setaccio_count = 0 def join_game(self, game): self.game = game @@ -356,6 +357,7 @@ class Player: if (self.lives == 0 or self.is_dead) and not self.is_ghost: return self.end_turn(forced=True) self.scrapped_cards = 0 + self.setaccio_count = 0 self.can_play_ranch = True self.is_playing_ranch = False self.can_play_vendetta = can_play_vendetta @@ -608,7 +610,7 @@ class Player: return elif len(self.hand) + len(self.equipment) <= hand_index < len(self.hand) + len(self.equipment) + len(self.gold_rush_equipment) and len(self.gold_rush_equipment): print('which is a gold rush black card') - card: grc.ShopCard = self.gold_rush_equipment[hand_index - len(self.hand) + len(self.equipment)] + card: grc.ShopCard = self.gold_rush_equipment[hand_index - len(self.hand) - len(self.equipment)] return card.play_card(self) card: cs.Card = self.hand.pop(hand_index) if hand_index < len(self.hand) else self.equipment.pop(hand_index-len(self.hand)) withCard: cs.Card = None