Oh. Orders. Right.
First: Trace -> Sturdy.
For reference, it should not be Raining at all. Not that I think we need to re-ref any rounds. Exactly why aren't you keeping up with that?
Disable (Thunder) ~ Calm Mind ~ Shadow Ball
IF [Thunder Wave], THEN [Encore] AND [Push Back].
IF [Explosion], THEN [Teleport [Evasive]].
I would be afraid of Magnet Bomb if Magnemite had more than 1 Attack Rank.