RMMV Special Attack "When Low HP Only" Question

Hi everyone,

Is it possible for me to make some sort of Desperation / Last Stand skill for a player to use, such that the skill is only usable when the player has 25% or lower HP? (Either can't use the skill at all when they have higher HP, or the skill basically does nothing if they use it with higher HP?) I want this skill to do a significant amount of damage, but conditioned by requiring the player to have lower HP. Thanks!
The second case (the skill is worthless if you have higher HP) is easy with the damage formula box. The first case (can't use it at all with higher HP) probably requires a plugin.

As an example, this formula would make them deal very little damage with high HP and a whole lot of damage with low HP:

JavaScript:
(a.mhp - a.hp) * a.atk / 100

The key part is (a.mhp - a.hp) which is the amount of HP they've lost, so it gets larger as their HP gets lower
That's a super-useful formula that's close enough to what I'm looking for, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-special-attack-when-low-hp-only-question.123140/