From e79ba3e8f21761993dfce92a4d8753dbc8503809 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 9 Nov 2009 23:50:23 -0600 Subject: Properly mark rods and spellbooks disliked by Cheibriados. --- crawl-ref/source/goditem.cc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/goditem.cc') 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)); -- cgit v1.2.3-54-g00ecf