@@ -17,8 +17,7 @@ const discard_unwrapped = ref<boolean>(false)
|
|||||||
</PlayerListElement>
|
</PlayerListElement>
|
||||||
</div>
|
</div>
|
||||||
<div id="current_player">
|
<div id="current_player">
|
||||||
<input type="checkbox" v-model="discard_unwrapped">
|
<PlayerSlot v-for="p in current_players" :player="p"></PlayerSlot>
|
||||||
<PlayerSlot v-for="p in current_players" :player="p" :discard_unwrapped="discard_unwrapped"></PlayerSlot>
|
|
||||||
</div>
|
</div>
|
||||||
<SelfView></SelfView>
|
<SelfView></SelfView>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,6 +37,8 @@ const discard_unwrapped = ref<boolean>(false)
|
|||||||
#player_list,
|
#player_list,
|
||||||
#current_player {
|
#current_player {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
isolation: isolate;
|
||||||
}
|
}
|
||||||
|
|
||||||
#market {
|
#market {
|
||||||
|
|||||||
@@ -17,14 +17,13 @@ import { CardEffects, type Effect } from "@/netcode/Effect";
|
|||||||
export interface Props {
|
export interface Props {
|
||||||
player: Player;
|
player: Player;
|
||||||
hide_stack_and_discard?: boolean;
|
hide_stack_and_discard?: boolean;
|
||||||
discard_unwrapped?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
hide_stack_and_discard: () => false,
|
hide_stack_and_discard: () => false,
|
||||||
discard_unwrapped: () => false,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const discard_unwrapped = ref(false)
|
||||||
const isPlayerTurn = computed(() => props.player.team === goStore.current_game?.current_turn);
|
const isPlayerTurn = computed(() => props.player.team === goStore.current_game?.current_turn);
|
||||||
const isSelf = computed(() => props.player.uuid === goStore.self?.uuid);
|
const isSelf = computed(() => props.player.uuid === goStore.self?.uuid);
|
||||||
const isSelfTurn = computed(() => goStore.self?.team === goStore.current_game?.current_turn)
|
const isSelfTurn = computed(() => goStore.self?.team === goStore.current_game?.current_turn)
|
||||||
@@ -64,14 +63,17 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe
|
|||||||
</CardsGrouped>
|
</CardsGrouped>
|
||||||
<span>stack =</span>
|
<span>stack =</span>
|
||||||
</div>
|
</div>
|
||||||
<div :id="`discard_unwrapped_bg`" :class="`${discard_unwrapped ? 'unwrapped' : ''}`"></div>
|
<div :id="`discard_unwrapped_bg`" :class="`${discard_unwrapped ? 'unwrapped' : ''}`"
|
||||||
|
@click="() => discard_unwrapped = false"></div>
|
||||||
<div :class="`discard ${discard_unwrapped ? 'unwrapped' : ''}`">
|
<div :class="`discard ${discard_unwrapped ? 'unwrapped' : ''}`">
|
||||||
<CardsGrouped :stack="props.player.discard_pile" v-if="!props.discard_unwrapped"> </CardsGrouped>
|
<div class="discard_container" @click="() => discard_unwrapped = true">
|
||||||
<CardPreview :tilted="false" v-if="props.discard_unwrapped" :card_id="c.card_id"
|
<CardsGrouped :stack="props.player.discard_pile" v-if="!discard_unwrapped"> </CardsGrouped>
|
||||||
|
<CardPreview :tilted="false" v-if="discard_unwrapped" :card_id="c.card_id"
|
||||||
v-for="c in props.player.discard_pile">
|
v-for="c in props.player.discard_pile">
|
||||||
<template v-if="goStore.self?.turn && c && isSelf && isPlayerTurn">
|
<template v-if="goStore.self?.turn && c && isSelf && isPlayerTurn">
|
||||||
|
|
||||||
<button v-if="goStore.self?.turn.find_effect(CardEffects.SACRIFICE)" @click.stop="sacrifice(c)">
|
<button v-if="goStore.self?.turn.find_effect(CardEffects.SACRIFICE)"
|
||||||
|
@click.stop="sacrifice(c)">
|
||||||
SACRIFICE
|
SACRIFICE
|
||||||
</button>
|
</button>
|
||||||
<button v-if="goStore.self?.turn.find_effect(CardEffects.RESTACK_DISCARDED_CHAMPION)"
|
<button v-if="goStore.self?.turn.find_effect(CardEffects.RESTACK_DISCARDED_CHAMPION)"
|
||||||
@@ -86,6 +88,8 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe
|
|||||||
</template>
|
</template>
|
||||||
</CardPreview>
|
</CardPreview>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div id="player_banner">
|
<div id="player_banner">
|
||||||
<div id="player_info">
|
<div id="player_info">
|
||||||
@@ -192,13 +196,21 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe
|
|||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
grid-area: discard;
|
grid-area: discard;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discard.unwrapped {
|
.discard.unwrapped {
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
cursor: default;
|
||||||
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discard_container {
|
||||||
|
display: flex;
|
||||||
|
/* background: blue; */
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
#discard_unwrapped_bg {
|
#discard_unwrapped_bg {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -216,8 +228,6 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe
|
|||||||
}
|
}
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
position: relative;
|
|
||||||
isolation: isolate;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content 1fr;
|
grid-template-columns: min-content 1fr;
|
||||||
grid-template-rows: min-content min-content 1fr;
|
grid-template-rows: min-content min-content 1fr;
|
||||||
|
|||||||
Reference in New Issue
Block a user