Link to the plugin: http://yanfly.moe/2016/02/13/yep-70-absorption-barrier-rpg-maker-mv/
I've searched the board and I can't quite find an answer to what I'm looking for.
I'm trying to make a skill that steals a % of the damage as a barrier. I can't figure out what to put in the value though to make it work. Here is what I have in the note section:
<Custom User Barrier>
value =
if ((value + user._permBarrier) >= user.mhp) {
value = user.mhp - user._permBarrier
}
</Custom User Barrier>
Value is currently blank because the attack formula I tried in there doesn't work. The last part of it that prevents barrier from going over the User's max HP is working fine, I just can't figure out what I need to do to have the attack leech a % of the damage and then add it as a barrier.
Edit: So I can get parts of the formula to work. user.atk works fine. Trying to get target.def to work isn't. I'm not sure why I can't get the target's defense part of the formula to work. What I was trying to use was (user.atk *4 - target.def *2) * 0.5.
I've searched the board and I can't quite find an answer to what I'm looking for.
I'm trying to make a skill that steals a % of the damage as a barrier. I can't figure out what to put in the value though to make it work. Here is what I have in the note section:
<Custom User Barrier>
value =
if ((value + user._permBarrier) >= user.mhp) {
value = user.mhp - user._permBarrier
}
</Custom User Barrier>
Value is currently blank because the attack formula I tried in there doesn't work. The last part of it that prevents barrier from going over the User's max HP is working fine, I just can't figure out what I need to do to have the attack leech a % of the damage and then add it as a barrier.
Edit: So I can get parts of the formula to work. user.atk works fine. Trying to get target.def to work isn't. I'm not sure why I can't get the target's defense part of the formula to work. What I was trying to use was (user.atk *4 - target.def *2) * 0.5.