Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
u"dark ages extras",
u"guilds",
u"adventures",
u"adventures extras",
u"empires",
u"empires extras",
u"nocturne",
u"nocturne extras",
u"promo",
u"renaissance",
u"menagerie",
u"extras",
u"animals",
}
for c in cards:
assert isinstance(c, domdiv_cards.Card)
assert c.cardset_tag in valid_cardsets
# Option modified card count
options = main.parse_opts(
["--no-trash", "--curse10", "--start-decks", "--include-blanks", "7"]
)
options = main.clean_opts(options)
options.data_path = "."
cards = main.read_card_data(options)
# Total delta cards is +28 from
# Trash: -1 * 3 sets = -3
# Curse: +2 * 4 sets = +8
# Start Decks: +4 * 4 sets = +16
# Blanks: +7 = +7
assert len(cards) == num_cards_expected + 28
# Now go through all the cards and create their plotter information record...
items = []
nextTabIndex = CardPlot.tabRestart()
lastCardSet = None
reset_expansion_tabs = options.expansion_dividers and options.expansion_reset_tabs
for card in cards:
# Check if tab needs to be reset to the start
if reset_expansion_tabs and not card.isExpansion():
if lastCardSet != card.cardset_tag:
# In a new expansion, so reset the tabs to start over
nextTabIndex = CardPlot.tabRestart()
if options.tab_number > Card.sets[card.cardset_tag]['count']:
# Limit to the number of tabs to the number of dividers in the expansion
CardPlot.tabSetup(tabNumber=Card.sets[card.cardset_tag]['count'])
elif CardPlot.tabNumber != options.tab_number:
# Make sure tabs are set back to the original
CardPlot.tabSetup(tabNumber=options.tab_number)
lastCardSet = card.cardset_tag
if self.wantCentreTab(card):
# If we want centred expansion cards, then force this divider to centre
thisTabIndex = 0
else:
thisTabIndex = nextTabIndex
item = CardPlot(card,
rotation=options.spin if options.spin != 0 else options.rotate,
tabIndex=thisTabIndex,
textTypeFront=options.text_front,
textTypeBack=options.text_back,
serpentine=options.tab_serpentine,
wrapper=options.wrapper)
# Now go through all the cards and create their plotter information record...
items = []
nextTabIndex = CardPlot.tabRestart()
lastCardSet = None
reset_expansion_tabs = options.expansion_dividers and options.expansion_reset_tabs
for card in cards:
# Check if tab needs to be reset to the start
if reset_expansion_tabs and not card.isExpansion():
if lastCardSet != card.cardset_tag:
# In a new expansion, so reset the tabs to start over
nextTabIndex = CardPlot.tabRestart()
if options.tab_number > Card.sets[card.cardset_tag]['count']:
# Limit to the number of tabs to the number of dividers in the expansion
CardPlot.tabSetup(tabNumber=Card.sets[card.cardset_tag]['count'])
elif CardPlot.tabNumber != options.tab_number:
# Make sure tabs are set back to the original
CardPlot.tabSetup(tabNumber=options.tab_number)
lastCardSet = card.cardset_tag
if self.wantCentreTab(card):
# If we want centred expansion cards, then force this divider to centre
thisTabIndex = 0
else:
thisTabIndex = nextTabIndex
item = CardPlot(card,
rotation=options.spin if options.spin != 0 else options.rotate,
tabIndex=thisTabIndex,