112 lines
2.1 KiB
Vue
112 lines
2.1 KiB
Vue
<script setup lang="ts">
|
|
import goStore, { useEffect, playCard, playAllCards, discard, lockCard, heal, damage_champion, damage_team, endTurn } from '~/netcode';
|
|
import { CardEffects } from '@/netcode/Effect'
|
|
|
|
const isTurn = computed(() => goStore.self?.team == goStore.current_game?.current_turn)
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div class="cards_container" id="self_hand">
|
|
<CardPreview :card_id="c?.card_id" v-for=" c in goStore.self?.hand " @click="c && playCard(c)">
|
|
<button v-if="c && goStore.self?.turn && (goStore.self.turn.fuck_u_markers ?? 0) > 0"
|
|
@click="discard(c)">DISCARD</button>
|
|
</CardPreview>
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
.cards_container {
|
|
display: flex;
|
|
flex-direction: row-reverse;
|
|
justify-content: center;
|
|
}
|
|
|
|
.stack_and_discard {
|
|
display: flex;
|
|
flex-direction: row-reverse;
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
#play_all {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
font-size: 10em;
|
|
}
|
|
|
|
#turn_data {
|
|
position: fixed;
|
|
bottom: 10px;
|
|
left: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
z-index: 9;
|
|
}
|
|
|
|
.warning {
|
|
background-color: rgba(255, 0, 0, 0.7);
|
|
color: white;
|
|
padding: 5px;
|
|
border-radius: 5px;
|
|
width: 60px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
#end_turn {
|
|
z-index: 10;
|
|
}
|
|
|
|
#self_hand {
|
|
position: fixed;
|
|
z-index: 1;
|
|
display: flex;
|
|
align-items: stretch;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
left: 70px;
|
|
bottom: -50px;
|
|
max-width: 100vw;
|
|
justify-content: flex-start;
|
|
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
transform: translateY(150px)
|
|
}
|
|
|
|
#self_hand:hover {
|
|
transform: translateY(0px);
|
|
}
|
|
|
|
#end_turn {
|
|
width: 50px;
|
|
height: 50px;
|
|
}
|
|
</style>
|
|
|
|
<style>
|
|
#self_hand .card {
|
|
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
overflow: visible;
|
|
}
|
|
|
|
#self_hand .card #contextMenuButtons {
|
|
top: 0;
|
|
bottom: unset;
|
|
}
|
|
|
|
#self_hand .card.active:hover #contextMenuButtons {
|
|
transform: translateY(-100%);
|
|
}
|
|
|
|
|
|
#self_hand .card:hover {
|
|
transform: translateY(-40px);
|
|
|
|
}
|
|
|
|
.cards_container {
|
|
min-width: 250px;
|
|
}
|
|
</style> |