summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-15 23:28:09 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-15 23:28:09 +0000
commitc804a3c5630d5c0e93a1bb34b03733e1805315fa (patch)
tree9c39b286247c0bff1118c60278f12c0456703b2e /crawl-ref/source/religion.cc
parent92bd916f110000643510a642b39db9c5e679d111 (diff)
downloadcrawl-ref-c804a3c5630d5c0e93a1bb34b03733e1805315fa.tar.gz
crawl-ref-c804a3c5630d5c0e93a1bb34b03733e1805315fa.zip
Fix [2792504]: Fix inverted logic causing penalties for necromancy to be
disabled along with penalties for attacking hostile holy beings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9775 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3c5dff25c4..35539ecdd9 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2455,15 +2455,18 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
"just this once.");
break;
}
+
if (thing_done == DID_ATTACK_HOLY
- && (victim->attitude != ATT_HOSTILE
- || testbits(victim->flags, MF_CREATED_FRIENDLY)
- || testbits(victim->flags, MF_WAS_NEUTRAL)))
+ && (victim->attitude == ATT_HOSTILE
+ && !testbits(victim->flags, MF_CREATED_FRIENDLY)
+ && !testbits(victim->flags, MF_WAS_NEUTRAL)))
{
- piety_change = -level;
- penance = level * ((you.religion == GOD_SHINING_ONE) ? 2
- : 1);
+ break;
}
+
+ piety_change = -level;
+ penance = level * ((you.religion == GOD_SHINING_ONE) ? 2
+ : 1);
retval = true;
break;
default: