From a580a1c86b0b73aedc2dc05e24ea2cd5e1ac13e5 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 29 Dec 2006 08:41:32 +0000 Subject: [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 --- crawl-ref/source/food.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/food.cc') 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} -- cgit v1.2.3-54-g00ecf