Displacement

From NetHackWiki
Jump to navigation Jump to search
This article is about the property. For displacing pets by switching places, see Pet#Speed.

Displacement is a property in NetHack that causes your image to appear a tile or two away from where you actually are, which can misdirect the attacks of hostile monsters. The cloak of displacement is the only source of the property, and no monsters have intrinsic displacement.

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

Displacer beasts have the displacement property, which is implemented similar to some of the variants listed below; fighting them may cause you to displace them instead of attacking, and force-fighting via F may similarly cause you to attack thin air. The corpse or tin of a displacer beast confers temporary intrinsic displacement when eaten.

Description

A particular hostile monster will perceive a character with displacement as occupying a random square within a 5×5 area centered on them, i.e. they will think the character is 1 or 2 squares away from their actual location. This is reduced to a 3×3 area around the character if they do not have a clear line of sight to the monster, presumably to prevent monsters being alerted to their presence from well around corners or the other side of a closed door.

A monster that does not know the location of a character with displacement has a 14 chance of discovering it during each of its turns, and a monster that learns the character's location is unaffected by their displacement until the character moves again, similar to invisibility. A monster fooled by a character's displaced image will often attack it instead, and may even move in the wrong direction entirely, with the odds of this varying widely depending on the character's surroundings and movement. Shopkeepers and aligned priests are not fooled by displacement if you are generating conflict, and they will not hesitate to attack you.

Displacement is done per-monster, so a character's displaced image will generally be in two different locations for two different monsters. This makes it possible for one monster to see the character's image in the square of another monster: monster melee attacks that target such a square will miss, but breath weapons, ranged weapons and the like will still deal damage.

Bribery

If a lawful demon prince teleports to demand a bribe from a character with displacement, they may warp next to their displaced image - this will cause them to become hostile without a chance of being pacified.

Strategy

Displacement is invaluable when running from a fight that the character are ill-equipped for, especially in the early game. Non-elven Rangers notably start with a +2 cloak of displacement - elven rangers are given an elven cloak instead to counterbalance their better weapons.[1][2]

In terms of combat, invisibility is a property of somewhat similar use that applies a −2 to-hit penalty to monsters that cannot see you, and tends to be far more common and accessible than displacement. Even if you are discovered, moving will cause them to lose track of your presence and attack the square you previously occupied; displacement does not affect monster awareness of your presence so much as their ability to pinpoint you. However, the odds of discovery are more likely for invisibility, with a 13 chance during each of their turns compared to 14 with displacement. Since both properties function on a per-monster-turn basis, fast monsters such as soldier ants are likely to find you quickly no matter which of them you use - invisibility will also override displacement if you have both properties, unless you are fighting monsters that can see invisible. On a somewhat lesser note, being invisible will cause shopkeepers to block the entrances to their shop - they can also see invisible and will not be fooled by displacement if angered.

In the long term, monsters that can see invisible become more common as you progress; fewer monsters are unaffected by displacement, and even demon lords and princes can be fooled by it, though beware of this if you intend to bribe the lawful ones!

Messages

You feel that monsters have difficulty pinpointing your location.
You put on a cloak of displacement. The cloak is identified.
You feel that monsters no longer have difficulty pinpointing your location.
You removed a cloak of displacement. The cloak is identified.
<Foo> strikes at your <invisible> displaced image and misses you!
A monster attacked a spot where they believed you to be as a result of displacement; "invisible" is appended if you are invisible and the monster can see invisible.
<Foo> smiles <engagingly/seductively> at your <invisible> displaced image...
As above, but you were targeted with a seduction attack.
The invisible <foo> whispers at thin air.
A demon lord or prince attempted to demand a bribe from you, but was fooled by your displaced image - this will immediately turn them hostile.

Variants

Some variants implement a form of monster displacement: among those, a few also grant it to two deferred monsters within the code - the shimmering dragon, whose scales are intended to confirm displacement, and its baby form.

SLASH'EM

In SLASH'EM, monster displacement exists, with displacer beasts possessing the property intrinsically. Shimmering dragons and their babies instead have a much lower AC than other dragons, simulating "displacement" by making them harder to hit.

GruntHack

GruntHack implements proper displacement for monsters: Monsters can appear in a different location from where they actually are, including inside walls, or on another monster's square. Telepathy or monster detection will reveal their actual location, making it possible for the displaced monster's glyph to show up on two different squares. Trying to walk onto a displaced monster's square will not attack it.

Adult shimmering dragons have intrinsic displacement, and their scales confer displacement.

FIQHack

FIQHack implements monster displacement that is somewhat similar to GruntHack, with the following differences:

  • If a character can sense the monster with telepathy, monster detection or similar, the displaced image will never be shown. A character that cannot see the displaced image, but is able to see the square where their true location is, will see the monster's true location as normal.
  • The displaced image will never appear on a square the monster cannot normally inhabit (e.g. inside walls).
  • A character moving onto a square where a monster's displaced image is will try to attack that square, including other monsters that happen to occupy the square, and the same is true of monsters attacking a displaced image in a square occupied by another monster.

Shimmering dragons, their baby forms and their scales are also present - unlike in GruntHack, baby shimmering dragons have intrinsic displacement as well as adults.

xNetHack

In xNetHack, displacer beasts have the displacement property, which is implemented similar to some other variants: fighting them may cause the character to displace them instead of attacking, and force-fighting via F may similarly cause them to attack thin air. The corpse or tin of a displacer beast confers temporary intrinsic displacement when eaten.

EvilHack

In EvilHack, monsters can gain displacement from the same sources as the player character, and monster displacement functions somewhat similarly to xNetHack and GruntHack. A message is also printed if the monster discovers a displaced character's actual location.

Messages

Your displaced image doesn't fool <the monster>!
A monster figured out your actual location while you had displacement.

References

  1. src/u_init.c in NetHack 3.6.7, line 200: A comment explains "the weaker cloak for elven rangers is intentional--they shoot better"
  2. src/u_init.c in NetHack 3.6.7, line 211: Elven substitutions for initial inventory