diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-25 22:42:41 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-25 22:42:41 +0000 |
commit | b67ca8220470dc19f83db1b199fec11c8f311da4 (patch) | |
tree | ea0e2924f4205a57f40bf4ac6e3e501b96d632c3 /crawl-ref/source/item_use.cc | |
parent | fe66a480da9ae461070c73f7690922b240ff3ace (diff) | |
download | crawl-ref-b67ca8220470dc19f83db1b199fec11c8f311da4.tar.gz crawl-ref-b67ca8220470dc19f83db1b199fec11c8f311da4.zip |
Yred flavor, part 3: forbid the use of holy items (weapons of holy wrath
and scrolls of holy word) or spells.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6994 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 46c97586b4..a08ccee3ba 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -4583,8 +4583,10 @@ void read_scroll( int slot ) you.piety / 2; } - if (!holy_word(pow, HOLY_WORD_SCROLL, you.pos(), - !item_type_known(scroll))) + const bool success = holy_word(pow, HOLY_WORD_SCROLL, you.pos(), + !item_type_known(scroll)); + + if (!success) { canned_msg(MSG_NOTHING_HAPPENS); id_the_scroll = false; @@ -4597,6 +4599,11 @@ void read_scroll( int slot ) if (you.duration[DUR_PIETY_POOL] > 500) you.duration[DUR_PIETY_POOL] = 500; } + + // This is only naughty if you know you're doing it, or if it's + // succeeded, in which case you'll know for next time. + if (item_type_known(scroll) || success) + did_god_conduct(DID_HOLY, 10, item_type_known(scroll)); break; } |