Complex deck actions

Me again, problems with some complex card/deck actions this time. The game is Advanced Civ (TAHGC, 1991), I am talking about the trade cards here.
Desired behaviour: Cards can be drawn from one of 9 stacks to player’s hands (or anywhere) and discarded from there (or wherever they may be) to a decicated discard deck (i. e. 1 discard deck per draw deck). It is the responsibility of a side called “Setup” to shuffle the 9 draw decks before game start, and nobody else should be allowed to shuffle them while the game runs. The discard deck should reshuffle itself when sent back to the draw deck (return to deck action); it should go under the draw deck, but not shuffle itself into it. It would also be nice to restrict the “return to deck” to a specific side (e. g. the Setup side mentioned before).

More: Some of the cards (calamities) do not only have a mask trait (CTRL-F, card back/front) but also a layer trait (CTRL-D, to show details about the card content when desired by the current owner). The layer trait should be reset to 0 (deactivate) on discard, otherwise it turns out that the card is showing the layer 1 (i. e. its open information in detail) when placed face-down on the deck.

There are some things that I do not know how to do:

  • How to force a shuffle of the discard deck immediately before returning to the deck?
  • How to put the discard under the original stack?
  • How to re-set the layer trait on discard or (better) on return to deck?
  • How to restrict the shuffle and return to deck commands to one side or user?

I have pretty much bogged down while trying to get all this going,and I did not succeed. Can someone please point me in the right direction? For what its worth I have put the module to flyhi.de/transfer/AdvancedCivili … 1-dev.vmod

…and yes, I know, some of the things may fall under the “don’t automate too much” warning, but not all of them.

How to force a shuffle of the discard deck immediately before returning to the deck?
How to put the discard under the original stack?

based on your info these two go together - send the discard deck “a” to a temporary deck “b” that shuffles the discarded cards, meanwhile also send the original deck “c” to a temp deck that does not shuffle “d”. then send the shuffled temp deck “b” to the original deck “c” and finally return the original temp deck “d” back to the original deck “c” so it places these cards on the top of the pile

Hello Tim,
thanks, I guess this would work. No problem to do it manually, given the avarage time per turn in Adv Civ. So I just need 2 “temp” decks, but I can use these for all 9 original decks… no, 2 per stack if I do not want to enter the target deck each time. Well, what the heck, what’s a few more decks. It also solves the problem “restricted shuffle” since the draw decks are non-shuffling. Thanks!
And… the complexity of the process is also a nice insurance against users doing it on their own :slight_smile:

Actually I think I can streamline this if the users play all their cards to a “green table” (map zone); they always play them open, there are no discards from the hand. From there, a “Master” side (janitor) discards the cards played to the “private” and shuffling discard decks; since each card knows where to discard itself they will sort themselves into the right discard decks. Then the affected draw decks go to the temp storage, the discards to the draw decks, and finally the temp cards on to of the draw decks.
Draw decks are non-shuffling, discard decks are “always” shuffling, and it does not matter if the temp decks shuffle.

That’s what I will try.

Re-set layer can use a ‘ends movement’ key command for that map (last property)… with trigger action trait to switch layers when appropriate. For example if matching properties is current location being the discard deck, then it would fire the key command for level 0. Or instead (or also) have the trigger action tied to the same key command as your discard or return to deck key.

The map ‘ends movement’ key might be another way to send the discards to bottom of its draw deck. Use a trigger action tied to the map’s key triggering the DOWN ARROW key, with matching properties: old location is the discard deck and current location is the main deck. I think that might work, but maybe not. They may even arrive randomly placed if from an auto-shuffle discards deck, but again not entirely sure about that either.

Thanks again for the additional option! I’ll try them… probably tomorrow. I’ll post what I found.

Success. Followed your instructions, and it worked as expected. Thanks again!