Pretty luzena, gold rush new turn and verbose rum
This commit is contained in:
parent
62174ee74e
commit
293b458529
@ -84,6 +84,7 @@ class CorsaAllOro(ShopCard):
|
||||
|
||||
def play_card(self, player, against=None, _with=None):
|
||||
player.lives = player.max_lives
|
||||
player.play_turn()
|
||||
return True
|
||||
|
||||
class Rum(ShopCard):
|
||||
@ -93,7 +94,12 @@ class Rum(ShopCard):
|
||||
|
||||
def play_card(self, player, against=None, _with=None):
|
||||
# Estrai 4 carte e ottieni 1 hp per ogni seme diverso
|
||||
player.lives = min(player.lives+len({player.game.deck.pick_and_scrap().suit for i in range(4)}), player.max_lives)
|
||||
suits = set()
|
||||
for i in range(4):
|
||||
c = player.game.deck.pick_and_scrap()
|
||||
player.sio.emit('chat_message', room=player.game.name, data=f'_flipped|{player.name}|{c.name}|{c.num_suit()}')
|
||||
suits.add(c.suit)
|
||||
player.lives = min(player.lives+len(suits), player.max_lives)
|
||||
return True
|
||||
|
||||
class UnionPacific(ShopCard):
|
||||
|
@ -1119,8 +1119,13 @@ class Player:
|
||||
def buy_gold_rush_card(self, index):
|
||||
print(f'{self.name} wants to buy gr-card index {index} in room {self.game.name}')
|
||||
card: cs.Card = self.game.deck.shop_cards[index]
|
||||
if self.pending_action == PendingAction.PLAY and self.gold_nuggets >= card.number:
|
||||
self.gold_nuggets -= card.number
|
||||
discount = 0
|
||||
if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1:
|
||||
discount = 1
|
||||
if self.pending_action == PendingAction.PLAY and self.gold_nuggets >= card.number - discount:
|
||||
self.gold_nuggets -= card.number - discount
|
||||
if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1:
|
||||
self.special_use_count += 1
|
||||
if card.play_card(self):
|
||||
self.game.deck.shop_deck.append(card)
|
||||
self.game.deck.shop_cards[index] = None
|
||||
|
Loading…
Reference in New Issue
Block a user