add cards of valley of shadows
This commit is contained in:
parent
63515c1d5f
commit
f6e8d193af
@ -445,7 +445,7 @@ class WellsFargo(Card):
|
||||
|
||||
|
||||
def get_starting_deck(expansions:List[str]) -> List[Card]:
|
||||
from bang.expansions import DodgeCity
|
||||
from bang.expansions import DodgeCity, TheValleyOfShadows
|
||||
base_cards = [
|
||||
Barile(Suit.SPADES, 'Q'),
|
||||
Barile(Suit.SPADES, 'K'),
|
||||
@ -530,5 +530,7 @@ def get_starting_deck(expansions:List[str]) -> List[Card]:
|
||||
]
|
||||
if 'dodge_city' in expansions:
|
||||
base_cards.extend(DodgeCity.get_cards())
|
||||
if 'the_valley_of_shadows' in expansions:
|
||||
base_cards.extend(TheValleyOfShadows.get_cards())
|
||||
return base_cards
|
||||
|
||||
|
@ -145,7 +145,7 @@ class WillyTheKid(Character):
|
||||
self.icon = '🎉'
|
||||
|
||||
def all_characters(expansions: List[str]):
|
||||
from bang.expansions import DodgeCity
|
||||
from bang.expansions import DodgeCity, TheValleyOfShadows
|
||||
base_chars = [
|
||||
BartCassidy(),
|
||||
BlackJack(),
|
||||
@ -168,4 +168,6 @@ def all_characters(expansions: List[str]):
|
||||
base_chars.extend(DodgeCity.get_characters())
|
||||
if 'gold_rush' in expansions:
|
||||
base_chars.extend(GoldRush.get_characters())
|
||||
if 'the_valley_of_shadows' in expansions:
|
||||
base_chars.extend(TheValleyOfShadows.get_characters())
|
||||
return base_chars
|
@ -13,3 +13,12 @@ class GoldRush():
|
||||
def get_characters():
|
||||
from bang.expansions.gold_rush import characters
|
||||
return characters.all_characters()
|
||||
|
||||
class TheValleyOfShadows():
|
||||
def get_characters():
|
||||
from bang.expansions.the_valley_of_shadows import characters
|
||||
return characters.all_characters()
|
||||
|
||||
def get_cards():
|
||||
from bang.expansions.the_valley_of_shadows import cards
|
||||
return cards.get_starting_deck()
|
||||
|
114
backend/bang/expansions/the_valley_of_shadows/cards.py
Normal file
114
backend/bang/expansions/the_valley_of_shadows/cards.py
Normal file
@ -0,0 +1,114 @@
|
||||
from bang.cards import *
|
||||
|
||||
class Fantasma(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Fantasma', number, is_equipment=True)
|
||||
self.icon = '👻️' #porta in vita i giocatori morti ma non
|
||||
#TODO
|
||||
|
||||
class Lemat(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Lemat', number, is_equipment=True, is_weapon=True, range=1)
|
||||
self.icon = '🔫' # ogni carta può essere usata come bang
|
||||
#TODO
|
||||
|
||||
class SerpenteASonagli(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'SerpenteASonagli', number, is_equipment=True)
|
||||
self.need_target = True
|
||||
self.icon = '🐍️' # Ogni turno pesca se il seme picche -1hp
|
||||
#TODO
|
||||
|
||||
class Shotgun(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Shotgun', number, is_equipment=True, range=1)
|
||||
self.icon = '🔫' # Ogni volta che colpisci un giocatore deve scartare una carta
|
||||
#TODO
|
||||
|
||||
class Taglia(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Taglia', number, is_equipment=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
|
||||
#TODO
|
||||
|
||||
class UltimoGiro(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Ultimo Giro', number)
|
||||
self.icon = '🥂'
|
||||
# self.desc = 'Recupera 1 vita'
|
||||
# self.desc_eng = 'Regain 1 HP'
|
||||
self.alt_text = "🍺"
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
super().play_card(player, against)
|
||||
player.lives = min(player.lives+1, player.max_lives)
|
||||
player.notify_self()
|
||||
return True
|
||||
|
||||
class Tomahawk(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Tomahawk', number, range=2)
|
||||
self.icon = '🪓️'
|
||||
self.alt_text = "2🔎 💥"
|
||||
# "Spara a un giocatore a distanza 2"
|
||||
self.need_target = True
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None:
|
||||
super().play_card(player, against=against)
|
||||
player.game.attack(player, against)
|
||||
return True
|
||||
return False
|
||||
|
||||
class Sventagliata(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Sventagliata', number)
|
||||
self.icon = '💕️'
|
||||
self.alt_text = "💥💥" # spara al target e anche, a uno a distanza 1 dal target
|
||||
self.need_target = True
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None:
|
||||
#TODO
|
||||
# super().play_card(player, against=against)
|
||||
# player.game.attack(player, against)
|
||||
return True
|
||||
return False
|
||||
|
||||
class Salvo(Card):
|
||||
def __init__(self, suit, number):
|
||||
super().__init__(suit, 'Salvo!', number)
|
||||
self.icon = '😇️'
|
||||
self.alt_text = "👤😇️" # spara al target e anche, a uno a distanza 1 dal target
|
||||
self.need_target = True
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None:
|
||||
#TODO
|
||||
# super().play_card(player, against=against)
|
||||
# player.game.attack(player, against)
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_starting_deck() -> List[Card]:
|
||||
cards = [
|
||||
Fantasma(Suit.SPADES, 9),
|
||||
Fantasma(Suit.SPADES, 10),
|
||||
Lemat(Suit.DIAMONDS, 4),
|
||||
SerpenteASonagli(Suit.HEARTS, 7),
|
||||
Shotgun(Suit.SPADES, 'K'),
|
||||
Taglia(Suit.CLUBS, 9),
|
||||
UltimoGiro(Suit.DIAMONDS, 8),
|
||||
Tomahawk(Suit.DIAMONDS, 'A'),
|
||||
Sventagliata(Suit.SPADES, 2),
|
||||
Salvo(Suit.HEARTS, 5),
|
||||
# Bandidos(Suit.DIAMONDS,'Q'), # gli altri giocatori scelgono se scartare 2 carte o perdere 1 punto vita
|
||||
# Fuga(Suit.HEARTS, 3), # evita l'effetto di carte marroni (tipo panico cat balou) di cui sei bersaglio
|
||||
# Mira(Suit.CLUBS, 6), # gioca questa con una carta bang, per fare -2hp
|
||||
# Poker(Suit.HEARTS, 'J'), # tutti gli altri scartano 1 carta a scelta, se non ci sono assi allora pesca 2 dal mazzo
|
||||
# RitornoDiFiamma(Suit.CLUBS, 'Q'), # un mancato che fa bang
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '👻️'
|
||||
return cards
|
10
backend/bang/expansions/the_valley_of_shadows/characters.py
Normal file
10
backend/bang/expansions/the_valley_of_shadows/characters.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import List
|
||||
from bang.characters import *
|
||||
|
||||
def all_characters() -> List[Character]:
|
||||
cards = [
|
||||
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '👻️'
|
||||
return cards
|
@ -30,7 +30,7 @@ class Game:
|
||||
self.initial_players = 0
|
||||
self.password = ''
|
||||
self.expansions: List[str] = []
|
||||
self.available_expansions = ['dodge_city', 'fistful_of_cards', 'high_noon', 'gold_rush']
|
||||
self.available_expansions = ['dodge_city', 'fistful_of_cards', 'high_noon', 'gold_rush', 'the_valley_of_shadows']
|
||||
self.shutting_down = False
|
||||
self.is_competitive = False
|
||||
self.disconnect_bot = True
|
||||
|
Loading…
Reference in New Issue
Block a user