summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc11
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;
}