summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/goditem.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-09 23:50:23 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-09 23:50:23 -0600
commite79ba3e8f21761993dfce92a4d8753dbc8503809 (patch)
tree49ba96de2c4e8239d185e894b4c464113d38140a /crawl-ref/source/goditem.cc
parent60a31bad0fe483ba7a8ff9bf011fd524dbbd98cb (diff)
downloadcrawl-ref-e79ba3e8f21761993dfce92a4d8753dbc8503809.tar.gz
crawl-ref-e79ba3e8f21761993dfce92a4d8753dbc8503809.zip
Properly mark rods and spellbooks disliked by Cheibriados.
Diffstat (limited to 'crawl-ref/source/goditem.cc')
-rw-r--r--crawl-ref/source/goditem.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index d8e547339f..5b31e5efd8 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -207,13 +207,19 @@ bool is_hasty_item(const item_def& item)
case OBJ_WANDS:
retval = (item.sub_type == WAND_HASTING);
break;
+ case OBJ_JEWELLERY:
+ retval = (item.sub_type == AMU_RAGE
+ || item.sub_type == AMU_RESIST_SLOW);
+ break;
case OBJ_POTIONS:
retval = (item.sub_type == POT_SPEED
|| item.sub_type == POT_BERSERK_RAGE);
break;
- case OBJ_JEWELLERY:
- retval = (item.sub_type == AMU_RAGE
- || item.sub_type == AMU_RESIST_SLOW);
+ case OBJ_BOOKS:
+ retval = is_hasty_spellbook(item);
+ break;
+ case OBJ_STAVES:
+ retval = is_hasty_rod(item);
break;
default:
break;
@@ -336,6 +342,11 @@ bool is_chaotic_spellbook(const item_def& item)
return (is_spellbook_type(item, false, is_chaotic_spell));
}
+bool is_hasty_spellbook(const item_def& item)
+{
+ return (is_spellbook_type(item, false, is_hasty_spell));
+}
+
bool god_hates_spellbook(const item_def& item)
{
return (is_spellbook_type(item, false, god_hates_spell_type));
@@ -356,6 +367,11 @@ bool is_chaotic_rod(const item_def& item)
return (is_spellbook_type(item, true, is_chaotic_spell));
}
+bool is_hasty_rod(const item_def& item)
+{
+ return (is_spellbook_type(item, true, is_hasty_spell));
+}
+
bool god_hates_rod(const item_def& item)
{
return (is_spellbook_type(item, true, god_hates_spell_type));