Skill eventing/plugin use help

Hey all,

So, I have a character that uses a skill similar to Pokémon's Rage or, more accurately, Seven Deadly Sins Derriere's Combo Star. Here is what I am trying to accomplish:

1. The ability, Enrage, will be used to give the user a state of Monstrous Rage.
2. The ability will not be available for use while the state is in effect.
3. While the user is in this state, if they successfully hit an enemy they will deal damage+=(numOfHits*a.level) (I have low levels in this game, max of 4) the goal being to increase damage on each successful hit.
4. If the user is stunned, slept, misses, or anything that prevents them from attacking that turn then the combo is broken, the state is removed, the numOfHits is reset, and most importantly... the ability is now on a 2 turn cool down.

I have managed to accomplish everything above using troop events, my own custom plugin for determining the battle formula (for purposes of doing cool stuff like this, among other things), and Yanfly's plugins (Skill Core, Skill Cooldown, and Instant Cast). The only piece of this skill that I need help on, is setting that 2 turn cool down after the ability becomes available again. So here is an example of expected behavior:

1. I use Enrage (instant cast) and my character gains the state of Monstrous Rage.
2. Enrage is now grayed out.
3. I attack with a standard attack and deal appropriate damage.
4. Next turn, I attack again and deal appropriate damage+1.
5. The next turn after that, my character is stunned by an enemy.
6. The Monstrous Rage state is removed, everything is reset, and now Enrage should be on a 2-turn cool down.

Thoughts on how to accomplish setting the 2-turn cool down? I feel like there is a function I can call in Yanfly's Skill Cooldown called addCooldown where I can "add cooldown on demand" but I haven't been successful in actually appropriately calling that function... Also open to other ideas 🙂

Thanks in advance!
can you add a different state to the user when the rage state is removed?
call that new state "cooldown skill xy", have it last 2 turns more and block/seal the skill enrage during that time.
And if I don't add an icon on that state, I could keep it "invisible". Worst case scenario, if I can't hide it I'll just call it something like "Fatigue" which will yield that cooldown setting. I'll give it a spin when I get home. Thanks!


Edit: I misinterpreted your advice. So, I have 8 other characters that have "special abilities" that leverage the Yanfly cooldown feature. If I lock Enrage down using the seal skill setting, then it will look different than all other skill cooldowns. Alternatively, I could change all of the others to gain such a state (for consistency) but I like the turn counter on the skill itself that Yanfly's feature provides. Good idea though. I wonder if I could somehow add a cooldown to the Enrage skill by adding a new state...

Edit #2: It took awhile but I finally figured out a method to accomplish this. No second "fatigue" state needed. Basically I added all the reset & cooldown logic under the Custom Remove effect on the Enrage state. Something that Yanfly's documentation for skill cooldowns doesn't tell you is that you can call the addCooldown like this: user.addCooldown(13,2); 13 is the state number and 2 is the amount of turns it will now be on cooldown. You do "add" instead of "set" because set means you have to use the ability first for it to take effect. "Add" is right now. Well... that took a month, lol. Hope this helps others.

Original thread: https://forums.rpgmakerweb.com/threads/skill-eventing-plugin-use-help.94973/