text for card choose
This commit is contained in:
parent
2a7ffcbf43
commit
25bf088c3e
@ -198,6 +198,7 @@ class Game:
|
||||
def emporio(self):
|
||||
self.available_cards = [self.deck.draw(True) for i in range(len([p for p in self.players if p.lives > 0]))]
|
||||
self.players[self.turn].pending_action = pl.PendingAction.CHOOSE
|
||||
self.players[self.turn].choose_text = 'choose_card_to_get'
|
||||
self.players[self.turn].available_cards = self.available_cards
|
||||
self.players[self.turn].notify_self()
|
||||
|
||||
@ -212,6 +213,7 @@ class Game:
|
||||
self.players[self.turn].notify_self()
|
||||
else:
|
||||
nextPlayer.pending_action = pl.PendingAction.CHOOSE
|
||||
self.players[self.turn].choose_text = 'choose_card_to_get'
|
||||
nextPlayer.available_cards = self.available_cards
|
||||
nextPlayer.notify_self()
|
||||
|
||||
|
@ -51,6 +51,7 @@ class Player:
|
||||
self.can_play_vendetta = True
|
||||
self.is_giving_life = False
|
||||
self.is_using_checchino = False
|
||||
self.choose_text = 'choose_card_to_get'
|
||||
self.using_rimbalzo = 0 # 0 no, 1 scegli giocatore, 2 scegli carta
|
||||
self.can_play_ranch = True
|
||||
self.is_playing_ranch = False
|
||||
@ -162,6 +163,7 @@ class Player:
|
||||
'icon': '⚫'
|
||||
}]
|
||||
self.is_drawing = True
|
||||
self.choose_text = 'choose_guess'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
elif self.can_play_ranch and self.pending_action == PendingAction.PLAY and self.game.check_event(ce.Ranch):
|
||||
self.can_play_ranch = False
|
||||
@ -169,6 +171,7 @@ class Player:
|
||||
self.discarded_cards = []
|
||||
self.available_cards.append({'icon': '✅'})
|
||||
self.is_playing_ranch = True
|
||||
self.choose_text = 'choose_ranch'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
elif isinstance(self.character, chars.SuzyLafayette) and len(self.hand) == 0 and ( not self.is_my_turn or self.pending_action == PendingAction.PLAY):
|
||||
self.hand.append(self.game.deck.draw(True))
|
||||
@ -320,6 +323,7 @@ class Player:
|
||||
'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives))
|
||||
} for p in self.game.players if p != self and p.lives < p.max_lives]
|
||||
self.available_cards.append({'icon': '❌'})
|
||||
self.choose_text = 'choose_fratelli_di_sangue'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.is_giving_life = True
|
||||
elif not self.game.check_event(ce.Lazo) and any([isinstance(c, cs.Dinamite) or isinstance(c, cs.Prigione) for c in self.equipment]):
|
||||
@ -342,6 +346,7 @@ class Player:
|
||||
'alt_text': ''.join(['❤️']*p['lives'])+''.join(['💀']*(p['max_lives']-p['lives']))
|
||||
} for p in self.game.get_visible_players(self) if p['dist'] <= self.get_sight()]
|
||||
self.available_cards.append({'icon': '❌'})
|
||||
self.choose_text = 'choose_cecchino'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.notify_self()
|
||||
elif self.is_my_turn and self.pending_action == PendingAction.PLAY and pile == 'event' and self.game.check_event(ce.Rimbalzo) and len([c for c in self.hand if c.name == cs.Bang(0,0).name]) > 0:
|
||||
@ -350,6 +355,7 @@ class Player:
|
||||
'icon': '⭐️' if isinstance(p.role, r.Sheriff) else '🤠'
|
||||
} for p in self.game.players if len(p.equipment) > 0 and p != self]
|
||||
self.available_cards.append({'icon': '❌'})
|
||||
self.choose_text = 'choose_rimbalzo_player'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.using_rimbalzo = 1
|
||||
self.notify_self()
|
||||
@ -362,11 +368,13 @@ class Player:
|
||||
elif isinstance(self.character, chars.KitCarlson):
|
||||
self.is_drawing = True
|
||||
self.available_cards = [self.game.deck.draw() for i in range(3)]
|
||||
self.choose_text = 'choose_card_to_get'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.notify_self()
|
||||
elif isinstance(self.character, chd.PatBrennan) and type(pile) == str and pile != self.name and pile in self.game.players_map and len(self.game.get_player_named(pile).equipment) > 0:
|
||||
self.is_drawing = True
|
||||
self.available_cards = self.game.get_player_named(pile).equipment
|
||||
self.choose_text = 'choose_card_to_get'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.notify_self()
|
||||
else:
|
||||
@ -569,6 +577,7 @@ class Player:
|
||||
if self.using_rimbalzo == 1 and 'name' in self.available_cards[card_index]:
|
||||
self.rimbalzo_p = self.available_cards[card_index]['name']
|
||||
self.available_cards = self.game.get_player_named(self.available_cards[card_index]['name']).equipment
|
||||
self.choose_text = 'choose_rimbalzo_card'
|
||||
self.using_rimbalzo = 2
|
||||
elif self.using_rimbalzo == 2 and 'name' in self.available_cards[card_index].__dict__:
|
||||
card = next(c for c in self.hand if c.name == cs.Bang(0,0).name)
|
||||
|
@ -38,7 +38,7 @@
|
||||
<Chooser v-if="is_my_turn && pending_action == 4" :text="$t('wait')" :cards="[]"/>
|
||||
<Chooser v-if="card_against" :text="$t('card_against')" :cards="visiblePlayers" :select="selectAgainst" :cancel="cancelCardAgainst"/>
|
||||
<Chooser v-if="pending_action == 3" :text="respondText" :cards="respondCards" :select="respond"/>
|
||||
<Chooser v-if="shouldChooseCard" :text="$t('choose_card_to_get')" :cards="available_cards" :select="choose"/>
|
||||
<Chooser v-if="shouldChooseCard" :text="$t(choose_text)" :cards="available_cards" :select="choose"/>
|
||||
<Chooser v-if="lives <= 0 && max_lives > 0" :text="$t('you_died')" :cancelText="$t('spectate')" :cancel="()=>{max_lives = 0}"/>
|
||||
<Chooser v-if="win_status !== undefined" :text="win_status?$t('you_win'):$t('you_lose')" />
|
||||
<Chooser v-if="show_role" :text="$t('you_are')" :cards="[my_role]" :hintText="($i18n.locale=='it'?my_role.goal:my_role.goal_eng)" :select="() => {show_role=false}" :cancel="() => {show_role=false}" :cancelText="$t('ok')" />
|
||||
@ -101,6 +101,7 @@ export default {
|
||||
desc: '',
|
||||
scrapHand: [],
|
||||
sidWantsScrapForHealth: false,
|
||||
choose_text: '',
|
||||
joseScrap: false,
|
||||
holydayScrap: false,
|
||||
special_use_count: 0,
|
||||
@ -128,6 +129,7 @@ export default {
|
||||
this.max_lives = self.max_lives
|
||||
this.has_played_bang = self.has_played_bang
|
||||
this.special_use_count = self.special_use_count
|
||||
this.choose_text = self.choose_text
|
||||
this.is_my_turn = self.is_my_turn
|
||||
if (this.is_my_turn) document.title = this.$t('your_turn')+' | PewPew!'
|
||||
else if (this.pending_action == 3) document.title = this.$t('your_response')+' | PewPew!'
|
||||
|
@ -38,6 +38,12 @@
|
||||
"hand": "HAND",
|
||||
"card_against": "Who will you play your card against?",
|
||||
"choose_card_to_get": "Choose a card",
|
||||
"choose_guess": "Guess the color of the suit",
|
||||
"choose_ranch": "Choose the cards to replace",
|
||||
"choose_fratelli_di_sangue": "Choose who you want to donate one of your lives",
|
||||
"choose_cecchino": "Choose who to shoot",
|
||||
"choose_rimbalzo_player": "Choose the target of the bang",
|
||||
"choose_rimbalzo_card": "Choose the card to discard the bang to",
|
||||
"you_died":"YOU DIED",
|
||||
"spectate":"SPECTATE",
|
||||
"you_win":"YOU WON",
|
||||
|
@ -38,6 +38,12 @@
|
||||
"hand": "MANO",
|
||||
"card_against": "Contro chi vuoi giocare la carta",
|
||||
"choose_card_to_get": "Scegli che carta pescare",
|
||||
"choose_guess": "Indovina il colore del seme",
|
||||
"choose_ranch": "Scegli le carte da sostituire",
|
||||
"choose_fratelli_di_sangue": "Scegli a chi donare una delle tue vite",
|
||||
"choose_cecchino": "Scegli contro chi sparare",
|
||||
"choose_rimbalzo_player": "Scegli contro chi scartare il bang",
|
||||
"choose_rimbalzo_card": "Scegli contro che carta scartare il bang",
|
||||
"you_died": "SEI MORTO",
|
||||
"spectate": "SPETTATORE",
|
||||
"you_win": "HAI VINTO",
|
||||
|
Loading…
Reference in New Issue
Block a user