summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-22 21:47:21 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-22 21:47:21 +0000
commit04c60898820dcdbf47ab1adca6bdb7a2fd3cd2b0 (patch)
tree346e92724035d07d722f5570b631d350c27facf6 /crawl-ref/source/food.cc
parent5dc22152dbd89ba7c809719785af00ea12dabe02 (diff)
downloadcrawl-ref-04c60898820dcdbf47ab1adca6bdb7a2fd3cd2b0.tar.gz
crawl-ref-04c60898820dcdbf47ab1adca6bdb7a2fd3cd2b0.zip
Go back to checking for wearing the amulet of the gourmand when
necessary, as it differentiates from the gourmand mutation properly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9166 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 508bb6a6d7..64f46dc71e 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1567,7 +1567,7 @@ int prompt_eat_chunks()
const bool easy_eat = Options.easy_eat_chunks && !you.is_undead;
const bool easy_contam = easy_eat
- && (Options.easy_eat_gourmand && you.duration[DUR_GOURMAND] > 0
+ && (Options.easy_eat_gourmand && wearing_amulet(AMU_THE_GOURMAND)
|| Options.easy_eat_contaminated);
if (found_valid)
@@ -1712,7 +1712,8 @@ static int _chunk_nutrition(bool likes_chunks)
: apply_herbivore_nutrition_effects(nutrition));
}
- const int gourmand = you.duration[DUR_GOURMAND];
+ const int gourmand =
+ wearing_amulet(AMU_THE_GOURMAND) ? you.duration[DUR_GOURMAND] : 0;
const int effective_nutrition =
_apply_gourmand_nutrition_effects(nutrition, gourmand);
@@ -2754,7 +2755,8 @@ static corpse_effect_type _determine_chunk_effect(corpse_effect_type chunktype,
// contaminated meat as though it were "clean" meat - level 3
// saprovores get rotting meat effect from clean chunks, since they
// love rotting meat.
- if (x_chance_in_y(you.duration[DUR_GOURMAND], GOURMAND_MAX))
+ if (wearing_amulet(AMU_THE_GOURMAND)
+ && x_chance_in_y(you.duration[DUR_GOURMAND], GOURMAND_MAX))
{
if (player_mutation_level(MUT_SAPROVOROUS) == 3)
{