throneteki / throneteki-deck-helper

Deck formatting and validation helpers for throneteki
MIT License
1 stars 5 forks source link

throneteki-deck-helper

Deck formatting and validation helpers for throneteki

Usage

validateDeck(deck, options)

Returns validation status for the specified deck. Options must include an array of packs data and restrictedList data from throneteki-json-data.

The returned object breaks down any problems with the specified deck in the following fields:

formatDeckAsFullCards(deck, data)

Creates a clone of the existing deck with full card data filled in instead of just card codes.

The data parameter must include a cards object that indexes from card code to full card data, and may contain a factions object that indexes from faction code to full faction data.

formatDeckAsShortCards(deck)

Creates a clone of the existing deck with only card codes instead of full card data.