Hello
I'm looking to make a skill that hurts the player/enemy on the turn after the use of the skill
The closest attack I could think of from an already existing game would be Dive/Dig/Fly from the Pokémon franchise, where the Pokémon dig's itself underground (or flies into the air, or dives underwater) for one turn, then attacks the next turn.
How would I go about making a skill like this?
Thanks in advance!
First, the only default way to count turns is by states. You would have to use a state to force the wait for the next turn, and that would be done with a two-turn duration because the first turn counted is the current turn and the effect needs to be there next turn.
In the case of the enemy you would then give it an action pattern that has the follow-up skill conditioned on the presence of that state, with an attack rate at least 4 points higher than anything else - that will force the engine to select that follow-up skill only no matter what regular skills are available.
In the case of the placer you would have that state to seal away all other skills, forcing the player to select the follow-up-skill as the only available option.
That is sub-optimal because you would still be able to use item in addition to the need to confirm the follow-up skill.
Alternatively you would need a plugin to enable automatic follow-up skills without that hassle to force the regular engine into such constructs.
Make the cast version of the skill that inflicts an invisible state on the target, and then stuns the user (a stun unique to the skill).
Then, by running an event every turn (which I would always recommend having on every troop, in any game with a battle system), check whether the user is inflicted by the special stun, and if so, turns a switch on. This switch would be turned on during the turn the skill was activated.
Then, on that turn event (put this before the part where the switch gets turned on) have a conditional branch that checks whether the switch is turned on (putting it before the switch turn on makes it so this will trigger the turn after), and then make conditional branches for each enemy to check whether they have the target state on them, and if so, force the actor to use the 2nd part of the skill to hit the enemy with the target state on them. Afterwards, remove the states and turn off the switch.
Look up the Yanfly tips & tricks for "Jump"; that's a great example of a skill that does damage a couple of turns later.