characters refactor
This commit is contained in:
parent
c76cdc4fb1
commit
cadabeb5f4
@ -1,5 +1,5 @@
|
||||
from __future__ import annotations
|
||||
from abc import ABC, abstractmethod
|
||||
from abc import ABC
|
||||
from bang.expansions import *
|
||||
from typing import List, TYPE_CHECKING
|
||||
from globals import G
|
||||
@ -8,8 +8,19 @@ if TYPE_CHECKING:
|
||||
from bang.players import Player
|
||||
from bang.game import Game
|
||||
|
||||
|
||||
class Character(ABC):
|
||||
def __init__(self, name: str, max_lives: int, sight_mod: int = 0, visibility_mod: int = 0, pick_mod: int = 0, desc: str = ''):
|
||||
"""Base class for all characters"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
max_lives: int,
|
||||
sight_mod: int = 0,
|
||||
visibility_mod: int = 0,
|
||||
pick_mod: int = 0,
|
||||
desc: str = "",
|
||||
):
|
||||
super().__init__()
|
||||
self.name = name
|
||||
self.max_lives = max_lives
|
||||
@ -18,141 +29,200 @@ class Character(ABC):
|
||||
self.is_character = True
|
||||
self.pick_mod = pick_mod
|
||||
self.desc = desc
|
||||
self.icon = '🤷♂️'
|
||||
self.number = ''.join(['❤️']*self.max_lives)
|
||||
self.icon = "🤷♂️"
|
||||
self.number = "".join(["❤️"] * self.max_lives)
|
||||
|
||||
def check(self, game: Game, character: Character):
|
||||
"""Check character type and if Sbornia is active"""
|
||||
import bang.expansions.high_noon.card_events as ceh
|
||||
|
||||
if game.check_event(ceh.Sbornia):
|
||||
return False
|
||||
return isinstance(self, character)
|
||||
|
||||
def special(self, player: Player, data):
|
||||
"""Base for special actions that can be performed by a character"""
|
||||
import bang.expansions.high_noon.card_events as ceh
|
||||
|
||||
if player.game.check_event(ceh.Sbornia):
|
||||
return False
|
||||
G.sio.emit('chat_message', room=player.game.name, data=f'_use_special|{player.name}|{self.name}')
|
||||
G.sio.emit(
|
||||
"chat_message",
|
||||
room=player.game.name,
|
||||
data=f"_use_special|{player.name}|{self.name}",
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
class BartCassidy(Character):
|
||||
"""Ogni volta che viene ferito, pesca una carta
|
||||
|
||||
Each time he is hurt, he draws a card"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Bart Cassidy", max_lives=4)
|
||||
# self.desc = "Ogni volta che viene ferito, pesca una carta"
|
||||
# self.desc_eng = "Each time he is hurt, he draws a card"
|
||||
self.icon = '💔'
|
||||
self.icon = "💔"
|
||||
|
||||
def on_hurt(self, dmg):
|
||||
pass
|
||||
|
||||
class BlackJack(Character):
|
||||
"""All'inizio del suo turno, quando deve pescare, mostra a tutti la seconda carta, se è Cuori o Quadri pesca una terza carta senza farla vedere
|
||||
|
||||
At the beginning of his turn, when he has to draw, he shows everyone the second card, if it is Hearts or Diamonds he draws a third card without showing it
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Black Jack", max_lives=4)
|
||||
# self.desc = "All'inizio del suo turno, quando deve pescare, mostra a tutti la seconda carta, se è Cuori o Quadri pesca una terza carta senza farla vedere"
|
||||
# self.desc_eng = "At the beginning of his turn, when he has to draw, he shows everyone the second card, if it is Hearts or Diamonds he draws a third card without showing it"
|
||||
self.icon = '🎰'
|
||||
self.icon = "🎰"
|
||||
|
||||
|
||||
class CalamityJanet(Character):
|
||||
"""Può usare i Mancato! come Bang! e viceversa
|
||||
|
||||
She can use the Missed! as Bang! and the other way around"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Calamity Janet", max_lives=4)
|
||||
self.icon = '🔀'
|
||||
# self.desc = "Può usare i Mancato! come Bang! e viceversa"
|
||||
# self.desc_eng = "She can use the Missed! as Bang! and the other way around"
|
||||
self.icon = "🔀"
|
||||
|
||||
|
||||
class ElGringo(Character):
|
||||
"""Ogni volta che perde un punto vita pesca una carta dalla mano del giocatore responsabile ma solo se il giocatore in questione ha carte in mano (una carta per ogni punto vita)
|
||||
|
||||
Each time he is hurt, he draws a card from the hand of the attacking player"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("El Gringo", max_lives=3)
|
||||
# self.desc = "Ogni volta che perde un punto vita pesca una carta dalla mano del giocatore responsabile ma solo se il giocatore in questione ha carte in mano (una carta per ogni punto vita)"
|
||||
# self.desc_eng = "Each time he is hurt, he draws a card from the hand of the attacking player"
|
||||
self.icon = '🤕'
|
||||
self.icon = "🤕"
|
||||
# ovviamente la dinamite non è considerata danno inferto da un giocatore
|
||||
|
||||
|
||||
class JesseJones(Character):
|
||||
"""All'inizio del suo turno, quando deve pescare, può prendere la prima carta a caso dalla mano di un giocatore e la seconda dal mazzo
|
||||
|
||||
When he has to draw his cards, he may draw the first card from the hand of another player
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Jesse Jones", max_lives=4)
|
||||
# self.desc = "All'inizio del suo turno, quando deve pescare, può prendere la prima carta a caso dalla mano di un giocatore e la seconda dal mazzo"
|
||||
# self.desc_eng = "When he has to draw his cards, he may draw the first card from the hand of another player"
|
||||
self.icon = '😜'
|
||||
self.icon = "😜"
|
||||
|
||||
|
||||
class Jourdonnais(Character):
|
||||
"""Gioca come se avesse un Barile sempre attivo, nel caso in cui metta in gioco un Barile 'Reale' può estrarre due volte
|
||||
|
||||
He plays as he had a Barrel always active, if he equips another Barrel, he can flip 2 cards
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Jourdonnais", max_lives=4)
|
||||
# self.desc = "Gioca come se avesse un Barile sempre attivo, nel caso in cui metta in gioco un Barile 'Reale' può estrarre due volte"
|
||||
# self.desc_eng = "He plays as he had a Barrel always active, if he equips another Barrel, he can flip 2 cards"
|
||||
self.icon = '🛢'
|
||||
self.icon = "🛢"
|
||||
|
||||
|
||||
class KitCarlson(Character):
|
||||
"""All'inizio del suo turno, quando deve pescare, pesca tre carte, ne sceglie due da tenere in mano e la rimanente la rimette in cima la mazzo
|
||||
|
||||
When he has to draw, he peeks 3 cards and chooses 2, putting the other card on the top of the deck
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Kit Carlson", max_lives=4)
|
||||
# self.desc = "All'inizio del suo turno, quando deve pescare, pesca tre carte, ne sceglie due da tenere in mano e la rimanente la rimette in cima la mazzo"
|
||||
# self.desc_eng = "When he has to draw, he peeks 3 cards and chooses 2, putting the other card on the top of the deck"
|
||||
self.icon = '🤔'
|
||||
self.icon = "🤔"
|
||||
|
||||
|
||||
class LuckyDuke(Character):
|
||||
"""Ogni volta che deve estrarre, prende due carte dal mazzo, sceglie una delle due carte per l'estrazione, infine le scarta entrambe
|
||||
|
||||
Every time he has to flip a card, he can flip 2 times"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Lucky Duke", max_lives=4, pick_mod=1)
|
||||
# self.desc = "Ogni volta che deve estrarre, prende due carte dal mazzo, sceglie una delle due carte per l'estrazione, infine le scarta entrambe"
|
||||
# self.desc_eng = "Every time he has to flip a card, he can flip 2 times"
|
||||
self.icon = '🍀'
|
||||
self.icon = "🍀"
|
||||
|
||||
|
||||
class PaulRegret(Character):
|
||||
"""Gioca come se avesse una Mustang sempre attiva, nel caso in cui metta in gioco una Mustang 'Reale' l'effetto si somma tranquillamente
|
||||
|
||||
The other players see him at distance +1"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Paul Regret", max_lives=3, visibility_mod=1)
|
||||
# self.desc = "Gioca come se avesse una Mustang sempre attiva, nel caso in cui metta in gioco una Mustang 'Reale' l'effetto si somma tranquillamente"
|
||||
# self.desc_eng = "The other players see him at distance +1"
|
||||
self.icon = '🏇'
|
||||
self.icon = "🏇"
|
||||
|
||||
|
||||
class PedroRamirez(Character):
|
||||
"""All'inizio del suo turno, quando deve pescare, può prendere la prima carta dalla cima degli scarti e la seconda dal mazzo
|
||||
|
||||
When he has to draw, he may pick the first card from the discarded cards"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Pedro Ramirez", max_lives=4)
|
||||
# self.desc = "All'inizio del suo turno, quando deve pescare, può prendere la prima carta dalla cima degli scarti e la seconda dal mazzo"
|
||||
# self.desc_eng = "When he has to draw, he may pick the first card from the discarded cards"
|
||||
self.icon = '🚮'
|
||||
self.icon = "🚮"
|
||||
|
||||
|
||||
class RoseDoolan(Character):
|
||||
"""Gioca come se avesse un Mirino sempre attivo, nel caso in cui metta in gioco una Mirino 'Reale' l'effetto si somma tranquillamente
|
||||
|
||||
She sees the other players at distance -1"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Rose Doolan", max_lives=4, sight_mod=1)
|
||||
self.icon = '🕵️♀️'
|
||||
# self.desc = "Gioca come se avesse un Mirino sempre attivo, nel caso in cui metta in gioco una Mirino 'Reale' l'effetto si somma tranquillamente"
|
||||
# self.desc_eng = "She sees the other players at distance -1"
|
||||
self.icon = "🕵️♀️"
|
||||
|
||||
|
||||
class SidKetchum(Character):
|
||||
"""Può scartare due carte per recuperare un punto vita anche più volte di seguito a patto di avere carte da scartare, può farlo anche nel turno dell'avversario se stesse per morire
|
||||
|
||||
He can discard 2 cards to regain 1HP"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Sid Ketchum", max_lives=4)
|
||||
# self.desc = "Può scartare due carte per recuperare un punto vita anche più volte di seguito a patto di avere carte da scartare, può farlo anche nel turno dell'avversario se stesse per morire"
|
||||
# self.desc_eng = "He can discard 2 cards to regain 1HP"
|
||||
self.icon = '🤤'
|
||||
self.icon = "🤤"
|
||||
|
||||
|
||||
class SlabTheKiller(Character):
|
||||
"""Per evitare i suoi Bang servono due Mancato, un eventuale barile vale solo come un Mancato
|
||||
|
||||
To dodge his Bang! cards other players need 2 Missed!"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Slab The Killer", max_lives=4)
|
||||
# self.desc = "Per evitare i suoi Bang servono due Mancato, un eventuale barile vale solo come un Mancato"
|
||||
# self.desc_eng = "To dodge his Bang! cards other players need 2 Missed!"
|
||||
self.icon = '🔪'
|
||||
self.icon = "🔪"
|
||||
# vale per tutte le carte bang non solo per la carta che si chiama Bang!
|
||||
|
||||
|
||||
class SuzyLafayette(Character):
|
||||
"""Appena rimane senza carte in mano pesca immediatamente una carta dal mazzo
|
||||
|
||||
Whenever she has an empty hand, she draws a card"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Suzy Lafayette", max_lives=4)
|
||||
# self.desc = "Appena rimane senza carte in mano pesca immediatamente una carta dal mazzo"
|
||||
# self.desc_eng = "Whenever she has an empty hand, she draws a card"
|
||||
self.icon = '🔂'
|
||||
self.icon = "🔂"
|
||||
|
||||
|
||||
class VultureSam(Character):
|
||||
"""Quando un personaggio viene eliminato prendi tutte le carte di quel giocatore e aggiungile alla tua mano, sia le carte in mano che quelle in gioco
|
||||
|
||||
When a player dies, he gets all the cards in the dead's hand and equipments"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Vulture Sam", max_lives=4)
|
||||
# self.desc = "Quando un personaggio viene eliminato prendi tutte le carte di quel giocatore e aggiungile alla tua mano, sia le carte in mano che quelle in gioco"
|
||||
# self.desc_eng = "When a player dies, he gets all the cards in the dead's hand and equipments"
|
||||
self.icon = '🦉'
|
||||
self.icon = "🦉"
|
||||
|
||||
|
||||
class WillyTheKid(Character):
|
||||
"""Questo personaggio può giocare quanti bang vuole nel suo turno
|
||||
|
||||
He doesn't have limits to the amounts of bang he can use"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Willy The Kid", max_lives=4)
|
||||
# self.desc = "Questo personaggio può giocare quanti bang vuole nel suo turno"
|
||||
# self.desc_eng = "He doesn't have limits to the amounts of bang he can use"
|
||||
self.icon = '🎉'
|
||||
self.icon = "🎉"
|
||||
|
||||
|
||||
def all_characters(expansions: List[str]):
|
||||
from bang.expansions import DodgeCity, TheValleyOfShadows
|
||||
from bang.expansions import DodgeCity, TheValleyOfShadows, WildWestShow, GoldRush
|
||||
|
||||
base_chars = [
|
||||
BartCassidy(),
|
||||
BlackJack(),
|
||||
@ -171,12 +241,12 @@ def all_characters(expansions: List[str]):
|
||||
VultureSam(),
|
||||
WillyTheKid(),
|
||||
]
|
||||
if 'dodge_city' in expansions:
|
||||
if "dodge_city" in expansions:
|
||||
base_chars.extend(DodgeCity.get_characters())
|
||||
if 'gold_rush' in expansions:
|
||||
if "gold_rush" in expansions:
|
||||
base_chars.extend(GoldRush.get_characters())
|
||||
if 'the_valley_of_shadows' in expansions:
|
||||
if "the_valley_of_shadows" in expansions:
|
||||
base_chars.extend(TheValleyOfShadows.get_characters())
|
||||
if 'wild_west_show' in expansions:
|
||||
if "wild_west_show" in expansions:
|
||||
base_chars.extend(WildWestShow.get_characters())
|
||||
return base_chars
|
@ -1,89 +1,127 @@
|
||||
from typing import List
|
||||
from bang.characters import *
|
||||
from bang.characters import Character
|
||||
|
||||
|
||||
class PixiePete(Character):
|
||||
"""All'inizio del turno pesca 3 carte invece che 2
|
||||
|
||||
He draws 3 cards instead of 2"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Pixie Pete", max_lives=3)
|
||||
# self.desc = "All'inizio del turno pesca 3 carte invece che 2"
|
||||
# self.desc_eng = "He draws 3 cards instead of 2"
|
||||
self.icon = '☘️'
|
||||
self.icon = "☘️"
|
||||
|
||||
|
||||
class TequilaJoe(Character):
|
||||
"""Se gioca la carta Birra recupera 2 vite invece che una sola
|
||||
|
||||
When he plays Beer, he regains 2 Health Points"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Tequila Joe", max_lives=4)
|
||||
# self.desc = "Se gioca la carta Birra recupera 2 vite invece che una sola"
|
||||
# self.desc_eng = "When he plays Beer, he regains 2 Health Points"
|
||||
self.icon = '🍻'
|
||||
self.icon = "🍻"
|
||||
|
||||
|
||||
class GregDigger(Character):
|
||||
"""Quando un giocatore muore, recupera fino a 2 vite
|
||||
|
||||
Whenever a player dies, he regains up to 2 lives"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Greg Digger", max_lives=4)
|
||||
# self.desc = "Quando un giocatore muore, recupera fino a 2 vite"
|
||||
# self.desc_eng = "Whenever a player dies, he regains up to 2 lives"
|
||||
self.icon = '🦴'
|
||||
self.icon = "🦴"
|
||||
|
||||
|
||||
class HerbHunter(Character):
|
||||
"""Quando un giocatore muore, pesca 2 carte
|
||||
|
||||
Whenever a player dies, he draws 2 cards"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Herb Hunter", max_lives=4)
|
||||
# self.desc = "Quando un giocatore muore, pesca 2 carte"
|
||||
# self.desc_eng = "Whenever a player dies, he draws 2 cards"
|
||||
self.icon = '⚰️'
|
||||
self.icon = "⚰️"
|
||||
|
||||
|
||||
class ElenaFuente(Character):
|
||||
"""Può usare una carta qualsiasi nella sua mano come mancato
|
||||
|
||||
She can use any card of her hand as missed"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Elena Fuente", max_lives=3)
|
||||
# self.desc = "Può usare una carta qualsiasi nella sua mano come mancato"
|
||||
# self.desc_eng = "She can use any card of her hand as missed"
|
||||
self.icon = '🧘♀️'
|
||||
self.icon = "🧘♀️"
|
||||
|
||||
|
||||
class BillNoface(Character):
|
||||
"""All'inizio del turno pesca 1 carta + 1 carta per ogni ferita che ha
|
||||
|
||||
Draw 1 card + 1 card for each wound he has"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Bill Noface", max_lives=4)
|
||||
# self.desc = "All'inizio del turno pesca 1 carta + 1 carta per ogni ferita che ha"
|
||||
# self.desc_eng = "Draw 1 card + 1 card for each wound he has"
|
||||
self.icon = '🙈'
|
||||
self.icon = "🙈"
|
||||
|
||||
|
||||
class MollyStark(Character):
|
||||
"""Quando usa volontariamente una carta che ha in mano, fuori dal suo turno, ne ottiene un'altra dal mazzo
|
||||
|
||||
When she uses a card from her hand outside her turn, she draws a card."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Molly Stark", max_lives=4)
|
||||
# self.desc = "Quando usa volontariamente una carta che ha in mano, fuori dal suo turno, ne ottiene un'altra dal mazzo"
|
||||
# self.desc_eng = "When she uses a card from her hand outside her turn, she draws a card."
|
||||
self.icon = '🙅♀️'
|
||||
self.icon = "🙅♀️"
|
||||
|
||||
|
||||
class ApacheKid(Character):
|
||||
"""Le carte di quadri ♦️ giocate contro di lui non hanno effetto (non vale durante i duelli)
|
||||
|
||||
Cards of diamonds ♦️ played against him, do no have effect (doesn't work in duels).
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Apache Kid", max_lives=3)
|
||||
# self.desc = "Le carte di quadri ♦️ giocate contro di lui non hanno effetto (non vale durante i duelli)"
|
||||
# self.desc_eng = "Cards of diamonds ♦️ played against him, do no have effect (doesn't work in duels)."
|
||||
self.icon = '♦️'
|
||||
self.icon = "♦️"
|
||||
|
||||
|
||||
class SeanMallory(Character):
|
||||
"""Quando finisce il suo turno può tenere fino a 10 carte in mano
|
||||
|
||||
He can keep up to 10 cards in his hand when ending the turn."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Sean Mallory", max_lives=3)
|
||||
# self.desc = "Quando finisce il suo turno può tenere fino a 10 carte in mano"
|
||||
# self.desc_eng = "He can keep up to 10 cards in his hand when ending the turn."
|
||||
self.icon = '🍟'
|
||||
self.icon = "🍟"
|
||||
|
||||
|
||||
class BelleStar(Character):
|
||||
"""Nel suo turno le carte verdi degli altri giocatori non hanno effetto.
|
||||
|
||||
During her turn the green cards of the other players do not work."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Belle Star", max_lives=4)
|
||||
# self.desc = "Nel suo turno le carte verdi degli altri giocatori non hanno effetto."
|
||||
# self.desc_eng = "During her turn the green cards of the other players do not work."
|
||||
self.icon = '❎'
|
||||
self.icon = "❎"
|
||||
|
||||
|
||||
class VeraCuster(Character):
|
||||
"""Prima di pescare le sue carte può scegliere l'abilità speciale di un altro giocatore fino al prossimo turno.
|
||||
|
||||
Before drawing, she may choose the special ability on another alive player. This ability is used until next turn.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Vera Custer", max_lives=3)
|
||||
# self.desc = "Prima di pescare le sue carte può scegliere l'abilità speciale di un altro giocatore fino al prossimo turno."
|
||||
# self.desc_eng = "Before drawing, she may choose the special ability on another alive player. This ability is used until next turn."
|
||||
self.icon = '🎭'
|
||||
self.icon = "🎭"
|
||||
|
||||
|
||||
class ChuckWengam(Character):
|
||||
"""Durante il suo turno può perdere una vita per pescare 2 carte dal mazzo.
|
||||
|
||||
On his turn he may decide to lose 1 HP to draw 2 cards from the deck."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Chuck Wengam", max_lives=4)
|
||||
# self.desc = "Durante il suo turno può perdere una vita per pescare 2 carte dal mazzo."
|
||||
# self.desc_eng = "On his turn he may decide to lose 1 HP to draw 2 cards from the deck."
|
||||
self.icon = '💰'
|
||||
self.icon = "💰"
|
||||
|
||||
def special(self, player, data):
|
||||
if super().special(player, data):
|
||||
@ -95,40 +133,54 @@ class ChuckWengam(Character):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class PatBrennan(Character):
|
||||
"""Invece di pescare può prendere una carta dall'equipaggiamento di un altro giocatore.
|
||||
|
||||
Instead of drawing he can steal a card from the equipment of another player."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Pat Brennan", max_lives=4)
|
||||
# self.desc = "Invece di pescare può prendere una carta dall'equipaggiamento di un altro giocatore."
|
||||
# self.desc_eng = "Instead of drawing he can steal a card from the equipment of another player."
|
||||
self.icon = '🤗'
|
||||
self.icon = "🤗"
|
||||
|
||||
|
||||
class JoseDelgado(Character):
|
||||
"""Può scartare una carta blu per pescare 2 carte.
|
||||
|
||||
He can discard a blue card to draw 2 cards."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("José Delgado", max_lives=4)
|
||||
# self.desc = "Può scartare una carta blu per pescare 2 carte."
|
||||
# self.desc_eng = "He can discard a blue card to draw 2 cards."
|
||||
self.icon = '🎒'
|
||||
self.icon = "🎒"
|
||||
|
||||
|
||||
class DocHolyday(Character):
|
||||
"""Nel suo turno può scartare 2 carte per fare un bang.
|
||||
|
||||
He can discard 2 cards to play a bang."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("Doc Holyday", max_lives=4)
|
||||
# self.desc = "Nel suo turno può scartare 2 carte per fare un bang."
|
||||
# self.desc_eng = "He can discard 2 cards to play a bang."
|
||||
self.icon = '✌🏻'
|
||||
self.icon = "✌🏻"
|
||||
|
||||
def special(self, player, data):
|
||||
if super().special(player, data):
|
||||
from bang.players import PendingAction
|
||||
if player.special_use_count < 1 and player.pending_action == PendingAction.PLAY:
|
||||
|
||||
if (
|
||||
player.special_use_count < 1
|
||||
and player.pending_action == PendingAction.PLAY
|
||||
):
|
||||
player.special_use_count += 1
|
||||
cards = sorted(data['cards'], reverse=True)
|
||||
cards = sorted(data["cards"], reverse=True)
|
||||
for c in cards:
|
||||
player.game.deck.scrap(player.hand.pop(c), True)
|
||||
player.notify_self()
|
||||
player.game.attack(player, data['against'])
|
||||
player.game.attack(player, data["against"])
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# pylint: disable=function-redefined
|
||||
def all_characters() -> List[Character]:
|
||||
cards = [
|
||||
@ -148,11 +200,12 @@ def all_characters() -> List[Character]:
|
||||
JoseDelgado(),
|
||||
DocHolyday(),
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '🐄️'
|
||||
c.expansion = 'dodge_city'
|
||||
for card in cards:
|
||||
card.expansion_icon = "🐄️" # pylint: disable=attribute-defined-outside-init
|
||||
card.expansion = "dodge_city" # pylint: disable=attribute-defined-outside-init
|
||||
return cards
|
||||
|
||||
|
||||
# Apache Kid: il suo effetto non conta nei duelli
|
||||
# belle star: vale solo per le carte blu e verdi
|
||||
# chuck wengam: può usarlo più volte in un turno, ma non può suicidarsi
|
||||
|
Loading…
Reference in New Issue
Block a user