add taglia
This commit is contained in:
parent
4958a2c7dc
commit
1ea91af237
@ -62,7 +62,18 @@ class Taglia(Card):
|
|||||||
super().__init__(suit, 'Taglia', number, is_equipment=True)
|
super().__init__(suit, 'Taglia', number, is_equipment=True)
|
||||||
self.need_target = True
|
self.need_target = True
|
||||||
self.icon = '💰' # chiunque colpisca il giocatore con la taglia pesca una carta dal mazzo, si toglie solo con panico, cat balou, dalton
|
self.icon = '💰' # chiunque colpisca il giocatore con la taglia pesca una carta dal mazzo, si toglie solo con panico, cat balou, dalton
|
||||||
#TODO
|
|
||||||
|
def play_card(self, player, against, _with=None):
|
||||||
|
if (player.game.check_event(ce.IlGiudice)):
|
||||||
|
return False
|
||||||
|
if against != None:
|
||||||
|
self.reset_card()
|
||||||
|
player.sio.emit('chat_message', room=player.game.name,
|
||||||
|
data=f'_play_card_against|{player.name}|{self.name}|{against}')
|
||||||
|
player.game.get_player_named(against).equipment.append(self)
|
||||||
|
player.game.get_player_named(against).notify_self()
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
class UltimoGiro(Card):
|
class UltimoGiro(Card):
|
||||||
def __init__(self, suit, number):
|
def __init__(self, suit, number):
|
||||||
@ -196,7 +207,7 @@ def get_starting_deck() -> List[Card]:
|
|||||||
# Lemat(Suit.DIAMONDS, 4),
|
# Lemat(Suit.DIAMONDS, 4),
|
||||||
SerpenteASonagli(Suit.HEARTS, 7),
|
SerpenteASonagli(Suit.HEARTS, 7),
|
||||||
Shotgun(Suit.SPADES, 'K'),
|
Shotgun(Suit.SPADES, 'K'),
|
||||||
# Taglia(Suit.CLUBS, 9),
|
Taglia(Suit.CLUBS, 9),
|
||||||
UltimoGiro(Suit.DIAMONDS, 8),
|
UltimoGiro(Suit.DIAMONDS, 8),
|
||||||
Tomahawk(Suit.DIAMONDS, 'A'),
|
Tomahawk(Suit.DIAMONDS, 'A'),
|
||||||
# Sventagliata(Suit.SPADES, 2),
|
# Sventagliata(Suit.SPADES, 2),
|
||||||
|
@ -1152,6 +1152,11 @@ class Player:
|
|||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'_special_el_gringo|{self.name}|{self.attacker.name}')
|
data=f'_special_el_gringo|{self.name}|{self.attacker.name}')
|
||||||
self.attacker.notify_self()
|
self.attacker.notify_self()
|
||||||
|
if self.attacker and any((isinstance(c, tvosc.Taglia) for c in self.equipment)):
|
||||||
|
self.attacker.hand.append(self.game.deck.draw(True))
|
||||||
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
|
data=f'_taglia_reward|{self.name}|{self.attacker.name}')
|
||||||
|
self.attacker.notify_self()
|
||||||
if self.attacker and len(self.hand) > 0 and any((isinstance(c, tvosc.Shotgun) for c in self.attacker.equipment)):
|
if self.attacker and len(self.hand) > 0 and any((isinstance(c, tvosc.Shotgun) for c in self.attacker.equipment)):
|
||||||
c = self.hand.pop(randrange(0, len(self.hand)))
|
c = self.hand.pop(randrange(0, len(self.hand)))
|
||||||
self.game.deck.scrap(c, True)
|
self.game.deck.scrap(c, True)
|
||||||
|
@ -133,7 +133,8 @@
|
|||||||
"use_special": "{0} used the special ability of their character ({1})",
|
"use_special": "{0} used the special ability of their character ({1})",
|
||||||
"gold_rush_pay_discard": "{0} discarded {2} from {1}.",
|
"gold_rush_pay_discard": "{0} discarded {2} from {1}.",
|
||||||
"choose_emporio": "{0} has chosen {1} from General Store.",
|
"choose_emporio": "{0} has chosen {1} from General Store.",
|
||||||
"shotgun_scrap": "When the shotgun hit {0} a card flew away from his hand ({1})"
|
"shotgun_scrap": "When the shotgun hit {0} a card flew away from his hand ({1})",
|
||||||
|
"taglia_reward": "{1} got a card from the bounty on {0}"
|
||||||
},
|
},
|
||||||
"foc": {
|
"foc": {
|
||||||
"leggedelwest": "He must play this card on this turn if possible."
|
"leggedelwest": "He must play this card on this turn if possible."
|
||||||
|
@ -133,7 +133,8 @@
|
|||||||
"use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})",
|
"use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})",
|
||||||
"gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}.",
|
"gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}.",
|
||||||
"choose_emporio": "{0} ha scelto {1} da Emporio.",
|
"choose_emporio": "{0} ha scelto {1} da Emporio.",
|
||||||
"shotgun_scrap": "Quando lo shotgun ha colpito {0} gli ha tolto una carta ({1})"
|
"shotgun_scrap": "Quando lo shotgun ha colpito {0} gli ha tolto una carta ({1})",
|
||||||
|
"taglia_reward": "{1} ha ottenuto ricompensa dalla taglia su {0}"
|
||||||
},
|
},
|
||||||
"foc": {
|
"foc": {
|
||||||
"leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile"
|
"leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile"
|
||||||
|
Loading…
Reference in New Issue
Block a user