I'm now thinking it has to do with the post damage calcs used on enemies. Here is what I use on all enemies
Code:
as a note, you could simplify all of that post turn end notetag into
Code:const states = target.states();
if ([8,23,24,25,27,28,29,47,48,55,57].some(s => states.includes(s))){
target.addState(133);
}
Hmm, I went to get the skills that were causing lag by doing a test fight, but then I noticed some more details.
...
I'm now thinking it has to do with the post damage calcs used on enemies
It may be possible that theres an issue causing states to be counted as active multiple times or for those notetags to be running multiple times. Id imagine you'd start seeing performance drops once you got past 100, not 5. 5 shouldnt be any issue
as a quick test, use this version of the post damage notetag, press f8 when the battle test is happening, go to the console tab, get the enemy their 5 states, and hit them.
Code:if (Math.random() <= .04) {
target.addState(129)
}
console.log(target.states().length)
does the number it says sound correct for the amount of states the enemy has, and does it only output it once per hit?