Hello there!
So I'm attempting to make a custom passive state with the above-mentioned effect. However, it appears none of my code actually works, and after many iterations, I eventually had to come here for help as nothing I tried worked.
You may notice that the code is specifically trying to apply the buff to actor 13, originally it was "user.addBuff", but that didn't work so in my follow-up attempts while referencing the script call doc I used that actor as the target since they were the one that learns this ability naturally.
but after many changes it still didn't work so I'm hoping someone here will be able to understand where I went wrong.
So I'm attempting to make a custom passive state with the above-mentioned effect. However, it appears none of my code actually works, and after many iterations, I eventually had to come here for help as nothing I tried worked.
JavaScript:
<Custom Establish Effect>
if (this.isHpEffect() && value > 0) {
var elements = this.getItemElements();
for (var i = 0; i < elements.length; ++i) {
var elementId = elements[i];
if (target.elementRate(elementId) > 1.00) {
$gameParty.members()[$gameActors.actor(13).index()].addBuff(Math.randomInt(8), 3);
break;
}
}
}
if (this.result().critical) {
$gameParty.members()[$gameActors.actor(13).index()].addBuff(Math.randomInt(8), 3);
}
</Custom Establish Effect>
You may notice that the code is specifically trying to apply the buff to actor 13, originally it was "user.addBuff", but that didn't work so in my follow-up attempts while referencing the script call doc I used that actor as the target since they were the one that learns this ability naturally.
but after many changes it still didn't work so I'm hoping someone here will be able to understand where I went wrong.