chore: formatting
This commit is contained in:
@@ -54,7 +54,7 @@ const shuffleAnimationSpeed = computed(
|
||||
() => settingsStore.animationSpeed * 2 + "ms"
|
||||
);
|
||||
|
||||
function populateContainer() {}
|
||||
function populateContainer() { }
|
||||
|
||||
// const rotate = ref(false);
|
||||
// async function shuffleContainer() {
|
||||
@@ -64,7 +64,7 @@ function populateContainer() {}
|
||||
// await delay(settingsStore.animationSpeed * 2);
|
||||
// }
|
||||
|
||||
function getCardsPosition(cards: string) {}
|
||||
function getCardsPosition(cards: string) { }
|
||||
|
||||
const animationCallbacks = ref<Array<() => void>>([]);
|
||||
|
||||
@@ -132,72 +132,46 @@ function discardCardClick(card: Card) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="cards_container"
|
||||
:class="{ wrapped, rotate: container.shuffling }"
|
||||
>
|
||||
<div class="cards_container" :class="{ wrapped, rotate: container.shuffling }">
|
||||
<TransitionGroup name="list">
|
||||
<GameCard
|
||||
@click="$emit('cardClick', c._id)"
|
||||
@effectClick="$emit('effectClick', c._id, $event)"
|
||||
v-for="(c, i) in cards"
|
||||
:cardId="c?.cardId"
|
||||
:uuid="c._id"
|
||||
:wrapped="wrapped"
|
||||
:key="c?._id || i"
|
||||
:locked="
|
||||
locked ||
|
||||
<GameCard @click="$emit('cardClick', c._id)" @effectClick="$emit('effectClick', c._id, $event)"
|
||||
v-for="(c, i) in cards" :cardId="c?.cardId" :uuid="c._id" :wrapped="wrapped" :key="c?._id || i" :locked="locked ||
|
||||
!playingTurn ||
|
||||
playingTurn?.cardsLocked.includes(c._id.toString())
|
||||
"
|
||||
:used_effects_indexes="c?.effects?.reduce( (prev,e, i)=>{
|
||||
if(playingTurn?.lockedEffects.includes(e._id)){
|
||||
prev.push(i)
|
||||
}
|
||||
return prev
|
||||
},[] as number[])"
|
||||
:noEffects="noEffects"
|
||||
:discardable="discardable"
|
||||
>
|
||||
" :used_effects_indexes="c?.effects?.reduce((prev, e, i) => {
|
||||
if (playingTurn?.lockedEffects.includes(e._id)) {
|
||||
prev.push(i)
|
||||
}
|
||||
return prev
|
||||
}, [] as number[])" :noEffects="noEffects" :discardable="discardable">
|
||||
<template v-for="t in tokens">
|
||||
<GameToken
|
||||
:token="t"
|
||||
@useToken="tokenClick(t, c)"
|
||||
v-if="
|
||||
(t.effect == CardEffects.SACRIFICE &&
|
||||
playingTurn &&
|
||||
!playingTurn?.cardsLocked.includes(c._id.toString())) ||
|
||||
(t.effect == CardEffects.PREPARE &&
|
||||
c.cardType == CardType.CHAMPION) ||
|
||||
(t.effect == CardEffects.STACK_NEXT_ACTION_BOUGHT &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.STUN &&
|
||||
c.cardType == CardType.CHAMPION &&
|
||||
championsKillable) ||
|
||||
t.effect == CardEffects.PLAY_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.STACK_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.RESTACK_DISCARDED_CARD ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_ACTION &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_CHAMPION &&
|
||||
c.cardType == CardType.CHAMPION)
|
||||
"
|
||||
></GameToken>
|
||||
<GameToken :token="t" @useToken="tokenClick(t, c)" v-if="
|
||||
(t.effect == CardEffects.SACRIFICE &&
|
||||
playingTurn &&
|
||||
!playingTurn?.cardsLocked.includes(c._id.toString())) ||
|
||||
(t.effect == CardEffects.PREPARE &&
|
||||
c.cardType == CardType.CHAMPION) ||
|
||||
(t.effect == CardEffects.STACK_NEXT_ACTION_BOUGHT &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.STUN &&
|
||||
c.cardType == CardType.CHAMPION &&
|
||||
championsKillable) ||
|
||||
t.effect == CardEffects.PLAY_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.STACK_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.RESTACK_DISCARDED_CARD ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_ACTION &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_CHAMPION &&
|
||||
c.cardType == CardType.CHAMPION)
|
||||
"></GameToken>
|
||||
</template>
|
||||
<button
|
||||
v-if="championsKillable && c.cardType == CardType.CHAMPION"
|
||||
@click.stop="damageChampionClick(c)"
|
||||
@mousedown.left.stop=""
|
||||
>
|
||||
<button v-if="championsKillable && c.cardType == CardType.CHAMPION" @click.stop="damageChampionClick(c)"
|
||||
@mousedown.left.stop="">
|
||||
Damage
|
||||
</button>
|
||||
<button
|
||||
v-if="
|
||||
discardable && !playingTurn?.cardsLocked.includes(c._id.toString())
|
||||
"
|
||||
@mousedown.left.stop=""
|
||||
@click.stop="discardCardClick(c)"
|
||||
>
|
||||
<button v-if="
|
||||
discardable && !playingTurn?.cardsLocked.includes(c._id.toString())
|
||||
" @mousedown.left.stop="" @click.stop="discardCardClick(c)">
|
||||
Discard
|
||||
</button>
|
||||
</GameCard>
|
||||
@@ -255,7 +229,7 @@ function discardCardClick(card: Card) {
|
||||
max-height: 10px;
|
||||
}
|
||||
|
||||
.empty > .card_image {
|
||||
.empty>.card_image {
|
||||
filter: brightness(0.5);
|
||||
max-height: 250px;
|
||||
}
|
||||
@@ -269,6 +243,7 @@ use * use[data-effect-id="0"] {
|
||||
.cards_container .card #background rect:first-child {
|
||||
stroke-width: 0;
|
||||
}
|
||||
|
||||
.cards_container .card.wrapped #background rect:first-child {
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user