summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-14 05:04:41 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-14 05:04:41 +0000
commitb023db56a817c7dea12b16004eb9cb72de1b3edb (patch)
tree617b45939787be3d4929bd7053ae64d82215141a /crawl-ref/source
parentbc00511096980e23748fec292faf127908155911 (diff)
downloadcrawl-ref-b023db56a817c7dea12b16004eb9cb72de1b3edb.tar.gz
crawl-ref-b023db56a817c7dea12b16004eb9cb72de1b3edb.zip
When turning god gifts or piety-converted monsters hostile, make sure
that they're properly alerted, so that the neutral ones don't keep wandering around aimlessly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3631 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/religion.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index d75bc12620..ae4b862a4d 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2871,7 +2871,7 @@ static bool holy_beings_on_level_attitude_change()
if (monster->attitude != ATT_HOSTILE)
{
monster->attitude = ATT_HOSTILE;
- monster->behaviour = BEH_HOSTILE;
+ behaviour_event(monster, ME_ALERT, MHITYOU);
// for now WAS_NEUTRAL stays
success = true;
@@ -2982,8 +2982,9 @@ static bool make_god_gifts_on_level_hostile(bool seen = false)
&& monster->attitude == ATT_FRIENDLY
&& (monster->flags & MF_GOD_GIFT))
{
- // monster changes attitude
+ // monster changes attitude and behaviour
monster->attitude = ATT_HOSTILE;
+ behaviour_event(monster, ME_ALERT, MHITYOU);
if (!seen || simple_monster_message(monster, " turns against you!"))
count++;
@@ -3028,7 +3029,7 @@ static bool orcish_followers_on_level_abandon_you()
#endif
monster->attitude = ATT_HOSTILE;
- monster->behaviour = BEH_HOSTILE;
+ behaviour_event(monster, ME_ALERT, MHITYOU);
// for now CREATED_FRIENDLY stays
success = true;
@@ -3092,7 +3093,7 @@ static bool beogh_followers_abandon_you()
}
monster->attitude = ATT_HOSTILE;
- monster->behaviour = BEH_HOSTILE;
+ behaviour_event(monster, ME_ALERT, MHITYOU);
// for now CREATED_FRIENDLY stays
if (player_monster_visible(monster))