From 2c6a1eb7e1d50f1862f7ed878d39031219898c5a Mon Sep 17 00:00:00 2001 From: cohrs Date: Thu, 4 Jul 2002 17:47:18 +0000 Subject: [PATCH] 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. --- doc/fixes34.1 | 2 ++ src/invent.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 15fcad188..b3af0decf 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -140,6 +140,8 @@ don't allow cursed daggers thrown by monsters to go thru closed doors hero polymorphed into an exploding monster should explode when attacking thin air, just like the monster itself don't mark holes/trapdoors as seen if you levitate over them while blind +player polymorphed as rust monster would lose gold in inventory by + attempting to eat it, even though the eat failed Platform- and/or Interface-Specific Fixes diff --git a/src/invent.c b/src/invent.c index 66d1c720b..a0963685c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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