summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-22 21:13:37 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-22 21:13:37 +0000
commit5dc22152dbd89ba7c809719785af00ea12dabe02 (patch)
tree7cd76c108c797caecb006a6bae821b663ac146c9
parent42d8d07399655f768c9547ed3f47f39623856291 (diff)
downloadcrawl-ref-5dc22152dbd89ba7c809719785af00ea12dabe02.tar.gz
crawl-ref-5dc22152dbd89ba7c809719785af00ea12dabe02.zip
Add more gourmand-related fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9165 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/food.cc5
-rw-r--r--crawl-ref/source/output.cc3
-rw-r--r--crawl-ref/source/player.cc10
3 files changed, 10 insertions, 8 deletions
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<formatted_string> _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);
}
}