MZ Triggering Common Event based how much damage an Enemy Takes. (Visustella)

I was wondering if there was a way to trigger a common event once an enemy takes a certain amount of damage.

What I am aiming to do is once an enemy applies a state to themselves (Flight) you have to deal 400 points of damage or more to trigger a common event.
I think it's like VS Battle Core state notetag:

<JS Post-Damage as Target>
target._receivedDamage = target._receivedDamage || 0;
target._receivedDamage += value;
if (target._receivedDamage >= 400) {
$gameTemp.reserveCommonEvent(X);
delete target._receivedDamage;
}
</JS Post-Damage as Target>
I think it's like VS Battle Core state notetag:

<JS Post-Damage as Target>
target._receivedDamage = target._receivedDamage || 0;
target._receivedDamage += value;
if (target._receivedDamage >= 400) {
$gameTemp.reserveCommonEvent(X);
delete target._receivedDamage;
}
</JS Post-Damage as Target>
Thank goodness for solution you provided. It worked without an issues. I was hitting my head on the wall trying to figure it out yesterday.

Original thread: https://forums.rpgmakerweb.com/threads/triggering-common-event-based-how-much-damage-an-enemy-takes-visustella.179644/