Spellbook

From NetHackWiki
(Redirected from Contact-poisoned spellbook)
Jump to navigation Jump to search

A spellbook is a class of item that appears in NetHack. Most spellbook items are generally used for the purpose of spellcasting.

All standard spellbooks have a weight of 50 aum and a base price of 100zm times that spell's level.[1] Spellbook items with the randomized appearance of a "vellum" or "parchment spellbook" are made of leather, while all other spellbook items are made of paper.

Spellbooks are represented by the plus sign glyph (+), which is also shared with closed doors and the Rogue level doorways—in tty mode, both brown spellbooks and closed doors share the + symbol.

Generation

Spellbooks as an item type make up 125 (4%) of all items that are randomly generated on the ground in the Dungeons of Doom, as well as items generated in general shops or as death drops[2]—they also make up 325 (12%) of all items generated inside containers.[3] They are not normally generated randomly on the ground of the Rogue level or Gehennom.

Second-hand bookstores and rare books shops will buy and sell spellbooks: second-hand bookstores have a 110 chance of generating a spellbook for each item during level creation, while rare books shops have a 910 chance of generating a spellbook for each item during level creation.[4][5] Novels are not randomly generated normally, and will only generate inside these shops.[6]

Hero's starting inventory

Some roles available to the hero will start with spellbooks in their initial inventory, and will additionally start with 20,000 turns of knowledge for the spells taught by those books:[7][8][9]

  • Healers start with a blessed spellbook of healing, a blessed spellbook of extra healing and a blessed spellbook of stone to flesh.[10]
  • Monks start with one of a spellbook of healing, a spellbook of protection or a spellbook of confuse monster with equal probability.[11][12][13]
  • Clerics start with two random spellbooks.[14]
  • Wizards start with a spellbook of force bolt and a second random spellbook.[15]

Spellbooks created as part of a hero's starting inventory are always identified and unread, and will always contain spells that are at most level 3 and part of a spell school that the hero's role can train in (e.g. a Priest will never be given a spellbook of force bolt or a spellbook of magic mapping).[16] The hero will also never receive spellbooks of blank paper or duplicates of a spellbook they already have, e.g. a Wizard will not get a second spellbook of force bolt.[17][18] Finally, spellbook generation for initial inventories will attempt to ensure that the hero always has at least one level 1 spellbook.[19]

Paupers will not start with any spellbooks, but certain roles will start with knowledge of certain spellbooks for "key" spells (not to be confused with their special spells):[20]

  • Healers start with knowledge of the spellbook of healing.[21]
  • Clerics, Knights and Monks start with knowledge of the spellbook of protection[22]—note that the Knight does not normally start with a spellbook.
  • Wizards start with knowledge of the spellbook of force bolt.[23]

Prayer and gifts

A hero that successfully prays while in good standing with their deity (especially if they are standing on a co-aligned altar) may be given a blessed spellbook that is placed on their square as a favor:[24][25] this spellbook is generated according to normal object probabilities (which is show in the section listing all spellbook items), and the gift will be re-rolled if this produces a spellbook for a spell whose school the hero is restricted in, a spellbook for a spell that the hero currently knows and has not forgotten, or a spellbook of blank paper for a hero that has identified that book type and is not carrying a magic marker.[26] Spellbook gifts will be re-rolled until a valid gift is produced or until it has been re-rolled a number of times equal to the hero's experience level plus one.[27][28]

A hero that would receive a spellbook gift other than a spellbook of blank paper has a 14 chance of being gifted divine knowledge of a spell instead, regardless of if they are illiterate[29]—this divine knowledge can also teach the hero a spell they have previously forgotten.[30] A redundant spellbook will be given as normal if gift generation does not successfully pick an unknown spell.[31] Blank spellbooks that are gifted will be identified, and other gifted books have a 1100 chance of being identified when given.[32]

Using spellbooks

The pages of a spellbook are inscribed with magical runes that describe a spell, and the hero has a chance of learning that spell by reading the book. Spells learned by the hero can be viewed by pressing + and cast by pressing Z, and a hero will retain knowledge of a spell for 20,000 game turns after learning it.[33] Monsters cannot use spellbooks, though they may pick up spellbooks if they collect items and/or like magic items.

These three spellbook items behave differently from other standard spellbooks:

  • Spellbooks of blank paper have the same weight of 50 aum as other spellbooks, but have no base price. They are designed for a hero to apply a magic marker onto and write another type of spellbook that the hero knows, and thus they have no text to "read".[34][35]
  • Novels weigh 10 aum and have a base price of 20zm, and display excerpts from a Discworld novel when read—the first novel that the hero reads also grants them experience points.[36][37]
  • The Book of the Dead weighs 50 aum and has a base price of 10,000zm. It is one of the three invocation items needed to open Moloch's Sanctum, and is the only "once per game" item (artifacts included) to be a spellbook item.

Spellbooks other than novels and spellbooks of blank paper are magical items. All spellbook items except the Book of the Dead can be eaten by a gelatinous cube that moves over them, and a hero that is polymorphed into a gelatinous cube can use e to eat a spellbook item in their inventory or on their square[38]—eating a vellum or parchment spellbook this way breaks the vegan conduct. Spellbooks subjected to fire damage (e.g. being submerged in lava) are destroyed, with the Book of the Dead and the spellbook of fireball being immune.

The types of spellbook items that can be found are listed in the next section—below that section are more in-depth descriptions of how to utilize spellbooks, including reading spellbooks, writing in blank ones and turning spellbooks blank as well as strategic uses of spellbooks. Reading and writing spellbooks will naturally break the illiterate conduct.

List of spellbooks

All spellbook-class items are listed in this section: they are grouped by the school of magic that each spell represents, which are placed in alphabetical order, and then each spell within that spell school is ordered from the lowest level to the highest.

