yasuki_core.accounts.decks.summarize#

summarize(cards, records_by_id)[source]#

Derive the denormalized deck summary from its cards.

The stronghold is the pre-game card typed Stronghold; the deck’s clan is that stronghold’s clan. Dynasty and fate counts sum the quantities on their sides.

Parameters:
cardslist of DeckCard

The deck’s resolved entries.

records_by_iddict mapping str to dict

Card id to record, supplying types and clans for the stronghold lookup.

Returns:
summaryDeckSummary

Stronghold id, clan, and dynasty/fate counts; the stronghold and clan are None if the deck has no stronghold.