diff --git a/backend/bang/players.py b/backend/bang/players.py index dbe378f..1e536e8 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -194,6 +194,9 @@ class Player: if self.attacker: ser['attacker'] = self.attacker.name ser['sight'] = self.get_sight() + ser['can_gold_rush_discard'] = len([p for p in self.game.get_alive_players() if p != self and len([e for e in p.gold_rush_equipment if e.number <= self.gold_nuggets + 1]) > 0]) > 0 + if self.character: + ser['gold_rush_discount'] = 1 if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1 else 0 ser['lives'] = max(ser['lives'], 0) if self.lives <= 0 and self.max_lives > 0 and not self.is_dead: diff --git a/frontend/src/components/Deck.vue b/frontend/src/components/Deck.vue index f653a15..dae3ea4 100644 --- a/frontend/src/components/Deck.vue +++ b/frontend/src/components/Deck.vue @@ -3,9 +3,9 @@
- - - + + +
@@ -33,10 +33,13 @@

{{eventDesc}}

-

🤑️ {{goldRushDesc}} 🤑️

+
+

🤑️ {{$t(`cards.${goldRushDesc.name}.desc`)}} 🤑️

+

🤑️ {{goldRushDesc.number - gold_rush_discount}} 💵️ 🤑️

+
- +

{{desc}}

@@ -73,7 +76,9 @@ export default { goldRushShopOpen: true, goldRushCards: [], gold_nuggets: 0, - goldRushDesc: "", + goldRushDesc: null, + can_gold_rush_discard: false, + gold_rush_discount: 0, }), sockets: { self(self){ @@ -81,6 +86,8 @@ export default { this.isPlaying = self.lives > 0 || self.is_ghost this.pending_action = self.pending_action this.gold_nuggets = self.gold_nuggets + this.can_gold_rush_discard = self.can_gold_rush_discard + this.gold_rush_discount = self.gold_rush_discount }, scrap(card) { this.lastScrap = card @@ -146,7 +153,7 @@ export default { this.desc = this.$t(`cards.${this.lastScrap.name}.desc`) }, setGoldRushDesc(card) { - this.goldRushDesc = this.$t(`cards.${card.name}.desc`) + this.goldRushDesc = card }, }, mounted() {