more fixes for coin inline images

This commit is contained in:
Sumpfork 2012-08-22 01:18:48 +01:00
parent c9e3b07ae8
commit bc950ba09a
17 changed files with 31 additions and 25 deletions

View File

@ -31,3 +31,4 @@ old_images
sumpfork_dominion_tabs_v1.3.zip
sumpfork_dominion_tabs_v1.4.zip
sumpfork_dominion_tabs_v1.5.zip
dominion_tabs.pdf

View File

@ -127,7 +127,7 @@ who played it still gets to draw 2 cards. Moat can also be
played on your turn as an Action to draw 2 cards.
:::Moneylender
If you do not have a Copper in your hand to trash,
you don't get the +3 coins to spend in the Buy phase.
you don't get the +3 Coins to spend in the Buy phase.
:::Remodel
You cannot trash the Remodel as it isn't in your hand
when you resolve it (you can trash a different Remodel
@ -135,7 +135,7 @@ card from your hand). If you do not have a card to
trash, you cannot gain a card from the Remodel. The
gained card goes in your Discard pile. You can only
gain cards from the Supply. The gained card need not
cost exactly 2 coins more than the trashed card; it can
cost exactly 2 Coins more than the trashed card; it can
cost that much or any amount less. You cannot use
coins from Treasures or previous Actions (like the
Market) to increase the cost of the card you gain. You
@ -193,7 +193,7 @@ with no Curses remaining, you will still draw 2 cards.
A player gaining a Curse puts it face-up into his
Discard pile.
:::Woodcutter
During your Buy phase, you may add two coins to the
During your Buy phase, you may add 2 Coins to the
total value of the Treasure cards played, and you may
buy an additional card from the Supply.
:::Workshop
@ -292,12 +292,12 @@ from this Card.
Costs are 1 coin lower for all purposes. For example, if
you played Village, then Bridge, then Workshop, you
could use Workshop to gain a Duchy (because Duchy now
costs 4 coins due to the Bridge). Then if you played 3
coins, you could buy a Silver (for 2 coins) and an Estate
costs 4 Coins due to the Bridge). Then if you played 3 Coins,
you could buy a Silver (for 2 Coins) and an Estate
(for 1 coin). Cards in players' decks are also affected.
The effect is cumulative; if you Throne Room a Bridge, all
cards will cost 2 coins less this turn. Costs never go below
0 coins. For this reason, if you play Bridge and then play
cards will cost 2 Coins less this turn. Costs never go below
0 Coins. For this reason, if you play Bridge and then play
Upgrade, you could trash a Copper (which still costs zero,
even though you played Bridge) and gain a Pawn (which
costs 1 after Bridge is played).
@ -508,7 +508,7 @@ does not have enough cards to reveal 2, he reveals what he
can. You get bonuses for the types of cards revealed,
counting only the different cards. A card with 2 types
gives you both bonuses. So if the player to your left
reveals Copper and Harem, you get +4 coins and +2
reveals Copper and Harem, you get +4 Coins and +2
cards; if he reveals 2 Silvers, you just get +2 coins. Curse
produces no bonus.
:::Upgrade
@ -773,7 +773,7 @@ card you revealed, put the revealed card in your
hand. If you do not name the right card, you put the
revealed card back on top.
:::Potion
This is a basic Treasure card. It costs 4 coins and produces Potion. It is
This is a basic Treasure card. It costs 4 Coins and produces Potion. It is
not a Kingdom card.
After you choose 10 Kingdom cards for the Supply, if any of them have
@ -1495,7 +1495,7 @@ and is put into your discard pile.
:::Count
This card gives you two separate choices: first you either
discard 2 cards, put a card from your hand on top of your deck, or
gain a Copper; after resolving that, you either get + Coins, trash your
gain a Copper; after resolving that, you either get +3 Coins, trash your
hand, or gain a Duchy. For example, you might choose to discard
2 cards, then gain a Duchy. Gained cards come from the Supply
and are put into your discard pile. You can choose an option even

View File

