Example #1
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Dig through deck for two treasures"
     self.name = 'Adventurer'
     self.cost = 6
Example #2
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.desc = "Reveal a provice to gain gold else gain silver"
     self.name = 'Explorer'
     self.base = 'seaside'
     self.cost = 5
Example #3
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'intrigue'
     self.desc = "Copper produces an extra +1 this turn"
     self.name = 'Coppersmith'
     self.cost = 4
Example #4
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'attack', 'night', 'doom']
     self.base = 'nocturne'
     self.desc = "If it's your Night phase, each other player receives the next Hex.  Otherwise, +3 Cards."
     self.name = 'Werewolf'
     self.cost = 5
Example #5
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'gathering']
     self.base = 'empires'
     self.desc = """Choose one: +3 Cards and add 1 VP to the Wild Hunt Supply pile; or gain an Estate, and if you do, take the VP from the pile."""
     self.name = 'Wild Hunt'
     self.cost = 5
Example #6
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'prosperity'
     self.desc = "Trash cards from hand and gain one worth the sum of the trashed cards"
     self.name = 'Forge'
     self.cost = 7
Example #7
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['night', 'duration', 'attack']
     self.base = 'nocturne'
     self.desc = "Each other player with 5 or more cards in hand discards a copy of a card you have in play (or reveals they can't). At the start of your next turn, +3 Coins"
     self.name = 'Raider'
     self.cost = 6
Example #8
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Trash this card, Gain a card costing up to 5"
     self.name = 'Feast'
     self.cost = 4
Example #9
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'intrigue'
     self.desc = "Choose: +2 cards, +2 coin, trash 2 cards"
     self.name = 'Steward'
     self.cost = 3
Example #10
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Trash a card and gain one costing 2 more"
     self.name = 'Remodel'
     self.cost = 2
Example #11
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'gathering']
     self.base = 'empires'
     self.name = "Farmers' Market"
     self.buys = 1
     self.cost = 3
Example #12
0
class TestCard(TestCase):
    def setUp(self):
        self.card1=Card(2,"Diamond")
        self.card2=Card(12,"Heart")
        self.card3=Card(12,"Club")
    def tearDown(self):
        pass
    def test___repr__(self):
        self.assertEqual(self.card1.__str__(),'Two of Diamonds')
        self.assertEqual(self.card2.__str__(),'Queen of Hearts')
        self.assertEqual(self.card3.__str__(),'Queen of Clubs')

    def test__eq__(self):
        self.card4=Card(2,"Diamond")
        self.assertTrue(self.card1==self.card4)
        self.assertFalse(self.card2==self.card3)
        self.card4=Card(10,"Diamond")
        self.assertFalse(self.card1==self.card4)

    def test_isBigger(self):
        self.assertTrue(self.card1<self.card2)
        self.assertTrue(self.card2<self.card3)

    def test_invalidValue(self):
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),2,14)
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),2,'Two')
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),2,14)
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),"Diamond",1)
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),"Diamond","Test")
        self.assertRaises(KeyError,self.card1.__init__(2,"Diamond"),"Diamond","diamond")
Example #13
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'darkages'
     self.desc = "Gain a card costing up to 4 putting it on top of your deck"
     self.name = 'Armory'
     self.cost = 4
Example #14
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'reaction']
     self.desc = """Draw until you have 6 cards in hand.
     When you gain a card, you may reveal this from your hand. If you do, either trash that card, or put it on top of your deck."""
     self.name = 'Watchtower'
     self.cost = 3
Example #15
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'renaissance'
     self.desc = "Gain a card costing up to 4, then cards cost 1 less this turn (but not less than 0)."
     self.name = 'Inventor'
     self.cost = 4
Example #16
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'attack', 'doom']
     self.base = 'nocturne'
     self.name = 'Skulk'
     self.buys = 1
     self.cost = 4
Example #17
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'attack']
     self.base = 'darkages'
     self.desc = """+4 Coin. Reveal your hand. -1 Coin per Treasure card in your hand, to a minimum of 0."""
     self.name = 'Poor House'
     self.cost = 1
Example #18
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'attack']
     self.base = 'dominion'
     self.desc = "Gain a Gold. Each other player reveals the top 2 cards of their deck, trashes a revealed Treasure other than Copper, and discards the rest."
     self.name = 'Bandit'
     self.cost = 5
Example #19
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action']
     self.base = 'hinterlands'
     self.desc = "Reveal your hand. +1 Card per Victory card revealed. If this is the first time you played a Crossroads this turn, +3 Actions."
     self.name = 'Crossroads'
     self.cost = 2
Example #20
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Gain a card costing up to 4"
     self.name = 'Workshop'
     self.cost = 3
Example #21
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'hinterlands'
     self.desc = """You may trash a Treasure from your hand. If you do, choose one: +2 Cards and +1 Action; or +2 Coins and +1 Buy."""
     self.name = 'Spice Merchant'
     self.cost = 4
Example #22
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'hinterlands'
     self.name = 'Mandarin'
     self.coin = 3
     self.cost = 5
Example #23
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'darkages'
     self.desc = """Trash a card from your hand. Gain a card costing up to 5 Coin."""
     self.name = 'Altar'
     self.cost = 6
Example #24
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'renaissance'
     self.name = 'Acting Troupe'
     self.desc = "+4 Villagers. Trash this."
     self.cost = 3
Example #25
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'renaissance'
     self.desc = """Discard your hand. +7 Cards."""
     self.name = 'Scholar'
     self.cost = 5
