[messages] [Module Design] Funny stuff with decks

mycenae ed at crucible.cc
Fri Feb 15 00:04:15 MST 2013


Well, not ha-ha funny, odd funny.

1. In the Monopoly module, I want to be able to suppress the Sale
commands on hotels if there are insufficient houses left (that is, less
than 4 houses left in the tray). A rare circumstance, but it happens.
The hotels and houses are both kept in 'Decks' of the same name. So,
presumably, the number of pieces in the Houses deck is stored in a
property called Houses_numPieces. 

I set a Restrict Command on the Hotel prototype to hide the Sale command
if {Houses_numPieces < 4}. But it always hides the Sale commands, even
if the Houses deck is full of houses (for example, even if it has all 32
remaining). Is this the correct syntax for the condition?

2. In the same module, it turns out that according to the official
rules, the two card decks are only supposed to be shuffled once at game
start, and then never again. The order of the cards remains the same
throughout the game. (Who knew?) This seems like a natural for an
At-Start GKC to run at game launch to do this automatically. 

I have set a 'hotkey' on each deck to do a manual shuffle (Ctrl F).  

The use of 'hotkey' here, however, confuses me. Is this something that
can be done directly with a GKC? Because the at-start GKC is not doing
the trick. (I'm assuming a GKC will only affect individual pieces, not
decks themselves.)

So maybe I need to have the at-start GKC trigger some piece that has a
'Global Hotkey' trait set on it, which in turn triggers the shuffle? 

Or is it by some other method? For example, a card deck can send a
hotkey to another card deck (like having a main deck send a hotkey to a
discard pile). 

Can anyone clarify how this would be done?

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=38657#p38657


More information about the messages mailing list