diff --git a/backend/bang/expansions/the_valley_of_shadows/characters.py b/backend/bang/expansions/the_valley_of_shadows/characters.py index 3355ddf..66b9ec8 100644 --- a/backend/bang/expansions/the_valley_of_shadows/characters.py +++ b/backend/bang/expansions/the_valley_of_shadows/characters.py @@ -1,5 +1,6 @@ from typing import List from bang.characters import Character +import bang.cards as cs class BlackFlower(Character): def __init__(self): @@ -19,6 +20,17 @@ class DerSpotBurstRinger(Character): # Una volta nel tuo turno, puoi usare una carta BANG! come Gatling. self.icon = '🫧' + def special(self, player, data): + if player.special_use_count == 0 and \ + any((c.name == 'Bang!' for c in player.hand)) and super().special(player, data): + player.special_use_count += 1 + #get cards from hand of type Bang and sort them by suit + cards = sorted([c for c in player.hand if c.name == 'Bang!'], key=lambda c: c.suit) + player.hand.remove(cards[0]) + player.game.deck.scrap(cards[0], True, player=player) + player.notify_self() + player.game.attack_others(player, cs.Gatling(0,0).name) + class EvelynShebang(Character): def __init__(self): super().__init__("Evelyn Shebang", max_lives=4) @@ -53,7 +65,7 @@ def all_characters() -> List[Character]: cards = [ # BlackFlower(), ColoradoBill(), - # DerSpotBurstRinger(), + DerSpotBurstRinger(), # EvelynShebang(), # HenryBlock(), # LemonadeJim(), diff --git a/backend/server.py b/backend/server.py index 3f64a58..9d2fad9 100644 --- a/backend/server.py +++ b/backend/server.py @@ -826,7 +826,7 @@ def save_games(): if not os.path.exists("save"): os.mkdir("save") with open('./save/games.pickle', 'wb') as f: - pickle.dump([g for g in games if g.started and not g.is_replay and not g.is_hidden], f) + pickle.dump([g for g in games if g.started and not g.is_replay and not g.is_hidden and len(g.players) > 0], f) if __name__ == '__main__': if os.path.exists('./save/games.pickle'): diff --git a/frontend/src/components/Player.vue b/frontend/src/components/Player.vue index 4c87a00..da2db1b 100644 --- a/frontend/src/components/Player.vue +++ b/frontend/src/components/Player.vue @@ -34,6 +34,7 @@ +
{{$t('hand')}}