Skip to content

Limited Events

Limited Events generate Sealed pools and Draft pods outside a match. Completed events produce deck-source provenance that can be submitted to normal sealed or draft matches.

Create

ts
// A fixed seed makes generated packs reproducible for tests and examples.
const 
draftEventAccess
= await
simulatorClient
.
limitedEvents
.
create
({
kind
: 'draft',
setCode
: 'SOR',
playerCount
: 4,
seed
: 7,
})

Supported event sizes:

  • Sealed: 1-12 players.
  • Draft: 4-12 players.

The response contains eventId, seatIndex, seatToken, and a viewer-private snapshot.

Join

ts
// Joining with event access fills the next open seat in the pod.
const 
draftSeatAccess
= await
simulatorClient
.
limitedEvents
.
join
(
draftEventAccess
)

Joining fills the next open seat. The returned access object includes eventId, seatIndex, seatToken, and a viewer-private snapshot, and it can be passed directly to later Limited Event calls.

Fetch state

ts
// Public fetch: no viewer-private pack, pick, or pool details.
const 
publicLimitedEventSnapshot
= await
simulatorClient
.
limitedEvents
.
get
(
draftEventAccess
.
eventId
)
// Private fetch: seat token unlocks this player's viewer state. const
privateLimitedEventSnapshot
= await
simulatorClient
.
limitedEvents
.
get
(
draftEventAccess
)
console
.
log
(
publicLimitedEventSnapshot
.
status
,
privateLimitedEventSnapshot
.
viewer
)

Without a token, viewer is omitted. With a valid token, the snapshot includes private leader choices, active pack cards, review-visible drafted cards, or a completed deck source.

Draft cardId values are card ids from generated packs. They can be resolved with simulatorClient.cards.get() like any deck card id.

Draft commands

Pick a leader:

ts
// Pick from the private leader choices visible only to this seat.
const 
leaderChoiceCardId
=
draftEventAccess
.
snapshot
.
viewer
!.
leaderChoices
[0]!
await
simulatorClient
.
limitedEvents
.
applyCommand
(
draftEventAccess
, {
type
: 'pickLeader',
cardId
:
leaderChoiceCardId
,
})

Pick from the active pack:

ts
// Refresh before picking so the active pack matches the server state.
const 
activePackSnapshot
= await
simulatorClient
.
limitedEvents
.
get
(
draftSeatAccess
)
const
selectedDraftCardId
=
activePackSnapshot
.
viewer
!.
activePack
[0]!.
cardId
await
simulatorClient
.
limitedEvents
.
applyCommand
(
draftSeatAccess
, {
type
: 'pickCard',
cardId
:
selectedDraftCardId
,
})

Ready after a review gate:

ts
await 
simulatorClient
.
limitedEvents
.
applyCommand
(
draftSeatAccess
, {
type
: 'readyForNextDraft' })

Build a match deck from a completed event

ts
const 
completedDraftSnapshot
= await
simulatorClient
.
limitedEvents
.
get
(
draftSeatAccess
)
// Deck source proves that match cards came from the generated draft pool. const
draftDeckSource
=
completedDraftSnapshot
.
viewer
!.
deckSource
!
const
draftMatchAccess
= await
simulatorClient
.
matches
.
create
({
format
: 'draft',
hostDeck
: {
leader
:
draftDeckSource
.
leaders
[0]!,
base
:
draftDeckSource
.
commonBases
[0]!,
cards
:
draftDeckSource
.
pool
.
slice
(0, 30),
},
formatSetup
: {
type
: 'draft',
// Provenance lets match deck validation check the completed draft pool.
seatCount
:
completedDraftSnapshot
.
playerCount
,
packs
:
draftDeckSource
.
packs
,
pool
:
draftDeckSource
.
pool
,
commonBases
:
draftDeckSource
.
commonBases
,
}, })
console
.
log
(
draftMatchAccess
.
matchId
)

Deck validation uses the submitted provenance to confirm that leaders and deck cards came from the generated pool.

Released under the MIT License.