From 7a338fe5fcae26dcdac17777205670f76d4e74d3 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Mon, 15 Jul 2024 18:07:40 +0200 Subject: [PATCH] Fix : sacrifice on Discard --- components/DiscardOverlay.vue | 1 + components/PlayerSlot.vue | 8 ++++---- pages/game/[id].vue | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/DiscardOverlay.vue b/components/DiscardOverlay.vue index d3a4758..986b1bc 100644 --- a/components/DiscardOverlay.vue +++ b/components/DiscardOverlay.vue @@ -35,6 +35,7 @@ const discardTokens = computed(() => CardEffects.RESTACK_DISCARDED_ACTION, CardEffects.RESTACK_DISCARDED_CARD, CardEffects.RESTACK_DISCARDED_CHAMPION, + CardEffects.SACRIFICE, ].includes(t.effect) ) ); diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue index 7a58ed7..55c42a1 100644 --- a/components/PlayerSlot.vue +++ b/components/PlayerSlot.vue @@ -53,10 +53,10 @@ const isSelf = computed( const isSelfTurn = computed(() => isSelf && isPlayerTurn); const cardTokens = computed(() => - props.game.currentTurn.tokens.filter((t) => - [CardEffects.SACRIFICE, CardEffects.PREPARE, CardEffects.STUN].includes( - t.effect - ) + props.game.currentTurn.tokens.filter( + (t) => + [CardEffects.PREPARE, CardEffects.STUN].includes(t.effect) || + (CardEffects.SACRIFICE == t.effect && isSelf) ) ); diff --git a/pages/game/[id].vue b/pages/game/[id].vue index 17d3025..dd86776 100644 --- a/pages/game/[id].vue +++ b/pages/game/[id].vue @@ -32,7 +32,6 @@ if (game.value == null) { throw new Error("game not found"); } -console.log(game); const containers = computed>(() => ({ [game.value!.fireGems._id]: game.value!.fireGems, [game.value!.market._id]: game.value!.market,