fix make discard behaviour
This commit is contained in:
+11
-14
@@ -14,18 +14,16 @@ const isTurn = computed(() => goStore.self && goStore.game?.started && (goStore.
|
||||
<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.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">
|
||||
<button @click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT)!, c)"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT)">
|
||||
BUY IN HAND</button>
|
||||
<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">
|
||||
<button @click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT)!, c)"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT)">
|
||||
BUY IN STACK (generic)</button>
|
||||
|
||||
<button
|
||||
@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">
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_ACTION_BOUGHT)!, c)"
|
||||
v-if="c.card_type == CardType.ACTION && goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_ACTION_BOUGHT)">
|
||||
BUY IN STACK (actions)</button>
|
||||
</template>
|
||||
</CardPreview>
|
||||
@@ -37,12 +35,12 @@ const isTurn = computed(() => goStore.self && goStore.game?.started && (goStore.
|
||||
BUY
|
||||
</button>
|
||||
<button
|
||||
@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">
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT)!, goStore.game.gem_stack.at(-1))"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.PLAY_NEXT_CARD_BOUGHT)">
|
||||
BUY IN HAND</button>
|
||||
<button
|
||||
@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">
|
||||
@click.stop="useEffect(goStore.self!.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT)!, goStore.game.gem_stack.at(-1))"
|
||||
v-if="goStore.self?.turn.find_effect(CardEffects.STACK_NEXT_CARD_BOUGHT)">
|
||||
BUY IN STACK(generic)
|
||||
</button>
|
||||
</template>
|
||||
@@ -62,6 +60,5 @@ const isTurn = computed(() => goStore.self && goStore.game?.started && (goStore.
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 50px;
|
||||
}
|
||||
width: 50px;}
|
||||
</style>
|
||||
Reference in New Issue
Block a user