News:

A forum for users of LackeyCCG

Main Menu

Help Request: How to speed up the turns

Started by Vegetto1624, March 04, 2021, 05:01:36 AM

Previous topic - Next topic

Vegetto1624

Hi, I'm new to Lackey. I created my own plugin, but there is a problem with my card game: due to the several statistics/ability/attacks of the cards, the turns are very slow because the player have to calculate manually the results of the damage, health, etc.

Can you guys help me to achieve a way to automatically calculate the results of the cards attacks? Maybe it needs only a few string of code, but I don't know where I have to go to do that. Below I explain how it have to function:

The damage of an ability is calculated by: (Strengt + Ability Power) x dice with 6 faces. Example: X has 4 strengt and want to use his ability "Fist" which has 5 ability power. I roll a dice and the results is 2, so I have to calculate (4+5)x2 = 18 damages.

Thanks to everyone who decides to help me ^^

CrazyChucky

Unfortunately Lackey scripts can't actually do the math for you, but they can output fixed messages and roll dice.

For instance, for the example card X, if you give it this script:

<s><l>Use Fist</l><f>/say Fist: Damage = 9 x;/rolld6</f></s>

Then the script will be available when you right-click on the card. (Shown here on an existing Magic card just as an example)
Image 1

Clicking on it will print its text to the chat log, then roll the die.
Image 2

(We used to be able to embed images here, but it looks like that's not currently working.)

Vegetto1624

Thanks @CrazyChucky I tried to learn scripts and I did something like this:

<s><l>Ability 1</l><f>/roll*30</f></s>

but it doesn't works. Is there a way to add the function of multiply to Lackey??

I need also to make cards health change after declaring the damages. For example:
My card has 300 hp, the opponent says his attack did 100 damages. Can I add a button where I can write a number that modify the health text of the card (that I wrote on the .txt file)? Otherwise a button similar to that you use to change player's LP but it modify the card's health.

CrazyChucky

#3
Unfortunately no, dynamic calculations aren't possible. Ultimately, Lackey is a table-simulator, not a game engine. It's not really designed to do much beyond what you could already do at a physical table, with a stack of cards and some dice.

Changing a card's health sounds like you want to use counters. You can make buttons that add or remove counters, or let the user decide what number to set them to.