Attack power of a move increases when hit

Is there a way for a skill's power to increase after being hit by an enemy? I'm thinking of the Rage move from Pokemon:
the user can't perform any other move but Rage once selected but every time the user gets hit, the move increases in power.
I can't seem to find a formula that works.
You can do this using Buffs & States Core and Auto Passive States if you have them; give the character with the skill a passive state with a custom react effect which increases the value of a variable for the skill, then incorporate that variable's value into the skill formula.
figured I had to go custom, I'm not too skilled in that area yet 🙁

Original thread: https://forums.rpgmakerweb.com/threads/attack-power-of-a-move-increases-when-hit.124929/