Are States Applied Before/After Damage Calculation?

As per the title, I'd like to know:
Are States Applied Before/After Damage Calculation?

It seems like it's before, but I wanted to ask to be sure, thanks!
Edit: I just realized General may have been the wrong subforum to put this in...oops.

I've moved this thread to MV Support. Thank you.

By default all effects (including Add State) are applied after the damage formula is calculated and applied. Effects apply in the order they are listed on the skill/item. Core script reference:
Spoiler: Game_Action#apply excerpt (rpg_objects.js)
JavaScript:
        if (this.item().damage.type > 0) {
            result.critical = (Math.random() < this.itemCri(target));
            var value = this.makeDamageValue(target, result.critical);    // calculate damage
            this.executeDamage(target, value);                            // apply damage
        }
        this.item().effects.forEach(function(effect) {
            this.applyItemEffect(target, effect);                         // apply effect
        }, this);
(Technically the Common Event effect is an exception: it is reserved before the action starts, but only gets to run after the action phase is complete, i.e. after the damage formula and other effects have been applied.)

Remember that plugins may change any aspect of the engine.

Original thread: https://forums.rpgmakerweb.com/threads/are-states-applied-before-after-damage-calculation.145582/