Phase 1: Ground Attacks
The Egg Hammer 2 is Dr. Eggman's first major machine, a large robotic contraption equipped with a powerful hammer. In its first phase, Eggman will primarily move back and forth across the arena, occasionally stopping to slam his hammer down. The hammer slam creates a small shockwave that can damage you. Your primary window of attack is immediately after he slams the hammer. As he retracts the hammer, the cockpit (where Eggman is) will be exposed. Jump and perform a Homing Attack or Spin Attack on the cockpit. Be careful not to get too close when he's moving, as he can damage you by contact. After a few hits, he will transition to his next phase.

Phase 2: Aerial Attacks
Once you've dealt enough damage, the Egg Hammer 2 will begin to jump, attempting to crush you from above. He will also occasionally hover in the air for a moment before slamming down. When he jumps, quickly move out of the way of his shadow. The best time to attack in this phase is when he is either landing from a jump or briefly hovering. Use a well-timed jump and Homing Attack to hit the cockpit. Characters with aerial abilities like Cream or Tails can make this phase easier by flying up to hit him. Keep moving and anticipate his landings. After several more hits, the Egg Hammer 2 will be defeated. Collect the large ring to complete the zone.