# Ray
Rays are directional attacks produced by certain wands, spells, horns, and monster attacks.
The ray attack is animated on screen, and a horn or wand will auto-identify if you are not blind. A standard ray will bounce if it hits a wall or a creature with reflection. Rays are halted by doors, although many will destroy the door in the process. The ray characteristics allow you to attack enemies without reply in the right situation. In the wrong situation, you may be unable to use your powerful ray attacks for fear of shooting yourself.
Non-standard rays include digging and fireball. A wand of digging cuts through walls and doors to its maximum range, while fireballs explode on impact.
A ray will travel 7 to 13 squares.[1] For each monster hit, range decreases by 2.[2] If fire passes over water or a fountain, or cold passes over water or lava, range may decrease by 1, 3, or the ray may stop entirely. If fire passes over scrolls or spellbooks, some may burn, but range isn't decreased.[3] Each time it bounces off a wall, range decreases by 1.[4] Reflection off a monster or you reverses the direction of travel, but range doesn't decrease.[5]

Contents

1 Bouncing rays

1.1 Straight reflections
1.2 Angled reflections
1.3 Corner reflections

2 Sources

2.1 Wands
2.2 Spells
2.3 Horns
2.4 Breath attacks

3 See also
4 References

Bouncing rays
Rays that intersect with a wall will bounce, if they have sufficient range to continue to affect squares.

Straight reflections
A ray hitting a wall straight on will move one square into the wall and then bounce straight back, meaning it may hit a monster twice, even one standing against the wall hit. Just beware of it also hitting you!

|......        |......        |......
|&lt;--@..        &lt;--.@..        --&gt;.@..
|......        |......        |......
Initial ray    Straight       Ray headed
direction      bounce         back at @

Angled reflections
If a ray hits a wall at an angle, it usually penetrates the wall one square and reflects accordingly. Note that the penetration does not affect something on the other side of the wall but will hit something in the wall (like a xorn).

|......        |......        |.../..
|..c...        |..c...        |..%...
|......        |./....        |./....
|b.....        |%.....        |%.....
|a.....        \a.....        |a..... 
|\.....        |\.....        |......
|.\....        |......        |......
|..@...        |..@...        |..@...
Ray heading    Ray hits       Ray also will
up-left        wall, misses   hit c if able
               a, hitting b

1/20 of the time, the ray will instead bounce straight back in the direction it came from.[6]

|......        |......        |......
|..c...        |..c...        |..c...
|......        |......        |......
|b.....        |b.....        |b.....
|a.....        \a.....        |a..... 
|\.....        |\.....        |\.....
|.\....        |......        |.\....
|..@...        |..@...        |..%...
Ray heading    Ray hits       Ray hits @
up-left        wall, turns    
               around

Corner reflections
If a ray hits a concave (or "internal") corner, it will always reflect the ray back towards its point of origin.

┌----          \----          ┌----
|\...          |\...          |\...
|.\..          |....          |.\..
|..@.          |..@.          |..%.
Ray heading    Hits wall      Ray also will
up-left        starts heading hit @ if able
               down-right

If the ray hits a convex (or "external") corner, the ray reflects randomly between 3 cases: it has 1/20 chance of reflecting straight back; a 19/40 chance of reflecting left, and a 19/40 chance of reflecting right.[7]

Reflecting back
    ┌----           ┌---- 
    |..a.           |..a.
    |....           |....
    |....           |....
┌---┘....       ┌---\....              
|....\...       |....\...
|.....\..       |.....\..
|b.....@.       |b.....%.
                Ray is returned
                to its sender
Reflecting left
    ┌----           ┌---- 
    |..a.           |..a.
    |....           |....
    |....           |....
┌---┘....       ┌---\....              
|....\...       |../.\...
|.....\..       |./...\..
|b.....@.       |%.....@.
                Ray reflects
                90 degrees "left",
                hitting b

Reflecting right
    ┌----           ┌---- 
    |..a.           |..%.
    |....           |./..
    |....           |/...
┌---┘....       ┌---\....            
|....\...       |....\...
|.....\..       |.....\..
|b.....@.       |b.....@.
                Ray reflects
                90 degrees "right"
                hitting a

Sources
Wands
Wand of cold
Wand of death
Wand of digging (Does not reflect)
Wand of fire
Wand of lightning
Wand of magic missile
Wand of sleep
Spells
Spellbook of cone of cold (at skill levels below Skilled)
Spellbook of dig (Does not reflect)
Spellbook of finger of death
Spellbook of fireball (at skill levels below Skilled) (Does not reflect)
Spellbook of magic missile
Spellbook of sleep
Horns
Fire horn
Frost horn
Breath attacks
A winter wolf's cold breath.
A hellhound's fire breath
A blue dragon's lightning breath
A black dragon's disintegration breath
A gray dragon's magic missile breath
A green dragon's poison breath
An orange dragon's sleep breath
A red dragon's fire breath
A silver dragon or white dragon's cold breath
A yellow dragon's acid breath
A red naga's fire breath
See also
Beam, another type of directional attack
References

↑ zap.c in NetHack 3.4.3, line 3308: ray wand range

↑ zap.c in NetHack 3.4.3, line 3434: ray hit monster

↑ zap_over_floor in zap.c

↑ zap.c in NetHack 3.4.3, line 3483: ray bounce

↑ zap.c in NetHack 3.4.3, line 3346: reflecting ray

↑ zap.c in NetHack 3.4.3, line 3486

↑ zap.c in NetHack 3.4.3, line 3490

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.