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.
- Card
Position - Core
Card - A card’s core data, whose memory layout is identical to ygocore’s
CardData. - Deck
- Player Deck.
- Deck
Error - A deck error, packing an error type and the offending card code.
- Duel
Options - Info
Location - LFList
- Replay
- Replay
Body - Replay
Data - Replay
Deck - Deck saved in replay.
- Replay
Header - Replay
Header Flags - Replay
Mode
Enums§
- Battle
Command - The battle-phase command a player picks, answered to a
SelectBattleCommandmessage. - Deck
Error Type - The kind of deck error.
- Idle
Command - The idle-phase command a player picks, answered to a
SelectIdleCommandmessage. - Query
Data - Replay
Version - Response
- A player’s response to a select prompt.
- Update
Card Info
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
mainintoex.