Magic lamp

From NetHackWiki
Jump to navigation Jump to search
( Lamp.png
Name magic lamp
Appearance lamp
Base price 50 zm
Weight 20
Material copper
Monster use Will not be used by monsters.

A magic lamp is a type of tool that appears in NetHack. It is a light source that is made of copper, and appears as a lamp when unidentified.

The magic lamp is subject to a few rumors, with all but one of them being true.

Generation

Magic lamps make up 3200 (1.5%) of all randomly-generated tools and have a beatitude ratio of 1:2:1, or 25% blessed, 50% uncursed and 25% cursed. They cannot be generated by polypiling, and wishing for a magic lamp will instead create an ordinary oil lamp.

General [[store]s, hardware stores and lighting shops can sell magic lamps.

Description

Applying a magic lamp will illuminate a 3-square radius around it, though unlike a normal oil lamp it will never run out of power.

Additionally, each time you rub a magic lamp, there is a 13 chance of a puff of smoke, a 13 chance that nothing happens, and a 13 chance that a djinni appears. If a djinni is generated from a magic lamp, the lamp is auto-identified and turned into an oil lamp of the same beatitude with 1000-1500 turns of light, and one of the following five outcomes occurs, with their relative probability depending on the beatitude of the lamp:[1][2]

Blessed Uncursed Cursed Outcome
80% 20% 5% Grants one wish, then disappears.
"I am in your debt. I will grant one wish!"
5% 20% 5% Remains as a pet.
"Thank you for freeing me!"
5% 20% 5% Remains as a peaceful monster.
"You freed me!"
5% 20% 5% Speaks, then vanishes.
"It is about time!"
5% 20% 80% Remains as a hostile monster, or sometimes peaceful for a neutral hero.
"You disturbed me, fool!"

Strategy

Always make sure a magic lamp is blessed before rubbing, as an early magic lamp stands a high chance of being wasted if you rub it without knowing its beatitude. Be wary of rubbing unpaid magic lamps as well, as the shopkeeper will charge you a usage fee if you manage to extract the genie - thankfully, magic lamps are easily distinguished from normal ones via price identification.

Some players prefer an inexhaustible light source to an extra wish, depending on their circumstances; the lamp can always be rubbed for a wish later with no trouble, making it a useful tool to bring into Gehennom and other dark areas. If you reach the Astral Plane with a magic lamp, it may be worth blessing for the chance to wish up a necessary item, and the leftover oil lamp should provide more than enough turns of light for those looking to jump their way through the level.

History

The magic lamp first appears in NetHack 2.3e.

Origin

The idea of a djinni dwelling in a magic lamp was popularized by the Middle-Eastern folk tale Aladdin. It is one of the best-known tales associated with The Book of One Thousand and One Nights (The Arabian Nights), despite not being part of the original text - it was added by the French Antoine Galland, based on a folk tale he heard from the Syrian storyteller Hanna Diyab.

The tale has many variations, and the lamp is typically an item that the impoverished Aladdin retrieves from a booby-trapped cave for a sorceror pretending to be a sibling of his late father. After escaping the cave with the aid of a djinni in a magic ring, Aladdin brings the lamp to his mother, who tries to rub it clean so they can sell it to buy food for their supper; this releases a second, far more powerful genie who is bound to do the bidding of the person holding the lamp.

Variants

Some variants alter the magic lamp's base price to make it less easy to purchase.

SLASH'EM

In SLASH'EM, the magic lamp's base cost is increased to 1000zm, and still more expensive magic lamps can be found in the black market. SLASH'EM also adds the magic candle, which acts as a permanent light source, and obtaining one means that magic lamps can be safely rubbed for their wishes.

The Sunless Sea is a special level that features a guaranteed magic lamp, though it may be underwater.

UnNetHack

Main article: Wish#UnNetHack

In UnNetHack, wishes from magic lamps cannot produce magical items. Magic lamps themselves are an eligible wish, but can only be obtained from a wand of wishing. The black market in UnNetHack has a chance of selling magic lamps at exorbitant prices.

UnNetHack incorporates the advent calendar patch, where the magic lamp is one of many possible 'Christmas presents' in the 24th room of the branch. The Ruins of Moria branch always contains an uncursed magic lamp on the last floor, carried by the Watcher in the Water.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, The Sea contains a guaranteed magic lamp, similar to The Sunless Sea of SLASH'EM. Each of the level's maps also has a guaranteed amulet of magical breathing in the event the lamp is underwater.

NetHack Fourk

In NetHack Fourk, it is possible to use a blessed scroll of wishing to wish for a magic lamp.

EvilHack

In EvilHack, magic lamps can be wished for. Additionally, cursed magic lamps give off darkness instead of light; the aura of darkness covers the same radius, and overrides any light source. A cursed magic lamp is one of a very few portable sources of darkness, making them ideal tools for any drow character.

References

  1. src/apply.c in NetHack 3.6.7, line 1484: dorub function, calls djinni_from_bottle
  2. src/potion.c in NetHack 3.6.7, line 2321: djinni_from_bottle function