StatictriggerArray of {id, sort, discard} objects
Draw the next available card from the deck.
The read-pick-write core (availableCards filter → sort → pick → mark drawn) is serialized via mutex to prevent the concurrent-draw race: multiple concurrent drawCard() calls on the same deck would otherwise all read the same pre-drawn snapshot, pick the same card, and return it multiple times instead of distributing different cards.
Post-draw logic (sideboard limits, trigger dispatch, hook firing) runs OUTSIDE the lock to avoid deadlock with reentrant drawCard() calls from within card-drawn hook handlers (e.g., disableNextDrawnCard replacement draws).
Optionalactor?: anyActor triggering the draw (resolved from deck if omitted)
OptionalextraActors?: BodyMindSoulActor[]Additional targets for triggers
Optionalsilent?: booleanSkip posting draw message to chat
Optionalspeaker?: ObjectChat message speaker object
OptionalsuppressTriggers?: booleanSkip trigger dispatch and hook firing
OptionaltargetActor?: anyPre-selected target, skips target picker
Return the top N available cards sorted by sort order. Pure read, no mutations.
Number of cards to scry
Array of card data objects
Scan the configured imageSourceFolder and update card face images to match files found there. Matching is case-insensitive by both the raw filename (without extension) and its slug form. A file named "card-back.*" (any image extension) updates the deck's own back image.
StaticdefineStaticmigrateStatictriggerBuild the shared triggers TypedObjectField schema.
Apply scry results: reorder cards and optionally discard them.