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:
- parsed
dict A decklist parsed by
parse_deck_yaml— the section listspre_game,dynasty, andfate, each of{name, count, set_name, art}entries.- records
listofdict Card records as returned by
database.get_cards_by_names, each with aprintslist.- owner
PlayerId The seat the resolved cards belong to.
- creates_map
dictmappingstrtolistofstr, optional Each card id to the token card ids it creates, as returned by
database.get_creates_for_cards. Stamped onto the built card’screates. Default none.
- parsed
- Returns:
- resolved
ResolvedDeck The per-section card instances plus any entry names absent from
records.
- resolved