fix birra e rissa
This commit is contained in:
parent
0c39a20b77
commit
5f91829907
@ -183,7 +183,7 @@ class Birra(Card):
|
||||
self.desc = "Gioca questa carta per recuperare un punto vita. Non puoi andare oltre al limite massimo del tuo personaggio. Se stai per perdere l'ultimo punto vita puoi giocare questa carta anche nel turno dell'avversario. La birra non ha più effetto se ci sono solo due giocatori"
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if len(player.game.players) != 2 and player.lives != player.max_lives:
|
||||
if len(player.game.players) != 2:
|
||||
super().play_card(player, against=against)
|
||||
player.lives = min(player.lives+1, player.max_lives)
|
||||
return True
|
||||
@ -203,7 +203,8 @@ class CatBalou(Card):
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None and (len(player.game.get_player_named(against).hand) + len(player.game.get_player_named(against).equipment)) > 0:
|
||||
super().play_card(player, against=against)
|
||||
if self.name != 'Rissa'
|
||||
super().play_card(player, against=against)
|
||||
from bang.players import PendingAction
|
||||
player.pending_action = PendingAction.CHOOSE
|
||||
player.choose_action = 'discard'
|
||||
|
@ -72,6 +72,7 @@ class Rissa(CatBalou):
|
||||
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 and (len(p.hand)+len(p.equipment)) > 0][0])
|
||||
player.sio.emit('chat_message', room=player.game.name, data=f'{player.name} ha giocato {self.name})
|
||||
return True
|
||||
return False
|
||||
|
||||
@ -105,7 +106,7 @@ class Tequila(Card):
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None and _with != None:
|
||||
beneficiario = f'{against}' if against != player.name else 'se stesso'
|
||||
player.sio.emit('chat_message', room=player.game.name, data=f'{player.name} ha giocato {self.name} per {beneficiario}.')
|
||||
player.sio.emit('chat_message', room=player.game.name, data=f'{player.name} ha giocato {self.name} per {beneficiario}')
|
||||
player.game.deck.scrap(_with)
|
||||
player.game.get_player_named(against).lives = min(player.game.get_player_named(against).lives+1, player.game.get_player_named(against).max_lives)
|
||||
player.game.get_player_named(against).notify_self()
|
||||
@ -116,7 +117,7 @@ class Whisky(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Whisky', number)
|
||||
self.icon = '🥃'
|
||||
self.desc = "Gioca questa carta per recuperare fino a 2 punti vita."
|
||||
self.desc = "Gioca questa carta per recuperare fino a 2 punti vita"
|
||||
self.need_with = True
|
||||
self.alt_text = '2🃏'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user