stuff wip
This commit is contained in:
@@ -18,7 +18,7 @@ const wrapped = ref(false)
|
||||
<input type="checkbox" v-model="wrapped" />
|
||||
<div class="cards_container">
|
||||
|
||||
<CardPreview v-if="!wrapped" :data="props.stack.at(-1) ?? null">
|
||||
<CardPreview v-if="!wrapped && props.stack.length > 0" :data="props.stack.at(-1) ?? null">
|
||||
<slot></slot>
|
||||
</CardPreview>
|
||||
|
||||
@@ -32,3 +32,10 @@ const wrapped = ref(false)
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.cards_container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
+36
-13
@@ -33,17 +33,32 @@ const discard_unwrapped = ref(false)
|
||||
@click="useEffect(goStore.self?.turn.effects_availables.find(e => (e.effect == CardEffects.DISCARD) && e.usable)!, props.player)"
|
||||
:disabled="!goStore.self?.turn.effects_availables.some(e => (e.effect == CardEffects.DISCARD) && e.usable)">
|
||||
make Discard</button>
|
||||
<div id="turn" v-if="props.player.turn">
|
||||
heal_reserve = {{ props.player.turn.heal_reserve }} <br>
|
||||
damage_reserve = {{ props.player.turn.damage_reserve }} <br>
|
||||
gold_reserve = {{ props.player.turn.gold_reserve }} <br>
|
||||
discard_markers = {{ props.player.turn.discard_markers }} <br>
|
||||
effects_availables = <div v-for="e in props.player.turn.effects_availables">
|
||||
<button v-if="e" @click="useEffect(e)">
|
||||
{{ e.effect + ' ' + e.effect_type }}
|
||||
</button>
|
||||
<div id="turn_data" v-if="props.player.turn && isTurn && isSelf">
|
||||
<span id="turn_heal">{{ props.player.turn.heal_reserve }} </span>
|
||||
<span id="turn_damage">{{ props.player.turn.damage_reserve }} </span>
|
||||
<span>{{ props.player.turn.gold_reserve }}</span>
|
||||
<span>discard_markers = {{ props.player.turn.discard_markers }} <br></span>
|
||||
<span>effects_availables = <div v-for="e in props.player.turn.effects_availables">
|
||||
<button v-if="e && ![CardEffects.DAMAGE, CardEffects.GOLD, CardEffects.HEAL].includes(e.effect)"
|
||||
@click="useEffect(e)" :disabled="!e.usable">
|
||||
{{ e.effect + ' ' + e.effect_type }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div></span>
|
||||
</div>
|
||||
|
||||
<div id="turn_data" v-if="props.player.turn">
|
||||
<span id=" turn_heal">heal_reserve = {{ props.player.turn.heal_reserve }} <br></span>
|
||||
<span id="turn_damage">damage_reserve = {{ props.player.turn.damage_reserve }} <br></span>
|
||||
<span>gold_reserve = {{ props.player.turn.gold_reserve }} <br></span>
|
||||
<span>discard_markers = {{ props.player.turn.discard_markers }} <br></span>
|
||||
<span>effects_availables = <div v-for=" e in props.player.turn.effects_availables ">
|
||||
<button v-if="e && ![CardEffects.DAMAGE, CardEffects.GOLD, CardEffects.HEAL].includes(e.effect)"
|
||||
@click="useEffect(e)" :disabled="!e.usable">
|
||||
{{ e.effect + ' ' + e.effect_type }}
|
||||
</button>
|
||||
|
||||
</div></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -54,7 +69,7 @@ const discard_unwrapped = ref(false)
|
||||
<br>
|
||||
hand =
|
||||
<div class="cards_container">
|
||||
<CardPreview :data="c" v-for=" c in props.player.hand " @click="c && playCard(c)">
|
||||
<CardPreview :data="c" v-for=" c in props.player.hand " @click="c && playCard(c)">
|
||||
<button v-if="c && isSelf && isTurn" @click="playCard(c)">PLAY</button>
|
||||
<button v-if="c && isSelf && isTurn && props.player.turn.discard_markers > 0"
|
||||
@click="discard(c)">DISCARD</button>
|
||||
@@ -66,7 +81,7 @@ const discard_unwrapped = ref(false)
|
||||
<br>
|
||||
board =
|
||||
<div class="cards_container">
|
||||
<CardPreview :data="c" v-for=" c in props.player.board " @click="lockCard(c)"
|
||||
<CardPreview :data="c" v-for=" c in props.player.board " @click="lockCard(c)"
|
||||
:locked="c.uuid in props.player.turn.cards_locked">
|
||||
<button v-if="isSelf && isTurn && props.player.turn.discard_markers > 0"
|
||||
@click="discard(c)">DISCARD</button>
|
||||
@@ -111,7 +126,7 @@ const discard_unwrapped = ref(false)
|
||||
@click="useEffect(goStore.self!.turn.effects_availables.find(e => (e.effect == CardEffects.SACRIFICE) && e.usable)!, props.player.discard_pile.at(-1))">SACRIFICE</button>
|
||||
</CardPreview>
|
||||
|
||||
<template v-if="discard_unwrapped" v-for="c in props.player.discard_pile ">
|
||||
<template v-if="discard_unwrapped" v-for=" c in props.player.discard_pile ">
|
||||
<CardPreview :data="c">
|
||||
<!-- <button v-if="isSelf && isTurn" @click="play_from_discard(c)">DRAW</button>
|
||||
<button v-if="isSelf && isTurn" @click="put_on_stack_from_discard(c)">PUT ON STACK</button>
|
||||
@@ -143,4 +158,12 @@ const discard_unwrapped = ref(false)
|
||||
.turn {
|
||||
background: lightgreen;
|
||||
}
|
||||
|
||||
#turn_data {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user