diff --git a/components/DeckPool/PoolFns.ts b/components/DeckPool/PoolFns.ts index 514aae5..9a6f1a7 100644 --- a/components/DeckPool/PoolFns.ts +++ b/components/DeckPool/PoolFns.ts @@ -183,6 +183,7 @@ export const commitCard = (pool: PoolType, cardIndex: number): PoolType => { export const boostCard = (pool: PoolType, cardIndex: number): PoolType => { if (!pool?.hand) return pool; + if (pool.commit.boost) return pool; pool.commit.boost = pool.hand[cardIndex]; pool.hand.splice(cardIndex, 1); return pool; @@ -190,18 +191,18 @@ export const boostCard = (pool: PoolType, cardIndex: number): PoolType => { export const cancelBoost = (pool: PoolType): PoolType => { if (!pool?.commit.boost) return pool; - pool.hand.push(pool.commit.boost); + pool.hand.unshift(pool.commit.boost); pool.commit.boost = null; return pool; }; export const discardCommit = (pool: PoolType): PoolType => { if (!pool.commit.main) return pool; - pool.discard.push(pool.commit.main); + pool.discard.unshift(pool.commit.main); pool.commit.main = null; if (pool.commit.boost) { - pool.discard.push(pool.commit.boost); + pool.discard.unshift(pool.commit.boost); pool.commit.boost = null; }