is it possible to do this in the damage formula? State conditional on dmg inflicted

I want to make a skill with a conditional for inflicting a state, which I know how to do, but....I want the conditional to be that IF the final damage output (after all buffs, states, etc. are factored in) is greater than 25% of the target's MaxHP, then the state is inflicted. If the final damage is less than 25% of the target's MaxHP, then the damage is still done but the state is not inflicted.

Is there a way to put this kind of conditional in the damage formula or would I need to get someone to make me a plugin?
This can be done with Yanfly's Skill Core. Put this code in the skill:

<Post-Damage Eval>
if (value >= Math.floor(target.mhp * 0.25)) {
target.addState(StateID#);
}
</Post-Damage Eval>

http://yanfly.moe/2015/10/13/yep-8-skill-core/

If you want to account for the target's state rate, there's a little more to it, but this is an easy way to do it.
Take a look at this diagram: https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-vxace-and-mv-damage-flow.4219/

The damage formula is evaluated before applying element rates, modifiers, critical hit, etc. You would need to hook into somewhere after the entire damage is applied.

Edit: Answer given above
Thank you, @shockra !

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-do-this-in-the-damage-formula-state-conditional-on-dmg-inflicted.107466/