Let’s say a player has a deck of cards that is generated by drawing cards from a master deck.
Also, let’s say that their personal deck is limited to 15 cards. If they have an event that states they receive another card and they already have 15 cards in their deck, they shouldn’t be able to draw another card.
Is it possible to get Vassal to determine that a deck has a set maximum number of cards and will not allow the drawing of new cards to the deck?
A button with trigger to draw a card when deck_numpieces < 15 would work,
but it won’t prevent a manual draw and dropping it into the deck. Don’t
think there would be any way to do it beyond a really cumbersome set of
movement triggers.
That’s exactly what I was concerned about. I’m thinking about approaching it from the angle of scanning the zone the deck is in and triggering each card to advance a counter every time a card is to be drawn. If the counter hits 15, the card won’t be drawn.
Put the deck in a hidden window. Use buttons for drawing cards. Global
hotkey for deck reshuffle. Makes manual draw impossible.
Work your trigger restriction as per normal.
If its critical that you must see the deck (shouldn’t really have to
but…), you can still prevent a manual draw by using a transparent overlay
sitting on the a top layer that covers the deck area and the card’s layer,
which does not snap, stack, move, and is unselectable.
Youll be able to see the deck just not interact with it except through
buttons and key commands from outside the overlay
Your first idea isn't practical as it's a CCG and all cards need to be visible and accessible.
However, you're second suggestion ...that's an interesting angle. I might be able to use that.
The second idea is no different from the first except for the visibility of the deck. In each case the deck is rendered inaccessible to manual drawing or right clicking. Any commands that manipulate the deck (i.e reshuffle, send to other deck or deck GKC) must exist outside of it relayed somewhere else by 3rd party to its hotkey/key command
Sorry. Accessible was the wrong word to use. What I meant is that the deck needs to be seen as they’ll be a counter next to it showing the number of cards in the deck that all players should be able to see. I could still hide the decks, I suppose, but if I use a blank overlay, I don’t need to go through the trouble of setting up a hidden window. …not to mention the fact that the card table graphics are zoned with the current decks and are already complete and in place.
I just put a Do Not Stack trait in the card prototype with select as normal and move as never. The cards can still be moved around by buttons and triggers but they can’t be dragged. I can maintain an accurate count in a deck with that.