Add Prepare button

This commit is contained in:
2024-05-02 23:26:42 +02:00
parent 9121f097c4
commit d15058fbad
+9 -3
View File
@@ -82,6 +82,11 @@ const discard_unwrapped = ref(false)
:disabled="!goStore.self || !c || c.uuid in goStore.self?.turn.cards_locked" :disabled="!goStore.self || !c || c.uuid in goStore.self?.turn.cards_locked"
@click="useEffect(goStore.self!.turn.effects_availables.find(e => (e.effect == CardEffects.SACRIFICE) && e.usable)!, c)">SACRIFICE</button> @click="useEffect(goStore.self!.turn.effects_availables.find(e => (e.effect == CardEffects.SACRIFICE) && e.usable)!, c)">SACRIFICE</button>
<button
v-if="isTurn && goStore.self?.turn.effects_availables.some(e => (e.effect == CardEffects.PREPARE) && e.usable) && c.card_type == CardType.CHAMPION"
:disabled="!goStore.self || !c || !(c.uuid in goStore.self?.turn.cards_locked)"
@click="useEffect(goStore.self!.turn.effects_availables.find(e => (e.effect == CardEffects.PREPARE) && e.usable)!, c)">PREPARE</button>
<div>{{ c.health_as_champion }}</div> <div>{{ c.health_as_champion }}</div>
@@ -116,9 +121,6 @@ const discard_unwrapped = ref(false)
</div> </div>
</div> </div>
<div class="separator"></div>
<div class="separator"></div>
<CardSlot :stack="goStore.self?.stack_pile"> <CardSlot :stack="goStore.self?.stack_pile">
<!-- <button v-if="isSelf && isTurn" @click="draw">DRAW</button> --> <!-- <button v-if="isSelf && isTurn" @click="draw">DRAW</button> -->
</CardSlot> </CardSlot>
@@ -190,4 +192,8 @@ const discard_unwrapped = ref(false)
transform: translateY(-40px); transform: translateY(-40px);
} }
.cards_container {
min-width: 250px;
}
</style> </style>