diff --git a/backend/bang/cards.py b/backend/bang/cards.py index 1842ea4..43e1a05 100644 --- a/backend/bang/cards.py +++ b/backend/bang/cards.py @@ -87,7 +87,7 @@ class Card(ABC): pass def is_duplicate_card(self, player): - return self.name in [c.name for c in player.equipment] + return self.name in [c.name for c in player.equipment] or self.name in [c.name for c in player.gold_rush_equipment] def check_suit(self, game, accepted): import bang.expansions.high_noon.card_events as ceh @@ -240,11 +240,11 @@ class Birra(Card): return False if not skipChecks: import bang.expansions.gold_rush.characters as grch - madamYto = [p for p in player.game.get_alive_players() if p.character.check(player.game, grch.MadamYto)] + madamYto = [p for p in player.game.get_alive_players() if p.character.check(player.game, grch.MadamYto) and self.number != 42] for p in madamYto: p.hand.append(player.game.deck.draw()) p.notify_self() - if 'gold_rush' in player.game.expansions: + if 'gold_rush' in player.game.expansions and self.number != 42: from bang.players import PendingAction player.available_cards = [{ 'name': '', @@ -256,7 +256,7 @@ class Birra(Card): player.pending_action = PendingAction.CHOOSE player.notify_self() return True - if len(player.game.get_alive_players()) != 2: + if len(player.game.get_alive_players()) != 2 or self.number == 42: super().play_card(player, against=against) player.lives = min(player.lives+1, player.max_lives) import bang.expansions.dodge_city.characters as chd diff --git a/backend/bang/expansions/gold_rush/shop_cards.py b/backend/bang/expansions/gold_rush/shop_cards.py index 4e84743..e07a2ec 100644 --- a/backend/bang/expansions/gold_rush/shop_cards.py +++ b/backend/bang/expansions/gold_rush/shop_cards.py @@ -17,7 +17,6 @@ class ShopCard(Card): pass # use it now return False elif self.kind == ShopCardKind.BLACK: # equip it - self.reset_card() if not self.is_duplicate_card(player): self.reset_card() self.can_be_used_now = True @@ -80,7 +79,7 @@ class Complice(ShopCard): class CorsaAllOro(ShopCard): def __init__(self): - super().__init__("Corsa All'Oro", 5, ShopCardKind.BROWN) + super().__init__("Corsa All Oro_gr", 5, ShopCardKind.BROWN) self.icon = '🤑️' def play_card(self, player, against=None, _with=None): diff --git a/backend/bang/players.py b/backend/bang/players.py index 0bb0964..44882d4 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -1143,7 +1143,7 @@ class Player: if picked.check_suit(self.game, [cs.Suit.HEARTS]): self.play_turn(can_play_vendetta=False) return - if not forced and self.character.check(self.game, grch.DonBell): + if not forced and self.character.check(self.game, grch.DonBell) and self.can_play_again_don_bell: picked: cs.Card = self.game.deck.pick_and_scrap() self.sio.emit('chat_message', room=self.game.name, data=f'_flipped|{self.name}|{picked.name}|{picked.num_suit()}') if picked.check_suit(self.game, [cs.Suit.HEARTS, cs.Suit.DIAMONDS]): diff --git a/frontend/src/components/Deck.vue b/frontend/src/components/Deck.vue index 507645b..9f23471 100644 --- a/frontend/src/components/Deck.vue +++ b/frontend/src/components/Deck.vue @@ -3,9 +3,9 @@
- - - + + +
@@ -30,7 +30,10 @@
-

{{eventDesc}}

+

{{eventDesc}}

+
+ +

🤑️ {{goldRushDesc}} 🤑️

{{desc}}

@@ -67,6 +70,7 @@ export default { goldRushShopOpen: true, goldRushCards: [], gold_nuggets: 0, + goldRushDesc: "", }), sockets: { self(self){ @@ -137,7 +141,10 @@ export default { this.desc = (this.$i18n.locale=='it'?this.lastScrap.desc:this.lastScrap.desc_eng) else this.desc = this.$t(`cards.${this.lastScrap.name}.desc`) - } + }, + setGoldRushDesc(card) { + this.goldRushDesc = this.$t(`cards.${card.name}.desc`) + }, }, watch: { lastScrap(newVal, old) { diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index c736cd8..72a504e 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -48,6 +48,10 @@ "choose_rimbalzo_player": "Choose the target of the bang", "choose_rimbalzo_card": "Choose the card to discard the bang to", "choose_nuova_identita": "Choose if you want to keep your current character, or if you want to change it and start from 2 HP", + "choose_bicchierino": "A player of your choice regains 1 hp", + "choose_bottiglia": "Choose how you will play Bottle!", + "choose_complice": "Choose how you will play Pardner!", + "choose_ricercato": "Choose who you will play Wanted against.", "emporio_others": "{0} is choosing which card to get from the General Store", "you_died": "YOU DIED", "spectate": "SPECTATE", @@ -84,6 +88,7 @@ "explode": "{0} blew up the dynamite.", "beer_save": "{0} used a beer to save his life.", "play_card": "{0} played {1}.", + "purchase_card": "{0} purchased {1}.", "play_card_against": "{0} played {1} against {2}.", "play_card_for": "{0} played {1} for {2}.", "spilled_beer": "{0} spilled a {1}.", @@ -106,7 +111,8 @@ "prison_free": "{0} got out of prison", "prison_turn": "{0} stayed in prison this turn", "flip_event": "🎴 EVENT: {0} 🎴", - "choose_manette": "{0} committed to play only cards of suit {1} in this turn." + "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" }, "foc": { "leggedelwest": "He must play this card on this turn if possible." @@ -546,13 +552,105 @@ "name": "Handcuffs", "desc": "After drawing in phase 1, the player declares a suit. He will be able to use only cards of that suit for that turn" }, - "Mezzogiorno di Fuoco":{ + "Mezzogiorno di Fuoco": { "name": "High Noon", "desc": "Every player loses 1 HP when their turn starts" }, - "Per Un Pugno Di Carte":{ + "Per Un Pugno Di Carte": { "name": "A Fistful of Cards", "desc": "On the beginning of his turn, the player is target of as many Bang as how many cards he has in his hand" + }, + "Bicchierino": { + "name": "Shot Glass", + "desc": "You can choose a player that regains 1 HP (even you)" + }, + "Bottiglia": { + "name": "Bottle", + "desc": "Can be played as Panic!, Beer or BANG!" + }, + "Complice": { + "name": "Pardner", + "desc": "Can be played as General Store, Duel or Cat Balou." + }, + "Corsa All Oro_gr": { + "name": "Gold Rush", + "desc": "You end your turn, regain all your HP and start a new turn." + }, + "Rum": { + "name": "Rhum", + "desc": "Flip 4 cards, for each different suit you gain 1 HP." + }, + "Union Pacific": { + "name": "Union Pacific", + "desc": "Draw 4 cards from the deck." + }, + "Calumet": { + "name": "Calumet", + "desc": "Cards of diamonds played by other players have no effect on you." + }, + "Cinturone": { + "name": "Gun Belt", + "desc": "You can keep up to 8 cards when you end your turn." + }, + "Ferro di Cavallo": { + "name": "Horseshoe", + "desc": "Every time you have to flip a card you flip twice!" + }, + "Piccone": { + "name": "Pickaxe", + "desc": "You get 1 more card when you draw at the beginning of the turn." + }, + "Ricercato": { + "name": "Wanted", + "desc": "Play it on another player, who kills the target gets 2 extra cards and 1 gold nugget." + }, + "Setaccio": { + "name": "Gold Pan", + "desc": "Pay 1 gold nugget to draw 1 card from the deck, up to twice per turn. (Click on the equipped card to use)" + }, + "Stivali": { + "name": "Boots", + "desc": "Each time you lose 1 hp, you draw 1 card from the deck." + }, + "Talismano": { + "name": "Lucky Charm", + "desc": "Each time you lose 1 hp, you get 1 gold nugget." + }, + "Zaino": { + "name": "Rucksack", + "desc": "Pay 2 gold nugget to heal 1 HP. (Click on the equipped card to use)" + }, + "Don Bell": { + "name": "Don Bell", + "desc": "When he ends his turn, he flips a card, if it flips Hearts ❤️ or Diamonds ♦️ he plays again." + }, + "Dutch Will": { + "name": "Dutch Will", + "desc": "He draws 2 cards, discards 1 and takes 1 gold nugget." + }, + "Jacky Murieta": { + "name": "Jacky Murieta", + "desc": "During his turn he can pay 2 gold nuggets to shoot another BANG!" + }, + "Josh McCloud": { + "name": "Josh McCloud", + "desc": "He can pay 2 gold nuggets to get the first card from the Gold Rush deck." + }, + "Madam Yto": { + "name": "Madam Yto", + "desc": "She draws 1 card from the deck each time a beer is played." + }, + "Pretty Luzena": { + "name": "Pretty Luzena", + "desc": "Once per turn she can have a discount of 1 on the gold rush cards shop." + }, + "Raddie Snake": { + "name": "Raddie Snake", + "desc": "He can throw away 1 gold nugget to draw 1 card from the deck during his turn (2 times max per turn)." + }, + "Simeon Picos": { + "name": "Simeon Picos", + "desc": "He gets 1 gold nugget every time he loses 1 hp." } }, "help": { diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json index 0d32f4b..77bce03 100644 --- a/frontend/src/i18n/it.json +++ b/frontend/src/i18n/it.json @@ -48,6 +48,10 @@ "choose_rimbalzo_player": "Scegli contro chi scartare il bang", "choose_rimbalzo_card": "Scegli contro che carta scartare il bang", "choose_nuova_identita": "Scegli se rimanere con il tuo personaggio corrente o se cambiarlo e ripartire con 2 vite.", + "choose_bicchierino": "Scegli a chi far recuperare 1 punto vita", + "choose_bottiglia": "Scegli come giocare Bottiglia!", + "choose_complice": "Scegli come giocare Complice!", + "choose_ricercato": "Scegli il giocatore su cui vuoi giocare Ricercato", "emporio_others": "{0} sta scegliendo che carta prendere dall'emporio", "you_died": "SEI MORTO", "spectate": "SPETTATORE", @@ -84,6 +88,7 @@ "explode": "{0} ha fatto esplodere la dinamite.", "beer_save": "{0} ha usato una birra per recuperare una vita.", "play_card": "{0} ha giocato {1}.", + "purchase_card": "{0} ha comprato {1}.", "play_card_against": "{0} ha giocato {1} contro {2}.", "play_card_for": "{0} ha giocato {1} per {2}.", "spilled_beer": "{0} ha rovesciato una {1}.", @@ -106,7 +111,8 @@ "prison_free": "{0} è uscito di prigione", "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." + "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" }, "foc": { "leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile" @@ -546,13 +552,105 @@ "name": "Manette", "desc": "Dopo aver pescato in fase 1, il giocatore di turno dichiara un seme: potrà usare solamente carte di quel seme nel suo turno" }, - "Mezzogiorno di Fuoco":{ + "Mezzogiorno di Fuoco": { "name": "Mezzogiorno di Fuoco", "desc": "Ogni giocatore perde 1 punto vita all'inizio del turno" }, - "Per Un Pugno Di Carte":{ + "Per Un Pugno Di Carte": { "name": "Per Un Pugno Di Carte", "desc": "All'inizio del proprio turno, il giocatore subisce tanti bang quante carte ha in mano" + }, + "Bicchierino": { + "name": "Bicchierino", + "desc": "Un giocatore a scelta recupera una vita (anche se stessi)" + }, + "Bottiglia": { + "name": "Bottiglia", + "desc": "Usa questa carta come Panico!, Birra o Bang!" + }, + "Complice": { + "name": "Complice", + "desc": "Usa questa carta come Emporio, Duello o Cat Balou" + }, + "Corsa All Oro_gr": { + "name": "Corsa All'Oro", + "desc": "Il tuo turno termina subito. Recuperi tutti i tuoi punti vita, poi gioca un altro turno" + }, + "Rum": { + "name": "Rum", + "desc": "Estrai 4 carte dal mazzo, guadagni 1 vita per ogni seme diverso" + }, + "Union Pacific": { + "name": "Union Pacific", + "desc": "Pesca 4 carte dal mazzo" + }, + "Calumet": { + "name": "Calumet", + "desc": "Le carte di quadri giocate dagli altri giocatori non hanno effetto su di te" + }, + "Cinturone": { + "name": "Cinturone", + "desc": "Alla fine del tuo turno puoi tenere in mano fino a 8 carte" + }, + "Ferro di Cavallo": { + "name": "Ferro di Cavallo", + "desc": "Ogni volta che estrai scegli la migliore tra due carte" + }, + "Piccone": { + "name": "Piccone", + "desc": "Pesca una carta in più nella tua fase 1" + }, + "Ricercato": { + "name": "Ricercato", + "desc": "Scegli un giocatore qualsiasi, chi elimina quel giocatore pesca 2 carte in più e pesca una pepita" + }, + "Setaccio": { + "name": "Setaccio", + "desc": "Fino a due volte in un turno puoi pagare una pepita per pescare una carta dal mazzo (Clicca sulla carta per usare l'abilità)" + }, + "Stivali": { + "name": "Stivali", + "desc": "Ogni volta che perdi un punto vita pesci una carta dal mazzo" + }, + "Talismano": { + "name": "Talismano", + "desc": "Ogni volta che perdi un punto vita pendi una pepita" + }, + "Zaino": { + "name": "Zaino", + "desc": "Paga 2 pepite per recuperare un punto vita" + }, + "Don Bell": { + "name": "Don Bell", + "desc": "Alla fine del suo turno estrae, se esce Cuori ❤️ o Quadri ♦️ gioca un altro turno" + }, + "Dutch Will": { + "name": "Dutch Will", + "desc": "Pesca 2 carte, ne scarta 1 e pesca una pepita." + }, + "Jacky Murieta": { + "name": "Jacky Murieta", + "desc": "Durante il suo turno può pagare 2 pepite per sparare un bang, può farlo più volte per turno" + }, + "Josh McCloud": { + "name": "Josh McCloud", + "desc": "Può pescare la prima carta del mazzetto pagando solo due pepite" + }, + "Madam Yto": { + "name": "Madam Yto", + "desc": "Ogni volta che viene giocata una Birra pesca 1 carta dal mazzo" + }, + "Pretty Luzena": { + "name": "Pretty Luzena", + "desc": "Una volta per turno può pagare una carta del mazzetto a costo diminuito di 1" + }, + "Raddie Snake": { + "name": "Raddie Snake", + "desc": "Durante il suo turno, può pagare una pepita per pescare 1 carta dal mazzo (fino a due volte per turno)" + }, + "Simeon Picos": { + "name": "Simeon Picos", + "desc": "Ogni volta che viene ferito, prende una pepita" } }, "help": {