add gary looter

This commit is contained in:
Alberto Xamin 2023-04-09 11:05:33 +01:00
parent a5a6e2d8b9
commit 55c90ddd56
No known key found for this signature in database
GPG Key ID: 5ABFCD8A22EA6F5D
2 changed files with 24 additions and 5 deletions

View File

@ -123,17 +123,22 @@ class YoulGrinner(Character):
def all_characters() -> List[Character]:
"""
Returns a list of all characters in this expansion.
"""
cards = [
BigSpencer(),
FlintWestwood(),
# GaryLooter(),
GaryLooter(),
# GreygoryDeckard(),
JohnPain(),
LeeVanKliff(),
TerenKill(),
YoulGrinner(),
]
for c in cards:
c.expansion_icon = "🎪"
c.expansion = "wild_west_show"
for card in cards:
card.expansion_icon = "🎪" # pylint: disable=attribute-defined-outside-init
card.expansion = ( # pylint: disable=attribute-defined-outside-init
"wild_west_show"
)
return cards

View File

@ -2465,7 +2465,21 @@ class Player:
self.game.deck.draw(True, player=self)
self.game.deck.draw(True, player=self)
self.special_use_count += 1
self.game.deck.scrap(card, player=self)
gary_looter = None
for p in self.game.players:
if p.character.check(self.game, chw.GaryLooter):
gary_looter = p
break
if gary_looter is not None:
G.sio.emit(
"card_drawn",
room=self.game.name,
data={"player": gary_looter.name, "pile": self.name},
)
gary_looter.hand.append(card)
gary_looter.notify_self()
else:
self.game.deck.scrap(card, player=self)
self.notify_self()
def special(self, data):