Boss fight with "Phases"

What i'm wanting to do is create a boss that has "phases" during their fight. i want to have it so that once the boss reaches a certain amount of health, it stops taking damage and calls a common event that changes a status it has to a different one that determines which moves its allowed to use. i know i can call the event to trigger during the battle once its health reaches a certain point, but i have absolutely no idea how to stop it from taking too much damage and possible skipping a phase.

TL;DR: Remember Nyx from Persona 3?
Yeah, something like that.
couldn't you apply a state that gives it total immunity to all damage types that only lasts a couple rounds in the common event, that way it won't take damage after it chages stages?
1. Create state and give a feature "state resist : death" (it will give immunity to death stats)
2. Set your enemy in troops and make an event give that state in turn no.0
3. make new event page on troops and set the trigger enemy hp = 0 and in the event itself you can set your own "phase" like boss battle
3.1. In the first line of that event. You need to remove the state you made before

Sry if it sounded complicated. Send your screenshoot about your troops" event configuration here for more help

Original thread: https://forums.rpgmakerweb.com/threads/boss-fight-with-phases.125460/