Commits

Alexander Schremmer committed dd16db2

Fix prize card logic.

Comments (0)

Files changed (2)

domination/cards/__init__.py

 
     def __new__(cls, name, bases, d):
         abstract = d.pop("abstract", False)
+        orig_bases = bases[:]
+        bases = [b for b in bases if b.__name__ != "PrizeCard"]
         if not abstract:
             d['card_type'] = bases[0].__name__
             d['second_card_type'] = len(bases) > 1 and bases[1].__name__ or ''
         if name != "Card":
             cost = d.pop("cost", None)
             d["raw_cost"] = cost
-        kls = type.__new__(cls, name, bases, d)
+        kls = type.__new__(cls, name, orig_bases, d)
         if not abstract:
             CardTypeRegistry.raw_card_classes[name] = kls
         return kls

domination/cards/cornucopia.py

 from domination.macros.__macros__ import handle_defense, generator_forward
 
 
-class BagOfGold(ActionCard, PrizeCard):
+class BagOfGold(PrizeCard, ActionCard):
     name = _("Bag of Gold")
     edition = Cornucopia
     cost = 0
             for val in game.check_empty_pile("Gold"):
                 yield val
 
-class Diadem(TreasureCard, PrizeCard):
+class Diadem(PrizeCard, TreasureCard):
     name = _("Diadem")
     edition = Cornucopia
     cost = 0
         return len(set(card.__name__ for card in player.deck)) / 5
 
 class FarmingVillage(ActionCard):
-    name = _("FarmingVillage")
+    name = _("Farming Village")
     edition = Cornucopia
     cost = 4
     desc = _("+2 Actions. Reveal cards from the top of your deck until you reveal an Action or Treasure card. Put that card into your hand and and discard the other cards.")
         player.discard_pile.extend(to_be_discarded)
         player.hand.extend(found_cards)
 
-class Followers(AttackCard, PrizeCard):
+class Followers(PrizeCard, AttackCard):
     name = _("Followers")
     edition = Cornucopia
     cost = 0
         else:
             player.draw_cards(1)
 
-class Princess(ActionCard, PrizeCard):
+class Princess(PrizeCard, ActionCard):
     name = _("Princess")
     edition = Cornucopia
     implemented = False #FIXME not implemented completely
         yield (_('Available prize cards'), True, game.tournament_cards)
 
 
-class TrustySteed(ActionCard, PrizeCard):
+class TrustySteed(PrizeCard, ActionCard):
     name = _("Trusty Steed")
     edition = Cornucopia
     implemented = False # XXX comment block/notification
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.