Ranger (player monster)

From NetHackWiki
Jump to navigation Jump to search

A ranger, @, is a type of monster that appears in NetHack. The ranger is a chaotic player monster corresponding to a Ranger hero, and will have the role's appropriate rank title for their monster level.

A ranger has a single weapon attack.

Generation

Rangers are not generated randomly, and are normally created as peaceful towards neutral heroes before specific adjustments are made. They are only a valid form for doppelgangers to normally polymorph into, and can only be targeted for genocide if a Ranger hero reads a scroll of genocide.[1]

Ranger corpses can generate in graveyards and within the Valley of the Dead.[2][3][4] Ranger statues can generate in cockatrice nests and on Medusa's Island.[2][5][6] A Ranger hero killed by HP damage from a cockatrice or chickatrice, or else killed by any form of stoning, will leave a named player monster statue behind instead of a named ghost and named corpse if a bones file is created.

Inventory

A ranger is always generated with 1-3 random offensive items, 1-3 random defensive items, and 1-3 random miscellaneous items, and is eligible for the normal chance of an item of each type.[7][8][9] If generated on the Astral Plane, they are also given a cheap plastic imitation of the Amulet of Yendor, 0-999 gold pieces, 0-9 random items, a 115 chance of a luckstone, a 130 chance of a loadstone if they are not given a luckstone, and some valuable gems.[10][11][12][13][14][15]

Rangers always generate with a weapon, which can be an elven dagger (12 chance), a long sword (14 chance) or a randomly chosen melee weapon (14 chance):[17][18] the enchantment ranges from a random value between +4 and +8 if the monster is generated on the Astral Plane, and otherwise ranges from a random value between +0 and +3;[19] if generated on the Astral Plane, the weapon has a 12 chance of being made into any applicable artifact;[20] and finally, there is a 13 chance of the weapon(s) being erosion-proofed, and a 12 chance (effectively 13 total) of the weapon(s) being greased if they are not erosion-proofed.[21][22]

Rangers generated on the Astral Plane will have the following armor:

Armor generated this way has a 13 chance of being erosion-proofed, a separate 13 chance of being blessed, and a separate 13 chance of being cursed.[38] The armor's enchantment has a 35 chance of ranging from +0 to +4, a 310 chance of ranging +4 to +7, and will otherwise range from -1 to -3.[39]

Strategy

Like other player monsters on the Astral Plane, rangers have a chance of generating with a long sword that is turned into Vorpal Blade if it has not yet generated, which can result in an unexpected and unceremonious end to your run.

History

The ranger player monster is introduced in NetHack 3.3.0.

Messages

Variants

SLASH'EM

In SLASH'EM, rangers are the only player monsters not generated in The Guild of Disgruntled Adventurers at level creation, though two elves representing their defunct precursor in the Elf role are present.

References

  1. src/mon.c in NetHack 3.6.7, line 3493: select_newcham_form function governs random polymorph for shapechangers
  2. 2.0 2.1 src/mkobj.c in NetHack 3.6.7, line 1667: mk_tt_object function
  3. src/mkroom.c in NetHack 3.6.7, line 366
  4. dat/gehennom.des in NetHack 3.6.7, line 75
  5. src/mkroom.c in NetHack 3.6.7, line 385
  6. src/sp_lev.c in NetHack 3.6.7, line 1985: The code is very cryptic but fortunately has comments
  7. src/mplayer.c in NetHack 3.6.7, line 309
  8. src/mplayer.c in NetHack 3.6.7, line 312
  9. src/mplayer.c in NetHack 3.6.7, line 315
  10. src/mplayer.c in NetHack 3.6.7, line 149: per a comment above this line: "that's why they are "stuck" in the endgame :-)"
  11. src/mplayer.c in NetHack 3.6.7, line 282: special boolean is true for Astral Plane generation
  12. src/mplayer.c in NetHack 3.6.7, line 283
  13. src/mplayer.c in NetHack 3.6.7, line 299: 13 chance of 0-15 gems or 0-2 gems otherwise
  14. src/mplayer.c in NetHack 3.6.7, line 304
  15. src/mplayer.c in NetHack 3.6.7, line 305
  16. src/objects.c in NetHack 3.6.7, line 138-L292
  17. src/mplayer.c in NetHack 3.6.7, line 155: Default weapons are chosen from range of spear to bullwhip, using standard random generation probabilities[16]
  18. src/mplayer.c in NetHack 3.6.7, line 224
  19. src/mplayer.c in NetHack 3.6.7, line 265
  20. src/mplayer.c in NetHack 3.6.7, line 270
  21. src/mplayer.c in NetHack 3.6.7, line 266
  22. src/mplayer.c in NetHack 3.6.7, line 268
  23. src/objects.c in NetHack 3.6.7, line 378-L389
  24. src/mplayer.c in NetHack 3.6.7, line 156: DSM is chosen from all available colors with equal probability of each[23]
  25. src/mplayer.c in NetHack 3.6.7, line 285
  26. src/objects.c in NetHack 3.6.7, line 454-L474
  27. src/mplayer.c in NetHack 3.6.7, line 157: chosen from range of oilskin cloak to cloak of displacement, using standard random generation probabilities[26]
  28. src/mplayer.c in NetHack 3.6.7, line 286
  29. src/objects.c in NetHack 3.6.7, line 339-L363
  30. src/mplayer.c in NetHack 3.6.7, line 159: chosen from range of elven leather helm to helm of telepathy, using the standard random generation probabilities[29]
  31. src/mplayer.c in NetHack 3.6.7, line 287
  32. src/mplayer.c in NetHack 3.6.7, line 161: chosen from range of elven shield to shield of reflection, using the standard random generation probabilities
  33. src/mplayer.c in NetHack 3.6.7, line 288
  34. src/objects.c in NetHack 3.6.7, line 497-L504
  35. src/mplayer.c in NetHack 3.6.7, line 289: chosen from range of leather gloves to gauntlets of dexterity, using the standard random generation probabilities[34]
  36. src/objects.c in NetHack 3.6.7, line 507-L528
  37. src/mplayer.c in NetHack 3.6.7, line 294: chosen from range of low boots to levitation boots, using the standard random generation probabilities[36]
  38. src/mplayer.c in NetHack 3.6.7, line 105
  39. src/mplayer.c in NetHack 3.6.7, line 115: enchantment is independent of beatitude; as the comment above in the code clarifies, cursed positively enchanted armor can occur from run ins with other monsters