MZ VS Skill Cooldowns go down when hitting enemy weakness

I understand if I can't receive much help since these are paid plugins.

I'm using VisuStella's Skill Cooldowns plugin as well as a variety of their other plugins. The other main plugin I'm trying to use in conjunction is VisuStella's Press Turn Battle plugin.


I'm trying to figure out a way to reward the player by lowering all Skill Cooldowns by 1 turn if you hit an enemy with their weakness. The way PTB basically works is when you hit an enemy's weakness you are rewarded with bonus actions.


So if Slime is weak to Fire spells. And I have Fire Spell 1 and Fire Spell 2. Fire Spell 1 is on cooldown for 1 turn. Fire Spell 2 is ready to use. I cast Fire Spell 2 on Slime. Fire Spell 1 cooldown is lowered by 1 turn which now makes it available to use.


This is the available JS notetags that VS has available relating to Skill CDs.
Code:
<JS Cooldown>
 code
 code
 turns = code
</JS Cooldown>

- Used for: Skill Notetags
- Replace 'code' with JavaScript code used to determine the base cooldown
  for this skill.
- The 'user' variable refers to the user about to perform the skill.
- The 'skill' variable refers to the skill being used.
- The 'turns' variable refers to the finalized cooldown value.

<JS On Cooldown Update>
 code
 code
 code
</JS On Cooldown Update>

- Used for: Skill Notetags
- Replace 'code' with JavaScript code to perform various actions whenever
  the skill's cooldown updates.
- The 'user' variable refers to the user about to perform the skill.
- The 'skill' variable refers to the skill being used.
- The 'turns' variable refers to the finalized cooldown value.

<JS On Cooldown Ready>
 code
 code
 code
</JS On Cooldown Ready>

- Used for: Skill Notetags
- Replace 'code' with JavaScript code to perform various actions whenever
  the skill's cooldown hits 0 and becomes ready.
- The 'user' variable refers to the user about to perform the skill.
- The 'skill' variable refers to the skill being used.

Any help appreciated and happy to donate to someone who can help me get it working.

Original thread: https://forums.rpgmakerweb.com/threads/vs-skill-cooldowns-go-down-when-hitting-enemy-weakness.147185/