Commits

Alexander Schremmer committed 832f2ec

Fix cards, fix descriptions, add card sets, fix initialization.

Comments (0)

Files changed (3)

domination/cards/alchemy.py

 from domination.tools import _
 from domination.macros.__macros__ import handle_defense
 
-#http://www.boardgamegeek.com/image/709729/dominion-alchemy?size=large
 
 class Potion(TreasureCard):
     name = _("Potion")
     edition = Alchemy
     cost = 3
     potioncost = 1
-    desc = _("")
+    desc = _("Worth 1 Point for every three Action cards in your deck (rounded down).")
 
     def get_worth(self, player):
-        return (len(player.hand) + len(player.discard_pile))/5
+        return (len(player.hand) + len(player.discard_pile)) / 3
 
 
 class Possession(ActionCard):
             yield val
 
 
-from domination.cards.base import (
-    Bureaucrat, Cellar, CouncilRoom, Library, Mine, ThroneRoom)
+from domination.cards.base import \
+    Bureaucrat, Cellar, CouncilRoom, Library, Mine, ThroneRoom,\
+    Gardens, Laboratory, Thief, Chancellor, Festival, Militia, Smithy,\
+    Market, Moat, Remodel, Witch, Woodcutter
+
+from domination.cards.intrigue import \
+    GreatHall, Minion, Pawn, Steward, Bridge, Masquerade, Nobles, ShantyTown,\
+    Torturer, Baron, WishingWell, Conspirator, Coppersmith, Ironworks,\
+    TradingPost
 
 card_sets = [
-    CardSet('Alchemy Test',
-            [Apprentice, Potion, Familiar, PhilosophersStone, University,
-             Mine, CouncilRoom, Cellar, Library, ThroneRoom])
+        CardSet(u"Forbidden Arts [A&D]",
+            [Apprentice, Familiar, Possession, University, Cellar, CouncilRoom,
+                Gardens, Laboratory, Thief, ThroneRoom]),
+        CardSet(u"Potion Mixers [A&D]",
+            [Alchemist, Apothecary, Golem, Herbalist, Transmute, Cellar, Chancellor,
+                Festival, Militia, Smithy]),
+        CardSet(u"Chemistry Lesson [A&D]",
+            [Alchemist, Golem, PhilosophersStone, University, Bureaucrat, Market,
+                Moat, Remodel, Witch, Woodcutter]),
+        CardSet(u"Servants [A&I]",
+            [Golem, Possession, ScryingPool, Transmute, Vineyard, Conspirator,
+                GreatHall, Minion, Pawn, Steward]),
+        CardSet(u"Secret Research [A&I]",
+            [Familiar, Herbalist, PhilosophersStone, University, Bridge,
+                Masquerade, Minion, Nobles, ShantyTown, Torturer]),
+        CardSet(u"Pools, Tools, and Fools [A&I]",
+            [Apothecary, Apprentice, Golem, ScryingPool, Baron, Coppersmith,
+                Ironworks, Nobles, TradingPost, WishingWell]),
 ]
+

domination/cards/seaside.py

 from domination.tools import _
 from domination.macros.__macros__ import handle_defense
 
-#http://www.boardgamegeek.com/image/586409/dominion-seaside?size=large
+
 class Lookout(ActionCard):
     name = _("Lookout")
     edition = Seaside
     implemented = False #FIXME not implemented completely
     cost = 3
-    desc = _("+1 Action. Look at the top 3 Cards of your deck. Trash one of them. Discard one of them. Put the other on top of your deck.")
+    desc = _("+1 Action. Look at the top 3 Cards of your deck. Trash one of them. Discard one of them. Put the other one on top of your deck.")
 
     def activate_action(self, game, player):
         player.remaining_actions += 1
     name = _("Salvager")
     edition = Seaside
     cost = 4
-    desc = _("+1 Buy. Trash a Card from your hand. + Money equal to its costs.")
+    desc = _("+1 Buy. Trash a Card from your hand. +Money equal to its costs.")
 
     def activate_action(self, game, player):
         player.remaining_deals += 1
         player.virtual_money += 2
         pass #FIXME
 
-class LigthHouse(ActionCard, DurationCard):
-    name = _("Ligthhouse")
+class Lighthouse(ActionCard, DurationCard):
+    name = _("Lighthouse")
     edition = Seaside
     implemented = False #FIXME not implemented completely
     cost = 2
-    desc = _("+1 Action. Now and at the Start of your next turn: +1 Money. While this is in play, when another player plays an Attack cardm it doesn't afffect you.")
+    desc = _("+1 Action. Now and at the start of your next turn: +1 Money. While this is in play, when another player plays an Attack card it doesn't affect you.")
 
     def activate_action(self, game, player):
         player.remaining_actions += 1
     edition = Seaside
     implemented = False #FIXME not implemented completely
     cost = 2
