From f45c701b8b8c2afa6b52dad3ba3764a908fe446a Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 21 Feb 2008 14:54:54 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crawl-ref/source/item_use.cc') 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 -- cgit v1.2.3-54-g00ecf