Loading recipe…
The Lightning Link / Dragon Link value-coin pattern, built on HoldAndWinBuilder. Each coin carries a coefficient (×2 … ×50) and the board does the holding for you — locked coins sit out, only the free cells respin.
The value lives in the coin’s data
A Hold & Win coin is { cell, id, data }. The board never reads data — you put the coefficient there and it carries through the lock untouched:
await board.respin(cells.map((cell) => ({ cell, id: 'coin', data: { value: pickValue() } })));
pickValue() rolls the ladder (×2 common, ×50 rare). The board locks every hit and respins only board.freeCells on the next round — no pins, no per-cell grid to wire up.
Badge from data, total from the ledger
The ×N badge is painted from the coin’s data on coin:locked, and the running total is summed straight from board.lockedCoins:
board.events.on('coin:locked', ({ coin }) => {
badge(coin.cell, coin.data.value); // ×N, painted from data
total.text = `TOTAL: ${board.lockedCoins.reduce((a, c) => a + c.data.value, 0)}`;
});
The badge uses fitText (from the shared kit) so the multiplier spans the coin face and never overflows.
Earlier this recipe hand-rolled 15 individual 1×1
ReelSets and usedreelSet.pin()to hold coins.HoldAndWinBuilderis exactly that pattern packaged — independent per-cell reels + native locking — so the board is the mechanic now; pins aren’t needed for the hold.
Related
- Hold & Win respin. the minimal starter board
- Beginner: carry the value as data. the value-in-data idea on its own
- Collector symbol. a collector that absorbs its neighbours