Some of the non-obvious columns are explained as follows:

  • The "Direction" column denotes the spell taught by a given spellbook as one of four directional types—non-directional, beam, ray, and distant.
  • The "Probability conditional on price" column is intended for use with price identification, and details how likely it is that a book whose price the player knows will teach a given spell. (For instance, a spellbook with a base price of 700 zm is 75% likely to be cancellation, and 25% likely to be finger of death.)
  • The "Actions to read" column displays how many actions are needed to fully read the spellbook: this is equal to the number of game turns for a hero whose speed is 12, so a faster hero will take fewer turns to read the book—the amount of time is calculated differently for each book depending on the spell's level and the spellbook's "delay" value.[39]
    • Putting on a pair of lenses and then reading a spellbook successfully reduces this number of actions by approximately one-third.[40]
    • Due to a fencepost error, the 'delay' set for reading a spellbook is processed on "turn 0" and actually set on the first turn, and both turns are counted towards the total duration required to fully read a book.
  • The "Skill changes" column denotes spellboks whose spells behave differently if the hero has a higher skill level in that spell's school. "B" indicates that the spell behaves differently at a skill level of Basic or greater, "S" indicates that the spell behaves differently at Skilled or greater, and "E" indicates that the spell behaves differently at Expert. Damaging spells also have improved to-hit at higher skill levels.

Attack

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of force bolt 1 beam 3.0% 11.1% 4
Spellbook of chain lightning 2 non-directional 2.5% 11.1% 8
Spellbook of drain life 2 beam 1.0% 4.4% 4
Spellbook of magic missile 2 ray 4.5% 20.0% 4
Spellbook of cone of cold 4 ray (distant if skilled) 1.0% 8.7% 23 S becomes targeted spell
Spellbook of fireball 4 ray (distant if skilled) 2.0% 17.4% 14 S becomes targeted spell
Spellbook of finger of death 7 ray 0.5% 25.0% 82


Clerical

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of protection 1 non-directional 1.8% 6.7% 5 E wears off more gradually
Spellbook of create monster 2 non-directional 3.5% 15.5% 5
Spellbook of remove curse 3 non-directional 2.5% 10.3% 12 S affects entire inventory
Spellbook of create familiar 6 non-directional 1.0% 19.6% 44
Spellbook of turn undead 6 beam 1.6% 31.4% 50


Divination

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of detect monsters 1 non-directional 4.3% 15.9% 3 S lasts multiple turns
Spellbook of light 1 non-directional 4.5% 16.7% 3
Spellbook of detect food 2 non-directional 3.0% 13.3% 5 S grants food appraisal
Spellbook of clairvoyance 3 non-directional 1.5% 6.2% 8 S displays monsters and item appearances
Spellbook of detect unseen 3 non-directional 2.0% 8.3% 10
Spellbook of identify 3 non-directional 2.0% 8.3% 14 S higher chance of identifying more items
Spellbook of detect treasure 4 non-directional 2.0% 17.4% 17 S more detailed object info
Spellbook of magic mapping 5 non-directional 1.8% 26.5% 37


Enchantment

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of confuse monster 1 non-directional 4.9% 18.1% 4 S more charges per casting
Spellbook of slow monster 2 beam 3.0% 13.3% 4
Spellbook of sleep 3 ray 3.0% 12.4% 3
Spellbook of cause fear 3 non-directional 2.5% 10.3% 8
Spellbook of charm monster 5 non-directional 2.0% 29.4% 30


Escape

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of jumping 1 non-directional 2.0% 7.4% 5 BSE larger range
Spellbook of haste self 3 non-directional 3.3% 13.6% 10 S longer duration
Spellbook of invisibility 4 non-directional 2.0% 17.4% 17
Spellbook of levitation 4 non-directional 2.0% 17.4% 14 S longer duration and can land at will
Spellbook of teleport away 6 beam 1.5% 29.4% 38


Healing

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes Change description
Spellbook of healing 1 beam 4.0% 14.8% 4 S also cures blindness
Spellbook of cure blindness 2 non-directional 2.5% 11.1% 4
Spellbook of cure sickness 3 non-directional 3.2% 13.2% 8
Spellbook of extra healing 3 beam 2.7% 11.2% 12
Spellbook of stone to flesh 3 beam 1.5% 6.2% 4
Spellbook of restore ability 4 non-directional 2.5% 21.7% 17 S restores all below-peak attributes


Matter

Spellbook Spell level Direction Relative probability Probability conditional on price Actions to read Skill changes
Spellbook of knock 1 beam 2.5% 9.3% 3
Spellbook of wizard lock 2 beam 2.5% 11.1% 5
Spellbook of dig 5 ray 2.0% 29.4% 32
Spellbook of polymorph 6 beam 1.0% 19.6% 50
Spellbook of cancellation 7 beam 1.5% 75.0% 66


Other

Reading spellbooks

Spellbooks are read by pressing r and selecting the desired spellbook from the hero's inventory, and they cannot be read while blind. The odds of a hero properly reading a spellbook are dependent on both the book's difficulty and their own abilities, and higher-level spells are harder to learn—this is explained in-depth within the next section. Attempting to read a novel or any spellbook other than the Book of the Dead or a spellbook of blank paper will naturally break the illiterate conduct.[41][42]

A hero that successfully reads a spellbook will exercise wisdom and continue the reading occupation for the appropriate amount of actions, until they are either interrupted (e.g. by a hostile monster appearing, the book becoming cursed or the hero becoming confused[43]) or they learn that book's spell and identify the spellbook if it was unknown to them[44]—the expected amount of actions required to read a given spellbook are displayed in the lists above. A hero successfully reading a spellbook for an already-known spell can reinforce their memory of that spell if they are close to forgetting it.[45]

