Wishing

Wishing is an opportunity in NetHack to be granted an item of the player's choice.

Methods of wishing
There are several ways to obtain a wish in NetHack, including:


 * Zapping a wand of wishing or engraving with it (guaranteed, provided (luck + d5 ≥ 0)). This is the only guaranteed method. The others are not guaranteed and may have negative side effects. A newly generated wand of wishing has 1-3 charges before recharge, 3 more charges after recharge with blessed scroll of charging, and then you can wrest one last wish. Therefore, it totally grants 5-7 wishes.
 * Rubbing a magic lamp, preferably blessed, until a djinni appears. For a blessed magic lamp, you have 80% chance to obtain a wish.  The worst side effect is a djinni which instead of granting a wish, attacks you (4% chance for a blessed magic lamp).  After a djinni appears, the magic lamp becomes oil lamp, no matter what.  Therefore, a blessed magic lamp grants 0.8 wishes on average.  After 120 djinn appear in the game, they get extinct and never appear anymore.
 * Quaffing a smoky potion, preferably blessed. There is a chance of 1/(13 + 2*djinn created in the game) that a djinni appears, and, for a blessed smoke potion, a 4/5 further chance that he grants you a wish.  The worst side effect is a djinni which attacks you (chance 1/25 for each djinni from blessed smoke potion). When a djinni appears from smoky potion, you never get the effect of the potion itself.  Therefore, a blessed smoke potion grants, on average, 4/(65 + 10*djinn created in the game) wishes.  After 120 djinn appear in the game, they get extinct and never appear anymore.
 * Quaffing from (or dipping in) a fountain above the dungeon level 20, unless you have the Amulet. There is a chance of 1/30 that a water demon appears and further (20-Dungeon Level)/100 chance that he grants a wish; otherwise he attacks you. The fountain has a 1/3 chance of drying up.  Therefore, each fountain grants on average about (20-Dungeon Level)/1000 wishes. Possible side effects are dangerous, including appearing moccassins around you (1/30 chance), creating a water nymph (1/30 chance), or hostile water demon ((80+Dungeon Level)/3000 chance).
 * Sitting on a throne, chance 1/39. The throne has 1/3 chance to "vanish in a puff of logic", unless you are teleported away. Therefore, each throne grants about 1/13 wishes.  This may cause unpleasant side effects.
 * Pressing ^W in Wizard (debug) mode - This always works, but it's only supposed to be used for debugging
 * In SLASH'EM, when a gypsy draws Infinity while reading your fortune
 * In SLASH'EM, when eating a silver wishing Pill

The castle always has a wand of wishing in a chest in one of the four corner rooms. Unless you are trying for wishless conduct, you should be able to do some wishing before you enter Gehennom.

Restrictions on wishing
You may not wish for a wand of wishing, or a magic lamp. This is to guard against infinite wishes. (A (stack of) smoky potions is the only way to wish for a wish, though the chance of getting even one wish out of them is exceedingly small.) You also cannot wish for your own quest artifact, although you may wish for those of other roles. Note that wished-for quest artifacts will "evade your grasp" unless your alignment matches the artifact – check Hugo/O'Donnel NetHack Artifacts Spoiler for artifact alignments. You cannot wish for the Amulet of Yendor or for any of the unique items required to obtain it (the Bell of Opening, the Candelabrum of Invocation and the Book of the Dead).

When wishing, you may specify an amount of an item or a specific enchantment - for instance, 2 of an item instead of 1, or +1 rather than +0. However, the more or higher you wish for, the more chance you have of getting only one or +0. Most players wish for 2 items or +2 enchantment, or 3 items or +3 enchantment. (The NetHack Wishing Spoiler includes a table of probabilities.)

Artifact wishing
If you wish for an artifact, your chance of receiving it depends on the number of artifacts already in existence:

Otherwise, you receive nothing and the wish is wasted.

Wishing for your own quest artifact, or an artifact which has already been generated in the game, will never succeed.

If you wish for a quest artifact, you might receive it, but find yourself unable to use it. (See intelligent artifacts for more details.)

Note that wishing for an artifact will break the artifact-wishless conduct, regardless of whether you actually receive it.

Wishing for quantities
If wishing for a stackable item, you may wish for more than one. If the amount you wish for is less than the roll of a d6, you get the desired amount, otherwise you get only one. (If you wish for more than one of a non-stackable item, you get only one.)

Exceptions to this rule are candles (up to 7 are guaranteed), projectiles (up to 20, not daggers), and gold pieces (up to 5000).

Most players wish for 2 or 3 items. Wishing for 3 gives more items when averaged over many wishes/games, but wishing for 2 is more likely to increase the effectiveness of the current wish.

