summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 21:29:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 21:29:12 +0000
commite3af78b8bb3ad47ea17162e6ef591ca881f0370e (patch)
treee982d1d591a4eaff043bbb8f77f6cefe2236836f /crawl-ref/source/itemname.cc
parent31ecf11f2b7ff57426fb26fce5e3e63444e743c3 (diff)
downloadcrawl-ref-e3af78b8bb3ad47ea17162e6ef591ca881f0370e.tar.gz
crawl-ref-e3af78b8bb3ad47ea17162e6ef591ca881f0370e.zip
* Don't count chunks as "useless" (even if inedible) if the player knows
Sublimation of Blood or Simulacrum. * Fix missing message flush when memorising spells. (This should probably be handled globally in prompt_invent_item().) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9398 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 9f10028228..185e9b86f4 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2608,11 +2608,12 @@ bool is_useless_item(const item_def &item, bool temp)
break;
case OBJ_FOOD:
- if (item.sub_type != FOOD_CHUNK || !is_inedible(item))
+ if (!is_inedible(item))
return (false);
- if (you.has_spell(SPELL_SUBLIMATION_OF_BLOOD)
- || you.has_spell(SPELL_SIMULACRUM))
+ if (item.sub_type == FOOD_CHUNK
+ && (you.has_spell(SPELL_SUBLIMATION_OF_BLOOD)
+ || you.has_spell(SPELL_SIMULACRUM)))
{
return (false);
}