Every time I try to fight Medusa I get turned to stone. Is there some way I can close my eyes or something so I can fight her?
Medusa has a gaze attack that will instantly turn most creatures into stone, provided that they can see her. However, she is not immune to stoning herself, and can be killed by reflecting her own gaze back at her.
The best ways of safely dealing with Medusa include:
Option 1: Get reflection.
Having any item that grants reflection (such as an amulet or a shield of reflection, or silver dragon scales or scale mail) equipped will render Medusa completely harmless, since she will just immediately stone herself the moment she sees you. You don't even need to be blindfolded for this, as the magical reflection effect will protect you from her gaze. If you're invisible and have reflection, Medusa's reflected gaze won't instakill her, but the reflection will still protect you.
Reflection also protects you from many magical ray attacks (including most attack wands and dragons' breath weapons), making it one of the most essential "must-have" properties to acquire ASAP to increase your odds of survival. The fact that it also trivializes Medusa is really just a minor side benefit.
One of the easiest ways to get reflection is to complete the Sokoban dungeon branch, which has a 50% chance of having an amulet of reflection at the end. If that fails, many players will choose to spend their first wish on silver dragon scale mail, which not only provides reflection, but is also one of the best armors in the game. (See below on how to get a wish before encountering Medusa.)
Finally, the statue of Perseus in Medusa's own lair has a 50% overall chance of having a shield of reflection, but the shield is one of the least convenient sources of reflection in the game, and if you can reach the statue safely to acquire it, you can almost certainly beat Medusa without it anyway.
Option 2: Blind yourself.
As long as you cannot see, Medusa's gaze will not hurt you. There are several ways to blind yourself, including some rather comical ones like applying a cream pie to your face, but by far the safest and most convenient way is simply to wear either a blindfold or a towel on your face. Both are relatively common items that you're likely to find by the time you get down to Medusa's level.
(Given a choice between the two, the towel is strictly more useful, since it can also be used to wipe your fingers if they get greasy, clean cream pie off your face, wipe engravings off the floor and, since NetHack 3.6.0, even to slap monsters with after getting it wet! Their weight, material type and effect when worn, however, are identical.)
Once you've protected yourself from Medusa's gaze attack by blinding yourself, you can either just bash or stab or zap her to death like you'd do against any other enemy or, if you happen to have a mirror with you, you can simply #apply it at her to instantly turn her into stone.
(Mirrors are very common items, because nymphs have a 50% chance of dropping one, and applying them has somewhat useful effects against several other types of monsters as well. Thus, you may want to carry one around even if you don't specifically need it just to beat Medusa.)
The big problem with blinding yourself is, of course, that you won't be able to see. However, Medusa's level is mostly open terrain, so you can see most of it from the starting island, before getting anywhere near her actual lair. As for keeping track of monsters while blind, this is best solved by acquiring telepathy (which is actually the most important reason for keeping a blindfold or a towel with you in the first place), most commonly by killing and eating a floating eye.
Option 3: Dig for Victory.
If you find yourself on Medusa's level with no way to safely beat her (or to cross the water to reach her), there's a simple way to bypass her lair entirely: just dig down through the floor using a pick-axe or a wand of digging.
Note that you don't want to do this next to the water (even diagonally), since the hole you dig will just flood with water. Fortunately, most variants of Medusa's level should have safe places to dig right on the starting island, and all of them have places outside the lair where you can safely dig.
Once you're down below Medusa, you'll want to make your way down to the Castle, which, among other things, contains the only guaranteed wand of wishing in the game. Using that wand, you should be able to acquire any critical items that you're missing from your ascension kit, including a source of reflection.
In fact, there's an entire gameplay strategy, popular with speedrunners, based on digging your way down to the Castle and grabbing the wand as quickly as possible. It tends to be somewhat risky, since rushing for the bottom of the Dungeons of Doom leaves you rather under-leveled and under-equipped for the hordes of enemies you'll face at the Castle, but good evasive play can mitigate a lot of the risks. In any case, none of those risks really apply to just digging past Medusa, if you're otherwise playing normally.
In principle, if you've completed the Quest and grabbed all the necessary items before digging your way past Medusa, you don't really need to deal with her at all before the ascension run, by which point you'll surely have the means to trivially handle her. Still, once you've acquired a blindfold and/or a reflection source from the Castle, you may want to pop back up to her lair, if only to loot it of any useful items. Just remember to be ready to face her before you climb back up to her level, since she will be sitting right next to the stairs.
There are a number of other more or less risky ways of dealing with Medusa, including blinding or canceling her to disable her gaze attack or, since NetHack 3.6.0, deliberately hallucinating to reduce its effectiveness. If you're fast enough, you can even dig past her level, climb back up the stairs and (hopefully) kill her in one hit before she even gets a turn to use her gaze attack. But I wouldn't recommend any of them, since there are far safer and easier options.
One potentially viable approach, if you're lucky enough to have acquired both a way to polymorph yourself and control over the result, is to turn yourself into a stoning-resistant monster such as a gargoyle, a winged gargoyle or a xorn. A silver dragon should also be a valid choice, due to their intrinsic reflection. Just be careful not to let the polymorph time out while you're fighting Medusa.
Ps. If you do manage to kill Medusa without stoning her, don't eat her corpse. :D Unless you're polymorphed into something stoning-resistant, doing that will typically result in what is known, in NetHack jargon, as YASD.
Medusa's gaze will turn anyone who sees it to stone.
As usual with Nethack, there are several possible countermeasures:
- Wear a blindfold or otherwise find a way to temporarily blind yourself. She can't petrify you if you can't see her. Of course, that may make it harder to hit her, but...
Obtain a ring or amulet of protection from petrification. They exist but can be hard to find.My bad, these don't exist in vanilla.
- Polymorph into a creature that's either blind or naturally immune to petrification.
And so on. I trust you get the picture. Eliminate or counter one of the factors of her gaze and you'll be good to go.
- "Anyone that sees it" includes Medusa herself. If you acquire reflective properties somehow (use a mirror, polymorph, etc) she'll petrify herself. (Thanks to @Doorknob for the addition)