Fusion is the mechanic that allows you to combine two cards of the same type and level to create a single, more powerful card of the next level. This is essential for building board advantage and creating cards strong enough to overcome type disadvantages in combat.
Combine a card from your hand with a card on your field:
/** * Fuses a card from hand with a card on the field. * @param {string} instanceId - The instanceId of the card in hand. * @param {number} targetIndex - The field index of the target card. * @returns {object|null} The new fused card data or null. */fuseFromHand(instanceId, targetIndex) { const cardFromHandIndex = this.hand.findIndex(c => c.instanceId === instanceId); const cardOnField = this.field[targetIndex]; if (cardFromHandIndex === -1 || !cardOnField) return null; const cardFromHand = this.hand[cardFromHandIndex]; // Validate compatibility if (cardFromHand.type !== cardOnField.type || cardFromHand.level !== cardOnField.level) { return null; } // Remove card from hand this.hand.splice(cardFromHandIndex, 1); // Find the fusion result const newLevel = cardOnField.level + 1; const newCardId = `${cardOnField.type}-${newLevel}`; const newCardData = CardDefinitions[newCardId]; // Original field card goes to graveyard this.addCardDataToGraveyard(cardOnField); const newCardInstance = { ...newCardData, instanceId: Phaser.Math.RND.uuid() }; // Replace field card with fused result this.field[targetIndex] = newCardInstance; return newCardInstance;}
How it works:
Drag a card from your hand onto a compatible field card
The new fused card replaces the field card
Both original cards are consumed
The field card goes to graveyard before being replaced
In hand-to-field fusion, the original field card is sent to the graveyard and decomposed into base Level 1 cards before the fusion completes.
// From Frontend/src/helpers/constants.jsexport const GAME_CONFIG = { MAX_HAND_SIZE: 4, // Maximum cards in hand MAX_FIELD_SIZE: 6, // Maximum cards on field INITIAL_DECK_SIZE: 48, // Starting deck size};
Hand limit: 4 cards maximum encourages fusion to make room
Field limit: 6 slots creates strategic positioning decisions
Large deck: 48 cards ensures plenty of fusion opportunities