diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-29 08:41:32 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-29 08:41:32 +0000 |
commit | a580a1c86b0b73aedc2dc05e24ea2cd5e1ac13e5 (patch) | |
tree | 56f9b1ed27a6ab57d866a7e9ab8c634a9506f352 /crawl-ref/source/food.cc | |
parent | 8ba5a61e227721c64a77d4811735e378218eb0d4 (diff) | |
download | crawl-ref-a580a1c86b0b73aedc2dc05e24ea2cd5e1ac13e5.tar.gz crawl-ref-a580a1c86b0b73aedc2dc05e24ea2cd5e1ac13e5.zip |
[1622483] Full herbivorousness now kicks in only at level 3 of the mutation.
Herbivores get less nutrition from chunks of meat.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@719 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, 15 insertions, 3 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index a9b8893b0a..5ec6b7bbfb 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -650,11 +650,23 @@ void chunk_nutrition_message(int nutrition) mpr("That was not very filling."); } +static int apply_herbivore_chunk_effects(int nutrition) +{ + int how_herbivorous = you.mutation[MUT_HERBIVOROUS]; + + while (how_herbivorous--) + nutrition = nutrition * 80 / 100; + + return (nutrition); +} + static int chunk_nutrition(bool likes_chunks) { int nutrition = CHUNK_BASE_NUTRITION; + if (likes_chunks || you.hunger_state < HS_SATIATED) - return (nutrition); + return (likes_chunks? nutrition + : apply_herbivore_chunk_effects(nutrition)); const int gourmand = wearing_amulet(AMU_THE_GOURMAND)? @@ -675,7 +687,7 @@ static int chunk_nutrition(bool likes_chunks) epercent); #endif - return (effective_nutrition); + return (apply_herbivore_chunk_effects(effective_nutrition)); } static void say_chunk_flavour(bool likes_chunks) @@ -1082,7 +1094,7 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid, bool ur_carnivorous = (you.mutation[MUT_CARNIVOROUS] == 3); - bool ur_herbivorous = (you.mutation[MUT_HERBIVOROUS] > 1); + bool ur_herbivorous = (you.mutation[MUT_HERBIVOROUS] == 3); // ur_chunkslover not defined in terms of ur_carnivorous because // a player could be one and not the other IMHO - 13mar2000 {dlb} |