Enemies will spring up out of nowhere to attack you in Paper Mario: The Origami King. When you connect with them as Mario, a battle will start, and it can be a traditional battle, or it might consist of multiple waves of enemies. When you first fight them, the combat is pretty straightforward, but it may become more complicated, and every bit of damage counts. A great way to get the drop on damage enemies before combat is to jump on them when they rush at you or to start the fight.
Whenever you see an enemy burst out of nowhere directly at Mario, you have a brief opportunity to leap into the air and attempt to land on them. If you successfully stomp on them, you can damage them a little bit before the battle. It may not hit all of the enemies you’re fighting, but it can do a decent amount to one enemy.
You can also use Mario’s hammer against them if you don’t have enough time to stomp on the enemies running at you. Both do roughly the same damage to the enemy, and it’s a reliable way to give yourself an edge before a battle. None of these attacks will damage, but it never hurts to give yourself an edge whenever possible.