OcgCore interface.
getVersion(): readonly [number, number]
Request the ocgcore version.
createDuel(options: OcgDuelOptions): Promise<OcgDuelHandle | null>
Create a duel instance.
destroyDuel(handle: OcgDuelHandle): void
Deallocates the specified duel.
duelNewCard(handle: OcgDuelHandle,cardInfo: OcgNewCardInfo,): Promise<void>
Add a new card to the duel.
startDuel(handle: OcgDuelHandle): Promise<void>
Triggers the start of the duel.
duelProcess(handle: OcgDuelHandle): Promise<OcgProcessResult>
Performs a process step of the duel.
duelGetMessage(handle: OcgDuelHandle): OcgMessage[]
Get the list of the messages between the last two OcgCore#duelProcess calls.
duelSetResponse(handle: OcgDuelHandle,response: OcgResponse,): void
Sets the response, called after OcgCore#duelProcess returns OcgProcessResult#WAITING.
loadScript(): Promise<boolean>
Make the core load and execute the specified script.
Counts the number of card of the specified player and location.
duelQuery(handle: OcgDuelHandle,query: OcgQuery,): Partial<OcgCardQueryInfo> | null
Queries a specific card pulling only the requested informations (OcgQuery#flags)
duelQueryLocation(handle: OcgDuelHandle,query: OcgQueryLocation,): (Partial<OcgCardQueryInfo> | null)[]
Like OcgCore.duelQuery but for all the cards in the specified location.
duelQueryField(handle: OcgDuelHandle): OcgFieldState
Queries the current field state.