summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-23 19:02:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-23 19:02:40 +0000
commit00fa3aab73d230d60d6bb6fb5419bbbb89e1222e (patch)
tree4bc27eff09e7360cd8617283e925eaceaa047bd4 /crawl-ref/source/spells1.cc
parenta63220f8123cc7f64d6c15504e8299b02355094b (diff)
downloadcrawl-ref-00fa3aab73d230d60d6bb6fb5419bbbb89e1222e.tar.gz
crawl-ref-00fa3aab73d230d60d6bb6fb5419bbbb89e1222e.zip
Give an indication of whether pacification raised piety or nor.
Currently, this seems to hardly ever happen. (?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9804 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 86a1529af0..2558184a29 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -753,24 +753,33 @@ static int _healing_spell(int healed, bool divine_ability,
bool did_something = false;
if (you.religion == GOD_ELYVILON
- && can_pacify
- && is_hostile)
+ && can_pacify && is_hostile)
{
did_something = true;
- simple_god_message(" supports your offer of peace.");
- if (mons_is_holy(monster))
+ const bool is_holy = mons_is_holy(monster);
+ const bool is_summoned = mons_is_summoned(monster);
+
+ int pgain = 0;
+ if (!is_holy && !is_summoned && you.piety < MAX_PIETY)
+ pgain = random2(1 + random2(monster->max_hit_points / 12));
+
+ if (pgain > 0)
+ simple_god_message(" approves of your offer of peace.");
+ else
+ simple_god_message(" supports your offer of peace.");
+
+ if (is_holy)
good_god_holy_attitude_change(monster);
else
{
- const bool is_summoned = mons_is_summoned(monster);
simple_monster_message(monster, " turns neutral.");
mons_pacify(monster);
// Give a small piety return.
if (!is_summoned)
- gain_piety(random2(1 + random2(monster->max_hit_points / 12)));
+ gain_piety(pgain);
}
}