Fix attributes storage
This commit is contained in:
parent
f440d68139
commit
c3a80c3ef2
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue