summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 99554a5023..52391af499 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2502,10 +2502,39 @@ bool is_useless_item(const item_def &item, bool temp)
case OBJ_STAVES:
if (you.religion == GOD_TROG && !item_is_rod(item))
return (true);
+ break;
+
+ case OBJ_FOOD:
+ if (item.sub_type != FOOD_CHUNK || !is_inedible(item))
+ return (false);
+
+ if (you.has_spell(SPELL_SUBLIMATION_OF_BLOOD)
+ || you.has_spell(SPELL_SIMULACRUM))
+ {
+ return (false);
+ }
+ return (true);
+
+ case OBJ_CORPSES:
+ if (item.sub_type != CORPSE_SKELETON)
+ return (false);
+
+ if (you.has_spell(SPELL_BONE_SHARDS)
+ || you.has_spell(SPELL_ANIMATE_DEAD)
+ || you.has_spell(SPELL_ANIMATE_SKELETON)
+ || you.mutation[MUT_RAISE_DEAD]
+ || you.religion == GOD_YREDELEMNUL
+ && you.piety >= piety_breakpoint(0))
+ {
+ return (false);
+ }
+
+ return (true);
default:
return (false);
}
+ return (false);
}
static const std::string _item_prefix(const item_def &item, bool temp,