Hi: I need to realize a command to perform the following tasks
split a deck in two
add one (fixed) card to one half deck
rebuild the deck
My idea is
send half deck to a temporary deck including the card to be added
add the remaining half deck on top to the temporary deck
move the cards back in the original deck
For step 1), I’ve tried to add to the Source deck a Deck Send Key Command with a Stop Condition, using the Stop Sending Expression {Target_numPieces>=Source_numPieces} but it looks like the _numPieces property is always null.
Simlarly, if I check the “limit total number of cards” and use the expression {Source_numPieces / 2} the action simply moves all the cards.
Any suggestions on how to proceed ? I know that such a task can be accomplished but my knowledge with Vassal is still quite limited.
If you’re only splitting the deck to insert the additional card, then I’d just add the card onto the bottom of the original deck. Then you just have the card shift itself up however many slots. I think the DOWN key moves the card to the bottom, and the RIGHT key moves it up by 1.
Trigger Action… Peform: add, bottom, shift
Return to Deck… Key Command: add
Trigger Action… Key Command: bottom; Perform: DOWN key
Trigger Action… Key Command: shift; Perform: RIGHT key, with loop for however many spaces up (including a random number if need be)
Apologies if I got it wrong or am remembering wrong.