summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/goditem.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-03-18 17:08:04 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-03-18 18:16:03 +0100
commit4b54ddc8c2b03fdcccdb0ac773cfc131954d57d9 (patch)
treeab4f0ec053f72426c62e91eae8fcf21b9c1b2c78 /crawl-ref/source/goditem.cc
parent7487c5e655fb262b4583dc6767c12951a1837f17 (diff)
downloadcrawl-ref-4b54ddc8c2b03fdcccdb0ac773cfc131954d57d9.tar.gz
crawl-ref-4b54ddc8c2b03fdcccdb0ac773cfc131954d57d9.zip
Mark manuals of magic skills as forbidden under Trog.
Diffstat (limited to 'crawl-ref/source/goditem.cc')
-rw-r--r--crawl-ref/source/goditem.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index f2e39a14d3..abb256c8b3 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -20,6 +20,7 @@
#include "itemprop.h"
#include "items.h"
#include "religion.h"
+#include "skills2.h"
#include "spl-book.h"
#include "spl-cast.h"
#include "spl-util.h"
@@ -496,6 +497,11 @@ conduct_type god_hates_item_handling(const item_def &item)
case GOD_TROG:
if (item_is_spellbook(item))
return DID_SPELL_MEMORISE;
+ if (item.sub_type == BOOK_MANUAL && item_type_known(item)
+ && is_harmful_skill((skill_type)item.plus))
+ {
+ return DID_SPELL_PRACTISE;
+ }
// Only Trog cares about spellsbooks vs rods.
if (item.base_type == OBJ_RODS)
return DID_NOTHING;