Draw Bottom Card of Deck

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! :slight_smile:

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. :smiley:

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. :frowning:

1 Like

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}.