Spellbooks have a limit of four successful reads per individual book:[46] each time the hero successfully learns a spell from a given spellbook or reinforces their memory of the spell using it, that book's 'read' counter is incremented by one[47][48][49]—a spellbook that is polymorphed into another spellbook will also have its 'read' counter increased by 1 (note that the spellbook of polymorph cannot be polymorphed). A spellbook that is read when its 'read' counter is at least 4 four times and is read again will have its ink fade, and that book will become a spellbook of blank paper with a 'read' counter that is set to a random value from 0 to one less than the former book's 'read' counter.[50][51] A hero reading a spellbook that is not blank and belongs to a shop while in the presence of its shopkeeper will incur a usage fee unless they already have keen memory of the book's spell.[47]

A hero can apply a spellbook to flip through the pages and appraise how fresh it is—see the section on messages below for the associated feedback.

Mechanics and probability of success

The probability of successfully learning a spell from reading a spellbook are dependent on that spellbook's beatitude, the level of its spell, and the hero's intelligence and experience level.[52] For uncursed spellbooks, this is governed by the equation below:[53]

\frac{Int + 4 + \lfloor \frac{XPLevel}{2} \rfloor - (BookLevel \times 2)}{20}

The result of XL2 is always floored, i.e. rounded down to the nearest whole. A hero with a worn pair of lenses that reads a spellbook increases their chance of success by +10%.[53] A hero reading a blessed spellbook will always succeed in learning its spell.[54] Wizards reading an uncursed spellbook will be warned if their chance of success is below 100% and prompted if they want to continue, with a slightly different message used if that chance is also below 60%.[55]

As an example, a starting hero (experience level 1) with 16 intelligence has a 1820 chance (90%) of successfully reading a level 1 spellbook, while they have a 1220 chance (60%) of successfully reading a level 4 spellbook—that same hero at experience level 6 or 7 will always successfully read a level 1 spellbook and has a 1520 chance (75%) of successfully reading a level 4 spellbook.

If a hero successfully reads a spellbook, the hero will exercise wisdom and restore their memory of that spell to 20,000 turns.[45] If the hero was interrupted while successfully reading a spellbook and they are not currently confused, attempting to read the same spellbook within a certain amount of turns will let them resume without requiring another check.[56]

Failing to read an uncursed spellbook or attempting to read a cursed spellbook will cause one of several adverse effects described further below, and the spellbook may be destroyed as a result.[57] Reading any spellbook while confused performs the normal check for successful reading, but always causes a different failure effect that also has a chance of destroying the spellbook.

Dull spellbooks

When the hero is not confused and attempting to read a spellbook with the randomized appearance of a "dull spellbook", they have a wisdom-based chance of falling asleep instead of rolling to learn the book's spell, unless they have sleep resistance:[58] a hero without sleep resistance has a WIS25 chance of not falling asleep, and failing this check will put the hero to sleep for at least two turns, up to a maximum of (2*level) + (25-WIS).[59] For example, a hero with 12 Wisdom that reads a dull spellbook of extra healing has a 1225 chance (48%) of not falling asleep, and will be put to sleep for 2-19 turns if they fail to resist.

If the hero succeeds in staying awake and successfully reads a dull spellbook, but then they are interrupted during that occupation, any attempt to resume reading forces them to roll again in order to avoid falling asleep—the hero will gain an effective bonus to wisdom for that attempt, with the bonus die being the size of the book's spell level (e.g. the spellbook of extra healing in the previous example would grant a +d3 bonus).[60]

Failure effects

Reading a cursed spellbook or failing to read an uncursed spellbook will render the hero immobile for a number of turns equal to the amount of actions required to read the book minus two, ignoring free action[39][57]—this also applies to reading one while confused, even if the hero would have succeeded normally otherwise.[61][62][63] The minimum possible duration of this immobility is one turn (shared by the spellbooks of detect monsters, light, sleep, and knock), and the maximum duration is 80 turns (finger of death). The Book of the Dead is not subject to any of these effects.

Failing to read a book due to confusion has a 13 chance of destroying the book.[64] Otherwise, a random effect is chosen to apply before rendering the hero immobile, with the list below numbered to match the minimum spellbook level needed for that effect to occur:[65]

  1. The hero will teleport elsewhere on the level if possible before immobility is applied.
  2. All monsters on the level are aggravated, waking them from sleep and undoing their paralysis if applicable.
  3. The hero is blinded for 250–349 turns.
  4. All the gold in the hero's wallet vanishes.
  5. The hero is confused for 16–22 turns.
  6. The hero is subjected to a "contact poison" and loses up to 10 HP along with 3–6 points of strength, which is reduced to 1-6 HP and 1–2 points of strength if the hero has poison resistance. Wearing gloves will prevent this effect, though the poison is potent enough to corrode worn gauntlets of power.
  7. The book radiates explosive energy, dealing 7–25 points of damage to the hero unless they have magic resistance and destroying itself.

If one of these effects is applied and the spellbook is not destroyed, there is a 13 chance of it crumbling to dust before immobility is applied, and a cursed spellbook will always crumble to dust this way.[66] If a spellbook is destroyed as the result of a failed reading attempt (including from confusion), the player will be prompted to type-name the spellbook by its appearance if it was not identified or already type-named.

Blanking spellbooks

In addition to fading from repeated use as described above, a spellbook that is not blank and not the Book of the Dead can be turned into a spellbook of blank paper through other means:

  • Dipping a spellbook into water (e.g. a fountain) or having it subjected to any form of water damage will blank its pages, leaving its beatitude unchanged.
  • A spellbook that is subjected to cancellation will turn into an uncursed spellbook of blank paper. The spellbook of cancellation cannot be blanked this way, and spellbooks of cancellation and blank paper will only be made uncursed.

Writing spellbooks

As stated further above, a hero can apply a magic marker to write on a selected spellbook of blank paper in the hero's inventory, which will then prompt the player for the name or appearance of the spellbook that they want to write. Attempting to write a spellbook will naturally break the illiterate conduct.[67] If the hero successfully writes a spellbook, the blank spellbook they used will be transformed into a copy of the chosen spellbook that has the same beatitude.[68] Novels cannot be written this way, and attempting to do so has 13 chance of destroying the spellbook.[69]

