summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
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;