Hi I'm trying to set up a damage formula based on the amount of states that the target has, and damage caps at 5 States..
This is the code I've been trying but it just hits 0s 🙁
The problem is either the way I'm writing it, or the battler. is checking the current actor and not the enemy, can I do .target?
EDIT: I forgot to show my skill window how silly of me I apologize here it is:
I put 0 in the damage because that's what other skills with damage formula note tags tell me to do that as well, as it follows the note tags.
This is the code I've been trying but it just hits 0s 🙁
<Damage Formula>
var state = battler.getStateCategoryAffectedCount('ailment');
if (state === 1) {
value = a.luk * 4 - b.luk * 2
}
if (state === 2) {
value = a.luk * 5 - b.luk * 2
}
if (state === 3) {
value = a.luk * 6 - b.luk * 2
}
if (state === 4) {
value = a.luk * 7 - b.luk * 2
}
if (state >== 5) {
value = a.luk * 8 - b.luk * 2
}
else if (state === 0) {
value = a.luk * 3 - b.luk * 2
}
</Damage Formula>
The problem is either the way I'm writing it, or the battler. is checking the current actor and not the enemy, can I do .target?
EDIT: I forgot to show my skill window how silly of me I apologize here it is:
I put 0 in the damage because that's what other skills with damage formula note tags tell me to do that as well, as it follows the note tags.