From d866cf13b8d070deab0679697c825239d0f78fc4 Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Sun, 29 Nov 2020 16:55:14 +0100 Subject: [PATCH] add desc_eng --- backend/bang/cards.py | 24 ++++++++++++++++++- backend/bang/characters.py | 19 ++++++++++++--- backend/bang/expansions/dodge_city/cards.py | 9 +++++++ .../bang/expansions/dodge_city/characters.py | 8 +++++++ backend/bang/roles.py | 4 ++++ frontend/src/components/Chooser.vue | 2 +- frontend/src/components/Deck.vue | 13 +++++----- frontend/src/components/Player.vue | 10 ++++---- 8 files changed, 73 insertions(+), 16 deletions(-) diff --git a/backend/bang/cards.py b/backend/bang/cards.py index 31629f5..cc1af41 100644 --- a/backend/bang/cards.py +++ b/backend/bang/cards.py @@ -80,6 +80,7 @@ class Barile(Card): super().__init__(suit, 'Barile', number, is_equipment=True) self.icon = '๐Ÿ›ข' self.desc = "Quando sei bersagliato da un Bang puoi estrarre la prima carta dalla cima del mazzo, se la carta estratta รจ del seme Cuori allora vale come un Mancato" + self.desc_eng = "When someone plays a Bang against you. You can flip the first card from the deck, if the suit is Hearts then it counts as a Missed card" class Dinamite(Card): @@ -87,6 +88,7 @@ class Dinamite(Card): super().__init__(suit, 'Dinamite', number, is_equipment=True) self.icon = '๐Ÿงจ' self.desc = "Giocando la Dinamite, posizionala davanti a te, resterร  innocua per un intero giro. All'inizio del prossimo turno prima di pescare e prima di una eventuale estrazione (es. Prigione), estrai una carta dalla cima del mazzo. Se esce una carta tra il 2 il 9 di picche (compresi) allora la dinamite esplode: perdi 3 vite e scarta la carta, altrimenti passa la dinamite al giocatore successivo, il quale estrarร  a sua volta dopo che tu avrai passato il tuo turno" + self.desc_eng = "When playing Dynamite, place it in front of you, it will remain harmless for a whole round. At the beginning of the next turn before drawing and before any card flip (eg Prison), flip a card from the top of the deck. If a card is between 2 and 9 of spades (inclusive) then the dynamite explodes: you lose 3 lives and discard the card, otherwise pass the dynamite to the next player, who will draw in turn after you have ended your turn" class Mirino(Card): @@ -94,6 +96,7 @@ class Mirino(Card): super().__init__(suit, 'Mirino', number, is_equipment=True, sight_mod=1) self.icon = '๐Ÿ”Ž' self.desc = "Tu vedi gli altri giocatori a distanza -1" + self.desc_eng = "You see the other players at distance -1" class Mustang(Card): @@ -101,6 +104,7 @@ class Mustang(Card): super().__init__(suit, 'Mustang', number, is_equipment=True, vis_mod=1) self.icon = '๐ŸŽ' self.desc = "Gli altri giocatori ti vedono a distanza +1" + self.desc_eng = "The other players see you at distance +1" class Prigione(Card): @@ -108,6 +112,7 @@ class Prigione(Card): super().__init__(suit, 'Prigione', number, is_equipment=True) self.icon = 'โ›“' self.desc = "Equipaggia questa carta a un altro giocatore, tranne lo Sceriffo. Il giocatore scelto all'inizio del suo turno, prima di pescare dovrร  estrarre: se esce Cuori scarta questa carta e gioca normalmente il turno, altrimenti scarta questa carta e salta il turno" + self.desc_eng = "Equip this card to another player, except the Sheriff. The player chosen at the beginning of his turn, must flip a card before drawing: if it's Hearts, discard this card and play the turn normally, otherwise discard this card and skip the turn" self.need_target = True def play_card(self, player, against, _with=None): @@ -124,6 +129,7 @@ class Remington(Card): is_equipment=True, is_weapon=True, range=3) self.icon = '๐Ÿ”ซ' self.desc = "Puoi sparare a un giocatore che sia distante 3 o meno" + self.desc_eng = "You can shoot another player at distance 3 or less" class RevCarabine(Card): @@ -132,6 +138,7 @@ class RevCarabine(Card): is_equipment=True, is_weapon=True, range=4) self.icon = '๐Ÿ”ซ' self.desc = "Puoi sparare a un giocatore che sia distante 4 o meno" + self.desc_eng = "You can shoot another player at distance 4 or less" class Schofield(Card): @@ -140,6 +147,7 @@ class Schofield(Card): is_equipment=True, is_weapon=True, range=2) self.icon = '๐Ÿ”ซ' self.desc = "Puoi sparare a un giocatore che sia distante 2 o meno" + self.desc_eng = "You can shoot another player at distance 2 or less" class Volcanic(Card): @@ -148,6 +156,7 @@ class Volcanic(Card): is_equipment=True, is_weapon=True, range=1) self.icon = '๐Ÿ”ซ' self.desc = "Puoi sparare a un giocatore che sia distante 1 o meno, tuttavia puoi giocare quanti bang vuoi" + self.desc_eng = "You can shoot another player at distance 1 or less, however you no longer have the limit of 1 Bang" class Winchester(Card): @@ -156,6 +165,7 @@ class Winchester(Card): is_equipment=True, is_weapon=True, range=5) self.icon = '๐Ÿ”ซ' self.desc = "Puoi sparare a un giocatore che sia distante 5 o meno" + self.desc_eng = "You can shoot another player at distance 5 or less" class Bang(Card): @@ -163,6 +173,7 @@ class Bang(Card): super().__init__(suit, 'Bang!', number) self.icon = '๐Ÿ’ฅ' self.desc = "Spara a un giocatore a distanza raggiungibile. Se non hai armi la distanza di default รจ 1" + self.desc_eng = "Shoot a player in sight. If you do not have weapons, your is sight is 1" self.need_target = True def play_card(self, player, against, _with=None): @@ -183,6 +194,7 @@ class Birra(Card): super().__init__(suit, 'Birra', number) self.icon = '๐Ÿบ' self.desc = "Gioca questa carta per recuperare un punto vita. Non puoi andare oltre al limite massimo del tuo personaggio. Se stai per perdere l'ultimo punto vita puoi giocare questa carta anche nel turno dell'avversario. La birra non ha piรน effetto se ci sono solo due giocatori" + self.desc_eng = "Play this card to regain a life point. You cannot heal more than your character's maximum limit. If you are about to lose your last life point, you can also play this card on your opponent's turn. Beer no longer takes effect if there are only two players" def play_card(self, player, against, _with=None): if len(player.game.players) != 2: @@ -204,6 +216,7 @@ class CatBalou(Card): super().__init__(suit, 'Cat Balou', number) self.icon = '๐Ÿ’ƒ' self.desc = "Fai scartare una carta a un qualsiasi giocatore, scegli a caso dalla mano, oppure fra quelle che ha in gioco" + self.desc_eng = "Choose and discard a card from any other player." self.need_target = True def play_card(self, player, against, _with=None): @@ -224,6 +237,7 @@ class Diligenza(Card): super().__init__(suit, 'Diligenza', number) self.icon = '๐Ÿšก' self.desc = "Pesca 2 carte dalla cima del mazzo" + self.desc_eng = "Draw 2 cards from the deck." def play_card(self, player, against, _with=None): player.sio.emit('chat_message', room=player.game.name, @@ -239,6 +253,7 @@ class Duello(Card): self.need_target = True self.icon = 'โš”๏ธ' self.desc = "Gioca questa carta contro un qualsiasi giocatore. A turno, cominciando dal tuo avversario, potete scartare una carta Bang!, il primo giocatore che non lo fa perde 1 vita" + self.desc_eng = "Play this card against any player. In turn, starting with your opponent, you can discard a Bang! Card, the first player who does not do so loses 1 life." def play_card(self, player, against, _with=None): if against != None: @@ -252,7 +267,8 @@ class Emporio(Card): def __init__(self, suit, number): super().__init__(suit, 'Emporio', number) self.icon = '๐Ÿช' - self.desc = "Scopri dal mazzo tante carte quanto il numero di giocatori, a turno, partendo da te, scegliete una carta e aggiungetela alla vostra mano" + self.desc = "Scopri dal mazzo tante carte quanto il numero di giocatori vivi, a turno, partendo da te, scegliete una carta e aggiungetela alla vostra mano" + self.desc_eng = "Put on the table N cards from the deck, where N is the number of alive players, in turn, starting with you, choose a card and add it to your hand" def play_card(self, player, against, _with=None): super().play_card(player, against=against) @@ -265,6 +281,7 @@ class Gatling(Card): super().__init__(suit, 'Gatling', number) self.icon = '๐Ÿ›ฐ' self.desc = "Spara a tutti gli altri giocatori" + self.desc_eng = "Shoot all the other players" def play_card(self, player, against, _with=None): super().play_card(player, against=against) @@ -277,6 +294,7 @@ class Indiani(Card): super().__init__(suit, 'Indiani!', number) self.icon = '๐Ÿน' self.desc = "Tutti gli altri giocatori devono scartare un Bang! o perdere una vita" + self.desc_eng = "All the other players must discard a Bang! or lose 1 Health Point" def play_card(self, player, against, _with=None): super().play_card(player, against=against) @@ -289,6 +307,7 @@ class Mancato(Card): super().__init__(suit, 'Mancato!', number) self.icon = '๐Ÿ˜…' self.desc = "Usa questa carta per annullare un bang" + self.desc_eng = "Use this card to cancel the effect of a bang" def play_card(self, player, against, _with=None): import bang.characters as chars @@ -307,6 +326,7 @@ class Panico(Card): self.icon = '๐Ÿ˜ฑ' self.need_target = True self.desc = "Pesca una carta da un giocatore a distanza 1, scegli a caso dalla mano, oppure fra quelle che ha in gioco" + self.desc_eng = "Steal a card from a player at distance 1" def play_card(self, player, against, _with=None): if against != None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0: @@ -324,6 +344,7 @@ class Saloon(Card): def __init__(self, suit, number): super().__init__(suit, 'Saloon', number) self.desc = "Tutti i giocatori recuperano un punto vita compreso chi gioca la carta" + self.desc_eng = "Everyone heals 1 Health point" self.icon = '๐Ÿป' def play_card(self, player, against, _with=None): @@ -339,6 +360,7 @@ class WellsFargo(Card): def __init__(self, suit, number): super().__init__(suit, 'WellsFargo', number) self.desc = "Pesca 3 carte dalla cima del mazzo" + self.desc_eng = "Draw 3 cards from the deck" self.icon = '๐Ÿ’ธ' def play_card(self, player, against, _with=None): diff --git a/backend/bang/characters.py b/backend/bang/characters.py index 97b6c3b..3356c31 100644 --- a/backend/bang/characters.py +++ b/backend/bang/characters.py @@ -33,6 +33,7 @@ class BartCassidy(Character): def __init__(self): super().__init__("Bart Cassidy", max_lives=4) self.desc = "Ogni volta che viene ferito, pesca una carta" + self.desc_eng = "Each time he is hurt, he draws a card" self.icon = '๐Ÿ’”' def on_hurt(self, dmg): @@ -42,6 +43,7 @@ class BlackJack(Character): def __init__(self): super().__init__("Black Jack", max_lives=4) self.desc = "All'inizio del suo turno, quando deve pescare, mostra a tutti la seconda carta, se รจ Cuori o Quadri pesca una terza carta senza farla vedere" + self.desc_eng = "At the beginning of his turn, when he has to draw, he shows everyone the second card, if it is Hearts or Diamonds he draws a third card without showing it" self.icon = '๐ŸŽฐ' class CalamityJanet(Character): @@ -49,14 +51,13 @@ class CalamityJanet(Character): super().__init__("Calamity Janet", max_lives=4) self.icon = '๐Ÿ”€' self.desc = "Puรฒ usare i Mancato! come Bang! e viceversa" - #TODO: gestire bene la scelta multipla in ogni iterazione con la carta bang e mancato - # vale anche per le carte indiani e duello - # se usa un mancato come bang ovviamente non ne puรฒ usare altri lo stesso turno se non ha una volcanic + self.desc_eng = "She can use the Missed! as Bang! and the other way around" class ElGringo(Character): def __init__(self): super().__init__("El Gringo", max_lives=3) self.desc = "Ogni volta che perde un punto vita pesca una carta dalla mano del giocatore responsabile ma solo se il giocatore in questione ha carte in mano (una carta per ogni punto vita)" + self.desc_eng = "Each time he is hurt, he draws a card from the hand of the attacking player" self.icon = '๐Ÿค•' # ovviamente la dinamite non รจ considerata danno inferto da un giocatore @@ -64,36 +65,42 @@ class JesseJones(Character): def __init__(self): super().__init__("Jesse Jones", max_lives=4) self.desc = "All'inizio del suo turno, quando deve pescare, puรฒ prendere la prima carta a caso dalla mano di un giocatore e la seconda dal mazzo" + self.desc_eng = "When he has to draw his cards, he may draw the first card from the hand of another player" self.icon = '๐Ÿ˜œ' class Jourdonnais(Character): def __init__(self): super().__init__("Jourdonnais", max_lives=4) self.desc = "Gioca come se avesse un Barile sempre attivo, nel caso in cui metta in gioco un Barile 'Reale' puรฒ estrarre due volte" + self.desc_eng = "He plays as he had a Barrel always active, if he equips another Barrel, he can flip 2 cards" self.icon = '๐Ÿ›ข' class KitCarlson(Character): def __init__(self): super().__init__("Kit Carlson", max_lives=4) self.desc = "All'inizio del suo turno, quando deve pescare, pesca tre carte, ne sceglie due da tenere in mano e la rimanente la rimette in cima la mazzo" + self.desc_eng = "When he has to draw, he peeks 3 cards and chooses 2, putting the other card on the top of the deck" self.icon = '๐Ÿค”' class LuckyDuke(Character): def __init__(self): super().__init__("Lucky Duke", max_lives=4, pick_mod=1) self.desc = "Ogni volta che deve estrarre, prende due carte dal mazzo, sceglie una delle due carte per l'estrazione, infine le scarta entrambe" + self.desc_eng = "Every time he has to flip a card, he can flip 2 times" self.icon = '๐Ÿ€' class PaulRegret(Character): def __init__(self): super().__init__("Paul Regret", max_lives=3, visibility_mod=1) self.desc = "Gioca come se avesse una Mustang sempre attiva, nel caso in cui metta in gioco una Mustang 'Reale' l'effetto si somma tranquillamente" + self.desc_eng = "The other players see him at distance +1" self.icon = '๐Ÿ‡' class PedroRamirez(Character): def __init__(self): super().__init__("Pedro Ramirez", max_lives=4) self.desc = "All'inizio del suo turno, quando deve pescare, puรฒ prendere la prima carta dalla cima degli scarti e la seconda dal mazzo" + self.desc_eng = "When he has to draw, he may pick the first card from the discarded cards" self.icon = '๐Ÿšฎ' class RoseDoolan(Character): @@ -101,17 +108,20 @@ class RoseDoolan(Character): super().__init__("Rose Doolan", max_lives=4, sight_mod=1) self.icon = '๐Ÿ•ต๏ธโ€โ™€๏ธ' self.desc = "Gioca come se avesse un Mirino sempre attivo, nel caso in cui metta in gioco una Mirino 'Reale' l'effetto si somma tranquillamente" + self.desc_eng = "She sees the other players at distance -1" class SidKetchum(Character): def __init__(self): super().__init__("Sid Ketchum", max_lives=4) self.desc = "Puรฒ scartare due carte per recuperare un punto vita anche piรน volte di seguito a patto di avere carte da scartare, puรฒ farlo anche nel turno dell'avversario se starebbe per morire" + self.desc_eng = "He can discard 2 cards to regain 1HP" self.icon = '๐Ÿคค' class SlabTheKiller(Character): def __init__(self): super().__init__("Slab The Killer", max_lives=4) self.desc = "Per evitare i suoi Bang servono due Mancato, un eventuale barile vale solo come un Mancato" + self.desc_eng = "To dodge his Bang! cards other players need 2 Missed!" self.icon = '๐Ÿ”ช' #vale per tutte le carte bang non solo per la carta che si chiama Bang! @@ -119,18 +129,21 @@ class SuzyLafayette(Character): def __init__(self): super().__init__("Suzy Lafayette", max_lives=4) self.desc = "Appena rimane senza carte in mano pesca immediatamente una carta dal mazzo" + self.desc_eng = "Whenever she has an empty hand, she draws a card" self.icon = '๐Ÿ”‚' class VultureSam(Character): def __init__(self): super().__init__("Vulture Sam", max_lives=4) self.desc = "Quando un personaggio viene eliminato prendi tutte le carte di quel giocatore e aggiungile alla tua mano, sia le carte in mano che quelle in gioco" + self.desc_eng = "When a player dies, he gets all the cards in the dead's hand and equipments" self.icon = '๐Ÿ’ฐ' class WillyTheKid(Character): def __init__(self): super().__init__("Willy The Kid", max_lives=4) self.desc = "Questo personaggio puรฒ giocare quanti bang vuole nel suo turno" + self.desc_eng = "He doesn't have limits to the amounts of bang he can use" self.icon = '๐ŸŽ‰' def all_characters(expansions: List[str]): diff --git a/backend/bang/expansions/dodge_city/cards.py b/backend/bang/expansions/dodge_city/cards.py index 12d8df0..6f962ce 100644 --- a/backend/bang/expansions/dodge_city/cards.py +++ b/backend/bang/expansions/dodge_city/cards.py @@ -17,6 +17,7 @@ class Pugno(Card): super().__init__(suit, 'Pugno!', number, range=1) self.icon = '๐Ÿ‘Š' self.desc = "Spara a un giocatore a distanza 1" + self.desc_eng = "Shoot a player at distance 1" self.need_target = True def play_card(self, player, against, _with=None): @@ -32,6 +33,7 @@ class Schivata(Mancato): self.name = 'Schivata' self.icon = '๐Ÿ™…โ€โ™‚๏ธ' self.desc += " e poi pesca una carta" + self.desc_eng += " and then draw a card." self.alt_text = 'โ˜๏ธ๐Ÿ†“' def play_card(self, player, against, _with=None): @@ -46,6 +48,7 @@ class RagTime(Panico): Card.__init__(self, suit, 'Rag Time', number) self.icon = '๐ŸŽน' self.desc = "Ruba 1 carta dalla mano di un giocatore a prescindere dalla distanza" + self.desc_eng = "Steal a card from another player at any distance" self.need_target = True self.need_with = True self.alt_text = '2๐Ÿƒ' @@ -63,6 +66,7 @@ class Rissa(CatBalou): self.name = 'Rissa' self.icon = '๐ŸฅŠ' self.desc = "Fai scartare una carta a tutti gli altri giocatori, scegli a caso dalla mano, oppure fra quelle che hanno in gioco" + self.desc_eng = "Choose a card to discard from the hand/equipment ofc all the other players" self.need_with = True self.need_target = False self.alt_text = '2๐Ÿƒ' @@ -84,6 +88,7 @@ class SpringField(Card): super().__init__(suit, 'Springfield', number) self.icon = '๐ŸŒต' self.desc = "Spara a un giocatore a prescindere dalla distanza" + self.desc_eng = "Shoot a player at any distance" self.need_target = True self.need_with = True self.alt_text = '2๐Ÿƒ' @@ -101,6 +106,7 @@ class Tequila(Card): super().__init__(suit, 'Tequila', number) self.icon = '๐Ÿน' self.desc = "Fai recuperare 1 vita a un giocatore a tua scelta, anche te stesso" + self.desc_eng = "Heal 1 HP to a player of your choice (can be you)" self.need_target = True self.can_target_self = True self.need_with = True @@ -121,6 +127,7 @@ class Whisky(Card): super().__init__(suit, 'Whisky', number) self.icon = '๐Ÿฅƒ' self.desc = "Gioca questa carta per recuperare fino a 2 punti vita" + self.desc_eng = "Heal 2 HP" self.need_with = True self.alt_text = '2๐Ÿƒ' @@ -199,6 +206,7 @@ class Derringer(Pugnale): self.icon = '๐Ÿšฌ' self.alt_text += ' โ˜๏ธ๐Ÿ†“' self.desc += ' e poi pesca una carta' + self.desc_eng += ' and then draw a card.' def play_card(self, player, against, _with=None): if self.can_be_used_now: @@ -217,6 +225,7 @@ class Borraccia(Card): super().__init__(suit, 'Borraccia', number) self.icon = '๐Ÿผ' self.desc = 'Recupera 1 vita' + self.desc_eng = 'Regain 1 HP' self.usable_next_turn = True self.can_be_used_now = False diff --git a/backend/bang/expansions/dodge_city/characters.py b/backend/bang/expansions/dodge_city/characters.py index b02a326..f918af3 100644 --- a/backend/bang/expansions/dodge_city/characters.py +++ b/backend/bang/expansions/dodge_city/characters.py @@ -5,48 +5,56 @@ class PixiePete(Character): def __init__(self): super().__init__("Pixie Pete", max_lives=3) self.desc = "All'inizio del turno pesca 3 carte invece che 2" + self.desc_eng = "He draws 3 cards instead of 2" self.icon = 'โ˜˜๏ธ' class TequilaJoe(Character): def __init__(self): super().__init__("Tequila Joe", max_lives=4) self.desc = "Se gioca la carta Birra recupera 2 vite invece che una sola" + self.desc_eng = "When he plays Beer, he regains 2 Health Points" self.icon = '๐Ÿป' class GregDigger(Character): def __init__(self): super().__init__("Greg Digger", max_lives=4) self.desc = "Quando un giocatore muore, recupera fino a 2 vite" + self.desc_eng = "Whenever a player dies, he regains up to 2 lives" self.icon = '๐Ÿฆด' class HerbHunter(Character): def __init__(self): super().__init__("HerbHunter", max_lives=4) self.desc = "Quando un giocatore muore, pesca 2 carte" + self.desc_eng = "Whenever a player dies, he draws 2 cards" self.icon = 'โšฐ๏ธ' class ElenaFuente(Character): def __init__(self): super().__init__("Elena Fuente", max_lives=3) self.desc = "Puรฒ usare una carta qualsiasi nella sua mano come mancato" + self.desc_eng = "She can use any card of her hand as missed" self.icon = '๐Ÿง˜โ€โ™€๏ธ' class BillNoface(Character): def __init__(self): super().__init__("Bill Noface", max_lives=4) self.desc = "Pesca 1 carta + 1 carta per ogni ferita che ha" + self.desc_eng = "She can use any card of her hand as missed" self.icon = '๐Ÿ™ˆ' class MollyStark(Character): def __init__(self): super().__init__("Molly Stark", max_lives=4) self.desc = "Quando usa una carta che ha in mano, fuori dal suo turno, ne ottiene un'altra dal mazzo" + self.desc_eng = "When she uses a card from her hand outside her turn, he draws a card." self.icon = '๐Ÿ™…โ€โ™€๏ธ' class ApacheKid(Character): def __init__(self): super().__init__("Apache Kid", max_lives=3) self.desc = "Le carte di quadri โ™ฆ๏ธ giocate contro di lui non hanno effetto (non vale durante i duelli)" + self.desc_eng = "Cards of diamonds โ™ฆ๏ธ played against him, do no have effect (doesn't work in duels)." self.icon = 'โ™ฆ๏ธ' def all_characters() -> List[Character]: diff --git a/backend/bang/roles.py b/backend/bang/roles.py index e311a43..66c9204 100644 --- a/backend/bang/roles.py +++ b/backend/bang/roles.py @@ -14,6 +14,7 @@ class Role(ABC): class Sheriff(Role): def __init__(self): super().__init__("Sceriffo", "Elimina tutti i Fuorilegge e il Rinnegato!", health_mod=+1) + self.goal_eng = "Kill the Outlaws and the Renegade!" self.max_players = 1 self.icon = 'โญ๏ธ' @@ -29,6 +30,7 @@ class Sheriff(Role): class Vice(Role): def __init__(self, alternative_goal=None): super().__init__("Vice", "Proteggi lo Sceriffo! Elimina tutti i Fuorilegge e il Rinnegato!") + self.goal_eng = "Protect the Sheriff! Kill the Outlaws and the Renegade!" if alternative_goal: self.goal = alternative_goal self.max_players = 2 @@ -47,6 +49,7 @@ class Vice(Role): class Outlaw(Role): def __init__(self, alternative_goal=None): super().__init__("Fuorilegge", "Elimina lo Sceriffo!") + self.goal_eng = "Kill the Sheriff!" if alternative_goal: self.goal = alternative_goal self.max_players = 3 @@ -65,6 +68,7 @@ class Outlaw(Role): class Renegade(Role): def __init__(self, alternative_goal=None): super().__init__("Rinnegato", "Rimani l'ultimo personaggio in gioco!") + self.goal_eng = "Be the last man standing!" if alternative_goal: self.goal = alternative_goal self.max_players = 1 diff --git a/frontend/src/components/Chooser.vue b/frontend/src/components/Chooser.vue index c8de680..34ac420 100644 --- a/frontend/src/components/Chooser.vue +++ b/frontend/src/components/Chooser.vue @@ -42,7 +42,7 @@ export default { }, methods: { showDesc(card) { - this.desc = card.desc + this.desc = (this.$i18n.locale=='it'?card.desc:card.desc_eng) } }, mounted() { diff --git a/frontend/src/components/Deck.vue b/frontend/src/components/Deck.vue index dec366f..9ce7062 100644 --- a/frontend/src/components/Deck.vue +++ b/frontend/src/components/Deck.vue @@ -11,7 +11,7 @@ + @pointerenter.native="desc=($i18n.locale=='it'?lastScrap.desc:lastScrap.desc_eng)" @pointerleave.native="desc=''" /> @@ -36,7 +36,6 @@ export default { name: 'PewPew!', icon: '๐Ÿ’ฅ', }, - endTurnCard: null, lastScrap: null, previousScrap: null, pending_action: false, @@ -53,10 +52,12 @@ export default { this.lastScrap = card } }, - mounted() { - this.endTurnCard = { - name: this.$t('end_turn'), - icon: 'โ›”๏ธ' + computed: { + endTurnCard() { + return { + name: this.$t('end_turn'), + icon: 'โ›”๏ธ' + } } }, methods: { diff --git a/frontend/src/components/Player.vue b/frontend/src/components/Player.vue index 57532d8..5f115a5 100644 --- a/frontend/src/components/Player.vue +++ b/frontend/src/components/Player.vue @@ -4,16 +4,16 @@
+ @pointerenter.native="desc=($i18n.locale=='it'?my_role.goal:my_role.goal_eng)" @pointerleave.native="desc=''"/> + @pointerenter.native="desc=($i18n.locale=='it'?character.desc:character.desc_eng)" @pointerleave.native="desc=''"/> โค๏ธ ๐Ÿ’€
@@ -25,7 +25,7 @@ + @pointerenter.native="hint=($i18n.locale=='it'?card.desc:card.desc_eng)" @pointerleave.native="hint=''"/> @@ -36,7 +36,7 @@ - +