Damge over time stacking

● ARCHIVED · READ-ONLY
Started by chlabalay 10 posts View original ↗
  1. Why my stack in not stacking? This stay to 1 :(

    <Custom Apply Effect>
    target._stackingPoison = target._stackingPoison || 0;
    target._stackingPoison += 1;
    </Custom Apply Effect>

    <Custom Remove Effect>
    target._stackingPoison = 0;
    </Custom Remove Effect>

    <Custom Regenerate Effect>
    target._stackingPoison = target._stackingPoison || 0;
    var stacks = Math.min(5, target._stackingPoison);
    var damage = stacks * 100;
    target.startAnimation(59);
    target.gainHp(-damage);
    target.startDamagePopup();
    target.clearResult();
    if (target.isDead()) {
    target.performCollapse();
    }
    </Custom Regenerate Effect>
  2. Try changing "target" to "user" in your regenerate tag?
  3. I'm missing something? How you raise the stack? You need:
    Code:
    <Custom Apply Effect>
    this._stackingPoison = 1;
    </Custom Apply Effect>
    
    <Custom Remove Effect>
    this._stackingPoison = 0;
    </Custom Remove Effect>
    
    <Custom Regenerate Effect>
    this._stackingPoison += 1;
    var stacks = Math.min(5, this._stackingPoison);
    var damage = stacks * 100;
    this.startAnimation(59);
    user.gainHp(-damage);
    user.startDamagePopup();
    user.clearResult();
    if (this.isDead()) {
    this.performCollapse();
    }
    </Custom Regenerate Effect>

    Test it. I'm away from my PC so I'm not 100% is working.

    ----- Ninja edit ------

    I read the eval and you could simple do:

    Code:
    <Custom Apply Effect>
    this._stackingPoison = 1;
    </Custom Apply Effect>
    
    <Custom Regenerate Effect>
    var value = this.stackingPoison * 100;
    user.gainHp(-value);
    this._stackingPoison += 1;
    this._stackingPoison = Math.min(5, this._stackingPoison);
    </Custom Regenerate Effect>

    And would work the same.
  4. Fernyfer775 said:
    Try changing "target" to "user" in your regenerate tag?
    Nop its not working :( that always stay to 1...
  5. lokirafael said:
    I'm missing something? How you raise the stack? You need:
    Code:
    <Custom Apply Effect>
    this._stackingPoison = 1;
    </Custom Apply Effect>
    
    <Custom Remove Effect>
    this._stackingPoison = 0;
    </Custom Remove Effect>
    
    <Custom Regenerate Effect>
    this._stackingPoison += 1;
    var stacks = Math.min(5, this._stackingPoison);
    var damage = stacks * 100;
    this.startAnimation(59);
    user.gainHp(-damage);
    user.startDamagePopup();
    user.clearResult();
    if (this.isDead()) {
    this.performCollapse();
    }
    </Custom Regenerate Effect>

    Test it. I'm away from my PC so I'm not 100% is working.

    ----- Ninja edit ------

    I read the eval and you could simple do:

    Code:
    <Custom Apply Effect>
    this._stackingPoison = 1;
    </Custom Apply Effect>
    
    <Custom Regenerate Effect>
    var value = this.stackingPoison * 100;
    user.gainHp(-value);
    this._stackingPoison += 1;
    this._stackingPoison = Math.min(5, this._stackingPoison);
    </Custom Regenerate Effect>

    And would work the same.

    Your methode add a stack each time i take damge or gain health... My skill is supposed to gain a stack when the stat reapply only.
  6. chlabalay said:
    My skill is supposed to gain a stack when the stat reapply only.

    I tested your eval, and it does exactly that.
  7. lokirafael said:
    I tested your eval, and it does exactly that.

    Arg... its only for me :( This is working when i add a stack in Regen tag... but not in apply tag :/
  8. chlabalay said:
    Arg... its only for me :( This is working when i add a stack in Regen tag... but not in apply tag :/

    Try update the plugin (Battle Engine and Buff & State Core)
    See the Reapply Rules. (Perharps if its set to "0" it can affect it).
    Deative all the battle plugin to see if some of them is affecting it.

    I tested with both CTB and STB and worked flawless.
  9. lokirafael said:
    Try update the plugin (Battle Engine and Buff & State Core)
    See the Reapply Rules. (Perharps if its set to "0" it can affect it).
    Deative all the battle plugin to see if some of them is affecting it.

    I tested with both CTB and STB and worked flawless.
    Oh yea... its CTB the probleme :/ i cant use it in CTB? What the difference?
  10. chlabalay said:
    Oh yea... its CTB the probleme :/ i cant use it in CTB? What the difference?

    Ahhhhhh never mind, i intalled another plugin needed for this type of skill (turnOrderDisplay) and this is good now!!

    Thank all for help!!