Enemys protecting each other.

Im trying to make enemys protecting each other. Sometimes with passive skills, sometimes using a command.

So if im trying to hit the priest melee, the Warrior should jump in between taking the hit intead.

But the Problem, i cant figure how. Target rate only works for allies. I might Change the target with force Action if my enemy has an defined state, but the Problem is even if i do so, im attacking first, and than i ask for the state. I cant figure out how to check something before the actual attack happened. Soooo…. any Suggestions?

Greetings: Thorgaaz

Hmm… well i guess i could create an attackskill which does Nothing but checking for the state, and than i do the actual attack using an Event based on the result. But that seems really strange and i would Need to do that for any melee skill. Plus my the engine will Always send a message like an miss bevore the actual attack happens. So is there another Option?
The basic built-in Protect skill would be to use the Substitute flag on a state (or the enemy), but that's hard-coded to auto protect allies (enemies, here) who are at low HP (<25%).
Well thats not bad, i could start with enemys starting at 25 or less percent life, since lifebars arent shown. So, thanks. I would probably do that. But ist not perfect if the Party get healed from time to time. Because… well it heals over the starting life if i use that Little trick.
Ok, i guess i would yust do it. Capping the heal at 24% using an inbattle Event. Should work Pretty well. Thanks for the answer.

Original thread: https://forums.rpgmakerweb.com/threads/enemys-protecting-each-other.96883/