MV Damage calculation notation and YEP mods

I just installed the YEP battle engine and sequence plugins and I'm having trouble with getting the exact value I want for the healing portion of a spell.

I want the heal to be based of the users Mattack and enemies MDef, but trying to assign it causes the error "a is not defined".

Code:
<follow action>
perform action
motion wait:user
animation 41: user
wait for animation
if b.isDeathStateAffected()
 change variable 21 = a.mat*4/b.mdf*2
else
 change variable 21 = a.mat*4/b.mdf*3
end
HP +variable 21: user, show
</follow action>

As you can see, if the enemy was killed in the attack, then the calculation should weight the enemies mDef lower for the heal, but it seems the two forms of notation don't work together.

Is there a way I can use the damage formula notation in the YEP sequences? Sorry If this has been answered somewhere but I checked a few tutorials and the YEP pages for these plugins don't use this notation.

If this can't be done, is there an alternative? Can I apply the effect of another action?
instead of "a" and "b", have you tried "user" and "target" respectively?
if it doesnt work, you might just have to substitute the lines for the eval counterpart. those do get battler information passed to them
instead of "a" and "b", have you tried "user" and "target" respectively?
if it doesnt work, you might just have to substitute the lines for the eval counterpart. those do get battler information passed to them

Oh yeah, that worked. I can't believe I didn't think to try that. 😩

Thanks.

Can you show me what the Eval method would look like?
Oh yeah, that worked. I can't believe I didn't think to try that.
no worries. the engine does tell you to use a and b, but when it comes to yanfly's plugins they always have user and target set up, but not always a and b.

Can you show me what the Eval method would look like?
just
Code:
if b.isDeathStateAffected()
 eval: $gameVariables.setValue(21, user.mat*4/target.mdf*2)
else
 eval: $gameVariables.setValue(21, user.mat*4/target.mdf*3)
end
would do well enough
Thanks man, that's a big help. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/damage-calculation-notation-and-yep-mods.175449/