yasuki_core.game_pieces.factory.resolve_decklist#

resolve_decklist(parsed, records, owner, creates_map=None)[source]#

Resolve a parsed decklist into typed card instances owned by owner.

Each entry’s section (not the record’s deck field) decides the card family, so a player’s manual placement is honored; the record’s first type refines the subclass. One instance is built per physical copy, with a card id unique across both seats.

Parameters:
parseddict

A decklist parsed by parse_deck_yaml — the section lists pre_game, dynasty, and fate, each of {name, count, set_name, art} entries.

recordslist of dict

Card records as returned by database.get_cards_by_names, each with a prints list.

ownerPlayerId

The seat the resolved cards belong to.

creates_mapdict mapping str to list of str, optional

Each card id to the token card ids it creates, as returned by database.get_creates_for_cards. Stamped onto the built card’s creates. Default none.

Returns:
resolvedResolvedDeck

The per-section card instances plus any entry names absent from records.