diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-02 23:35:45 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-02 23:35:45 +0000 |
commit | be475192b63984f46893bcf60b3f79f3b8820570 (patch) | |
tree | 42000f995d490da2255d2dcbca4ae2435ee3a0b6 /crawl-ref/source/item_use.cc | |
parent | 69feb4ac309556a1464ec1ca7a1ab9cedc14176a (diff) | |
download | crawl-ref-be475192b63984f46893bcf60b3f79f3b8820570.tar.gz crawl-ref-be475192b63984f46893bcf60b3f79f3b8820570.zip |
Clean up and consolidate the holy word and torment effects.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4815 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 82bf03b20a..ac369fc4c1 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -4402,30 +4402,32 @@ void read_scroll( int slot ) break; case SCR_HOLY_WORD: - { - int pow = 100; + { + int pow = 100; - if (is_good_god(you.religion)) - { - pow += (you.religion == GOD_SHINING_ONE) ? you.piety : - you.piety / 2; - } + 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; - } + if (!holy_word(pow, HOLY_WORD_SCROLL, you.x_pos, you.y_pos, + !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; - } + // 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; } break; + } + default: mpr("Read a buggy scroll, please report this."); break; |