You are not logged in.
I'm currently in the process of injecting Imakuni? into my pokered hack, and the intention is for each of his Pokémon to start their fight confused. How do I put it down in trainer_ai.asm?
what does that have to do with ai?
Well, I'm planning to include him as a trainer in Beta 2 of my hack, and I'm planning to homage his infamous TCG card.
"Your active Pokémon is now confused. Imakuni? wants you to play him as a Basic Pokémon, but you can't. A mysterious creature not listed in the Pokédex. He asks kids around the world, 'Who is cuter--Pikachu or me?'"
What comet meant is that it has nothing to do with ai. ai controls the actions of the enemy trainer and pokemon, not whether your pokemon start the battle confused or not. Thus, there's nothing to do in trainer_ai.asm.
Look for the functions that send a pokemon into battle (there's one for player and one for enemy), and modify them so that whenever a pokemon is sent out its battle status bit corresponding to the confusion status becomes set, assuming that the trainer class is Imakumi or whatever you're doing.
That's what I'm talking about: Imakuni?'s Pokémon, not the player's.
That's what Crystal_ is talking about too. The point is that what you are looking for is not in trainer_ai.asm. As he said, there is a routine that handles sending your Pokémon into battle, AND one for the enemy. So you just find the one for the enemy and add in the Imakuni? check.
Check them out on Github