LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: vacantVisionary on June 14, 2015, 09:53:01 PM

Title: Drawing cards from communal deck
Post by: vacantVisionary on June 14, 2015, 09:53:01 PM
For the life of me I cannot figure out how to set up a button to move cards to or from a communal zone. If I have any communal zone set as the source or destination zone, the button simply doesn't show up - and I've tested that my syntax is otherwise correct, because I can create a button to move between two personal zones. Does anyone know how to do this, or if it's even possible?
Title: Re: Drawing cards from communal deck
Post by: AuraDragon on June 14, 2015, 11:52:17 PM
I've noticed that the button won't show up if there is something missing from the declaration of the button.

Here's a button from the Boss Monster plugin that draws a card from the shared zone "Spell Deck", you should compare your code to this and see if you are missing a line or something.

<generalfunction>
   <label>Draw Spell</label>
   <kind>TRANSFERCARD</kind>
   <sourceowner>shared</sourceowner>
   <sourcegamezone>Spells</sourcegamezone>
   <sourceposition>top</sourceposition>
   <destinationowner>performer</destinationowner>
   <destinationgamezone>Hand</destinationgamezone>
   <destinationposition>top</destinationposition>
   <includeasbutton>yes</includeasbutton>
</generalfunction>
Title: Re: Drawing cards from communal deck
Post by: vacantVisionary on June 15, 2015, 12:00:06 AM
Ohhhh, okay, the sourceowner field had to be set to "shared". Either I completely missed that in the plugin builder tutorial, or it wasn't there - either is possible, and if the latter, it definitely should be added.
((Also the instructions for the "draw" function should specify that it moves cards from the second to the first PERSONAL zone.))
Thank you very much for the help!
Title: Re: Drawing cards from communal deck
Post by: AuraDragon on June 15, 2015, 12:49:47 AM
No problem-oh.  I'm glad that you got it working. :D

Quote from: vacantVisionary on June 15, 2015, 12:00:06 AMAlso the instructions for the "draw" function should specify that it moves cards from the second to the first PERSONAL zone.

I believe that's written down in the plugin tutorial located here:  http://lackeyccg.com/tutorialplugininfo.html

EDIT: It also seems to mention that - if omitted - the sourceowner is defaulted to "performer".