Add unplayable keyword to playCard

This commit is contained in:
Jared Miller 2026-02-25 09:20:19 -05:00
parent fe95c03529
commit e05663d1c7
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -162,9 +162,8 @@ export function playCard(state, handIndex, opts = {}) {
const player = state.players[playerIndex]; const player = state.players[playerIndex];
const cardId = player.hand[handIndex]; const cardId = player.hand[handIndex];
const card = getCard(cardId); const card = getCard(cardId);
if (player.energy < card.cost) return null;
if (card.keywords?.includes("unplayable")) return null; if (card.keywords?.includes("unplayable")) return null;
if (player.energy < card.cost) return null;
const hand = [...player.hand]; const hand = [...player.hand];
hand.splice(handIndex, 1); hand.splice(handIndex, 1);