From 00fa3aab73d230d60d6bb6fb5419bbbb89e1222e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 23 May 2009 19:02:40 +0000 Subject: 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 --- crawl-ref/source/spells1.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spells1.cc') 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); } } -- cgit v1.2.3-54-g00ecf