From 028bc69fd8d06f923b17c90f72f93f1a0154a8eb Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 29 Sep 2007 12:40:55 +0000 Subject: Berserking monsters are now noisy with a noise level that befits their shout_type. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2253 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 5c3cf95dcd..c9775005c9 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -4591,6 +4591,30 @@ static void monster_move(monsters *monster) const int habitat = monster_habitat( monster->type ); bool deep_water_available = false; + // Berserking monsters make a lot of racket + if (monster->has_ench(ENCH_BERSERK)) + { + int noise_level = get_shout_noise_level(mons_shouts(monster->type)); + if (noise_level > 0) + { + if (mons_near(monster) && player_monster_visible(monster)) + { + if (one_chance_in(10)) + { + mprf(MSGCH_TALK_VISUAL, "%s rages.", + monster->name(DESC_CAP_THE).c_str()); + } + noisy( noise_level, monster->x, monster->y ); + } + else if (one_chance_in(5)) + { + handle_monster_shouts(monster, true); + } + else // just be noisy without messaging the player + noisy( noise_level, monster->x, monster->y ); + } + } + if (monster->confused()) { if (mmov_x || mmov_y || one_chance_in(15)) -- cgit v1.2.3-54-g00ecf