@@ -5,10 +5,12 @@ export interface Props {
|
||||
card_id: number | undefined
|
||||
locked?: boolean
|
||||
wrapped?: boolean
|
||||
tilted?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
wrapped: () => false,
|
||||
tilted: () => true
|
||||
})
|
||||
|
||||
|
||||
@@ -40,8 +42,8 @@ watch(
|
||||
|
||||
<template>
|
||||
<div :class="`card ${childCount > 0 ? 'active' : ''} ${wrapped ? 'wrapped' : ''} ${props.locked ? 'locked' : ''}`"
|
||||
@contextmenu.prevent="false" @click.left="cardClick" :style="`rotate:${rotation}deg;`" @mouseenter="mouseenter"
|
||||
@mouseleave="mouseleave">
|
||||
@contextmenu.prevent="false" @click.left="cardClick" :style="tilted ? `rotate:${rotation}deg;` : ''"
|
||||
@mouseenter="mouseenter" @mouseleave="mouseleave">
|
||||
<div id="contextMenuButtons" :ref="(el) => { childCount = ((el as Element)?.childElementCount ?? 0) }">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
@@ -9,9 +9,10 @@ const isTurn = computed(() => goStore.self && goStore.current_game?.started && (
|
||||
|
||||
<template>
|
||||
<div id="market">
|
||||
<CardPreview :card_id="undefined"></CardPreview>
|
||||
<CardPreview :tilted="false" :card_id="undefined"></CardPreview>
|
||||
<div class="separator"></div>
|
||||
<CardPreview :card_id="c?.card_id" v-for="c in goStore.current_game?.market" @click="c && buy(c)">
|
||||
<CardPreview :tilted="false" :card_id="c?.card_id" v-for="c in goStore.current_game?.market"
|
||||
@click="c && buy(c)">
|
||||
<template
|
||||
v-if="isTurn && goStore.self?.turn && c && c.cost && (goStore.self?.turn.gold_reserve ?? 0) >= c.cost">
|
||||
<button @click.stop="buy(c)">BUY</button>
|
||||
@@ -29,7 +30,7 @@ const isTurn = computed(() => goStore.self && goStore.current_game?.started && (
|
||||
</template>
|
||||
</CardPreview>
|
||||
<div class="separator"></div>
|
||||
<CardPreview :card_id="goStore.current_game?.gem_stack.at(-1)?.card_id"
|
||||
<CardPreview :tilted="false" :card_id="goStore.current_game?.gem_stack.at(-1)?.card_id"
|
||||
@click="buy(goStore.current_game?.gem_stack.at(-1)!)">
|
||||
<template
|
||||
v-if="isTurn && goStore.self?.turn && goStore.current_game?.gem_stack.length && goStore.current_game?.gem_stack.length > 0 && (goStore.self?.turn.gold_reserve ?? 0) >= (goStore.current_game?.gem_stack.at(-1)?.cost ?? Infinity)">
|
||||
|
||||
@@ -44,7 +44,7 @@ const props = defineProps<Props>()
|
||||
<div class="view">
|
||||
<PlayerSlot :player="player" :hide_stack_and_discard="true" v-if="view == 'main'" />
|
||||
<template v-if="view == 'discard'">
|
||||
<CardPreview v-for=" card in player.discard_pile " :card_id="card.card_id">
|
||||
<CardPreview :tilted="false" v-for=" card in player.discard_pile " :card_id="card.card_id">
|
||||
</CardPreview>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe
|
||||
</div>
|
||||
<div :class="`discard ${discard_unwrapped ? 'unwrapped' : ''}`">
|
||||
<CardsGrouped :stack="props.player.discard_pile" v-if="!props.discard_unwrapped"> </CardsGrouped>
|
||||
<CardPreview v-if="props.discard_unwrapped" :card_id="c.card_id" v-for="c in props.player.discard_pile">
|
||||
<CardPreview :tilted="false" v-if="props.discard_unwrapped" :card_id="c.card_id"
|
||||
v-for="c in props.player.discard_pile">
|
||||
<template v-if="goStore.self?.turn && c && isSelf && isPlayerTurn">
|
||||
|
||||
<button v-if="goStore.self?.turn.find_effect(CardEffects.SACRIFICE)" @click.stop="sacrifice(c)">
|
||||
|
||||
Reference in New Issue
Block a user