pat brennan

This commit is contained in:
Alberto Xamin 2020-12-18 18:36:40 +01:00
parent add2ce9da6
commit 03febf9887
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 21 additions and 0 deletions

View File

@ -85,6 +85,13 @@ class ChuckWengam(Character):
self.desc_eng = "On his turn he may decide to lose 1 HP to draw 2 cards from the deck." self.desc_eng = "On his turn he may decide to lose 1 HP to draw 2 cards from the deck."
self.icon = '💰' self.icon = '💰'
class PatBrennan(Character):
def __init__(self):
super().__init__("Pat Brennan", max_lives=4)
self.desc = "Invece di pescare può prendere una carta dall'equipaggiamento di un altro giocatore."
self.desc_eng = "Instead of drawing he can steal a card from the equipment of another player."
self.icon = '🤗'
def all_characters() -> List[Character]: def all_characters() -> List[Character]:
return [ return [
PixiePete(), PixiePete(),
@ -99,6 +106,7 @@ def all_characters() -> List[Character]:
BelleStar(), BelleStar(),
VeraCuster(), VeraCuster(),
ChuckWengam(), ChuckWengam(),
PatBrennan(),
] ]
#Apache Kid: il suo effetto non conta nei duelli #Apache Kid: il suo effetto non conta nei duelli

View File

@ -310,6 +310,11 @@ class Player:
self.available_cards = [self.game.deck.draw() for i in range(3)] self.available_cards = [self.game.deck.draw() for i in range(3)]
self.pending_action = PendingAction.CHOOSE self.pending_action = PendingAction.CHOOSE
self.notify_self() 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.pending_action = PendingAction.CHOOSE
self.notify_self()
else: else:
self.pending_action = PendingAction.PLAY self.pending_action = PendingAction.PLAY
if pile == 'scrap' and isinstance(self.character, chars.PedroRamirez): if pile == 'scrap' and isinstance(self.character, chars.PedroRamirez):
@ -482,6 +487,14 @@ class Player:
self.is_drawing = False self.is_drawing = False
self.pending_action = PendingAction.PLAY self.pending_action = PendingAction.PLAY
self.notify_self() self.notify_self()
elif self.is_drawing and isinstance(self.character, chd.PatBrennan):
card = self.available_cards.pop(card_index)
if card.usable_next_turn:
card.can_be_used_now = False
self.hand.append(card)
self.available_cards = []
self.pending_action = PendingAction.PLAY
self.notify_self()
else: # emporio else: # emporio
self.game.respond_emporio(self, card_index) self.game.respond_emporio(self, card_index)