Need help with creating more gimmicks for a boss.

I've got most of the stuff down for the latest boss I'm creating. However, there are two gimmicks I need to address. Not sure how simple it is, so I'll just describe them as best I can.

The first is a move that takes multiple turns to activate. Think "Bahamut's Megaflare". For those who don't know what I'm talking about it goes something like this: The boss gets ready to pull out his ultimate move...and a countdown begins...

Turn 1: 5
Turn 2: 4
Turn 3: 3
Turn 4: 2
Turn 5: 1
Turn 6: Megaflare

And then BAM! The attack hits and does massive damage. I'm planning on having the boss use a move like this once he gets weakened. How do I trigger something like this to occur...especially over the span of multiple turns?

The second involves form changing. This was one of those things I thought I managed to peg down...until I didn't. Basically what I wanted to do was have him change forms every four turns within the fight (the exception would be when he starts to use his "megaflare," but that's another story).

My first approach was to have him change forms using a Troop Battle event:

Turn 1 + 4x - Transform to Form B
Turn 5 + 4x - Transform to Form C
Turn 9 + 4x - Transform to Form D
Turn 13 + 4x - Transform to Form A

And guess what? It worked! Up until Turn 17. Then he turned into
Form B->C->D->A. See the flaw in that?

My second approach was to set up a common event mixed with some states.

Basically it went something like this:
If State A
Transform into Form B
Remove State A
Add State B

If State B
Transform into Form C
Remove State B
Add State C

If State C
Transform into Form D
Remove State C
Add State D

If State D
Transform into Form A
Remove State D
Add State A

Thing was, It only worked one time. After that, the boss stopped transforming once he reaches Form B. What am I doing wrong here?
my guess is the looping of turn 1 +4x as it last for 4 turns.
on turn 13 +4x, it stops on turn 17 and if you want to keep
the last form, you probably need turn 13 +x (for the rest of the turns).
as turn 1 cannot happen again unless you restart the battle.

there is a way to make a loop if you want to do that, but I didn't mess
with the battle system yet as mine will be set up in a very different way.

but the countdown is something I saw before, but do not know how they
set it up.

it might be setup as lunatic code for state added on turn 1 and countdown.
and if the state = 0, is uses the skill (lunatic coding).

there are people good in lunatic code, but maybe there is a tip and trick
with similair effect and easy to modify.
Rather than doing it like that, why not just have the one 1 + 4x battle event that checks the boss' current form and changes it to the next one along?
Rather than doing it like that, why not just have the one 1 + 4x battle event that checks the boss' current form and changes it to the next one along?
Makes sense.

But how do I check what the current form is?

EDIT: I think I figured something out. It's doing one of the forms out of order, that's what's messing this whole thing up. It's going from A->D instead of A->B. I need to figure out how to fix that.

EDIT: I've figured another something out. It's not going from A->D. It's going from A->B->C->D all in one go. It's not cycling through the forms like I want it to, It's doing them all at once because it's on the same turn. I need to find a way to have the system check which form it's in and transform it to the next one...but I have no idea how to go about doing this!
Perhaps a variable could help with that. I think?
I handle turn countdown (and let players delay it) by having a turn end event page in the troop that increments a variable (by forcing a battle action to do a move that uses a common event, so I can display stuff up in the battle log), and a second event page that fires the attack when that variable reaches a certain number.

This has the benefit of being able to have things like enemy damage and death/state infliction affect that variable as well, so you can have the entire fight be trying to put off this mega party-wipe attack by doing things you know affect that variable.
Makes sense.

But how do I check what the current form is?

EDIT: I think I figured something out. It's doing one of the forms out of order, that's what's messing this whole thing up. It's going from A->D instead of A->B. I need to figure out how to fix that.

EDIT: I've figured another something out. It's not going from A->D. It's going from A->B->C->D all in one go. It's not cycling through the forms like I want it to, It's doing them all at once because it's on the same turn. I need to find a way to have the system check which form it's in and transform it to the next one...but I have no idea how to go about doing this!
Either check the id of the enemy object or use a variable to track it. Either approach is viable but the first one means you don't need an extra variable for it.
A variable! Of course! Took me awhile to figure that out.

However, the variable wasn't enough. I also had to set the shift changes inside a series of If/Else loops.

I also managed to apply the same thing with my countdown...which will occur once the boss reaches 30% HP. Thanks for all your help guys!

Another boss down for me!
Glad to hear it, Teach!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-creating-more-gimmicks-for-a-boss.152641/