diff --git a/backend/__init__.py b/backend/__init__.py index a9d204f..b740bd7 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -243,8 +243,10 @@ def chat_message(sid, msg): cmd = msg.split() if len(cmd) >= 2: cards = cs.get_starting_deck(ses.game.expansions) - ses.hand.append([c for c in cards if c.name == ' '.join(cmd[1:])][0]) - ses.notify_self() + card_names = ' '.join(cmd[1:]).split(',') + for cn in card_names: + ses.hand.append([c for c in cards if c.name == cn][0]) + ses.notify_self() elif '/gameinfo' in msg: sio.emit('chat_message', room=sid, data={'color': f'','text':f'info: {ses.game.__dict__}'}) elif '/meinfo' in msg: diff --git a/backend/bang/deck.py b/backend/bang/deck.py index 2790692..6b85276 100644 --- a/backend/bang/deck.py +++ b/backend/bang/deck.py @@ -30,6 +30,7 @@ class Deck: endgame_cards.append(ceh.get_endgame_card()) if len(self.event_cards) > 0: random.shuffle(self.event_cards) + self.event_cards = self.event_cards[:12] self.event_cards.insert(0, None) self.event_cards.insert(0, None) # 2 perchè iniziale, e primo flip dallo sceriffo self.event_cards.append(random.choice(endgame_cards))