diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-28 12:28:16 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-28 12:28:16 +0000 |
commit | 02dd4205015dd1fc1e27ed6422031c8bbb5c39cc (patch) | |
tree | 0b18ba3e4abd94b133bc1fcc3f90c5fd6c828748 /crawl-ref/source/food.cc | |
parent | 30712a6f0906f3127c49989219c1077a81336c6c (diff) | |
download | crawl-ref-02dd4205015dd1fc1e27ed6422031c8bbb5c39cc.tar.gz crawl-ref-02dd4205015dd1fc1e27ed6422031c8bbb5c39cc.zip |
FR 1927675: Change message for jellies corroding items
from "Your Foo is eaten away!" (misleading to newbies)
to "The acid corrodes your Foo!"
FR 1926880: Auto-id "Gourmand when eating chunks while not hungry
(unless already a chunklover otherwise). Should there be
any case where can_ingest is called as a check, without
actual eating (suppress_msg == true, I'd guess) the
identification should be restricted to actual eating.
I haven't found any, though.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3911 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r-- | crawl-ref/source/food.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index d9f9585905..77be3d333a 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -543,7 +543,7 @@ bool prompt_eat_from_inventory(int slot) } if (!can_ingest( you.inv[which_inventory_slot].base_type, - you.inv[which_inventory_slot].sub_type, false )) + you.inv[which_inventory_slot].sub_type, false )) { return (false); } @@ -1355,7 +1355,6 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid, // a player could be one and not the other IMHO - 13mar2000 {dlb} bool ur_chunkslover = ( (check_hunger? you.hunger_state <= HS_HUNGRY : true) - || wearing_amulet(AMU_THE_GOURMAND, !reqid) || you.omnivorous() || you.mutation[MUT_CARNIVOROUS]); @@ -1406,6 +1405,21 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid, } else if (!ur_chunkslover) { + if (wearing_amulet(AMU_THE_GOURMAND, !reqid)) + { + const int amulet = you.equip[EQ_AMULET]; + + ASSERT(amulet != -1); + + if (!item_type_known(you.inv[amulet])) + { + set_ident_flags( you.inv[ amulet], ISFLAG_KNOW_TYPE); + set_ident_type( OBJ_JEWELLERY, AMU_THE_GOURMAND, + ID_KNOWN_TYPE ); + mpr(you.inv[amulet].name(DESC_INVENTORY, false).c_str()); + } + return true; + } survey_says = false; if (!suppress_msg) mpr("You aren't quite hungry enough to eat that!"); |