A hero cannot write a spellbook using a non-blank spellbook, and will abuse wisdom if they try.[70] They also cannot write in a blank spellbook while they are blind or in a form that lacks hands, and attempting to write with slippery fingers will cause them to drop the marker.[71][72][73] A hero cannot create blank spellbooks by writing, and also cannot write the Book of the Dead.[74][75]

Writing an unknown spellbook is dependent on the hero's role and their luck, with the probabilities detailed below. A hero will always succeed in writing a spellbook if their marker has enough ink and the spellbook they are writing is formally identified to them, i.e. their exact identity and appearance are listed on discoveries—the hero cannot write unknown spellbooks by their appearance, and type-names are not formal identification even if the player knows that the given type-name is correct.[76]

Each spellbook has a "base ink cost" of 10 times its spell's level, and a hero writing a spellbook must apply a magic marker with charges equal to at least half this value rounded down (i.e. 5 times the spell's level).[77] The hero will not initiate the writing process if their applied marker has fewer charges than the minimum for the desired spellbook.[78] The table to the right details the "base ink cost" of each spellbook type and the range of charges that each spellbook can require from a magic marker.

The process of writing a spellbook with a magic marker will use up a random amount of charges ranging from 5 times the spell's level to one less than the "base ink cost" as indicated by the table. As an example, a spellbook of identify requires a marker with at least 15 charges to attempt writing, but the actual writing process can use anywhere from 15 to 29 charges each time.

The amount of charges used for a given writing attempt is determined randomly upon initiating that attempt:[79] if the marker has at least the minimum amount of charges required, the hero will begin writing and exercise wisdom. If the amount of charges required for that attempt is more than the marker currently has, that marker will lose all of its remaining charges and the spellbook will blank itself.[80]

Probability of success

If the hero attempts to write an unknown spellbook, their chance of success depends on their current luck and is further improved if they know the spell (e.g. by divine knowledge) and the memory of it isn't going stale (more than 2000 turns remaining).[81]. Assuming non-negative luck, having knowledge of the spell increases the chance of successfully writing an unknown spellbook roughly by 3 times. The writing attempt will use up an appropriate amount of charges from the marker regardless of whether it succeeds.[79][80][82]

The table below displays the odds of a hero successfully writing an unknown spellbook with particular values of luck:

Luck Spell is known Spell is unknown
≤ −2 <1% <1%
−1 to 1 20% 6.7%
2 to 4 39% 13%
5 to 7 59% 20%
8 to 10 78% 26%
≥ 11 98% 33%

Strategy

For roles and characters builds that rely partly or primarily on spellcasting, spellbook management forms a significant amount of that hero's strategy, with specific aspects of this strategy grouped below.

In general, dedicated melee roles (e.g. most Valkyries) and similar builds can forego spellcasting and thus spellbooks much more easily: even so, if they are not observing illiterate conduct, it may be worth reading a fairly low-level spellbook in order to learn the spell and then forget it later on. Casting a forgotten spell can cause stunning and/or confusion—melee characters in the mid-game and later stages can deliberately cast forgotten spells to become confused "on-demand" and then read scrolls for various purposes, such as detecting traps with a non-cursed scroll of gold detection or repairing armor with a non-cursed scroll of enchant armor.

Carrying spellbooks

Heroes in roles that start with spellbooks will probably want to stash them at the first opportunity, both to avoid or reduce encumbrance and to avoid losing them to sources of fire. Selling them to an appropriate shop can be useful for extra gold in the early game, and you should be able to afford them or even come across a duplicate by the time you need to re-learn the spell. Roles that do not plan on spellcasting can safely sell most books that they come across for the same purpose—if they can find a low-level spellbook that is not cursed, it may be worth reading for the spell to provide a quick source of confusion once it is forgotten.

If you are purchasing a spellbook and have a 13 or higher net markup on your buying price (which is likely the case for an early-game character), reading a shop-owned book unbought and paying the usage fee is cheaper than buying the book and then reselling it after reading—be mindful that this runs the risk of teleporting you out of the shop you are in, and see the section below on safely reading spellbooks.

Safely reading spellbooks

In practice, some of the biggest dangers from reading non-blessed spellbooks are losing the book, being teleported to a random location on the level while immobile, or awakening a deadly or annoying monster such as a nymph. Reading spellbooks is especially perilous while carrying unpaid goods in shops (including an unpaid spellbook that you may have read): if you are teleported out of the shop and have not paid for the wares, the shopkeeper will become angry and call the Keystone Kops while you are frozen.

Do not attempt to read a spellbook unless you have tested or identified its beatitude and determined it is not cursed, and be sure to figure out the level of a spellbook you want to read beforehand—one method to easily determine this is price identification at a secondhand book store or rare books shop. Though not every failure to read a spellbook will necessarily be fatal or even especially harmful, players should act with caution when trying to read spellbooks they have found: Priests in particular are somewhat better-positioned for handling spellbooks despite not often starting with high intelligence, since they can see the beatitude of items and can use holy water to bless or at least uncurse a desired spellbook.

For especially cautious players who want "absolute" coverage against every possible drawback, you can read spellbooks of up to level 5 in relative safety if you lock yourself in a closet with Elbereth engraved on the floor and drop your gold on the floor. If you do not have teleport control, you can read the book on a non-teleport level, such as inside the closets on the top level of Sokoban. You can also wear non-metal gloves or have a potion of restore ability ready for level 6+ spellbooks, and can either use a source of magic resistance or have at least 26 HP for level 7 books.

Safely writing spellbooks

Players that plan on writing spellbooks should either have the spellbook of choice formally identified, or else have their luck maximized if they are writing a spellbook whose appearance is unknown to the hero—Wizards are in the best position to do so by far compared to other roles. Novels and spellbooks for unwanted spells can be blanked as necessary, with fresher spellbooks being more ideal if possible.

Learning spells

