From b50eafe8de72cbcc4431813934695c22642cdd46 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 2 Jun 2008 12:31:12 +0000 Subject: I'm not sure I actually coded anything worthwhile, though I experimented a fair bit and as usually ended up doing lots of clean-up. Oh wait, I modified eat_from_floor prompts to only force a more if there was actually a message before trying the inventory (whoops), and also modified the corpses in pack hint to take into account that a saccing player won't be interested in butchering rotten corpses. Also implemented a modified FR 1981119: when Detect Creatures only detects plants already seen before, print a different message ("You detect no further creatures."). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5435 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/food.cc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/food.cc') diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index bea45db105..c23724aa73 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -331,10 +331,11 @@ static void _terminate_butchery(bool wpn_switch, bool removed_gloves, static bool _have_corpses_in_pack(bool remind) { - const bool can_bottle = (you.species == SP_VAMPIRE - && you.experience_level > 5 - && (!you.duration[DUR_PRAYER] - || !god_likes_butchery(you.religion))); + const bool sacrifice = (you.duration[DUR_PRAYER] + && god_likes_butchery(you.religion)); + + const bool can_bottle = (!sacrifice && you.species == SP_VAMPIRE + && you.experience_level > 5); int num = 0; int num_bottle = 0; @@ -351,8 +352,12 @@ static bool _have_corpses_in_pack(bool remind) continue; // Only saprovorous characters care about rotten food. - if (food_is_rotten(obj) && !player_mutation_level(MUT_SAPROVOROUS)) + // Also, rotten corpses can't be sacrificed. + if (food_is_rotten(obj) && (sacrifice + || !player_mutation_level(MUT_SAPROVOROUS))) + { continue; + } num++; if (can_bottle && mons_has_blood(obj.plus)) @@ -1106,7 +1111,7 @@ void eat_floor_item(int item_link) dec_mitm_item_quantity( item_link, 1 ); } -// return -1 for cancel, 1 for eaten, 0 for not eaten +// Returns -1 for cancel, 1 for eaten, 0 for not eaten. int eat_from_floor() { if (you.flight_mode() == FL_LEVITATE) @@ -1196,6 +1201,7 @@ int eat_from_floor() } else _player_can_eat_rotten_meat(true); + need_more = true; } else if (inedible_food) { @@ -1211,8 +1217,8 @@ int eat_from_floor() } else // Several different food items. mpr("You refuse to eat these food items."); + need_more = true; } - need_more = true; } if (need_more && Options.auto_list) @@ -1231,9 +1237,8 @@ static const char *_chunk_flavour_phrase(bool likes_chunks) const int gourmand = you.duration[DUR_GOURMAND]; if (gourmand >= GOURMAND_MAX) { - phrase = - one_chance_in(1000)? "tastes like chicken!" - : "tastes great."; + phrase = one_chance_in(1000) ? "tastes like chicken!" + : "tastes great."; } else if (gourmand > GOURMAND_MAX * 75 / 100) phrase = "tastes very good."; @@ -2041,6 +2046,8 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid, if (!item_type_known(you.inv[amulet])) { + // For artefact amulets, this will tell you its name + // and subtype. Other properties may still be hidden. set_ident_flags( you.inv[ amulet], ISFLAG_KNOW_TYPE); set_ident_type( OBJ_JEWELLERY, AMU_THE_GOURMAND, ID_KNOWN_TYPE ); -- cgit v1.2.3-54-g00ecf