summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-22 19:45:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-22 19:45:42 +0000
commit47386690ed83155fc660c15f19c780b9dbf4d386 (patch)
tree1610679a7d4ec6a2e0005de2f8f6c89569ba50e5 /crawl-ref/source/religion.cc
parente253274f72e6f51e8f9638f3d62152405223292a (diff)
downloadcrawl-ref-47386690ed83155fc660c15f19c780b9dbf4d386.tar.gz
crawl-ref-47386690ed83155fc660c15f19c780b9dbf4d386.zip
Fix [2701428]: TSO will no longer give piety loss and penance for
attacking and killing hostile holy beings (not counting holy beings that weren't hostile until you attacked them, of course). The warning prompt now takes this into account, as well. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9532 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index b701b4a786..ca46da5962 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2446,10 +2446,12 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
"just this once.");
break;
}
- piety_change = -level;
- if (known || thing_done == DID_ATTACK_HOLY
- && victim->attitude != ATT_HOSTILE)
+ if (thing_done == DID_ATTACK_HOLY
+ && (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);
}
@@ -2731,13 +2733,13 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
case GOD_ZIN:
case GOD_SHINING_ONE:
case GOD_ELYVILON:
- if (testbits(victim->flags, MF_CREATED_FRIENDLY)
+ if (victim->attitude != ATT_HOSTILE
+ || testbits(victim->flags, MF_CREATED_FRIENDLY)
|| testbits(victim->flags, MF_WAS_NEUTRAL))
{
- level *= 3;
- penance = level;
+ penance = level * 3;
+ piety_change = -level * 3;
}
- piety_change = -level;
retval = true;
break;
@@ -2800,10 +2802,9 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
if (testbits(victim->flags, MF_CREATED_FRIENDLY)
|| testbits(victim->flags, MF_WAS_NEUTRAL))
{
- level *= 3;
- penance = level;
+ penance = level * 3;
+ piety_change = -level * 3;
}
- piety_change = -level;
retval = true;
break;