The following advice is useful for whenever you successfully read a spellbook:

  • Type-name it with the current turn number, so that you will know when you need to re-memorize it. You can review the type-names of identified items with the \ key.
  • Individual-name it '1', or increment the existing number, so you know how many times you have read it.

When studying a forgotten spell, read the book again immediately afterwards to make sure it won't turn blank (and fail to refresh the spell) the next time you need to read it—as noted above, if the spellbook is still viable, nothing bad will happen to it.

If you successfully write an unknown scroll or spellbook type, reading or identifying it will add it to your discoveries list so you can write it again later with 100% success.

Cursed spellbooks

Cursed spellbook effects have some niche applications: for example, a hero may want to deliberately read cursed spellbooks for level 1 spells in order to perform a guaranteed teleport, without using up other resources such as spellcasting power, scrolls of teleportation or charges from a wand of teleportation. This may be worth considering in place of other teleportation methods if the latter are at a premium, e.g. conserving power and scrolls of charging during a speed ascension; the hero will only be immobile for a short time (if not just one turn) afterward, and the spellbooks cost less ink than a scroll of teleportation, though books are heavier to carry than either the scroll or the wand.

History

Spellbooks are introduced in NetHack 1.3d. From this version to NetHack 3.2.3, including some variants based on those versions, the hero must transcribe a spellbook in order to learn its spell, and in the earlier versions this also uses up the spellbook regardless of whether the hero is successful. NetHack 3.3.0 introduces the modern system of learning spells as part of the incorporated Wizard Patch.

From NetHack 3.3.0 to NetHack 3.4.3, the hero can only read a spellbook to refresh their memory of its spell if they have 1,000 turns or less of knowledge remaining. Additionally, a bug causes a polymorphed spellbook to never fade if the spell is not already in the hero's spellcasting menu (accessed via + or Z), allowing the hero to read it once to learn the spell and then rewrite it with a magic marker for future reference. NetHack 3.6.0 fixes this bug and raises the turn threshold for refreshing spell knowledge from 1,000 to 2,000.[83]

NetHack 3.6.0 also introduces the additional effect of attempting to read dull spellbooks—in this version it ignores sleep resistance, which is fixed in NetHack 3.6.1.

The ability to apply a spellbook and see how many times it can be read before going blank is added in NetHack 5.0.0 via commit b55165ed, which is a feature adapted from UnNetHack.

Messages

You begin to memorize the runes.
You successfully read a spellbook.
You stop studying.
You were interrupted while learning a spell from a spellbook.
You continue your efforts to <memorize the spell/read the novel>.
You resumed reading a spellbook after being interrupted, with the latter used only for novels.
You learn <a spell>.
You learned a spell from a spellbook while not knowing any spells.
You add <the spell> to your repertoire.
You learned a spell from a spellbook while knowing at least one spell.
You know <the spell> quite well already.
You read a spellbook whose spell you already knew. This will also identify the spellbook if it was unknown.
Your knowledge of <the spell> is <keener/restored>.
You read a spellbook and restored your knowledge of its spell from low memory, with "restored" used if you had forgotten the spell.
This spellbook is <very> difficult to comprehend. Continue?
You are a Wizard, and were given a prompt to continue reading a spellbook that you do not have a 100% chance of learning the spell from. The word "very" is appended if the chance is below 60%.
This spellbook is too faint to be read anymore.
You read a spellbook that has already been read four times.
This spellbook is too faint to be read even once.
As above, but the spellbook was a product of polymorph and had its "read" counter set above 3.
The <magical> ink in this spellbook is fresh.
You are flipping through a spellbook that has been affected 0 times.
The <magical> ink in this spellbook is slightly faded.
You are flipping through a spellbook that has been affected 1 time.
The <magical> ink in this spellbook is very faded.
You are flipping through a spellbook that has been affected 2 times.
The <magical> ink in this spellbook is extremely faded.
You are flipping through a spellbook that has been affected 3 times. It can no longer be used to learn a new spell.
The <magical> ink in this spellbook is barely visible.
You are flipping through a spellbook that has been affected 4 times. It can no longer be studied at all.
You hear the pages make an unpleasant rustling sound.
You are flipping through the Book of the Dead.
You see the pages glow faintly red.
You are flipping through the Book of the Dead while deaf.

Failure

This book is so dull that you can't keep your <eyes> open.
You attempted to read a dull spellbook, and do not have sleep resistance. You do not learn the spell, but are not subjected to the other failure effects.

The following failure effect messages are ordered by the minimum level of spellbook required.

You feel a wrenching sensation.
You were teleported from failing to reading a spellbook.
You feel threatened.
You aggravated monsters from failing to reading a spellbook.
A cloud of darkness falls upon you.
You were blinded from failing to reading a spellbook.
You notice you have no money!
You lost all of your gold in your open inventory from failing to reading a spellbook.
You feel a strange sensation.
The gold-stealing or teleportation effect failed.
These runes were just too much to comprehend.
You became confused from failing to reading a spellbook.
The book was coated with contact poison!
You were subjected to poison from failing to reading a spellbook. You lose d10 HP and 3d2 strength, which is lowered to d6 HP and d2 strength if you are poison resistant.
As you read the book, it radiates explosive energy in your <face>!
You failed to read a spellbook and it self-destructed, inflicting 7-25 points of damage.
The book radiates explosive energy, but you are unharmed!
You triggered the above effect, but are magic resistant.

Confusion

Being confused you have difficulties in controlling your actions.
You attempted to read a spellbook while confused; this will always fail and lead to one of the following two messages:
You accidentally tear the spellbook to pieces.
The spellbook is destroyed; this has a 13 chance of occurring.
You find yourself reading the [first/next] line over and over again.
Nothing else happens.

Writing

