R972 - rust monster eating gold

When !GOLDOBJ, player polymorphed to a rust monster that attempted to eat
gold in the inventory would fail to eat it, but the gold would be consumed
anyway.  Under GOLDOBJ, a later check would work around the invalid prompt.
This commit is contained in:
cohrs
2002-07-04 17:47:18 +00:00
parent ff68892016
commit 2c6a1eb7e1
2 changed files with 5 additions and 1 deletions

View File

@@ -770,7 +770,9 @@ register const char *let,*word;
#endif
/* Equivalent of an "ugly check" for gold */
if (usegold && !strcmp(word, "eat") && !metallivorous(youmonst.data))
if (usegold && !strcmp(word, "eat") &&
(!metallivorous(youmonst.data)
|| youmonst.data == &mons[PM_RUST_MONSTER]))
#ifndef GOLDOBJ
usegold = allowgold = FALSE;
#else