I'm very new to romhacking myself, but I discovered a lot of quirks with how double battles work in gen 4.
First, any battle that's called via script (as in any battle where the trainer doesn't spot you, do the little music jingle, walk up to you, and fight), you can simply set it to a double...