You need hands to be able to write!
You attempted to use a magic marker on a spellbook while you have no hands.
Your <magic marker> can't create braille text.
You attempted to use a magic marker on a spellbook while blind.
That <spellbook> is not blank!
You attempted to use a magic marker on a spellbook other than a spellbook of blank paper, abusing wisdom.
What type of <spellbook> do you want to write?
You applied a marker to a blank spellbook and are prompted for a spellbook type to write.
You can't write that!
It's obscene!
You attempted to "write" a spellbook of blank paper.
No mere dungeon adventurer could write that.
You attempted to write the Book of the Dead.
Unfortunately you don't have enough information to go on.
You attempted to write an unknown spellbook by specifically entering its appearance.
Your marker is too dry to write that!
You attempted to write a spellbook whose base ink cost is more than twice the amount of charges that the chosen marker has. This and the other actions that cause the messages above will not initiate the writing process.
Your marker dries out!
The spellbook is left unfinished and your writing fades.
You wrote a spellbook and rolled an ink cost that was higher than the amount of charges in your marker, using all of them up.
You <fail/don't know how> to write that.
You write in your best handwriting: "My Diary", but it quickly fades.
You failed at writing an unknown spellbook for the spell you named, using up charges in your marker.
The spellbook warps strangely, then turns <into> <appearance>.
You successfully wrote a spellbook, with "into" used if the resulting spellbook's appearance is based on its material (e.g. "parchment" or "vellum").

Variants

Several NetHack variants add new spellbooks and may make significant changes to spellbook mechanics.

SLASH'EM

In SLASH'EM, spellbooks are chargeable items and function notably different from NetHack: when the hero reads a non-cursed spellbook with charges, a charge is consumed and guarantees success if they fail the check to successfully read the book—if the hero succeeds in the roll, the charge is used to reduce the amount of turns spent reading to 13 of their normal value.

The words on the page seem to glow faintly.

SLASH'EM also adds several new spells, such as flame sphere and freeze sphere, and re-organizes spell schools.

A user has suggested improving this page or section as follows:

"Once we get the main table sorted, do up something similar for this section—if necessary, shoot it to a subpage a la Spellcasting (SLASH'EM)."

GruntHack

GruntHack adds five new spells and their corresponding spellbooks:

While monsters are not given the ability to read spellbooks, they can cast from the same pool of spells that the hero learns.

SporkHack

SporkHack adds three new spells and their corresponding spellbooks:

UnNetHack

In UnNetHack, the hero can apply spellbooks to receive an indication of how many more times they can be read, which has been a feature since commit 65957ad in version 4.

AceHack

In AceHack, spellbooks can be read to refresh memory of a spell regardless of if the hero is at the threshold required (1,000 turns as in NetHack 3.4.3).

NetHack 4

In NetHack 4, a hero writing a spellbook is only guaranteed to succeed if they are writing a formally-identified spellbook, and otherwise the chance of success is based on their wisdom and current luck.

dNetHack

dNetHack implements several changes to spellbooks and their mechanics.

Reading a blessed spellbook is not guaranteed success as in NetHack, but adds a +10 bonus to the check for succeeding—similarly, a cursed spellbook gives a -10 penalty to the same check. Wards can also be found on spellbooks, and as a result reading a spellbook will prompt the hero to study the cover or the contents of the book itself: the chance of properly reading a ward off a spellbook cover and learning it is calculated the same way as the success chance for reading, with a +10 bonus that is applied alongside the bonus or penalty for the book's beatitude above. Wearing a pair of sunglasses decreases the chance of success by 10% or -2, the opposite of a worn pair of lenses.

Heroes that have the spirit Paimon bound will be given the same prompt to continue reading that a Wizard encounters when reading a spellbook with a success rate under 100%—Paimon herself has several effects when bound that are tied to spellbooks (such as granting the ability to detect books on the current level), and part of her binding ritual requires her seal to be drawn around a spellbook, which is consumed in the process.

Several new spellbooks are added:

The spellbook of secrets is the base item for three artifacts: the Necronomicon, the Book of Infinite Spells, and the Book of Lost Names. Successfully reading a spellbook of secrets that is not an artifact will print a message, and there is a 110 chance of it becoming a spellbook of blank paper as well as a 110 chance of it turning into a random non-blank spellbook.

Heroes of certain roles can read certain spellbooks to learn 'related' spells, dependent on their skill level in that spell school. This is applicable to Wizards, any hero with Paimon bound, and neutral Undead Hunters that have implanted at least six parasites in their brain—Healers can also learn related spells from successfully reading a spellbook that teaches an applicable healing spell. These spells are listed below, with the skill level required to learn the related spell from reading a specific spellbook:

The effects for failing to read spellbooks of certain levels are adjusted, and all of them listed are in order of the minimum level required—failing to read a ward on a spellbook's cover rolls from the failure effects that apply to a spellbook one level lower than the read book:

  1. The book's beatitude has a 14 chance of "degrading" from blessed -> uncursed -> cursed, and otherwise the hero is teleported. Teleportation also occurs if the book would "degrade" in beatitude while already cursed.
  2. All monsters on the level are aggravated, which behaves as in NetHack.
  3. The hero is blinded for 250+1d100 (251-350) turns.
  4. The book bites the hero for 1d5+3 (4-8) damage.
  5. The hero is rendered immobile for 1d(level*2) + level*2 turns, e.g. a level 5 spellbook freezes them for 11-20 turns, a level 6 spellbook
  6. The hero is afflicted by contact poison, which behaves as in NetHack.
  7. The book radiates explosive energy, dealing 2*1d10 + 10 damage (12-30) to the hero. This damage is completely blocked with magic resistance and can be halved by the half spell damage property, compared to NetHack.

As in NetHack, failure has a 13 chance of destroying the book after the chosen failure effect is applied if that effect does not do so, with cursed spellbooks always crumbling to dust after failing to read them.

DynaHack

In DynaHack, spellbooks can be read to refresh memory of a spell even if it is still fresh, similar to AceHack.

FIQHack

