Difference between revisions of "Polyself bug"

From NetHackWiki
Jump to navigation Jump to search
m (Can't infinitely continue increasing hp/pw, there's a limit.)
(Add source code reference, some more info, rewrote some bits.)
Line 1: Line 1:
The '''polyself bug''' is a fairly serious flaw in the handling of a self-[[polymorph]] by an [[experience level]] 1 [[hero|character]].  It is [[Bugs in NetHack 3.4.3|listed]] as SC343-10:
+
The '''polyself bug''' is a fairly serious flaw in the handling of a self-[[polymorph]] by an [[experience level]] one [[hero|character]].  It is [[Bugs in NetHack 3.4.3|listed]] as SC343-10:
 +
 
 
  SC343-10: Player can raise HP and Pw by dancing with vampires.
 
  SC343-10: Player can raise HP and Pw by dancing with vampires.
In order to exploit this bug, a player would need to [[drain life]] themselves to reach XL 1, whether by the [[spellbook of drain life|spell]] or by the attack of e.g. a [[vampire]] or [[wraith]] (alluded to in the official description of the bug).
 
  
Once this is done, the act of self-polymorph has a chance of adjusting one's experience level. If it is set to higher than 1 when the player's starting level was 1, their hit points and power are approximately doubled, which is not offset by the act of draining this level; therefore by repeatedly polymorphing oneself and draining one's level back down to 1 afterwards hit points and power can be increased to the limit of an unsigned 32 bit integer.
+
In order to exploit this bug, a player would need to [[drain life]] themselves to reach experience level one, whether by the [[spellbook of drain life|spell]], by throwing a level-draining weapon upwards, by the attack of a level-draining monster, such as a [[wraith]] or [[vampire]] (as alluded to in the official description of the bug), by [[pray]]ing repeatedly, or by using any other method of level loss.
 +
 
 +
Once this is done, the act of self-polymorph has a chance of adjusting a player's experience level. If self-polymorph increases the player's level, his hit points and power are approximately doubled or tripled<ref>[[polyself.c#line161]]</ref>, which is not offset by the act of draining this level. Therefore, by repeatedly polymorphing and draining level back to one, a player's hit points and power can be increased to the limit of (usually) a 32-bit [[signed integer]].
 +
 
 +
The act of self-polymorph also has a chance of killing the player if his level drops to zero; therefore, in order to obtain a significant amount of [[HP]] and [[power]], a handful of [[amulet of life saving|amulets of life saving]] is recommended. [[Pudding farming]] is often used to acquire a healthy quantity.
  
The act of self-polymorph also has a chance of killing the player if their level drops below 1; therefore one would need a significant amount of [[amulet of life saving|amulets of life saving]] in order to obtain any significant amount of successful self-polymorphs.  This is not trivial, and [[pudding farming]] is often used to acquire the necessary quantity.
+
== Source code references ==
 +
<references/>
  
 
[[Category:Bugs]]
 
[[Category:Bugs]]

Revision as of 01:33, 23 September 2006

The polyself bug is a fairly serious flaw in the handling of a self-polymorph by an experience level one character. It is listed as SC343-10:

SC343-10: Player can raise HP and Pw by dancing with vampires.

In order to exploit this bug, a player would need to drain life themselves to reach experience level one, whether by the spell, by throwing a level-draining weapon upwards, by the attack of a level-draining monster, such as a wraith or vampire (as alluded to in the official description of the bug), by praying repeatedly, or by using any other method of level loss.

Once this is done, the act of self-polymorph has a chance of adjusting a player's experience level. If self-polymorph increases the player's level, his hit points and power are approximately doubled or tripled[1], which is not offset by the act of draining this level. Therefore, by repeatedly polymorphing and draining level back to one, a player's hit points and power can be increased to the limit of (usually) a 32-bit signed integer.

The act of self-polymorph also has a chance of killing the player if his level drops to zero; therefore, in order to obtain a significant amount of HP and power, a handful of amulets of life saving is recommended. Pudding farming is often used to acquire a healthy quantity.

Source code references