Buffs & States Core (YEP) state that grants DEF based on the caster's MDF

<Custom Apply Effect>

target._bonusdef = origin.mdf * 1.5

target.def += target._bonusdef

</Custom Apply Effect>



<Custom Apply Effect>

if (target._bonusdef){

target._bonusdef = origin.mdf * 1.5

target.def += target._bonusdef

}

</Custom Apply Effect>

<Custom Remove Effect>

delete target._bonusdef;

</Custom Remove Effect>



I have no JS skill at all, so this might be a small fix or I might be completely off.

Thank you in advance, if you are able to assist.

Original thread: https://forums.rpgmakerweb.com/threads/buffs-states-core-yep-state-that-grants-def-based-on-the-casters-mdf.150166/