This is not a game mechanic discussion - it is a "how do I ..." question, and belongs in MV Support. Or more specifically, the damage formula thread.
Are you saying, if the player has 25%, they will get another 50% bringing them up to 75%? Or that they will only get 25% which will bring them to 50% and no higher?
I'm going to assume you'll give them 50% even if it puts them higher than 50% at the end. Something like this in your damage formula would do that:
b.hpRate() < 0.5 ? Math.floor(b.mhp * 0.5) : 0
and make sure there's no variance.
This will work if they have
up to 50% of mhp but not exactly 50%. If you want them to gain HP if they already have exactly 50%, change the < to <=
If you're doing this through eventing and not through a skill or item, do this instead:
Code:
Control Variables [1: Actor HP] = Game Data > Actor (choose actor) > HP
Control Variables [2: Actor MHP] = Game Data > Actor (choose actor) > MHP (in parameters)
Control Variables [2: Actor MHP] /= 2
Conditional Branch: Variable [1: Actor HP] < Variable [2: Actor MHP]
Change Actor HP: (choose actor), Variable [2: Actor MHP]
End
This gets the actor's HP and MHP into variables, calculates 50% of MHP, and if the actor currently has less than that 50%, it increases their HP by that much. Again, use <= if you want to give them HP if they have exactly 50%