Hey! Tails should be thankful! Sonic just saved him from being smashed by those maces!
It looks like Amy just helped them to their doom. I think the hammer helped unjam the robot's maces, which were locked in standby position for some reason...maybe Robotnik accidentally dropped a bottle of glue in its gears?