Special behaviour of the enemy when taking a specific element damage

Hi!
I guess there must be a way to make the enemies behave differently when getting damage from a specific element through a formula? How would this work? I don't speak about elemental resistance / reflect etc but a damage that would be used as a trigger to start a new AI pattern for the enemy or transform it into another enemy.

Thanks 🙂
add a ruby command to change a switch to the damage formula of all skills using that element, and then condition a new attack pattern on that switch. If the rating of the skills in that attack pattern is high enough, regular attacks (without switch condition) will be ignored.


Or you could add a state to the skills that does nothing and use that as conditions for the attack patterns - that way you can even set an auto-expire of that behaviour.
Oh I see, I guess I'll have to go the switch route as I first thought about then as I don't know a single thing about ruby language hehehe. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/special-behaviour-of-the-enemy-when-taking-a-specific-element-damage.43907/