diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-22 06:43:44 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-04-28 01:17:12 +0100 |
commit | 2f8e1e877b38c09d97707a372a66cc74d4e18c6e (patch) | |
tree | b64a6794e3dc2bcaceebaf7e0c03f86b2fcb9148 /crawl-ref/source/spl-goditem.cc | |
parent | 6cdc4f9c37b3e5971c9d67f0f5dc6ab66de17ae4 (diff) | |
download | crawl-ref-2f8e1e877b38c09d97707a372a66cc74d4e18c6e.tar.gz crawl-ref-2f8e1e877b38c09d97707a372a66cc74d4e18c6e.zip |
Don't turn holies neutral when worshipping a good god
It's almost never relevant (with Mennas being possibly the only edge
case), and has a number of negative effects: dungeon generation depending
on the player's god in Pan, strange interactions with getting additional
chances to convert on piety breakpoints, and generally a lot of code for
a pretty questionable gain. Flavour-wise it seems perfectly reasonable
that the holies in the dungeon just all see you as insufficiently pious,
or some kind of a heretic (as is the case for non-holy religious
monsters).
Kept some of the holy speech for the case where an Elyvilon worshipper
pacifies a holy.
Diffstat (limited to 'crawl-ref/source/spl-goditem.cc')
-rw-r--r-- | crawl-ref/source/spl-goditem.cc | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-goditem.cc b/crawl-ref/source/spl-goditem.cc index e5494fb7f9..304f6af5f6 100644 --- a/crawl-ref/source/spl-goditem.cc +++ b/crawl-ref/source/spl-goditem.cc @@ -13,6 +13,7 @@ #include "cloud.h" #include "coord.h" #include "coordit.h" +#include "database.h" #include "decks.h" #include "env.h" #include "godconduct.h" @@ -147,6 +148,23 @@ int identify(int power, int item_slot, bool alreadyknown, string *pre_msg) return identified; } +static void _print_holy_pacification_speech(const string key, + monster* mon, + msg_channel_type channel) +{ + string full_key = "holy_being_"; + full_key += key; + + string msg = getSpeakString(full_key); + + if (!msg.empty()) + { + msg = do_mon_str_replacements(msg, mon); + strip_channel_prefix(msg, channel); + mprf(channel, "%s", msg.c_str()); + } +} + static bool _mons_hostile(const monster* mon) { // Needs to be done this way because of friendly/neutral enchantments. @@ -365,16 +383,31 @@ static int _healing_spell(int healed, int max_healed, bool divine_ability, mpr("Elyvilon supports your offer of peace."); if (is_holy) - good_god_holy_attitude_change(mons); - else { - simple_monster_message(mons, " turns neutral."); - record_monster_defeat(mons, KILL_PACIFIED); - mons_pacify(mons, ATT_NEUTRAL); + string key = "pacification"; - // Give a small piety return. - gain_piety(pgain); + // Quadrupeds can't salute, etc. + mon_body_shape shape = get_mon_shape(mons); + if (shape >= MON_SHAPE_HUMANOID && shape <= MON_SHAPE_NAGA) + key += "_humanoid"; + + _print_holy_pacification_speech(key, mons, MSGCH_FRIEND_ENCHANT); + + if (!one_chance_in(3) + && mons->can_speak() + && mons->type != MONS_MENNAS) // Mennas is mute and only has visual speech + { + _print_holy_pacification_speech("speech", mons, MSGCH_TALK); + } } + else + simple_monster_message(mons, " turns neutral."); + + record_monster_defeat(mons, KILL_PACIFIED); + mons_pacify(mons, ATT_NEUTRAL); + + // Give a small piety return. + gain_piety(pgain); } if (mons->heal(healed)) |