# Zoo
 The player encountering a treasure zoo.
A zoo, short for a treasure zoo, is a special room that occurs in NetHack. It can be randomly generated in the Dungeons of Doom, and also appears in several special levels. Most of the squares in the zoo are occupied by a sleeping random monster and a random amount of gold.

Contents

1 Generation

1.1 Special levels with zoos

2 Strategy
3 History
4 Origin
5 Messages
6 References

Generation
Zoos can be randomly generated on any level in the main branch beneath level 6.[1] Each normal, non-maze level has a one in seven chance of containing a zoo unless the level already has a shop, a throne room, or a leprechaun hall.[2] In practice, this means the player has about a 10% chance of finding one on eligible levels.

Special levels with zoos
The top floor of Sokoban always has a zoo at the end of the fourth floor, with the closets containing the Sokoban prize behind it. 
Fort Ludios has a zoo in the frontmost section of the level, which is the first room the player must pass through.
In the Tourist quest, a zoo can be found on the eastern end of the locate level, the Thieves' Guild Hall.
The middle level of the Wizard's Tower has a large zoo that must be crossed to reach the upstair.

Strategy
The main risk of zoos is being overwhelmed by multiple attackers, or else having any escape routes potentially cut off.
A common strategy is to use stealth, either via intrinsic or through an item such as elven boots or a ring of stealth. Stealthy characters can attack each sleeping monster one at a time without waking up the entire zoo, making combat much easier. Be careful to avoid kicking anything or engaging exploding enemies such as yellow lights and gas spores; blocking off pets that lack stealth may also be advisable. Stealth is not viable for the Fort Ludios zoo, as entering the level causes an alarm to sound and wakes all the monsters on the level.
It is often safer to displace several pets into a zoo - monsters will use their ranged attack only against you, and will only attack the pet when it attacks them. You may need to stay close to keep your pets healed, however.
For combat situations where most or all of the zoo's inhabitants have been awakened, you can opt to use a ring of conflict and turn them against each other. Keep in mind that you are still an eligible target and may still find yourself on the wrong end of some projectile attacks; conflict will also endanger your pet and/or cause them to attack you as well if they are in the area.

History
Treasure zoos first appear in Hack for PDP-11 a variant of Jay Fenlason's Hack - Hack 1.0 is the first to use the name David's treasure zoo. In Hack 1.0 and Hack 1.0.1, if a player's login name was "david", the treasure zoo would appear much more frequently for that character.[3]

Origin
The "David" that the zoos are named for refers to David S. H. Rosenthal, who was a co-worker of Andries Brouwer in 1982.

Messages
You hear a sound reminiscent of a seal barking.You hear a sound reminiscent of an elephant stepping on a peanut.
There is a zoo on the level.
You hear Doctor Dolittle!
As above, but you are hallucinating.
Welcome to David's treasure zoo!
You have entered the zoo.
References

↑ src/mklev.c in NetHack 3.6.6, line 774

↑ src/mklev.c in NetHack 3.6.6, line 764

↑ Hack 1.0 mklev.c, line 147