dmg animation change depending on what status is effected...

hello!
okay i'm having an issue with dmg animations...if you can tell me which plugin could help it would be awesome
basically MP in my game works like a shield as long as your Mp is above 0 then dmg taken goes towards MP and not HP
i have yanflys passive states to get this done
basically when mp is 0 thenmy actor goes into state (X)
and the dmg formula for the enemy skills all have a condition that if actor is in state X then you dmg the HP instead of MP!
NOW! here is where i have an issue . dmg animation is the same regardless of HP/MP dmg

is there a way that i can change color or animation and sound is played depending on what status is being damaged....
i tried to get the enemy to have two attacks one MP and one HP and the HP attack gets triggered when actor is in that state! HOWEVER! there is a massive delay... because the enemy would already choose the attacks! and if there are two or three enemies , the PC would fall in state X and the enemy would still use the MP attack ( dealling zero dmg) and on next round if the PC regenerate its MP the enemies will do an HP attack.
just to clarify the PC already doesnt do dmg animation when their MP is being hit ... so it makes me think that i can do something about it ...

my dmg formula is

b.isStateAffected(11) ? b.gainHp(-(a.mat*4+b.mdf*2)) : a.atk * 4 - b.def * 2

and so far it works as planned ( it needs balancing but its working)

so... any ideas would be helpful

thanks for your time
If you are using Yanflys action sequences than I would just put the state check into the action sequence of all skills that work this way. This way you can play any animation you want on the target.

Edit:
@ferallag

Here is a little action sequence example I made that should work:


Code:
<setup action>
   display action
   immortal: targets, true
</setup action>

<whole action>
</whole action>

<target action>
if user.attackMotion() !== 'missile'
   move user: targets, front, 20
else
   perform start
end
   wait for movement
   perform action
   wait: 10
if target.isStateAffected(11)
   attack animation: target
else
   animation 123: target
end
   wait for animation
</target action>

<follow action>
clear battle log
immortal: target, false
</follow action>

<finish action>
   perform finish
</finish action>

Now, I didn't test it but pretty sure it should work.
Of course you will want to modify that "animation 123" to whatever number animation you would like to play. Also, "attack animation" means it will play the animation that is set inside the database for that skill.
thank you loads!!!! i'm going to test it ... i found the action sequences package .... there are 3 ... i'm going to read up and understand what happens and i'll use your example! thanks a lot ! i'll let you know if it works!
okay so! i figured out how the action sequence works i took your code and i found out that

if target.isStateAffected(11)

does not work! because its not part of the plugin ! however yanfly with all of his wisdom added a Eval code to add java ... now my java is very noobish and i dont understand the java in rpg maker mv
however!
i tried

if $gameActors.actor(1).isStateAffected(11)

its working as intended now! I was worried that since its actor(1) that i might only effect the first actor and not work on the second actor . but i did the testing and its working perfectly! so this is solved! thanks for you help !!!!!!
is there a way for me to close the thread and mark it as solved? OR?! does it have to wait for a Mod?
you just click the report thingy and say the reason for reporting is because its solved

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/dmg-animation-change-depending-on-what-status-is-effected.125438/