FIQHack implements several changes regarding spellbooks and their spells.

  • A hero that reads a spellbook successfully will use up the book, retaining their memory of the spell for 60,000 turns instead of 20,000. Heroes will not start the game with the spells from their spellbooks memorized.
  • A spellbook's weight is tied to its spell level: Blank spellbooks weigh 30 aum, while all other spellbooks weigh (level * 5) + 30.
  • Monsters can learn spells from spellbooks and cast them, with certain monsters having proficiency in specific spell schools the same way the hero does.
  • Four new spellbooks are added (all level 7):
  • Changes are made to existing spellbooks and their spells:
    • The spellbook of haste self is replaced with the spellbook of speed monster: the accompanying spell works the same, but can additionally be cast at other monsters.
    • The spell of protection only works if you are not wearing body armor.

xNetHack

xNetHack adapts many of the upcoming changes introduced in NetHack 3.7.0, and also significantly adjusts spellbook generation and other related mechanics.

  • Wielding a spellbook cuts the power cost of casting its spell by half the required power rounded up, down to a minimum of 5 times the spell's level—spellcasting itself is also significantly reworked.
  • The weight of a spellbook depends directly on its spell level, with a base weight of 30 aum plus 5 aum per level (i.e. level 1 spellbooks are 35 aum, while level 7 spellbooks are 65 aum).
  • The time required to read a spellbook is 10 times its spell's level.
  • Reading a blessed or cursed spellbook is not guaranteed success or failure, and the spellbook's beatitude instead acts as a modifier for success: a blessed book rolls for success with +10 applied to the hero's intelligence, while a cursed book applies a -10 penalty.
  • Spellbook failure effects are rebalanced:
    • Failing to read any spellbook causes confusion as a default effect instead of paralysis, with the additional failure effects for spellbooks of certain levels changed as well (described below this point).
    • Failing to read a cursed spellbook will only disintegrate it if the book was cursed when the hero made the attempt.
    • Failing to read a spellbook of any level may cause its beatitude to "degrade", from blessed -> uncursed -> cursed.
    • Failing to read a spellbook for a spell that is level 4 or higher will cause it to bite the hero instead of making their gold vanish.
    • Paralysis only occurs when failing to read spellbooks for spells that are at least level 5.
  • The spellbooks for cure blindness, invisibility and detect food no longer randomly generate, though they can still be wished for or written.
  • The spellbook of identify is removed completely, and in exchange the effects of identify scrolls are made much more potent.
  • Heroes that start with spellbooks will be given enough starting power to cast the spells from them without wielding the spellbooks.
    • Wizards are also given spellbooks of force bolt and magic missile alongside two other random spellbooks, in exchange for not starting with scrolls, potions, rings, or a wand as in NetHack.

EvilHack

EvilHack makes many changes to spellbooks and their mechanics, with several adapted from other variants:

  • Similar to FIQHack and xNetHack, the weight of a spellbook depends directly on its spell level, with a base weight of 30 aum plus 5 aum per level.
  • The school of evocation spells is added.
  • Several new spellbooks are added:
  • Several spellbooks have their level changed from NetHack (which affects the weight of their corresponding spellbooks):
  • A hero learning a spell from a spellbook or refreshing their memory of a spell exercises intelligence.
  • More roles start with spellbooks—Infidels start with a spellbook of drain life and a random spellbook, while Druids start with spellbooks of entangle and create grass along with a third spellbook chosen from a set of barkskin, summon animal, healing, cure sickness, or knock.
  • Cavepeople have a 15 chance of failing to read any spellbook regardless of their beatitude.
  • Draugr heroes are incapable of casting spells, and thus cannot successfully read spellbooks or receive them as gifts.
  • Roles that are primarily spellcasting focused—Healer, Priest, Wizard, Infidel and Druid—have a chance of receiving a spellbook as the item given for a "mundane" sacrifice gift. Such spellbooks will always be for spells that a hero can train their skill in.
  • Intelligent spellcasting monsters can read certain spellbooks to learn their spells and then cast them.
    • Monsters can only learn up to 8 spells, and they'll forget a learned spell after 5000 turns.
    • The time it takes a monster to read an uncursed spellbook is three turns per spellbook level. Blessed spellbooks take half the time, while cursed spellbooks will never be attempted.
    • The spellbook read counter increments just as it does for the hero.
    • Just like with native monster spells, the level of the monster determines what level of spellbook it can read successfully.
    • Spellcasting monsters will read allowed spellbooks at any distance from the hero as long as the monster isn't too close to the hero or engaged in combat.

Encyclopedia entry

The Book of Three lay closed on the table. Taran had never been allowed to read the volume for himself; now he was sure it held more than Dallben chose to tell him. In the sun- filled room, with Dallben still meditating and showing no sign of stopping, Taran rose and moved through the shimmering beams. From the forest came the monotonous tick of a beetle.
His hands reached for the cover. Taran gasped in pain and snatched them away. They smarted as if each of his fingers had been stung by hornets. He jumped back, stumbled against the bench, and dropped to the floor, where he put his fingers woefully into his mouth.
Dallben's eyes blinked open. He peered at Taran and yawned slowly. "You had better see Coll about a lotion for those hands," he advised. "Otherwise, I shouldn't be surprised if they blistered."

[ The Book of Three, by Lloyd Alexander ]

External links

