Instructions
Watch the Dark Star's attacks during the battle to learn the timing and pattern of each one. This helps you avoid attacks and take less damage. One of the first attacks he uses is splitting into five pieces, then rolling at you. Watch how quickly the Dark Star rolls because it will disappear part way through the attack. If you time your hammer attack correctly, you can stop the attack before you get hit. Since the Dark Star disappears, you must make a judgment call on its location based on how fast it was moving.
Avoid the laser and fire attacks. The Dark Star generally targets one brother, Mario or Luigi, with both of these attacks, so pay attention to the direction the boss is facing and jump to avoid the attacks. A particular danger is when the Dark Star creates shadow versions of Mario and Luigi and attacks the shadows. When this happens, any damage taken by the shadows is transferred directly to Mario and Luigi. Use the same timing to jump and dodge the lasers -- you technically control the shadows because they mimic your movements.
Use the Dark Star's minions to attack it. If you try to attack the Dark Star directly, you will not damage it while it is floating. Instead, watch the attack when the Dark Star gives its minion a bomb. The minion throws the bomb at one brother, then lunges toward the other. Strike the minion with your hammer to send it flying into the Dark Star. This weakens it. Do this until the Dark Star stops floating.
Attack the Dark Star as soon as it is on the ground. Use your most powerful abilities against it to drop its HP down quickly. Eventually, it will start floating again and you must repeat the pattern to bring it back down to the ground. Attacking the Dark Star in this state may cause it to counterattack with a laser blast. Jump to dodge these attacks.
Continue attacking the Dark Star until it is defeated. Once you fully deplete its HP, it tries to absorb Mario and Luigi into itself. Press "A" and "B" as fast as you can to escape the battlefield. Once you escape, the battle is over.