diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-29 12:40:55 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-29 12:40:55 +0000 |
commit | 028bc69fd8d06f923b17c90f72f93f1a0154a8eb (patch) | |
tree | 5281bb88d5784ad390558c38053391df16d577f1 /crawl-ref/source/monstuff.cc | |
parent | db14a59ff5bd0c5da6cd8fda542d9f6c8f62eeeb (diff) | |
download | crawl-ref-028bc69fd8d06f923b17c90f72f93f1a0154a8eb.tar.gz crawl-ref-028bc69fd8d06f923b17c90f72f93f1a0154a8eb.zip |
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
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 24 |
1 files changed, 24 insertions, 0 deletions
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)) |