Negative gold

From NetHackWiki
Revision as of 01:01, 14 April 2015 by A Person (talk | contribs) (Burden)
Jump to navigation Jump to search

Negative gold is a side affect of integer overflow. If a stack of more than 2147483647 gold pieces is ever created, it becomes negative because of signed integers. A stack of negative gold has several strange properties.

Creation

In wizard mode, wish for the highest possible amount of gold (2147483647). Then, wish for 1 more gold piece. When combined, the stack turns into -2147483648 gold. You can then optionally wish for more gold to make it more manageable.

In unpatched versions of NetHack 3.4.3, it is also possible to produce negative gold using a bug in the implementation of the stone to flesh spell. If you cast the spell at a monster who was petrified with gold in inventory and who has ever been tame, the monster will be unpetrified with two stacks of gold in inventory. Although this normally only produces linear growth, because the bug only duplicates one stack, taming the monster can manipulate it to drop and pick up the stacks, merging them. Enough doublings will overflow the stack to a negative size, This is normally done with a nymph, which has infinite carry capacity and thus can carry the very large stacks of gold produced. The bug has been patched out on most public servers and by most variants.

Properties

Negative gold has some strange properties.

  • Negative gold decreases your burden
    • In its most extreme form of the most negative gold it is possible to carry, you can still carry 42950 loadstones without becoming burdened.
  • Eating negative gold (as a rock mole or other lithovore) makes you more hungry. In it's most extreme case, It makes you faint for 30,000 + turns.
  • Negative gold reacts strangely with stores. Dropping it, instead of giving you credit, gives you debt. Then, if you leave the store, the Keystone Kops come after you. If you pacify him, go back into the store and pick up the gold, you will get credit at the store.