Conditional Branch Based on % of Current HP?

Hello. Right now I'm trying to make a skill that is supposed to spam another skill until you run out of resources. I have done most of the skill, but I cannot figure out how to set a conditional branch for the skill to end, as the resources used are percentages of MHP (10% per skill used) and not base numbers. Here is what I've done so far in the common event.

-If: Character X has repeated skill (only one character has access to this skill, to make things simpler.)
-Blank
: Else
-Control Switches : Switch used to determine if character x has the repeated skill or not
-Change Skill: Character + Repeated Skill
-End

-Loop
- (Formula for determining the current % of HP using variables)

-If : Variable >= 10
- Force Action : Character X, Dark Bane, Last Target
: Else
- Text : None, Dim, Bottom
: Character X's rage has subsided!
-Break Loop
-End

: Repeat Above

-If: Switch used to determine if character x has the repeated skill or not is ON
-Change Skill: Character - Repeated Skill
-End

As you can see, this is quite complicated. However, outside of the formula has for finding a variable that represents the percentage of HP, I've done pretty much everything. Can anyone please help me with this issue? Thanks.

(P.S. If you're wondering, I did not mention either the name of the skill or the character who uses said skill, as it's a MASSIVE spoiler for my game. Just to let you know.)
you can use change variable -> game data -> actor -> HP to store the current hp to a variable
(ex: variable 1)
then use another change variable -> game data -> actor -> Max HP to store the max HP to another variable (ex: variable 2)

then use change variable -> variable 1 -> div -> operand variable 2 to get the hp / max hp. (ex: 0.9321)
you can then use change variable -> variable 1 -> mul -> operand constant 100 to if you want to make it percent form (93.21)

hope this help.

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-based-on-of-current-hp.129518/