diff options
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 24 |
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 |