Merge branch 'bog-master'

This commit is contained in:
Sumpfork 2016-06-11 13:41:16 -07:00
commit 20e8e667d5
5 changed files with 2802 additions and 2782 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ setImages = {
'guilds': 'guilds_set.png', 'guilds': 'guilds_set.png',
'adventures': 'adventures_set.png', 'adventures': 'adventures_set.png',
'adventures extras': 'adventures_set.png', 'adventures extras': 'adventures_set.png',
'empires': "base_set.png" 'empires': 'empires_set.png'
} }
promoImages = { promoImages = {
'walled village': 'walled_village_set.png', 'walled village': 'walled_village_set.png',
@ -98,12 +98,13 @@ class Card(object):
return promoTextIcons[cardName.lower()] return promoTextIcons[cardName.lower()]
return None return None
def __init__(self, name, cardset, types, cost, description='', potcost=0, extra=''): def __init__(self, name, cardset, types, cost, description='', potcost=0, debtcost=0, extra=''):
self.name = name.strip() self.name = name.strip()
self.cardset = cardset.strip() self.cardset = cardset.strip()
self.types = types self.types = types
self.cost = cost self.cost = cost
self.potcost = potcost self.potcost = potcost
self.debtcost = debtcost
self.description = description self.description = description
self.extra = extra self.extra = extra

View File

@ -98,6 +98,9 @@ class DividerDrawer(object):
replace = '<img src='"'%s/victory_emblem.png'"' width=%d height='"'120%%'"' valign='"'middle'"'/>' % ( replace = '<img src='"'%s/victory_emblem.png'"' width=%d height='"'120%%'"' valign='"'middle'"'/>' % (
path, fontsize * 1.5) path, fontsize * 1.5)
text = re.sub('\<VP\>', replace, text) text = re.sub('\<VP\>', replace, text)
replace = '<img src='"'%s/debt.png'"' width=%d height='"'105%%'"' valign='"'middle'"'/>' % (
path, fontsize * 1.2)
text = re.sub('Debt', replace, text)
return text return text
def drawOutline(self, x, y, rightSide, isBack=False, isExpansionDivider=False): def drawOutline(self, x, y, rightSide, isBack=False, isExpansionDivider=False):
@ -176,8 +179,16 @@ class DividerDrawer(object):
potHeight = y - 3 potHeight = y - 3
potSize = 11 potSize = 11
self.canvas.drawImage(os.path.join(self.options.data_path, 'images', 'coin_small.png'), if card.debtcost:
x, coinHeight, 16, 16, preserveAspectRatio=True, mask='auto') self.canvas.drawImage(os.path.join(self.options.data_path, 'images', 'debt.png'),
x, coinHeight, 16, 16, preserveAspectRatio=True,
mask=[255, 255, 255, 255, 255, 255])
self.canvas.setFillColorRGB(1, 1, 1)
cost = str(card.debtcost)
else:
self.canvas.drawImage(os.path.join(self.options.data_path, 'images', 'coin_small.png'),
x, coinHeight, 16, 16, preserveAspectRatio=True, mask='auto')
cost = str(card.cost)
if card.potcost: if card.potcost:
self.canvas.drawImage(os.path.join(self.options.data_path, 'images', 'potion.png'), x + 17, self.canvas.drawImage(os.path.join(self.options.data_path, 'images', 'potion.png'), x + 17,
potHeight, potSize, potSize, preserveAspectRatio=True, potHeight, potSize, potSize, preserveAspectRatio=True,
@ -185,8 +196,8 @@ class DividerDrawer(object):
width += potSize width += potSize
self.canvas.setFont(self.fontNameBold, 12) self.canvas.setFont(self.fontNameBold, 12)
cost = str(card.cost)
self.canvas.drawCentredString(x + 8, costHeight, cost) self.canvas.drawCentredString(x + 8, costHeight, cost)
self.canvas.setFillColorRGB(0, 0, 0)
return width return width
def drawSetIcon(self, setImage, x, y): def drawSetIcon(self, setImage, x, y):

BIN
images/debt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
images/empires_set.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB