well,if a Pokemon flies and anoher Pokemon hit it with thunder?...if Pokemon use dig and the opponent use earthquake?if a Pokemon use dive and the foe use thunder?if a Pokemon use dive and the opponent use earthquake?if a Pokemon use dive and the opponent use a fire type move ?
1) Thunder can still hit a flying target. It also has a chance of breaking through protect if it's raining. Sky Uppercut, Hurricane, Gust, Whirlwind, and Twister can also hit a target.
2) Earthquake will hit the Pokemon and do double damage.
3)Thunder Won't hit a diving Pokemon, however, Surf and whilrpool can. Earthquake or a fire type move won't hit a diving Pokemon either.
Locking moves/abilities like Mind Reader will also do the job.
Well, let's use some common sense here... Thunder comes from the sky, right? So a Flying Pokemon can be hit by Thunder. Earthquakes are caused on land, so being below the earth will still cause you to be hit.
Diving means you are somewhat far below in the water, so Thunder will most likely not get to you. An Earthquake won't be hitting anything in the water, but it will disturb the water. And Fire in water? C'mon, that fire won't last any more than 5 seconds, leaving you untouched.