Firing
Jump to navigation
Jump to search
| Keyboard commands | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | = | + | ||||||||
| Q | W | E | R | T | Y | U | I | O | P | { | } | | | |||||||||
| q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |||||||||
| A | S | D | F | G | H | J | K | L | : | " | |||||||||||
| a | s | d | f | g | h | j | k | l | ; | ' | |||||||||||
| Z | X | C | V | B | N | M | < | > | ? | ||||||||||||
| z | x | c | v | b | n | m | , | . | / | ||||||||||||
| q | w | e | r | t | u | i | o | p | Alt | ||||||||||||
| a | s | d | f | j | l | Alt | |||||||||||||||
| c | v | n | m | ? | Alt | ||||||||||||||||
| A | C | R | T | O | Alt | ||||||||||||||||
| a | c | d | o | p | r | t | [ | Ctrl | |||||||||||||
- This article is about the act of shooting pre-quivered projectiles. For other uses of the term, see fire (disambiguation).
In NetHack, firing is the act of automatically throwing or shooting ammunition or other projectiles from the hero's quiver.
Description
Firing is done by pressing the f key, which performs one of the following actions depending on if the hero has anything in particular wielded or quivered and if the autoquiver option is enabled:[1]
- If the hero is wielding an aklys and their quiver is either empty or has ammo other than missiles, it will ignore the quiver and prompt the player for a cardinal direction to throw the aklys in[2][3][4]—it will also do so for the wielded artifact Mjollnir, if the hero is a Valkyrie with 25 strength and does not have daggers quivered.[5][6]
- If the hero is wielding a lance, any type of polearm or the artifact Snickersnee, it will prompt the player for a square to target or else auto-target a square if it was previously used via the firing command.[7][8]
- If the hero is wielding a bullwhip, it will prompt the player for a cardinal direction to apply it in.[9]
- If the hero's offhand weapon slot contains a lance, polearm or Snickersnee, and that weapon is known to not be cursed, the hero will use an action to switch to that weapon if possible, and the player will be prompted for a square to target if the hero is not interrupted.[10][9]
- If none of the above apply and the hero has projectiles quivered, it will prompt for a cardinal direction that the player wants to fire in.[11]
- If the hero does not have any projectiles quivered, but has the autoquiver option enabled, then the game will check their inventory and have them automatically quiver a set of appropriate projectiles if possible, including checking for ammo that matches any wielded launcher.[12][13] (The auto-quivering process is detailed more thoroughly in the section below.) Then, the game will prompt for a cardinal direction the player wants to fire in.
- If the hero does not have any projectiles quivered and has the autoquiver option disabled, the player will be prompted to quiver an item in their inventory. If they select an item to quiver, the game will then prompt for a cardinal direction the player wants to fire in.[14]
Auto-quivering
When automatically quivering items, the game will try to match ammunition in the inventory to the hero's current launcher (if any):[15]
- It will avoid quivering artifacts, worn items and items of types that are not yet discovered.[16]
- It will first check for rocks, known flint stones, and known worthless glass to quiver, and will prioritize them if the hero is wielding a sling.[17] Other gems will be skipped, requiring a hero that wants to quiver them to do so manually.[18]
- It will then check for other ammunition that requires a launcher–arrows, elven arrows, orcish arrows, ya, and/or crossbow bolts–and will prioritize accordingly if the hero is wielding an appropriate launcher, i.e. a bow, elven bow, orcish bow, yumi, or a crossbow.[19]
- It will next check for missile weapons that are designed to be thrown, which consists of darts, shuriken and boomerangs.[20]
- It will finally check for melee weapons that can be thrown, which consists of daggers, elven daggers, orcish daggers, spears, orcish spears, elven spears, dwarvish spears, javelins, and the aklys.[21]
Once it has accounted for all weapons and ammunition that the hero can throw or shoot, it will select the best available option and then place them in the hero's quiver.[22]
References
- ↑ src/dothrow.c in NetHack 5.0.0, line 467-L586: dofire() function
- ↑ src/dothrow.c in NetHack 5.0.0, line 28-L34
- ↑ src/dothrow.c in NetHack 5.0.0, line 473-L478
- ↑ src/dothrow.c in NetHack 5.0.0, line 502-L508
- ↑ src/dothrow.c in NetHack 5.0.0, line 33
- ↑ src/dothrow.c in NetHack 5.0.0, line 477
- ↑ src/dothrow.c in NetHack 5.0.0, line 512-L514
- ↑ include/obj.h in NetHack 5.0.0, line 228-L232
- ↑ 9.0 9.1 src/dothrow.c in NetHack 5.0.0, line 515-L517: list of polearm-style weapons
- ↑ src/dothrow.c in NetHack 5.0.0, line 518-L525
- ↑ src/dothrow.c in NetHack 5.0.0, line 501
- ↑ src/dothrow.c in NetHack 5.0.0, line 520: calls autoquiver()
- ↑ src/dothrow.c in NetHack 5.0.0, line 378-L442: autoquiver() function
- ↑ src/dothrow.c in NetHack 5.0.0, line 543-L555
- ↑ src/dothrow.c in NetHack 5.0.0, line 388-L429: inventory scan in autoquiver()
- ↑ src/dothrow.c in NetHack 5.0.0, line 390-L391
- ↑ src/dothrow.c in NetHack 5.0.0, line 392-L404
- ↑ src/dothrow.c in NetHack 5.0.0, line 405-L407
- ↑ src/dothrow.c in NetHack 5.0.0, line 408-L416
- ↑ src/dothrow.c in NetHack 5.0.0, line 417-L419
- ↑ src/dothrow.c in NetHack 5.0.0, line 420-L428
- ↑ src/dothrow.c in NetHack 5.0.0, line 431-L441
- This page is a stub. Should you wish to do so, you can contribute by expanding this page.