The Hammer is the weapon of choice for Mario in Super Mario RPG: Legend of the Seven Stars. It is acquired by defeating the Hammer Bros guarding the entrance to Mushroom Kingdom. The Hammer has stronger variations of it later on in the game with the strongest being the Masher.
In Paper Mario, the hammer is an item that is frequently used. It is found in Goomba Village, in Jr. Troopa's playground. The item is used to break large yellow blocks and can break bricked blocks. It is then replaced by the Super Hammer and Ultra Hammer. Mario can use the hammer in battle as well. The hammer has many badges used for it.
In Paper Mario: The Thousand-Year Door, this badge is given to Mario at the very beginning of the game. The hammer in this game is used the same way it is Paper Mario. This game adds and drops hammer based badges as well. It, in this game too, is replaced by a Super and Ultra Hammer later on.
The basic Hammer from Paper Mario: The Thousand-Year Door.
The Super Hammer from Paper Mario: The Thousand-Year Door.
The Ultra Hammer from Paper Mario: The Thousand-Year Door.
The Hammer returns in Paper Mario: Sticker Star as one of Mario's main means of attack. Early in the game, a Toad gives it to Mario after he has peeled one of the Toads. Mario can use his hammer outside of battle to knock over bushes,
hit blocks, and get First Strikes against enemies. However, in battle, Mario can only use his Hammer if he has any Hammer-related stickers present. It is learned that in Rustle Burrow after Mario temporary loses his Hammer, he cannot use any Hammer-related stickers. There are many versions of the Hammer besides the regular including the Worn-Out Hammer, Eekhammer, Slaphammer, Hurlhammer, Baahammer, Chillhammer, and Burnhammer. Hammers in this game also have Shiny, Flashy, Big Shiny, and Megaflash ranks which all differ in power and rarity.
Mario & Luigi: Superstar Saga
The Hammer is again the weapon of choice for Mario and now Luigi in Mario & Luigi: Superstar Saga. It is forged from a Hoohoo Block by the Hammerhead Bros, and is eventually replaced by the Super Hammer and Ultra Hammer. It is used in battle for both solo attacks and Bros. Attacks. Hammers can also be used to counter spiked enemies or enemies from above but timing needs to be very percise as the bros. will drop their hammers if held for too long allowing the enemy to attack. The hammers work the same for the remake, except Mario and Luigi will no longer drop their hammers if they hold them for too long.
Super Smash Bros series
Hammers appeared as an item in the Super Smash Bros. series. It caused between 20% and 25% damage to any other fighter struck by it, but limited the wielder to only a single jump. In Super Smash Bros. Melee, sometimes a fighter would pick up a broken hammer, whose head would fall off after the first swing. The stick itself did no damage. In Super Smash Bros. Brawl, a variation of the hammer called the Golden Hammer, which is an item from Wrecking Crew, a game Mario appeared in. It could be swung at a much faster rate, and did around 30% damage to other fighters. On occasion, fighters would pick up a fake Golden Hammer, which did no damage, and made a squeaking sound every time it connected with other fighters, making fun of its holder. The Hammer appeared in this game, too, of course.
Mario & Luigi: Bowser's Inside Story
In Mario & Luigi: Bowser's Inside Story, Hammers are found in the Trash Pit by Mario and Luigi. Hammers are used for breaking hard objects, battling enemies, and for activating switches. They function the same in the game's remake.
Mario & Luigi: Dream Team
In Mario & Luigi: Dream Team Hammers are obtained in Mushrise Park on a ledge, they originally belonged to a Brock but he let Mario and Luigi keep them as he ordered a new Hammer already. Hammers have the same use as in previous games but unlike the predecessors and as of this game, the bros no longer drop their Hammers during a counterattack if held for too long.
Mario & Luigi: Paper Jam
In Mario & Luigi: Paper Jam, the hammers function as they normally do in Mario & Luigi: Dream Team. Paper Mario's hammer move is different from Mario and Luigi's as each copy of his can strike an enemy. However, like Mario and Luigi's hammers, he cannot hammer flying enemies.