Long worm

From NetHackWiki
Jump to navigation Jump to search

A long worm, w~~~~, is a type of monster that appears in NetHack. The long worm is a type of worm that is unique among monsters: its body and head can occupy several squares simultaneously, and given the complexities introduced, there is an entire file in worm.c dedicated to properly governing the movement and behavior of the worm and its segments.

A long worm's head is represented by its normal glyph while the rest of its body is represented by long worm tail glyphs, which are tildes of the same color (as displayed above) and cannot attack, but trails behind the worm as it moves and obstructs other monsters' movement[1]—a long worm's maximum HP is governed by its body length, though a hero that polymorphs into a long worm will not have tail segments.[2] The long worm tail has a dummy entry in monst.c for visual purposes, and is marked as unique (to prevent figurines of them from generating), corpseless and an invalid form for polymorph.[3]

Attacking any part of a long worm that is not its head or the last segment of its body can either cut off the "tail" segments behind the one that was attacked if it is part of the actual tail, or cause it to divide into a second long worm at that segment[4][5]—this can occur even if the attack was performed with a non-slashing weapon (including bare hands), though slashing weapons have a much better 710 chance of dividing a worm or removing its tail, compared to 15 otherwise.[6] Long worm tail segments are considered to be headless, e.g. holding attacks cannot grab a long worm's tail segments, and the tentacle attacks of mind flayers and master mind flayers against long worms can only eat that long worm's brains if their attacks target the head.[7] Similarly, attacking with the wielded Vorpal Blade will only decapitate a long worm if the attack is targeted at the head.[8]

Long worms that are polymorphed and monsters that are polymorphed into long worms have special cases applied so that they are not repeatedly polymorphed by a singular action, e.g. the beam from a wand of polymorph or a polymorph spell coming into contact with more than one of their body parts.[9] Long worms that have at least one tail segment cannot be displaced.[10][11]

A long worm has a single bite attack defined, and can only attack if there are monsters adjacent to its head that are valid targets, but will gain additional attacks depending on the amount of segments adjacent to that target as well[12][13]—in practice, this usually only occurs when a long worm is stuck and cannot move anywhere else.

A user has suggested improving this page or section as follows:

"There's a lot of long worm-specific details that need to be documented here and updated to 3.6.7."

Generation

Randomly generated long worms are created hostile. A baby long worm can grow up into a long worm.

Long worms that are generated at level creation will be created asleep 45 of the time unless the hero has the Amulet of Yendor in their inventory.[14]

Long worms that leave a corpse behind upon death (i.e. always, unless it was disintegrated) will also leave behind a worm tooth, and both are placed on the square that was occupied by the head of the long worm.[15]

Strategy

Long worms can be annoying obstructions, but will very rarely attack as often as they are coded to, and their low speed of 3 and multi-segmented body makes them easy to dispatch: attacking the rear-most segment will not cause the worm to shorten or be divided, and ray-based attacks deal damage to the worm for each segment they hit. Long worms can be deliberately divided as well in order to farm worm teeth.

History

The long worm first appears in Hack for PDP-11, which is based on Jay Fenlason's Hack, and is included in the initial bestiary for Hack 1.0—it may have an ancestor in the mega-worm that is present in Hack 1.21. In either case, it is unknown whether the long worm's behavior is different in these earliest versions compared to modern versions of NetHack.

From Hack 1.0 to NetHack 2.3e, the long worm is only generated if the NOWORM compile-time option is not defined, and is otherwise replaced by the wumpusNetHack 3.0.0 adds both monsters to the default bestiary and moves the long worm and other newly-added worm monsters into the worm monster class.

In NetHack 3.4.3 and some previous versions, including variants based on those versions, the long worm is subject to several bugs and other fixes:

  • Since the baby long worm's introduction in NetHack 3.0.0, the long worm has the same monster level (8) and difficulty (9) as its baby form, but possesses a weaker bite at 1d4. This is fixed in NetHack 3.6.0 via commit 6bcfa8f8.
  • Splitting a long worm can cause the game to crash under certain circumstances, e.g. if the cut takes the worm to 1 HP or if long worms become extinct as a result—this is bug C343-324, and is marked as fixed in NetHack 3.6.0 via commit 03eb70ac, with a patch for variants based on NetHack 3.4.3 and earlier available at the NetHack Patch Database. A related bug can crash the game if dividing a level 0 long worm this way creates a long worm with 0 HP—this is fixed in NetHack 3.6.0 via commit 077606bc.
  • Heroes and other monsters can walk diagonally through a long worm's tail between two segments if those segments are connected diagonally—this is fixed in NetHack 3.6.0 via commit ce018468.
  • A potion thrown by a monster that hits a long worm's tail segment incorrectly says that it hits the long worm's head, with the correct message being given for potions thrown at one by the hero. This is fixed in NetHack 3.6.0 via commit faa35430.

