summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 6e6e35dffd..2459ee687c 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -785,10 +785,12 @@ void ouch( int dam, int death_source, kill_method_type death_type,
if (dam > -9000) // that is, a "death" caused by hp loss {dlb}
{
- if (god_protects_from_harm(you.religion))
+ if (dam >= you.hp && god_protects_from_harm(you.religion))
{
- if (dam >= you.hp
- && (one_chance_in(10) || you.piety > random2(1000)))
+ if ((you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE)
+ && (one_chance_in(10) || you.piety > random2(1000))
+ || (you.religion == GOD_ELYVILON || you.religion == GOD_YREDELEMNUL)
+ && you.duration[DUR_PRAYER] && random2(you.piety) >= 30)
{
simple_god_message( " protects you from harm!" );
return;