How can I automatically resurrect character after death only once during boss fight?

I have a boss fight setup where a Moltres is soloing a boss for a very important item relating to the story. This boss fight, as said in a prior dialogue, is a test of strength, endurance, and Moltres's will to live.

This boss is stronger than anything Moltres has faced so far and the boss has massive health.

I want the test of Moltres's will to live is where she does not give up after defeat, gets back on her two feet, and tries again. However, if she dies again, it is over. But it will be less likely because I want to apply a buff to Moltres once she is resurrected.

Second thing, I want this to only happen when the boss is 50% or less. I do not want Moltres to be resurrected if the boss has more than 50% health.

I do not want the resurrection to commence just by the boss being under 50%, Moltres must be dead as well.

Can this be done? I know that when the last character in battle dies, it is usually game over, and Moltres at the moment, is the only character fighting, is there a way to prevent game over just once, resurrect Moltres, fully recover Moltres, and apply her buff, but the next time she dies, it is game over?


I could probably figure it out on my own with little help if it is possible to do this. I know that there is conditional branches that can check if Moltres is dead but I do not know if it overrides the game over sequence.
yes, it can be done - but it is a bit tricky.

to prevent the battle end, you'll need a turn 1 troop event that applies an invisible immortal state to the actor.
To handle the death, you'll need a second troop event conditioned on HP=0 and span either turn or moment (test what fits you better).
In this second event, you check switches or whatevery to decide if the actor with 0 HP should be healed or killed, and either heal or remove the immortal state (and checne switches to remember what you have done)
That is an entirely different can of worms than what I expected. I do not know how to do that.

I did not even know that there was a way to make an immortal state. I have made so many states and that is something I NEVER even seen.

How do I make the state?

Also, it seems that your answer will not work for a situation where the boss MUST be below 50% in order for Moltres to be resurrected.
immortal state = resist death state

it will work with any condition, I just didn't spell it out in detail.
use control variable to get the boss HP and MHP
calculate percentage
only affect if percentage below 50%

That goes into the same part as the checking for switches
You gave me some false information there 🙁

You CANNOT make a conditional branch to check if an actor's HP is 0!

The ONLY option for actor is: Position in the party, Name, Class, Skill, Weapon, Armor, State

There is NO HP check for actor
I never said conditional branch.
I said troop event, which has conditions that includes triggering on actor HP below percentages

and even then you are wrong, you CAN check an actor HP with conditional branch - you just need two commands:
control variable: load actor HP into variable
conditional branch: check variable value

I STRONGLY suggest that you take a month to follow the link to the starting point in my signature and learn what is where in the program, and never assume that someone on this board lies to you just because you don't know where is what in the engine
Perhaps a script that handles the resurrection for you might be your best shot because you'd only need to copy and paste the code in the script editor, in a new section, and that's it. It could either handle everything internally or ask you to turn on a switch that it will turn off later on.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-automatically-resurrect-character-after-death-only-once-during-boss-fight.156787/