diff --git a/cards_manual.json b/cards_manual.json index 10ca5497..bf3d1995 100644 --- a/cards_manual.json +++ b/cards_manual.json @@ -50,6 +50,7 @@ "rarity": "", "type": "", "url": "", + "text": "", "loyalty": "", "cmc": 0, "layout": "", @@ -65,6 +66,7 @@ "rarity": "Mythic Rare", "type": "Planeswalker - Bolas", "url": "https://i.imgur.com/DTNXG2z.png", + "text": "+2: Target opponent exiles cards from the top of his or her library until he or she exiles a nonland card. Until end of turn, you may cast that card without paying its mana cost.\n+1: Each opponent exiles two cards from his or her hand.\n-4: Nicol Bolas, God-Pharaoh deals 7 damage to target opponent or creature an opponent controls.\n-12: Exile each nonland permanent your opponents control.", "loyalty": "7", "cmc": 7 }, @@ -75,6 +77,7 @@ "rarity": "Rare", "type": "Sorcery", "url": "https://i.imgur.com/HOjh3pE.png", + "text": "Destroy all creatures. Lands you control don't untap during your next untap step.", "cmc": 3 }, { @@ -84,6 +87,7 @@ "rarity": "Mythic Rare", "type": "Planeswalker - Samut", "url": "https://i.imgur.com/4tRYs5z.png", + "text": "+1: Up to one target creature gains double strike until end of turn.\n-2: Samut, the Tested deals 2 damage divided as you choose among one or two target creatures and/or players.\n-7: Search your library for up to two creature and/or planeswalker cards, put them onto the battlefield, then shuffle your library.", "loyalty": "4", "cmc": 4 } diff --git a/main.py b/main.py index f00334fc..e24af54e 100644 --- a/main.py +++ b/main.py @@ -86,4 +86,4 @@ if __name__ == '__main__': save_masterpieces(masterpieces) save_errorlog(errorlog) save_allsets(AllSets) - #save_setjson(mtgs) + save_setjson(mtgs) diff --git a/spoilers.py b/spoilers.py index edb56f4e..8d751741 100644 --- a/spoilers.py +++ b/spoilers.py @@ -280,7 +280,7 @@ def correct_cards(mtgjson, manual_cards=[], card_corrections=[], delete_cards=[] card['colorIdentity'] = [letter] if 'colors' in card: if not colorMap[letter] in card['colors']: - card['colors'] += colorMap[letter] + card['colors'].append(colorMap[letter]) else: card['colors'] = [colorMap[letter]] if 'text' in card: @@ -823,7 +823,7 @@ def write_xml(mtgjson, setname, setlongname, setreleasedate, split_cards=[]): cardsxml.write("" + name.encode('utf-8') + "\n") cardsxml.write('' + setname + '\n') cardsxml.write("" + manacost.encode('utf-8') + "\n") - cardsxml.write("" + cardcmc + "") + cardsxml.write("" + cardcmc + "\n") if card.has_key('colors'): colorTranslate = { "White": "W", @@ -833,14 +833,16 @@ def write_xml(mtgjson, setname, setlongname, setreleasedate, split_cards=[]): "Green": "G" } for color in card['colors']: - cardsxml.write('' + colorTranslate[color] + '') + #if color in colorTranslate: + # color = colorTranslate[color] + cardsxml.write('' + colorTranslate[color] + '\n') if name + ' enters the battlefield tapped' in text: - cardsxml.write("1") + cardsxml.write("1\n") cardsxml.write("" + cardtype.encode('utf-8') + "\n") if pt: cardsxml.write("" + pt + "\n") if card.has_key('loyalty'): - cardsxml.write("" + str(card['loyalty']) + "") + cardsxml.write("" + str(card['loyalty']) + "\n") cardsxml.write("" + tablerow + "\n") cardsxml.write("" + text.encode('utf-8') + "\n") if related: