mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
since mtgdata.txt is a bit broken now (lacks Assault but has 2 Batteries), the script will try to use 2nd part of a card to get rarities, CM1 set enabled to fill SetInfos
This commit is contained in:
@@ -120,16 +120,23 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
firstLine = cardfile.readline().strip()
|
firstLine = cardfile.readline().strip()
|
||||||
cardName = firstLine[5:]
|
cardName = firstLine[5:]
|
||||||
|
altName = None
|
||||||
|
|
||||||
print (cardName, fileName)
|
|
||||||
validLines = []
|
validLines = []
|
||||||
validLines.append(firstLine)
|
validLines.append(firstLine)
|
||||||
|
|
||||||
for line in cardfile.readlines():
|
for line in cardfile.readlines():
|
||||||
if line[:8] != "SetInfo:" and line[:8] != "SVar:Rar":
|
if line[:8] != "SetInfo:" and line[:8] != "SVar:Rar":
|
||||||
validLines.append(line.strip())
|
validLines.append(line.strip())
|
||||||
|
if line[:5] == "Name:":
|
||||||
|
altName = line[5:].strip()
|
||||||
cardfile.close()
|
cardfile.close()
|
||||||
|
|
||||||
|
print (cardName, altName, fileName)
|
||||||
|
|
||||||
|
if not cardName in mtgDataCards and not altName is None:
|
||||||
|
cardName = altName
|
||||||
|
|
||||||
for e in mtgDataCards[cardName]:
|
for e in mtgDataCards[cardName]:
|
||||||
if not setCodeToForge[e] is None:
|
if not setCodeToForge[e] is None:
|
||||||
validLines.append( "SetInfo:{} {}".format(setCodeToForge[e], mtgDataCards[cardName][e]) )
|
validLines.append( "SetInfo:{} {}".format(setCodeToForge[e], mtgDataCards[cardName][e]) )
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ AQ ATQ # Antiquities
|
|||||||
CG UDS # Urza's Destiny
|
CG UDS # Urza's Destiny
|
||||||
CH CHR # Chronicles
|
CH CHR # Chronicles
|
||||||
===CHK # Champions of Kamigawa
|
===CHK # Champions of Kamigawa
|
||||||
---CM1 # Commander's Arsenal
|
===CM1 # Commander's Arsenal
|
||||||
CMD COM # Magic: The Gathering-Commander
|
CMD COM # Magic: The Gathering-Commander
|
||||||
CON CFX # Conflux
|
CON CFX # Conflux
|
||||||
===CSP # Coldsnap
|
===CSP # Coldsnap
|
||||||
|
|||||||
Reference in New Issue
Block a user