diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 03:32:49 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 03:32:49 +0000 |
commit | eea780a4ce6f65322040c52a49a56a3a60003249 (patch) | |
tree | a255c8d8c0dd57524020ddc8fdf9ea0dbe708ac0 /crawl-ref/source/mon-util.cc | |
parent | 635887d54e242f2150146f7f980246df04cbac5b (diff) | |
download | crawl-ref-eea780a4ce6f65322040c52a49a56a3a60003249.tar.gz crawl-ref-eea780a4ce6f65322040c52a49a56a3a60003249.zip |
Make berserking and non-living monsters stop retreating from Sanctuary as
soon as they leave it, since they're being forced out rather than actually
afraid. Also give a "stops retreating" message for them instead of the
"regaining courage" one.
Remove faulty logic that was causing monsters to not notice the player
as soon as they stopped fleeing Sanctuary.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6320 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index b320eac21b..1c1a22e2ae 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -5217,9 +5217,17 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet) break; case ENCH_FEAR: - snprintf( info, INFO_SIZE, " seems to regain %s courage.", - mons_pronoun(static_cast<monster_type>(this->type), - PRONOUN_NOCAP_POSSESSIVE)); + if (holiness() == MH_NONLIVING || has_ench(ENCH_BERSERK)) + { + // This should only happen because of fleeing Sanctuary + strcpy( info, " stops retreating."); + } + else + { + snprintf( info, INFO_SIZE, " seems to regain %s courage.", + mons_pronoun(static_cast<monster_type>(this->type), + PRONOUN_NOCAP_POSSESSIVE)); + } if (!quiet) simple_monster_message(this, info); |