- Added edition file for Guilds of Ravnica Guild Kit.

- Updated the edition creator tool to use MTGJSONv4.
This commit is contained in:
Agetian
2018-11-21 11:03:05 +03:00
parent 2f88b45d67
commit 94b3ff0195
2 changed files with 155 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ if result.setcode is None:
print parser.parse_args(['-h'])
sys.exit(1)
r = requests.get('http://mtgjson.com/json/%s.json' % result.setcode)
r = requests.get('http://mtgjson.com/v4/json/%s.json' % result.setcode)
d = r.json()
cards = d['cards']
@@ -35,10 +35,10 @@ for c in cards:
l = []
l.append(c['number'])
rarity = c['rarity'][0]
if rarity == 'B':
rarity = c['rarity'][0].upper()
if rarity == 'C' and c['supertypes'].count('Basic') > 0:
rarity = 'L'
l.append(rarity)
l.append(c['name'].replace(u'\xc6', 'AE'))
l.append(c['name'].replace(u'\xc6', 'Ae'))
l.append('\n')
f.write(' '.join(l))
f.write(' '.join(l))