# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):


import re, sys, traceback
import pickle
from bs4 import BeautifulSoup
from MTG import cardtype
from MTG import static_abilities
        types = []
        try:
            ID = 'c' + re.search('(?<=multiverseid=)[0-9]+', card.set['picURL']).group(0)
            name = card.find('name').text
            characteristics = {'name': name}
            characteristics['text'] = card.find('text').text
            characteristics['color'] = [c.text for c in card.find_all('color')]
            characteristics['mana_cost'] = card.find('manacost').text

            # types
            _type = card.find('type').text.split(' - ')
            if len(_type) > 1:
                characteristics['subtype'] = _type[1].split(' ')
            _type = _type[0].split(' ')

            if len(_type) > 1 and _type[0].upper() in cardtype.SuperType._member_names_:
                supertype = '[cardtype.SuperType[%r]]' % _type[0].upper()
                _type.pop(0)

            types = '[' + ', '.join(['cardtype.CardType[%r]' % i.upper() for i in _type]) + ']'

            if 'Creature' in _type:
                try:
                    characteristics['power'], characteristics['toughness'] = map(int, card.find('pt').text.split('/'))
                except ValueError:
                    pass
            # static abilities
            _abilities = []

            texts = characteristics['text'].replace(' ', '_')

# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):


# Path: parser/parse_cockatrice.py
import re, sys, traceback
import pickle
from bs4 import BeautifulSoup
from MTG import cardtype
from MTG import static_abilities

        types = []
        try:
            ID = 'c' + re.search('(?<=multiverseid=)[0-9]+', card.set['picURL']).group(0)
            name = card.find('name').text
            characteristics = {'name': name}
            characteristics['text'] = card.find('text').text
            characteristics['color'] = [c.text for c in card.find_all('color')]
            characteristics['mana_cost'] = card.find('manacost').text

            # types
            _type = card.find('type').text.split(' - ')
            if len(_type) > 1:
                characteristics['subtype'] = _type[1].split(' ')
            _type = _type[0].split(' ')

            if len(_type) > 1 and _type[0].upper() in cardtype.SuperType._member_names_:
                supertype = '[cardtype.SuperType[%r]]' % _type[0].upper()
                _type.pop(0)

            types = '[' + ', '.join(['cardtype.CardType[%r]' % i.upper() for i in _type]) + ']'

            if 'Creature' in _type:
                try:
                    characteristics['power'], characteristics['toughness'] = map(int, card.find('pt').text.split('/'))
                except ValueError:
                    pass
            # static abilities
            _abilities = []

            texts = characteristics['text'].replace(' ', '_')

            for ability in static_abilities.StaticAbilities._member_names_: