From 5dc22152dbd89ba7c809719785af00ea12dabe02 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 22 Feb 2009 21:13:37 +0000 Subject: Add more gourmand-related fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9165 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/food.cc | 5 +++-- crawl-ref/source/output.cc | 3 +-- crawl-ref/source/player.cc | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index d3a86248e0..508bb6a6d7 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1508,8 +1508,9 @@ int prompt_eat_chunks() if (player_mutation_level(MUT_HERBIVOROUS) == 3) return (0); - // If we *know* player doesn't have the gourmand effect, don't prompt. - if (!player_likes_chunks()) + // If we *know* player doesn't have the gourmand effect, don't + // prompt. + if (!player_likes_chunks(true) && !wearing_amulet(AMU_THE_GOURMAND, false)) return (0); bool found_valid = false; diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 32dd1728c1..9257b0a9e6 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -2031,8 +2031,7 @@ static std::vector _get_overview_resistances( const char* pregourmand; const char* postgourmand; - if (player_mutation_level(MUT_GOURMAND) - || wearing_amulet(AMU_THE_GOURMAND, calc_unid)) + if (wearing_amulet(AMU_THE_GOURMAND, calc_unid)) { pregourmand = "Gourmand : "; postgourmand = itosym1(1); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 15abd4d22b..dcb87ca3d0 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1294,7 +1294,7 @@ bool player_can_smell() bool player_likes_chunks(bool permanently) { - return (player_mutation_level(MUT_GOURMAND) + return (player_mutation_level(MUT_GOURMAND) > 0 || player_mutation_level(MUT_CARNIVOROUS) > 0 || (!permanently && you.duration[DUR_GOURMAND] > 0)); } @@ -4399,8 +4399,8 @@ int player_mental_clarity(bool calc_unid, bool items) return ((ret > 3) ? 3 : ret); } -// Returns whether the player has the effect of the amulet -// from a non-amulet source. +// Returns whether the player has the effect of the amulet from a +// non-amulet source. bool extrinsic_amulet_effect(jewellery_type amulet) { switch (amulet) @@ -4416,8 +4416,10 @@ bool extrinsic_amulet_effect(jewellery_type amulet) case AMU_RESIST_CORROSION: case AMU_CONSERVATION: return (player_equip_ego_type(EQ_CLOAK, SPARM_PRESERVATION) > 0); + case AMU_THE_GOURMAND: + return (player_mutation_level(MUT_GOURMAND) > 0); default: - return false; + return (false); } } -- cgit v1.2.3-54-g00ecf