Example #26
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = ['action', 'duration']
     self.base = 'seaside'
     self.desc = "Discard hand; +5 cards, +1 buy and +1 action next turn"
     self.name = 'Tactician'
     self.cost = 5
Example #27
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Trash a copper from hand for +3 coin"
     self.name = 'Money Lender'
     self.cost = 4
Example #28
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'treasure'
     self.base = 'renaissance'
     self.buys = 1
     self.name = 'Ducat'
     self.cost = 2
Example #29
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'renaissance'
     self.desc = """Gain a card to your hand costing up to 4. If it's a Treasure, +1 Villager."""
     self.name = 'Sculptor'
     self.cost = 5
Example #30
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'dominion'
     self.desc = "Trash a treasure, gain a better treasure"
     self.name = 'Mine'
     self.cost = 5
Example #31
0
 def __init__(self):
     Card.__init__(self)
     self.cardtype = 'action'
     self.base = 'cornucopia'
     self.desc = """Reveal the top 4 cards of your deck, then discard them. Coin per differently named card revealed."""
     self.name = 'Harvest'
     self.cost = 5
Example #32
0
 def __init__(self,card_string):
     self.surface_type = 0
     self.surface_id = 0
     self.surface_transform = 0
     self.surface_coefficients = []
     self.boundary_condition = self.BoundaryCondition["TRANSMISSION"] 
     self.comment = ""
     self.b_box = [0,0,0,0,0,0] # b 
     Card.__init__(self,card_string)
Example #33
0
    def __init__(self, card_string):

        self.cell_comment = ""
        self.cell_id = 0
        self.cell_density = 0
        self.cell_material_number = 0
        self.cell_importance = 1  # note any importance - we assume everything else is 0
        self.cell_text_description = ""
        self.cell_interpreted = ""
        self.cell_fill = 0
        self.cell_universe = 0
        self.cell_universe_offset = 0
        self.cell_universe_rotation = 0
        self.cell_universe_transformation_id = "0"  # if there is a cell_universe tr number it should be purged
        # and converted into an offset and rotation
        self.cell_surface_list = set(
        )  # list of cells used in the cell definition

        Card.__init__(self, card_string)
Example #34
0
 def __init__(self):
     Card.__init__(self, name='Copper', coins=1)
Example #35
0
 def __init__(self):
     Card.__init__(self, name='Province', cost=8, victoryPoints=6)
Example #36
0
 def __init__(self):
     Card.__init__(self, name='Silver', cost=3, coins=2)
Example #37
0
 def __init__(self):
     Card.__init__(self, name='Feast', cost=4, action=gainCard)
Example #38
0
 def __init__(self, number, color, rest=True, position=None):
     Card.__init__(self, number=number, color=color, rest=rest)
     self.picture = gconst.list_picture[self.ID]
     self.position = position
Example #39
0
 def __init__(self, cost, name, ability):
     Card.__init__(self, cost, name)  #super()
     self.ability = ability
Example #40
0
 def __init__(self):
     Card.__init__(self, name='Estate', cost=2, victoryPoints=1)
Example #41
0
 def __init__(self):
     Card.__init__(self, name='Laboratory', cost=5, action=lab)
Example #42
0
 def __init__(self):
     Card.__init__(self, name='Village', cost=3, action=village)
Example #43
0
 def __init__(self):
     Card.__init__(self, name='Woodcutter', cost=3, action=cutwood)
Example #44
0
 def __init__(self):
     Card.__init__(self, name='Gold', cost=6, coins=3)
Example #45
0
 def __init__(self):
     Card.__init__(self, name='Chancellor', cost=3, action=gainDiscard)
Example #46
0
 def __init__(self, card_string):
     Card.__init__(self, card_string)
Example #47
0
 def __init__(self):
     Card.__init__(self, name='Smithy', cost=4, action=smith)
Example #48
0
 def __init__(self, cards):
     Card.__init__(self)
     self.cards = cards
Example #49
0
 def __init__(self):
     Card.__init__(self, name='ThroneRoom', cost=4, action=dbl)
Example #50
0
 def __init__():
     Card.__init__(self,name="Cellar", cost=3, action=cellar)
Example #51
0
 def __init__(self):
     Card.__init__(self, name='CouncilRoom', cost=5, action=drawCards)
Example #52
0
 def __init__(self):
     Card.__init__(self, name='Duchy', cost=5, victoryPoints=3)
Example #53
0
 def __init__(self, cost, name, ATK, HP):
     Card.__init__(self, cost, name)
     self.ATK = ATK
     self.HP = HP
Example #54
0
 def __init__(self):
     Card.__init__(self, name='Mine', cost=5, action=mine)
Example #55
0
 def __init__(self, cost, name, damage, life):
     Card.__init__(self, cost, name)
     # assign parameters to the object
     self.damage = damage
     self.life = life
Example #56
0
 def __init__(self):
     Card.__init__(self, name="Moneylender", cost=4, action=lend)
 def __init__(self, rank=2, suit='', players_name=''):
     Card.__init__(self, rank, suit)
     self.players_name = players_name
Example #58
0
 def __init__(self):
     Card.__init__(self, name='Market', cost=5, action=market)
Example #59
0
 def __init__(self):
     Card.__init__(self, name="Workshop", cost=3, action=work)
Example #60
0
 def __init__(self):
     Card.__init__(self, name="Remodel", cost=4, action=remod)