I won't keep bugging you with it since you said you aren't able to do actual tests until at least Monday hehe, sorry to keep it up for just one more post, but sadly that won't work there either. Using that, no one ever gets BERSERK to begin with in a closed system against just this enemy (unless the player intentionally berserks themselves). Move id 0 is just an attack, so the first if statement will always be true, and always just have the bug attack.
If I change it to domoveid(1) in the first if statement, the bugs fart until everyone is berserked, then the game crashes, just like in my original posts' issue. This is because after the first character is BERSERK status, the first if statement is always false, then the targetadv in the second if statement will fire each time until all characters are BERSERK, but unfortunately, it also fires one more time, and on that time, it crashes the game because it can't find a target that isn't status 5.
The fundamental reason this happens seems to be that "enemy.status" is all or nothing, meaning that the positive lookup is true if at least one has it, and the negative lookup is only true if none have it. There isn't a way to specify a specific number of enemies having the status, or all enemies having the status, which I think is what would be required to make sure that single target status attacks could be coded to not ever be "wasted" on a target that already has said status. I just don't think with what "enemy.status" does currently can target things this way, but maybe when you are able to do magic at your actual station with your code set up you can sort it out