Send to deck based on user_name

Hi,

There is one common deck where everyplayer draws cards, and every player have his own discard deck. Every player must discard to his own discard deck. So I would need a “Send to Deck” trait but target desk must be based on that atribute.

Many thanks in advance

Unfortunately, I don’t think the Return to Deck trait lets you use a property to vary the deck you’re returning to, so you would need to add multiple Trigger Actions to trigger different Return to Deck commands based on the current player. For example, if your sides are “Red”, “Green”, and “Blue”, and the discard decks are called “RedDiscard”, “GreenDiscard”, and “BlueDiscard”, you would need 3 Trigger Actions; the first would trigger when PlayerSide=“Red” (or {PlayerSide==“Red”}, if you prefer Beanshell syntax), and would trigger a Return to Deck trait that sends to the RedDiscard deck. Green and Blue would be similar.

Funny that you asked because I had the same problem. Return-to-deck doesn’t work because you can’t dynamically select a deck.

Instead, use send-to-location. Set the pixel coordinates for send-to-location as exactly that of the deck’s pixel coordinates. In my case, each deck had the same location in each map window, so all I had to do was dynamically determine to which map window it had to go.

BTW, don’t send-to-region. That won’t work even if the region is identical to the deck’s pixel coordinates.

That’s interesting because I found out today that when you report by gridLocation, a region defined on a deck’s pixel coordinates is indeed ignored and instead LocationName reports as the Deck Name. Tying these two pieces of info together, I wonder what would happen if you tried to do a Send to Location using the deck name as the region name ? I assume that you’d need to have a zone around the deck that reported as $gridLocation$.

Mark

I tested sending a card to a region, which was also a deck location. The card appeared with the deck but not in the deck. It was sort of like the movie “The Fly,” where a person was part human and part fly. I considered the region/deck (a reck) to be an abomination and quickly exited. But the deck name did not replace the region name. It still knew about the region.

Sending to a deck via send-to-location makes me uncomfortable though because it’s a trap. A year from now I might want to “move the furniture around,” and if I move the deck, everything will go to hell. To quell my concern, I added markers to the card prototype call “deckX” and “deckY” and sent to those coordinates instead. That’s to remind the older me that those send-to coordinates are not just pulled out of air. They MEAN something.

I’m going to derail this thread a tad to say I wish Vassal had a “comment” trait whose only purpose would be to let me write explanations to myself so the older me in the future, when looking at this stuff say: “what were you thinking, dumb ass?”, I will have an answer.

1 Like