diff --git a/js/cards/parsecards.py b/js/cards/parsecards.py index 4040628..b4850d9 100755 --- a/js/cards/parsecards.py +++ b/js/cards/parsecards.py @@ -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' @@ -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)