Difference between revisions of "Speed"

From NetHackWiki
Jump to navigation Jump to search
(Monster speed: adjust a srcref line)
m (Monster speed: make the refsrc's in this paragraph explicitly 3.4.3 so i don't lose my mind tracing them. unversioned refsrc defaults to 3.4.3 anyways.)
Line 42: Line 42:
 
* A fast monster has their movement rate raised to (4 * speed + 2) / 3, e.g. a mountain centaur that is fast would move at 27 speed (4 * 20 + 1 = 80 + 1, {{frac|81|3}} is 27).
 
* A fast monster has their movement rate raised to (4 * speed + 2) / 3, e.g. a mountain centaur that is fast would move at 27 speed (4 * 20 + 1 = 80 + 1, {{frac|81|3}} is 27).
 
<!--verify information below this point in the section for latest stable-->
 
<!--verify information below this point in the section for latest stable-->
In normal pet-versus-nonpet combat, regardless of its speed, no monster is intended to be able to attack another monster more than once per turn;{{refsrc|dogmove.c|630}} however, the parameter "after", documented as determining whether the monster has already attacked that turn, is always set to 0.{{refsrc|monmove.c|644}}{{refsrc|uhitm.c|386}}{{refsrc|monmove.c|512}} For pets, this means that speed beyond 12 not only makes it easier for them to keep up with you, but also allows them to deal more damage over time, just like it does for monsters fighting you. On a related note, the retaliatory attack against pets always has a 75% chance of occurring if the monster has not attacked that turn, regardless of movement points.{{refsrc|dogmove.c|638}}
+
In normal pet-versus-nonpet combat, regardless of its speed, no monster is intended to be able to attack another monster more than once per turn;{{refsrc|src/dogmove.c|630|nethack=3.4.3}} however, the parameter "after", documented as determining whether the monster has already attacked that turn, is always set to 0.{{refsrc|src/monmove.c|644|nethack=3.4.3}}{{refsrc|src/uhitm.c|386|nethack=3.4.3}}{{refsrc|src/monmove.c|512|nethack=3.4.3}} For pets, this means that speed beyond 12 not only makes it easier for them to keep up with you, but also allows them to deal more damage over time, just like it does for monsters fighting you. On a related note, the retaliatory attack against pets always has a 75% chance of occurring if the monster has not attacked that turn, regardless of movement points.{{refsrc|src/dogmove.c|638|nethack=3.4.3}}
  
 
Monster attacks due to [[conflict]] or [[Confusion#Monster_confusion|confusion]] (and, with a 75% chance, retaliatory attacks against these {{refsrc|monmove.c|1015}}{{refsrc|mhitm.c|159}}) occur if the monster has enough movement points left to make an action (and will use those movement points up in the process, and cannot occur otherwise), even for retaliation attacks. For them, the speed system works almost like for you.
 
Monster attacks due to [[conflict]] or [[Confusion#Monster_confusion|confusion]] (and, with a 75% chance, retaliatory attacks against these {{refsrc|monmove.c|1015}}{{refsrc|mhitm.c|159}}) occur if the monster has enough movement points left to make an action (and will use those movement points up in the process, and cannot occur otherwise), even for retaliation attacks. For them, the speed system works almost like for you.

Revision as of 02:09, 22 June 2024

Speed, referred to internally as movement rate, is a form of property in NetHack that governs how often the hero and monsters move relative to each other during a given game turn, and is also used for related intrinsic and extrinsic properties.

Description

Speed is calculated differently for the player character than it is for other monsters.

Player speed

The player character's base speed is always 12 before adjustments made by encumbrance and the following properties:

  • Very fast speed sets the character's effective movement rate to 20, and grants 12 extra movement points (one free move) on 23 of their turns, for an average of 5 moves every 3 turns.[1] Very fast speed can be obtained extrinsically by wearing speed boots, or as a temporary intrinsic from the potion of speed or the haste self spell.
  • Fast speed sets the character's effective movement rate to 16, and grants 12 extra movement points (one free move) on 13 of their turns, for an average of 4 moves every 3 turns.[2] Fast speed can be obtained by starting as an Archeologist, Monk, or Samurai, while the Barbarian, Caveman, Knight, and Valkyrie roles gain it at experience level 7; any character can also obtain fast speed by zapping themselves with a wand of speed monster, or else by eating a quantum mechanic corpse or tin if they do not already have intrinsic speed.
  • Any intrinsic form of speed can be lost if the character is hit with a slowing attack, a stoning attack, a gremlin's intrinsic theft attack, or they zap themselves with the slow monster spell or a wand of slow monster.
  • Encumbrance lowers the character's effective movement rate after adjustments:[3]
Encumbrance Normal speed Fast Very fast Reduction
Unencumbered 12 16 20 None
Burdened 9 12 15 34
Stressed 6 8 10 12
Strained 3 4 5 14
Overtaxed 1.5 2 2.5 18

Multi-turn actions (e.g. entering in "10s" to search ten times) consume one move per command issued, plus whatever additional time is required for these moves. In contrast, certain actions will render the character immobile or "helpless" for a certain number of turns, during which their movement points are simply drained without allowing them an action. This helpless state can be caused by actions such as fainting, paralysis or engraving a long sentence, and is also logged for the cause of death where applicable.

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

Per commit ef1eeed7, blue dragon scales and blue dragon scale mail confer very fast speed.

Monster speed

For a table of monsters sorted by speed, see Monsters (by speed).

Each monster has their own base speed, which varies depending on the monster type and can be viewed in the article listed above. Monsters are capable of moving, whether via covetous warp or normal movement, and attacking in the same turn, which is especially likely if they are fast enough compared to the hero or target monster.

During each turn, the number of moves a monster gets for that turn is generated randomly based on their speed: the monster's base speed is divided by 12, with the remainder sometime rounded to a multiple of the base speed using weighted randomization.[4] A monster with 12 speed always moves once per turn, while a monster with 24 speed moves twice per turn; similarly, a monster with speed 18 moves once per turn, with a 12 chance (50%) of an additional move on any given turn, while a monster with 3 speed only gets a 14 chance (25%) of moving each turn. A monster with 0 speed is sessile and will never move or attack, though they will instead have passive attacks.

Monsters can be made slow or fast: they cannot gain "very fast" speed as the hero does, and are set to fast speed instead. Slowed or hasted states adjust their movement rate as follows:[5]

  • A slow monster has their movement rate lowered to (2 * speed + 1) / 3, e.g. a mountain centaur that is slowed would move at 13 speed (2 * 20 + 1 = 40 + 1, 413 with integer rounding is 13).
  • A fast monster has their movement rate raised to (4 * speed + 2) / 3, e.g. a mountain centaur that is fast would move at 27 speed (4 * 20 + 1 = 80 + 1, 813 is 27).

In normal pet-versus-nonpet combat, regardless of its speed, no monster is intended to be able to attack another monster more than once per turn;[6] however, the parameter "after", documented as determining whether the monster has already attacked that turn, is always set to 0.[7][8][9] For pets, this means that speed beyond 12 not only makes it easier for them to keep up with you, but also allows them to deal more damage over time, just like it does for monsters fighting you. On a related note, the retaliatory attack against pets always has a 75% chance of occurring if the monster has not attacked that turn, regardless of movement points.[10]

Monster attacks due to conflict or confusion (and, with a 75% chance, retaliatory attacks against these [11][12]) occur if the monster has enough movement points left to make an action (and will use those movement points up in the process, and cannot occur otherwise), even for retaliation attacks. For them, the speed system works almost like for you.

Strategy

You can couple jumping, speed and self-polymorph to move through the dungeon as fast as possible.

Starting with self-polymorph, the air elemental is the fastest creature with 36 movement points. As an air elemental, you'll get three movements in every turn. However, being an air elemental has serious drawbacks. You have relatively weak attacks, you can't open, close, engrave, wear any armor or wield any tools. You can't put on or take off rings, though any ring you're wearing when you polymorph will still be worn. Strangely, you can put on and take off amulets, zap wands and spells, read scrolls and quaff potions. Because of this, Air Elementals make great travel forms, but terrible fighting forms.

A less fast form, but still fast, is the Titan with 18 movement points. Titans have the obvious advantage of being able to fight well while still being fast.

Your speed affects all forms equally, meaning you can get up to four movements in one turn as an air elemental, or three movements as a Titan.

Another alternative is to be riding, as a swift steed like a warhorse or unicorn can have up to 24 movement points, and intrinsic speed can make it even faster. Kicking or whipping a steed can make it gallop for 20-30 turns, which on average increases its movement to 1.5 times normal,[13] but this decreases tameness and risks being dismounted. Note that the increased speed also only applies when using automatically repeating forms of movement, such as travel or the g command.

Jumping can be done on any of the movements turns, but it always advances to the next turn and resets your movement counter. Hence, if you're hasted, you should move as far as your hasted self can before advancing the turn counter, then, with your last movement, execute the jump. To accomplish this you will have to carefully watch the turn counter and know where you are in the cycle. Using this strategy as an air elemental will allow you to move up to seven squares in a single turn.

The theoretically fastest method of movement, without using life saving, is to be polymorphed into a punished monster with a speed of 24 (e.g. a warhorse), combined with a very fast speed; this gives two actions per turn, plus up to one from the speed, which can be used to throw the heavy iron ball, pick it up again, then (hopefully) jump on the third action, which is slightly faster than moving three times and jumping as an air elemental. However, this is likely too unwieldy to be of much use in practice. (Life saving can be used to reduce helplessness/immobility/paralysis to one turn, allowing hurtling to be the theoretically fastest form of movement, but this is incredibly wasteful of resources, and very difficult to arrange a death at the right moment.)

History

In NetHack 3.4.3 and previous versions, including variants based on those versions, for every turn that passes, a monster will gain its movement rate in "movement points"; if the monster has 12 or more movement points (defined as NORMAL_SPEED[14]) in a turn it gets a move that turn (and more than one if it has another 12 points remaining after this, etc.) Thus a monster with a speed of 12 gets one move per turn, a monster with a speed of 1 gets one move every 12 turns, and a monster with a speed of 18 gets 3 moves every 2 turns; a monster with fast speed has 43 of their normal movement rate, while a slowed monster has 23 of their normal movement rate.[15]

In NetHack 3.6.0, at the end of each turn, every monster's remaining movement points are adjusted by a small random amount to reduce the predictability of their actions.[16] On average monsters will act slightly faster than would be expected by comparing their base speed with the player's. The current speed system is implemented in NetHack 3.6.1.

Variants

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, the wand of speed monster now grants temporary very fast speed, rather than permanent fast speed.

References

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to the current version's tag or {{noversion}} as appropriate.