MV Absorbing absorption barriers

Here am I again, asking for help trying to do something with those Yanfly plugins.

So, I have all of them. I'm trying to make a skill now that absorbs absorption barriers. Yes. I've tried to do it in three different ways, and was going to keep whichever workerd first lol
1. User absorbs target's barrier and gains barrier
2. User absorbs target's barrier and gains HP
3. User absorbs own barrier and gains HP

Here's what I made working better so far:

<Target Action>
perform action
motion wait: user
if (target.barrierPoints() > 0)
$gameVariables.setValue(82, target.barrierPoints())
target.loseBarrier($gameVariables.value(82))
user.gainBarrier($gameVariables.value(82), 0)
action animation
wait for animation
else
ADD STATE 12: user, (show)
death break
</Target Action>

It seems to be working fine (user performs action, animation plays, state 12 is added if enemy has no barrier points) but no barriers are lost nor gain, I assume it's because variable 82 is not being set to any value. What am I missing?
Each line in that notetag should be an action, but some of those are JavaScript. Yanfly's engine doesn't know what to do with that, so it skips those lines. 😅

Try this instead (untested):
Spoiler: Action Sequence notetag
Code:
<target action>
perform action
motion wait: user
if target.barrierPoints() > 0
  change variable 82 = target.barrierPoints()
  eval: target.loseBarrier($gameVariables.value(82))
  eval: user.gainBarrier($gameVariables.value(82), 0)
  action animation
  wait for animation
else
  add state 12: user, show
  death break
end
</target action>
Yanfly action sequence syntax reference~
@caethyril it worked!! thank you so much! I had no idea this syntax reference existed lol it'll make everything so much easier

Original thread: https://forums.rpgmakerweb.com/threads/absorbing-absorption-barriers.128758/