Skip to main content

Module data

Module data 

Source
Expand description

The game data.

Holds the outside game data — cards, decks, limit lists, replays — and the complicated structs used inside messages: queries and responses.

Structs§

Card
A full card, combining the core data with the localized name and text.
CardPosition
CoreCard
A card’s core data, whose memory layout is identical to ygocore’s CardData.
Deck
Player Deck.
DeckError
A deck error, packing an error type and the offending card code.
DuelOptions
InfoLocation
LFList
Replay
ReplayBody
ReplayData
ReplayDeck
Deck saved in replay.
ReplayHeader
ReplayHeaderFlags
ReplayMode

Enums§

BattleCommand
The battle-phase command a player picks, answered to a SelectBattleCommand message.
DeckErrorType
The kind of deck error.
IdleCommand
The idle-phase command a player picks, answered to a SelectIdleCommand message.
QueryData
ReplayVersion
Response
A player’s response to a select prompt.
UpdateCardInfo

Functions§

check_deck_length
Check the main, extra, and side deck sizes.
check_deck_lflists
Check the card counts against the limit list.
check_illegal_cards
Check that no illegal card (token, or a card in the wrong section) is present.
check_rule
Check that every card is allowed by the rule’s availability.
check_setcode
Check whether a set code matches a value.
load_db
Load cards from a SQLite connection.
load_db_from_bytes
Load cards from an in-memory SQLite database read from raw bytes.
load_db_from_file
Load cards from a SQLite database file.
load_strings_conf
parse_lflist_content
remove_unknown_cards
Remove unknown or token cards, returning an error for the last removed card.
separate_main_and_extra
Move extra-deck cards from main into ex.