Add unplayable keyword to playCard
This commit is contained in:
parent
fe95c03529
commit
e05663d1c7
1 changed files with 1 additions and 2 deletions
|
|
@ -162,9 +162,8 @@ export function playCard(state, handIndex, opts = {}) {
|
|||
const player = state.players[playerIndex];
|
||||
const cardId = player.hand[handIndex];
|
||||
const card = getCard(cardId);
|
||||
if (player.energy < card.cost) return null;
|
||||
|
||||
if (card.keywords?.includes("unplayable")) return null;
|
||||
if (player.energy < card.cost) return null;
|
||||
|
||||
const hand = [...player.hand];
|
||||
hand.splice(handIndex, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue