State Removal via State Owner Attacking

That is to say, a state that is removed whenever the actor/enemy it is attached to makes a damaging attack, regardless if it hits or not. (A state that gives its owner 150% more damage, but only for a single hit).

I'd enjoy the script's effect to be implemented via state notetags, as I can technically achieve this effect as of now with a separate script, though doing so would involve a lot of notetag clogging amongst almost every skill.
Add the following function to rpg_objects.js if you want to add this to one particular skill:

JavaScript:
Game_Battler.prototype.empoweredAttack = function(a, b) {
  baseDamageValue = X;
    if (a.isStateAffected(Y)) {
      baseDamageValue *= 1.5;
      a.removeState(Y);
    }
    return baseDamageValue;
};

Put this in the damage formula field of the skill in your database:

a.empoweredAttack(a, b)

Replace the damage formula with what you use to determine damage (X), and the state ID of which state you use to determine this effect (Y).

If you want this to apply to any damage, then you'll need to edit this function in the same file with something like this, although I did not test this part of it:

JavaScript:
Game_Action.prototype.apply = function(target) {
    var result = target.result();
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = (result.used && Math.random() >= this.itemHit(target));
    result.evaded = (!result.missed && Math.random() < this.itemEva(target));
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = (Math.random() < this.itemCri(target));
            var value = this.makeDamageValue(target, result.critical);
        }  
       if (this.subject().isStateAffected(X)) {
        var value *= 1.5;
        this.subject().removeState(X);
        this.executeDamage(target, value);
       }
        this.item().effects.forEach(function(effect) {
            this.applyItemEffect(target, effect);
        }, this);
        this.applyItemUserEffect(target);
    }
    if (this.subject().isStateAffected(X)) {
      this.subject().removeState(X); // Ensures state is removed on a miss/evade
    }
};
Add the following function to rpg_objects.js if you want to add this to one particular skill:
Helpful, but this is a RGSS post for VX ACE
Helpful, but this is a RGSS post for VX ACE
WELP, lol

Didn't notice.

Original thread: https://forums.rpgmakerweb.com/threads/state-removal-via-state-owner-attacking.140738/