fix equipment

equipment could be reused from the equipment slot
This commit is contained in:
Giulio 2022-03-02 16:40:04 +01:00
parent 1c565e2ccc
commit 7d6746c687
2 changed files with 2 additions and 1 deletions

View File

@ -74,6 +74,7 @@ class Card(ABC):
return False
else:
player.equipment.append(self)
self.can_be_used_now = False
if against:
player.sio.emit('chat_message', room=player.game.name,
data=f'_play_card_against|{player.name}|{self.name}|{against}')

View File

@ -20,7 +20,7 @@
<transition-group v-if="lives > 0 || is_ghost" name="list" tag="div" style="margin: 0 0 0 10pt; display:flex;">
<Card v-for="card in equipmentComputed" v-bind:key="card.name+card.number" :card="card"
@pointerenter.native="setDesc(card)" @pointerleave.native="desc=''"
@click.native="play_card(card, true)" :class="{'cant-play':((eventCard && eventCard.name == 'Lazo') || !card.can_be_used_now)}"/>
@click.native="play_card(card, true)" :class="{'cant-play':((eventCard && eventCard.name == 'Lazo') || (!card.can_be_used_now && !card.is_equipment))}"/>
</transition-group>
</div>
<transition name="list">