Wishing for enchantment
Similarly, if wishing for an item that can be enchanted, you may specify the enchantment. If the enchantment you wish for is less than or equal to the roll of a d5, you get the desired enchantment, otherwise you get ±0.

You can wish for negatively-enchanted equipment, with the same chance of success as the equivalent positive enchantment. It's not clear why anyone would want to do this, however.

Be warned that if your luck is negative, any enchantment higher than +2 will automatically become negative. (This check takes place after the game decides whether it will grant you your specified enchantment.)

As with quantities, most players wish for +2 or +3 equipment. +3 gives the best average enchantment, but +2's slightly lower average is less chancy. +4 and +5 have lower averages than +3 and are more risky as well, so those are usually not used. +1 is certain to work, but its average enchantment is much lower than that of +2 or +3, so it's usually not a good choice unless you are illiterate and unable to enchant items yourself. The other possible enchantments are obviously not ever very useful, unless you actually want nonpositive enchantment for some bizarre reason (e.g. pudding farming, but there are better ways to get a thoroughly rusted -7 orcish dagger)

Wishing for BUC
You can specify whether the item should be blessed, uncursed, or cursed. If your luck is zero or greater, your preference will be respected.

If your luck is negative, explicitly wishing for a "blessed" or "uncursed" item will yield a cursed one instead. (Wishing for a "cursed" item still works.)

If you do not specify a BUC, the item will default to uncursed (regardless of luck), unless its enchantment is negative (including -0).

You should almost always wish for blessed items, unless you have negative luck, or specifically want a cursed potion or scroll. Magic markers should be uncursed, so that cursed paper will produce cursed scrolls. If you desire both cursed and blessed copies of an item (such as scrolls of genocide or potions of gain level), consider wishing for cursed ones, since it is easier to bless items than it is to curse them.

Wishing for erosion-proofing
You can ask for an item to be "rustproof", "erodeproof", "corrodeproof", "fixed", "fireproof", or "rotproof". If your luck is non-negative, and the item is subject to erosion (or is a crysknife), your preference will be respected.

NetHack does not discriminate between the different types of erosion-proofing, so you may wish for "corrodeproof speed boots" or a "fireproof crysknife", and the game will substitute the appropriate type of protection. Thus, some players recommend adding "fixed" to every wish, to reduce the chance of mistakenly not erosion-proofing something.

You can also explicitly request an eroded item; in this case, erosion-proofing will not be applied.

Wishing for a monster type
When wishing for a tin, corpse, figurine, egg, or statue, you can specify what type of monster it should be.

If you wish for a tin containing a monster that has been genocided, you get an empty tin. Wishing for a tin containing a unique monster, a monster that cannot leave a corpse, or a monster giving zero nutrition (such as a wraith) will instead produce a random tin. Note that you can also wish for tins of spinach.

You may not wish for the corpse of a unique monster, or a monster that cannot leave a corpse; doing so will produce a random corpse. Wishing for the corpse of a quest guardian will instead produce a corpse of the corresponding role monster.

If you wish for a figurine of a unique monster, any kind of human, or a mail daemon, you will instead receive a random figurine.

If you wish for an egg from a monster that cannot lay eggs, you will get a random kind of egg; wishing for a "Scorpius egg" will give you a scorpion egg. You can wish for an egg from a genocided species, but the egg will never hatch.

You can wish for a statue of any monster, including unique and genocided ones. Bear in mind, however, that casting stone to flesh on a statue will not always produce that monster—for example, animating a statue of a unique monster or quest guardian will instead produce a doppelganger disguised as that monster.

Wishing for charges
Although you can wish for a specific number of charges (e.g. "wand of death (0:7)"), in a normal game you will always receive the lesser of the number of charges you wish for or the number of charges you would otherwise receive, making this an undesirable option. The capability was designed for wizard mode, where you always receive the number of charges you wish for.

Other options
You can also specify the following options:


 * "holy", "unholy" (sets BUC, even if not potion of water)
 * "lit", "burning", "unlit", "extinguished" (for lamps, candles, and potions of oil)
 * "unlabeled", "unlabelled", "blank" (for scrolls and spellbooks)
 * "poisoned" (for poisonable weapons and comestibles, and for containers which can be trapped)
 * "greased" (any item)
 * "partly eaten" (for comestibles)
 * "historic" (for statues)
 * "diluted" (for potions other than water)
 * "empty" (for tins)
 * A general item category, e.g. "scroll" or "spellbook"; this will produce a random item in the chosen category. Pressing enter on a blank line, or escaping out of the wish, will produce a random item.  This is still subject to the restrictions on wishing, so wishing for a "lamp" will always produce an oil lamp.

