From 7fcfce7d250e09f85bc09f9e720dda5cf723e68e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 29 Dec 2008 11:11:32 +0000 Subject: * Dump spells contained in randart spellbooks, marking memorised spells with an asterisk. * Sif Muna no longer gifts the books specific to Kiku and Vehumet (Necronomicon, Annihilations, Demonology) though the spells contained there-in may crop up in randart books. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8011 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/items.cc') diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 990dd46204..49c376408e 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1061,7 +1061,7 @@ bool origin_is_god_gift(const item_def& item, god_type *god) if (iorig > GOD_NO_GOD && iorig < NUM_GODS) { *god = static_cast(iorig); - return(true); + return (true); } return (false); @@ -2570,16 +2570,16 @@ bool item_is_equipped(const item_def &item, bool quiver_too) bool item_def::has_spells() const { return ((base_type == OBJ_BOOKS && item_type_known(*this) - && sub_type != BOOK_DESTRUCTION - && sub_type != BOOK_MANUAL) + && sub_type != BOOK_DESTRUCTION + && sub_type != BOOK_MANUAL) || count_staff_spells(*this, true) > 1); } int item_def::book_number() const { - return (base_type == OBJ_BOOKS? sub_type : - base_type == OBJ_STAVES? sub_type + NUM_BOOKS - STAFF_SMITING : - -1); + return (base_type == OBJ_BOOKS ? sub_type : + base_type == OBJ_STAVES ? sub_type + NUM_BOOKS - STAFF_SMITING + : -1); } bool item_def::cursed() const -- cgit v1.2.3-54-g00ecf