From f24effa7e6806e80cca64a04a480e56b539c6999 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 9 May 2009 17:50:45 +0000 Subject: * Monsters shout only when they notice you (i.e. you are in sight). * Add a tile for out of range grids (lighter shade than out of sight). * Make Xom's repel stairs effect only happen during tension. * Add Z to keybind.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9755 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 3281ee0a7c..795c7304a7 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2805,9 +2805,12 @@ void behaviour_event(monsters *mon, mon_event_type event, int src, _handle_behaviour(mon); ASSERT(in_bounds(mon->target) || mon->target.origin()); - // If it woke up, it might shout. - if (was_sleeping && !mons_is_sleeping(mon) && allow_shout) + // If it woke up and you're its new foe, it might shout. + if (was_sleeping && !mons_is_sleeping(mon) && allow_shout + && mon->foe == MHITYOU && !mons_wont_attack(mon)) + { handle_monster_shouts(mon); + } const bool wasLurking = (old_behaviour == BEH_LURK && !mons_is_lurking(mon)); -- cgit v1.2.3-54-g00ecf