yanfly absorption barrier: penetration state for the target

● ARCHIVED · READ-ONLY
Started by Krawzer_KOF 3 posts View original ↗
  1. is there a way I can create a state where the target of an attack has a barrier with 50% penetration rate? The note tags of yanfly only allow the attacker to have more penetration.

    Is there a way to create a state where the battler loses all barrier points but gets them back when it wears off? (this is an alternative in case the first one is not possible). I tired a note tag but it doesn't seem to have any effect.


    NOTE TAG
    <Custom Confirm Effect>

    if (this.isHpEffect() && value > 0) {

    value= battler.barrierPoints(-1);

    target.loseBarrier(value);

    }

    </Custom Confirm Effect>

    <Custom Remove Effect>

    target.gainBarrier(value, 0)

    </Custom Remove Effect>
  2. You are super close! But "value" needs to be set in that second block, which I do with the "target._prevBarrier" property. Also, you need the BuffsStatesCore, which I assume you have.
    Try this:

    Code
    <Custom Apply Effect>
    if (target.barrierPoints(-1)) {
    value= battler.barrierPoints(-1);
    target._prevBarrier = value;
    target.loseBarrier(value);
    }
    </Custom Apply Effect>

    <Custom Remove Effect>
    var value = target._prevBarrier || 0;
    target.gainBarrier(value, 0);
    </Custom Remove Effect>

    It might maybe work. Attach this to a STATE. The state will remove all of your barrier points, and then give them all back when it wears off. If you gain points in the meantime, the new points will just be added to it.

    I hope it works.
  3. It works perfectly! Thank you so much!