Most of these are useless or worse, but "greased" can be a life-saver for body armour and containers, "poisoned" can increase the effectiveness of weapons, and "partly eaten" can make wielded cockatrice corpses lighter.

What to wish for
The best use of a wish depends heavily on your situation in the game. Here we give some general advice for early and late game situations. This advice is only a guideline and does not apply to all situations. In some cases, if you already have everything you need, the best thing to do with a wand of wishing or magic lamp is to save it for later. Experienced players are able to weigh the value of an unused available wish and compare it to the benefit that would be provided by the most valuable item in the game in that situation. For inexperienced players, there is no substitute for experience -- play and learn!

The following general principles apply in almost all situations:


 * If you encounter a wand of wishing, and you can't identify how many charges it has, then your first wish should be either 2 (or 3) "blessed scrolls of charging", or an "uncursed magic marker", so you can write your own scrolls to recharge the wand.
 * Writing your own scrolls will only work reliably if you have already identified scrolls of charging, you have found and named (or identified) all four kinds of 300zm scrolls, or you are a wizard; however, if you are willing to save some of your wishes for later, i.e. until after you have identified scrolls of charging, a magic marker is an overall more useful item . (It  can yield three scrolls of charging and still have enough ink to write several scrolls).
 * Wands of wishing from bones levels might already have been recharged once.

The rest of this discussion assumes that you have a way to recharge your wand, if the wish is from a wand of wishing.

Early single wishes
The most common source of early wishes is a magic lamp (if you disregard slightly suicidal early level fountain quaffers). As a rule, the best item to wish for early in the game is gray or silver dragon scale mail unless playing a monk. Which color to wish for depends on your situation:
 * "blessed greased +2 gray dragon scale mail" (or +3) provides magic resistance
 * "blessed greased +2 silver dragon scale mail" (or +3) provides reflection

Which one you should wish for is somewhat situational. If you already have one extrinsic, you should wish for the DSM which provides the other. For example, a Wizard starts with a cloak of magic resistance, and would prefer SDSM. A character who gets the amulet of reflection from Sokoban, on the other hand, would be better served by GDSM. If you have neither magic resistance nor reflection, the choice is somewhat more difficult: see GDSM versus SDSM for a discussion of the merits of each.

Early wands of wishing
A somewhat rarer source of wishes early in the game is a wand of wishing. With a wand of wishing, you will usually want to wish for some or all of the following items, depending on what you already have: dragon scale mail, some artifact weapon, a bag of holding, an amulet of life saving, and (optionally) gauntlets of power, speed boots, and/or jumping boots. You may also consider wishing for a quest artifact (see below), but proper use of a quest artifact requires a higher level of skill on the part of the player than weapons and armor.

If you encounter a wand of wishing in a shop, it is easy to identify because its base cost is 500, shared only with the wand of death. A possible strategy is to zap the wand at a shopkeeper -- if it's a wand of death, you'll kill the shopkeeper, and if it's a wand of wishing you can wish for a wand of death. The death ray will occasionally miss, and you'll have an angry shopkeeper on your hands. [Intrinsic monster magic resistance cannot neutralize attack spells], and you do not have to worry about magic resistance or reflection items. However, be aware that killing shopkeepers as a non-chaotic character incurs penalties for murder, and that the penalty can lower your luck and cause your wishes to fail. Thus, if you intend to use this strategy, it is best to use your wishes before killing the shopkeeper. Characters who wish to avoid murdering a shopkeeper may be happy to simply pay the "usage fee" each time they zap the wand.

Another option for those of... "flexible" personal morals and a low judged value of wishes can use one wish for a blessed figurine of an Archon, and if said angelic being is tame (80% of the time), they will easily dispatch the shopkeeper. This strategy protects the player from murder, frees the entire contents of the shop, provides an extremely powerful pet, but uses one of the precious wishes, and carries a 10% risk of getting a hostile Archon which will probably kill you.

As always, you can simply get a pet to steal it for you, perhaps in a bag if cursed.

Late game wishes
In the later stages of the game, wishes typically serve the role of completing an ascension kit.

If you need lots of items in order to complete your ascension kit, consider wishing for a wand of polymorph. This wand is a very powerful item for players who are not averse to polypiling. In most cases, it is far more efficient to polypile for ascension kit items and then wish for the few remaining missing pieces, rather than wishing directly for all the items from the start.

