# Doppelganger

@ doppelganger 

Difficulty

11

Attacks

Weapon 1d12

@ doppelganger 

Difficulty

11

Attacks

Weapon 1d12

Base level

9

Base experience

191

Speed

12

Base AC

5

Base MR

20

Alignment

0 (neutral)

Frequency (by normal means)

1 (Very rare)

Genocidable

Yes

Weight

1450

Nutritional value

400

Size

Human

Resistances

Sleep

Resistances conveyed

Causes polymorph

A doppelganger:

 has a head, a couple of arms, and a torso.

 is omnivorous.

 is not a valid polymorphable form.

 is a human.

 is normally generated hostile.

 is strong.

 can pick up weapons and food.

 can be seen through infravision.

Reference

monst.c#line2173

This article is about the randomly-generated monster. For the player race in SLASH'EM and SlashTHEM, see Doppelganger (starting race).
A doppelganger, @, is a type of monster that appears in NetHack. It is a human shapeshifter that possesses sleep resistance in its default form, in addition to any resistances conferred by its current form. In its normal form, it has a single weapon attack.
Each turn, doppelgangers have a 1⁄6 chance to change form, and have a 4⁄7 chance of becoming a random player monster with the appropriate rank title for that role based on its monster level (e.g. a doppelganger imitating a fourth-tier Healer appears as a "dresser", while one imitating an equivalent Wizard appears as a "magician"). The rest of the time, they have a 1⁄7 chance of becoming a monster that can be summoned via the summon nasties monster spell, a 2⁄21 chance of becoming a random quest guardian (guardians corresponding to the player's role are exempt), and a 4⁄21 chance of becoming a random monster (heavily weighted towards humanoids).[1] A doppelganger is immune to system shock and will continue to shapeshift as normal if you polymorph them while they are already shapeshifted, but can be permanently polymorphed and subjected to system shock if forcibly polymorphed while in their base form.[2]
Eating a doppelganger corpse or tin will cause you to polymorph, and is considered cannibalism for human characters.

Contents

1 Generation
2 Strategy
3 History
4 Origin
5 Variants

5.1 SLASH'EM
5.2 NetHack brass
5.3 dNetHack
5.4 EvilHack

6 Encyclopedia entry
7 References

Generation
Doppelgangers will usually begin appearing midway through the dungeon, and are always generated hostile.
In addition to random generation, if the corpse of a unique monster would be left in a bones file, it is replaced with the corpse of a doppleganger, and a statue of a unique monster found in bones will turn into a doppleganger in the guise of that monster if revived via stone to flesh.[3][4] Trying to wish for a statue of a unique monster and reanimating it will also produce a doppelganger disguised as that monster.[5]
Doppelgangers are an invalid form for polymorph, and can leave their corpse upon death as normal regardless of their current form.

Strategy
Doppelgangers are the source of a majority of player monsters that you will encounter in the main dungeon and other branches. Unfortunately, like chameleons they are also responsible for out-of-depth encounters with powerful monsters, such as those that can either cast the summon nasties monster spell or else can be generated by the spell - this makes finding one in the Sokoban zoo a potential unwelcome surprise. Unlike chameleons, dopplegangers are more likely to take the form of such monsters and also cannot be tamed.
Thankfully, a doppelganger will often elect for the form of a player monster - though they can still deal significant damage to you in those forms if they pick up any suitable weapons while seeking you out, or else polymorph into a monk. As with other shapechangers, deal with doppelgangers cautiously and quickly: the ring of protection from shape changers or some form of cancellation will force them into base form, whose sole attack is roughly as damaging as a chameleon on average (and thus much less lethal than most of the nasties it can imitate).
As doppelgangers are human, human characters should be careful not to sacrifice them unless they are chaotic, and should not eat their corpse or meat unless they are a human Caveman that intends to polymorph. Additionally, be wary of leaving their corpses near carnivorous pets, especially rare ones such as purple worms.

The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

Pets will no longer eat corpses that would cause them to polymorph unless they are starving or on the verge of untaming.
History
Doppelgangers first appear in NetHack 3.3.0.
When vampires became shapeshifters in NetHack 3.6.0, a bug was introduced that caused doppelgangers that polymorphed into any type of vampire to remain stuck in that form, leaving them unable to cycle between random forms or use the vampire's own shapeshifting. This was fixed in NetHack 3.6.1 via commit 885de11 and commit 45ba0ad.

Origin

Wikipedia has an article about:
Doppelgänger

"Doppelgänger" (sometimes spelled "doppleganger") is a German word that literally means "double-walker", and refers to a biologically unrelated look-alike or double of a living person. The concept of alter egos and double spirits has appeared in the folklore and traditions of many cultures throughout human history: doppelgängers in fiction are often portrayed as ghostly or paranormal phenomena, and are usually seen as harbingers of bad luck; some other traditions and stories equate a doppelgänger with an evil twin. A closely related concept is the changeling, a look-alike fairy that is usually left in place of a human child stolen by other fairies.
The doppelgangers of NetHack originate from Dungeons &amp; Dragons, where they appear as early as the 1st Edition. Doppelgangers are usually solitary and appear as tall, elven and androgynous gray-skinned humanoids in their base forms; they have bulbous heads with formless faces and bulging yellow eyes that lack pupils. Despite this weak appearance, doppelgangers possess exceptional strength and agility — their mutable form can take on the likeness of any humanoid between 4 and 8 feet tall, including their clothing and equipment, though without replicating the abilities of those items. However, doppelgangers could not duplicate the mental traits of whoever they replaced, such as personality or mannerisms, unless they kept their victim alive and close by.
In combat, doppelgangers prefer the element of surprise to close in on foes and slam them around with their brute strength; a doppelganger most commonly targets humanoids that they plan to kill and replace. They also possess a continuous spell-like ability similar to ESP that lets them detect the thoughts of their foes, and gives them resistance to sleep and charm-based spells. Dopplegangers would frequently use this ability to learn everything they could about their chosen target after replacing them.

Variants
SLASH'EM
Main article: Doppelganger (starting race)
In SLASH'EM, doppelgangers are also a playable race, with high stats, natural protection, and the ability to polymorph at will via the "#youpoly" extended command (which costs 20 power). Polymorphed monsters in SLASH'EM will return to their base form upon death much like the player - this makes doppelgangers far more dangerous, especially due to the amount of new monsters they can take the form of, since a polymorphed doppelganger that is killed can quickly shapeshift again after resuming their normal form. Player doppelgangers can survive dying while shapeshifted as normal, though not without significant damage to their base form in some cases.
In older versions of SLASH'EM, the Doppelganger was a role, and as with many other roles was remade into a player race after vanilla NetHack introduced the concept; the Doppelganger quest and other defunct role data is still present in later versions of the game and some variants based on it.

NetHack brass
In NetHack brass, doppelgangers instead always imitate the player, copying your inventory and attributes; the items a doppelganger duplicates usually disappears upon their death as soon as they hit the ground. Items stolen from a doppelganger (e.g. via #bereave) will remain in your inventory, but will disappear if they leave the inventory in any way - this technically makes it possible for "duplicate" artifacts to exist, though they will revert to their base item once stolen from the doppelganger, and also disappear once they leave your inventory.

dNetHack
In dNetHack, doppelgangers are classified as fey creatures. They may appear among the court of an elven monarch-ruled throne room.
Dopplegangers are one of the many quest monsters encountered on the Anachrononaut quest: 1⁄7 of the randomly generated monsters are aberrations, and of those aberrations 1⁄5 will be doppelgangers.

EvilHack
In EvilHack, doppelgangers have several new lethal forms to take advantage of, and like other shapeshifters can revive after being killed similar to SLASH'EM; however, a doppelganger "killed" this way is cancelled when they revive and cannot shapeshift again.

Encyclopedia entry

"Then we can only give thanks that this is Antarctica, where there is not one, single, solitary, living thing for it to imitate, except these animals in camp."
&nbsp;
"Us," Blair giggled. "It can imitate us. Dogs can't make four hundred miles to the sea; there's no food. There aren't any skua gulls to imitate at this season. There aren't any penguins this far inland. There's nothing that can reach the sea from this point - except us. We've got brains. We can do it. Don't you see - it's got to imitate us - it's got to be one of us - that's the only way it can fly an airplane - fly a plane for two hours, and rule - be - all Earth's inhabitants. A world for the taking - if it imitates us!

[ Who Goes There?, by John W. Campbell ]

Xander: Let go!  I have to kill the demon bot!
Xander Double (grabbing the gun): Anya, get out of the way.
Buffy: Xander!
Xander Double: That's all right, Buffy.  I have him.
Xander: No, Buffy, I'm me.  Help me!
Anya: My gun, he's got my gun.
Riley: You own a gun?
Buffy: Xander, gun holding Xander, give it to me.
Anya: Buffy, which one's real?
Xander: I am.
Xander Double: No, _I_ am.

[ Buffy the Vampire Slayer, Episode 5.03, "The Replacement" ]

 

References

↑ src/mon.c in NetHack 3.6.7, line 3490

↑ src/zap.c in NetHack 3.6.7, line 251

↑ src/bones.c in NetHack 3.6.7, line 152

↑ src/trap.c in NetHack 3.6.7, line 587

↑ src/trap.c in NetHack 3.6.7, line 608