Difference between revisions of "Spellcasting"

From NetHackWiki
Jump to navigation Jump to search
m (reword to be more accurate)
(initial info about casting forgotten spells)
Line 10: Line 10:
  
 
Spellcasting will burn [[nutrition]] with the exception of [[spellbook of detect food|detect food]], and each spell cast will produce [[skill]] points equal to its level.
 
Spellcasting will burn [[nutrition]] with the exception of [[spellbook of detect food|detect food]], and each spell cast will produce [[skill]] points equal to its level.
 +
 +
== Forgotten spells ==
 +
 +
Spell knowledge only lasts for 20,000 turns after reading or re-reading a spellbook. Once this time is up the spell is forgotten, and is marked with an asterisk <tt>*</tt> in the casting menu.
 +
 +
Attempting to cast a forgotten spell will not check any of the usual casting prerequisites, and will consume neither nutrition nor power. It will instead make you [[confusion|confused]], [[stun]]ned, or both. The duration of confusion and stunning is dependent on the level of the forgotten spell, but the choice of effects is not.
  
 
== Calculating spell success rate ==
 
== Calculating spell success rate ==

Revision as of 14:58, 22 May 2008

Spellcasting is using the [Z] command to wield innate magical abilities during gameplay. More rarely a player can use the #monster, ^T and #turn commands to unleash quasi-magics.

The first prerequisite for spellcasting is know at least one spell. Healers, Monks, Priests and Wizards are roles which begin the game with knowledge of one or more spells, other classes must find at least one spellbook and read it first.

Pressing [Z] without knowing any spells will produce a message to this effect. Otherwise a menu will appear of the spells you know, accompanied by their chance of failure.

This chance of failure is affected by Intelligence (or Wisdom), Experience level, skill level, innate magical ability of the role, armour: especially metal but also shields and robes, whether it is an emergency spell, whether it is your special spell.

Unless you cancel, then the game will first check you have enough power (magical energy) for the spell selected. If you have enough power then the game will roll for success of failure. If you succeed your spell will take effect- see spellbook for an index. If you fail you will receive the message "You failed to cast the spell correctly"

Spellcasting will burn nutrition with the exception of detect food, and each spell cast will produce skill points equal to its level.

Forgotten spells

Spell knowledge only lasts for 20,000 turns after reading or re-reading a spellbook. Once this time is up the spell is forgotten, and is marked with an asterisk * in the casting menu.

Attempting to cast a forgotten spell will not check any of the usual casting prerequisites, and will consume neither nutrition nor power. It will instead make you confused, stunned, or both. The duration of confusion and stunning is dependent on the level of the forgotten spell, but the choice of effects is not.

Calculating spell success rate

First, find your base spellcasting percentage. This is 5.5 times your spellcasting stat, rounded down. (Your spellcasting stat is either Int or Wis, depending on your role.)

Skills and experience

Now determine whether the spell is difficult or easy, given your current skills and experience. The following formula is used:

 difficulty = (spell-level * 4) - (skill-level * 6) - (experience-level / 3) - 5

For this calculation, unskilled maps to 0, basic to 1, skilled to 2, and expert to 3.

If difficulty is positive, the spell is considered difficult. Your success chance is decreased by \sqrt{900 \times \mbox{difficulty} + 2000}, with the penalty rounded down.

If difficulty is zero or negative, the spell is considered easy. Your success chance is increased by 15 \times -\mbox{difficulty} / \mbox{spell-level}, but this bonus will not exceed 20.

The resultant value is then clamped to lie between 0% and 120% inclusive.

Equipment and role penalties

If you are wearing a shield that is not a small shield, divide the success chance by 4. (If you are casting your role's special spell, divide it by 2 instead.)

Call the value calculated so far rate. Now, add up all the other penalties. These are:

  • Your role's base spellcasting penalty, between 1 and 14
  • Your role's body armor penalty, between 8 and 20, if wearing metallic body armor
    • If wearing a robe, this penalty is halved
    • If wearing a robe without metallic body armour, subtract the body armor penalty instead of adding it
  • Your role's shield penalty, between 0 and 3, if wearing any shield
    • Note that larger shields also impose the larger penalty described above
  • The helm (4), gloves (6), and boots (2) penalties, if wearing metallic items in those slots
  • Your role's emergency spell bonus/penalty, between a -3 bonus and a +2 penalty, if casting an eligible spell
  • A bonus of -4 if casting your role's special spell

The penalty is then capped at 20.

The final chance of spellcasting success is then \mbox{rate} \times (20 - \mbox{penalty}) / 15 - \mbox{penalty}, clamped to lie between 0% and 100% inclusive.

Strategy

If you have raised your experience level, skill, and spellcasting stat high enough to reach a 100% or higher base success rate, your role and equipment will be the limiting factor in achieving low failure rates.

With a base success rate of 120%, your spellcasting penalty must be 6 or less to achieve an overall 100% success rate. Roles that can achieve this without a robe are Archeologist, Healer, Priest, Tourist, and Wizard. Roles that can achieve this when casting emergency spells or their special spell are Knight and Monk. Roles that can achieve this with their special spell only are Ranger, Samurai, Rogue, and Valkyrie. The remaining two roles, Barbarian and Caveman, cannot achieve 100% success without a robe.

Metal gloves without a robe will always prevent 100% success except in special circumstances, such as a Wizard casting Magic Missile. Even with a robe, metal body armor will prevent 100% success for all roles except Wizard.

Role penalties

Role Stat Base Body armor Shield Emergency Special
Archeologist Int 5 10 2 0 magic mapping -4
Barbarian Int 14 8 0 0 haste self -4
Caveman Int 12 8 1 0 dig -4
Healer Wis 3 10 2 -3 cure sickness -4
Knight Wis 8 9 0 -2 turn undead -4
Monk Wis 8 20 2 -2 restore ability -4
Priest Wis 3 10 2 -2 remove curse -4
Rogue Int 8 9 1 0 detect treasure -4
Ranger Int 9 10 1 2 invisibility -4
Samurai Int 10 8 0 0 clairvoyance -4
Tourist Int 5 10 2 1 charm monster -4
Valkyrie Wis 10 9 0 -2 cone of cold -4
Wizard Int 1 10 3 0 magic missile -4

External links