References

  1. include/objects.h in NetHack 5.0.0, line 1280: prices for most spellbooks are set automatically based on level
  2. src/mkobj.c in NetHack 5.0.0, line 43
  3. src/mkobj.c in NetHack 5.0.0, line 52
  4. src/shknam.c in NetHack 5.0.0, line 237
  5. src/shknam.c in NetHack 5.0.0, line 311
  6. src/shknam.c in NetHack 5.0.0, line 460-L468
  7. src/u_init.c in NetHack 5.0.0, line 1003-L1004
  8. src/u_init.c in NetHack 5.0.0, line 1296-L1297: calls initialspell()
  9. src/spell.c in NetHack 5.0.0, line 2338-L2359: initialspell() function
  10. src/u_init.c in NetHack 5.0.0, line 84-L86
  11. src/u_init.c in NetHack 5.0.0, line 184-L192
  12. src/u_init.c in NetHack 5.0.0, line 694-L696
  13. src/u_init.c in NetHack 5.0.0, line 699
  14. src/u_init.c in NetHack 5.0.0, line 121
  15. src/u_init.c in NetHack 5.0.0, line 174-L175
  16. src/u_init.c in NetHack 5.0.0, line 1155-L1161
  17. src/u_init.c in NetHack 5.0.0, line 1296-L1297
  18. src/u_init.c in NetHack 5.0.0, line 1336-L1338
  19. src/u_init.c in NetHack 5.0.0, line 1357-L1359
  20. src/u_init.c in NetHack 5.0.0, line 886-L901
  21. src/u_init.c in NetHack 5.0.0, line 891-L893
  22. src/u_init.c in NetHack 5.0.0, line 894-L898
  23. src/u_init.c in NetHack 5.0.0, line 899-L901
  24. src/pray.c in NetHack 5.0.0, line 998-L1068: give_spell() function
  25. src/pray.c in NetHack 5.0.0, line 1348-L1350: calls give_spell()
  26. src/pray.c in NetHack 5.0.0, line 1005-L1024: first few lines summarizes how gift book is determined
  27. src/pray.c in NetHack 5.0.0, line 1003
  28. src/pray.c in NetHack 5.0.0, line 1009
  29. src/pray.c in NetHack 5.0.0, line 1025-L1053
  30. src/pray.c in NetHack 5.0.0, line 1031
  31. src/pray.c in NetHack 5.0.0, line 1054
  32. src/pray.c in NetHack 5.0.0, line 1056-L1061: per comment: "discovering blank paper will make it less likely to be given again; small chance to arbitrarily discover some other book type without having to read it first"
  33. src/spell.c in NetHack 3.6.7, line 16
  34. src/apply.c in NetHack 5.0.0, line 4361-L4363: call to dowrite()
  35. src/write.c in NetHack 5.0.0, line 74: start of dowrite() function
  36. include/objects.h in NetHack 5.0.0, line 1432-L1436
  37. src/spell.c in NetHack 3.6.7, line 491-L496: experience for novels
  38. src/eat.c in NetHack 5.0.0, line 114-L118
  39. 39.0 39.1 src/spell.c in NetHack 5.0.0, line 537-L558
  40. src/spell.c in NetHack 5.0.0, line 364-L367
  41. src/read.c in NetHack 5.0.0, line 598-L606: conduct for spellbooks and scrolls are handled here; novels have separate handling
  42. src/spell.c in NetHack 5.0.0, line 519-L522: conduct for novels
  43. src/spell.c in NetHack 3.6.7, line 351-L359: confusion mid-studying
  44. src/spell.c in NetHack 3.6.7, line 588-L591: occupation is set to studying
  45. 45.0 45.1 src/spell.c in NetHack 3.6.7, line 392-L398
  46. include/spell.h in NetHack 3.6.7, line 11
  47. 47.0 47.1 src/spell.c in NetHack 3.6.7, line 389-L391
  48. src/spell.c in NetHack 3.6.7, line 396
  49. src/spell.c in NetHack 3.6.7, line 416
  50. src/spell.c in NetHack 3.6.7, line 384-L388
  51. src/spell.c in NetHack 3.6.7, line 406-L411
  52. src/spell.c in NetHack 3.6.7, line 530-L551
  53. 53.0 53.1 src/spell.c in NetHack 3.6.7, line 532-L534
  54. src/spell.c in NetHack 3.6.7, line 527: a blessed spellbook will skip the blocks of code below this line and initiate the spell-learning process
  55. src/spell.c in NetHack 3.6.7, line 537-L547
  56. src/spell.c in NetHack 3.6.7, line 467-L472
  57. 57.0 57.1 src/spell.c in NetHack 3.6.7, line 555-L561: nomul set from failed reading attempt; note the boolean gone = cursed_book(spellbook)
  58. src/spell.c in NetHack 3.6.7, line 446-L465
  59. src/spell.c in NetHack 3.6.7, line 461: this technically re-uses the same Wisdom check with rnd(25) - Wisdom, but this is mathematically equivalent to a separate roll on failure
  60. src/spell.c in NetHack 3.6.7, line 452
  61. src/spell.c in NetHack 3.6.7, line 180-L202: confused_book() function
  62. src/spell.c in NetHack 3.6.7, line 352: learn() calls confused_book()
  63. src/spell.c in NetHack 3.6.7, line 572-L581: study_book() calls confused_book()
  64. src/spell.c in NetHack 3.6.7, line 186
  65. src/spell.c in NetHack 3.6.7, line 120-L177: cursed_book() function
  66. src/spell.c in NetHack 3.6.7, line 562-L568
  67. src/write.c in NetHack 3.6.7, line 226
  68. src/write.c in NetHack 3.6.7, line 329-L335
  69. src/write.c in NetHack 3.4.3, line 216
  70. src/write.c in NetHack 3.6.7, line 140-L144
  71. src/write.c in NetHack 3.6.7, line 107-L109
  72. src/write.c in NetHack 3.6.7, line 110-L115
  73. src/write.c in NetHack 3.6.7, line 128-L137
  74. src/write.c in NetHack 3.6.7, line 211-L214
  75. src/write.c in NetHack 3.6.7, line 215-L217
  76. src/write.c in NetHack 3.6.7, line 218-L223
  77. src/write.c in NetHack 3.6.7, line 17-L18
  78. src/write.c in NetHack 3.6.7, line 235-L240
  79. 79.0 79.1 src/write.c in NetHack 3.6.7, line 244-L246: Ink cost is calculated before logic of whether item is known
  80. 80.0 80.1 src/write.c in NetHack 3.6.7, line 248-L254
  81. src/write.c in NetHack 5.0.0, line 320
  82. src/write.c in NetHack 3.6.7, line 288-L298
  83. src/spell.c in NetHack 3.6.0, line 395