@ -170,14 +170,14 @@ You can't buy this if you have any Copper in play.
----------
While this is in play, when you buy a Victory card, gain a Gold.
21 Bank Prosperity Treasure $7 Worth ? Coins.
When you play this, it`s worth $1 per Treasure card you have in play (counting this).
22 Expand Prosperity Action $7 Trash a card from your hand. Gain a card costing up to $3 more than the trashed card.
When you play this, it`s worth 1 Coin per Treasure card you have in play (counting this).
22 Expand Prosperity Action $7 Trash a card from your hand. Gain a card costing up to 3 Coins more than the trashed card.
23 Forge Prosperity Action $7 Trash any number of cards from your hand. Gain a card with cost exactly equal to the total cost in coins of the trashed cards.
24 King's Court Prosperity Action $7 You may choose an Action card in your hand. Play it three times.
25 Peddler Prosperity Action $8 +1 Card; +1 Action; +2 Coin
----------
During your Buy phase, this costs $2 less per Action card you have in play, but not less than $0.
26 Platinum Prosperity Treasure $9 5 Coins.
During your Buy phase, this costs 2 Coins less per Action card you have in play, but not less than 0 Coins.
26 Platinum Prosperity Treasure $9 Worth 5 Coins.
27 Colony Prosperity Victory $11 10 Victory.
1 Black Market Promo Action $3 +2 Coins, Reveal the top 3 cards of the Black Market deck. You may buy one of them immediately. Put the unbought cards on the bottom of the Black Market deck in any order.
(Before the game, make a Black Market deck out of one copy of each Kingdom card not in the supply.).
@ -188,7 +188,7 @@ During your Buy phase, this costs $2 less per Action card you have in play, but
At the start of Clean-up, if you have this and no more than one other Action card in play, you may put this on top of your deck.
5 Governor Promo Action $5 +1 Action
Choose one; you get the version in parentheses: Each player gets +1 (+3) Cards; or each player gains a Silver (Gold); or each player may trash a card from his hand and gain a card costing exactly $1 ($2) more.
Choose one; you get the version in parentheses: Each player gets +1 (+3) Cards; or each player gains a Silver (Gold); or each player may trash a card from his hand and gain a card costing exactly 1 Coin (2 Coins) more.
1 Copper Common Treasure $0 1 Coin.
2 Curse Common Curse $0 -1 Victory.
3 Estate Common Victory $2 1 Victory.
@ -199,14 +199,14 @@ Choose one; you get the version in parentheses: Each player gets +1 (+3) Cards;
1 Bag of Gold Cornucopia Action - Prize $0 +1 Action
Gain a Gold, putting it on top of your deck.
(This is not in the Supply.)
2 Diadem Cornucopia Treasure - Prize $0 Worth $2.
2 Diadem Cornucopia Treasure - Prize $0 Worth 2 Coins.
When you play this, +1 Coins per unused Action you have (Action, not Action card).
(This is not in the Supply.)
3 Followers Cornucopia Action - Attack - Prize $0 +2 Cards
Gain an Estate. Each other player gains a Curse and discards down to 3 cards in hand.
(This is not in the Supply.)
4 Princess Cornucopia Action - Prize $0 +1 Buy
While this is in play, cards cost $2 less, but not less than $0.
While this is in play, cards cost 2 Coins less, but not less than 0 Coins.
(This is not in the Supply.)
5 Trusty Steed Cornucopia Action - Prize $0 Choose two: +2 Cards; or +2 Actions; or +2 Coins; or gain 4 Silvers and put your deck into your discard pile.
(This is not in the Supply.)
@ -297,7 +297,7 @@ While this is in play, when you buy a card, gain a card costing less than it tha
19 Highway Hinterlands Action $5 +1 Card
+1 Action
______________________
While this is in play, cards cost $1 less, but not less than $0.
While this is in play, cards cost 1 Coin less, but not less than 0 Coins.
20 Ill-Gotten Gains Hinterlands Treasure $5 Worth 1 Coin
When you play this, you may gain a Copper, putting it into your hand.
______________________
@ -307,7 +307,7 @@ When you gain this, each other player gains a Curse.
Discard 2 cards.
______________________
When you gain this, look through your discard pile (including this), reveal any number of Action cards from it, and shuffle them into your deck.
22 Mandarin Hinterlands Action $5 +3 coins
22 Mandarin Hinterlands Action $5 +3 Coins
Put a card from your hand on top of your deck.
----------------------
When you gain this, put all Treasures you have in play on top of your deck in any order.
@ -321,7 +321,7 @@ Each other player draws a card, then discards down to 3 cards in hand.
When you gain this, gain a card costing less than this.
26 Farmland Hinterlands Victory $6 2 VP
----------
When you buy this, trash a card from your hand. Gain a card costing exactly $2 more than the trashed card.
When you buy this, trash a card from your hand. Gain a card costing exactly 2 Coins more than the trashed card.
1 Ruins Dark Ages Action - Ruins $0 Abandoned Mine: +1 Coin
Ruined Library: +1 Card
Ruined Marked: :1 Buy

View File

@ -58,6 +58,13 @@ class DominionTabs:
('Curse',) : 'curse.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)
replace = '<img src='"'images/coin_small_question.png'"' width=%d height='"'100%%'"' valign='"'middle'"'/>' % (fontsize*1.2)
text = re.sub('\?\s(c|C)oin(s)?', replace,text)
return text
def drawTab(self,card,x,y,useExtra=False):
#rightSide = False
if self.numTabsHorizontal == 2:
@ -158,19 +165,17 @@ class DominionTabs:
for d in descriptions:
s = getSampleStyleSheet()['BodyText']
s.fontName = "Times-Roman"
replace = '<img src='"'images/coin_small_\\1.png'"' width=%d height='"'100%%'"' valign='"'middle'"'/>&nbsp;' % s.fontSize
dmod = re.sub('(\d) Coin(s)?', replace,d)
dmod = self.add_inline_images(d,s.fontSize)
p = Paragraph(dmod,s)
textHeight = self.tabTotalHeight - self.tabLabelHeight + 0.2*cm
textWidth = self.tabWidth - cm
w,h = p.wrap(textWidth,textHeight)
while h > textHeight:
s.fontSize -= 1
s.leading -= 1
#print 'decreasing fontsize on description for',card.name,'now',s.fontSize
replace = '<img src='"'images/coin_small_\\1.png'"' width=%d height='"'100%%'"' valign='"'middle'"'/>' % s.fontSize
dmod = re.sub('(\d) Coin(s)?', replace,d)
dmod = self.add_inline_images(d,s.fontSize)
p = Paragraph(dmod,s)
w,h = p.wrap(textWidth,textHeight)
p.drawOn(self.canvas,cm/2.0,textHeight-height-h-0.5*cm)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB