Apple
An apple is a type of veggy comestible that appears in NetHack.
Contents
Generation
Healers and Monks start each game with 5-10 apples.[1][2] Knights start each game with 10-20 apples.[3] Tourists may start with apples among their random food items.[4]
Kicking a tree has a one-time 14⁄15 chance of dropping (8−rnl(7)) fruits, which may be apples.[5] Cutting down a tree has a 1⁄5 chance of producing a piece of fruit that can be an apple.[6] If a tree is tunneled through, there is a 1⁄3 chance of fruit being left behind, which can be an apple.[7]
Applying a charged horn of plenty has a 1.4% chance of generating an apple or two.[8]
Description
When eaten, an apple provides 50 nutrition and takes 1 turn to consume - eating a cursed apple will also cause the hero to fall asleep for 20-30 turns if they lack sleep resistance, and food appraisal will warn a hero if they are about to eat one.[9][10]
Apples are vegan, and can be used to tame domestic herbivorous monsters and pacify domestic carnivores - herbivorous pets will consider apples to be treats.
Strategy
Apples are best saved for taming or feeding pets, and Knights in particular will want to prioritize keeping their steed fed. However, Healers, Knights, and Monks may consider eating their starting apples if extra permafood proves especially scarce.
History
The apple first appears in Hack 1.21 and Hack for PDP-11, which is based on Jay Fenlason's Hack, and is included in the initial item list for Hack 1.0.
Origin
The effect of a cursed apple when eaten is a reference to the fairy tale of Snow White and the poisoned apple.
The Unix-specific messages appear to be derived from joke Unix documentation within a Usenet post that is not archived by Google Groups.
The presence of apples in a Healer's starting inventory may be a reference to the aphorism "an apple a day keeps the doctor away".
Messages
- You hear sinister laughter as you fall asleep...
- You ate a cursed apple and fell asleep.
- You fall asleep.
- As above, while deaf.
- Heigh-ho, ho-hum, I think I'll skip work today.
- As above, but you are a dwarf and hallucinating.
Some YAFMs appear if you eat an apple or pear in NetHack while playing on a Unix or Mac OS system:[11][12]
Message | Effect |
---|---|
"Core dumped." (Unix, not hallucinating) | No effect
When a Unix program performs an illegal operation, the kernel shuts down the program, and the program often dumps a core file for loading into debuggers; the pun is that apples are usually dumped once the core is the only thing left. |
"Segmentation fault -- core dumped." (75⁄100 chance) "Bus error -- core dumped." (24⁄100 chance) |
No effect
As above, but these error messages are more 'realistic' - an actual "core dumped" error on Unix comes with the cause of the crash. |
"Delicious! Must be a Macintosh!" (Mac OS before Mac OS X which is Unix-like) | No effect
Apple Computer named their Macintosh computers after a real type of apple. |
Encyclopedia entry
NEWTONIAN, adj. Pertaining to a philosophy of the universe invented by Newton, who discovered that an apple will fall to the ground, but was unable to say why. His successors and disciples have advanced so far as to be able to say when.
References
- ↑ src/u_init.c in NetHack 3.6.7, line 70: Healer starting inventory
- ↑ src/u_init.c in NetHack 3.6.7, line 93: Monk starting inventory
- ↑ src/u_init.c in NetHack 3.6.7, line 93: Knight starting inventory
- ↑ src/u_init.c in NetHack 3.6.7, line 144: Tourist starting inventory
- ↑ src/dokick.c in NetHack 3.6.7, line 1115
- ↑ src/dig.c in NetHack 3.6.7, line 398
- ↑ src/dig.c in NetHack 3.6.7, line 1321
- ↑ src/mkobj.c in NetHack 3.6.7, line 2219: any comestible that can be randomly generated is eligible
- ↑ src/eat.c in NetHack 3.6.7, line 2253
- ↑ src/eat.c in NetHack 3.6.7, line 2375
- ↑ src/eat.c in NetHack 3.6.7, line 1851
- ↑ src/eat.c in NetHack 3.6.7, line 1859