Custom State Damage

● ARCHIVED · READ-ONLY
Started by Frozen_Phoenix 6 posts View original ↗
  1. Hey guys, I made a script that let you use notetags to determine the damage/regen done by a state (instead of being always a percentage of the target's max hp/mp/tp).
     ​
    Link: http://www.mediafire.com/download/nj5x5r6wjq4of42/CustomStateDamage.js (fixed state removal bug & save bug)​
     ​
    Guide on how to use in the script description. 
     ​
    Example:
     ​
    <hpd 2>
    a.atk*4 - b.def*2
    </hpd>
     ​
    A state with this in the note box will deal 4x the attack of who applied it reduced by 2x the defense of the target (same rules as the skill damage box).
  2. Great script, and super easy to use, but it seems to not show popups when Yanfly's Battle Core is active D:

    EDIT: Also, even with having the "states removed after battle" checked, states don't go away after battle when this plugin is active.
  3. Fernyfer775 said:
    Great script, and super easy to use, but it seems to not show popups when Yanfly's Battle Core is active D:

    EDIT: Also, even with having the "states removed after battle" checked, states don't go away after battle when this plugin is active.

    Put it below yanfly scripts, noticed the bug with state removal after battle, will fix it :p
  4. Hey everyone, if anyone wants to use any of my scripts, feel free to do so. There are no terms, credits are welcome, but not needed. Feel free to use for any kind of game.
  5. Keep getting "SyntaxError: Invalid or Unexpected Token" at the end of the turn when the custom state is applied on an enemy. What am I doing wrong?
  6. For anyone using this plugin on RMMZ theres currently an issue in 1.8 where it causes slip dmg to be displayed without rounding (causing numbers like 48.12312 etc) to fix just replace

    //Evaluation
    Game_Battler.prototype.regenerateHp = function() {
    var value = Math.floor(this.mhp * this.hrg);
    for (i = 0 ; i < this.states().length ; i++)
    {
    value += Math.max(this.matcher(1, this.states()[i].id), 0);
    value -= Math.max(this.matcher(4, this.states()[i].id), 0);
    }
    value = Math.max(value, -this.maxSlipDamage());
    if (value !== 0) {
    this.gainHp(value);
    }
    };
    with:

    //Evaluation
    Game_Battler.prototype.regenerateHp = function() {
    var value = Math.floor(this.mhp * this.hrg);
    for (i = 0 ; i < this.states().length ; i++)
    {
    value += Math.max(this.matcher(1, this.states()[i].id), 0);
    value -= Math.max(this.matcher(4, this.states()[i].id), 0);
    }
    value = Math.ceil(value, -this.maxSlipDamage());
    if (value !== 0) {
    this.gainHp(value);
    }
    };