summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-21 14:54:54 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-21 14:54:54 +0000
commitf45c701b8b8c2afa6b52dad3ba3764a908fe446a (patch)
tree16cdd2076ad8172d7d299880a7bae3c291e94c13 /crawl-ref/source/item_use.cc
parente4fae9693815ab4ba825929debc47629f878eb55 (diff)
downloadcrawl-ref-f45c701b8b8c2afa6b52dad3ba3764a908fe446a.tar.gz
crawl-ref-f45c701b8b8c2afa6b52dad3ba3764a908fe446a.zip
Implement [1891388]: Make Holy Word available in scroll form.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3450 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9566601153..422d50e887 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4322,6 +4322,30 @@ void read_scroll( int slot )
}
break;
+ case SCR_HOLY_WORD:
+ {
+ int pow = 100;
+
+ if (is_good_god(you.religion))
+ {
+ pow += (you.religion == GOD_SHINING_ONE) ? you.piety :
+ you.piety / 2;
+ }
+
+ if (!holy_word(pow, HOLY_WORD_SCROLL, !item_type_known(scroll)))
+ {
+ canned_msg(MSG_NOTHING_HAPPENS);
+ id_the_scroll = false;
+ }
+
+ // good gods like this, regardless of whether it damages anything
+ if (is_good_god(you.religion))
+ {
+ you.duration[DUR_PIETY_POOL] += 10;
+ if (you.duration[DUR_PIETY_POOL] > 500)
+ you.duration[DUR_PIETY_POOL] = 500;
+ }
+ }
} // end switch
// finally, destroy and identify the scroll