diff --git a/backend/bang/expansions/gold_rush/shop_cards.py b/backend/bang/expansions/gold_rush/shop_cards.py index eb7958f..f6e2356 100644 --- a/backend/bang/expansions/gold_rush/shop_cards.py +++ b/backend/bang/expansions/gold_rush/shop_cards.py @@ -41,6 +41,7 @@ class Bicchierino(ShopCard): 'name': p.name, 'icon': p.role.icon if(player.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠', 'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)), + 'is_character': True, 'noDesc': True } for p in player.game.get_alive_players()] player.choose_text = 'choose_bicchierino' @@ -155,6 +156,7 @@ class Ricercato(ShopCard): def __init__(self): super().__init__("Ricercato", 2, ShopCardKind.BLACK) self.icon = '🤠️' + self.can_target_self = True def play_card(self, player, against=None, _with=None): player.sio.emit('chat_message', room=player.game.name, data=f'_purchase_card|{player.name}|{self.name}') @@ -162,8 +164,10 @@ class Ricercato(ShopCard): 'name': p.name, 'icon': p.role.icon if(player.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠', 'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)), + 'is_character': True, 'noDesc': True } for p in player.game.get_alive_players() if p != player] + player.available_cards.append({'name': player.name, 'number':0,'icon': 'you', 'is_character': True}) player.choose_text = 'choose_ricercato' player.pending_action = pl.PendingAction.CHOOSE player.notify_self() diff --git a/backend/bang/players.py b/backend/bang/players.py index 5026b09..e7175bc 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -362,6 +362,7 @@ class Player: 'name': p.name, 'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠', 'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)), + 'is_character': True, 'noDesc': True } for p in self.game.get_alive_players() if p != self and p.lives < p.max_lives] self.available_cards.append({'icon': '❌', 'noDesc': True}) @@ -390,6 +391,7 @@ class Player: 'name': p['name'], 'icon': p['role'].icon if(self.game.initial_players == 3) else '⭐️' if p['is_sheriff'] else '🤠', 'alt_text': ''.join(['❤️']*p['lives'])+''.join(['💀']*(p['max_lives']-p['lives'])), + 'is_character': True, 'desc': p['name'] } for p in self.game.get_visible_players(self) if p['dist'] <= self.get_sight()] self.available_cards.append({'icon': '❌', 'noDesc': True}) @@ -400,6 +402,7 @@ class Player: self.available_cards = [{ 'name': p.name, 'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠', + 'is_character': True, 'noDesc': True } for p in self.game.get_alive_players() if len(p.equipment) > 0 and p != self] self.available_cards.append({'icon': '❌', 'noDesc': True}) @@ -1138,6 +1141,7 @@ class Player: self.available_cards = [{ 'name': p.name, 'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠', + 'is_character': True, 'alt_text': ''.join(['🎴️'] * len(p.gold_rush_equipment)), 'noDesc': True } for p in self.game.get_alive_players() if p != self and len([e for e in p.gold_rush_equipment if e.number + 1 <= self.gold_nuggets]) > 0] diff --git a/frontend/src/components/Card.vue b/frontend/src/components/Card.vue index 83dc032..1ac452f 100644 --- a/frontend/src/components/Card.vue +++ b/frontend/src/components/Card.vue @@ -1,7 +1,7 @@