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()
|
||||
cardName = firstLine[5:]
|
||||
altName = None
|
||||
|
||||
print (cardName, fileName)
|
||||
validLines = []
|
||||
validLines.append(firstLine)
|
||||
|
||||
for line in cardfile.readlines():
|
||||
if line[:8] != "SetInfo:" and line[:8] != "SVar:Rar":
|
||||
validLines.append(line.strip())
|
||||
if line[:5] == "Name:":
|
||||
altName = line[5:].strip()
|
||||
cardfile.close()
|
||||
|
||||
print (cardName, altName, fileName)
|
||||
|
||||
if not cardName in mtgDataCards and not altName is None:
|
||||
cardName = altName
|
||||
|
||||
for e in mtgDataCards[cardName]:
|
||||
if not setCodeToForge[e] is None:
|
||||
validLines.append( "SetInfo:{} {}".format(setCodeToForge[e], mtgDataCards[cardName][e]) )
|
||||
|
||||
Reference in New Issue
Block a user