Flipping coins.
Applying one or more gold pieces now flips one of them, which will cause it to come up heads or tails. This is NetHack, so there are special cases for flipping a coin underwater or while fumbling or greasy. I've tried to future-proof this commit so that the code will not need to be modified if other items are eventually added to the coin class. If memory serves, there was a patch for this on the bilious patch database, but I was unable to locate it or who the original author was. In any case, the code is entirely original.
This commit is contained in:
committed by
PatR
parent
55650666ed
commit
358e17b323
@@ -2941,7 +2941,9 @@ itemactions(struct obj *otmp)
|
||||
}
|
||||
|
||||
/* a: apply */
|
||||
if (otmp->otyp == CREAM_PIE)
|
||||
if (otmp->oclass == COIN_CLASS)
|
||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Flip a coin");
|
||||
else if (otmp->otyp == CREAM_PIE)
|
||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Hit yourself with this cream pie");
|
||||
else if (otmp->otyp == BULLWHIP)
|
||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Lash out with this whip");
|
||||
|
||||
Reference in New Issue
Block a user