summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/misc.cc7
-rw-r--r--crawl-ref/source/religion.cc21
2 files changed, 15 insertions, 13 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 97134dc9e3..0c78d07da5 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -3013,7 +3013,10 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack,
const bool isFriendly = mons_friendly(mon);
const bool isNeutral = mons_neutral(mon);
const bool isUnchivalric = is_unchivalric_attack(&you, mon);
- const bool isHoly = mons_is_holy(mon);
+ const bool isHoly = mons_is_holy(mon)
+ && (mon->attitude != ATT_HOSTILE
+ || testbits(mon->flags, MF_CREATED_FRIENDLY)
+ || testbits(mon->flags, MF_WAS_NEUTRAL));
if (isFriendly)
{
@@ -3033,8 +3036,6 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack,
&& you.religion == GOD_SHINING_ONE
&& !tso_unchivalric_attack_safe_monster(mon))
{
- // "Really fire through the helpless neutral holy Daeva?"
- // was: "Really fire through this helpless neutral holy creature?"
snprintf(info, INFO_SIZE, "Really %s the %s%s%s%s%s?",
(beam_attack) ? (beam_target) ? "fire at"
: "fire through"
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;