VASSAL Reference ManualHome > Module > Map > Deck |
Deck![]() A Deck functions like a deck of playing
cards. Each game begins with the contents of the Deck as
specified
in the Configuration window. During a game, players may remove
cards from the deck by clicking on the deck and dragging the
mouse. This removes the card from the Deck and assigns ownership
to the dragging player. Dragging a card onto the deck adds it
back
to the Deck.
In previous versions, a Deck was used for fixed pools of standard counters as well. The At-Start Stack component is now recommended for this use. Name: The name of a Deck is not used during game play. It is just used for identification in the module editor. Belongs to board: If a name is selected, the Deck will appear on that particular Board. If a game does not use that Board, then the Deck will not appear. If "<any>" is selected, then the Deck will always appear at the given position, regardless of the boards in use. X,Y position: The position in the Map Window of the center of the deck. If this Deck belongs to a Board, the position is relative to the Board's position in the Map Window. Width, Height: The size of the "tray" holding the cards. If the Deck is empty, this determines the area into which players may drag cards to add them back to the Deck. It should be set to the same size as the cards the Deck will hold Allow Multiple Cards to be Drawn: Adds a right-click menu entry that prompts the user to specify the number of cards to be drawn from the deck with the next drag. Allow Specific Cards to be Drawn: Adds a right-click menu entry that prompts the user to examine the deck and select exactly which cards will be drawn from the deck with the next drag. Contents are Face-down: Determines whether cards in the deck are always face-down, always face-up, or can be switched from face-up to face-down with a right-click menu entry. Face Down Report Format: A Message Format that is echoed to the chat text window whenever a player selects the "Face Down" menu item (if enabled above): deckName is the name of this deck, commandName is the name of the menu item. Draw new cards face up: If checked, then cards drawn from this deck will be placed face-up on the playing area. If un-checked, then cards in a face-down deck are drawn face down and owned by the drawing player. Re-shuffle: If set to "Never" then cards remain in their original order; cards are drawn from and added to the top. If set to "Always" then cards are always drawn randomly from the deck. If set to "Via right-click menu" then a "Shuffle" entry is added to the Deck's right-click menu. Re-shuffle Report Format: A Message Format that is echoed to the chat text window whenever a player selects the "Shuffle" menu item (if enabled above): deckName is the name of this deck, commandName is the name of the menu item. Reversible: Adds an entry to the right-click menu that reverses the order of cards in the deck. Reverse Report Format: A Message Format that is echoed to the chat text window whenever a player selects the "Reverse" menu item (if enabled above): deckName is the name of this deck, commandName is the name of the menu item. Draw Outline When Empty: Whether to draw the "tray" for the cards. The "tray" is a rectancle of size width,height centered at x,y. Only drawn when there are no cards in the deck, to indicate where to drag cards to place them back in the Deck. May not be necessary if the Map Window contains a board onto which the tray is already drawn. Color: The color of the rectangle representing the "tray" above. Include command to send entire deck to another deck: If checked, the popup menu for this deck will include a command that sends every piece in this deck to a designated deck. For example, this can be used to reshuffle a discard pile into its original deck. The following three attributes all refer to this option. Menu Text: The text that appears in the popup menu. Report Format: A Message Format that is echoed to the chat text window whenever a player selects the "send to another deck" menu item (if enabled above): deckName is the name of this deck, commandName is the name of the menu item. Name of deck to send to: The name of the deck that the contents will be sent to. EXAMPLE: An ordinary deck of playing cards for, say, Crazy Eights would be set to: Allow Multiple = false, Allow Specific = false, Face Down = Always, Re-shuffle = Always, Reversible = false. The discard pile would be: Allow Multiple = false, Allow Specific = false, Face Down = Never, Re-shuffle = Never, Reversible = false. A Deck may contain any kind of Game Piece, so it can also be used for draw piles of chits or counters that are drawn randomly and whose total number are limited by the game. If the counters do not need to be selected randomly, use an At-Start Stack. EXAMPLE: A strategic game in which a nationality has a fixed force pool of variable-strength Infantry, Armor, etc. counters can be modeled by making a Map Window representing the force pool, with a Deck of Infantry counters, a Deck of Armor counters, etc. The decks would be set to Allow Multiple = false, Allow Specific = false, Face Down = Never, Re-shuffle = Never, Reversible = false. In order to guarantee that the number of each type of counter is fixed, the Clone and Delete functions of the Infantry and Armor counters should be disabled. Sub-ComponentsCardA Card is identical to a GamePiece, but is initialized with a Mask trait appropriate for a playing card. |