diff options
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 73d0547f6c..7067112d6e 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -1306,46 +1306,7 @@ void mon_nearby_ability(monsters *monster) return; } -#define MON_SPEAK_CHANCE 21 - - if (monster->is_patrolling() || mons_is_wandering(monster) - || monster->attitude == ATT_NEUTRAL) - { - // Very fast wandering/patrolling monsters might, in one monster turn, - // move into the player's LOS and then back out (or the player - // might move into their LOS and the monster move back out before - // the player's view has a chance to update) so prevent them - // from speaking. - ; - } - else if ((mons_class_flag(monster->type, M_SPEAKS) - || !monster->mname.empty()) - && one_chance_in(MON_SPEAK_CHANCE)) - { - mons_speaks(monster); - } - else if (get_mon_shape(monster) >= MON_SHAPE_QUADRUPED) - { - // Non-humanoid-ish monsters have a low chance of speaking - // without the M_SPEAKS flag, to give the dungeon some - // atmosphere/flavour. - int chance = MON_SPEAK_CHANCE * 4; - - // Band members are a lot less likely to speak, since there's - // a lot of them. - if (testbits(monster->flags, MF_BAND_MEMBER)) - chance *= 10; - - // However, confused and fleeing monsters are more interesting. - if (mons_is_fleeing(monster)) - chance /= 2; - if (monster->has_ench(ENCH_CONFUSION)) - chance /= 2; - - if (one_chance_in(chance)) - mons_speaks(monster); - } - // Okay then, don't speak. + maybe_mons_speaks(monster); if (monster_can_submerge(monster, grd(monster->pos())) && !monster->caught() // No submerging while caught. |