local function fuseCards(player, card1, card2)
-- Remove card1 & card2 from inventory
removeCardFromInventory(player, card1)
removeCardFromInventory(player, card2)
-- Decide outcome based on rarity
local outcomeRarity = determineFusionResult(card1.Rarity, card2.Rarity)
local newCard = getRandomCardOfRarity(outcomeRarity)
-- Add new card to player inventory
addCardToInventory(player, newCard)
print(player.Name .. " fused " .. card1.Name .. " + " .. card2.Name .. " → " .. newCard.Name)
end