Protect bosses from MP Drain completely?

Hello,

I have an MP drain ability for my heroes similar to Osmose from Final Fantasy, however I wish that the skill does not work on bosses especially the final boss and my superbosses.
How would I go about doing that? Is there a script? Thanks.
Many ways.

But a certain way could be creating a common event. Inside it Put a conditional branch. Get the Troops id value (on database) into a variable and then make the expression we question, if the troop ID is equal that specific value. If yes, then it will do nothing. Else it will cause OSMOSE MP drain.

Then call that Common Event from the Skill.

Hope I didn't confused you, sometimes solutions hit my mind instantly, like now, but they are not the most elegant.

You can also use a simple script call check I suppose. Someone might be able to give you that. It is just a line. A long one though. 😛
If you want to make all bosses immune to MP Drain, you can set aside an element specifically for MP-draining skills, and then simply make all the bosses immune to it.
What I do is I assign an element to the MP drain skill, which I call mana. Then, just make anyone you want immune to this skill have element rate * 0 to this mana element.

Incidentally, you could also give your players MP drain protection the same way, just add element rate * 0 to any items or states that are to give this element immunity.

Edit: Ninja'd.
Ahh nice, the Element trick works, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/protect-bosses-from-mp-drain-completely.41315/