summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 00:34:22 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 00:34:22 +0000
commit6817824379462ee5a1aab8267eb437d2b543504e (patch)
treede5fdb811964e1ae9baa86f8d78f19dc99f26a28 /crawl-ref/source/ouch.cc
parentb5890e8e1fde868016e260b98170e00c67947601 (diff)
downloadcrawl-ref-6817824379462ee5a1aab8267eb437d2b543504e.tar.gz
crawl-ref-6817824379462ee5a1aab8267eb437d2b543504e.zip
Consolidate checks for the player's being undead or a demonspawn into
player_is_unholy(), a la mons_is_unholy(), and use it where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8522 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 35892d7e22..d746ef8bf9 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -220,14 +220,13 @@ int check_your_resists(int hurted, beam_type flavour)
case BEAM_HOLY:
if (is_good_god(you.religion))
hurted = 0;
- else if (you.is_undead || you.species == SP_DEMONSPAWN)
+ else if (player_is_unholy())
hurted = (hurted * 3) / 2;
else if (!is_evil_god(you.religion))
hurted /= 2;
if (hurted == 0)
canned_msg(MSG_YOU_RESIST);
-
break;
default: