Extra Damage vs Type [Damage Calcuation]

Is there anyway in RPG MAKER MV to write a damage formula that inflicts additional damage to targets afflicted by a specific state?


For example, if I wanted a Coup de Grace move that inflicts x 2 damage against a prone target, can that be done, and if so... how?
Use this as a damage formula:


b.isStateAffected(x) ? d = 2 : d = 1; y*d


Replace x with the ID of your prone state and y with the regular damage formula for Coup De Grace (such as a.atk*4-b.def*2).
Use this as a damage formula:


b.isStateAffected(x) ? d = 2 : d = 1; y*d


Replace x with the ID of your prone state and y with the regular damage formula for Coup De Grace (such as a.atk*4-b.def*2).



Thank you, I was not expecting such a fast response. I will test it first thing in the morning. Again, thank you. I didn't think I needed a plugin.

Original thread: https://forums.rpgmakerweb.com/threads/extra-damage-vs-type-damage-calcuation.60902/