fix stuff
This commit is contained in:
parent
7ed10dee67
commit
0c39a20b77
@ -160,7 +160,7 @@ class Bang(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Bang!', number)
|
||||
self.icon = '💥'
|
||||
self.desc = "Spara a un giocatore a distanta raggiungibile. Se non hai armi la distanza di default è 1"
|
||||
self.desc = "Spara a un giocatore a distanza raggiungibile. Se non hai armi la distanza di default è 1"
|
||||
self.need_target = True
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
|
@ -16,7 +16,7 @@ class Pugno(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Pugno!', number, range=1)
|
||||
self.icon = '👊'
|
||||
self.desc = "Spara a un giocatore a distanta 1"
|
||||
self.desc = "Spara a un giocatore a distanza 1"
|
||||
self.need_target = True
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
@ -71,7 +71,7 @@ class Rissa(CatBalou):
|
||||
if _with != None:
|
||||
player.game.deck.scrap(_with)
|
||||
player.event_type = 'rissa'
|
||||
super().play_card(player, against=[p.name for p in player.game.players if p != player][0])
|
||||
super().play_card(player, against=[p.name for p in player.game.players if p != player and (len(p.hand)+len(p.equipment)) > 0][0])
|
||||
return True
|
||||
return False
|
||||
|
||||
|
@ -283,12 +283,13 @@ class Player:
|
||||
self.hand.append(card)
|
||||
else:
|
||||
self.game.deck.scrap(card)
|
||||
if self.event_type != 'rissa' or (self.event_type == 'rissa' and self.target_p == [p.name for p in self.game.players if p != self][-1]):
|
||||
if self.event_type != 'rissa' or (self.event_type == 'rissa' and self.target_p == [p.name for p in self.game.players if p != self and (len(p.hand)+len(p.equipment)) > 0][-1]):
|
||||
self.event_type = ''
|
||||
self.target_p = ''
|
||||
self.choose_action = ''
|
||||
self.pending_action = PendingAction.PLAY
|
||||
else:
|
||||
while len(self.game.players[self.game.players_map[self.target_p]+1].hand) + len(self.game.players[self.game.players_map[self.target_p]+1].equipment) == 0:
|
||||
self.target_p = self.game.players[self.game.players_map[self.target_p]+1].name
|
||||
if self.target_p == self.name:
|
||||
self.target_p = self.game.players[self.game.players_map[self.target_p]+1].name
|
||||
|
Loading…
Reference in New Issue
Block a user