In NetHack 3.6.1 and previous versions, a rope golem's holding attack can immobilize an entire long worm if the attack hits against one of the tail segments—this is fixed in NetHack 3.6.2 via commit deed117e.

Origin

The long worm is based on the sandworm from Frank Herbert's Dune series of novels. Sandworms are colossal annelids that live on the desert planet Arrakis, with lamprey-like features such as an array of crystalline teeth which are used primarily for rasping rocks and sand. Sandworms grow to hundreds of meters in length, with specimens observed over 400 metres (1,300 ft) long and 40 metres (130 ft) in diameter, and worms more than 1.5 miles (2.4 km) in length occur in the story as well; these gigantic worms burrow deep in the ground and travel swiftly. Due to this given size, it can be inferred that the long worms of NetHack and their young are either significantly smaller-scale or simply small and very young versions of these sandworms.

Sandworms are described as "incredibly tough", and it is said that a high-voltage electrical shock applied separately to each ring segment is the only known way to kill and preserve them: "atomics" are the only explosive powerful enough to kill an entire worm, since conventional explosives are unfeasible as "each ring segment having a life of its own"; while water is poisonous to the worms, it is in too short supply on Arrakis to be of use against any but the smallest worms. The sandworms are reverently called "Shai-Hulud" (from the Arabic شيء خلود, šayʾ khulūd "thing of eternity") by the planet's indigenous Fremen, who worship them as agents of God whose actions are a form of divine intervention.

Sandworm larvae produce a drug called melange (known colloquially as "the spice"), the most essential and valuable commodity in the universe because it makes safe and accurate interstellar travel possible; melange deposits are found in the sand seas of Arrakis, where the sandworms live and hunt, and harvesting the spice from the sand is a dangerous activity because sandworms are aggressive and territorial. Harvesting vehicles must be airlifted in and out of the sand sea in order to evade sandworm attacks, and the struggle over the production and supply of melange is a central theme of the Dune saga—the relationship between sandworms and spice is given homage in some variants of NetHack.

Variants

Variants of NetHack based on NetHack 3.4.3 may retain the long worm's stats from that version or use them as a baseline for changes.

SporkHack

In SporkHack, the long worm is renamed to the sand worm, and retains its stats from NetHack 3.4.3—additionally, the game attempts to prevent tail creation when generating sand worms in order to reduce crashes.

UnNetHack

In UnNetHack, long worms retain their stats from NetHack 3.4.3.

The corpse or tin of a long worm or baby long worm is described as "spicy" when eaten as a reference to the Dune novels.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, long worms have the same level and difficulty as in NetHack 3.4.3, but move at a much faster 12 speed and have a stronger bite attack.

Five long worms are randomly placed on the locate level of the Anachrononaut quest at level creation, and three normal long worms and three psurlon long worms are randomly placed on the goal level at level creation. Eight psurlon long worms are randomly placed on the locate level of the Android quest at level creation, and three normal long worms and three psurlon long worms are generated on the goal level at level creation. Five long worms are randomly placed on the locate level of the Drow Noble quest at level creation, and three long worms are randomly placed on the goal level at level creation.

A psurlon long worm is one of the "yellow nasties" that can be generated by the Stranger's harassment, and unlike other yellow nasties it is placed randomly on the level rather than adjacent to the hero.

dNetHack and its variants also add the hunting horror, a monster that has multiple tail segments like the long worm (though it will never grow more than two).

xNetHack

In xNetHack, the corpse or tin of a long worm or baby long worm is described as "spicy" when eaten as a reference to the Dune novels, similar to UnNetHack.

Encyclopedia entry

[The crysknife] is manufactured in two forms from teeth taken from dead sandworms. The two forms are "fixed" and "unfixed". An unfixed knife requires proximity to a human body's electrical field to prevent disintegration. Fixed knives are treated for storage. All are about 20 centimeters long.

[ Dune, by Frank Herbert ]

References