FIX : button click activating card
This commit is contained in:
@@ -13,16 +13,18 @@ const isTurn = computed(() => goStore.self && goStore.game?.started && (goStore.
|
||||
<div class="separator"></div>
|
||||
<CardPreview :data="c" v-for="c in goStore.game?.market" @click="c && buy(c)">
|
||||
<template v-if="isTurn && c && c.cost && (goStore.self?.turn.gold_reserve ?? 0) >= c.cost">
|
||||
<button @click="buy(c)">BUY</button>
|
||||
<button @click="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value!, c)"
|
||||
<button @click.stop="buy(c)">BUY</button>
|
||||
<button
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value!, c)"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value">
|
||||
BUY IN HAND</button>
|
||||
<button @click="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value!, c)"
|
||||
<button
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value!, c)"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value">
|
||||
BUY IN STACK (generic)</button>
|
||||
|
||||
<button
|
||||
@click="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_ACTION_BOUGHT).value!, c)"
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_ACTION_BOUGHT).value!, c)"
|
||||
v-if="c.card_type == CardType.ACTION && goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_ACTION_BOUGHT).value">
|
||||
BUY IN STACK (actions)</button>
|
||||
</template>
|
||||
@@ -31,15 +33,15 @@ const isTurn = computed(() => goStore.self && goStore.game?.started && (goStore.
|
||||
<CardPreview :data="goStore.game?.gem_stack.at(-1)" @click="buy(goStore.game?.gem_stack.at(-1)!)">
|
||||
<template
|
||||
v-if="isTurn && goStore.game?.gem_stack.length && goStore.game?.gem_stack.length > 0 && (goStore.self?.turn.gold_reserve ?? 0) >= (goStore.game?.gem_stack.at(-1)?.cost ?? Infinity)">
|
||||
<button @click="buy(goStore.game.gem_stack.at(-1)!)">
|
||||
<button @click.stop="buy(goStore.game.gem_stack.at(-1)!)">
|
||||
BUY
|
||||
</button>
|
||||
<button
|
||||
@click="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value!, goStore.game.gem_stack.at(-1))"
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value!, goStore.game.gem_stack.at(-1))"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT).value">
|
||||
BUY IN HAND</button>
|
||||
<button
|
||||
@click="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value!, goStore.game.gem_stack.at(-1))"
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value!, goStore.game.gem_stack.at(-1))"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT).value">
|
||||
BUY IN STACK(generic)
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user