An uncursed magic marker can be used to write cursed scrolls of genocide, which when read will summon a monster of your choice. This technique is often more efficient than wishing directly for monster-derived items, since a single uncursed magic marker (which takes one wish) can usually write at least four scrolls of genocide with recharging. For example, if your character is reasonably strong, you can obtain dragon scale mail by reverse genociding dragons instead of wishing directly for dragon scale mail. As another example, if you need a cockatrice corpse, it may be more efficient to reverse genocide cockatrices than to wish for a corpse directly. For maximum effect, use a burned Elbereth to protect yourself from the monsters while you kill them.

Wishing for quest artifacts

 * See Artifact wishing above for general information about artifact wishing.

Generally speaking you should not wish for cross-aligned quest artifacts. They will “evade your grasp” and fall to the floor, and you will be unable to pick them up. It is technically possible to carry multiple artifacts of different alignments through careful use of alignment conversion or the helm of opposite alignment, but this is considered an advanced tactic and is rarely employed. Also note that a helm of opposite alignment cannot cause Chaotic or Lawful characters to become Neutral, so the only way for such characters to use wished-for neutral artifacts is to permanently convert oneself at an altar.

As detailed above, you cannot get for your own quest artifact from wishes.

Neutral
If you are a neutral character and want a quest artifact, there are at least four good choices:
 * "blessed rustproof Eye of the Aethiopica" (if you are not a Wizard) to obtain magic resistance, fast power regeneration, and to #invoke for branchporting
 * "blessed Platinum Yendorian Express Card" (if you are not a Tourist) to obtain magic resistance, telepathy, and to #invoke for non-blessed charging
 * "blessed Eyes of the Overworld" (if you are not a Monk) to obtain astral vision and magic resistance, and to #invoke for enlightenment
 * "blessed Orb of Fate" (if you are not a Valkyrie) to obtain half physical damage and half spell damage, and to #invoke to level teleport (but you will need to obtain teleport control separately)

The Eye of the Aethiopica is an especially good wish for neutral monks: Due to armor to-hit penalty and weaponless martial arts, they will most likely spend a wish on magic resistance. The two best items are the Orb and the Eye, so the decision is dominated by the trade-off half physical damage versus fast power regeneration. Monks can make decent spellcasters.

The Eyes of the Overworld might be considered a lower priority than some of the others listed, but the astral vision they provide is useful for making the exploration of Gehennom less tedious without having to stockpile scrolls of magic mapping. Note however that if one can cast the divination spells of magic mapping, detect treasure, and detect monsters at a skilled level, then these combined also provide the key benefits of the Eyes, even revealing information about the entire map at once -- though this of course requires obtaining the appropriate spellbooks and being able to cast them somewhat reliably.

Lawful
For Lawful characters, the main contenders are the Sceptre of Might, the Orb of Detection and the Magic Mirror of Merlin, which all offer magic resistance. The Sceptre offers ring-less conflict and deals double damage against cross-aligned (non-Lawful) monsters. The Mirror and the Orb both offer extrinsic telepathy; the Orb also offers half spell damage and functions as a crystal ball, but is much heavier than the Sceptre or Mirror.

Chaotic
For Chaotics, the Master Key of Thievery is usually considered better than the Longbow of Diana. Neither Chaotic artifact grants magic resistance, making them somewhat less desirable than artifacts of other alignments. However, the Key still grants the very useful half physical damage and teleport control properties, in addition to warning and its invoke effect.

Asking on IRC
If you want, you can just join #nethack on Freenode and ask them to suggest what to wish for.

What not to wish for
The NetHack Wishing Spoiler has a list of good items to obtain without wishing. Here are a few more:


 * unicorn horn – This is a very common item after you find unicorns. Early in the game, if you have no unicorn horn but find a wish, you probably want dragon scale mail.
 * food ration – You are fainting, cannot #pray, and there is no food around? Prefer wishing for a horn of plenty. If you're not fainting yet but out of food regardless, wishing for a ring of slow digestion may be better - NetHack is usually plentiful enough on food that you can find a monster or food item soon enough with the decreased hunger.
 * potion of holy water – If playing an atheist, wish for two blessed scrolls of remove curse. Obtain lots of uncursed water, name each one differently so they don't stack, and have nothing but the water and one of the scrolls in your inventory.  Read the scroll while confused, un-name all the water, and drop it and pick it back up so you have only three stacks. Dip a known-uncursed useless object (such as a rock) into each stack, and from the glow or lack thereof, you know whether the stack is holy, unholy, or uncursed. If you only have two stacks, find the uncursed one and repeat with the other scroll.
 * dragon scale mail – In the mid to late game only: Once you have known-cursed paper and you know the scroll of genocide or are a Lucky wizard, a magic marker is likely a better wish. Prepare concentric circles of Elbereth, reverse genocide dragons, and write enchant armor to make mail from scales. See Dragon_scale_mail how to do this safely.