Wikihack
Register
Advertisement

Jumping is a property that allows a player to traverse multiple empty tiles in one movement. The ability to jump comes from three sources: being a Knight, wearing jumping boots, or reading a spellbook of jumping. To perform a jump:

  • As a Knight or wearing the boots, you use the extended command #jump. If number_pad is set, you can also press j. Knight jumping and jumping from the boots are practically identical; the only difference is to which squares you can jump.
  • Using the spell, you must press Z and select jumping. (The #jump command will not cast the spell; see Dudley's dungeon of 21 December 2007 for a discussion of this.) The spell lets you jump farther, depending on your skill in escape spells.

Using any of the three sources to jump, you must be able to see your destination. The jump will consume d25 nutrition (plus the usual spellcasting hunger penalty, if you cast the spell), and you become immobile for one full turn (not simply one move) after landing[1]. Players with speed can move farther in one turn by stepping as far as possible without advancing the turn counter, then jumping, see Speed#Strategy.

Note that you cannot jump over monsters. If you attempt to do so, you will bump into them, which will wake them up and anger them if they are peaceful.

You can jump to try to escape from a pit or lava. You can also jump out of a web, which will tear it apart. You can jump out of a bear trap, but it will cause 1d10 damage and can inflict a long-lasting leg wound. If you are stuck in the floor (because you were caught in cooling lava) and attempt to jump, you will remain stuck and wound your legs. Jumping out of shops counts as direct theft.

Range[]

Escape spells
Max Role
Basic
Skilled
Expert

In the following diagrams, tiles to which you can jump are marked by an 'x'.

Knight's Jump   Jumping Boots
   .........       .........
   .........       ....x....
   ...x.x...       ..xxxxx..
   ..x...x..       ..xxxxx..
   ....@....       .xxx@xxx.
   ..x...x..       ..xxxxx..
   ...x.x...       ..xxxxx..
   .........       ....x....
   .........       .........
 
                      JUMPING SPELL
  Unskilled        Basic         Skilled         Expert
 ...........    ...........    ...........    ...........
 ...........    ...........    ...........    ....xxx....
 .....x.....    ....xxx....    ...xxxxx...    ..xxxxxxx..
 ...xxxxx...    ...xxxxx...    ..xxxxxxx..    ..xxxxxxx..
 ...xxxxx...    ..xxxxxxx..    ..xxxxxxx..    .xxxxxxxxx.
 ..xxx@xxx..    ..xxx@xxx..    ..xxx@xxx..    .xxxx@xxxx.
 ...xxxxx...    ..xxxxxxx..    ..xxxxxxx..    .xxxxxxxxx.
 ...xxxxx...    ...xxxxx...    ..xxxxxxx..    ..xxxxxxx..
 .....x.....    ....xxx....    ...xxxxx...    ..xxxxxxx..
 ...........    ...........    ...........    ....xxx....
 ...........    ...........    ...........    ...........

Path[]

Once you select a destination, you will be moved towards it along a path determined by a version of Bresenham's line algorithm.[2] The path will be as close to a straight line as possible, but will tend to move you along the longer axis of your jump. It will never move you a greater proportion of the distance along the shorter axis than it has moved you along the longer axis.

The following diagrams should help illustrate some typical paths:

...........    ...........    ...........    ...........
 ...........    ...........    ...........    ...........
 ...........    ...........    ...........    ...........
 ....X......    ...........    ...........    ...........
 .....*.....    ...........    ...........    .........X.
 .....@.....    ...**@.....    .....@.....    .....@***..
 ...........    ..X........    .....*.....    ...........
 ...........    ...........    ....*......    ...........
 ...........    ...........    ...X.......    ...........
 ...........    ...........    ...........    ...........
 ...........    ...........    ...........    ...........

Being able to predict the path of your jump is important for maximizing jump distance, and to avoid angering peaceful monsters.

Restrictions[]

You cannot jump if:

In addition, if you are not casting the jumping spell, you cannot jump if:

  • You are polymorphed into something with no legs.
  • You are burdened to any degree.
  • You are hungrier than the halfway point between not hungry and weak.
  • You have less than six strength.

Source code references[]

  1. apply.c, line 1361
  2. apply.c, line 1354 calls walk_path in dothrow.c, which calculates the path
Advertisement