From 307a61a2c613633ee56b2007ee01dc2d5f534b4b Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 14 Jun 2022 11:07:27 +0200 Subject: [PATCH] Emporio writes the drawn cards in the chat --- backend/bang/game.py | 4 +++- frontend/src/i18n/en.json | 3 ++- frontend/src/i18n/it.json | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/bang/game.py b/backend/bang/game.py index 68a6716..5dfde2e 100644 --- a/backend/bang/game.py +++ b/backend/bang/game.py @@ -374,7 +374,9 @@ class Game: self.players[self.turn].notify_self() def respond_emporio(self, player, i): - player.hand.append(self.available_cards.pop(i)) + card = self.available_cards.pop(i) + player.sio.emit('chat_message', room=self.name, data=f'_choose_emporio|{player.name}|{card.name}') + player.hand.append(card) player.available_cards = [] player.pending_action = pl.PendingAction.WAIT player.notify_self() diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 6aa93a3..dc14e6f 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -131,7 +131,8 @@ "choose_manette": "{0} committed to play only cards of suit {1} in this turn.", "UnionPacific": "{0} played Union Pacific and draws 4 cards from the deck", "use_special": "{0} used the special ability of their character ({1})", - "gold_rush_pay_discard": "{0} discarded {2} from {1}." + "gold_rush_pay_discard": "{0} discarded {2} from {1}.", + "choose_emporio": "{0} has chosen {1} from General Store." }, "foc": { "leggedelwest": "He must play this card on this turn if possible." diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json index 8ffa240..96459a8 100644 --- a/frontend/src/i18n/it.json +++ b/frontend/src/i18n/it.json @@ -129,9 +129,10 @@ "prison_turn": "{0} rimane in prigione questo turno", "flip_event": "🎴 EVENTO: {0} 🎴", "choose_manette": "{0} si è impegnato ad usare solo carte di seme {1} in questo turno.", - "UnionPacific": "{0} ha giocato Union Pacific e ha pescato 4 carte", + "UnionPacific": "{0} ha giocato Union Pacific e ha pescato 4 carte.", "use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})", - "gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}." + "gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}.", + "choose_emporio": "{0} ha scelto {1} da Emporio." }, "foc": { "leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile"