I noticed that this doesn't seem to work when the trainerbattle type is 0x9 (the one with Prof. Oak's speech in-battle) even if the half-word is 0x100 and above.
Edit: Nevermind. I just made the routine make a flag check and so on and so forth...
This hack is really amazing, I love it!