diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 18:31:18 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 18:31:18 +0000 |
commit | fde2770c085ee5bce194a657759cbd1ae8c824d1 (patch) | |
tree | b99b0388776b8cff0a9e490074e1d0bffad971c9 /crawl-ref/source | |
parent | 2772e5117bba390bc735af3dd9e0853f93a8306d (diff) | |
download | crawl-ref-fde2770c085ee5bce194a657759cbd1ae8c824d1.tar.gz crawl-ref-fde2770c085ee5bce194a657759cbd1ae8c824d1.zip |
Fix the amulet of the gourmand autoid when drinking potions of blood.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9348 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/food.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/food.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/it_use2.cc | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 10ad22a7e7..854359715d 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -2489,7 +2489,7 @@ bool is_forbidden_food(const item_def &food) return (false); } -static bool _check_amu_the_gourmand(bool reqid) +bool check_amu_the_gourmand(bool reqid) { if (wearing_amulet(AMU_THE_GOURMAND, !reqid)) { @@ -2595,7 +2595,7 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, if (ur_chunkslover) return (true); - if (_check_amu_the_gourmand(reqid)) + if (check_amu_the_gourmand(reqid)) return (true); if (!suppress_msg) @@ -2636,8 +2636,6 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, mpr("Urks, you're a herbivore!"); return (false); } - if (!player_likes_chunks(true)) - _check_amu_the_gourmand(false); return (true); case POT_WATER: if (you.species == SP_VAMPIRE) diff --git a/crawl-ref/source/food.h b/crawl-ref/source/food.h index f2da9ef993..1e8a3ef8b2 100644 --- a/crawl-ref/source/food.h +++ b/crawl-ref/source/food.h @@ -86,6 +86,7 @@ bool causes_rot(const item_def &food); bool is_inedible(const item_def &item); bool is_preferred_food(const item_def &food); bool is_forbidden_food(const item_def &food); +bool check_amu_the_gourmand(bool reqid); bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid = false, bool check_hunger = true); diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index b3f35918f9..f45fb531f4 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -101,11 +101,14 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) const int value = 200; const int herbivorous = player_mutation_level(MUT_HERBIVOROUS); - if (herbivorous < 3 && player_likes_chunks(true)) + if (herbivorous < 3 && player_likes_chunks()) { // Likes it. mpr("This tastes like blood."); lessen_hunger(value, true); + + if (!player_likes_chunks(true)) + check_amu_the_gourmand(false); } else { |