Oh wait, I didn't read his question properly . Yes you're right, I thought he means you can't "attack ground".
+1 to tymans trigger. Though in the editor it will look like this:
Trigger:
- Disable Ground Attacking
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Archmage
- ((Attacked unit) is A ground unit) Equal to True
- Actions
- Unit - Order (Attacking unit) to Stop