diff options
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 6dbcdb0e4f..09c20b2016 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2444,23 +2444,23 @@ static void handle_nearby_ability(monsters *monster) } if (monster_can_submerge(monster, grd[monster->x][monster->y]) - && ( !player_beheld_by(monster) // no submerging if player entranced - && (one_chance_in(5) - || ((grid_distance( monster->x, monster->y, - you.x_pos, you.y_pos ) > 1 - // FIXME This is better expressed as a - // function such as - // monster_has_ranged_attack: - && monster->type != MONS_ELECTRICAL_EEL - && monster->type != MONS_LAVA_SNAKE - && (monster->type != MONS_MERMAID - || you.species == SP_MERFOLK) - // Don't submerge if we just unsubmerged for - // the sake of shouting. - && monster->seen_context != "bursts forth shouting" - && !one_chance_in(20)) )) - || monster->hit_points <= monster->max_hit_points / 2) - || env.cgrid[monster->x][monster->y] != EMPTY_CLOUD) + && !player_beheld_by(monster) // no submerging if player entranced + && (one_chance_in(5) + || ((grid_distance( monster->x, monster->y, + you.x_pos, you.y_pos ) > 1 + // FIXME This is better expressed as a + // function such as + // monster_has_ranged_attack: + && monster->type != MONS_ELECTRICAL_EEL + && monster->type != MONS_LAVA_SNAKE + && (monster->type != MONS_MERMAID + || you.species == SP_MERFOLK) + // Don't submerge if we just unsubmerged for + // the sake of shouting. + && monster->seen_context != "bursts forth shouting" + && !one_chance_in(20)) ) + || monster->hit_points <= monster->max_hit_points / 2 + || env.cgrid[monster->x][monster->y] != EMPTY_CLOUD)) { monster->add_ench(ENCH_SUBMERGED); update_beholders(monster); |