Difference between revisions of "Energy"

From NetHackWiki
Jump to navigation Jump to search
m (Energy regeneration: 1d3 regen is a bit optimistic for some roles)
(Specific methods: fix one piece of advice that only applies to 3.4.3 and earlier (but I haven't checked the rest of the page for other 3.4.3isms))
 
(35 intermediate revisions by 24 users not shown)
Line 1: Line 1:
Your '''power''', or "'''Pw'''", is the amount of magical '''energy''' you have:
+
Your '''power''', or "'''Pw'''", is the amount of magical '''energy''' you have.  For example:
  
  Dlvl:3  $:43  HP:68(68) Pw:13(18) AC:-3  Xp:8/1295 T:2358
+
  Dlvl:3  $:43  HP:68(68) '''Pw:13(18)''' AC:-3  Xp:8/1295 T:2358
  
The above status line shows a character whose current power is 13 and maximum power is 18.
+
The above [[status line]] shows a character whose current power is 13 and maximum power is 18.
  
Power is consumed by casting spells, at a rate of 5 times the spell's level. When carrying the [[Amulet of Yendor]], you will expend a random amount from 1 to 3 times the norm. If you fail to cast a spell due to failure rate or confusion, you expend only half the energy required for a success. When you have [[teleportitis]], self-teleporting with '''^T''' always consumes 20 power points.
+
== Uses of energy ==
 +
The main use of energy is to [[spellcasting|cast spells]].  You need 5 times the spell's level of energy to cast a spell. When carrying the [[Amulet of Yendor]], there is an additional random cost. This cost applies ''only'' to spellcasting, not to any other expenditure of energy. See [[spellcasting#Spellcasting cost|spellcasting cost]] for more details.
  
Power can be regained slowly over time, quickly by quaffing a non-cursed [[potion of gain energy]] or with [[The Mitre of Holiness]], and fully by reading a [[scroll of charging]] while confused. The potion also increases your maximum power; the scroll does so only if your power is already at maximum when you read it.
+
[[Teleport at will|Teleportation at will]] from [[teleportitis]] requires 20 energy, but only consumes 19.{{refsrc|teleport.c|517}}  The usual random teleportation from teleportitis does not use energy.
  
The rate at which power regenerates over time increases with your [[Wisdom]]. If your encumbrance level is [[stressed]] it will regenerate more slowly. [[The Eye of the Aethiopica]] causes your power to regenerate at a much greater rate than usual.
+
Certain <tt>[[monster (command)|#monster]]</tt> commands require energy. The [[breath weapon]]s of [[dragon]]s, [[iron golem]]s, [[winter wolf|winter wolves]] and [[hell hound]]s all cost 15 energy.{{refsrc|polyself.c|748}} Summoning help as a [[werecreature]]{{refsrc|polyself.c|910}} and emitting psychic blasts as a [[mind flayer]]{{refsrc|polyself.c|1075}} both cost 10 energy.
  
== Energy regeneration ==
+
== Gaining energy ==
 +
You normally regain energy slowly over time, unless your [[encumbrance]] is <tt>Stressed</tt> or worse, which blocks normal energy regeneration.  Having [[the Eye of the Aethiopica]] allows you to regain energy rapidly, even when stressed.
  
Your energy regenerates every <math>\lfloor (38 - \mathit{level}) \times 3 / 6 \rfloor</math> turns if you are a [[Wizard]], and every <math>\lfloor (38 - \mathit{level}) \times 4 / 6 \rfloor</math> turns for other roles. If you have the Eye of the Aethiopica you will instead regenerate energy every turn. The amount of energy regenerated each time is between 1 and <math>\lfloor (\mathit{Wis} + \mathit{Int}) / 15 \rfloor + 1</math>, which for most spellcasters means ''1d2'' or ''1d3''.<ref>{{sourcecode|allmain.c|211}}</ref>
+
=== Specific methods ===
 +
<!-- todo: move citations to respective linked articles? -->
 +
Quaffing a non-cursed [[potion of gain energy]] increases your current and maximum energy; a cursed potion decreases them.
  
 +
<tt>[[invoke|#invoke]]</tt> [[the Mitre of Holiness]] to regain half the energy you need to reach the maximum, but no more than 120 points.
 +
 +
Reading any [[scroll of charging]] while [[confused]] recharges your energy to its maximum.  If it was already maximum, you gain 5d4 total energy instead.{{refsrc|read.c|1056}} In 3.6.0 or later cursed scroll will reduce energy to 0 without altering the maximum “''You feel discharged.''”
 +
 +
Eating a [[newt]] corpse sometimes increases energy by 1 to 3 points.  If this would put you over the maximum, your maximum energy might also increase by 1.
 +
 +
If you trigger a [[magic trap]] and it explodes, “''Your body absorbs some of the magical energy!''” and your maximum energy is increased by 2; your energy is then completely refilled.{{refsrc|trap.c|1058}}
 +
 +
Attacking a [[Monster spell#Spells|spellcasting monster]] with [[Magicbane]] has a chance of [[cancellation|cancelling]] it and increasing your current and maximum energy by 1 (“''You absorb magical energy!''”){{refsrc|artifact.c|844}}. Only the cancellation from Magicbane can absorb energy. This effect happens every time the cancellation attack hits, not just the first time, when the monster is actually cancelled.
 +
 +
Lying with a [[foocubus]] may increase or decrease your energy.
 +
 +
In older versions of NetHack, the [[polyself bug]] could be exploited to increase your maximum energy exponentially. However, this bug was fixed in [[NetHack 3.6.0]] and thus is no longer usable.
 +
 +
=== Energy regeneration ===
 +
The rate at which energy regenerates over time increases with your [[experience level]], [[wisdom]], and [[intelligence]].  If your [[encumbrance]] level is <tt>[[Stressed]]</tt> or higher it will not regenerate.
 +
 +
Your energy normally regenerates every <math>\lfloor (38 - \mathit{level}) \times 3 / 6 \rfloor</math> turns if you are a [[Wizard]], and every <math>\lfloor (38 - \mathit{level}) \times 4 / 6 \rfloor</math> turns for other roles.{{refsrc|allmain.c|211}}  If you carry [[the Eye of the Aethiopica]], you regenerate energy every turn regardless of role.
 +
 +
The amount of energy regenerated each time is between 1 and <math>\lfloor (\mathit{Wis} + \mathit{Int}) / 15 \rfloor + 1</math>, which for most characters means ''1d2'' or ''1d3''. Increasing that to ''1d4'' requires a well-enchanted [[helm of brilliance]] since no playable race has Wisdom and Intelligence caps high enough to reach a total of 45.
 +
 +
Number of turns between regenerating energy:
 
{| class="prettytable"
 
{| class="prettytable"
 
! Level
 
! Level
Line 81: Line 107:
 
| 30 || 5 || 4
 
| 30 || 5 || 4
 
|}
 
|}
 +
 +
=== Level gain and starting energy ===
 +
 +
When you gain a level, both your current and maximum energy are increased based on various factors:{{refsrc|exper.c|195}}
 +
 +
* your [[role]]
 +
* your [[race]]
 +
* your [[Wisdom]]
 +
* your [[experience level]]
 +
 +
First, a random number <math>0 \leq n < \left( \frac{\text{Wisdom}}{2} + \text{role modifier}\right)</math> is chosen;{{refsrc|exper.c|196|comment=The function also considers a race modifier, but this is 0 for all races.}} your race minimum is then added to the result.{{refsrc|exper.c|197|comment=This also considers a role minimum, but this is 0 for all roles.}}
 +
 +
Your role modifier depends on whether your experience level (before the level gain) is lower than a certain cutoff which varies between roles. If it is, apply the "low-[[XL]]" modifier; else use the "high-XL" modifier.
 +
 +
The result of this is then multiplied with your energy modifier, which depends on your role, and rounded down.{{refsrc|exper.c|201}}
 +
 +
The final result will be added to both your current and maximum energy.
 +
 +
For a newly created character neither energy modifier nor Wisdom matters{{reffunc|exper.c|newpw}}: certain magically inclined roles start with a few energy points at random, while others only get one point; all races except Dwarves also get a bonus point or two.  See the table below for precise numbers.
 +
 +
{| class="prettytable striped"
 +
! Role
 +
! Cutoff
 +
! low-[[XL]]<br/>modifier
 +
! high-XL<br/>modifier
 +
! energy modifier{{reffunc|exper.c|enermod}}
 +
! starting
 +
|-
 +
| [[Archeologist|Arc]] || 14 || 1 || 1 || 1 || 1
 +
|-
 +
|    [[Barbarian|Bar]] || 10 || 1 || 1 || 3/4 || 1
 +
|-
 +
|      [[Caveman|Cav]] || 10 || 1 || 1 || 1 || 1
 +
|-
 +
|      [[Healer|Hea]] || 20 || 1 || 2 || 3/2 || 2-5
 +
|-
 +
|      [[Knight|Kni]] || 10 || 1 || 2 || 3/2 || 2-5
 +
|-
 +
|        [[Monk|Mon]] || 10 || 2 || 2 || 1 || 3-4
 +
|-
 +
|      [[Priest|Pri]] || 10 || 2 || 2 || 2 || 5-7
 +
|-
 +
|        [[Rogue|Rog]] || 11 || 1 || 1 || 1 || 1
 +
|-
 +
|      [[Ranger|Ran]] || 12 || 1 || 1 || 1 || 1
 +
|-
 +
|      [[Samurai|Sam]] || 11 || 1 || 1 || 1 || 1
 +
|-
 +
|      [[Tourist|Tou]] || 14 || 1 || 1 || 1 || 1
 +
|-
 +
|    [[Valkyrie|Val]] || 10 || 1 || 1 || 3/4 || 1
 +
|-
 +
|      [[Wizard|Wiz]] || 12 || 2 || 3 || 2 || 5-7
 +
|}
 +
{| class="prettytable"
 +
! Race
 +
! minimum gain
 +
! starting
 +
|-
 +
| [[Human (starting race)|Human]] || 2 || +1
 +
|-
 +
| [[Elf (starting race)|Elf]] || 3 || +2
 +
|-
 +
| [[Dwarf (starting race)|Dwarf]] || 0 || no bonus
 +
|-
 +
| [[Gnome (starting race)|Gnome]] || 2 || +2
 +
|-
 +
| [[Orc (starting race)|Orc]] || 1 || +1
 +
|}
 +
 +
== Variants ==
 +
 +
===SLASH'EM===
 +
Self-teleport costs 30 points of power.<ref>{{sourcecode|SLASH'EM_0.0.7E7F2/teleport.c|790}}</ref>
 +
 +
The energy regeration frequency formula is changed to <math>\lfloor (45 - \mathit{level}) \times 3 / 6 \rfloor</math> turns if you are a [[Wizard]], and every <math>\lfloor (45 - \mathit{level}) \times 4 / 6 \rfloor</math> for all other roles.
 +
 +
=== FIQHack ===
 +
There are numerous changes to energy and energy regeneration in [[FIQHack]].
 +
 +
* Monsters and players use the same spellcasting system, which means that monsters use energy to cast spells instead of using a cooldown system.  This means they can potentially cast multiple spells in succession if they have enough energy, so high-level spellcasting monsters can do much more damage.
 +
 +
* Wisdom is slightly less important for energy regeneration and experience level is slightly more important.  Intelligence is not considered.
 +
 +
* Wizards get a boost of +0.33pw/turn for energy regeneration
 +
 +
* [[The Eye of the Aethiopica]] confers +1pw/turn for energy regeneration
 +
 +
* Players can be [[cancelled]], which results in 0 available energy until cured.
 +
  
 
== References ==
 
== References ==
Line 86: Line 202:
 
<references/>
 
<references/>
  
 +
== External links ==
 +
* [http://www.steelypips.org/nethack/343/hppw-343.txt HP and power starting values, level increases, and regeneration in NetHack 3.4.3]
 +
 +
[[Category:Spellcasting]]
 
[[Category:Your character]]
 
[[Category:Your character]]
 +
{{nethack-343}}

Latest revision as of 03:24, 2 December 2023

Your power, or "Pw", is the amount of magical energy you have. For example:

Dlvl:3  $:43  HP:68(68) Pw:13(18) AC:-3  Xp:8/1295 T:2358

The above status line shows a character whose current power is 13 and maximum power is 18.

Uses of energy

The main use of energy is to cast spells. You need 5 times the spell's level of energy to cast a spell. When carrying the Amulet of Yendor, there is an additional random cost. This cost applies only to spellcasting, not to any other expenditure of energy. See spellcasting cost for more details.

Teleportation at will from teleportitis requires 20 energy, but only consumes 19.[1] The usual random teleportation from teleportitis does not use energy.

Certain #monster commands require energy. The breath weapons of dragons, iron golems, winter wolves and hell hounds all cost 15 energy.[2] Summoning help as a werecreature[3] and emitting psychic blasts as a mind flayer[4] both cost 10 energy.

Gaining energy

You normally regain energy slowly over time, unless your encumbrance is Stressed or worse, which blocks normal energy regeneration. Having the Eye of the Aethiopica allows you to regain energy rapidly, even when stressed.

Specific methods

Quaffing a non-cursed potion of gain energy increases your current and maximum energy; a cursed potion decreases them.

#invoke the Mitre of Holiness to regain half the energy you need to reach the maximum, but no more than 120 points.

Reading any scroll of charging while confused recharges your energy to its maximum. If it was already maximum, you gain 5d4 total energy instead.[5] In 3.6.0 or later cursed scroll will reduce energy to 0 without altering the maximum “You feel discharged.

Eating a newt corpse sometimes increases energy by 1 to 3 points. If this would put you over the maximum, your maximum energy might also increase by 1.

If you trigger a magic trap and it explodes, “Your body absorbs some of the magical energy!” and your maximum energy is increased by 2; your energy is then completely refilled.[6]

Attacking a spellcasting monster with Magicbane has a chance of cancelling it and increasing your current and maximum energy by 1 (“You absorb magical energy!”)[7]. Only the cancellation from Magicbane can absorb energy. This effect happens every time the cancellation attack hits, not just the first time, when the monster is actually cancelled.

Lying with a foocubus may increase or decrease your energy.

In older versions of NetHack, the polyself bug could be exploited to increase your maximum energy exponentially. However, this bug was fixed in NetHack 3.6.0 and thus is no longer usable.

Energy regeneration

The rate at which energy regenerates over time increases with your experience level, wisdom, and intelligence. If your encumbrance level is Stressed or higher it will not regenerate.

Your energy normally regenerates every \lfloor (38 - \mathit{level}) \times 3 / 6 \rfloor turns if you are a Wizard, and every \lfloor (38 - \mathit{level}) \times 4 / 6 \rfloor turns for other roles.[8] If you carry the Eye of the Aethiopica, you regenerate energy every turn regardless of role.

The amount of energy regenerated each time is between 1 and \lfloor (\mathit{Wis} + \mathit{Int}) / 15 \rfloor + 1, which for most characters means 1d2 or 1d3. Increasing that to 1d4 requires a well-enchanted helm of brilliance since no playable race has Wisdom and Intelligence caps high enough to reach a total of 45.

Number of turns between regenerating energy:

Level Non-wizard Wizard
1 24 18
2 24 18
3 23 17
4 22 17
5 22 16
6 21 16
7 20 15
8 20 15
9 19 14
10 18 14
11 18 13
12 17 13
13 16 12
14 16 12
15 15 11
16 14 11
17 14 10
18 13 10
19 12 9
20 12 9
21 11 8
22 10 8
23 10 7
24 9 7
25 8 6
26 8 6
27 7 5
28 6 5
29 6 4
30 5 4

Level gain and starting energy

When you gain a level, both your current and maximum energy are increased based on various factors:[9]

First, a random number 0 \leq n < \left( \frac{\text{Wisdom}}{2} + \text{role modifier}\right) is chosen;[10] your race minimum is then added to the result.[11]

Your role modifier depends on whether your experience level (before the level gain) is lower than a certain cutoff which varies between roles. If it is, apply the "low-XL" modifier; else use the "high-XL" modifier.

The result of this is then multiplied with your energy modifier, which depends on your role, and rounded down.[12]

The final result will be added to both your current and maximum energy.

For a newly created character neither energy modifier nor Wisdom matters[13]: certain magically inclined roles start with a few energy points at random, while others only get one point; all races except Dwarves also get a bonus point or two. See the table below for precise numbers.

Role Cutoff low-XL
modifier
high-XL
modifier
energy modifier[14] starting
Arc 14 1 1 1 1
Bar 10 1 1 3/4 1
Cav 10 1 1 1 1
Hea 20 1 2 3/2 2-5
Kni 10 1 2 3/2 2-5
Mon 10 2 2 1 3-4
Pri 10 2 2 2 5-7
Rog 11 1 1 1 1
Ran 12 1 1 1 1
Sam 11 1 1 1 1
Tou 14 1 1 1 1
Val 10 1 1 3/4 1
Wiz 12 2 3 2 5-7
Race minimum gain starting
Human 2 +1
Elf 3 +2
Dwarf 0 no bonus
Gnome 2 +2
Orc 1 +1

Variants

SLASH'EM

Self-teleport costs 30 points of power.[15]

The energy regeration frequency formula is changed to \lfloor (45 - \mathit{level}) \times 3 / 6 \rfloor turns if you are a Wizard, and every \lfloor (45 - \mathit{level}) \times 4 / 6 \rfloor for all other roles.

FIQHack

There are numerous changes to energy and energy regeneration in FIQHack.

  • Monsters and players use the same spellcasting system, which means that monsters use energy to cast spells instead of using a cooldown system. This means they can potentially cast multiple spells in succession if they have enough energy, so high-level spellcasting monsters can do much more damage.
  • Wisdom is slightly less important for energy regeneration and experience level is slightly more important. Intelligence is not considered.
  • Wizards get a boost of +0.33pw/turn for energy regeneration
  • Players can be cancelled, which results in 0 available energy until cured.


References

External links

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.