show who is a bot
This commit is contained in:
parent
7e8d7dfd6a
commit
8261112b52
@ -128,7 +128,7 @@ class Prigione(Card):
|
||||
self.desc = "Equipaggia questa carta a un altro giocatore, tranne lo Sceriffo. Il giocatore scelto all'inizio del suo turno, prima di pescare dovrà estrarre: se esce Cuori scarta questa carta e gioca normalmente il turno, altrimenti scarta questa carta e salta il turno"
|
||||
self.desc_eng = "Equip this card to another player, except the Sheriff. The player chosen at the beginning of his turn, must flip a card before drawing: if it's Hearts, discard this card and play the turn normally, otherwise discard this card and skip the turn"
|
||||
self.need_target = True
|
||||
self.alt_text = "♥️=🆓"
|
||||
self.alt_text = "♥️= 🆓"
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if against != None and not isinstance(player.game.get_player_named(against).role, r.Sheriff):
|
||||
|
@ -43,12 +43,12 @@ class Game:
|
||||
self.sio.emit('room', room=self.name if not sid else sid, data={
|
||||
'name': self.name,
|
||||
'started': self.started,
|
||||
'players': [{'name':p.name, 'ready': p.character != None} for p in self.players],
|
||||
'players': [{'name':p.name, 'ready': p.character != None, 'is_bot': p.is_bot} for p in self.players],
|
||||
'password': self.password,
|
||||
'is_competitive': self.is_competitive,
|
||||
'disconnect_bot': self.disconnect_bot,
|
||||
'expansions': self.expansions,
|
||||
'available_expansions': self.available_expansions
|
||||
'available_expansions': self.available_expansions,
|
||||
})
|
||||
|
||||
def toggle_expansion(self, expansion_name):
|
||||
@ -527,6 +527,7 @@ class Game:
|
||||
'is_sheriff': isinstance(pls[j].role, roles.Sheriff),
|
||||
'cards': len(pls[j].hand)+len(pls[j].equipment),
|
||||
'is_ghost': pls[j].is_ghost,
|
||||
'is_bot': pls[j].is_bot,
|
||||
} for j in range(len(pls)) if i != j]
|
||||
|
||||
def get_alive_players(self):
|
||||
@ -550,5 +551,6 @@ class Game:
|
||||
'real_character': p.real_character.__dict__ if p.real_character else None,
|
||||
'icon': p.role.icon if self.initial_players == 3 and p.role else '🤠',
|
||||
'is_ghost': p.is_ghost,
|
||||
'is_bot': p.is_bot,
|
||||
} for p in self.get_alive_players()]
|
||||
self.sio.emit('players_update', room=self.name, data=data)
|
||||
|
@ -103,7 +103,8 @@ export default {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
top: -10pt;
|
||||
}
|
||||
font-size: 11pt;
|
||||
}
|
||||
.card .emoji {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
|
@ -31,6 +31,9 @@
|
||||
<div class="tiny-equipment">
|
||||
<Card v-for="card in p.equipment" v-bind:key="card.name+card.number" :card="card" @click.native="selectedInfo = p.equipment"/>
|
||||
</div>
|
||||
<div v-if="p.is_bot" style="position:absolute;top:32%;left:50%;right:50%" class="tiny-health">
|
||||
<span :alt="i">🤖</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- :style="p.style"/> -->
|
||||
<!-- </div> -->
|
||||
@ -116,6 +119,7 @@ export default {
|
||||
return {
|
||||
name: x.name,
|
||||
ready: x.ready,
|
||||
is_bot: x.is_bot,
|
||||
ncards: 0,
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user