-    desc = _("+1 Card, + 1 Action. Set aside a Card from your hand face down. At the start of your next turn, put it into your hand.")
+    desc = _("+1 Card, + 1 Action. Set aside a card from your hand face down. At the start of your next turn, put it into your hand.")
 
     def activate_action(self, game, player):
         player.remaining_actions += 1
     edition = Seaside
     implemented = False #FIXME not implemented completely
     cost = 5
-    desc = _("You may reveal a Province card from your hand. If you do, gain a gold card, putting it into your hand. Otherwise, gain a silver card, putting it into your hand.")
+    desc = _("You may reveal a Province card from your hand. If you do, gain a Gold card, putting it into your hand. Otherwise, gain a Silver card, putting it into your hand.")
 
     def activate_action(self, game, player):
         pass #FIXME
     implemented = False #FIXME not implemented completely
     cost = 4
     points = 2
-    desc = _("Set aside the survivors of Oceanic fligth 815 from your hand. Return them to your deck at the end of the game.")
+    desc = _("Set aside this and another card from your hand. Return them to"
+             " your deck at the end of the game.")
 
     def activate_action(self, game, player):
         pass #FIXME
                     yield val
 
 
-from domination.cards.base import (
-    Cellar, CouncilRoom, Festival, Mine)
+from domination.cards.base import \
+    Cellar, CouncilRoom, Festival, Mine, Adventurer, Spy, Village,\
+    Chancellor, Festival, Militia, Workshop, Library, Market, Moneylender,\
+    Witch
 
 card_sets = [
-    CardSet('Seaside Test',
-            [Salvager, Bazaar, Cutpurse, GhostShip, Warehouse, TreasureMap,
-             Mine, Cellar, CouncilRoom, Festival])
+    CardSet(u"High Seas [S]",
+        [Bazaar, Caravan, Embargo, Explorer, Haven, Island, Lookout, PirateShip,
+            Smugglers, Wharf]),
+    CardSet(u"Buried Treasure [S]",
+        [Ambassador, Cutpurse, FishingVillage, Lighthouse, Outpost, PearlDiver,
+            Tactician, TreasureMap, Warehouse, Wharf]),
+    CardSet(u"Shipwrecks [S]",
+        [GhostShip, MerchantShip, NativeVillage, Navigator, PearlDiver, Salvager,
+            SeaHag, Smugglers, Treasury, Warehouse]),
+    CardSet(u"Reach for Tomorrow [S&D]",
+        [Adventurer, Cellar, CouncilRoom, Cutpurse, GhostShip, Lookout, SeaHag,
+            Spy, TreasureMap, Village]),
+    CardSet(u"Repetition [S&D]",
+        [Caravan, Chancellor, Explorer, Festival, Militia, Outpost, PearlDiver,
+            PirateShip, Treasury, Workshop]),
+    CardSet(u"Give and Take [S&D]",
+        [Ambassador, FishingVillage, Haven, Island, Library, Market, Moneylender,
+            Salvager, Smugglers, Witch]),
 ]

domination/gameengine.py

 
     def deal_supply_cards(game, selected_cards):
         no_players = len(game.players) # number of players
-        # debug check that there are 10 kinds of kingdom cards in selected_cards
         assert len(selected_cards) == 10
 
         # add treasure cards
             game.add_supply(Silver, 40)
             game.add_supply(Gold, 30)
 
-        if any(map(lambda isalchemy: isalchemy.edition == Alchemy, selected_cards)):
-            game.add_supply(Potion, 30) #FIXME how many Potions per player?
+        if any([c.potioncost + (c.__name__ == "BlackMarket") for c in selected_cards]):
+            game.add_supply(Potion, 16)
 
         # add victory cards (except victory kingdom cards)
         if no_players == 2:
         # add kingdom cards
         for selected_card in selected_cards:
             amount = 10
-            if selected_card is Gardens: # modify for additional victory cards
+            if selected_card in (Gardens, Vineyard): # modify for additional victory cards
                 amount = victory_cards
             game.add_supply(selected_card, amount)
-            # FIXME number of vineyard dependend on playercount, too?
 
     def deal_initial_decks(game): # deal the starting hands
         for player in game.players: # every player...
 from domination.cards import CardTypeRegistry, ActionCard, VictoryCard
 from domination.cards.base import (Copper, Silver, Gold, Curse,
                                    Estate, Duchy, Province, Gardens)
-from domination.cards.alchemy import Potion
+from domination.cards.alchemy import Potion, Vineyard
 
 from domination.cards.base import card_sets as card_sets_base
 from domination.cards.intrigue import card_sets as card_sets_intrigue
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.