JavaScript:
<JS Post-Damage>
if(target.result().critical == true)
{
user.gainTp(15);
}
</JS Post-Damage><JS Post-Damage>
if(target.result().critical == true)
{
user.gainTp(15);
}
</JS Post-Damage><JS On Apply>
const drainAmount = Math.floor(Math.random() * 8) + 1;
user._drainedAttack = drainAmount;
user.addParam(2, -drainAmount);
if (user.atk <= 0) {
user.die();
}
</JS On Apply>
<JS On Remove>
if (user._drainedAttack) {
user.addParam(2, user._drainedAttack);
user._drainedAttack = 0;
}
</JS On Remove>a.atk with no variance and see what value it produces.user.atk is always going to return a minimum of 1. If you want to see if the total of the user's atk is <= 0, you'll need to add the separate parts manually.user.atk is always going to return a minimum of 1. If you want to see if the total of the user's atk is <= 0, you'll need to add the separate parts manually.