fix breaking bug gold rush

This commit is contained in:
Alberto Xamin 2021-06-20 18:23:06 +02:00
parent 9b057bb468
commit a0e8e28c20
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from bang.cards import *
import bang.roles as r
import bang.players as pl
class ShopCardKind(IntEnum):
@ -158,7 +159,7 @@ class Ricercato(ShopCard):
def play_card(self, player, against=None, _with=None):
player.available_cards = [{
'name': p.name,
'icon': p.role.icon if(player.game.initial_players == 3) else '⭐️' if p['is_sheriff'] else '🤠',
'icon': p.role.icon if(player.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠',
'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)),
'noDesc': True
} for p in player.game.get_alive_players() if p != player]

View File

@ -1100,7 +1100,7 @@ class Player:
def gold_rush_discard(self):
self.available_cards = [{
'name': p.name,
'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if p['is_sheriff'] else '🤠',
'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠',
'alt_text': ''.join(['🎴️'] * len(p.gold_rush_equipment)),
'noDesc': True
} for p in self.game.get_alive_players() if p != self and len(p.gold_rush_equipment) > 0]