new tab labels; separating out some tabs as options

This commit is contained in:
sumpfork 2012-09-04 16:00:28 -07:00
parent 5685d645b8
commit 9d6ea0ebce
7 changed files with 58 additions and 10 deletions

View File

@ -32,3 +32,5 @@ sumpfork_dominion_tabs_v1.3.zip
sumpfork_dominion_tabs_v1.4.zip
sumpfork_dominion_tabs_v1.5.zip
dominion_tabs.pdf
sumpfork_dominion_tabs_*
dominiontabs.egg-info

View File

@ -1857,3 +1857,20 @@ reveal what you can. Put the revealed Action cards on top of your
deck in any order, and discard the other cards. A card with
multiple types, one of which is Action, is an Action card. If you
didn't reveal any Action cards, no cards will be put on top.
:::Shelters
See Preparation. A shelter is never in the supply.
Hovel: When you buy a Victory card, if Hovel is in your hand, you may
trash the Hovel. A card with multiple types, one of which is
Victory, is a Victory card. You do not get anything for trashing
Hovel; you just get to get rid of it.
Overgrown Estate: It is a Victory card despite being worth 0 Victory. If this is
trashed, you draw a card, right then, even in the middle of
resolving another card. For example, if you use Altar to trash
Overgrown Estate, you first draw a card, then gain a card costing
up to 5 Coins. This card does not give you a way to trash itself, it merely
does something if you manage to trash it.
Necropolis: This is an Action card; when you play it, you get +2 Actions.

View File

@ -408,7 +408,7 @@ in the trash.
+1 Action
+1 Coin
Trash a card from your hand.
31 Knights Dark Ages Action $3 This is a pile in which each card is different. There is the same basic ability on each card, but also another ability unique to that card in the pile, and they all have different names. Shuffle the Knights pile before playing with it, keeping it face down except for the top one, which is the only card that can be gained from the pile. See Additional Rules for Dark Ages and Preparation. Follow the rules on Knights in order from top to bottom; Sir Michael causes players to discard before it trashes cards.
31 Knights Dark Ages Action $5 This is a pile in which each card is different. There is the same basic ability on each card, but also another ability unique to that card in the pile, and they all have different names. Shuffle the Knights pile before playing with it, keeping it face down except for the top one, which is the only card that can be gained from the pile. See Additional Rules for Dark Ages and Preparation. Follow the rules on Knights in order from top to bottom; Sir Michael causes players to discard before it trashes cards.
32 Marauder Dark Ages Action $4 Gain a Spoils from the Spoils pile.
Each other player gains a Ruins.
33 Market Square Dark Ages Action - Reaction $3 +1 Card
@ -450,3 +450,18 @@ and each other player discards down to 3 cards in hand.
Name a card.
Reveal the top card of your deck.
If its the named card, put it into your hand.
42 Shelters Dark Ages Extras Action - Shelter $1 Hovel: When you buy a Victory card, you may trash this from your hand.
Necropolis: +2 Actions
Overgrown Estate: 0 <VP>; when you trash this, +1 Card.
43 Urchin / Mercenary Dark Ages Extras Action $3 Urchin:
+1 Card +1 Action
Each other player discards down to 4 cards in hand. When you play another Attack card with this in play, you may trash this. If you do, gain a Mercenary from the Mercenary pile.
Mercenary:
You may trash 2 cards from your hand. If you do, +2 Cards, + 2 Coins, and each other player discards down to 3 cards in hand. (This is not in the Supply.)
44 Hermit / Madman Dark Ages Action $3 Hermit: Look through your discard pile. You may trash a card from your discard pile or hand that is not a Treasure. Gain a card costing up to 3 Coins.
When you discard this from play, if you did not buy any cards this turn, trash this and gain a Madman from the Madman pile.
Madman:
+2 Actions
Return this to the Madman pile. If you do, +1 Card per card in your hand.
(This card is not in the supply.)

View File

@ -43,21 +43,25 @@ class DominionTabs:
('Action','Duration') : 'duration.png',
('Action','Looter') : 'action.png',
('Action','Prize') : 'action.png',
('Action','Ruins') : 'action.png',
('Action','Shelter') : 'action.png',
('Action','Ruins') : 'ruins.png',
('Action','Shelter') : 'shelter.png',
('Action','Attack','Looter') : 'action.png',
('Reaction',) : 'reaction.png',
('Reaction','Shelter') : 'reaction.png',
('Reaction','Shelter') : 'Shelter.png',
('Treasure',) : 'treasure.png',
('Treasure','Victory') : 'treasure-victory.png',
('Treasure','Prize') : 'treasure.png',
('Treasure','Reaction') : 'treasure.png',
('Treasure','Reaction') : 'treasure-reaction.png',
('Victory',) : 'victory.png',
('Victory','Reaction') : 'victory.png',
('Victory','Shelter') : 'victory.png',
('Victory','Reaction') : 'victory-reaction.png',
('Victory','Shelter') : 'shelter.png',
('Curse',) : 'curse.png'
}
setImages = {
'base' : 'base_set.png',
}
def add_inline_images(self, text, fontsize):
replace = '<img src='"'images/coin_small_\\1.png'"' width=%d height='"'100%%'"' valign='"'middle'"'/>' % (fontsize*1.2)
text = re.sub('(\d)\s(c|C)oin(s)?', replace,text)
@ -99,8 +103,9 @@ class DominionTabs:
self.canvas.translate(0,self.tabTotalHeight-self.tabLabelHeight)
self.canvas.drawImage(os.path.join('images',DominionTabs.labelImages[card.types]),1,0,
self.tabLabelWidth-2,self.tabLabelHeight-1,
preserveAspectRatio=False,anchor='n')
if card.types[0] == 'Treasure' or card.types == ('Curse',):
preserveAspectRatio=False,anchor='n',mask='auto')
if card.types[0] == 'Treasure' and (len(card.types) == 1 or card.types[1] != 'Reaction')\
or card.types == ('Curse',):
textHeight = self.tabLabelHeight/2-4
costHeight = textHeight
potSize = 12
@ -108,6 +113,10 @@ class DominionTabs:
else:
textHeight = self.tabLabelHeight/2-7
costHeight = textHeight-1
if card.types == ('Victory','Reaction') or\
card.types == ('Treasure','Reaction') or\
card.types == ('Action','Ruins'):
costHeight = textHeight+1
potSize = 11
potHeight = 2
@ -119,6 +128,11 @@ class DominionTabs:
textInset += potSize
textWidth -= potSize
#set image
setImage = DominionTabs.setImages.get(card.cardset, None)
#if setImage:
# self.canvas.drawImage(os.path.join('images',setImage), self.tabLabelWidth-20, 3, 14, 12, mask='auto')
self.canvas.setFont('MinionPro-Bold',12)
cost = str(card.cost)
if 'Prize' in card.types:
@ -231,7 +245,7 @@ class DominionTabs:
def read_card_defs(self,fname):
cards = []
f = open(fname)
carddef = re.compile("^\d+\t+(?P<name>[\w\-' ]+)\t+(?P<set>[\w ]+)\t+(?P<type>[-\w ]+)\t+\$(?P<cost>\d+)( (?P<potioncost>\d)+P)?\t+(?P<description>.*)")
carddef = re.compile("^\d+\t+(?P<name>[\w\-'/ ]+)\t+(?P<set>[\w ]+)\t+(?P<type>[-\w ]+)\t+\$(?P<cost>\d+)( (?P<potioncost>\d)+P)?\t+(?P<description>.*)")
currentCard = None
for line in f:
line = line.strip()

BIN
images/base_set.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/ruins.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
images/shelter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB