Bump version to 1.8; fix '-' getting eaten on Curse
This commit is contained in:
parent
28e83bfba1
commit
48408d9dce
@ -1,3 +1,3 @@
|
|||||||
#main package
|
#main package
|
||||||
|
|
||||||
__version__ = '1.7'
|
__version__ = '1.8'
|
||||||
|
|||||||
@ -329,6 +329,7 @@ class DominionTabs:
|
|||||||
#print c.name + ' ::: ' + extra
|
#print c.name + ' ::: ' + extra
|
||||||
|
|
||||||
def add_definition_line(self,card,line):
|
def add_definition_line(self,card,line):
|
||||||
|
#try to figure out if this a 'basic action' like +X Cards or +Y Actions
|
||||||
baseaction = re.compile("^\s*(\+\d+\s+\w+)(?:[,.;])")
|
baseaction = re.compile("^\s*(\+\d+\s+\w+)(?:[,.;])")
|
||||||
m = baseaction.match(line)
|
m = baseaction.match(line)
|
||||||
prefix = ''
|
prefix = ''
|
||||||
@ -337,12 +338,17 @@ class DominionTabs:
|
|||||||
line = line[m.end():]
|
line = line[m.end():]
|
||||||
m = baseaction.match(line)
|
m = baseaction.match(line)
|
||||||
line = prefix + line
|
line = prefix + line
|
||||||
|
#this is a messy way to preserve the way the card spec file indicates separation
|
||||||
|
#and add our own via '---' sequences. Needs to be completely replaced, probably
|
||||||
|
#at the same time as changing the card spec file format.
|
||||||
if not card.description.strip().endswith(';')\
|
if not card.description.strip().endswith(';')\
|
||||||
and not card.description.strip().endswith('---')\
|
and not card.description.strip().endswith('---')\
|
||||||
and not line.startswith('---'):
|
and not line.startswith('-'):
|
||||||
card.description += '----' + line
|
card.description += '----' + line
|
||||||
else:
|
else:
|
||||||
card.description += line
|
card.description += line
|
||||||
|
if card.name == 'Curse':
|
||||||
|
print card.description
|
||||||
|
|
||||||
def read_card_defs(self,fname,fileobject=None):
|
def read_card_defs(self,fname,fileobject=None):
|
||||||
cards = []
|
cards = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user