From f2d8537d7a41a4700029c8c8862a2a7c868b13f6 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 14 Aug 2014 03:33:01 -0400 Subject: corpses are inedible for non-vamps if the chunks are inedible (5040) --- crawl-ref/source/food.cc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 3fcd2ff80c..7ce4746423 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1795,11 +1795,24 @@ bool is_inedible(const item_def &item) return true; } - if (item.base_type == OBJ_CORPSES - && (item.sub_type == CORPSE_SKELETON - || you.species == SP_VAMPIRE && !mons_has_blood(item.mon_type))) + if (item.base_type == OBJ_CORPSES) { - return true; + if (item.sub_type == CORPSE_SKELETON) + return true; + + if (you.species == SP_VAMPIRE) + { + if (!mons_has_blood(item.mon_type)) + return true; + } + else + { + item_def chunk = item; + chunk.base_type = OBJ_FOOD; + chunk.sub_type = FOOD_CHUNK; + if (is_inedible(chunk)) + return true; + } } return false; -- cgit v1.2.3-54-g00ecf