mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
fixing wrong processing of Mishra factory
setting match for commander set
This commit is contained in:
@@ -7,12 +7,11 @@ pathToSetsMatchTable = "mtgdata-sets-to-forge.txt"
|
|||||||
|
|
||||||
class cis: # CardInSet
|
class cis: # CardInSet
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.edition = ""
|
|
||||||
self.rarity = "C"
|
self.rarity = "C"
|
||||||
self.arts = 1
|
self.arts = 0
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "{} {} {}".format(self.edition, self.rarity, self.arts)
|
return self.rarityFull() if self.arts <= 1 else "{} x{}".format(self.rarityFull(), self.arts)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return self.__str__()
|
return self.__str__()
|
||||||
@@ -79,14 +78,15 @@ if __name__ == '__main__':
|
|||||||
#mtgOracleCards[tmpName] = oracle.replace(prevline, '')
|
#mtgOracleCards[tmpName] = oracle.replace(prevline, '')
|
||||||
|
|
||||||
sets = prevline.split(", ")
|
sets = prevline.split(", ")
|
||||||
editions = []
|
editions = {}
|
||||||
for i in range(len(sets)):
|
for i in range(len(sets)):
|
||||||
ee = sets[i].split(' ')
|
ee = sets[i].split(' ')
|
||||||
editions.append(cis())
|
setName = ee[0]
|
||||||
editions[i].edition = ee[0]
|
if not setName in editions:
|
||||||
editions[i].rarity = ee[1].strip()
|
editions[setName] = cis()
|
||||||
if len(ee) > 2:
|
editions[setName].rarity = ee[1].strip()
|
||||||
editions[i].arts = int(ee[2][2:3])
|
prints = int(ee[2][2:3]) if len(ee) > 2 else 1
|
||||||
|
editions[setName].arts += prints
|
||||||
#print sets
|
#print sets
|
||||||
mtgDataCards[tmpName] = editions
|
mtgDataCards[tmpName] = editions
|
||||||
hasFetchedCardName = False
|
hasFetchedCardName = False
|
||||||
@@ -131,8 +131,8 @@ if __name__ == '__main__':
|
|||||||
cardfile.close()
|
cardfile.close()
|
||||||
|
|
||||||
for e in mtgDataCards[cardName]:
|
for e in mtgDataCards[cardName]:
|
||||||
if not setCodeToForge[e.edition] is None:
|
if not setCodeToForge[e] is None:
|
||||||
validLines.append( ("SetInfo:{} {}" if e.arts <= 1 else "SetInfo:{} {} x{}" ).format(setCodeToForge[e.edition], e.rarityFull(), e.arts) )
|
validLines.append( "SetInfo:{} {}".format(setCodeToForge[e], mtgDataCards[cardName][e]) )
|
||||||
|
|
||||||
toWrite = "\n".join(validLines)
|
toWrite = "\n".join(validLines)
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ 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 # Magic: The Gathering-Commander
|
CMD COM # Magic: The Gathering-Commander
|
||||||
CON CFX # Conflux
|
CON CFX # Conflux
|
||||||
===CSP # Coldsnap
|
===CSP # Coldsnap
|
||||||
===DD2 # Duel Decks: Jace vs. Chandra
|
===DD2 # Duel Decks: Jace vs. Chandra
|
||||||
|
|||||||
Reference in New Issue
Block a user