summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-05-25 04:50:06 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-05-25 04:50:06 +0100
commite63b8743aef0a7eb483ab65972e2bc03c5c188d3 (patch)
tree75a678e233ec32f02fe0c6d7392a2b993c0a096a /crawl-ref/source/mon-act.cc
parent02a2660fa473d440eeb33b04b0a868c925b35ff4 (diff)
downloadcrawl-ref-e63b8743aef0a7eb483ab65972e2bc03c5c188d3.tar.gz
crawl-ref-e63b8743aef0a7eb483ab65972e2bc03c5c188d3.zip
Don't let monsters resubmerge in clouds instead of trying to attack the player
They can still resubmerge, but only if they would have done so anyway with no cloud (if they can't reach their target for example). Trapdoor spiders weren't even immune to the clouds while submerged, and so would previously just stay submerged under a cloud and die.
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index ffadd0201e..402d691267 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2035,9 +2035,6 @@ void handle_monster_move(monster* mons)
mons->shield_blocks = 0;
- const int cloud_num = env.cgrid(mons->pos());
- const bool avoid_cloud = mons_avoids_cloud(mons, cloud_num);
-
_mons_in_cloud(mons);
#if TAG_MAJOR_VERSION == 34
_heated_area(mons);
@@ -2102,17 +2099,6 @@ void handle_monster_move(monster* mons)
ASSERT(!crawl_state.game_is_arena() || mons->foe != MHITYOU);
ASSERT_IN_BOUNDS_OR_ORIGIN(mons->target);
- // Submerging monsters will hide from clouds.
- if (avoid_cloud
- && monster_can_submerge(mons, grd(mons->pos()))
- && !mons->caught()
- && !mons->submerged())
- {
- mons->add_ench(ENCH_SUBMERGED);
- mons->speed_increment -= ENERGY_SUBMERGE(entry);
- return;
- }
-
if (mons->speed >= 100)
{
mons->speed_increment -= non_move_energy;
@@ -2151,14 +2137,6 @@ void handle_monster_move(monster* mons)
{
if (mons->submerged())
{
- // Don't unsubmerge if the monster is avoiding the
- // cloud on top of the water.
- if (avoid_cloud)
- {
- mons->speed_increment -= non_move_energy;
- return;
- }
-
if (!mons->del_ench(ENCH_SUBMERGED))
{
// Couldn't unsubmerge.