Help with a few skills

Ok, so here is what I was thinking. I was wanting to make a few skills, but have no idea how to make them, as I have no knowledge of how to script.

1. A skill that reflects back attacks (already did this part) but the enemies affected (who attacked in the first place) attack anyone for 1 or more turns. I can't figure out how to combine second part with the first part.

2. A skill that kills an enemy/enemies in a set amount of turns after activation.

3. A skill that does another effect if the enemy is already affected by a certain state.
2) Skill that activates switch that allows for troop event with variable increase per turn, kill enemies on specific variable amount

1) You'd need a scripted solution, when the game checks for surprise attack you can add a counterattack-giving state that lasts for 1+ turns. All of this if an actor has the skill learned.

3) Use damage formula to perform enemy state checks/conditions. b.state?(x)   You might need to do some research on it.
Where would I find the troop event? Is that under the troop page in the battle events, or what?
Yes, the troop event is the event page on the troop tab of the database.

For having a different state inflicted if another one is already present, try this in the damage formula box:

b.state?(100) ? b.add_state(102) : b.add_state(101);b.remove_state(100);4 * a.mat - b.mdf

you need to change the 100, 101, 102 to the ids of your states and the 4 * a.mat - b.mdf to what you want your damage formula to reflect

You need the question mark, colon and semi-colons as set out.
So far for the move that kills enemies in a set amount of turns, this is what I have so far: Time'sUpCode.png

When I use it, it says "Failed". (I'm using Yanfly's battle engine).
When I use it, it says "Failed". (I'm using Yanfly's battle engine).
You'll need to use Yanfly's Anti-Failure Message script to fix that little bit.
You'll need to use Yanfly's Anti-Failure Message script to fix that little bit.
I fixed that part, but the skill won't actually work. Does the common event starting the variable need to be running as an autorun or parallel process, and is there anything wrong with the pictured event itself?

EDIT: I got the event to run, but how would I make it automatically add the variable per turn without having to use the skill more than once?
I fixed that part, but the skill won't actually work. Does the common event starting the variable need to be running as an autorun or parallel process, and is there anything wrong with the pictured event itself?

EDIT: I got the event to run, but how would I make it automatically add the variable per turn without having to use the skill more than once?
Have you tried changing the page condition to when the end of the turn or Turn no. 1+1*X?  That might be your problem.

Might also want to try changing the span on your event page to Turn instead of battle.
Have you tried changing the page condition to when the end of the turn or Turn no. 1+1*X?  That might be your problem.

Might also want to try changing the span on your event page to Turn instead of battle.
Thank you! That worked perfectly!
Is this resolved, then, or do you still need help with the other questions?
Thank you! That worked perfectly!
Very welcome 🙂  Glad it worked.
Close this please. I have my answers. Thank you all for your help.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-few-skills.20295/