Is there a way to draw the bottom card of the deck? Can I somehow use the deck position trait?
There is a âReversibleâ command in the deck properties. To draw the bottom one you can either just enable that and do it manually, or set up a trigger âDraw Bottom Cardâ to reverse the deck, draw the top card to whatever location you want it drawn, then reverse it a second time.
I tried that, but it didnât work. I will have to keep working on it.
If your deck is set to âReshuffle: Alwaysâ that might cause a problem for you.
Nope, set to Never.
You can do this with a Deck Global Key Command â set it to affect âAll piecesâ, and use a âMatching propertiesâ expression like this:
{DeckPosition > ExampleDeck_numPieces}
(where ExampleDeck is the name of the deck). Note that the comparison is > rather than == because there seems to be a bug in Vassal (v3.2.15) causing the reported DeckPosition to be one greater than it should be (e.g. the first card has DeckPosition â2â).
Iâve attached an example module to demonstrate this.
Thank you so much, I will check this out!
I think this is showing as a Layers Example, unless Iâm missing something.
Sorry, had a filename mixup - try this one.
Thank you!! Got it working.
The links to example module is missing. Can anyone explain how to draw bottom card from deck with a Deck Global Key Command?
Note that this âoff by 1â bug was fixed in a recent version (3.5.x, I believe), so now the correct check would be {DeckPosition == ExampleDeck_numPieces}
, and any modules using this work-around are probably now broken.
This is interesting though. I have been using reverse deck, deal, reverse deck again, and that has been causing some weird bugs sometimes. I should probably switch to {DeckPosition == ExampleDeck_numPieces}.