add Der Spot Burst Ringer
This commit is contained in:
parent
a4876a3b17
commit
89f5de47c7
@ -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(),
|
||||
|
@ -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'):
|
||||
|
@ -34,6 +34,7 @@
|
||||
<button :class="{'btn': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && is_my_turn && character.name === 'Jacky Murieta' && gold_nuggets >=2" @click="()=>{$socket.emit('special', {})}">{{$t('special_ability')}}</button>
|
||||
<button :class="{'btn': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && is_my_turn && character.name === 'Josh McCloud' && gold_nuggets >=2" @click="()=>{$socket.emit('special', {})}">{{$t('special_ability')}}</button>
|
||||
<button :class="{'btn': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && is_my_turn && character.name === 'Raddie Snake' && special_use_count < 2 && gold_nuggets >=1" @click="()=>{$socket.emit('special', {})}">{{$t('special_ability')}}</button>
|
||||
<button :class="{'btn': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && is_my_turn && character.name === 'Der Spot Burst Ringer' && special_use_count < 1" @click="()=>{$socket.emit('special', {})}">{{$t('special_ability')}}</button>
|
||||
</div>
|
||||
<div v-if="lives > 0 || is_ghost" style="position:relative">
|
||||
<span id="hand_text">{{$t('hand')}}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user