fix belle star and other stuff
This commit is contained in:
parent
14d5e24631
commit
c9e9ec045d
@ -15,7 +15,7 @@ sio = socketio.Server(cors_allowed_origins="*")
|
||||
static_files={
|
||||
'/': {'content_type': 'text/html', 'filename': 'index.html'},
|
||||
'/game': {'content_type': 'text/html', 'filename': 'index.html'},
|
||||
'/robots.txt': {'content_type': 'text/html', 'filename': 'robots.txt'},
|
||||
# '/robots.txt': {'content_type': 'text/html', 'filename': 'robots.txt'},
|
||||
'/favicon.ico': {'filename': 'favicon.ico'},
|
||||
'/img/icons': './img/icons',
|
||||
'/manifest.json': {'filename': 'manifest.json'},
|
||||
@ -167,9 +167,9 @@ def chat_message(sid, msg):
|
||||
if '/addbot' in msg and not ses.game.started:
|
||||
if len(msg.split()) > 1:
|
||||
for _ in range(int(msg.split()[1])):
|
||||
ses.game.add_player(Player(f'AI_{random.randint(0,100)}', 'bot', sio, bot=True))
|
||||
ses.game.add_player(Player(f'AI_{random.randint(0,1000)}', 'bot', sio, bot=True))
|
||||
else:
|
||||
ses.game.add_player(Player(f'AI_{random.randint(0,100)}', 'bot', sio, bot=True))
|
||||
ses.game.add_player(Player(f'AI_{random.randint(0,1000)}', 'bot', sio, bot=True))
|
||||
elif '/removebot' in msg and not ses.game.started:
|
||||
if any([p.is_bot for p in ses.game.players]):
|
||||
[p for p in ses.game.players if p.is_bot][-1].disconnect()
|
||||
|
@ -66,7 +66,7 @@ class SeanMallory(Character):
|
||||
|
||||
class BelleStar(Character):
|
||||
def __init__(self):
|
||||
super().__init__("Belle Star", max_lives=3)
|
||||
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 = '❎'
|
||||
|
@ -490,7 +490,7 @@ class Game:
|
||||
self.notify_room()
|
||||
|
||||
def check_event(self, ev):
|
||||
if len(self.deck.event_cards) == 0: return False
|
||||
if self.deck == None or len(self.deck.event_cards) == 0: return False
|
||||
return isinstance(self.deck.event_cards[0], ev)
|
||||
|
||||
def get_visible_players(self, player: pl.Player):
|
||||
|
Loading…
Reference in New Issue
Block a user