Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/cards/decklist-cards-min.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions js/cards/parsecards.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def getLegalities(card, cards):

# Make the colors shorter
if ('colors' not in cards[card]): pass
elif len(cards[card]['colors']) > 1: ocards[ocard]['c'] = 'F' # gold
elif cards[card]['colors'] == ['White']: ocards[ocard]['c'] = 'A'
elif cards[card]['colors'] == ['Blue']: ocards[ocard]['c'] = 'B'
elif cards[card]['colors'] == ['Black']: ocards[ocard]['c'] = 'C'
elif cards[card]['colors'] == ['Red']: ocards[ocard]['c'] = 'D'
elif cards[card]['colors'] == ['Green']: ocards[ocard]['c'] = 'E'
elif len(cards[card]['colors']) > 1: ocards[ocard]['c'] = 'F' # gold
elif cards[card]['colors'] == ['W']: ocards[ocard]['c'] = 'A'
elif cards[card]['colors'] == ['U']: ocards[ocard]['c'] = 'B'
elif cards[card]['colors'] == ['B']: ocards[ocard]['c'] = 'C'
elif cards[card]['colors'] == ['R']: ocards[ocard]['c'] = 'D'
elif cards[card]['colors'] == ['G']: ocards[ocard]['c'] = 'E'

if 'Land' in cards[card]['types']: ocards[ocard]['t'] = '1'
elif 'Creature' in cards[card]['types']: ocards[ocard]['t'] = '2'
Expand All @@ -72,8 +72,8 @@ def getLegalities(card, cards):
else: ocards[ocard]['t'] = '4'

# Now try to deal with CMC
if 'cmc' not in cards[card]: ocards[ocard]['m'] = 99
else: ocards[ocard]['m'] = cards[card]['cmc']
if 'convertedManaCost' not in cards[card]: ocards[ocard]['m'] = 99
else: ocards[ocard]['m'] = cards[card]['convertedManaCost']

# Add it into the file if the banned list isn't empty
legality = getLegalities(card, cards)
Expand Down