Difference between revisions of "Negative gold"

From NetHackWiki
Jump to navigation Jump to search
m (Properties)
(integer overflow, not stack overflow, and some re-phrasing)
Line 1: Line 1:
Negative gold is a side affect of stack overflow. If there ever is a stack of more than 2147483647 gold pieces because of signed integers. It has several strange properties.
+
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==
 
==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 optionaly wish for more gold to make it more managable.
+
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.
  
 
==Properties==
 
==Properties==
  
 
Negative gold has some strange properties.
 
Negative gold has some strange properties.
*Negative gold decreaces your burden
+
*Negative gold decreases your burden
 
*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.
 
*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.
 
* 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.

Revision as of 22:17, 4 April 2015

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.

Properties

Negative gold has some strange properties.

  • Negative gold decreases your burden
  • 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.