diff --git a/components/GameBoard.vue b/components/GameBoard.vue index faf3bf8..fa576f5 100644 --- a/components/GameBoard.vue +++ b/components/GameBoard.vue @@ -13,7 +13,7 @@ const discard_unwrapped = ref(false)
- +
diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue index 0420724..e8714fe 100644 --- a/components/PlayerSlot.vue +++ b/components/PlayerSlot.vue @@ -10,7 +10,7 @@ import goStore, { damage_team, } from "~/netcode"; -import type { Card } from "~/netcode/Card"; +import { CardType, type Card } from "~/netcode/Card"; import type { Player } from "~/netcode/Player"; import { CardEffects, type Effect } from "@/netcode/Effect"; @@ -34,6 +34,9 @@ function run_effect( effect_type: CardEffects, target: Player | Card ) { + if (!goStore.self?.turn) { + return + } const effect = goStore.self?.turn.find_effect(effect_type); if (!effect) { return; @@ -47,6 +50,7 @@ const sacrifice = (target: Card) => run_effect(CardEffects.SACRIFICE, target); const stun = (target: Card) => run_effect(CardEffects.STUN, target) const restack_discarded_champion = (target: Card) => run_effect(CardEffects.RESTACK_DISCARDED_CHAMPION, target) const restack_discarded_card = (target: Card) => run_effect(CardEffects.RESTACK_DISCARDED_CARD, target) +const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, target) @@ -63,7 +67,7 @@ const restack_discarded_card = (target: Card) => run_effect(CardEffects.RESTACK_
-