New Set "Hour of Devastation" (HOU) Prep

This commit is contained in:
tritoch 2017-06-01 10:39:13 -05:00
parent c6e3293c3c
commit 9d47d38e80
5 changed files with 45 additions and 31 deletions

View File

@ -1,18 +1,2 @@
{
"Open into Wonder": {
"manaCost": "{X}{U}{U}"
},
"By Force": {
"manaCost": "{X}{R}"
},
"Nissa, Steward of Elements": {
"manaCost": "{X}{U}{G}",
"loyalty": "X"
},
"Pull From Tomorrow": {
"name": "Pull from Tomorrow"
},
"Tresspasser's Curse": {
"name": "Trespasser's Curse"
}
}

View File

@ -1 +1 @@
["~Sandwurm Convengence","Holaphel, Maw of Sands","Evolving Wilds"]
[]

View File

@ -45,6 +45,7 @@
"blank card (do not use this key, just the object) - remove unneeded keys":
{
"name": "",
"manaCost": "",
"number": "",
"rarity": "",
"type": "",
@ -57,5 +58,34 @@
}
},
"cards": [
{
"name": "Nicol Bolas, God-Pharaoh",
"manaCost": "4UBR",
"number": "140",
"rarity": "Mythic Rare",
"type": "Planeswalker - Bolas",
"url": "https://i.imgur.com/DTNXG2z.png",
"loyalty": "7",
"cmc": 7
},
{
"name": "Bontu's Last Reckoning",
"manaCost": "1BB",
"number": "60",
"rarity": "Rare",
"type": "Sorcery",
"url": "https://i.imgur.com/HOjh3pE.png",
"cmc": 3
},
{
"name": "Samut, the Tested",
"manaCost": "2RG",
"number": "144",
"rarity": "Mythic Rare",
"type": "Planeswalker - Samut",
"url": "https://i.imgur.com/4tRYs5z.png",
"loyalty": "4",
"cmc": 4
}
]
}

View File

@ -1,9 +1,9 @@
{
"setname": "AKH",
"setlongname": "Amonkhet",
"setname": "HOU",
"setlongname": "Hour of Devastation",
"blockname": "Amonkhet",
"setsize": 269,
"setreleasedate": "2017-04-28",
"setsize": 199,
"setreleasedate": "2017-07-14",
"settype": "expansion",
"masterpieces": {
"setname": "MPS_AKH",

View File

@ -248,17 +248,17 @@ def correct_cards(mtgjson, manual_cards=[], card_corrections=[], delete_cards=[]
workingCMC += 1
if 'types' not in card:
card['types'] = []
if '' in card['type']:
workingTypes = card['type'].split('')[0].strip()
else:
workingTypes = card['type'].split('-')[0].strip()
# if '—' in card['type']:
# workingTypes = card['type'].split('—')[0].strip()
# else:
workingTypes = card['type'].split('-')[0].strip()
workingTypes.replace('Legendary ','').replace('Snow ','')\
.replace('Elite ','').replace('Basic ','').replace('World ','').replace('Ongoing ','')
card['types'] += workingTypes.split(' ')
if 'subtypes' not in card:
if '' in card['type']:
workingSubtypes = card['type'].split('')[1].strip()
elif '-' in card['type']:
# if '—' in card['type']:
# workingSubtypes = card['type'].split('—')[1].strip()
if '-' in card['type']:
workingSubtypes = card['type'].split('-')[1].strip()
if workingSubtypes:
card['subtypes'] = workingSubtypes.split(' ')
@ -839,9 +839,9 @@ def write_xml(mtgjson, setname, setlongname, setreleasedate, split_cards=[]):
cardsxml.write("</card>\n")
cardsxml.write("</cards>\n</cockatrice_carddatabase>")
if os.path.isfile('out/' + setname + '.xml'):
shutil.copyfile('out/' + setname + '.xml','out/spoiler.xml')
if not 'MPS' in setname:
if os.path.isfile('out/' + setname + '.xml'):
shutil.copyfile('out/' + setname + '.xml','out/spoiler.xml')
#failing pretty xml code
#with open('out/' + setname + '.xml') as data_file: