Fix attributes storage

This commit is contained in:
Correl Roush 2010-08-26 15:18:46 -04:00
parent f440d68139
commit c3a80c3ef2

View file

@ -47,7 +47,7 @@ class TextDB(Database):
attributes = line.split(' -- ')
type = attributes.pop(0)
card['type'] = type
card['attributes'] = attributes
card['attributes'] = [a for a in ''.join(attributes).split(' ') if a]
elif not card['power'] and not card['toughness'] and re.match('^\d+([+-]?\*)?\/\d+([+-]?\*)?$', line):
(card['power'], card['toughness']) = line.split('/')
elif re.match('^([A-Z0-9]+-[{0}](, )?)+$'.format(''.join(Card.rarities.keys())), line):