News:

A forum for users of LackeyCCG

Main Menu

Card Functionality

Started by Jynks, March 04, 2014, 05:41:29 PM

Previous topic - Next topic

Jynks

I am still not sure where the documentation for scripting is...

I am working on a Android Netrunner as well as a New Call fo Cthulhu plugin and both require cards to come in tapped and flagged so they do not untap during a refresh all.

Now I know there is

<cardfunction><label>Turn Over</label><kind>TURNOVER</kind></cardfunction>
<cardfunction><label>Doesn't Untap</label><kind>TOGGLETURNALLIMMUNITY</kind></cardfunction>


And I can link them to a hotkey and then make a Chat Macro button with something like...

!Install Ice!/f11;/f12;/say Installed

Still this seams like something that scripting could be used for?

What would be the best way to add a functionality like this?

For ANR
- The card needs to come into play face down, tapped and set to not untap during "refresh all" (preferably with out the little red box icon)

For CoC
- The card needs to come into play face down, tapped 180 and set to not untap during "refresh all" (preferably with out the little red box icon)
- The card needs to come into play face down, tapped and set to not untap during "refresh all" (preferably with out the little red box icon) (yes this is a separate button)

Any ideas if the scripting system can do this, and where can I find the scripting documentation. I couldn't see it in the main page.

Jynks

#1
Hey I found the script thread..... just to check....

Quote from: Trevor on August 16, 2013, 02:39:47 PM
<s><a>y</a><l>Initialize counters</l><f>/ccgreen=3</f></s>
<s><l>+3, Spawn 2 sheep</l><f>/ccgreen+3;/spawnx2 Sheep Token</f></s>
<s><l>-2, Draw 2 cards</l><f>/ccgreen-2;/d2;/s eating sheep!</f></s>

Just to confirm... you would put a new column in your carddata file called "Script" Then in that column you would paste the above text, with the carriage returns and everything? Then the <a></a> part will automatically trigger when you drag the card onto the table?

Just some Questions...

1) There doesn't seam to be a corresponding slash command for flipping a card to its back, or setting the do not untap flag?
2) If the "flip" function did exist would the card be monetary visible to other players, or is there a way to script the coming into play functionality that you can set with the buttons...

EG: This is from the general function of my LoTR plugin...

<generalfunction>
<label>Draw Encounter</label>
<kind>TRANSFERCARD</kind>
<sourceowner>shared</sourceowner>
<sourcegamezone>Encounter</sourcegamezone>
<sourceposition>top</sourceposition>
<destinationowner>table</destinationowner>
<destinationposition>faceup</destinationposition>
<includeasbutton>yes</includeasbutton>
</generalfunction>


In fact, is there a way to add the "never untap flag" and the "tap 90degrees" to a general function?... I mean they are "card functions" so I guess they can be? This might be the way to do it... The problem is that it draws from the top of the hand, deck or w.e... you can not select a card and then press the button.. (or can you?)

I think scripting would still be the best way to go if I could set "never untap" and "tap 90" in the script... as you could ctrl+click to trun the card over while it is still in your hand before dragging to the table.

Jynks

#2
I have almost got this working.. there is just one thing I can not work out...

In my plugin.txt file I have these card functions...

<cardfunction><label>Tap</label><kind>MAKERIGHT90DEGREES</kind><includeasbutton>no</includeasbutton></cardfunction>
<cardfunction><label>Turn Over</label><kind>TURNOVER</kind><includeasbutton>yes</includeasbutton></cardfunction>
<cardfunction><label>Lock</label><kind>TOGGLETURNALLIMMUNITY</kind><includeasbutton>yes</includeasbutton></cardfunction>


They appear as 3,4,5 in the right click menu when you right click on a card.


Then for the ICE I have a script..
<s><a>y</a><l>Ice</l><f>/cardfunction4;/cardfunction3;/cardfunction5</f></s>

Now when you drag the ice to the table, it automatically, flips it face down, taps it and sets it so it will not untap on refresh. The problem is that the chat log for the opponent gets told the card name...

In this image the right hand image is the "opponent" player and the left image is the "person playing the card" as you can see both logs tell the players the card names.

ANR requires hidden information so we need to be able to put cards on the table with out the card names being shown in the log... is there a way to do that?


I have this already in the text file.

<definition><kind>MULTIPLECARDBACKSNAMESVISIBLETO</kind><value>owner</value></definition>

IF you ctrl+click on the card while it is in your hand to flip it and then drag it to the table, it doesn't announce to the chat window.. but then the scripts to not fire.

ALSO

I can not seam to get rid of the "PEAK AT CARD" function.....
[/img]

This is like the shift+mouseover... it allows the opponent to peak at the card, this is always hidden.

Jynks

I gave up on all this... just ctrl+click while the card is in your hand.. drag to the table, double click to tap, right click, lock....