MV YF Absorption Barrier & Damage Calculations?

Simply put, I'm using Yanfly's Absorption Barrier plugin and I want to create a skill that deals damage depending on how many barrier points the user has. Could you please point me to the right direction?

Thanks in advance!
Per the wiki's script call list, you can reference that value with battler.barrierPoints()

edit: Oh, I see now you already know about the wiki entry. Are you asking how to implement the call?
Per the wiki's script call list, you can reference that value with battler.barrierPoints()

edit: Oh, I see now you already know about the wiki entry. Are you asking how to implement the call?

Yes. I tried using battler.barrierPoints() directly in the damage formula and (not exactly to my surprise) got no results - and that's more or less the extent of my skills with JS. 🙄
If you're using Damage Core, you can use the <damage formula> notetag. In that case, it would be

Code:
<damage formula>
value = user.barrierPoints();
</damage formula>

or however you want the value to factor in. You can also prevent the user from activating the skill without a barrier using Skill Core and checking for the barrier state.
That did it, thanks a lot!
Just to supplement - what you typed didn't work because "battler" isn't a variable in the damage formula. If you mouse over the text window, you'll see that you use a for the attacking battler and b for the targeted battler. So you can reference directly in the damage formula a.barrierPoints() or b.barrierPoints()
I had no idea you could use plugin script calls right in the damage formula box. Thank you!
I had no idea you could use plugin script calls right in the damage formula box. Thank you!
Yup! Everything you type into the damage formula text box is JavaScript (just most people only use the basic mathematical operators, so they don't realize it).

Original thread: https://forums.rpgmakerweb.com/threads/yf-absorption-barrier-damage-calculations.148059/