diff options
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 2779920550..2bdda4bf10 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -850,10 +850,20 @@ void ouch(int dam, int death_source, kill_method_type death_type, if (dam != INSTANT_DEATH) // that is, a "death" caused by hp loss {dlb} { - if (dam >= you.hp && god_protects_from_harm(you.religion)) + if (dam >= you.hp) { - simple_god_message(" protects you from harm!"); - return; + if (harm_protection_type hpt = god_protects_from_harm(you.religion)) + { + simple_god_message(" protects you from harm!"); + + if (you.duration[DUR_PRAYER] + && hpt == HPT_RELIABLE_PRAYING_PLUS_ANYTIME) + { + lose_piety(21 + random2(20)); + } + + return; + } } dec_hp(dam, true); |