Man, I have a lot of questions lately about states, don't I? Sorry...
My idea: An Eruption state. You know, like a volcano.
Lasts three turns, but the first two turns don't do anything but build tension underneath the foe (kinda like maybe a "Doom" spell?) (though if it does do damage, it's VERY miniscule probably, hot feet and all that) until the third turn, which has the foe being effected by massive Fire damage and then the state goes away, of course.
Is this possible?
Use Yanfly's lunatic states. Set it to last 3 turns, and have it do a custom regeneration effect to do the hp damage per turn (or the chance to do damage), Then, use a custom remove effect which does the massive damage when it is removed due to time running out (make sure to use the right one for that, as there is also the remove effect for when it is removed by other means, and if you do that it would erupt when it is cured).
Hmmm... could I do this as an action sequence too? That might be fun. Or does that only apply to Skills not States?
The skill will need to add 2 states to the enemy, 1 that lasts 2 turns and heals the target by x%, then a 2nd that heals by -x% and lasts the 3 turns. Getting an animation to play as the state ends is probably going to require a script though.
I never said it was a healing move though... Besides, having it do massive damage for all three turns isn't what I want and I don't see why I need two states.
The first state negates the damage done by the 2nd state for 2 turns.
But the it doing minuscule damage before the big eruption is just an idea. What if I don't want it doing harm at all before it goes boom?
Then you make the hp regen and the negative hp regen rates the same.
I'm still not getting what you mean here.
What I want is to have it just be three turns, but the first two turns do no damage to you (just say a line of text about how the lava is rising or whatever), and it's ONLY the third and final turn where the damage happens. If I have two states, then it's technically five turns not three, and the three turn one makes it sound as if you want damage on all three, which is not what I want, and the two turn one makes the three turn one sound useless.
The "healing" state that lasts 2 turns is just there to cancel the damage that the "damage" state is doing. Then it runs out a round early which means the damage takes full effect on the third round.
You could also do it my way, and in the lunatic code add the damage only to state removal. As long as you have it set to remove on 3 turns, it will work.
You're {} are mismatched. There is no } in the regenerate effect, and there are two } in the remove effects.
On another note, that will never KO the target, unless they have really low HP, as your damage is 1/50th of their current HP, or 2% of their current HP. Not sure if you intended that, but if you did I'd never worry about that state as 2% of my current HP is nothing to sweat about.
Oh...
No, I intended to do lots of damage. Crap. That's what I get for just trying to copy-paste some of Yanfly's code from other states I made, then. *sigh* I clearly don't know what I'm doing... 🙁
Easiest way to fix the damage:
In the line that says var damage =, after the = sign put in the damage formula you wish it to use. Or, you can use a flat damage. Want it to always do 1000 HP? Then use
var damage = 1000;
Or, want it to do damage equal to 10 times the Magic attack of the caster of the state? Use this:
var damage = 10 * origin.mat;
Don't forget the ; without one, you will always get a syntax error.
Things to note is origin.x is used to get the stat of the caster (x is the stat you wish to use), and target.x is used to get the stat of the target the state is applied to (x is the stat you wish to use). Otherwise, treat it just like you do a damage formula in the editor.
Only if you add code for that (and I don't know the code for that one, sorry). Though I am amazed you are not crashing on the regenerate effect, as you are doing target.hp / 0, which is undefined. Maybe change that to just 0. Though, if you want no damage, just delete the custom regenerate effect too, as it is not needed unless you want it to do damage.