Stuck on a skill.

For one of my skills I want to make it so the next attack they take that does fire damage will do double damage, then I want them to go back to taking normal damage from fire attacks. How would this be done as a state would just wear off after turns or damage but I want it to stay on until they specifically take fire damage and then they'd go straight back to normal. Is this something obvious that I'm missing or does this need a more complex solution?

I have no idea if this is in the right place as this is my first post on here.
this will require a plugin as the normal state effects don't check for damage element.
this will require a plugin as the normal state effects don't check for damage element.
Any idea which one I'll need to use?
In the state's Notes, add the next code. You will require Yanfly's Buffs and States core:

Code:
<Custom React Effect>
// Get the fire element ID.
var fire = 2;
// Check if fire damage is dealt.
if (this.item().damage.elementId === fire) {
  // Remove the status effect from target.
  target.removeState(80);
}
</Custom React Effect>

You'll need to change the numbers of your Fire element ID (var fire = X) and your State (target.removeState(X)).
Also, you will need to add in the state parameters the fire multiplier by 200%.
I hope this helps.
EDIT: I changed this like 5 times, I'm very perfectionist XD.
In the state's Notes, add the next code. You will require Yanfly's Buffs and States core:

Code:
<Custom React Effect>
// Get the fire element ID.
var fire = 2;
// Check if fire damage is dealt.
if (this.item().damage.elementId === fire) {
  // Remove the status effect from target.
  target.removeState(80);
}
</Custom React Effect>

You'll need to change the numbers of your Fire element ID (var fire = X) and your State (target.removeState(X)).
Also, you will need to add in the state parameters the fire multiplier by 200%.
I hope this helps.
EDIT: I changed this like 5 times, I'm very perfectionist XD.
Thank you for this, really helpful!

Original thread: https://forums.rpgmakerweb.com/threads/stuck-on-a-skill.122191/