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 = "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.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.need_target = True
|
||||||
self.alt_text = "♥️=🆓"
|
self.alt_text = "♥️= 🆓"
|
||||||
|
|
||||||
def play_card(self, player, against, _with=None):
|
def play_card(self, player, against, _with=None):
|
||||||
if against != None and not isinstance(player.game.get_player_named(against).role, r.Sheriff):
|
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={
|
self.sio.emit('room', room=self.name if not sid else sid, data={
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
'started': self.started,
|
'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,
|
'password': self.password,
|
||||||
'is_competitive': self.is_competitive,
|
'is_competitive': self.is_competitive,
|
||||||
'disconnect_bot': self.disconnect_bot,
|
'disconnect_bot': self.disconnect_bot,
|
||||||
'expansions': self.expansions,
|
'expansions': self.expansions,
|
||||||
'available_expansions': self.available_expansions
|
'available_expansions': self.available_expansions,
|
||||||
})
|
})
|
||||||
|
|
||||||
def toggle_expansion(self, expansion_name):
|
def toggle_expansion(self, expansion_name):
|
||||||
@ -527,6 +527,7 @@ class Game:
|
|||||||
'is_sheriff': isinstance(pls[j].role, roles.Sheriff),
|
'is_sheriff': isinstance(pls[j].role, roles.Sheriff),
|
||||||
'cards': len(pls[j].hand)+len(pls[j].equipment),
|
'cards': len(pls[j].hand)+len(pls[j].equipment),
|
||||||
'is_ghost': pls[j].is_ghost,
|
'is_ghost': pls[j].is_ghost,
|
||||||
|
'is_bot': pls[j].is_bot,
|
||||||
} for j in range(len(pls)) if i != j]
|
} for j in range(len(pls)) if i != j]
|
||||||
|
|
||||||
def get_alive_players(self):
|
def get_alive_players(self):
|
||||||
@ -550,5 +551,6 @@ class Game:
|
|||||||
'real_character': p.real_character.__dict__ if p.real_character else None,
|
'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 '🤠',
|
'icon': p.role.icon if self.initial_players == 3 and p.role else '🤠',
|
||||||
'is_ghost': p.is_ghost,
|
'is_ghost': p.is_ghost,
|
||||||
|
'is_bot': p.is_bot,
|
||||||
} for p in self.get_alive_players()]
|
} for p in self.get_alive_players()]
|
||||||
self.sio.emit('players_update', room=self.name, data=data)
|
self.sio.emit('players_update', room=self.name, data=data)
|
||||||
|
@ -103,6 +103,7 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
top: -10pt;
|
top: -10pt;
|
||||||
|
font-size: 11pt;
|
||||||
}
|
}
|
||||||
.card .emoji {
|
.card .emoji {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
<div class="tiny-equipment">
|
<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"/>
|
<Card v-for="card in p.equipment" v-bind:key="card.name+card.number" :card="card" @click.native="selectedInfo = p.equipment"/>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<!-- :style="p.style"/> -->
|
<!-- :style="p.style"/> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
@ -116,6 +119,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
name: x.name,
|
name: x.name,
|
||||||
ready: x.ready,
|
ready: x.ready,
|
||||||
|
is_bot: x.is_bot,
|
||||||
ncards: 0,
|
ncards: 0,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user