fix non-English name lookup when specifying expansions

This commit is contained in:
Sumpfork 2014-12-08 10:11:28 -08:00
parent 88df1c2f3f
commit fb17c63d30
2 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,7 @@
12 Moneylender Dominion Action $4 Trash a Copper from your hand. If you do, +3 Coins. 12 Moneylender Dominion Action $4 Trash a Copper from your hand. If you do, +3 Coins.
13 Remodel Dominion Action $4 Trash a card from your hand. Gain a card costing up to 2 Coins more than the trashed card. 13 Remodel Dominion Action $4 Trash a card from your hand. Gain a card costing up to 2 Coins more than the trashed card.
14 Smithy Dominion Action $4 +3 Cards. 14 Smithy Dominion Action $4 +3 Cards.
15 Spy Dominion Action - Attack $4 +1 Card, +1 Action, Each player (including you) reveals the top card of his deck and either discards it or puts it back, your chouce. 15 Spy Dominion Action - Attack $4 +1 Card, +1 Action, Each player (including you) reveals the top card of his deck and either discards it or puts it back, your choice.
16 Thief Dominion Action - Attack $4 Each other player reveals the top 2 cards of his deck. If they revealed any Treasure cards, they trash one of them that you choose. You may gain any or all of these trashed cards. They discard the other revealed cards. 16 Thief Dominion Action - Attack $4 Each other player reveals the top 2 cards of his deck. If they revealed any Treasure cards, they trash one of them that you choose. You may gain any or all of these trashed cards. They discard the other revealed cards.
17 Throne Room Dominion Action $4 Choose an Action card in your hand. Play it twice. 17 Throne Room Dominion Action $4 Choose an Action card in your hand. Play it twice.
18 Council Room Dominion Action $5 +4 Cards, +1 Buy, Each other player draws a card. 18 Council Room Dominion Action $5 +4 Cards, +1 Buy, Each other player draws a card.

View File

@ -916,6 +916,8 @@ class DominionTabs:
if self.options.expansions: if self.options.expansions:
self.options.expansions = [o.lower() for o in self.options.expansions] self.options.expansions = [o.lower() for o in self.options.expansions]
reverseMapping = {v: k for k, v in DominionTabs.language_mapping.iteritems()}
self.options.expansions = [reverseMapping.get(e, e) for e in self.options.expansions]
filteredCards = [] filteredCards = []
knownExpansions = set() knownExpansions = set()
for c in cards: for c in cards: