summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-22 04:05:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-22 04:05:26 +0000
commitc37a9398ab2850d920de9cef57d1ca44d0e7e257 (patch)
treec8bce7639273b36f107a64a522e85c08f75edd4b /crawl-ref/source/religion.cc
parentbea44e6c4331e7ff932eab4c7d96f61c1d2d3fe6 (diff)
downloadcrawl-ref-c37a9398ab2850d920de9cef57d1ca44d0e7e257.tar.gz
crawl-ref-c37a9398ab2850d920de9cef57d1ca44d0e7e257.zip
Add minor cleanups of divine protection from harm:
* move the list of gods that do it into the function god_protects_from_harm(), instead of hardcoding the list in two places * update the description of it, both in the code and the surrounding comments, since it no longer depends on prayer, and since it can now happen with piety less than 30 git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2892 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 78b047734c..6051692374 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3478,6 +3478,12 @@ bool god_hates_butchery(god_type god)
return (god == GOD_ELYVILON);
}
+bool god_protects_from_harm(god_type god)
+{
+ return (god == GOD_ZIN || god == GOD_SHINING_ONE ||
+ god == GOD_ELYVILON || god == GOD_YREDELEMNUL);
+}
+
void offer_corpse(int corpse)
{
// We always give the "good" (piety-gain) message when doing