just 12 events

This commit is contained in:
Alberto Xamin 2020-12-24 23:00:19 +01:00
parent 3ea4fe090d
commit 14d5e24631
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 5 additions and 2 deletions

View File

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

View File

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