[messages] [Module Design] Re: Random Selection

mycenae ed at crucible.cc
Sat Jan 7 08:33:08 MST 2012

I can think of two ways to do this:

Simple: create a dice button with a number of sides equal to the max
cards in a player's hand (for example, 6).  Each time you need to
discard a random card, click the button. Count a number of cards off
from the player's hand and discard that card. If the die roll exceeds
the number of cards in your hand, re-roll.  (For example, if the player
has 4 cards laid out left to right, roll the die. If you roll a 2,
discard the second card on the left. If you roll a 5, re-roll until you
get something from 1-4.) Maybe not the most coolest solution, but it's
simple to set up and play.

More complex: create 1 empty deck for each player that is set to random
shuffle (call it a shuffle deck). Put a Return to Deck (RTD) trait on
each card that returns the card to each player's private shuffle deck,
and another RTD that moves the card to the discard pile. To each shuffle
deck, add a Deck GKC that will apply the Discard RTD command to 1 card. 

When it's time to discard a random card, use the first RTD to move all
the cards to each player's shuffle deck. (You could set up a Global Key
Command button to do this for everyone at once.). Then right-click on
each shuffle deck and trigger the Deck GKC...this will have the effect
of moving 1 random card from the shuffle deck to the discard pile.
Players can now retrieve the remaining cards from their shuffle deck and
play resumes.

Read this topic online here:

More information about the messages mailing list